PSP-Hacks.com

Join the Dashhacks Fan Club on FacebookFollow Dashhacks on TwitterDashhacks YouTube ChannelPSP-Hacks RSS Feed

Hack your Sony PSP

Forums | Tutorials | Custom Firmwares | PSP Themes | Search


 

StrmnNrmn on Daedalus

greg | May 11, 2006

This was posted over in StrmnNrmn’s blog, the one responsible for porting Daedalus to the PSP. kekpsp asked one very important question, which I’m sure we’re all wondering: “Is it possible to emulate a system like the N64 with the system limitations that the PSP poses?”

Below is StrmnNrmn’s in-depth response:

When I first decided to port Daedalus over to the PSP I really didn’t know the answer to this. I knew there were some substantial challenges – I’d ported Daedalus to the Xbox a couple of years earlier and quickly discovered that even with 64MB you really didn’t have much room to manoeuvre. With the PSP you have even tighter memory constraints (24MB user memory + 2MB vram), a slower processor and gpu.

I think I’ve pretty much cracked the memory problem. When I added in the rom streaming code I reduced the memory usage for an 8MB rom image down to around 2MB. Larger roms only use fractionally more ram (i.e. a few 100KB or so), so I’ve managed to free up around another 6MB to use for textures, audio and most importantly the dynarec engine.

The next big challenge is speed. Currently Daedalus is unusably slow – typically 4-5fps max (although there are some roms that freakishly seem to run faster). Dynarec is going to bring about the biggest gains here, but it’s too early for me to tell how much of an improvement it’s going to bring on the PSP in the long run.

This is probably a good point to give a bit of a progress update on the new dynamic recompiler. I’m at the state where I’m successfully capturing ‘hot-traces’ from the rom as it runs. In order to work the bugs out of the system, I’m then simulating the execution of these traces to see whether everything is working as expected. It also lets me collect a few stats like how many instructions will end up being executed through the native fragment cache rather than being interpreted, and roughly how much memory is going to be consumed.

The results are looking very encouraging. Firstly, even though I’m not actually executing any native code yet, the emulator runs almost as quickly with the ’simulated’ dynarec enabled as it does running entirely through the interpreter. Although this sounds a bit of a backwards step, it’s actually quite significant because it means the dynarec engine itself isn’t any substantial load to the CPU. I’m hoping this means that when I am actually executing native code, the dynarec engine will only be using a fractional part of the CPU.

The other significant result is that you don’t actually need to recompile much code to get a sizable portion of the rom executing natively. In my tests with Mario, typically around 90% of the instructions executed are going through the fragment cache rather than the interpreter. Importantly this is with only around 64,000 instructions in 700-1000 fragments. I think this will mean I’ll be able to get away with a 1-2MB code buffer on the PSP.

At the moment I’m still ironing out a couple of bugs with the fragment ’simulator’ (mostly to do with exceptions and interrupts occuring in the middle of a fragment). Once that’s complete I’m going to start taking a look at taking a few small steps towards generating native code. I’ll go over this in more detail in my next few posts.

Lets hope for the best! Much props StrmnNrmn!

Share This With...
  • Facebook
  • Digg
  • Twitter
  • RSS
  • Slashdot
  • Technorati
  • del.icio.us
  • Reddit
  • Blogosphere News
  • HackerNews
  • StumbleUpon
  • Google Bookmarks
  • email
Comments (28)

Tagged: ::

RSS feed | Trackback URI

28 Comments »

Comment by WonderKik
2006-05-11 12:08:30

