User:Andlabs/Racing Hero
This page is rather stubbly and could use some expansion. Are you a bad enough dude to rescue this article? |
Andlabs |
---|
Developers: Sega,
Aicom
|
Debugging Functionality
Prerequisites
Before we can access the debug features, we have to build a custom version of MAME with a simple change.
Go into src/mame/drivers/segaxbd.c and locate the block of code surrounded by
//************************************************************************** // GENERIC PORT DEFINITIONS //************************************************************************** static INPUT_PORTS_START( xboard_generic ) ... INPUT_PORTS_END
Within that block should be a line that says
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // button? not used by any game we have
Change it to
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Debug Mode")
If all goes well, if you start MAME and open Racing Hero, you'll find that your Button 3 key (by default, the spacebar) will be assigned to a new button, "Debug Mode". You can change it if you want; I'll be referring to this button as "Debug Mode" from now on.
You will also need to assign keys to the "Suicide" and "Move to Center" buttons.
To do: Verify that all this works with A. B. Cop as well |
Getting In
Now that we can access the debugging functionality, start MAME with the debugger.
Whether the debugging features are enabled is also dependent on bit 3 of byte $3FFFE in the main CPU ROM. By default, this byte is set to $E7, leaving bit 3 unset. We'll need to set it on with the debugger:
maincpu.ob@3FFFE = 0xEF go
To do: The other unset bit, 4, seems to be a region switch; there's no racheroj (yet), though... There is abcop and abcopj, so I wouldn't be surprised, but its region bit seems to be different from what the code claims it is |
Now we can finally begin debugging. Press both 1P Start and Debug Mode at the same time. The game should pause, and the text PAUSE should appear on the bottom-left corner of the screen. Press both buttons again to unpause.