David Haywood's Homepage
MAME work and other stuff

Making Your Ears Bleed

April 1, 2015 Haze Categories: General News. No Comments

April 1st is typically about making your brain hurt with ridiculous concepts and fake news. Instead, this year I’ve decided to do the same to your ears instead with some very preliminary sound emulation.

The Hyper NeoGeo 64 is a system we’ve never quite got to grips with, it’s a difficult emulation target on several levels, and even the sound system is an unusual setup; a DSP found on a fairly expensive synth, driven by an NEC V53A processor (the synth also uses a V53 interestingly)

Over the last few weeks I’ve been looking at the V53 side of things. A V53 is a V33 with added onboard peripherals, and as it happens those peripherals are basically NEC equivalents / modified versions of a typical PC chipset, DMA controllers, Serial controllers, and an Interrupt controller. Luckily with all the advancements in PC emulation in the MESS side of the project all of those components are now emulated, so I was able to create a new CPU type and hook them up to it.

With the peripherals and their associated/configured ports identified and hooked up the remaining ports on the sound CPU stuck out more, and things like the ROM banking were immediately more obvious; fixing that up improved the flow of the V53 code dramatically. I’m actually unclear why they even need it, they had 2MB of sound program RAM for the V53 program and data structures, but no game uses even close to that, in fact, everything that is uploaded could have easily fit into the standard V53 address space with no banking at all. It looks like earlier in the design of the system they’d planned for 4MB of sound program RAM too, as there is an unmapped 2Mb space below the sound program on the MIPS side (if you map it then Xrally gets confused) and all bank addresses on the V53 side have the highest bit set.

Anyway, despite configuring various devices, I’m not entirely sure the system makes use of the serial functionality (although there’s clearly an interrupt associated with it) and all it ever seems to DMA is a buffer of 0x00 data from RAM. Maybe I’ll find out what these are for later, maybe, like so many things on the system, they were simply underused, or even unused.

Kale hooked up the 2 way communication ports between the MIPS and the V53 (surprisingly they didn’t just use the shared RAM) and also an interrupt on the V53 side that appears related to those ports, and for most of the games we started to see communication across the CPUs, commands being sent when sounds were trigger etc.

During the whole process described above a lot of code was refactored in preparation for more work.

With all that in place I then hooked what I’d earlier identified as writes to the sound chip to a new placeholder sound core, triggering some very rough sample playable. I took what seemed to be the sample start address, and set up the code so that it would play 0x2000 bytes of samples at that position for each request. What that resulted in can be seen / heard in the video below.




Of course, this sounds TERRIBLE. The PCM data format I’m using is wrong (it seems to be some kind of 8/16-bit hybrid format rather than plain signed 8-bit PCM) and there’s no concept at all of sample length, so some samples are cut off (Final Round) and others play for too long, resulting in garbage sounds, or unwanted extra bits of voice clips (Round 1,2) instead of Round 1 etc.

However, as terrible as it sounds, the first time you hear sound in something is a very special moment, so I decided it was worth preserving in a video. People have said that I don’t post enough ‘Work in Progress’ news pieces here these days, so here it is, as raw and ugly as it comes.

There’s still a long way to go with emulating the Hyper NeoGeo 64 to any good level, I did make some fixes to the texture rendering on Xtreme Rally (billboards etc.) a few weeks ago, but the 3D is still a flickery mess there because we don’t fully understand the 3D buffering techniques. The floor on Fatal Fury still needs hooking up again (I have some ideas) The network CPU needs emulating properly (otherwise Roads Edge is broken even if you force it to go ingame) Priorities and mixing need handling properly (I imagine that will hide a lot of the garbage sprites and layers you see at the moment) Sprite zoom needs fixing, Mosaic effects need adding, 3D colours and texturing still needs further fixing, 3D projection needs fixing in some cases (very obvious on the letterboxed Fatal Fury intro where it clearly attempts to project to full-screen instead of the letterboxed area) The 3D needs threading out to improve performance, and even the I/O is still an issue because the I/O mcus are not dumped, and the exact communication protocol isn’t understood meaning we’re relying on hacks to get any inputs at all.

