8086 emulator - ideas please!

I'm making an emulator for the 8086
https://github.com/zsteve/hard86

I'd like to have some input on what features it should have

Its primary feature would be the ability to use virtual devices
virtual LED board, servo motor, VFD, screen, and possibly also access to real serial ports (?).

Here is what I have now :

1. Preliminary Design Ideas
1.1 Purpose
1. Provide an emulated x86 platform on which to run binary x86 code.
1. Able to execute the 8086 instruction set
2. Able to interface with plugins to simulate hardware devices
3. Able to provide a debugger and symbols data generating/loading
4. Able to provide an IDE supporting debugging, syntax highlighting, quick reference, etc
1.2 Requirements
1. Should support the full 8086 instruction set.
1. Eventually can support more instructions, such as the floating point coprocessor instructions
2. The emulator should be runnable standalone as well as attached to the IDE
3. Should be able to load pure binary (.bin) and simple executable files (.com)
4. Should be able to load plugins from a dynamic link library (.dll) to simulate hardware devices
5. Should provide a debugger with inbuilt disassembler, as well as symbols loading.
6. Use FASM as an assembler
7. IDE should be programmed in Win32 API. Cross platform compatibility not required.
1.3 Required Components
1. Emulator
1. It is important that the core emulator implementation is not platform specific. Any usage of platform-specific components such as mutexes or threads should be abstracted through wrapper functions, or through preprocessor blocks
2. Core emulator engine
1. Emulator engine should be able to serve two purposes
1. Most importantly, to emulate code
2. Second purpose should be to disassemble an input file
1. This can be accomplished with a "disassembler" flag, in which it outputs an ASCII representation of the disassembled code
2. Or it can be accomplished in a different module
3. Debugger
4. Emulator interface to virtual devices
5. Emulator user interface (Front-end). This component should be programmed in the Win32 API
1. Debugger user interface
2. Disassembler user interface
2. IDE
1. MDI user interface
2. Support for loading projects
3. Syntax parser and highlighter


Would appreciate it if anyone can give me some ideas for extra features :)
or at least show interest?! :)
There was a reason the 8086 fell out of popularity, and that reason is still valid. Why not go with MIPS or ARM?
Well it's because x86 assembly language has essentially remained quite the same since the 8086, and most PCs nowadays are x86 based.

It's mainly meant to be an educational tool for microcontroller-like programming where you get real memory and I/O access
I think it could be a good idea to start at the 8086 and slowly add the successors into the emulator, adding to the instruction sets and building like a "chip library", eventually catching up to modern day (maybe skipping a few models)... Then you've got a really powerful emulator capable of mimicking any chip you'd like.
Last edited on
Hey I think it's a great start but for interace and Sabin out self time you could try a win API wrapper it waste less time requires less code and is just better

Ali of people prefer wrappers or frameworks instead of the winAPI also you get cross compatibily instead of being limited to one platform without bringers


Also where did you learn all this low level stuff like interprenter parser processors and that stuff I dot have a clue of what they are how did you start out learning about these stuff like an Ito to all of it


And I finished my k and r c book waht should be my first project


Could you recomend me a introduction of the the stuff you do
The concept of emulation is actually very straight forward. The easiest way is to aquire a ROM dump for the platform you're planning on emulating, then reading the file contents opcode by opcode. Once you get a hold of the opcode, you just check what it wants you to do, then do what it asks. Getting the emulator to run at an acceptable speed is another matter entirely.
Topic archived. No new replies allowed.