Posted By
![](/images/g.gif) Csabo on 2024-06-03 08:31:18
| Re: raster IRQs returning dynamically to RAM or RAM under ROM
OK, so reading from $FF3E/$FF3F does seem reliable, but, if you want to be absolutely sure, you could simply use a separate external variable to keep track of the state.
E.g. let's say zero page $FB. When switching to RAM: LDA #$00 / STA $FB / STA $FF3E. When switching to ROM: LDA #$FF / STA $FB / STA $FF3F. Then you can confidently read from $FB, BEQ for RAM, BNE for ROM.
I would say give this a shot - but TBH my suspicion is that if your code crashes somewhere, it's NOT because of this.
|