"Andy" <[EMAIL PROTECTED]> wrote
> prove me wrong.  I have decided that I would like to try and write 
> an
> emulator, I'm going to start out with a couple of simpler systems 
> like
> the Chip 8 and maybe a well documented arcade game but I would like 
> to
> do an NES emulator eventually.

That's pretty challenging but not that difficult techically for the 
CPU.
The hardest bit is simulating the I/O subsystem and all the quirks
of the monitor/OS.

> Is Python anywhere near fast enough to do this and have
> it be playable?

Probably. Modern PCs are arpund 4000 times faster than the
older machines and you can do a lot of emulation in 4000
instructions! And because you are doing it in a high level
language a single machine instruction should only translate
to a few Python commands which hopefully translate to
a few hundred CPU commands.

> I hope so because I really don't like C/C++.

C is simple enough and quite good for this kind of thing because
its so close to the hardware. C++ doesn't add much for this
kind of job in my experience. Its basically a big jump table
(aka dictionary) with a whole lot of very small functions.

But python makes it easier to experiment because the jump
table is almost fgree and the functions should be only a
handful of lines each. The most technically challenging
bit is likely to be reading the programs from the other
machine - extracting and decoding the binary data format.
If you have that documented then its a fairly straightforward
if tedious job!

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to