Daedalus R12 debugging: StrmnNrmn teaches Homebrew Emulation 101

Posted Jun 11, 2007 at 6:26PM by QJ Staff Listed in: Homebrew Development, Homebrew Emulators, Emulators Tags: Daedalus, emulation, Jupiter, N64, Smash Bros., StrmnNrmn
Ó


Daedalus update - Image 1


While N64 emulator for PSP">Daedalus, an N64 emulator.">StrmnNrmn's updated us with a quick post about the dynarec issue for Super Smash Bros. yesterday, he's fulfilled his promise of a longer, more detailed entry on the said issue. That's what we've got today: another update on his much-awaited Daedalus R12 N64 emulator for the PSP.

It's even complete with all the homebrew emulation development hoopla that can drive the novices to either 1) rip their hair clean off their scalps, or 2) create better homebrew and be encouraged by StrmnNrmn's efforts. With that's said, let's take this slow and steady.

Maybe you're asking what the hell is up with dynarec issues anyway? Just so you know, StrmnNrmn is going through hell and high water to fix this thing, so you better thank him.

He admits that, in the six years that he's been programming professionally, dynarec debugging is one of the hardest issues to deal with. "It's very much like working blindfolded." For one, you don't know what code will turn up every time. And worse, identifying the exact bottleneck out of 500 million lines of code can be a headache the size of Jupiter.

Homebrew hero that he is, StrmnNrmn's been able to deal with issues like this before, and he's been able to develop his own solutions to track down these bugs. That's how he was able to wheedle out the SSB dynarec issue. The trick here is to reproduce the same bug in the PC-build of the emulator - that's his technique.

Going hand in hand with this is a fragment simulator he's coughed up. This tool helps him pinpoint the bugs that the dynarec code generates. Basically he uses a framework that allows him to compare what is being executed to what is being simulated. Make ends meet by comparing the two, and your blindfold gets more transparent.

Now we don't know if you understood all that. I for one can't honestly claim that I understood every single detail of his post. But I do have a grasp of the gist. Want to continue your Homebrew Emulation 101 lesson? Click the Read link below to head on over to StrmnNrmn's lecture.

 
 
 

Comments [refresh]

by first NOOBs - 2007-06-11 13:50
» first NOOBs

first NOOBs

by youresam - 2007-06-11 14:38
» .

I think articles like this should just have a big button that says "READ", I can hardly follow this summary.

by Ero-Sennin - 2007-06-11 14:39
» wow

Pretty Awesome!

by UBER DOOBER - 2007-06-11 14:45
» woah...

First off... THANK YOU STRMNNRMN!



Your Daedalus is most definately the greatest emulator that any handheld system has seen. Atleast in my opinion. I GREATLY appreciate your hard work and feel as though I, or rather we, can't thank you enough.



YOU ROCK D00D! Can't wait for R12, I know it will be UBER DOOBER XD!

by z7 - 2007-06-11 14:48
» z7

LETS SUMMON CAPTAIN PLANET!







EARTH

by um.. - 2007-06-11 14:58
» um..

this article makes no sense.. StrmnNrmn's Blog post was Easier to read =/

by Sasha - 2007-06-11 15:11
» my version

my version of homebrew:



http://www.crazyyy.com/

by Jon - 2007-06-11 15:43
» props

sounds like one hell of a headache to work through these dynarec issues. Thanks for doing it anyway StrmnNrmn you rock.

by stop talkin - 2007-06-11 15:59
» not again...

can you stop with the updates, and just tell us when it gets released?



this has been the 392nd update on the emulator, so just have a blog with these details, and qj.net can just tell us when the final thing is out. dosbox emu is much more exciting!

by . - 2007-06-11 16:11
» .

WIND!

by seven - 2007-06-11 16:14
» ...

In my opinion this summary was written very well, i especially like the blindfold metaphor!

by . - 2007-06-11 16:16
» ...

COMBO BREAKER!

by . - 2007-06-11 16:19
» PS.

By the way, in case you don't see what I did there - I am well aware "fire" is the next one - I just put wind there first to break it.

by milo22 - 2007-06-11 16:31
» PS

hmmmm

by milo22 - 2007-06-11 16:33
» ....

C-C-C-Combo Breaker!!

by Shane The Juggalo - 2007-06-11 16:47
» .

DUMBASSES!

by IDEA - 2007-06-11 16:52
» gotta an idea here

I really cannot wait for this to be released. But, i also have other requests. How about making a "ad-hoc" mode for people to play w/ each other. This would make it so much more fun rather than playing SSB against the computer. This is BY FAR my favorite homebrew app. and i think that this little feature would make it even more enjoyable. Also, when StrmnNrmn gets goldeneye running faster, that would be really fun with friends and/or relatives. But before he gets multiplayer, i would rather see an increase in compatibility and speed. Then add those little extras.

by IDEA - 2007-06-11 16:54
» got* an idea here

