Jump to content


Astrocade MAME Debugger Tricks

Z80 Programming Astrocade Bally Arcade MAME Emulation

No replies to this topic

#1 ballyalley OFFLINE  



  • 1,753 posts
  • Location:Albuquerque, NM

Posted Wed Jun 20, 2018 12:03 PM

I don't know if I'll have more MAME debugger examples, but if I do, then I'll post them here.

Over the last few days, I've been disassembling the 4K ROM of Bally Pin (aka Astrocade Pinball).  Today while disassembling Bally Pin, I found the table that holds the six "scores" (sound effects) that are called by BMUSIC (a subroutine that you can read about in the "Nutting Manual").  Here is the source code for that table that I created (note that L stand for Label here, so L2F7A means that a score is at $2F7A on the cartridge):

; Music Score Table ??
L2F6E:  DW      L2F7A
        DW      L2FE6
        DW      L2FA3
        DW      L2FB8
        DW      L2FC2
        DW      L2FCA

Each score is called by the BMUSIC routine, which resides at ROM location $2F67 on the Bally Pin cartridge.  I set a MAME debugger breakpoint at $2F67.  This allowed me to check what was going on with various registers when BMUSIC is called.  I needed to know the values of HL, A and IX.  This worked okay, but was a little clumsy.  I wondered how to set a breakpoint only when HL was a certain value.  I looked online, but I couldn't find exactly what I was looking for exactly.

Through trial and error, I discovered that I could stop Bally Pin's execution when the BMUSIC routine was called and one certain score was called.  Here's how I did this in MAME's debugger:

BPSET $2F67,HL == $2FC2

This allowed me to figure-out that the "score" at $2FC2 is the one of the two sounds that the spinner makes as it goes round and round.

MAME's debugger is sweet!  It's too bad that the documentation for it is sparse.  You sort of need to know how to use it before you start using it, which is intimidating.


Also tagged with one or more of these keywords: Z80 Programming, Astrocade, Bally Arcade, MAME, Emulation

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users