Add LogConsumer (?)

main
Astoria 7 months ago
parent f51f74b2fc
commit 0222dd2dca

@ -21,6 +21,7 @@ public class Emulator {
public Emulator(RedBus bus){
this.bus = bus;
cpu = new Cpu();
cpu.setLogCallback(new LogConsumer());
cpu.setBus(new Bus(bus));
ram = new Memory(0x0000, 0x2000 - 1, ((CpuAccessor)cpu).getRedBusState());
try {

@ -0,0 +1,12 @@
package net.brokenmoon.redcontrol.api;
import net.brokenmoon.redcontrol.RedControl;
import java.util.function.IntConsumer;
public class LogConsumer implements IntConsumer {
@Override
public void accept(int value) {
RedControl.LOGGER.info("Cpu MMU Logger: " + value);
}
}
Loading…
Cancel
Save