Added Battery Hardware. #2

This commit is contained in:
simon
2017-11-12 10:27:07 -05:00
parent f7ea14275c
commit a3fa3c4c09
21 changed files with 224 additions and 99 deletions

View File

@@ -19,7 +19,12 @@ public class CpuInitialisationListener implements GameEventListener {
CPU cpu = (CPU) event.getSource();
cpu.attachHardware(new RandomNumberGenerator(), RandomNumberGenerator.DEFAULT_ADDRESS);
cpu.attachHardware(new Clock(), Clock.DEFAULT_ADDRESS);
RandomNumberGenerator rngHW = new RandomNumberGenerator();
rngHW.setCpu(cpu);
Clock clock = new Clock();
clock.setCpu(cpu);
cpu.attachHardware(rngHW, RandomNumberGenerator.DEFAULT_ADDRESS);
cpu.attachHardware(clock, Clock.DEFAULT_ADDRESS);
}
}