1
0
mirror of https://github.com/sethm/symon.git synced 2024-06-15 08:29:27 +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:
Maik Merten 2014-08-23 16:50:34 +02:00
parent 4796b65390
commit 72ba068beb

View File

@ -170,7 +170,7 @@ public class Bus {
if(d != null) {
MemoryRange range = d.getMemoryRange();
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));