Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 3098

8-bit acorn hardware • Re: PiTubeDirect Lock Up

$
0
0
I think this is because I don't fully support bankswitching if it contains code as I don't think I flush the JITed code.
If I disable the bank switching on the JIT core, the game works correctly, which is re-assuring.

Looking at the code, it seems we don't actually reset the bank mapping table to their default values on reset. In this case, they are all getting set to &FF, so all point to the same page. I suspect this is the main reason things don't recover properly on reset.

Interestingly, I can actually provoke the same hang on core 0 with the following code:

Code:

 10 P%=&300 20[ 30 .remap 40 LDA #&FF 50 STA &FEE7 60 STA &FEE6 70 STA &FEE5 80 STA &FEE4 90 STA &FEE3100 STA &FEE2110 STA &FEE1120 STA &FEE0130 RTS \\ never reached!140]150 CALL remap
So it may be nothing to do with the JIT side of things.

So why doesn't the game also induce such a hang in Core 0? I think it's because it uses the indirect addressing mode, and only the absolute addressing mode is supported for writing to hardware registers. I don't think the JIT core has the same restriction.

I think we should probably restore the default mappings on every reset.

Dave

Statistics: Posted by hoglet — Thu Dec 12, 2024 12:04 pm



Viewing all articles
Browse latest Browse all 3098

Trending Articles