melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
2.99k stars 497 forks source link

CP15 Cache Emulation Work #1955

Open DesperateProgrammer opened 5 months ago

DesperateProgrammer commented 5 months ago

The instruction and data cache register were not yet implemented in MelonDS and would act different against the hardware by just reading/writing them.

They have no impact on the - not yet implemented - data cache nor on the instruction cache until their implementation progresses.

DesperateProgrammer commented 5 months ago

I'll add some more changes to the CP15 Caching Instructions and Handling here.

DesperateProgrammer commented 5 months ago

The last commit was a bit bigger / combined, as adding DCache required other things to not break some applications.

Instruction cache is working except:

CP15 Registers Operations:

DesperateProgrammer commented 5 months ago

Update on the status

Instruction cache is working except:

Data cache is working except:

CP15 Registers Operations:

JIT:

DesperateProgrammer commented 5 months ago

This turned out to be quite some rework for the CP15. The Cache is now working including the write-back mode. Cache Debug registers, BIST Cache Test register CP15 Registers and Functions received some documenting comments. Many CP15 related calls received the const-specifier for its arguments when they are not changed in the call.

KostaSaizo7 commented 3 months ago

Fixes https://github.com/melonDS-emu/melonDS/issues/380

KostaSaizo7 commented 3 months ago

Unfortunately https://github.com/melonDS-emu/melonDS/issues/359 is still occuring

Jaklyy commented 2 months ago

seems like disabling the pu via the control reg causes melonds to hang under this pr? at least reproduceable under this test rom: zboxtesttest.zip

DesperateProgrammer commented 2 months ago

Thanks for the report and sample Jakly,

I'll check that as soon i got some time.