As you can see, there’s a huge list of things that still need doing here, but, every little step is important with this driver, so finally being able to hear something is very significant, even if you’re not going to be able to tolerate it for more than a few seconds.

Some of the tasks are remarkably difficult, the network CPU is a truly insane Z80 based chip, with many opcodes only taking a single cycle, and a complex MMU system slapped on for good measure, to make things worse, the only documentation is in Japanese. The I/O MCU problem we can’t do anything about, we have no way to dump them, so it’s going to reqiure painstaking simulation code. Understanding a lot of the video registers is also going to take time, and maybe even hardware tests, because so many features are barely used.

Go to article.. »

Devweb

March 22, 2015 Haze Categories: General News. 26 Comments

System 11 recently acquired the PCB for a game called ‘Spider’ (it was actually dumped last month by another dev before being sent off to him)

On the surface the PCB looked practically identical to ‘Twins’ and ‘Hot Block’ which, interestingly enough both live in different drivers in MAME and have things hooked up in rather different ways.

Expecting an easy hook-up I was surprised to find that Spider did not simply drop into the existing driver, or more to the point, it did, but there were issues, mainly a complete lack of ingame sprites and title screen; considering how simple the hardware looked this threw me back a little.

Upon closer inspection I noticed that the game was behaving in a very similar way to another game I’d encountered in the past, Table Tennis Champions. Unfortunately Table Tennis Champions was one of those drivers where things never quite made sense, and I was starting to think the protection chip on that board was involved somehow. The Spider PCB however had no protection chip, blowing a hole in that theory.

What was actually going on took a while to figure out, and ultimately ended up being one of the strangest implementations of a ‘blitter’ I’ve ever come across. The game code writes to an i/o port, after which the next 2 writes to anywhere on the system bus are used as blitter parameters rather than actually falling through to RAM (the write offset is used to set a read offset) and writes to another region after that use those parameters to draw sprite data.

Whether the Twins PCB has this functionality and simply doesn’t use it, or if the FPGA is programmed differently on Spider to add support for the feature I don’t know, but with it hooked up the game became playable.


Spider Spider
Spider Spider
Spider Spider
Spider Spider
Spider Spider
Spider Spider

Things aren’t perfect yet, sometimes sprites remain on the screen when maybe they should be cleared (I need to check my framebuffer clear logic) and the EEPROM isn’t hooked up in the driver (it’s never been hooked up for Twins or Hot Blocks either) so you can’t change the game settings.

The game, as you can see, is a Qix clone, although it has enough unique features to make it interesting – the most significant being that the size of your line is limited by the web power you have available. There are also bonus rounds where you must circle numbers as quickly as possible.

I’ve also poked around a bit with Table Tennis Champions and it’s definitely the same blitter system as this, although there is extra banking I need to take care of with that one, and of course there’s also the protection PIC, although I have a feeling now that it’s simply used to drive the sound.

The PCB was found in Spain, and appears to be yet another original Spanish game.

Go to article.. »

UME / MAME / MESS 0.159

February 25, 2015 Haze Categories: General News. 22 Comments

UME (logo by JackC)
UME is the complete/combined version of the MAME / MESS project.

Official whatsnew texts for (MAME, MESS) provide full details of what has changed since 0.155.

This is based on the official ‘mame0159′ tagged version at GitHub.

UME 0.159 Windows binaries – 32-bit, 64-bit and all tools
(source matches official mamedev.org source distribution, here for completeness)

Other Binaries (if you don’t know what these are you don’t need them)
MAME/MESS split 0.159 Windows binaries – 32-bit, 64-bit and all tools

Windows SDL builds
32-bit SDL MAME / MESS / UME for Windows
64-bit SDL MAME / MESS / UME for Windows

Points of Interest

0.159 could be the point where interesting work being done in the MESS side of the project really overtakes the work being done on the arcade hardware.

Recent work on decapping / reading out MCUs from old electronic toys, as well as lots of work from hap on the CPU core to run them means that those represent some of the more noteworthy pieces of progress in this release. A number of them really need good quality external artwork files if they’re to be fully playable. Obviously the scope for this kind of work, and potential it has is expansive; we might even see a number of the things currently handled by MADrigal’s simulators emulated at a CPU level if they turn out to use MCUs we can read and emulate, and running the original game code is obviously a big step up from simulation of all the game logic.

