<< Newer Article #47 Older >>

Cocktail mode

Spent some time this evening puzzling out how Sega's cocktail mode/screen flipping support works. It's different with every system. Some systems do all the work for you like magic, so you don't even have to change anything (apart from toggling a bit somewhere) when you flip the screen around to display player 2 on a cocktail cabinet. Other systems will do some of the work, but changes have to be made to account for the fact that the hardware doesn't perform a complete flip.

Sega falls into the latter category for System 16A. The most unexpected part is that the registers controlling the tilemap pages are actually stored in a different location (16 bytes earlier) than they are when the screen is not flipped. On top of that, the X scrolling coordinate is 17 pixels off. It looks like both of these problems were fixed in the 16B tilemap chip, since neither special case applies.

I also did a very interesting test with the protected Golden Axe version. I ran the code in MAME up to the point where there are problems moving your player, and logged to a file all the transactions to the compare/timer chip. Then I wrote some 68000 code to run on the real PCB and play back the communications one step at a time, displaying the results along the way. By this technique I was hoping to find some error in my implementation of the compare chip registers. But as it turns out, I'm spot on in this case. This can only mean one thing: the bug isn't due to the compare/timer chip implementation! So it's back to the drawing board to see if I can come up with a new explanation....