VOGONS


First post, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie

Hey guys,

I'm trying to debug a game, to figure out how its sound card detection routines work. Using the DOSbox debugger I found the point where I want to place a breakpoint, but now I need to check what it does on hardware. I'm looking for a debugging program that allows me to debug on a monochrome monitor and run the game on VGA at the same time. Something like the DOSBox debugger with breakpoints, being able to log IO port access, and having code/data displays on the same screen would be awesome.

I'm pretty sure I found a program like this once, but forgot its name. Does anyone know of a debugger like that?

Reply 1 of 6, by n1mr0d

User metadata
Rank Newbie
Rank
Newbie

SoftICE?

VooDoo Power Asus CUBX-E 440BX PIII 1.4GHz GF4 Ti 4600 Voodoo2 SLI 12MB SBLive!+Drive SB16 CT2230 + NEC XR385
Nostalgia pc Vtech Laser Slimline DX4-100 16MB Acumos AVGA1 AWE32 CT3980 Roland MPU 401 MT32 SC88

Reply 2 of 6, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie

Does that work with protected mode programs? (dos4gw bound)

Reply 3 of 6, by elianda

User metadata
Rank l33t
Rank
l33t

I used SWAT for the debugging of SoftMPU which uses protected mode.
http://www.sudleyplace.com/swat/
I think it has the features you look for.

Retronn.de - Vintage Hardware Gallery, Drivers, Guides, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 4 of 6, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie

This seems just perfect, thank you!
However I seem to be doing something wrong since I keep running into invalid opcodes and meaningless code while single-stepping. I need to find the point where DOS4GW finishes doing whatever it does (and before the game hijacks the keyboard interrupt) and resume debugging from there. But how do I get there?
I also tried setting breakpoints at the I/O ports I'm interested in, using the debug registers. But these get trapped by DOS4GW instead of SWAT 🙁

Reply 5 of 6, by elianda

User metadata
Rank l33t
Rank
l33t

I don't know. It worked fine here. For SoftMPU I used it in combination with EMM386 4.46+ and QEMM 7.03+ (up to 9.0) on a 486DX2-66.

Retronn.de - Vintage Hardware Gallery, Drivers, Guides, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 6 of 6, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie

After wasting several evenings on this I finally figured it out. 386SWAT kept crashing when stepping over the function call that initializes protected mode, and setting breakpoints on the other side just started the game and didn't do anything. I/O breakpoints were all intercepted by DOS4GW which then crashed instantly.
But then I realized OpenWatcom has a debugger too... Of course! It should be designed to work with DOS4GW, after all. And yes, running the unbound LE exe in Watcom Debugger dropped me right at the game's entry point.
The dual-screen function was a bit pointless in the end since the game does its sound initialization stuff right before switching to graphics mode. It did allow me to run WD on one screen and 386SWAT on the other, though, which works great (I/O breakpoints set in SWAT are then handled by WD)