What's new

converting n64 rom images into win executables

ashade

New member
Hey everybody, I am a electrics engineer and I have some experience with microprocessors. Lately, I was reading a little about n64 architecture and I read some about r4300i, etc... I don't know that much about n64 emulation, but I was thinking if i could be possible to convert n64 roms into pc executables. I mean, make some equivalence with amd/pentium processors, for example:
gpr[0] = mm0 (lo)
gpr[1] = mm0 (hi)
gpr[2] = mm1(lo)
...
gpr[16] ... gpr[31] = some memory address

and thus every opcode in r4300i should have a similar one on mmx...

I think for load/store/arithmetic/floating point instructions it would be easy but the greatest problem should be tlb instrunctions and the pipeline... But I think it's a good idea and if this works it could be a new generation on n64 emulation.
 

BGNG

New member
Recompilation is actually what ashade is referring to; but I'm not aware if that has ever been done. "Dynamic Recompilation" in emulation is referring to translation of opcodes from one system to another, which really isn't much along the lines of recompilation in the first place.

But to answer your question, ashade: it is not likely that an N64 ROM can be converted directly to an executable for another system simply because of the fact that the CPU memory maps are different. The components inside the N64 are specific to the N64, and it is very unlikely that any other system has them to that exact.

It would be possible to reconstruct the executable to manage the memory inside the ROM, but doing that would only leave you with something we like to call an emulator.
 

zenogais

New member
ashade: The conversion of CPU opcodes is recompilation, but converting CPU opcodes is only a very very small portion of converting a whole N64 executable to a WIN32 executable. You would also need to code for handling input, sound, and video.
 

Toasty

Sony battery
Another problem is in the area of self-modifying code, which interpretation and dynamic recompilation do much better with than static recompilation. By the time you add in native interfaces to imitate the 64's graphics, sound and IO devices and work out all the bugs inherant to static recompilation, what you'd probably end up with would be a program that embeds emulators into ROMs. It's a really neat idea, but it would probably be a whole lot of trouble to get something that's not much better than current emulators.
 

Top