Apparently someone might put this to better use than me:
I haven't found any convenient way to look at VM memory in DOSBox but after some time I accidentally noticed that OllyDbg can display debugged process memory in realtime and even highlight values if they differ from these from backup. Here are a few use cases for that:
On screenshot: sequencer variables from DOS game Oscar, refreshed with 50ms period.
On screenshot: YMF262 registers, there are 2 such structures in DOSBox:
1. Registers from emulated SoundBlaster card
2. Buffer used for DRO writing
Changing values in first one directly impacts sound unlike second one, you can fill second structure with let's say FF's or 00's to see what is overwritten on key-on event and such.
Now let me describe a methods of finding these areas, but first it's better to change a few options in OllyDbg, Autoupdate interval and "Snow-free drawing":
1. Virtual Machine RAM
Easy one, you just need to know how much memory is allocated for virtual machine in bytes and add 0x1000 to it, e.g. you set it 32MiB, then you should look for block of 2001000 size:
Actual RAM goes form 20h and on screenshot you can see interrupt vector table :P
2. OPL2/3 registers
To find first buffer look for sequence 46 4D 00 in process dump (or use HxD, it can search in process memory on the fly) there will be a few occurrences, you will need first one outside mapped DOSBox execuable. e.g. not something like this:
But like this (note SB at 05A5FBB1h):
Now if you enabled auto update and something is playing in DOSBox you should see numbers changing rhythmically :P
To find other 2 structures just copy a block of data from chip registers and try to search them like above:
DOSBox & OllyDbg
Yo dawg I heard you like debuggers so we put debugger into..
Technical discussion about the VGM format, and all the software you need to handle VGM files.
Moderator: Staff