1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-11 05:29:33 +00:00

We need to return from aux, or write to aux, immediately

If we wait until later in the function, we may get caught up in the
check for ROM.
This commit is contained in:
Peter Evans 2018-03-26 20:51:10 -05:00
parent 92ac77e8f5
commit d9be1d6ab2

View File

@ -59,7 +59,7 @@ SEGMENT_READER(apple2_bank_read)
// to use main. Whatever the segment was that was passed in will
// turn out to be immaterial.
if ((mach->bank_switch & BANK_ALTZP) && addr < 0x200) {
segment = mach->aux;
return mach->aux->memory[addr];
}
if (~mach->bank_switch & BANK_RAM) {
@ -100,7 +100,8 @@ SEGMENT_WRITER(apple2_bank_write)
// See my spiel in the read bank mapper; the same applies here.
if ((mach->bank_switch & BANK_ALTZP) && addr < 0x200) {
segment = mach->aux;
mach->aux->memory[addr] = value;
return;
}
// You will note, if we've gotten here, that it's possible to write