Jump to content
IGNORED

Debugging the 4A with MAME


jedimatt42

Recommended Posts

I'm trying to debug some interactions with hardware I only have access to through MAME. 

 

I've come to realize at least that the compartmentalized and abstract nature of MAME means the docs are both of those things as well...  I found that the debugger docs do not tell you how to enter the debugger, cause that's a general option. Shortly after figuring that out in the main MAME docs, I got smart and went here:  https://www.ninerpedia.org/wiki/MESS_debugger, but this isn't enough information...

 

I think in order to use the MAME debugger, some knowledge of the emulation architecture for a platform is required... for instance, I open a memory dump window, and it is for the ':maincpu' memory space. And I see lots of references in the generalized docs about debugger commands that understand systems can have multiple cpus... What I can't figure out is how to open a memory dump window for the VDP address space. Is the VDP treated as another processor? If so, is there a way inside the debugger to list the processors? 

 

Anyone feel like sharing some useful commands for discovering the 4A through the MAME debugger? Things like how do view VDP RAM, GROM, break on address read or write, and everything else you might know and find useful when debugging 4A behavior/software in MAME? 

 

-M@

 

 

Link to comment
Share on other sites

10 hours ago, jedimatt42 said:

Anyone feel like sharing some useful commands for discovering the 4A through the MAME debugger? Things like how do view VDP RAM, GROM, break on address read or write, and everything else you might know and find useful when debugging 4A behavior/software in MAME?

 

You can set breakpoints (bpset) in the executed code, and you can set watchpoints (wpset) in the data. Have a look at the "help" pages inside the debugger.

 

The only problem is GPL. There is no way to integrate a disassembler for GPL, and since GPL does not happen on hardware (remember, it is a virtual architecture), there is no way of debugging GPL. You can compile some debug flags into the code that I prepared, and then you can e.g. watch the accessed GROM areas in the system log.

 

Link to comment
Share on other sites

Thanks!  My flavor of Linux hasn't caught up with high res displays yet, so I couldn't see the pull down indicator in the memory dump window... The dust on my screen is larger than the pull down menu icon.. :(

 

---

 

Where are the 'help' pages inside the debugger?  I don't see anything in here about help pages:  https://docs.mamedev.org/debugger/general.html?highlight=debugger

 

How would you go about setting a watchpoint on VDP RAM?  Can you qualify a memory address when specifying wpset? 

 

-M@

 

  • Like 1
Link to comment
Share on other sites

Type "help" in the debugger's command line.

 

I don't think you can set a watchpoint in VDP RAM. Everything related to breakpoints and watchpoints has to do with the memory access of the CPU. The VDP is not implemented as a CPU (while the 9995 in the HX5102 hexbus floppy drive is indeed a second CPU).

 

Out of curiosity, I just tried this: When you run the TI-99/8 with the HX5102, you can switch between the "maincpu" and the "drivecpu" by pressing F6 (Run to other CPU). Then you can set breakpoints and watchpoints for the respective CPU.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...