David Haywood's Homepage
MAME work and other stuff

Little Changes

September 10, 2018 Haze Categories: General News. 22 Comments on Little Changes

It always annoys me when I read people making claims that there are only a ‘handful’ of fixes in the newer MAME versions compared to those that people are running on awfully underpowered devices like the Raspberry Pi; versions so old you’ll be stretched to find any active developer who even considers them to be the same project as MAME anymore.

Most of those versions are based on versions somewhere between 15 and 20 years old, and it would be more accurate to say there have been a handful of fixes every single week since then, many graphical, many directly affecting how the games play. The recent work done on the emulation of various protection chips is a good example of where the older versions are going to have fundamental gameplay flaws, with Operation Wolf in 0.201 being the latest in a long line of example.

The Super Shanghai Dragons Eye fixes mentioned in a previous post are also an example of an improvement that might otherwise slipped under the radar, and the post before that about Chrono Soldier shows how documentation of what’s what in those older versions is wrong too, with them presenting what turned out to be a prototype as the final game.

It doesn’t stop there tho, Steel Force is a game I emulated for MAME 0.58, which was released on 05 Feb 2002. I was watching one of LordBBH’s MAME Roulette streams where he ended up playing the game and noticed that on one of the levels there was a priority bug. I hadn’t noticed this issue before, so I’d never considered fixing it. Having noticed it, I decided to take a look at making a few improvement to the driver, and ended up fixing the priority bug while also improving some scene transitions I noticed were faulty too.

It’s subtle, and a lot more obvious when in motion because they move at a different speed, but the screenshot on the left has some ugly ‘oil’ bubbles over the ground, which should be part of the background and hidden under the ground layer.


Steel Force Steel Force

There are still potentially some alignment issues with the game, as a few scenes do still look a little rough at the edges of the screen, but such bugs are commonly found in games due to safe areas, overscan and the like. The ending text for example doesn’t quite fit with the current visible area / alignment. This may, or may not be a bug in the original game, it doesn’t look like a great deal of effort was put into this screen, the developers even managed to misspell the title of the game as ‘STEELF FORCE’ The problem is there are very few high quality original resources for these games to use as reference.

Steel Force

So, anyway should you want to experience this game without ugly scene transitions and without the priority bugs, 0.202 or higher is going to be required.

Other little changes have been made over the last week or so too. I emulated a game called Pitapat Puzzle (which I need to write about at some point) and that allowed me to fix some video banking issues in later levels of the ‘Die Break’ game in ‘Bestri’ which is actually one of the most genuinely enjoyable Korean breakout clones. The bonus stages take the form of a Space Invaders style round, and if the ‘Girls’ dipswitch is enabled, are meant to show some non-erotic artwork rather than the usual grassy fields etc. Not only was the banking incorrect, but the later graphic ROMs weren’t even being loaded correctly. This one has been incorrect since MAME 0.113u3 (22 March 2007) which is when it was first added, and I had no solution to the tile banking at the time.

Left is MAME 0.201 and below, right is what will be in MAME 0.202 and higher.


Die Break (Bestri)
Die Break (Bestri) Die Break (Bestri)
Die Break (Bestri) Die Break (Bestri)

Anyway, there’s a common theme with these things. On the surface the games appeared to be just fine, you could fire them up, and play them, with no obvious issues in the first 10 minutes of play, but once you started to get a bit further into the games you’d encounter an increasing number of problems.

For Super Shanghai you’d have to complete a handful of stages to get to the glitched cutscenes and priorities, for Steel Force you’d have to complete a bunch of levels to get to the broken priorities, for Die Break (Bestri) you’d have to complete 9 stages to see the issue. For Chrono Soldier you’d have to know about the game, and complete at least 3 stages for it to become apparent that the old version is massively incomplete. For Operation Wolf you’d have to play the game, possibly even reach right before the final boss to see it glitch out (although if you were using anything more than a year old the problems were significantly worse)

These are all little changes from an end user point of view, but when you consider that (aside from Operation Wolf) they’re things that a single developer has fixed in the space of roughly a week then multiple that by the number of developers, then further multiple by the number of weeks old each MAME version is and you can see how quickly the number of bug fixes adds up, and how it’s far more than a just a handful. The older versions aren’t “good enough” they’re downright awful for any serious use.

