mirror of
https://github.com/sethm/symon.git
synced 2025-02-06 14:30:06 +00:00
mask all bits beyond bits 0 to 7 on bus reads to ensure no surplus bits cause unpredictable system behavior.
This commit is contained in:
parent
4796b65390
commit
72ba068beb
@ -170,7 +170,7 @@ public class Bus {
|
|||||||
if(d != null) {
|
if(d != null) {
|
||||||
MemoryRange range = d.getMemoryRange();
|
MemoryRange range = d.getMemoryRange();
|
||||||
int devAddr = address - range.startAddress();
|
int devAddr = address - range.startAddress();
|
||||||
return d.read(devAddr);
|
return d.read(devAddr) & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new MemoryAccessException("Bus read failed. No device at address " + String.format("$%04X", address));
|
throw new MemoryAccessException("Bus read failed. No device at address " + String.format("$%04X", address));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user