its me again....and if i had a blogspot name or gmail adress or w/e u need i would post on his blog...if anyone wants to post this idea that would be awesome...btw keep replying... i rele want to see what others think of this idea; i dont want to beg if im the only one who rele wants this...post ur opinion here!!

by someone who hates n00bs - 2007-06-11 17:45
» ...

why don't you just go f.u.c.k. your mom, you impatient pr1ck! BTW deadalus r12 will be scweeeeet as hell.

by McPirate! - 2007-06-11 18:09
» GUAU!!

The psp is so cool! It plays N64 games! GUAU!! The PSP and Wii are in the same ballpark price-wise, I'd rather just play SSBB on a 50inch tv than play a 6 year old game on a 480x272 screen.





LETS NOT LIVE IN THE PAST AND START MOVING THE PSP FORWARD

by Izzy - 2007-06-11 18:12
» ssbb

just wait till ssbb comes out it wil be another year till this daedalus thing works at full speed with no problems, maybe two years or never

by Mabie A. - 2007-06-11 18:21
» me

I had sex with GINO

by McPirate! - 2007-06-11 18:23
» ARR!

NIIICE!

by GO - 2007-06-11 18:25
» GO LICK

GO LICK A TURKEY

by (I)(AM)(NOT) - 2007-06-11 18:31
» .:+~-/V\()()§3-~+:.

Yeh... Smash bros is better than Super Mario 64, imho.

by . - 2007-06-11 18:33
» .

COWS! RRRRAAAAARRRRRR GGGGGHHHH!

by DJ - 2007-06-11 21:36
» lol, too many retarded 6 year olds here.

i like this article. it makes sense at least.

by templar - 2007-06-11 21:45
» afgf

....you posted this on yesterdays article about the dynarec fix. You are not the first to have this idea, it is, quite obviously, in all our minds that it'd be good, i have no doubt that StrmnNrmn will have already thought of this. I also have no doubt that this idea will have already been posted many, many times on Strmn Nrmn's blog, and it's wishful thinking to assume that the ad-hoc feature will be added anytime soon. This is not a priority, there are still other bugs to fix, and even to allow other N64 games to be played on Daedalus.

I'm sorry to p1ss on your fireworks, but you are not the first to think of this, and you will not be the last. If you feel that you are the only one to have this idea, and feel that not even Strmn Nrmn, himself has thought of this, then by all means post it on his blog, but do not expect him to say it will be in the next update.

by BaH - 2007-06-12 00:03
» Bad summary

Really bad summary.



He referred to the difficulty in finding an error in the dynamic recompilation that may often occur 500 million instructions into the emulation (after the emulator has processed 500 million instructions and turned them into code the psp can work with).

Thats not the same as looking through 500 million lines of the emulator's code, it surely does not have that many.



He also wasn't talking about looking for a bottleneck, by deffinition a speed limiting portion of the code, but rather a bug that caused the dynarec to generate invalid code and cause SSB to not work with it enabled.



Please take the time to read the post properly to avoid posting misinterpreted summaries on a popular site like this.



#4: The blindfolded metaphor was straight from StrmnNrmn's post.



Oh, I should add: StrmnNrmn, your a bloody legend and daedalus is without question the most impressive piece of homebrew I have ever had the privilege to use.

by Rayn389 - 2007-06-12 00:30
» not that im dissing daedalus or nething but...

I actually think that the ps1 emulator is better then n64 but thanks alot strmnNrmn

by Treefiddy - 2007-06-12 01:48
» Re: Rayn389

The PS1 emulator was made by Sony for a Sony product. Of course it's going to work better.

by ' - 2007-06-12 02:15
» '

haha pwned

by lol - 2007-06-12 04:27
» re

lol pwned indeed :D:D:D:D:

by Unknown - 2007-06-12 05:24
» Wireless Option

THANK YOU STRMNNRMN! for this post

shure makes this problem with SSB solfd...:P

ever touch of making a wireless option in your emulator

that makes possibble to play wireless with every N64 game

think off it please???? it would by asowome to play SSB with my friends



THANK YOU FOR YOUR TIME STRMNNRMN!

by gregerson316 - 2007-06-12 06:18
» Ad-hoc

Im sure if he added ad-hoc now, that would make the framerate slow down a lot. But when the emu gets going it might be a good idea. Infrastructure mode would be killer too. But all that might be a while.

by asdaf - 2007-06-12 06:21
» asdaf

Go ***** youself.

500000000 line with only one caracter (\n) =500000000Bytes

500000000/1024=488281,25kbytes

488281,25/1024=476,837158203125Mbytes



I gess it's a mistake

by rob - 2007-06-12 06:26
» ...

wind is the second one...at least, i could have sworn it is

by BaH - 2007-06-12 06:55
» mistake

ascii is 8 (7) bits per character including return so 1 char per line would be 16 bits (2 bytes).