It`s seems great,i just hope that the progress are gonna be quick! Keep up the good work!

 
Comment by mark
2006-05-11 12:14:19

not gonna say a word see my other posts about this

 
Comment by mark
2006-05-11 12:20:44

at the moment im still ironing out some bugs in my xbox360 emulator, blah blah blah,
ill give you 500 quid if you get it running at more than 20 fps on any game, and ill give you a year to work on it??? deal or no deal

 
Comment by bob
2006-05-11 12:21:36

I think whats been acomplished so far is an exceptional achievment, however I find it highly unlikely this project will ever result in an N64 emulator running at more than 25-30% speed of the original machine. emulation rule of thumb: 10x the power & it should be possible to get 100%, The psp has about 3.5x the processing power of the N64 ..

 
Comment by mark
2006-05-11 12:31:25

but whats the point,
1. it not very interesting playing on a n64 game at 5 fps,
which loads of graphical problems etc
2.nip to a second hand shop and buy a n64 with games 20 quid will do it
3.buy a cheap laptop and download the emulator for windows and some roms?
time to move forward not back

 
Comment by mark
2006-05-11 12:33:54

until you bring it out fully working and at a decent frame rate, i will hail you king
i know lots of hard work goes into these things but in 2 years time whos gonna care?

 
Comment by Tarzan
2006-05-11 12:44:57

Good work!
I know it could be called a waste of time by some. but I personally like playing old n64 games on a nice portable device. and btw… isn’t most gaming a waste of time if you think about it? its just for the entertainment which I would get out of playing oldies on a psp.

 
Comment by avidplayer
2006-05-11 12:52:08

Wow, keep up the good work and don’t let negative people like mark get you down. He’s obviously angry about something and pretty ungrateful to all the work your putting into this project.

 
Comment by Pebbles
2006-05-11 13:08:09

Wonderful! =)

I loove seeing people working on the N64 emu! And, shut up all you negative people.. You can critisise if you make something really good!

I dream about the perfect N64 emu, and a PS1 emu.. Then I could have Zelda and FFVII! =o
What a wonderfull dream!

 
Comment by jovanni
2006-05-11 13:25:03

i think it’s great that someone would take THEIR time to make others happy.i look forward to playin’ banjo-kazoie,mario64,and how about turok,golden eye,diddy kong racing!hope it gets adhoc for multiplay!!!

 
Comment by rob
2006-05-11 13:26:45

you know monkey64 promised a relase this week hes only got 3 days after today left to do it too im excited to see what happens with that.

 
Comment by Samp
2006-05-11 15:17:12

All you negative people are really a bunch of impatient asshole’s. None of you probably know jack about computers let alone programming. Any idiot could drag and drop homebrew into their PSP. This kind of negativety due to impatient people is a little ridiculous. yes I agree it gets a little anyoying when something plays barely but it wasnt even this close a month ago. So the PSP has 3.5x the power of the 64 means soon the emulator will run at full speed with encouragement of the homebrew community. If Sony and Nintendo worked together they could make it run full speed but its not them! These are people who start from the bottom to find the code of both systems not knowing exactly every detail of these systems. They work very hard to make you people happy. Stop the negativity or just upgrade to 2.7 and let Sony make your emulators.

 
Comment by GUAU
2006-05-11 15:50:04

Excellent work!! Keep it up!

 
Comment by usokz
2006-05-11 16:01:48

Hey mark…lighten up dude…

I don’t see you posting anything but negativity…

If he gets this N64 emulator (crossing my fingers tightly)…

I think we should all line up and wack you with a bar of soap in a sock…ala Full Metal Jacket

peace out to all the faithful…

 
Comment by Zhuki
2006-05-11 16:29:44

Great work i dont know why people say you wont make it !!! i think the psp has a lot more power than the n64 and by time the emulator will work !! just keep on working cus this is gonna be the best emulator for the psp :)
thats what i think … :D

 
Comment by mark
2006-05-11 17:01:25

thing is cowboy if hes gets the n64 working, it will be a waste of time slow, long pointless,abit like the that war, that nobody cares about, doesnt even ring a bell because nobody won it?????
so use your soap in the shower, you bum muncher?

 
Comment by not a negitive nancy
2006-05-11 17:40:52

i think what u are doing is great if this gets working and i can play conkers bad fur day where ever i go at a some what decent frame rate then i say go for it!
Are u making an xbox 360 emulator for pc or and emulator on the xbox 360?

 
Comment by barnes8
2006-05-11 17:47:48

Dont get me wrong, its great that someone is willing to put there time into such a huge project but I really think that you have you work cut out for you. So good luck. Id much rather see a GBA emulator though. Wouldnt that be a much more likely project. At this time we dont have a playable GBA emulator but you want to make a N64 work. Good luck! BTW I probably wont play this because I have a N64 Emulator on my PC and Ive only used it like 2 times so dont any one say Im gonna regret this.

 
Comment by vandel
2006-05-11 18:19:59

Sounds like you have your work cut out for you. Keep up the good work though.

I’m still curious about how you can can get the button problem fixed tho. The N64 has 12 buttons and the PSP has 10. I guess button combos would be the only way but would that really work well?

 
Comment by Blazingkujo
2006-05-11 18:35:39

I love the job you have completed alredy. I can not way until you develop the full version of this homebrew.

I can believe it even works, But now I know it works. I have a lot of hope for you excellent work.

 
Comment by john
2006-05-11 19:50:47

If Sony can get a PS1 emulator to work on the PSP in less than one years time, I am sure that Strnmnrmn can get the N64 emulator working in about the same time. I love this emulator as it is, but if it gets better than i will be even happier.

 
Comment by nobody jones
2006-05-11 20:00:10

its a great try but i still doubt anything will ever be at a good frame rate it need to run at say the min 15fps to be any good. good luck

 
Comment by aure
2006-05-11 20:02:19

i just want to now what i can do to help.stop complaining you ba$tards

 
Comment by p.s.p.v.1.5
2006-05-11 23:02:12

PSP’S ARE SOOOOOOO GAY AND I THREW MINE AWAY. THIS FUCKING EMULATOR WILL NEVER WORK.
EVER.

 
Comment by Tarzan
2006-05-12 00:42:56

….wowww!
someones got something serious against psp’s. *pats psp* thats ok… he didn’t mean it.
;)
chill man.

 
Comment by 123kemps123
2006-05-12 01:22:50

whynot speed up roms so they go so fast so it looks like it runs 100%fast

 
Comment by Lee
2006-05-12 21:07:25

To # 27…..

Hmm….
I know very little about this…
But… I think… If it is possible. You might be on to something.
But, I’m sure you’re wrong.

To STRMNNRMN, Great work!
Way better than M64.
Good luck!

 
Comment by usokz
2006-05-14 00:05:32

Mario 64, Goldeneye, Perfect Dark, and Conker’s Bad Fur Day…

just some reasons I want this emulator to work badly…somehow…

 
<< Login :: Register >>
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)


Affiliates



Video Games






PSP Hacks Archives