PDA

View Full Version : Daedalus News - 2 more updates from StrmnNrmn's blog



GeEkPiE
July 28th, 2006, 00:04
Captain Morgan's compatibility results

It looks like Captain Morgan has put a lot of effort into doing compatibility testing with Daedalus R6. Thanks Cap'n! (thanks for your email too - I promise I'll get back to you just as soon as sort this issue out!)

[Update]

Don't miss Wally*Won_Kenobie's R6 compatibility list, which is also excellent. Wally has been collecting missing_mux.txt files for me too, for which I am indebted :)

-StrmnNrmn

A great optimisation/bugfix..

..with a catch.

This week I've been posting about various speedups I've been making by implementing various opcodes in the new dynarec engine. Although I have implemented most of the commonly used opcodes now, after my previous post I decided to add some temporary logging to the emulator to see how often the remaining unhandled opcodes were being used. Two that immediately jumped out at me were JAL (Jump And Link, which is used to perform a function call) and JR (Jump Register, which is used to return from a function call.)

These two instructions are very heavily used, and I was surprised to realise that I'd not implemented them! They're pretty easy to code - in fact, due to the way I construct the instruction traces that are fed into the dynamic recompiler I could effectively ignore the JAL instruction and JR just required a couple of lines of code.

So far so good. I was expecting a modest speedup - maybe another 2-3% on top of all the previous changes I've made this week. After compiling and running the new code, I was amazed to see an improvement of over 10%! Surprised with the figures I was seeing, I did a full rebuild and checked the results again with several different roms. They all showed the same kind of speedup.

I've been programming (and more importantly debugging) long enough now when I should trust my instincts - call it my programming 'Spider-Sense' tingling if you will, but I knew something didn't quite add up :). In situations like this in the past, rather than taking an unexpected speedup for granted I've spent time investigating the root cause to find out exactly what's going on. At the very least I'll simply satisfy my own curiosity, but often I'll find some useful information along the way too (e.g. other related improvements and optimisations etc.)

So I started looking through the code and rerunning a few roms to try and get a handle on what was causing such a significant improvement. After a short while I realised that all the roms were now generating a lot more potential traces for the dynarec engine to consider for recompiling. This confused me even more, because this behaviour should slow the emulator down rather than speed it up. Another puzzling thing was that the only observable behaviour of my changes should be the speed of emulation - but it looked like my change was somehow changing the flow of execution in the rom.

After bit more head scratching and debugging, I finally realised what had happened. In making my changes, I had inadvertently fixed a bug in the dynarec engine that was causing the recompiled code to jump back out to the interpreter whenever a JAL instruction was encountered! This bug had been in the dynarec engine since the first day or so, but because its only side effect was to slow down the emulator rather than something more obvious (i.e. a crash!) it had remained undetected for a couple of months.

So I had figured out what the reason for the 10% speedup was, and I could finally get to bed safe in the knowledge that I had fixed a nasty, subtle bug along the way. Brilliant!

It was only then that I noticed a couple of new problems that I hadn't seen before: The emulator began hanging in places that had previously been fine - such as Peach's letter at the start of Mario 64. On the occasions the emulator managed to get past that point, I found out that Mario wouldn't move or jump (but strangely the c-buttons and pause menu worked fine)

:(

I've spent the last couple of evenings trying to figure out why fixing one bug is causing another. I've finally managed to find a way of reliably reproducing a hang within a few seconds of starting the emulator up. This is important because my best chance of identifying and fixing the problem is to be able to run the PC build of the emulator with my 'fragment simulator' enabled. The simulator is very slow however (about 100x slower than running the emulator normally), which is why it's important to find a way of reliably reproducing the bug very early on in the emulation.

So that's what I've been up to over the past couple of days, and why I haven't been able to reply to people's emails or comments on this blog. Now that I can reproduce the bug in the fragment simulator I'm confident that I can get to the bottom of it. I'll keep you posted with any developments and try to go through emails/comments just as soon as I've cracked it.

-StrmnNrmn

tsurumaru
July 28th, 2006, 00:46
In summary; Strmnnrmn has been working hard on the Dynarec, he's implemented a lot of opcodes and got another 10% speed increase. Unfortunately he has also discovered a bug that has caused a lot of roms to now crash. He has just about pinned this problem down and hopes to solve it soon. After that he will work on some further requested functionality before R7 is released.

Not to get everyones hopes up but this sounds really cool, with the dynarec finished we could see a 30-40% speed increase on R6! Lets wish him all the best.

GeEkPiE
July 28th, 2006, 01:07
:D yea, this release im pleased to see is mainly going to be focused on speed.

Xiro
July 28th, 2006, 04:10
yea strmn nrmn is a beast... he has been really working hard these last couple days and updating us getting us pumped for a new release.

He also said in comments that he would like to implement even more fixes in his code before an R7 release, but he will keep us updated as he works.

Kramer
July 28th, 2006, 09:21
its good that StrmnNrmn post more updates nowadays this one sounds very interesting hopefully mario kart will play without crashes in r7

Zion
July 28th, 2006, 09:37
Sounds awesome! :D We are getting very close to full speed n64 emulation on the psp!!! :p :D

Video_freak
July 28th, 2006, 09:37
it could have 30-40% speed increase! holy crap :eek:

D0N
July 28th, 2006, 09:40
Excellent news! Keep up the great work StrmnNrmn!

NeoXCS
July 28th, 2006, 13:59
Wow StrmnNrmn thats amazing! Good luck on fixing that bug that causes the hangs! :) I can't wait to for this release of Daedalus! Keep up the good work as you always do StrmnNrmn! :D

