Keep a reference to the ROM memory image after load

This commit is contained in:
Seth Morabito committed 2012-11-25 23:08:09 -08:00
1 parent 2ebdd254b3
commit a7d9239ef1
1 file changed
+2 -1
@@ -328,7 +328,8 @@ public class Simulator implements ActionListener, Observer {
bus.removeDevice(rom);
}
// Load the new ROM image
bus.addDevice(Memory.makeROM(ROM_BASE, ROM_SIZE, romFile));
rom = Memory.makeROM(ROM_BASE, ROM_SIZE, romFile);
bus.addDevice(rom);
logger.log(Level.INFO, "ROM File `" + romFile.getName() + "' loaded at " +
String.format("0x%04X", ROM_BASE));