Emulator/Virtual Machine programming

Programming, for all ages and all languages.
Post Reply
0x13
Posts: 5
Joined: Sat May 29, 2010 4:54 pm

Emulator/Virtual Machine programming

Post by 0x13 »

Hi,

I want starting OS dev but I've read in Wiki (starting os dev and language programing learning is bad idea) – :D 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 :D, thanks very much.
montrom
Member
Member
Posts: 86
Joined: Thu May 13, 2010 1:45 pm

Re: Emulator/Virtual Machine programming

Post 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.
Visit the Montrom user page for more info.
0x13
Posts: 5
Joined: Sat May 29, 2010 4:54 pm

Re: Emulator/Virtual Machine programming

Post by 0x13 »

thank you! but hardware specification is not free!? (I'm just reading some topics in Google)
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Emulator/Virtual Machine programming

Post 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.
0x13
Posts: 5
Joined: Sat May 29, 2010 4:54 pm

Re: Emulator/Virtual Machine programming

Post by 0x13 »

You're right I've found :mrgreen: in source code some ASM codes for testing CPU (instructions)
User avatar
Thomas
Member
Member
Posts: 281
Joined: Thu Jun 04, 2009 11:12 pm

Re: Emulator/Virtual Machine programming

Post 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
0x13
Posts: 5
Joined: Sat May 29, 2010 4:54 pm

Re: Emulator/Virtual Machine programming

Post 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 :mrgreen: , but how you have tested others parts ? :shock:
User avatar
Thomas
Member
Member
Posts: 281
Joined: Thu Jun 04, 2009 11:12 pm

Re: Emulator/Virtual Machine programming

Post by Thomas »

Hi,
I unit tested them :).But I messed it up anways :) .

--Thomas
Post Reply