Also, the original post was talking about recompiled n64 instructions that the PSP runs, not lines of static code used to construct the binary.



I gess (guess) it's a mistake

Quite a nice judge of your caracter (character).

by never - 2007-06-12 06:57
» u guys are so pwned

there was a ps1 emulator made b4 custom firmware by Yoshihiro called psx-p and it could play most(not all) games like ff7 and crash bandicoot with little graphic problems wiht out sound but like some emulators it was a port of a pc ps1 emulato so actually u were pwned

by BaH - 2007-06-12 07:05
» mistake

In ascii 1 character is 8 (7) bits including return so 1 char per line would be 16 bits per line.



Also, the original post was talking about recompiled N64 instructions that the PSP runs, not the static lines of code that make up the emulator's binary.



I gess (guess) your lack of thought before posting is a good judge of your caracter (character).

by pspfan (IDEA) - 2007-06-12 07:06
» @ templar

i realized where and when i posted it but i never said i was the first to ever mention it. However, i do visit StrmnNrmn's site quite often and have not seen it be too hot of a topic or evan replied to. I just posted to see others opinions...i did not intend for him to drop what he was doing rite now and add multiplayer. i just wanted a couple responses and support. I cannot wait to play SSB and i realize all the work he is putting in to get other games running. It was just an idea for the future. Not a demand. You said that this idea has been posted many times. I have not seen it at all on either PSP updates or strmnnrmn 's blog. I have posted it a couple of times on qj b4 but it was never really responded to.. i just wanted responses........btw @ gregerson316.. do u really think that adhoc would lower framerate that much if hes got ssb runnin at 40 fps?? just a thought

by Question!!! - 2007-06-12 07:08
» questoin here

About how many lines of code do u think daedalus is??

by pro - 2007-06-12 07:13
» silence

shut your mouth tool shed, if they didnt give updates the sorry as5 little b1tches like you would have anything to type about, nobody forced you to click the link so go stick something in your mom(like everybody else does)

by if-uc-kedyourmomindaass - 2007-06-12 08:25
» whupdee fu-cking doo

Who gives a fook? OMFG! StrmnNrmn lost his virginity! 200 Jumps!!

by mohaas05 - 2007-06-12 08:30
» an idea

if an emulator translates a game on the fly so the psp understands it can't we just make it pre-translate it so games would run more smoothly

by lol - 2007-06-12 09:04
» lol

sorry but you are the 6 year old if you like this article. SM's post was much more interesting to read and I understood. The QJ post is a chopped up version and makes no sense.

by /./ - 2007-06-12 09:09
» ./.

100 bajillion (10 with 1000000000 zeroes after it)



who cares?

by ShadowMaker - 2007-06-12 11:42
» Yeah,

I know how coding works, he has it really really hard to say but for those who ever played maplestory etc an used a hack engine I produced one of those with a source as which most people do an trying to find a detected string is a killer but unlike that creating a emulator that works for a psp that was ment only to be for one system is 1000x harder. You get my point.

by lukahn - 2007-06-12 12:10
» Although...

...operating systems have 50 million lines of code. The blog says instructions, so it's just a mistake on QJ's part I guess.

by abc - 2007-06-12 12:19
» xyz

u captain earth kids are fuhkin ghayyyy

by omg - 2007-06-12 12:21
» your so stupid

he HAS a blog, jackass. its QJ's fault for SCRAPING for news at every turn. jackass

by fm - 2007-06-12 12:59
» port

That would be a port.

by ash_mist - 2007-06-12 14:35
» ........ok

I guess i get it, as i have attempted it before, lost my mind and quit trying, good luck dude, once you're done quickly post it, i hope to see this soon.



Ps- its ****** hard i know, but can you try and get zelda (ocarina of time) not just the game to load, but , the graphics, im not complaining (not spelled right) but , i just cant get certain weapons and such with the black and white thing, not fully but, at first the text is messed up, then the color, then the game cant be finished, it would be nice to have it fixed within the next 4 releases so keep rockin. And please help us with this please.

by McPirate! - 2007-06-12 18:50
» ARR!

Dust off ye ole N64, matey. And if ye dont have one, they arrrnt hard to find cheap!

by STOP WASTING TIME - 2007-06-13 04:51
» STOP WASTING TIME

WILL YOU STOP WASTING TIME STRMMMNNN, GIVING US LECTURES. JUST RELEASE THE FLIPPING THING!!!!!

by mohaas05 - 2007-06-13 10:38
» so?

why can't we do that?

Add QJ.NET
Add to My Yahoo!
Google Reader Subscribe with Bloglines
Add  to your Kinja digest Subscribe in NewsGator Online
Subscribe with Pluck RSS reader Add 'www.qj.net' to Newsburst from CNET News.com
Subscribe with SearchFox RSS del.icio.us www.qj.net
Add to Technorati Favorite! Add to My AOL
furl! it Stumble for Treehugger!