Issue #16: Memory window should not reset device registers
This commit is contained in:
1 parent
9cdd718e8d
commit
96819f1bf7
26 files changed
+355
-318
No files matched your search
@@ -168,12 +168,12 @@ public class Bus {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int read(int address) throws MemoryAccessException {
|
||||
public int read(int address, boolean cpuAccess) throws MemoryAccessException {
|
||||
Device d = deviceAddressArray[address - this.startAddress];
|
||||
if (d != null) {
|
||||
MemoryRange range = d.getMemoryRange();
|
||||
int devAddr = address - range.startAddress();
|
||||
return d.read(devAddr) & 0xff;
|
||||
return d.read(devAddr, cpuAccess) & 0xff;
|
||||
}
|
||||
|
||||
throw new MemoryAccessException("Bus read failed. No device at address " + String.format("$%04X", address));
|
||||
|
||||
Reference in new issue
Block a user