![]() ![]() com/.exe differences, and TSR's and BIOS calls and so on. Just the presence of DEBUG.COM alone has made this an exciting and fun project for the kids, who are learning all about filesystems and DOS. So we have now isolated it and gotten it booting, and are using the onboard DEBUG.COM to attack the virus, neutralize it, control it and see what else we can do with it. COM infecting viruses on it, and thats why granddad put it in the attic. COM file I execute gradually gets bigger. So, we dig it out, boot it up, and try to figure out what exactly is broken. We resurrected it with great joy and interest as to what we would find on this machine - apparently it had been in his family since it was bought, brand new, back to his grandfathers house, where it was used for a few months (!) before being 'put in the attic because it was broken'. 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.I'm a serious retro-computing fan, and as a result of my activism one of my sons friends has re-discovered his families Commodore PC-20-II DOS PC in the attic. ![]() 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. Example: First well change a single byte at location CS: FFCB from whatever it was before to D2. com file because you have to do your own initialization of any hardware that you use (e.g. Used to enter data or instructions (as machine code) directly into Memory locations. 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 |