enforce that the address range of devices falls within the address range of the bus. Turned out that the CPU tests instantiate memory with the last parameter as memory size, not end address (fixed now). Also make sure that the address lookup array takes the offset caused by non-zero starting addresses into account.

This commit is contained in:
Maik Merten committed 2014-07-25 21:24:16 +02:00
1 parent d7f8045b61
commit 52f4e9a00f
16 files changed
+30 -22

No files matched your search

@@ -14,7 +14,7 @@ public class CpuRelativeModeTest extends TestCase {
protected void setUp() throws Exception {
this.cpu = new Cpu();
this.bus = new Bus(0x0000, 0xffff);
this.mem = new Memory(0x0000, 0x10000);
this.mem = new Memory(0x0000, 0xffff);
bus.addCpu(cpu);
bus.addDevice(mem);