3/10/2024 0 Comments Debugger for dosbox![]() In DOSBox, run the binary you want to debug, prefixed with debug.Load the executable you are debugging into IDA in the usual manner.Build the plugin and DOSBox as described in the BUILD.md file.Download the patched DOSBox source from the 'idados' branch of.Eric Fry Willem Jan Palenstijn started. ![]() com file the program needs to disable interrupts and avoid returning to DOS because if it did the system would likely crash due to important OS structures having been overwritten by your stack. For any address range that you pick, some DOS system somewhere is going to be using those addresses. ![]() A boot ROM would probably want to set up the stack at some constant address range. DMA controller and PIT for DRAM refresh) and you have to set up your own stack and non-constant data somewhere in RAM. com file because you have to do your own initialization of any hardware that you use (e.g. Now, writing a boot ROM is a bit more complicated than writing a. So many programs would work just the same regardless of exactly what segment (RAM or ROM) the program is started at. are loaded) and starts it there.Īlmost all instructions work relative to a particular segment, not an absolute physical address. com file, DOS loads it at xxxx:0100 (for some unknown segment xxxx depending on what version of DOS is being used and what drivers, TSRs etc. ![]() The idea is this: if your program is started as a boot ROM, the CPU will start it at FFFF:0000 (16 bytes before the end of the image), which does a jump to FF70:0100 (the beginning of the image). I'd advise against trying to compile your ROM into an ELF binary - that's a rabbit hole and doesn't actually solve the real problem of persuading an emulator to load your ROM file at the correct address and run it in the correct way. If your hardware has some peripherals that the emulator doesn't currently emulate then you'll just have to write your own emulations of those peripherals and integrate them, which is a bit more work but may very well end up saving you time in the long run. If it's just a matter of removing hardware or moving some things around in the memory (or port IO address, or IRQ, or DMA) map, those should be pretty easy changes to make. DOSBox isn't super difficult to modify and recompile (especially on Linux).Īs for the problem of emulating your custom hardware instead of a vanilla IBM PC, again this seems like a problem that's quite solvable by modifying DOSBox. If the ROM will only work at FF80:0000 then your best bet may be to modify an emulator to load your ROM instead of its own BIOS and recompile it. com file stub that loads the ROM image and jumps to the appropriate address, then start the debugger with that. As you correctly surmised, the first problem is going to be persuading whatever emulator you use to load the ROM image and run it in the appropriate way.įirst question: if your ROM is loaded into a different segment (but at the correct offset within that segment) do you expect it to work properly? If so, then your job is much easier - you can just write a little. Nowadays it's probably much easier to use a software-based emulator. The oldskool, hardware way to debug a boot ROM would have been to use an expensive (and probably hard-to-find, now) in-circuit-emulator that replaces the CPU. My go-to 8088 debugger lately has been the one built in to DOSBox ( ).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |