melonDS icon indicating copy to clipboard operation
melonDS copied to clipboard

Hopefully fix fastmem on macOS

Open nadiaholmquist opened this issue 2 years ago • 3 comments
trafficstars

This makes two very small changes:

  • Add forgotten calls to JitEnableWrite/JitEnableExecute in FaultHandler
  • Disable the immediate munmap of MemoryBase which, while it works on Linux, seems to cause problems on macOS. Additionally this should fix FreeBSD as it seems to behave the same as macOS here.

nadiaholmquist avatar Jul 24 '23 09:07 nadiaholmquist

https://github.com/melonDS-emu/melonDS/blob/master/src/ARMJIT_Memory.cpp#L338

This needs to be replaced by mmaping anonymous memory in place again. Otherwise once memory is remapped (e.g. DTCM) the fastmem area will get holely.

RSDuck avatar Jul 24 '23 11:07 RSDuck

iirc there was also a hack to keep fastmem by default disabled in config.

RayyanAnsari avatar Jul 24 '23 13:07 RayyanAnsari

iirc there was also a hack to keep fastmem by default disabled in config.

Just looked, all it does is disable it by default but doesn't keep it off if you turned it on. Should probably still be removed in this PR though.

nadiaholmquist avatar Jul 24 '23 15:07 nadiaholmquist