x86 Virtual Machine Development
-
- Member
- Posts: 48
- Joined: Mon Aug 13, 2007 2:30 pm
x86 Virtual Machine Development
Does anyone know where I can get information on developing a x86 Virtual Machine?
All you really need are the tech docs for whatever you're emulating. eg. the Intel manuals will be very useful while you're working on the CPU end of things, and the DMA specs would be needed when implementing that. (Kind of common sense.)
Beyond tech doc's you might want to look into some methods of interpretation, and check out some design types. (modular, etc.)
Good Luck.
Beyond tech doc's you might want to look into some methods of interpretation, and check out some design types. (modular, etc.)
Good Luck.
C8H10N4O2 | #446691 | Trust the nodes.
Think alot before you start coding, trust me...you'll regret not whenever your rewriting all of your code to get it to work for 32bit....
Aside from that...here are some questions that might help you...
How portable do you want it to be? (OS-portable, Arch-portable, or not portable at all)
What method of emulation are you wishing to do? There are many, interpretation is imo the easiest, but also the slowest. There is also static recompilation, dynamic recompilation, and now with AMDs new Virtual machine extensions, are you wishing to make use of those?
How high do you want to aim for emulation support? Just some old 16bit IBM PC is enough emulation? or one of these new 64bit CPUs and network card, and graphics, and PCI and such....
What will stand out in your emulator? Unless you are just wanting to code for fun, you should have a purpose, something like where you are filling a niche with your emulator. (not to put you down, but never say "mine will be faster than the others," that is basically impossible)
What will be the license? Closed source or open source?(BSD, GPL, ect.)
How will devices be managed?
What language will it be made in?
I'm really quite tired, so sorry if some of that is hard to understand...
and to think I'm this tired and writing a development guide...oh no...lol
But if you are interested in skipping the making of the CPU emulation(and you want to be OS portable, use C++, and use the interpretation method of emulation)
I am working on a project called x86Lib. It is a C++ library for the emulation of an x86 CPU(right now only an 8086/8186, but eventually 8286 and 8386) It is designed to help people to create an emulator. It is mostly ready to be implemented, though I have not made a former release. I just wanted to wait until I had at least full 8086 emulation going(all the instructions actually) until I made a release. But only a few more instructions need to be implemented, and the class used to control the CPU and the memory and port classes are all ready to be implemented...
I unfortunately, have yet to make an implementation guide, but if you are interested, I could try to give you the infromation for it, and guide you through it all... just email me or PM me...
Aside from that...here are some questions that might help you...
How portable do you want it to be? (OS-portable, Arch-portable, or not portable at all)
What method of emulation are you wishing to do? There are many, interpretation is imo the easiest, but also the slowest. There is also static recompilation, dynamic recompilation, and now with AMDs new Virtual machine extensions, are you wishing to make use of those?
How high do you want to aim for emulation support? Just some old 16bit IBM PC is enough emulation? or one of these new 64bit CPUs and network card, and graphics, and PCI and such....
What will stand out in your emulator? Unless you are just wanting to code for fun, you should have a purpose, something like where you are filling a niche with your emulator. (not to put you down, but never say "mine will be faster than the others," that is basically impossible)
What will be the license? Closed source or open source?(BSD, GPL, ect.)
How will devices be managed?
What language will it be made in?
I'm really quite tired, so sorry if some of that is hard to understand...
and to think I'm this tired and writing a development guide...oh no...lol
But if you are interested in skipping the making of the CPU emulation(and you want to be OS portable, use C++, and use the interpretation method of emulation)
I am working on a project called x86Lib. It is a C++ library for the emulation of an x86 CPU(right now only an 8086/8186, but eventually 8286 and 8386) It is designed to help people to create an emulator. It is mostly ready to be implemented, though I have not made a former release. I just wanted to wait until I had at least full 8086 emulation going(all the instructions actually) until I made a release. But only a few more instructions need to be implemented, and the class used to control the CPU and the memory and port classes are all ready to be implemented...
I unfortunately, have yet to make an implementation guide, but if you are interested, I could try to give you the infromation for it, and guide you through it all... just email me or PM me...