As I was converting different VDP2 modes to the new cache, I came across testing the game 3 Dirty Dwarves. This game got a strange problem since version 0.32, as main player characters weren’t being diplayed on screen : you could move around, see bullets fired, or punch the villains, but that was it. You could only guess your position by the scrolling moves.
At first I thought it was related to the DSP, as some games use it to do some sprite calculations, but after a quick check that wasn’t the case.
Some more tracing lead me to some unmapped memory access (which wasn’t logged for some reason), and reading through the SH2 hardware manual gave me the aswers I was looking for : the SH2 has an internal cache (4KB of data, and 1KB of addresses), which can be configured to be used as a 4 ways cache (all the data cache is used as instructions / data cache), a 2 ways cache (the first half is used as a high speed RAM, and the other one as regular cache), or completely disabled (4KB used as high speed RAM).
After adding this 4KB area to the memory map of the emulator, bingo ! The sprites are displayed 😀
Check the screenshots from current dev version :
I’ll try to add later some code to mimic the cache behaviour …
Good Work)) Russia with you)
Poland with you too : )