Optimized Mmuhack.o


___

Advanced Member
Joined
Jan 31, 2006
Messages
3,376
As we have now proven, there are compiled builds of mmuhack.o out there which are more efficient then others. The picodrive module for example, sped up gpsp a considerable amount and gpsp has got it's own optimized module packaged now. Also psx4all has recently been proven to be packaged with an inefficient mmuhack module by zodttd himself, who suggested to use the one delivered with picodrive.

Would an optimized version of the hack improve efficiency for each emulator/game (only egoboo2x uses the hack afaik) that utilizes it? Or is it necessary to have a dedicated build for each different program?

Otherwise it would probably be a good idea if someone like zodttd, exophase or notaz took a closer look if they'd like and see if they can clean up the code of the hack. Maybe Orkie would like to take a look aswell and then possibly implement it with open2x.
 
It doesn't matter how fast or slow the mmuhack code runs, as it's only run once at startup.

What does matter however is how the hack modifies the mmu table - and this really depends on how each application uses the upper memory. For example, a version that just optimises frame buffer access isn't going to be too good for an emulator which decides to place loaded roms in the upper memory area.

Also, you don't want to modify the entire upper memory region, as that then conflicts with hardware which also uses the upper memory, such as sound, and 2d acceleration.
 
So basically it does not make sense to have an optimized mmuhack module? It needs to be tweaked specifically for what you intend to use it for?
 
xnopasaranx said:
As we have now proven, there are compiled builds of mmuhack.o out there which are more efficient then others.
As mentioned here, I think there are only two of them: "working" and "broken".

Squidge said:
Also, you don't want to modify the entire upper memory region, as that then conflicts with hardware which also uses the upper memory, such as sound, and 2d acceleration.
The mmuhack.o I use hacks entire upper memory, and I haven't noticed any problem with that. Even gpSP (which uses HW SDL) works ok with it (you just need to flush the cache at the right time). So I think there is nothing to tweak or optimize, maybe except some rare cases, like when you need uncached memory for dualcore communication, for example. But even then you can simply map the memory you want to be uncached after doing the all-uper-mem hack.
 
Last edited by a moderator:
Yeah, it seems the gp2x.de archive has the Squidge mmu module which is broken. It was released with psx4gp2x and made no difference as noted.
 
Aaah... okay now I understand. I wonder what else the broken mmuhack.o has been packaged with.
 
Back
Top