PDA

View Full Version : Daedalus R10 Plan of Action - Nintendo 64 Emulator for PSP



wraggster
March 6th, 2007, 22:13
StrmnNrmn posted some more news on his Nintendo 64 Emulator for the PSP:


Before I went away on holiday I asked you what you thought I should look at working on for the next release of Daedalus. Over 200 of you replied, and I've greatly enjoyed reading what you've had to say. There were some brilliant suggestions, so many thanks for your contributions.

It seems pretty clear to me that speed is the single biggest issue that most people want to see addressed. Many people also mentioned compatibility and savestate or save game support, but in nowhere near the same kind of numbers as those wanting speed improvements.

Based on your feedback my current plan is to release Daedalus R10 at the end of March, focusing mostly on speed improvements. If I can fit in any easy compatibility fixes, I'll do this too*.

Several people have asked what possibilities remain for optimisation. Here's a short list of things I know need more work:

In many games, a lot of the time spent executing dynamically recompiled code is doing things which can potentially be emulated at a high level. For instance, over 5% of the time spent executing dynarec code in Mario64 is just converting matrices from floating point to fixed point format. Another 4-5% of the time is spent in a loop invalidating areas of the data cache (which is irrelevent in an emulator.)
Some of the most expensive fragments are those which branch to themselves (i.e. those doing many loops). I can optimise for this to avoid loading and flushing cached registers on each iteration through the loop.

I can implement a frameskip option (I had intended to implement this for R9, but forgot!)
I can make use of the Media Engine (as Exophase suggested in conversation, as the ME can't access VRAM, it might make more sense to execute Audio and Display Lists on the main CPU, and run the N64 CPU emulation on the PSP ME)
There are certain situations where I fail to create fragments in the dynamic recompiler - for instance if the code being recompiled writes to a hardware register, this triggers an interrupt and causes fragment generation to be aborted. I should be able to deal with situations such as this more gracefully.
The fragment generator can do a lot more to improve register caching, and eliminating redundant 64-bit operations.
There are many situations where N64 roms busy wait. I detect very simple occurances of this, but not all of them. If I manually identify more complex examples I can have the fragment generator optimise them away.

Some roms are causing the dynarec fragment cache to be repeatedly dumped and recreated (I think Banjo Kazooie is one example of this). Fixing this may just involve tweaking a couple of magic numbers.
I currently optimise memory accesses under the assumption that most accesses are in the range 0x80000000 - 0x80800000, which is incorrect in the case of roms that make heavy use of virtual memory, or access RAM through the mirrored range at 0xa0000000. I can improve the trace recorder to collect information on which range a memory access fell in, and generate code to speculatively optimise for this.
Now that the dynarec engine is producing much better code, the cost of display list processing is becoming more significant, and may finally be worth profiling and optimising.
That's quite a big list, so I doubt I'll be able to work on these things before the end of March, but I think it shows there's still a lot of scope for further optimisation.

-StrmnNrmn

*Just this morning, I figured out why the Expansion Pak support was broken, so Majora's Mask and a couple of other games relying on this are booting correctly now :)

http://bp0.blogger.com/_DFQdY4jxLWo/Re0oFe9oJ9I/AAAAAAAAAEI/OykhbHC6WPM/s320/MajorasMask.png

bry21
March 6th, 2007, 22:20
Thats great news. cant wait to till future release:thumbup:

Yobumtin
March 6th, 2007, 22:23
Nice. :] I like the focus on speed. Hopefully we'll see some compatibility too.

DarthPaul
March 6th, 2007, 22:23
Hell yeah!!! Waiting Waiting!

Veskgar
March 6th, 2007, 22:29
Thanks for this amazingly detailed update. The fact that StrmnNrmn is or has been talking with Exophase regarding development can only mean great things to come.

I love hearing the confidence regarding improvements in this update. I am really amazed at how far this has come along.

I'm definitely for speed improvements first and foremost. As I'd rather play just a few games at great speed as opposed to playing many games at slow or unplayable speeds.

The idea about the ME sounds wicked if it can be pulled off.

Thanks for the update and keep up this excellent work. We are all very appreciative.

aries2k4
March 6th, 2007, 22:32
Ya, canīt wait. always look forward to new releases of this emu. Glad to hear theres still some room left for optimization

IamAbe
March 6th, 2007, 22:34
Excellent News!! Keep up the great work!!

IM back!
March 6th, 2007, 22:36
can't wait

wiredforpower
March 6th, 2007, 22:37
Yes! Speed definitely, I cant wait for this release!

mexicansnake
March 6th, 2007, 22:56
Yay!!! I cant wait for super smash brothers!!!!!.

