PDA

View Full Version : Daedalus WIP News (N64 Emu)



wraggster
May 22nd, 2006, 01:09
StrmnNrmn (http://strmnnrmn.blogspot.com/) posted this update about his N64 emu for PSP:


Just a quick update on the dynarec status, as I know a lot of people are more interested in this than the grizly details of branch delay instructions :)

Last weekend (13/14 May) I managed to assemble the fragment buffers into native x86 code, and execute this dynamically. I spent some time debating whether to target MIPS or Intel initially, but I decided that it would be a lot easier for me to debug the code generation on the PC than it would be to debug code gen on the PSP.

In the end I'm glad I started with the PC as it allowed me to fix a number of hairy problems without going down the torturous path of debugging self modifying code on the PSP with just a few printf() statements to help track down any problems.

With this version of the dynarec, 200KB of N64 code was now generating just 2MB of x86 assembly (i.e. an expansion ratio of around 1000%). The PC version was running around 60% faster with dynarec enabled than with it disabled, which is a pretty significant speedup (although this is still very early in the process).

What's also important is that this is before I've done any real optimisation of the generated code. For each instruction I'm still calling the generic instruction handler which has the overhead of figuring out which source registers to use, which register is the destination etc. The *real* speedup comes from generating code to handle op codes explicitly, as you remove all this decoding overhead along with the overhead of jumping to another function. Once you've removed most of the generic instruction handling you can start looking at caching register values to minimise the amount of memory that's being moved around.

With the PC version up and running fairly successfully, I've spent this weekend getting the PSP code generation working. I don't want to go into too many details (as I want to go into more depth in future posts), but I know people are keen to hear some news about how this is going.

I got the basic code generation working on Saturday morning (thankfully I'd already resolved most of the tricky issues in developing the x86 version the previous weekend). I spent most of Saturday afternoon fixing some really horrible instruction cache related bugs. I'm still not 100% sure I've fixed them, but it seems very stable at the moment. At the moment I'm at the same stage with the PSP version of the dynarec that I was with the PC version last weekend - the code generation is running fine (and executing on the PSP without crashing more importantly :) but I've only just started looking at optimising things. It's still too early to speculate on numbers for the performance improvement it will give. Currently it's running around 10% faster with dynarec enabled, but it's still very early days.

More soon.

-StrmnNrmn

Sharkey
May 22nd, 2006, 01:12
Nice, we were all wondering what was happening.
Good to hear there is work still going on, maybe it will stifle the whiners.
Thanks for the update. :)

felonyr301
May 22nd, 2006, 01:31
wow keep up the great work man cant wait on the next release man good to hear you still working hard on it..

shadowprophet
May 22nd, 2006, 01:46
This is gonna be a good thread:p

Shilo
May 22nd, 2006, 01:50
:D 10% faster :eek: That is a big imporvment :D Thanks for the update StrmnNrmn!!!!!!!!!

Jonesyxxiv
May 22nd, 2006, 01:59
This is Awesome! I was just using Daedalus and wondering when a new version would be released or some news. I cant wait for the next release.

sroon
May 22nd, 2006, 02:06
First of all this is fantastic 10 pecent faster(mario was going about 4-7fps i think and now it should go at about maybe 15-22.
also guys good things come to those who wayt. aka maybe we could not ask so much about when its gona come out. (.)(.)

Emeriastone
May 22nd, 2006, 02:06
Always good to hear

SSaxdude
May 22nd, 2006, 02:17
Keep up the great work. Someday it might be full speed.

Shilo
May 22nd, 2006, 02:26
Posted by SSaxdude:
Keep up the great work. Someday it might be full speed.

And I think it will be sooner than we think :D

shenske37
May 22nd, 2006, 02:56
this project seems to be moving along very quickly, its awsome.
this is great news, keep up the good work!

gunntims0103
May 22nd, 2006, 03:15
thanks for the update i was wonderin wat was goin on remember dont let us rush you take your time just make sure for us that you code for quality of work on this emu not the quantity of time it takes lookin good anyhow keep up the great work

Topato
May 22nd, 2006, 03:19
First of all this is fantastic 10 pecent faster(mario was going about 4-7fps i think and now it should go at about maybe 15-22.
also guys good things come to those who wayt. aka maybe we could not ask so much about when its gona come out. (.)(.)


He said 10% faster, not 150% 8) . It would only be a 2-3 fps improvement.

Shilo
May 22nd, 2006, 03:32
So that means that Super Mario 64 is running at around 10fps now?????????!!!!!!!!!!!!

sroon
May 22nd, 2006, 04:36
He said 10% faster, not 150% 8) . It would only be a 2-3 fps improvement.
shit... i thoght 10% of what the whole project was...

vettacossx
May 22nd, 2006, 05:01
cool beans! lol 10% makes a difference :)

Video_freak
May 22nd, 2006, 05:15
10% here, 10% there, pretty soon we'll be close to full speed (i hope)

shiftybill
May 22nd, 2006, 05:22
keep up the good work dude

and remember to keep on truckin' :D

V3N0M
May 22nd, 2006, 05:26
Very good. I'm glad this is coming aloung nicely.

BALL_SAC
May 22nd, 2006, 05:29
I CANT WAIT FOR THE NEXT RELEASE!!! keep up the good work!

Facetags
May 22nd, 2006, 06:15
Strm, you have single-handidly restored my faith in homebrew and emulators on the beloved Sony handheld.

In other words - keep up the amazing coding my PSP jesus!

ACID
May 22nd, 2006, 06:32
great job sounds great keep up the good work. Now i just wish some body did the same with MAME

ACID
May 22nd, 2006, 06:37
Strm, you have single-handidly restored my faith in homebrew and emulators on the beloved Sony handheld.

