by jacquesm · 1y ago · 0 comments
It is interesting how what worked flawlessly on the hardware of the time is almost impossible to get to work on these emulators, the fidelity is quite low. But bit by bit I'm making progress in figuring out where the differences are and how to work around them. I've got a basic self-hosted development system working now with all of the data in a ram disk. The floppy, keyboard and VGA screen all work, now I need to figure out why the harddrive controller keeps disappearing.
Oh well, the night is young ;)
Thank you for posting this! It really moved the needle in what already was a super long debug session.
Also if you look at qemu's device emulation, that's usually "done" when it can run modern operating systems. Qemu doesn't try hard to emulate the entire IDE or SCSI command set in every detail, or every aspect of old hardware.
Another thing is that qemu is not cycle-accurate at all. Instruction and device timings will be wildly different from real hardware, especially if using TCG.
My development system is a ramdisk right now and that feels a bit scary.
So what is? One would need software supporting debugging. VirtualBox supports that I think, but I don’t know if that works if it runs on top of Hyper-V - which is enabled by default in Windows due to some security features (and I don’t want to disable that anyway).
It is the right software. It's not even debatable: qemu is the one most used for OS development by an order of magnitude difference or more.
It's a marvelous piece of engineering which is slower than others, but that's the price to pay for accuracy.
In fact, (having worked for quite a while in supporting decades old enterprise software) my experience with most PC virtualizers and emulators is that they're ridiculously accepting of errors that will most definitely trigger random behavior in (at least some) real hardware.