Page 1 of 1
Emulator/Virtual Machine programming
Posted: Sat May 29, 2010 5:13 pm
by 0x13
Hi,
I want starting OS dev but I've read in Wiki (starting os dev and language programing learning is bad idea) –
I don't know ASM and C – , for this reason by Googling and Googling, I've found a Virtual Machines created by Java such JavaPC (like Bochs) and I want know :
Where I can found any documentation for creating Virtual hardware (CPU,Memory, …) ?
And any useful information, idea, suggestion or others ?
I'm curious
, thanks very much.
Re: Emulator/Virtual Machine programming
Posted: Sun May 30, 2010 1:09 am
by montrom
Hi, you just need to find the specifications for whatever hardware you decide to support. Then you'll need a great understanding of each in order to code proper functions that do this and that, just as the hardware would do. It's not an easy thing to accomplish.
Re: Emulator/Virtual Machine programming
Posted: Sun May 30, 2010 6:11 am
by 0x13
thank you! but hardware specification is not free!? (I'm just reading some topics in Google)
Re: Emulator/Virtual Machine programming
Posted: Sun May 30, 2010 6:17 am
by NickJohnson
At least 90% of the x86 and x86-64 processor is documented for free at the Intel website, and the common devices you would need to support (VGA, keyboard, floppy, ATA/ATAPI controller, USB controller) have well-documented interfaces as well (for example, on the osdev wiki.)
Documentation shouldn't be the biggest issue for you - you really need to master your implementation language, as well as the assembly of the emulated platform, before you can start writing an emulator.
Re: Emulator/Virtual Machine programming
Posted: Sun May 30, 2010 7:40 am
by 0x13
You're right I've found
in source code some ASM codes for testing CPU (instructions)
Re: Emulator/Virtual Machine programming
Posted: Sun May 30, 2010 9:11 am
by Thomas
Hi,
Getting the processor working is possibly the easiest part at least in the case of 16/8 bit CPU's. The challenging part is getting the other parts working properly.(I partially wrote a c64 emulator), eg games use the display in complicated and non standard ways, (documentation is very difficult to find ) and only thing you can do is bang the head against the wall . ( my design was little complex , involving three threads one for handling input , other for updating the screen, other for running the cpu in the background which complicated the matter further, I will rewrite it again
). Writing a good and complete emulator is almost as challenging as writing a small os.Wishing you all the best
.
{Please excuse my poor English}
--Thomas
Re: Emulator/Virtual Machine programming
Posted: Mon May 31, 2010 6:26 am
by 0x13
Thomas wrote:Hi,
Getting the processor working is possibly the easiest part at least in the case of 16/8 bit CPU's. The challenging part is getting the other parts working properly.(I partially wrote a c64 emulator), eg games use the display in complicated and non standard ways, (documentation is very difficult to find ) and only thing you can do is bang the head against the wall . ( my design was little complex , involving three threads one for handling input , other for updating the screen, other for running the cpu in the background which complicated the matter further, I will rewrite it again
). Writing a good and complete emulator is almost as challenging as writing a small os.Wishing you all the best
.
{Please excuse my poor English}
--Thomas
Yes, in source code of 'dioscuri' (emulator by using Java) , I've found tests for CPU
, but how you have tested others parts ?
Re: Emulator/Virtual Machine programming
Posted: Wed Jun 02, 2010 10:32 pm
by Thomas
Hi,
I unit tested them
.But I messed it up anways
.
--Thomas