Saturday, February 10, 2007

Speedup Details

In my long-overdue update on Thursday I explained how some of the work I've been doing on the dynarec engine has produced a significant speedup. This post will give a few numbers to give an idea of what you can expect in R9.

The table below shows the framerate for various scenes in R8 with a column showing the framerate for the build I'm currently testing effectively R9). The final column shows the relative speedup:





















SceneR8 framerateCurrent framerateSpeedup
Mario Head812x1.5
Mario Menu3852x1.4
Peach Letter1825x1.4
Mario Ingame1824x1.3
Zelda OoT Title813x1.6
Zelda OoT Menu3955x1.4
Zelda OoT Ingame 1610x1.7
Zelda OoT Ingame 259x1.8
Starfox Intro2127x1.3
Starfox Title911x1.2
Starfox Training1723x1.4
Mariokart Title1633x2.1
Mariokart Menu1224x2.0
Mariokart Ingame1220x1.7
Spiderman Title2235x1.6
Spiderman Menu2127x1.3
Spiderman Ingame1018x1.8
Quest64 Title7590x1.2
Quest64 Ingame 12025x1.3
Quest64 Ingame 22129x1.4




Clearly there's a significant improvement in framerate. On average, games are running about 40% faster, but in many cases the framerate has almost doubled. Subjectively, the difference means that many games are feeling a lot more responsive and playable now. Anything over 20fps 'feels' pretty good, but my long-term goal is to get this up to 30fps for as many titles as possible.

I noticed a couple of interesting differences between the two builds when running the tests, and you can see some of these in the new screenshots. Firstly, notice that the shadows in Super Mario 64 are all nice and round. This is due to the 'mirrored texture support' that I mentioned in Thursday's update (this also fixes the star that opens over Mario's head in the title sequence).

Secondly, the jerky/shaky screen that was affecting Mario Kart 64 now seems to be fixed. I'm not quite sure what was causing this, but I'm glad it's fixed :)

Next, notice that the text is Quest 64 is now fixed. In R8 this was horribly corrupted. This is due to the fixing a few texture conversion bugs as I was introducing proper support for 16 bit textures.

Finally, the texture on the floor in Quest 64 is now fixed. Again, I'm not totally sure what change is responsible for this, but it's nice to see it working correctly.

One final thing to note is that these figures were obtained by running the emulator with 'optimal' settings. For the current build, this includes disabling audio output. I'll talk a bit about audio support soon, including a bit about its impact on performance.

-StrmnNrmn

42 comments:

Anonymous said...

YOU... ARE... GOD....
On topic: Will you be able to use the Media Engine for sound emulation? That way there shouldn't be any performance hit for enabling sound

StrmnNrmn said...

The audio processing is a perfect job for running on the ME: it's asynchronous (i.e. daedalus can be processing audio lists on the ME while emulating the n64 cpu on the main PSP processor), and the jobs are fairly self contained (so I can essentially just set up a single chunk of memory for processing on the ME, rather than having to synchronise lots of separate data structures). Potentially I can move all the display list processing to the ME too, although I suspect this will be a lot more challenging.

The problem at the moment is that I've not yet spent enough time investigating the ME in much detail, so it's hard for me to estimate how much work is involved. Once I've got this release out of the way I'll have to spend some time playing around with the ME :)

Anonymous said...

Great work!

Just a small question. How does zelda feel now? Did the 3-5 frame speed up help?

Thanks alot.Keep up the good work :-)

Anonymous said...

You're awesome. I really appreciate all the hard work you do for all of us.

Zodionic said...

I really cant wait to play Mario kart, the speed should be awesome seeing it was so good in R8 AND its got the biggest speed increase on the list! :)

Tinnus said...

I could try getting the sound running in the ME. I've studied SnesPSP_TYL's code a bit and it doesn't seem too hard... that would let you concentrate on other matters and gain time while me working on something that has no direct relation to anything else (ie: to prevent source merging problems).

I'll wait for R9 and look at Daedalus' sound code :)

XG917 said...

hey strmnnrmn! i was missin ya! :P glad you are back. i love what you have been doing for the psp homebrew scene. to me this emulator is one of the most important to me.
i have just one question: you have mentioned viewport scaling/screen ratio a few months ago. is that going to be featured in Release 9 of daedalus?
and i think that i heard somewhere that it should speed up the emulator a little with the new scaling, is that true?

gunntims0103 said...

I think the ME is relatively easy to work with, from viewing it myself and working with a coder named Benh its easy to work the audio into the ME engine. This pertains to applications written in C, i don't know much about emulator development but it should work the same.

Also with speed up is nice, i was thinking going about it this way but maybe i am just talking out my ass :).

I'v noticed with another coder NJ. That the went about speeding up emulation speed by creating a cache of the rom and thus making the psp reads the cache off of the MS thus increasing the speed of emulation. Im not quite sure if it would work with N64 emulation, but i think its something to be looked into since he got CPS2 working full speed. Which many thought would be impossible.

i wish you luck

KunalKunal2 said...

Hey, Great Job Man!! I cannot wait
Alright, I have a question though.
What progress is thier in Super Smash Bros. and Diddy Kong racing. These games I would love to be seen on this emulator. So what is the Progress?

Felipe Vinha said...

Very good!
But, what about pokémon stadium 1 and 2? Ive tried emulate this games in daedalus on my psp and they where without texture... only empty figures, without colors and more, "unplayable"... any plans to fix the emulation of this games? please please! :D

skater9269 said...

I would recomend looking at snes9x tyl me editions source it has very clean (although c not c++) me files.

Anonymous said...

Great job. I'm very happy to see you back on the scene. Good luck.

Unknown said...

yoyfr and company have released an ME edition of SNES9xTYL, so A) its totally possible, and B) there must be some kind of documentation you can read - unless they figured it out themselves - in which case i guess contact them.

