Quite possibly a bug in my code, but are there any gotchas when selecting a SWR bank?
My code correctly detects the presence of 4 SWR banks (slots 4,5,6,7) on a Master 128 by cycling through 16 values, selecting bank by poking the bank number to &FE30, then checking if address &8000 is writable or not.
However the same bank selection code, when used later on in my program, doesn't seem to correctly select a SWR bank.
Code: Select all
; A contains ROM bank to be selected
.swr_select_bank
{
sta &fe30
sta &f4
rts
}
I've tried wrapping the call to swr_select_bank with SEI/CLI for belts and braces but that made no difference.
I'm running pure machine code rather than BASIC.
I also havent disabled any system interrupts as I didn't think that would be needed.
I'm trying to load data into the SWR banks using OSFILE, so not sure if thats a problem too - it occurred to me that perhaps the DFS is getting paged in and messing things up.
Is there some other voodoo to this? I've forgotten a lot since the old days!
TIA!