Change Mmuhack In Cps2emu


claus

Member
Joined
Mar 20, 2004
Messages
146
Age
48
Location
Denmark, Holstebro
Website
Visit site
Hello
I heard that some of the other emulators had a faulty mmuhack file included. I looked in my cps2 emulator folder and the mmuhack file was different in size compared to the one in piccodrive. I replaced it and and the emulator seems to run smoother now, but I'm not completely sure. could there be any other reason for the different size of the mmuhack files?
 
One is broken and doesn't do anything at all. The other one works. That's the main difference.
 
I have updated the "broken" mmuhack (which wasn't completely broken, it only hacked an unused region) in the archives and also added some documentation, so hopefully all new programs will use the correct hack in correct way.
 
notaz said:
I have updated the "broken" mmuhack (which wasn't completely broken, it only hacked an unused region) in the archives and also added some documentation, so hopefully all new programs will use the correct hack in correct way.
I have a question regarding the mmuhack. If I apply the mmuhack and then fork a child process, will the child take advantage of the mmuhack?
What if I exec an external process? Will the mmuhack have any effect on the new process?
 
Last edited by a moderator:
slashank said:
I have a question regarding the mmuhack. If I apply the mmuhack and then fork a child process, will the child take advantage of the mmuhack?
What if I exec an external process? Will the mmuhack have any effect on the new process?
mmap manpage says that mapped memory is preserved across fork()s, so I think it would. However starting external process most likely won't work, as you can't pass your mmap()ed memory to another process, and any newly mmap()ed memory will be uncached.
If you want to hack an external process, I think that won't work, as current mmuhack only affects the calling process (the one which does open("/dev/mmuhack") call.
 
Last edited by a moderator:
Each process has it's own TTB (Translation Table Base), so each need to run the mmu hack.

It's possible to put mmu hack into the kernel so every process has it automatically, but this may stop some programs from working that required uncached memory.
 
Just wondering, do we have a list of these programs in case Open2X team decided to add it to the kernel one day? and am almost sure it wont, but no harm asking: would adding it to the kernel reduce start up time?
 
Back
Top