First post, by drsly
Hi all,
I'm working on a PC emulator project, to learn more about the workings of the hardware.
My goal is to have accurate emulate of a Pentium system circa 1996.
So far I have implemented:
- majority of x86 instruction set (real mode)
- 8259A PIC
- 8253/54 PIT
- 8237 DMA controller
- 8042 keyboard controller
- 82077AA floppy disk controller
- Basic VGA (text mode only)
- still lots more to do, obviously
This is all my own work, based on reading tech datasheets and various sources on the internet. I have a bit of background in C and assembler, though never actually used either in my role as a .Net developer.
Right now I'm able to POST (using Bochs bios image), and load the boot sector from a floppy image, which is great.
Problem I'm having is that the bugs are getting much harder to find. The DOS boot disk I'm testing hangs somewhere after displaying 'Starting MS DOS'. Running the same disk under Bochs debuger, there's 20 million cpu cycles from the prompt until the next screen activity.
If anyone can help, I need ideas on how to test what I've built so far. Maybe something simpler than DOS, or some specialised boot disk image for testing hardware emulation? I'd really like to implement protected more & paging next, but there's really no point doing this until everything else is working!!
In case anyone's interested, the source is at https://bitbucket.org/DrSly/pcemu/src/ (note the master branch isn't the most up to date, see the "dev" branches, currently dev_20190630 is the most recent). You'll need a C compiler, as well as rom images for bios/vga (PM me for details).
Any advice from someone who's done this sort of thing before will be greatly appreciated. Thanks for reading 😀