Baboon
July 28th, 2006, 14:24
This all sounds very promising. :)

Hopefully there will be a significant speed increase and a little less crashing.

Good luck fella.

Mr.Denny
July 28th, 2006, 14:36
Keep up the cracking work StrmnNrmn. :)

My dream of playing Body Harvest on the PSP could come true. ;)

mr_nick666
July 28th, 2006, 15:46
Great news :D Its a shame things are never easy... :o

cooliscool
July 28th, 2006, 15:56
StrmnNrmn, you're a god. Status updates on a human level like this make me respect you above a lot of other emu authors.

Keep up the great work. :)

Uruz 6
July 28th, 2006, 16:14
Great work, can't wait for the release!!

Cap'n 1time
July 28th, 2006, 16:19
Captain Morgan's compatibility results



[Update]

Don't miss Wally*Won_Kenobie's R6 compatibility list, which is also excellent. Wally has been collecting missing_mux.txt files for me too, for which I am indebted :)

-StrmnNrmn




your the man wally.

aries2k4
July 28th, 2006, 16:46
Sounds good. keep it up!!! we all apreciate it

ACID
July 28th, 2006, 16:51
StrmnNrmn you are the man you don't imagine how many thousands of psp 1.50 fans are rooting for you. Great job in all you have done.

tophead420
July 28th, 2006, 17:58
so youve managed to speed the emu up 25-28% sounds good hopefully you fix that other bug in it and its nice to hear all this wonderful news keep it dood and cant wait for your next release

BL4Z3D247
July 28th, 2006, 18:22
WOW, these updates are sweeeeet :D keep up the good work strmnnrmn, we're all rootin for ya!

ACID
July 28th, 2006, 18:38
Man cant wait for R7

xlokichaosx
July 28th, 2006, 19:04
StrmnNrmn totally rocks, it's great to see people are so dedicated to psp homebrew, ect. StrmnNrmn is one of the reasons Psp PWNS DS. I like knowing I won't have to pay for my Mario 64 port to handheld. Lmao keep up the good work.

Does anyone know what the hell was ever up with that boast about the fullspeed with sound (with multiple eboots or something like that) Not to say the work StrmnNrmn is doing isn't fantastic, but it seemed like after that single post, I never heard anything about it again, hahah

acn010
July 28th, 2006, 19:31
oh cool. cant wait!!!
im so excited!!!!!!

LazerTag
July 28th, 2006, 20:41
Yes props to Captain Morgan and Wally*Won_Kenobie for their efforts in testing, well done.

and of course MAD PROPS to StrmnNrmn for his work and dedication to this project thus far. Being a noob'ish programmer I am in awe. well done sir!

SmashinGit
July 28th, 2006, 23:07
Keep up the good work StrmnNrmn, Thanks for all your hard work.

pkmaximum
July 29th, 2006, 00:32
This is why Strmmmn rocks he is determined to get us a great working N64 emulator for the PSP. Also the only thing I'm worried about though is how much more optomizations can be done after this after all we still have to add sound that takes up a lot of memory, no doubt that we will have to use the Media Engine for that.

emuking
July 29th, 2006, 01:42
r7 is going to kick ass :D

shiftybill
July 29th, 2006, 02:34
StrmnNrmn is LORD!!!

felonyr301
July 29th, 2006, 03:27
my god i cant wait for the next release big speed increase and more stable ohh YEA!!!

mameuser
July 29th, 2006, 03:30
We shall expect aleast a 30% increase from R6

Wally
July 29th, 2006, 13:19
Hey guys!

This is excellent news i know :) but please remember that R7 could probably come out later than expected.

Who ever is saying that the games that are 6fps with the extra 30% speed is right about them only reaching about 8 but remember, games that are already 20fps will get 6fps which means mario is about 16 or so, will get about 4-5 fps thats over 20FPS!, but putting other issues into effect where the controls dont work its bad.

Compatbility list has been updated (http://www.dosgames.com/~wally4000/daedlist/)

Enjoy!

Thanks to all those who contributed, its greatly appreciated!

Kramer
July 29th, 2006, 13:29
i really dont care how long we have to wait for r7
as long as we here some updates on how its going

Video_freak
July 29th, 2006, 13:32
i really dont care how long we have to wait for r7
as long as we here some updates on how its going
thats why we like StrmnNrmn so much. he gives us updates :)

Xiro
July 29th, 2006, 18:57
thats why we like StrmnNrmn so much. he gives us updates :)

and he updated again today! I just submitted it to the submit news forum

Video_freak
July 29th, 2006, 18:58
and he updated again today! I just submitted it to the submit news forum
yay! more great news :)

Kramer
July 29th, 2006, 19:00
yeah i just read that r7 will be great if it's a lot more stable