<div class="im"><div class="gmail_quote">On 28 November 2010 02:59, Mauricio Alejandro <span dir="ltr"><<a href="mailto:alexandertwin@hotmail.com" target="_blank">alexandertwin@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
I never created any emulator before, and i'm learning C++. Let's say i
try to write an emulator for... SNES. Would Python be fast enough?<br>Also, any useful advice you can give me? Things i should know about before i start coding?<br>
</div></blockquote></div><br></div>Because of the performance
requirements generally applciable to emulating a games console, I would
not think to write an emulator in native Python. However you can
probably write the main parts that need performance as C based Python
modules, and write "the rest" in Python. (Whether "the rest" is
substantial enough to warrant it is hard to say.) This is the route
taken by any Python modules/applications that have critical performance
requirements.<br>
<br>As for useful advice, I don't want to put you off but writing a
complete console emulator is not a trivial project by any stretch of the
imagination, and you'll also need to have very detailed specs about the
SNES's hardware (CPU, video hardware, memory and IO maps, sound
hardware etc), as well as have copies of its firmware (BIOS/ROMS etc) in
order to even be able to begin to work on such a project.
Additionally, there's already (or there was several years ago) several
SNES emulators and doing another one just for the sake of it, well, is
it really worth it?<br>
<br>Maybe something a little more accessible might be to implement a MIPS CPU emulator, something like this:<br><a href="http://weblogs.mozillazine.org/roc/archives/2010/11/implementing_a.html" target="_blank">http://weblogs.mozillazine.org/roc/archives/2010/11/implementing_a.html</a><br>
or this:<br><a href="http://codu.org/projects/trac/jsmips/" target="_blank">http://codu.org/projects/trac/jsmips/</a><br><br>And then see how fast you can make that without resorting to C, like the guy above did in the browser.<br>
<font color="#888888"><br>Walter</font>