There are some bits of MAME progress that you might find interesting however, obviously there’s PuzzLove shown below, and Super Miss World (which is an alt version of Miss World ’96) but some of the clones are potentially a bit spicier.

The versions of Asura Buster and Macross II are versions that were sent to Japanese arcade magazines for review and contain built in ‘pause’ functionality when holding down a button (in Asura Buster it’s the otherwise unused Player 1 Button 4, in Macross II the service coin button does the trick rather than adding a credit) I suspect the ‘STOP VERSION’ we see on some CPS2 games has the same meaning (there’s a Vampire Hunter set with it in MAME) although I don’t know the button press for that yet. While these are rare versions of games I don’t think you can call them prototypes, as they’re likely built from the final code, just customized by the original manufacturer for the magazines so that capturing screenshots was easier. A version of Ultra X Weapons was added from the same source, that actually has a newer build date than the existing set, although I’ve left it as a clone due to the likelihood of it being a review build rather than one intended for arcade use. Thanks of course must go to ShouTime for tracking down these rarities.

R.Belmont sums up some Apple 2/3 fixes and improvements that appear in 0.159

Lots of drivers have also had their save states improved in this release in addition to the usual bout of modernizations to bring drivers up to scratch with current standards.

Again in the MESS side the recently added Gamate (obscure handheld system made to compete with the GameBoy) driver has seen a number of fixes, including the addition of sound.

Go to article.. »

Love before Loop

February 3, 2015 Haze Categories: General News. 8 Comments

Manuel Assoni dumped a Korean game for which there was previously very little information about online.

The game is called ‘PuzzLove’ and it’s by Para (Paradise of Amusement) so it slotted into the driver we have for their other game (Silver Millennium) however there were some graphical errors with the sprites (wrong sizes, flickering). The Silver Millennium hardware is one of the many Korean hardware types using Tumble Pop style sprites as a base so I was a little surprised to see sprite glitches.

I took a quick look and it turns out they had simply swapped one bit of the sprite height attribute with the ‘blink / flicker’ bit. This was probably done as a simple kind of protection to stop board swaps. I added a special case for this game, and the glitches were fixed.


PuzzLove PuzzLove
PuzzLove PuzzLove
PuzzLove PuzzLove
PuzzLove PuzzLove
PuzzLove PuzzLove
PuzzLove PuzzLove
PuzzLove PuzzLove
PuzzLove PuzzLove

The game is a collection of mini-games accessed through the maze screen, I don’t get the impression there is a huge variety on offer but it’s an interesting original Korean development from 1994. Huge thanks to Manuel Assoni for dumping the ROMs from his PCB.

Go to article.. »

UME / MAME / MESS 0.158

January 28, 2015 Haze Categories: General News. 14 Comments

UME (logo by JackC)
UME is the complete/combined version of the MAME / MESS project.

Official whatsnew texts for (MAME, MESS) provide full details of what has changed since 0.155.

This is based on the official ‘mame0158′ tagged version at GitHub.

UME 0.158 Windows binaries – 32-bit, 64-bit and all tools
(source matches official mamedev.org source distribution, here for completeness)

Other Binaries (if you don’t know what these are you don’t need them)
MAME/MESS split 0.158 Windows binaries – 32-bit, 64-bit and all tools

Windows SDL builds
32-bit SDL MAME / MESS / UME for Windows
64-bit SDL MAME / MESS / UME for Windows

Points of Interest

0.158 represents steady progress in the right direction, all of the recent progress you’ve seen here is included, and a couple of things that I’ve not covered too, including what seems to be a rare original Italian game called ‘Star Trek’ running on Head On hardware) I’m inclined to think it should have a thruster sound instead of the car skid sound from Head On tho ;-) It’s not a game you’re going to lose sleep over playing, but does appear to be a very rare find!


Star Trek (Sidam) Star Trek (Sidam)
Star Trek (Sidam) Star Trek (Sidam)

