Merge pull request #12 from maikmerten/master
mask all bits beyond bits 0 to 7 on bus reads to ensure no surplus bits ...
This commit is contained in:
commit
ae5c5d48b2
1 file changed
+1
-1
@@ -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));
|
||||||
|
|||||||
Reference in new issue
Block a user