Daedalus R13 update: StrrmnNrmn finds a Dynarec hack

Daedalus, N64 Emulator for the PSP - Image 1 

Tipster Swish alerted us on another update on StrmnNrmn‘s blog, and whew, it’s all about Daedalus R13 being “significantly faster” and probably more efficient than R12.

First off, remember the last update about the Dynarec Engine optimizations that were conceptualized on the train? As it turns out, StrmnNrmn had already discussed it with fellow homebrew coder Exophase… months ago. Anyway, it’s good that that the dev has finally put the optimizations in place and we’ll be seeing the results once R13 sees a public release.

Anyway, the second StrmnNrmn update today is about an “interesting Dynarec hack”. For the non-techie people out there, it’s basically a hack that exploits code generation… in other words, the hack will make Daedalus R13 more efficient and thus, faster. StrmnNrmn removed a couple of lines on the code, the error handling lines which can be omitted in a perfect world. Since programming and coding is hardly a perfect or ideal setting for error-free operation, StrmnNrmn used a hack that will allow him to omit the error handling:

What I realised on Monday is that I can make an assumption that lets me remove the error handling code for certain types of load/stores. The assumption is that when the N64 accesses any memory through the stack pointer ($sp) register, the address is always going to be valid, physical memory.

The assumption relies on the fact that most roms don’t do anything particularly clever with their stack pointers – it gets set up for each thread to point at a valid region of memory then the game just runs along, pushing and popping values from it as the code executes. Of course, if the assumption is wrong then the emulator will just crash and grind to a halt in a unpredictable manner 🙂

According to the dev, there has been a “10% speed up” and better stability. Nice, eh? StrmnNrmn is still testing the hack with different roms, though he indicated that he will definitely add the hack on Daedalus R13. It’s all looking good as faster really sounds better.

Thanks again to Swish for the tip!

Daedalus, N64 Emulator for the PSP - Image 1 

Tipster Swish alerted us on another update on StrmnNrmn‘s blog, and whew, it’s all about Daedalus R13 being “significantly faster” and probably more efficient than R12.

First off, remember the last update about the Dynarec Engine optimizations that were conceptualized on the train? As it turns out, StrmnNrmn had already discussed it with fellow homebrew coder Exophase… months ago. Anyway, it’s good that that the dev has finally put the optimizations in place and we’ll be seeing the results once R13 sees a public release.

Anyway, the second StrmnNrmn update today is about an “interesting Dynarec hack”. For the non-techie people out there, it’s basically a hack that exploits code generation… in other words, the hack will make Daedalus R13 more efficient and thus, faster. StrmnNrmn removed a couple of lines on the code, the error handling lines which can be omitted in a perfect world. Since programming and coding is hardly a perfect or ideal setting for error-free operation, StrmnNrmn used a hack that will allow him to omit the error handling:

What I realised on Monday is that I can make an assumption that lets me remove the error handling code for certain types of load/stores. The assumption is that when the N64 accesses any memory through the stack pointer ($sp) register, the address is always going to be valid, physical memory.

The assumption relies on the fact that most roms don’t do anything particularly clever with their stack pointers – it gets set up for each thread to point at a valid region of memory then the game just runs along, pushing and popping values from it as the code executes. Of course, if the assumption is wrong then the emulator will just crash and grind to a halt in a unpredictable manner 🙂

According to the dev, there has been a “10% speed up” and better stability. Nice, eh? StrmnNrmn is still testing the hack with different roms, though he indicated that he will definitely add the hack on Daedalus R13. It’s all looking good as faster really sounds better.

Thanks again to Swish for the tip!

Add a Comment

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