libretro / pcsx_rearmed

ARM optimized PCSX fork
GNU General Public License v2.0
166 stars 118 forks source link

Update Lightrec 20240513 #829

Closed pcercuei closed 4 months ago

pcercuei commented 4 months ago

In order to simplify the code (as it was getting out of hand), Lightrec now requires all the mapped PSX memories to have the same offset relative to their physical address in the PSX address space.

So I also updated the map addresses in psxMem.c. However this relies on psxMap succeeding to map to the requested addresses, I don't know if there are platforms where those fail?

One optimization has been disactivated temporarily as it is known to trigger a bug on at least one game.

A few other improvements to the register allocation and code generation, and a fix for CPU count detection.

notaz commented 4 months ago

However this relies on psxMap succeeding to map to the requested addresses, I don't know if there are platforms where those fail?

There definitely are, for example 3DS and I think Vita don't allow to choose an address at all (they use Ari64 though so it would be ok). However I think I saw some 64bit Android device that reserves the whole lower 32bit space, also 32bit Android usually has it's address space so full of things that you effectively can't choose an address too. I would also expect problems on Apple, is it really ok on Nintendo platforms?

Also your change butchers Ari64's optimizations where it wants the addresses to match PSX as much as possible.

pcercuei commented 4 months ago

Ok... I'll see if I can undo the change then...