PDA

View Full Version : Daedalus R10 Optimisation Progress - N64 Emu for PSP News



wraggster
March 19th, 2007, 01:51
StrmnNrmn (http://strmnnrmn.blogspot.com/) posted this news about his Nintendo 64 Emulator for the PSP


I didn't mean to leave it quite so long since last weekend's update, but I've been working hard on a number of optmisations for R10. Oddly enough these are mostly new issues that I've found - most of them don't exist in the list of tasks I came up with a couple of weeks ago. I think that shows how much scope there is for optimising Daedalus!

Firstly, I finally managed to get Daedalus compiling with GCC's '-O3' setting. This flag turns on all of the optimisations that GCC provides. When I've tried to enable this flag in the past I've had numerous strange crashes and odd behaviour, so all releases of Daedalus to date have been compiled with -O1.

I updated my local installation of the PSPSDK last weekend and decided to try the -O3 setting again. I was pleased to find that Daedalus ran without crashing, but there was still some odd behaviour which I eventually tracked down to my use of the famous InvSqrt function. You can read a bit more about my findings on the pspdev forums.

Enabling -O3 tends to slightly increase the code size (the EBOOT.PBP has increased from around 850KB to 900KB), but the speedup is quite noticable - my estimate is that Daedalus runs around 5% faster with -O3 over -O1.

As a result of the thread I started on the pspdev forums, hlide and Raphael both came up with some great suggestions for how I could optimise my use of the VFPU.

When I originally wrote the VFPU code for TnL and clipping there were still many undocumented/unsupported functions. A few months down the line and hlide and co have discovered a couple of instructions which are perfect for my needs - namely vuc2i and vc2i. These two functions take a 32-bit value comprising of 4 (un)signed 8-bit chars and unpack them into a vector of 4 32-bit fixed point numbers. It turns out that these instructions are perfect for converting the N64's packed colour and normal values into a format I can use in the VFPU code.

The various VFPU tweaks I've made have given Daedalus another 5% or so speedup.

The final set of changes I've been working on this week have been to do with how I handle certain blend modes. Some of the N64 blend modes are too complex for the PSP to deal with precisely, so I have a large table of 'override' blend modes which allow me to make as good an approximation of the N64 mode as possible. It turned out that looking up these blend modes was very expensive, so I've rewritten how this is handled to make it more efficient. The end result is another small speedup.

Overall these three changes give a combined 10-15% speedup on the various games I've tested, although there are roms that lie outside this range (some show an even greater speedup while others are more or less unaffected by the changes).

There's still quite a lot more in the way of optimisations that I want to get in for Daedalus R10 (mostly stuff I mentioned earlier) so hopefully these numbers will improve even further over the next couple of weeks.

-StrmnNrmn

ab88
March 19th, 2007, 02:06
:) with frame skip most games(supported) should run even smoother now.

BelmontSlayer
March 19th, 2007, 02:06
Awsome! Speedups are always great! R9 was released on my birthday. It was a great present. :)

samthegreat68
March 19th, 2007, 02:12
yay. speed rulzz!

Mc_Logical
March 19th, 2007, 02:17
more good newz, that was a good read and the frame skip that came 2day is cool and enough to keep us on our toes, ive thought this before why doesnt the n64 have frame skip mode? because most emulators do for the psp, snes etc

xg917
March 19th, 2007, 02:26
daedalus does have frameskip. R9 was supposed to be released with it but then he decided to release it in R10, then like a week or 2 ago frameskip was released/leaked. then MRShizzy just noticed that it was released and he thought that he was first to find it. lmao. still give props to him for bringing it up again, otherwise i wouldnt have been playing zelda all day today.
i cannot wait for R10. !!

Mc_Logical
March 19th, 2007, 02:32
lol dude no i mean in previous n64 emulators i thought about why hasnt it got frame skip? like most emulators do but anyway yea i cant wait for R10 now the speed is getting there id like to see more roms playable, goldeneye and res 2!!!!!!!!!!!!!! it doesnt work for the psx eboot even when i converted res 2 game saves it freezes in certain doors plus the n64 rom is only like 70mb

EDIT: plus the n64 has better graphics than the psx :p

mavsman4457
March 19th, 2007, 02:42
This is definately going to reach full speed in the future for at least a couple of games. I just hope Strmnnrmn keeps with it because his dropout would be the only thing stopping this.

alucard001
March 19th, 2007, 02:49
freaking incredible

pkmaximum
March 19th, 2007, 03:08
Great to see Strmmmn is finding optomizations in his emulator, I still hope we can see signifigant speed ups, because games like Zelda Ocarina Of Time really need them, and I really hope he gets his emulator involved with using the PSP Media Engine in some way, by iether moving the sound over to it, or doing Exophases's suggestion, and running the main N64 process on it, iether way it should definently increase the speed when sound is enabled.

DarthPaul
March 19th, 2007, 03:12
Woot!! Great News!

CaptainMorgan4
March 19th, 2007, 03:23
Always nice to see StrmnNrmn updating his blog, I can't wait for R10, it is looking very promising.