In other words - keep up the amazing coding my PSP jesus!
I feel the same way

gimpyjr
May 22nd, 2006, 06:59
So awsome man So awsome.

I have 1 question though?

Does rouge squadron boot? will it ever boot?

Not likely. What you say im crazy, I was crazy once.

they locked me in a room with padded walls. I liked it there.

I died there, they even burried me there, they planted three flowers 2 grew up 1 grew down it scratched my nose drove me crazy. Crazy I was crazy once.

Peace out keep up the great Work man :D

**1_Man_Matrix**
May 22nd, 2006, 07:07
Very, very cool :D

LAMPRO
May 22nd, 2006, 08:03
Bangin!!

Psyberjock
May 22nd, 2006, 09:31
He said 10% faster, not 150% 8) . It would only be a 2-3 fps improvement.

Ok guys, lets do a little math. 10% of 4 is .4 and 10% of 7 is .7... Therefore, now we would have a framerate of 4.4-7.7... If the original framerate was 10, it would now be 11.

See how that works?


Edit: Not that I'm knocking the improvement, I'm happy for a 10% increase. I'm just trying to keep things grounded in reality.

digihoe
May 22nd, 2006, 09:32
Ohh, I would love if more emu's could use this dynarec approch... I would love for the GBA emu to use it and maybe even SNES, and not to forget PS1...

Great work keep the source code open, please!

Best regards!

tsurumaru
May 22nd, 2006, 09:55
Ok I don't want to get anyones hopes up but I think you are overlooking the following. After basic optimisation of the PC version Strmnnrmn reported the following:


The PC version was running around 60% faster with dynarec enabled than with it disabled, which is a pretty significant speedup (although this is still very early in the process).

The PSP version isn't even at this stage and its already running 10% faster!

Be3f
May 22nd, 2006, 10:28
Nice ;)
IMHO it would be GREAT if PSPMonkey & StrmnNrmn would join & develop one, but best N64 port together... :roll:

mr_nick666
May 22nd, 2006, 12:23
Nice ;)
IMHO it would be GREAT if PSPMonkey & StrmnNrmn would join & develop one, but best N64 port together... :roll:


Imagine the capabilities a lovechild of PSmonkey and StrmnNrmn would have!?? (all I need is some DNA...) :eek:

The progress being made here is great! :) Thanks for all the work StrmnNrmn :D

altunozara
May 22nd, 2006, 15:22
Good Onya Man!!
You Did It For The Weeliwees And The Blue Suede Monkey And Not To Mention Altunozara And Xenron Man!!!
... Nevermind
Keep Up The Awsome Effort I Hope One Day In The Distant Future That It Would Be Full Speed And Everything...yeh =-)

Ps: The Birds And The Bees And The Trees And The !!!weeliwees!!!

EDIT: XENRON GIVES YOU THE STRENGTH 1 MILLION PSPS!!... NOT VERY STRONG I KNOW LOL =-)

LiNKZiE
May 22nd, 2006, 16:28
StrmnNrmn... you're awesome, can't wait to play zelda on my psp (:... keep up the great work (:

Lumir
May 22nd, 2006, 17:03
Im just wondering how hard it would be to code in a frame skip in a psp n64 emu. Because with one of these implemented we could be seeing a playable emu in a few months.

Also is my thought process on the frame skip correct? Example...

Game running at 20fps no frame skip, with a frame skip of 1 would this game run at 40fps? 1 frame skip every other frame/second???

snkrock25
May 22nd, 2006, 17:24
If not for these N64 emulators, my psp would no longer have a home. Thanks for giving my $200 investment some justification, cus sony is slackin.

Anyone else find themselves primarily playing nintendo games on their PSP? I think it's amusing enough to buy a DS!

But yea, GREAT EMU!!!!!!!!!!!!!!!!!!!!

kale
May 22nd, 2006, 21:48
If you have the eloader, when you are at the menu, press the r button a few times to change the cpu to 333. I just did this and it gave a good speed increase.

sroon
May 22nd, 2006, 22:01
If you have the eloader, when you are at the menu, press the r button a few times to change the cpu to 333. I just did this and it gave a good speed increase.
Whats the fps for the Mario with the Shell and what version shell is it?

acn010
May 23rd, 2006, 00:15
OMG OMG OMG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
wow, soon it will be fast enough and and and, it will have sound and and and i will play zelda and and ::faints::

acn010
May 23rd, 2006, 00:17
let me see if i can make a DS emulator (which it would be impossible for me :( )

PSmonkey
May 23rd, 2006, 06:16
I look forward to when he anounces that he has optmised it for mips. I have no dout in my mind that the percentage increase would be even greater then x64 (PCs).


Im just wondering how hard it would be to code in a frame skip in a psp n64 emu. Because with one of these implemented we could be seeing a playable emu in a few months.

Also is my thought process on the frame skip correct? Example...

Game running at 20fps no frame skip, with a frame skip of 1 would this game run at 40fps? 1 frame skip every other frame/second???

Not really. You have some fuzzy math. Your logic assumes that its the gfx pipeline or rsp hle emulation that bottlenecks the entire thing. In n64 emulation the huge bottleneck is in the cpu emulation. Even with frameskip you're not going to see a huge increase. This also could cause emulation errors since the rsp is not in sync with the cpu & relies on 2 interupt exceptions to keep track of progression.

mr_nick666
May 23rd, 2006, 13:28
I only half understood that :eek: Thats why youre making a cool N64 emu and Im a nobody! ;)

kale
May 23rd, 2006, 23:47
Whats the fps for the Mario with the Shell and what version shell is it?

For Mario i didn't check the fps but the intro seemed pretty quick and did not seem to lag as much. My fw is 2.0 and i was using bock eloader.