David Haywood's Homepage
MAME work and other stuff

Makeup on a Broken Man

December 12, 2015 Haze Categories: General News. 13 Comments on Makeup on a Broken Man

The Jaleco Megaystem 1 driver is broken to an almost shambolic level, nothing really works as it should. This is mainly down to interrupt handling, timing, sometimes subtle protections, and generally things not being understood well. It did used to run ‘better’ but even back then it was held together with hacks.

If you’re expecting this post to be about Ninja Kazan (Iga Ninjyutsuden) being fixed, or the random sprite lag being fixed, or Takeda Shingen / Shingen Samurai-Fighter crashes being fixed then stop reading now, they’re not, I have no clue how to fix them without resorting to the hacks of old, and I’d really rather not do that.

Kale did add a video RAM mirror allowing the background destruction to function correctly in 64th Street (characters still don’t move during attract tho) and so I decided that while fixing the bigger issues with the driver simply wasn’t going to happen it was probably worth making some other improvements for the time when that does happen.

It has been known since system11 acquired a PCB and made a video that there was a graphical effect missing in Takeda Shingen, A Mametesters report was created with 2 handy videos demonstrating the effect in Takeda Shingen and the P-47 test mode.

This was a while back, and in the meantime the Final Burn Alpha devs emulated the effect due to having more active devs on the MS1 driver than we have.

Since nobody else had done it yet, and it was easy enough, I ported the FBA code that dink and iq_132 had written back into MAME; since the FBA code was based on the MAME code in the first place this wasn’t too difficult.

The result can be seen in the vidoes below. Note, I’ve used the English language set ‘Shingen Samurai-Fighter’ instead of the Japanese language set system11 used for his video. Also note, the game really is broken beyond being playable in MAME right now and crashes out at the start of level 2 even in this test video. The effect can be seen after I pick up the power-up which turns my sword into a flashing one, and then kill some enemies, with the effect emulated they ‘pixelate’.


Content not available.
Please allow cookies by clicking Accept on the banner

The P-47 test mode video demonstrates more clearly the settings for Mosaic that are available. (same settings as Mametesters reference video have been used, you can see the effect creates the same pixels in MAME)


Content not available.
Please allow cookies by clicking Accept on the banner

The effect is also used on the Jaleco logo in P47, after the spinning squares, looks a bit ugly, but should be correct. There’s actually another missing effect on the Jaleco logo here, the initial graphics should draw sprite trails, we’re going to have to look into that one too, could once again be the only place it gets used(!)


Content not available.
Please allow cookies by clicking Accept on the banner


Obviously these will be more interesting to you once the driver works properly again (which like I say, I have no ETA on) but until then you might appreciate seeing them anyway.

Go to article.. »

Lady Bugs like to Fight

December 8, 2015 Haze Categories: General News. 16 Comments on Lady Bugs like to Fight

One of the great things about having a fully merged MAME/MESS project is that it gives exposure to some things that might otherwise be missed.

plgDavid recently picked up (for the costly price of 600$) the last remaining undumped Casio PV1000 game cartridge, a port of Universal’s Lady Bug known on this platform as Fighting Bug.

The PV1000 was a simple system and received basic but original ports of a handful of arcade classics from around the period it was sold.

There isn’t really a huge amount I can say about the game, it’s Lady Bug, it plays a decent game, if you didn’t have access to an arcade then it would have been a nice piece of software to have at home back in the day. I’m glad to see it’s been preserved.


Content not available.
Please allow cookies by clicking Accept on the banner

Go to article.. »

Shattering Fast / I’m Glass, I’m Glass

December 7, 2015 Haze Categories: General News. 19 Comments on Shattering Fast / I’m Glass, I’m Glass

Anybody familiar with the MAME emulation of various Gaelco games will know that the big stumbling block for a many of them is the DALLAS DS5002FP security / suicide chip present on a lot of the PCBs.

In fact the only reason the game World Rally is emulated at all is because Gaelco directly provided the internal code of the security chip for that game (but no other games unfortunately)

The other working Gaelco sets are all unprotected versions, and even when we have both an unprotected and protected version of a game the protection is so well embedded that trying to simulate it is a nightmare.

We thought we’d actually got all the known unprotected versions of Gaelco games already, that was until system11 spotted an unprotected version of ‘Glass’ with an additional ‘Version 1994’ subtitle displayed on the title screen. Naturally he picked it up to investigate further.

The board has PROMAT stickers on the program roms, and the pictures of girls used ingame have been replaced with Anime drawings, no nudity. It looks very much like this version was created for the Korean market, presumably a year later than the original release when protecting it wasn’t considered such a high priority. The PCB lacks any of the components relating to the security.

As this version is completely unprotected it runs fine in MAME


Content not available.
Please allow cookies by clicking Accept on the banner



Glass 1994 Version Glass 1994 Version
Glass 1994 Version Glass 1994 Version

Go to article.. »

The Way It’s Meant to be Played

December 7, 2015 Haze Categories: General News. 11 Comments on The Way It’s Meant to be Played

Eco Fighters is a shooter released by Capcom in 1993, it can be seen as a spiritual successor to Forgotten Worlds in that it’s a horizontal shooter with a rotatable character.

One little known fact about the game is that it supports Spinner as an input device, however this configuration was exceedingly rare in the wild and for a long time it was thought a special romset was needed in order for the spinners to function. As a result most people are used to playing the game with a Joystick which doesn’t give anywhere near as precise control, especially irritating to players of the game was the fact that the attract demos were clearly recorded with an analog device (a Spinner).

As it happens no special romset is required at all, an otherwise unused bit in the input ports specifies that the Spinners should be used, and by feeding the correct analog inputs with that bit set the game plays as it was meant to be played.