gr42178
March 6th, 2007, 22:57
This is progressing nicely

CaptainMorgan4
March 6th, 2007, 23:01
This is the best WIP emulator for PSP, it's very exciting to hear updates on Daedalus. I just hope the end of March comes quickly, but I really wish I could play DKR, Goldeneye, & Super Smash Brothers on this emulator, but until compatability is fixed looks like I won't be playing it for a while.

snkrock25
March 6th, 2007, 23:10
Sweet. This may finally be my opportunity to get a hold of Majora's Mask before it get's added the the wii's VC. :thumbup:

.:}<3\/!}\{:.
March 6th, 2007, 23:21
can't wait and keep it up!!!! sooner or later we'll have a full speed N64emu Thx to you!"!!!!! you rock!!!!!!!!!!

siulmagic
March 6th, 2007, 23:24
grat news keep up the good work relly hoping for frameskip =D

BrooksyX
March 6th, 2007, 23:32
Good to hear, I wish it was the end of March right now. Oh well its only a few weeks away.

Lodis
March 6th, 2007, 23:48
This update inspires alot of confidance in the potential of a full speed N64 emulator on the Psp in the near future. I had no idea there were so many different areas of possible optimisations and speed increases. This is very interesting and I look forward to the release.

camcorderdoctor
March 6th, 2007, 23:57
Sweet! :thumbup:

ICE
March 7th, 2007, 00:02
frameskip!! smurph ya!!

felonyr301
March 7th, 2007, 00:32
Love how informative his posts be and always looking forward to his updates and I wish you luck on this emulator. Also talking to Exophase means that this emulator will be hot sooner than some think hopefully. P.S. YEEEAAAA!!! Majora's Mask is working coollll....

emuking
March 7th, 2007, 01:25
surprising bit at the end cant wait to play majoras mask full speed one day

mfz64
March 7th, 2007, 01:35
Can't wait to play MAJORA'S MASK!!!!!!!!!!!

Torak
March 7th, 2007, 01:37
Umm umm umm M...m...MAJORA'S MASK SWEET... Oh cant wait to see the speedup!

PLZKLLME0080
March 7th, 2007, 01:42
It would be frekin awsome if this could play Super Smash Bros. i cant get that to work on my N64 emulater on my pc!

jurkevicz
March 7th, 2007, 03:54
Definately can't wait!

Cap'n 1time
March 7th, 2007, 07:33
hmm.. The n64 emulator has failed to capture my interest till just now... How cool would it be to play Star Wars: Rouge Squadron on the PSP with higher resolution wide screen?

mcvader
March 7th, 2007, 08:11
CPU emulation on the ME? I thought CPU emulation was the most power consuming aspect of emulating the N64, I always thought the ME was a lesser sort of back-up processor. It's good to see Norm has a ton of tricks left up his sleave. I noticed talk of Banjo-Kazooie, hopefully it will be a lot faster next time round. I'm really looking forward to this release.

@Cap'n 1time, I love Rouge Squadron, although on PSP it would be a lower rez as it was one of the few games that used the expansion pak for 640x480.

Gold Line
March 7th, 2007, 12:56
what about DK64 that was a great game

jason215
March 7th, 2007, 21:31
good luck, Your the best :P:P ;)

Lodis
March 7th, 2007, 23:09
CPU emulation on the ME? I thought CPU emulation was the most power consuming aspect of emulating the N64, I always thought the ME was a lesser sort of back-up processor. <--snip-->.

The Media Engine is clocked at 333mhz so I would imagine it is pretty powerful.

felonyr301
March 8th, 2007, 00:12
reason being is that the me doesn't have access to the vram so it's probably good idea what he is going for well that's what he said.

Ultima Chocochu
March 8th, 2007, 02:14
Can't wait for this release >.<
Specially Super Smash Bros.
XD

Vangar
March 8th, 2007, 02:34
The day this emulator plays Starcraft is they day i will remember forever. Think about it, portable Starcraft... mmm...

Cap'n 1time
March 8th, 2007, 05:32
@Cap'n 1time, I love Rouge Squadron, although on PSP it would be a lower rez as it was one of the few games that used the expansion pak for 640x480.


Hmmm? is there something I dont know? I thought all n64 games were 320x240. Wouldnt 640x480 be considered a boosted, higher resolution?

SpacemanSpiff
March 8th, 2007, 07:58
The expansion pak added an additional 4 MB of RAM to the N64. A handful of games gave the option to run in high resolution if they detected the expansion pak. I believe Vigilante 8 was another one that let you do this (in addition to Rogue Squadron) but I can't think of any others right now.