FIX Stack & IOPorts

This commit is contained in:
2024-05-02 00:29:33 +02:00
parent 3c406378b2
commit f932a141ce
3 changed files with 13 additions and 15 deletions

View File

@ -78,7 +78,7 @@ public class DataRegister {
public static void setRegister(int fileAddress, int content){
int address = determineIndirectAndChange (fileAddress);
if (Arrays.stream(ioRegisters).anyMatch(i -> i == address)){
IOPorts.setRegister(address, content);
IOPorts.setRegister(bank() + address, content);
return;
}
if (fileAddress == PCL || fileAddress == 0x80 + PCL){
@ -104,7 +104,7 @@ public class DataRegister {
public static void clearBit(int fileAddress, int bit) {
int address = determineIndirectAndChange (fileAddress);
if (Arrays.stream(ioRegisters).anyMatch(i -> i == address)){
IOPorts.clearBit(address, bit);
IOPorts.clearBit(bank() + address, bit);
return;
}
if (!isSyncedRegister(address)) {
@ -123,7 +123,7 @@ public class DataRegister {
public static void setBit(int fileAddress, int bit) {
int address = determineIndirectAndChange (fileAddress);
if (Arrays.stream(ioRegisters).anyMatch(i -> i == address)){
IOPorts.setBit(address, bit);
IOPorts.setBit(bank() + address, bit);
return;
}
if (!isSyncedRegister(address)) {