This discovery actually came to light as a result of 3rd party spinner kits that were being sold for use with the game, allowing it to operate with Forgotten World style controllers. While the official Capcom spinner kit for the game is very rare (and thought to possibly have only been used on location tests) the unofficial kits are actually fairly easy to get hold of, and to our surprise didn’t require any kind of modified romset to function.

These kits prompted me to take another look at the game code, with the new knowledge that when the spinner is plugged in it should change the display of the test menu to show ‘Rolling’ instead of the P2/P3 buttons. I was able to quickly located the bit controlling this, and from there the pieces fell into place. The problem before was that we were looking for a way to enable a test mode control type option for the Spinner (like Puzz Loop 2 has) but it seemed like if there ever was one it had been removed from the code leading me to conclude that the versions we had no longer supported a spinner, I’m glad to have been proven wrong over this!

I can only assume the spinner for the original is rare due to cost cutting at Capcom, anybody who has played this with a Joystick, or attempted to play Forgotten Worlds without the spinner (using a keyboard / joystick in MAME, or on some stupid multi-game arcade setup without the proper controls) will tell you that it’s not an enjoyable experience, many spots in the game rely on you being able to make fast and precise movements to snipe down enemies.

Here’s a quick video of the game running in MAME with spinners (best watched at 60fps to get a good idea of the smoothness of the movement)


Content not available.
Please allow cookies by clicking Accept on the banner

Go to article.. »

Bubble Bubble

December 1, 2015 Haze Categories: General News. 9 Comments on Bubble Bubble

In the comments of my update about Nostradamus an original reference video for another game I’d emulated a long time ago was posted. That game was Aquarium by Excellent System, the video was this one by YouTuber ‘zu4989’

The post was made in relation to an audio issue in the emulation, now, the driver was done long before I really had any idea how to hook up audio chips, so that side of thing was done by somebody else (R. Belmont from memory?) but with a better understanding of these things myself now I decided to take a look.

The basic issue was that the wrong music was being played at the wrong times.

Initially I thought it might be a simple case of a bad modernization, old versions of MAME required you to leave a gap in the CPU region where you loaded a ROM if RAM was present for 8-bit CPUs (Z80 etc.) Newer versions don’t have this flaw and as a result a lot of drivers were cleaned up to remove that hack and handle things properly, it looked on the surface like the rom loading on Aquarium had been updated, but the modernized banking code was pointing to the wrong places (it was looking for 7 banks of 0x8000 from an offset of 0x18000 in the z80 region, which actually exceeded the size of the region and could have potentially caused crashes if the final banks were actually banked in)

However, even fixing that, the music did NOT match the reference videos provided.

Looking more closely at the banking writes the game was making revealed a little more, we were using the bottom 3 bits of the register, so writes of 0x00, 0x01, 0x02 … up to 0x07 would select different banks. What the game was actually writing was 0x0, 0x1, 0x2, 0x3 and 0x10, 0x11, 0x12, 0x13, nothing else. At this point it was clear that we were using the wrong banking bits, the correct bits to use were the bottom 2 bits, and the 4th bit.

Each bank contains a difference piece of music, so by cross-referencing with the video again I was able to establish which bank write related to each real bank, and re-order the above bank select bits into the proper bank value (bit 0x01 -> 0x01, bit 0x10 -> 0x02, bit 0x02 -> 0x04) with that done, the music was fixed. This scrambling isn’t too surprising, the driver already had a descramble function for the OKI commands.

I’ve recorded a video of the game with the correct music being played, (CHEATS ARE ENABLED TO MAKE DEMONSTRATING ALL THE LEVELS EASIER) You can cross-reference it with the video linked above if you want


Content not available.
Please allow cookies by clicking Accept on the banner

The reference video also showed a number of cases where our priority handling wasn’t correct, namely the top border should have been chopping the large fish sprites and wasn’t, the large fish sprites also needed to go under the insert coin text (already correct) but at the same time needed to be shown above the bottom part of the NEXT text. Furthermore the smaller sprites showing the next pieces to appear needed to go underneath the tilemap. All those cases were fixed. The background colour was also incorrect, this wasn’t really visible anywhere except on the Winners Don’t Use Drugs screen, but I fixed that while I was at it as it was obvious even without a reference.

Go to article.. »

Bugs we didn’t see coming..

November 23, 2015 Haze Categories: General News. 14 Comments on Bugs we didn’t see coming..

Sometimes it’s difficult to know if the emulation of a game is correct without studying reference videos, and sometimes those reference videos don’t surface until much later.

That was the case with the FACE shooter Nostradamus, which has a number of video effects we didn’t know were missing until they were highlighted by somebody watching a 1CC (1 Credit Clear) of the game recorded from a PCB.

There were a number of effects, including a sprite masking effect and a shadow flicker effect missing, as well as the arms of the final boss (this one we did actually suspect was a bug for a long time, the PCB evidence provided confirmation)

I’ve uploaded a recording of the game after making several fixes to YouTube (the video has cheats enabled, it’s not meant to be a gameplay video) You’ll probably want to make sure you’re watching a 60fps version.


Content not available.
Please allow cookies by clicking Accept on the banner

Here are some links to specific parts of the video
Stage 6 Boss appearing – This is a masking / stencil effect created by putting a sprite behind the background layer causing it to cut holes in other sprites without being directly visible

Stage 7 Boss appearing – This flickering shadow is not actually a sprite and is done by using the tilemap enable register, turning it on and off every few frames, previously the tilemaps were alwyas enabled and the shadow was displayed as solid.

Final Boss arms – The arms are priority 0 sprites, and due to the way we cleared the priority buffer to 0 they were never being displayed.

Go to article.. »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close