I get the novelty value of running the ancient versions on old devices, I get that it’s ‘cheaper’ etc. (although I find that debatable, as a Pi3 is 6 times slower in benchmarks than a throwaway 9 year old 3Ghz Core 2 Duo) but I still find it frustrating that people are recommending such versions and hardware for serious MAME builds. Once anybody starts playing on one, even running just the classics, you start to hit a mountain of bugs even if on the surface they look ‘good enough’

Sure there are regressions in new versions too, and some of those do frustrate me, but the overall trend is towards many more things working better, and regressions do get fixed.

A lot of the progress in MAME doesn’t get detailed writeups (because really, we’d rather be fixing things and improving the emulator) but it’s still there, happening all the time, just like the stuff I have covered here.

Go to article.. »

A Pile of Tiles, Correctly Ordered

September 5, 2018 Haze Categories: General News. 6 Comments on A Pile of Tiles, Correctly Ordered

Around 5 years ago MAME 0.150 was released (17 September 2013) and in this release was a rewrite of the Data East protection chip handling, which allowed many previously problematic games that ran on Data East hardware to run without hitting protection related issues. To me it was one of the biggest advances in emulation at the time because quite a number of games made very devious use of the protection.

At that time there were two sets of Super Shanghai Dragon’s Eye dumped. The first was an English language bootleg that partially worked, but appeared to have buggy code where the bootleggers had missed protection checks and not reworked certain elements for the bootleg hardware properly. The emulation was imperfect, and trying to figure it out wasn’t helped by being unsure which bugs were emulation bugs and which were errors that would happen in the actual bootleg.

The second set was a Japanese set of the original game, which prior to the Data East protection work previously mentioned, had not worked properly either as various protection checks were failing.

Once the new protection code was in the Japanese set became playable, but had a number of graphical problems, and it wasn’t 100% clear how things hooked up because the existing hookups in the driver were based around the bootleg, which wasn’t quite the same as the original hardware, and some bad assumptions had been made.

While the game worked well enough to be marked as ‘Working’ in MAME the palette and priority issues were annoying, however, due to interests wavering, the driver got put on the back-burner and remained there ever since.

A recent dump of the original, non-bootleg English language set however prompted me to go back and look at the driver, and looking at it with fresh eyes I was able to spot some really quite obvious errors and reimplement the priority and mixing in a way that actually works for all situations.


Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye

Left old emulation, Right new emulation

MAME 0.201 and below MAME 0.202 and above
Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye
Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye
Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye
Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye
Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye
Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye
Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye
Super Shanghai Dragon's Eye Super Shanghai Dragon's Eye

The emulation of the bootleg was also improved, and benefits from the priority fixes, however there are still a number of other glitches, such as it not clearing the text in certain situations, and hanging at the end of the intro text until you press a button in quest mode. These appear to be cares where the bootleggers failed to deal with the protection properly as previously mentioned, so very likely happen on the bootleg hardware too.

Interesting note unrelated to the emulation: using the infinite ‘helper’ cheat isn’t actually very useful as the game always ends up recommending the first pair it finds, not the best, which inevitably leads to you failing levels.

and yeah, I know it’s a Shanghai tile matching game, and everybody seems to hate those these days, but all drivers need attention :-)

Go to article.. »

20 Years a Prototype

September 5, 2018 Haze Categories: General News. 2 Comments on 20 Years a Prototype

“Toki no Senshi – Chrono Soldier” has been supported in MAME for the longest time. It’s a Sega System 2 game, and records would indicate that it was added in MAME 0.34b3 which was released on September 17, 1998, so give or take a couple of weeks, 20 years ago.

What nobody seemed to have noticed in those 20 years is that the dumped version of the game was actually a prototype, and that the original hadn’t actually been dumped. There was a note in the source added more recently saying that the existing set was possibly a bootleg, because an original board had been observed with an encrypted 317-0040 module and the code we had was decrypted, but nobody had noticed that the build we had was a very different version of the game.

The PCB with the encrypted CPU module was dumped recently, so I bruteforced the key (thanks to Sega’s weak random number generation algorithms that were used to generate the keys) and got the new set running in MAME.