Buddy4point0
March 19th, 2007, 03:42
this is so good! keep it up man! i can deffinantly see this emu getting full speed in the near future. then after full speed mabey high res textures and cheats. you rock!

felonyr301
March 19th, 2007, 04:39
Like I have said before good luck on the emulator everyone is rooting for you!!!

shadowhawk22
March 19th, 2007, 05:50
Wow. If I can get Mario 64 to run with sound full speed on the PSP I will be happy for many many months. Keep up the great work!

Veskgar
March 19th, 2007, 06:25
Things are starting to really heat up with this great EMU. Thank you for the informative update!

It is really exciting to read about speedups and optimizations.

Needless to say, this is highly anticipated.

Gold Line
March 19th, 2007, 09:33
yes R10 is on the way

gr42178
March 19th, 2007, 15:10
Nice, so it will be faster than the R9 with frameskip?

Zion
March 19th, 2007, 15:48
Nice, so it will be faster than the R9 with frameskip?

According to the post it will be 10 - 15 % faster than R9

aries2k4
March 19th, 2007, 16:27
But thatīs R9 without frameskip.Strange that he didnīt mention frameskip, but I guess he had already mentioned that is supposed to be one of the features of R10.
Really looking forward to the next release. R8 was pretty good but I began to believe we could achieve full speed on R9. R9 with frameskip was a bonus, r10 should be really good.
Great work ST

edit. just went to see the plan of action for R10 and frameskip was already there so Iīm hoping these speedups are apart from frameskip.
Now Iīm really itching for R10.:thumbup:

klx5
March 19th, 2007, 17:18
this is so cool

kharaboudjan
March 19th, 2007, 18:02
im so exited about R10!!! cant wait for it to be released, when Strm is doing some of the emulation in the Media Engine i think we will se some other 40-60 % speed up, and that means fullspeed on some games :D

MANY THANX 4 YOUR HARD WORK!!!

SuckerPunch
March 19th, 2007, 18:09
Thank you for even more fantastic work on this most impressive emulator.

I want to support your efforts but can't code worth crap.

Do you accept paypal donations?

IM back!
March 19th, 2007, 20:53
R10 cant wait!

Basil Zero
March 19th, 2007, 21:42
Horray for the N64 emu with speed too

wiredforpower
March 19th, 2007, 22:04
I cant wait for the next release. Keep up the good work!

mike03$$$
March 20th, 2007, 00:03
This sounds really cool can't wait for release I also wanted to know if u think strmm used a bios file and the media engine that this emulator would've been fullspeed by now

jurkevicz
March 20th, 2007, 00:41
I really Can't Wait@!

Buddy4point0
March 20th, 2007, 00:55
dude... mike


My Psp History
2.01>2.60>1.50

Emus
1.Devhook 0.51 3.03
2.Gpsp 4 roms
3.Genises/Megadrive 10 roms

Homebrew apps
1.sony remote 0.02

PS3 (account name: moneyslap03)
1.Call Of Duty 3

get 3.03 oe c!!!!! wayyyyy better.
and theres way way way way better homebrew apps then just sony remote.
dude update and add all the rest of the best!

BL4Z3D247
March 26th, 2007, 00:35
holy hell i've been out of the scene for months and strmnnrmn didn't release another update yet :eek:...well it's good to know that it's on the way

CaptainMorgan4
March 26th, 2007, 04:20
If you haven't been here in months then there are alot of updates, such as R9 being out and R10 soon on the way.

BrooksyX
March 26th, 2007, 04:37
Yeah R10 should be out in a few days and there should a good speed increase.

jurkevicz
March 26th, 2007, 17:45
I can't wait! I hope strumm releases it soon!

goldeneyegod
March 27th, 2007, 00:58
All Iwant is goldeneye to work on the R10 and I'll be a very happy man indeed!

CaptainMorgan4
March 27th, 2007, 05:24
That won't happen since he's focusing on speed instead of compatability in R10, I would love goldeneye, for some miracle reason he might come across something but it's highly doubtful.

Chameleon
March 27th, 2007, 05:32
You never know, one of the tweaks he uses for speed optimizations could somehow effect the compatibility...
But yes it is very doubtful

camcorderdoctor
March 29th, 2007, 13:55
I am so psyched - can't wait for this release - r9 was an incredible step ahead of where it was - i don't think it'll be long now - nearing the end of the month and everyone is foaming at the mouth for it. It should, like r9, be another great suprise for all. Thanks to Stormin' Norman!!! You da man! :thumbup:

BrooksyX
March 29th, 2007, 14:34
We haven't had a blog update in a week so hopefully that means he is busying adding some cool features or fixing some bugs.

Hopefully we will see R10 in the next few days. :D

bah
March 29th, 2007, 15:21
I haven't messed with N64 emulation in a long time, several computers ago, but i remember goldeneye being one of the (if not the) slowest games to emulate.
I don't think I ever tried any games that used the expansion pack though, they're probably worse.

Strmnnrmn might be able to work some more of his magic but I wouldn't hold out hope for playable goldeneye any time soon.

CaptainMorgan4
March 29th, 2007, 16:55
Yeah but if I could just move slowly in Goldeneye with no graphical issues then that would just be AWESOME!