Corn N64 Emulator Mystery


Now that I think about it, Goldeneye is a BITCH to play w/ a dpad... you really need to do a lot of configuring in the emulator to get that playable.

As for Corn, weren't there different version for different games? EDIT: went and looked for myself, I see that it had limited compatibility. A sacrifice made for speed.

Reap
 
reaper79 posted on Feb 5 2006 at 11:09 PM said:
Now that I think about it, Goldeneye is a BITCH to play w/ a dpad... you really need to do a lot of configuring in the emulator to get that playable.

As for Corn, weren't there different version for different games? EDIT: went and looked for myself, I see that it had limited compatibility. A sacrifice made for speed.

Reap
Yep. I presume that was because of the static recompilation that it apparently used. Any game with self modifying code would not work.
 
Last edited by a moderator:
If the emulator ran that quickly, you can guarantee it was 100% x86 assembly. Ain't no way no how that's going to be ported.
 
Javacat posted on Feb 5 2006 at 07:18 PM said:
In an interview with him in 1999 he said he was Chinese and currently studying in America. That was 7 years ago (scary!), so he will probably be back in China now.

Maybe it would be worth getting in touch with some of the people that helped him translate corn to different languages?

I found something. Perhaps this will help to understand the Way Corn works a bit better.

QUOTE:

The author of Corn has written an excellent explanation of why Corn is so fast. He has also sent me some trouble shooting tips.

Various reasons for Corn's speed:

1. Static Recompilation Static rec is the main technique that Corn experiment wants to test. In theory, static rec should be faster than dynamic rec since the branch/call overhead is much lower. And, with static rec, we can afford to do sophisticated optimizations like a real compiler does. Although the actual implementations can greatly affect the real performance.

On the other hand, static rec becomes the major deficiency of Corn. It makes corn need individual configuration to run each rom. So, in terms of compatibility, it is not a good approach. Probably this is the main reason why other emulator authors did not try it before(in my knowledge). Between compatibility and speed, most authors will choose the former. If Corn was not started as an experiment, I would have chosen dynamic rec also.

Right now, the optimization done in Corn is still simple. So, probably not much speed (10%-25%?) really come from this part at this time. Later, I will try to apply more advanced optimization techniques to study the power of static rec, which is the main goal of this experiment.

2. 32bit vs 64bit As first mentioned by UltraHLE, practically N64 games are 32bits programs. However, there do exist 64bit instructions in some (though very rare) OS functions. Since UltraHLE emulates OS functions, this is not a problem. Corn uses low-level emulation (for CPU part), so it must single them out and patch them. This is another place where compatibility is greatly lowered. I guess 20%-40% speed come from this part.

3. Incomplete emulation The RDP emulation in Corn is still very incomplete. Many effects, features have not been implemented. Some very time-consuming things are ignored. There is almost no support for combine modes, just some sort of hack. Honestly, Corn still needs lots of work to reach the stage that Nemu and TRWin achieved. I expect at least 30% speed drop of RDP emulation in the furture. Also, Audio task is short-circuited. As Corn implements more and more features, speed come from this part will disappear. I guess currently 30%-60% speed come from this part.

4. Implementation issues I has a relatively low-end pc. So, I have to push the speed in every corner. Once I suspect that a C compiler cannot optimize some part very well, and that part is important, I use inline assembly codes. For example, C cannot handle bit operations very efficiently, so in Corn, most of this job is done by inline assembly codes. There are many such things. Each of them is not significant, but when they add up, I guess the contribution is about 20%-50%.

5. Some bad things A good program should have codes to handle errors, extreme cases etc. They are not existent in current version of Corn. Corn always assumes a good run-time environment. It may be practically acceptable, but definitely not a good programming style. I guess 5%-10% speed come from this part.

The above percentages are just my feelings. They may be wrong.

QUOTE END

Check the underlined things. Not much optimisation! (?? Is this a english word ??)

P.S. Some things in there could be outdated, because this was released before Corn 0.01

P.P.S. But don't stop searching, please ;) I still have some questions for him.
 
Last edited by a moderator:
Haha, so this means that in order to improve speed in emus, the authors should start making incomplete emulators. DaveC will love this.
 
Mikelx215 posted on Feb 5 2006 at 04:24 PM said:
I have also "played" with an N64 emulator and found the experiance wanting. Yes the games play, but you loose an awful lot.  Personally I feel the games play better on the original hardware. The GP2X is a great machine, and I for one will be using to it emulate 8/16 bit hardware. If I want to experiance Goldeneye or Mario64 then I would prefere to fire up the old cartridges.....
Phil

Try carrying a N64, a TV, several cartridges and a portable AC power source in your pocket. Try playing that at school during a boring lesson. It doesn't work to well, does it?
http://www.benheck.com :D or you could make an N64 portable
 