There were already a couple of unexpected difference with the new dump; firstly not only did the CPU code ROMs differ, but the tile ROMs were also different, as was one of the sprite ROMs and the colour PROM. This is highly unusual.

Comparing the initial gameplay demo there were clearly some visual differences, so I decided to delve a bit deeper into it.

The more I looked, the more I started to become sure that the old build wasn’t a hack or a bootleg, but actually a prototype, with the new build being much more complete. First of all, let’s look at the level layouts in the old build that’s been supported for 20 years.

Older / Prototype build, Levels 1,4,5,8

I’ve grouped these levels out of order to make it clear that after level 3 the prototype starts recycling levels, in fact the first level gets used 4 times with different themeing and by the time you get to level 8 the theme / tileset doesn’t seem to be complete either.

Proto lv1 Proto lv4 Proto lv5 Proto lv8
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)


Prototype build, Levels 2,3,6,7

As mentioned, the prototype starts recycling at stage 4, so there are 2 more unique stages, stage 2, which gets recycled at stage 6, and stage 3 which gets recycled at stage 7. Again the themes change each time to make the levels still look fresh even when they’re not. Note also the complete lack of background details here, it’s just a single tile repeated meaning that really only a single stage was 100% complete at this point in time.

Proto lv2 Proto lv6 Proto lv3 Proto lv7
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)
Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?) Toki no Senshi - Chrono Soldier (prototype?)

So we can conclude that in the earlier build which I’m dubbing a prototype, there is very little variety in the levels (3 complete foreground / object placement layouts, 1 complete background layout) and the final theme doesn’t even seem to be complete.

Final build Levels 1,2,3,4

Now if we look at the new dump “Toki no Senshi – Chrono Soldier (MC-8123, 317-0040)” the new set, which came from a board with proper Sega EPR numbers and an encrypted 317-0040 module you can see that the level design has evolved quite a bit. I’ve kept the levels in order this time because no level layouts are recycled (so I don’t have to group to make the point). As you can see, Levels 1,2 and 3 are basically the ones from the prototype but with improved background details etc. It was after that point the prototype started recycling levels, however, level 4 here is a brand new layout, not present in the prototype at all.

Final lv1 Final lv2 Final lv3 Final lv4
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)

Final build Levels 5,6,7,8

Again, we have completely new level layouts here, the bosses do still cycle, just like in the older build, which is slightly disappointing, but the level designs for these later stages are significantly more challenging (or frustrating depending on your point of view) There is reuse of one of the visual themes (stage 5 and 7) but overall you can see that there’s a lot more content here than in the prototype build. The final 2 levels are still a little lazy, with level 7 having a background with no detail and the level 8 theme being a palette swap, but it’s likely there was no time left to develop them further and the actual level designs being unique was probably considered ‘good enough’

Final lv5 Final lv6 Final lv7 Final lv8
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)
Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set) Toki no Senshi - Chrono Soldier (newer, encrypted set)

There are other differences too, the new set actually has a staff screen when you complete it, and the high score table correctly shows that you reached round 08, not round 01 in that case too.


Toki no Senshi - Chrono Soldier Toki no Senshi - Chrono Soldier

compare that to the old set, no ending, incorrect level shown.


Toki no Senshi - Chrono Soldier (prototype)

The new set also has a test mode, while the old one will just give you a black screen if the test dipswitch is set. note, the video ram check fails tho, this appears to be a bug in the game code that was probably introduced at the last minute and not fixed before release.


Toki no Senshi - Chrono Soldier Toki no Senshi - Chrono Soldier Toki no Senshi - Chrono Soldier Toki no Senshi - Chrono Soldier

Title screen is recoloured slightly (like most things between the sets) but mostly the same, left is final, right is prototype.


Toki no Senshi - Chrono Soldier Toki no Senshi - Chrono Soldier (prototype)

Overall you can see there are a lot of differences between these sets. I think 20 years must be a record for having something supported in MAME without realising it was a prototype and the final version was still missing.

Thanks to ShouTime for dumping this piece of history, it’s been interesting to look at and might have gone unnoticed for even longer without his efforts to get this stuff preserved. Prototypes are fascinating, but knowing the final versions of games have been documented and preserved is vital when looking back at our history.

btw I’m happy for The Cutting Room Floor to use any of this research / resources contained in the write up as they see fit.

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