StrmnNrmn discusses Daedalus with blog readers

StrmnNrmn discusses questions with Daedalus - Image 1

A couple of days ago, homebrew developer StrmnNrmn updated all of us regarding his Nintendo 64 emulator project for the PSP, Daedalus. There was a bug all right, but it’s not in the application itself. The coder reported that the Dynarec bug lies in the rom of video game Super Smash Bros.

Anyway, StrmnNrmn accommodated a number of his readers and supporters today by answering some of their questions posted on his blog. The questions were quite a handful so what we are going to do is post them side by side with StrmnNrmn’s answers. Get your pen and paper ready because we’re certain this is going to be useful for all of you.

Q: Is Python a good starting point? I’ve heard that it is.

A: I’ve never spent much time with Python, but I think it would be a good starting point for a beginner because it seems to have a very active community.

Q: Dynarec + fragment simulation (imprecise interrupt handling); Dynarec + fragment simulation (precise interrupt handling); I do not understand how those can be equivalent(and thus fragment execution equivalent). I am thinking ‘imprecise’ could change the timing of the interrupt handler. Correct or incorrect?

A: In the case of Daedalus, the timing of interrupts is generally very imprecise anyway – for instance I make the assumption that all instructions execute in 2 cycles which isn’t particularly accurate.

Because of this firing the vbl interrupt a few hundred cycles early or late doesn’t really affect the execution of most ROMs, so ‘precise’ and ‘imprecise’ interrupt handling are essentially equivalent for my purposes. The same assumption probably won’t hold for all dynamic code generators/emulators though.

You make a good point about GDB though – it’s definitely something I need to take another look at next time I’m trying to debug a problem like this which only reproduces on the PSP.

Click on the “Full Article” link for more answers from StrmnNrmn!

StrmnNrmn discusses questions with Daedalus - Image 1

A couple of days ago, homebrew developer StrmnNrmn updated all of us regarding his Nintendo 64 emulator project for the PSP, Daedalus. There was a bug all right, but it’s not in the application itself. The coder reported that the Dynarec bug lies in the rom of video game Super Smash Bros.

Anyway, StrmnNrmn accommodated a number of his readers and supporters today by answering some of their questions posted on his blog. The questions were quite a handful so what we are going to do is post them side by side with StrmnNrmn’s answers. Get your pen and paper ready because we’re certain this is going to be useful for all of you.

Q: Is Python a good starting point? I’ve heard that it is.

A: I’ve never spent much time with Python, but I think it would be a good starting point for a beginner because it seems to have a very active community.

Q: Dynarec + fragment simulation (imprecise interrupt handling); Dynarec + fragment simulation (precise interrupt handling); I do not understand how those can be equivalent(and thus fragment execution equivalent). I am thinking ‘imprecise’ could change the timing of the interrupt handler. Correct or incorrect?

A: In the case of Daedalus, the timing of interrupts is generally very imprecise anyway – for instance I make the assumption that all instructions execute in 2 cycles which isn’t particularly accurate.

Because of this firing the vbl interrupt a few hundred cycles early or late doesn’t really affect the execution of most ROMs, so ‘precise’ and ‘imprecise’ interrupt handling are essentially equivalent for my purposes. The same assumption probably won’t hold for all dynamic code generators/emulators though.

You make a good point about GDB though – it’s definitely something I need to take another look at next time I’m trying to debug a problem like this which only reproduces on the PSP.

Q: In your long and very precise explanation, you refer to a “PC build” version of Daedalus, as a key element to debug. Maybe it’s only me, but I’ve not seen any Daedalus on PC since a long time ago. Is that a dev-only version, or is it also downloadable, like the PSP port?

A: I still maintain the PC version for my own testing. Given there are better n64 emus already available on the PC (e.g. pj64) I’ve never really thought it worthwhile releasing new versions. If there’s enough demand for it (other than just curiosity) then I’ll have a look at releasing PC builds alongside PSP builds.

Q: So does this mean that most games that like to crash in the menu will be fixed?

A: Maybe – it will certainly help a few other roms, but I’ve not done any thorough testing yet.

Q: Couldn’t you compare the log files of the emulation with, and without the dynarec in place, and see what the code is doing differently, and just locate where the river forks, as it were?

A: Wait until the next blog post and all will be revealed.

Q: Would there be any advantage to doing some static recompilation of [some of] the original ROM at load time rather than runtime? If so that state could obviously be saved and loaded the next time instead of the original ROM.

A: It’s an interesting idea, but the dynamic recompilation is so fast there’s very little benefit to be gained from caching it (last time I checked, less than 1% of the time spent in the emulator is taken up by code generation).

Accessing the memory stick is actually pretty slow, so loading 64KiB (for example) of cached code from the memory stick may well be slower than just regenerating that code on the fly.

That’s about it for now from StrmnNrmn. Be sure to check back here for more updates regarding Daedalus.

Via StrmnNrmn

Add a Comment

Your email address will not be published. Required fields are marked *