the ME is a very underused piece of hardware that the psp has just WAITING to be taken advantage of, so the CPU doesn't use precious cycles on audio instead of framerate.

coopmaster said...

yes strmnnrmn you are a god but i give such thanks to you for working on this i thought it was dead but you dug it up. any way. hope fully it has a great release how fast was zelda fully improved

Anonymous said...

Amazing...

Do you have plans to implement frameskipping? That would greatly improve the speed, and shouldn't be too hard to add.

Yatahaze said...

can Daedalus run under 300mhz? would that boost those numbers in the table even more?

R.C said...

Hey, I love you work man. i was wondering if there was any chance you could maybe release a video of your update for us be for your release.

Thanks,
Ryan.

flyinghippo said...

First of all, I'm very happy to see that all of the work going into this project has been putting out very good results.

One of your earlier posts showed your progress on implementing a 4:3 screen ratio. Would this possibly have any effect on the framerate?

Unknown said...

Great news. I've been a fan of thise emulator since day 1, and the idea of having portable N64 integrated with my PSP is great. Keep up the good work!

As soon as Daedalus hits perfection, I'm getting a 4GB memory stick. :)

Unknown said...

This is really an amazing update, its great seeing how much you have improved the emulator over the time you stopped posting. Imagine how great the PSP will be being able to emulate the PS1 and the N64 and pretty much every system below that :D

Sr. Moska said...

AWESOME! you're great dude! keep it up!

JOshISPoser said...

About how much longer till the release; is going to be about 2 weeks? I'm not rushing success, i just am putting this down on my calender to look for. I can't wait for this. I love playing N64 and you have been great with improvements.

Orhon said...

Good job. Way to go!

I hope you achieve your goal and make us play those great games on PSP at a nice speed. :)

Unknown said...

A while ago you noted that you had been working on viewport scaling. Will that be implemented in the upcoming release?

KingPepper said...

What is the media Engine (ME)
Is it the Actual Chip in the PSP that Controls the Audio side of things or Audio & Graphics, as i would be interested to know?

BTW strmnnrmn what you have done so far is just Amazing, Keep up this great Emulator!! as its getting better & Better every Release.........Thankyou

Mario Kart God said...

Hi Strmnnrmn, do you think you could show a video. Also are you able to give us an estimate to when yu will release R9.

Unknown said...

Love your work strmnnrmn,
I'm glad you ported/improved your n64 emulator to the PSP platform.

Don't forget to say hello on emutalk.net / #emulation64 someday ;P

bye,
- falc

Paulnpoosy said...

thats sweet StrmnNrmn!!:)
one question...
does the ME engine come with the auto frameskip function?
because it seemes that if it is oon the game ggo the speed of the sound...
hope u understand what i mean:$
thanx!

Paulnpoosy said...

One more question man...
Will expansion pack be inplented in your blessed R9?
thanx:)

Unknown said...

Great work...My programming skills are low or almost non-exist but for what I can tell this looks like a very hard-working project and I just want to thank you for working on it and helping the scene like that, it is very generous of you...

Unknown said...

I've been a bit curious on this question;

Have you always been able to add audio support? Or did you hold it back because of the slow framerate?

Sorry if this seems off-topic, but I've been a bit curious on this.

Thanks,

-47

skatterfelt said...

So basically what you're saying is that Mario feels playable, Star Fox feels playable, Mario Kart feels playable, and Quest 64 remains playable...

Granted, Zelda is still a no-go, but that's a shocking improvement overall.

Congrats, and how much longer must we wait for release?

tttt said...

Some binary translation technic papers:
http://personals.ac.upc.edu/vmoya/translation.html

It seems that some paper mention the translated codes can get the 50% performance of native codes such as "IA-32 Execution Layer: a two-phase dynamic translator designed to support IA-32 applications on Itanium®-based systems" PSP has the similar instruction set as N64, So I think PSP has the ability run some n64 games reach full speed:)

Anonymous said...

Is there any official way to support your work? Either through paypal donations or whatever? Personally, it is incredible programmers like you that make such a sorry system like the PSP the Homebrew Juggernaut that it is. It makes me glad to be a gamer knowing that you are doing what you are doing.

skatterfelt said...

Also:

The best update possible for R9 is an icon for the PSP menu.

I mean, seriously. A project of this caliber...

On The Rise1 said...

Hey strmnnrmn have you ever thought or messed about putting in frameskipping in the emulator?

Anonymous said...

From the other thread: If you'd like i can help with expansion pack, unless you were intending on doing this yourself of course, after R9 or during.

Good news on speedups, i always thought R9 was gonna be something wikid.

Unknown said...

Strmn do you think this would be possible for your emu because its a very nice mod there high resolution texture packs here are a few shots (by the way thx for coming back you are the best! :D)

http://www.emutalk.net/attachment.php?attachmentid=35116&d=1168256267

http://www.emutalk.net/attachment.php?attachmentid=35114&d=1168256241

http://www.emutalk.net/attachment.php?attachmentid=35117&d=1168257697

http://www.emutalk.net/attachment.php?attachmentid=35115&d=1168256255

Morgan said...

StrmnNrmn what kind of compatabilty will R9 be having, will games like Diddy Kong Racing, Goldeneye, & Super Smash Brothers work? Also will R9 have a new in-game menu like stated before?

Desaster said...

hi StrmnNrmn


will mario 64 or some other games be playable?

dudde can't wait for the release=)

Thanks, Marco

Unknown said...

I <3 you =) =) =)
When do u release the new Daedalus??
If its good, i will do advertising whereever i can ;D

Josué said...

Thanks, thanks for all strmnnrmn. The improvements of this version respect R8 are incredible!!