What's new

Help for a "translator"

pilm

Member
I wanted to write a real static-recompiler "emulator", wich would translate one-for-all a rom (GB for beginning) into a Win32 executable (a bit like Corn for N64, but mine produce a .exe file once). IS THAT POSSIBLE ?? I think by optimize the recompilation we can do something quite cool, but I'm not sure. Can someone help me ?
 

returno

New member
hmmm

If you have to ask "IS IT POSSIBLE" then here's my guess: It isn't possible - for you.

In any case, this isn't a terrible idea, just a waste of time.

:D
 

Remote

Active member
Moderator
It's probaly possible, I'm quite sure there are Super Mario Bros exectables floating around the net made the same way, although it's most likely a waste of time... Probaly not to legal also... Your best bet would probaly be to hop on to IRC and locate a GB emu author... And ask for a couple of hints, some tricks and what else that comes to your mind... God Speed...
 

BTM

Polish Emu Scene Member
Dont know how it is with N64 but there is a recompiled ( or whateva ) version of Tekken 3 and Gran Turismo - in one .EXE file
 
OP
pilm

pilm

Member
OK thanks , i'll try to find an open source GB emulator and contact the autor. For the recompiled GT, I'm interested, where did you find that (not Kazaa please !) ?
 

BTM

Polish Emu Scene Member
No, on the local black-markt :]
Dont know if/where to download it from.
 
the funny thing is GBA games are programmed in C so it may be very well possible to recompile them into a singular exe but as it was stated earlier it would prolly be a big waste of time
 
OP
pilm

pilm

Member
A WASTE OF TIME ?!? I don't want to make a exe just for eliminate the emulator (I can for this simply include the emulator INTO the exe), making an exe file improve speed; have you ever seen how Corn was fast ? A recompiler is very hard to do properly, and that's why Corn had a so bad compatibility. But it is cleaner and faster than an emulator.
OK, with an up-to-date PC you don't need speed, and no more for GB or GBA. But it would be a good exercise.
 

Doomulation

?????????????????????????
No, you're getting it wrong. Basically, the emulator reads from the rom, switching ucodes, etc. This does not take much cpu power.
But drawing gfx and playing sound takes cpu power!
This would be as well if you'd compile it to exe, so no gain!
The only thing is that you won't have to use an emulator to do it.
 

ShadowPrince

Moderator
pilm said:
I wanted to write a real static-recompiler "emulator", wich would translate one-for-all a rom (GB for beginning) into a Win32 executable (a bit like Corn for N64, but mine produce a .exe file once). IS THAT POSSIBLE ?? I think by optimize the recompilation we can do something quite cool, but I'm not sure. Can someone help me ?

Yes,it is possible.There are some old Spectrum emulator out there,that produces executable out of a rom (Warajewo).
This is not "true" recompiler,but does the job very nice .
Also you can find dozens of MSX (ancient computer) "truely"
RECOMPILED games on the net.And even sources to the recompiling system for it.

It would be really great to see some automatic/semi automatic system to translate n64 roms to win32 exes .
But i think it's just easier to emulate the system,rather then making translations/recompilations of the roms.
 
OP
pilm

pilm

Member
yes, it's surely esasier to simply emulate, just see how Corn was! But in fact, insead to programm "On code#XX, Do YYY", you said "On code#XXX", Replace XXX by YYY". Okay, it's a bit more complicated.

Fthe speed, if a "normal" emulator isn't faster than a recompiled file, why is an interpreter slower than a dynamic recompiler slower than a static recompiler ? If you interpret the code, you lose speed while interpreting, if you periodically recompile some parts of the code, you lose speed at each recompilation. With the static recompiler system, no problem : one recompilation, and after... just play !
thanks to anyone who said that some people have already made recompilers, I will try to found them (the recompilers ;) ).
 

returno

New member
waste-of-time

pilm said:
Fthe speed, if a "normal" emulator isn't faster than a recompiled file, why is an interpreter slower than a dynamic recompiler slower than a static recompiler ?

I'm not an expert on how pj64 works, but I believe that pj64 with the typical ROM does very little dynamic recompilation, and - for the vast majority of roms - does no instruction interpretation at all. So, an EXE made from pj64 code would not run the ROMs much faster - or in many (most?) cases not faster at all.

Exe's have problems too - how do you upgrade plugins? Tinker with settings? The Exe becomes just as complicated as an emulator with no significant upgrade in speed. A waste of time.

My opinion: if someone has a lot of time on their hands and wants to improve emulated games in the n64 world, they should work on plugins. That's where the bottleneck is - and where the compatiblity issues are - not in compilation or recompilation of the code in the ROM.

Probably this situation isn't true of other emulators, I don't know. But maybe someone needs to improve the other emulators, not create dead-end Exe files.
 

tooie

New member
corn 0.1 was static recompiler .. worked for mario and some demos
corn 0.2+ was dynamic .. static could not work for some roms ..

corn speed does not come from it being static .. one massive advantage is that is a 32 bit engine .. compare 1964 32bit core with the 64bit one and you will see the speed difference.
 

Top