The forum about vgm files
It is currently 2021-04-14, 13:00:05

All times are UTC + 1 hour [ DST ]

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: DOSBox & OllyDbg
PostPosted: 2013-06-30, 14:19:17 

Programmers Programmers
Contributors Contributors
User avatar

Joined: 2012-03-18, 16:59:23
Posts: 155
Location: Tomsk, Russia
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:


 Post subject:
PostPosted: 2014-11-09, 16:22:11 

Musicians Musicians
Contributors Contributors

Joined: 2012-09-29, 11:45:48
Posts: 219
Location: Australia
QFFW (quoted for f***ing win...ok more like BUMP)

Using the steps to access the DOSBox VM Memory allocation block has helped me in extracting the uncompressed .RIX music data for iModaozi. Many thanks for sharing!


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]

Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.021s | 15 Queries | GZIP : On ]