Last edited by a moderator:
I've already seen it. It would be hard, if not impossible for the average person to make.

Also it dosn't look too portable.
 
your kinda right but they are still fun to make and i just think that the whole idea of it is cool
 
Yeah, Project64 1.4 is open source, though they never released 1.5 or 1.6 to open source. 1.4 was a pretty good release though, but it is waaay to slow for GP2X, ever, no matter what, etc.
 
Ando posted on Feb 6 2006 at 12:38 AM said:
Mikelx215 posted on Feb 5 2006 at 04:24 PM said:
I have also "played" with an N64 emulator and found the experiance wanting. Yes the games play, but you loose an awful lot.  Personally I feel the games play better on the original hardware. The GP2X is a great machine, and I for one will be using to it emulate 8/16 bit hardware. If I want to experiance Goldeneye or Mario64 then I would prefere to fire up the old cartridges.....
Phil

Try carrying a N64, a TV, several cartridges and a portable AC power source in your pocket. Try playing that at school during a boring lesson. It doesn't work to well, does it?
http://www.benheck.com :D or you could make an N64 portable

I was just about to say that

It aint that hard to knock one up as long as you plan carefully and have some basic soldering skills

I made one myself but never got round to making the custom vac housing which is the hardest bit i reallllyy need to finish it when i get some time those lithiums cost alot aswell :huh:

back on topic

itd be cool to have a mario 64 emulator an emulator optimised to one game doubt itll run that fast but itll be a cool thing to wooow friends
 
Last edited by a moderator:
OmarNawaz posted on Feb 6 2006 at 10:41 AM said:
Ando posted on Feb 6 2006 at 12:38 AM said:
Mikelx215 posted on Feb 5 2006 at 04:24 PM said:
I have also "played" with an N64 emulator and found the experiance wanting. Yes the games play, but you loose an awful lot. Personally I feel the games play better on the original hardware. The GP2X is a great machine, and I for one will be using to it emulate 8/16 bit hardware. If I want to experiance Goldeneye or Mario64 then I would prefere to fire up the old cartridges.....
Phil

Try carrying a N64, a TV, several cartridges and a portable AC power source in your pocket. Try playing that at school during a boring lesson. It doesn't work to well, does it?
http://www.benheck.com :D or you could make an N64 portable

I was just about to say that

It aint that hard to knock one up as long as you plan carefully and have some basic soldering skills

I made one myself but never got round to making the custom vac housing which is the hardest bit i reallllyy need to finish it when i get some time those lithiums cost alot aswell :huh:

back on topic

itd be cool to have a mario 64 emulator an emulator optimised to one game doubt itll run that fast but itll be a cool thing to wooow friends
yeah :D
 
Last edited by a moderator:
Mudi posted on Feb 6 2006 at 12:28 AM said:
Yeah, Project64 1.4 is open source, though they never released 1.5 or 1.6 to open source. 1.4 was a pretty good release though, but it is waaay to slow for GP2X, ever, no matter what, etc.
Mupen64 is also open source, but I've never tried it so I don't know if it's actually any good. It's likely also way to slow for the 2X.
 
Last edited by a moderator:
mupen64 is a really good emulator, but i would also think that you have to omptimize it really hard to get anything on the gp2x in a speed where you can see movement ;)
then you would also have to port a gpu and sound plugin, there is a software gpu plugin, but that only works with mario and is even unplayable slow on my 2Ghz PC.
 
I think that we should contact ContraSF just to solve the mystery. I don't even think we should attempt to port Corn to the 2X.

Although, if we could get the source, we could see what methods he used to speed the emu up, and possibly make an ARM asm emu that might work well from scratch if anyone is willing to do so.

I don't think a port will get us playable (I'm not saying full speed; playable != fullspeed) N64 on the 2X. But I definately think we could have playable N64 if someone made one from scratch and REALLY optimized it. (It'd probably have limited compatibility tho' and would probably have to be an HH app, so it could make full use of the memory)
 
we should do it justr for the hell of it, they already did it on a psp just for that reason i think we should try and prove the 2x can run a crappy N64 emu also :p
 
DemonStar55 posted on Feb 6 2006 at 08:19 PM said:
*walks around ALL of China with a shirt that says I'm looking for ContraSF*
ROFL. THat actually made me laugh picturing it.
 
Last edited by a moderator:
"Ando" we should do it justr for the heck of it, they already did it on a psp just for that reason i think we should try and prove the 2x can run a crappy N64 emu also tongue.gif

I have posted this before but obviously none of you have seen it so here it is:
n64.jpg


Just put the image and the roms in a folder named N64

So we already got that covered.
 
Back
Top