mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-12-13 14:49:03 +00:00
Added Battery Hardware. #2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user