There are some important little bugfixes in there too, things like the fix for the Space Harrier MCU simulation (it was doing the very subtle job of setting some bonus lives flags, not easy to catch) and priorities on one of the Batrider bosses (although if anybody notices any new priority bugs in the Toaplan 2 driver with 0.158 please do let me know) Super Punch Out also had an annoying reset ug in 0.157 due to premature removal of some protection workarounds, that’s fixed too. Work was also done on the -mt flag to fix a number of palette glitches that occured when using it, while I haven’t tested it extensively it might be safe to use once again for a fractional performance gain. (unless you have really bad video card drivers that are dog slow in even doing a simple blit, in which case the gain is more noticable) A number of Windows specific issues were also fixed in the SDL builds, which is why I’m offering those again for this release, more on that later tho.

Tetris heads will be happy to know that TGM2 is now set to the correct ~61.7 refresh rate, rather than the incorrect ’60’, meaning that timing should now properly match the PCB, even if that means the ingame timer is no longer counting real seconds (it assumes 60fps)

About SDLMAME/MESS/UME

If you’re running MAME on Windows XP using a nVidia card then you might be familiar with the instant Blue Screen of Death (or just instant machine reboot) you get when running MAME with any drivers nVidia from the last 5+ years. This is due to a bug in the nVidia drivers that happens to be triggered by MAME. We’re not doing anything illegal, or even fancy, we’re just unfortunate enough to get caught by it. nVidia have confirmed that they’re not going to fix it because it only affect unsupported Operating Systems and we and unsupported cards, and w can’t really fix it because it’s basically impossible to debug, so the only remedy for this using regular MAME is to either use the Software / DirectDraw renderer (-video ddraw) or stick with very old nVidia drivers.

If you want to avoid that problem then the SDL builds could be useful to you. For an accelerated mode they use ‘OpenGL’ instead of D3D and appear unaffected by the nVidia bug, meaning no BSODs on launch even if you use the latest drivers. I’m offering SDL builds for 0.158 because some important Windows specific bugs in the port were fixed over the course of the 0.157 -> 0.158 cycle.

The SDL builds also use GLSL shaders instead of HLSL, they can be a little tricky to get working (and there’s no Vector shader support) but a number of people have found they prefer the results over the HLSL approach (it’s personal preference) and there are shaders available that might actually be more suitable for lower end hardware.

You might also want to consider the SDLMAME builds if you’re running an Intel graphics based system and simply getting a black screen with MAME, or random error messages on startup telling you that D3D couldn’t be initialized. I’ve noticed this happening quite a lot even on Windows 8 laptops with Intel HD chipsets, older ones seem even worse. I haven’t checked if it does fix the ‘black screen’ problem with older Intel chipsets, but as it’s a completely different codepath it’s worth a try.

If you’re on XP + nVidia and would rather just go the ‘older drivers’ route, I’m told ‘258.96‘ from 2010 work with the regular versions of MAME we post. Some people have said the issue affects Vista users too, although there aren’t many of those left ;-)

Go to article.. »

More Model 3

January 23, 2015 Haze Categories: General News. 46 Comments

There were 3 other Model 3 games with encrypted graphics, Metallic found the keys for those, and the graphics have now been decrypted.

Note, not all of these run well in MAME for other reasons.

LA Machineguns had an encrypted title screen and encrypted HUD graphics. The game still runs in slow motion in MAME tho (even if you were to speed it up to 100%) I guess interrupt issues or similar.


La Machine Gun La Machine Gun
La Machine Gun La Machine Gun
La Machine Gun La Machine Gun

Virtual On 2 had various encrypted 2D graphics (insert coin text, player / enemy status during gameplay, various target graphics) MAME still has issues with bad textures on the robots due to missing features of the 3D emulation (not encryption related) Also controls aren’t set up correctly afaik.

Virtual On 2 Virtual On 2
Virtual On 2 Virtual On 2

Magical Truck Adventure also had encrypted 2D graphics for insert coin etc. and some ingame status graphics. There are still some game logic bugs in MAME (it seems impossible to avoid obstacles even if you select the right direction and the controls aren’t fully mapped) Also it glitches out and loses 3D graphics if you leave it in attract mode for long enough (see last shot) probably a CPU core bug.


Magical Truck Adventure Magical Truck Adventure
Magical Truck Adventure Magical Truck Adventure
Magical Truck Adventure Magical Truck Adventure
Magical Truck Adventure

Go to article.. »