|
|
@ -27,10 +27,13 @@ public class CpuEntity extends Peripheral{
|
|
|
|
|
|
|
|
|
|
|
|
public static void tick(World world, BlockPos pos, BlockState state, CpuEntity be) {
|
|
|
|
public static void tick(World world, BlockPos pos, BlockState state, CpuEntity be) {
|
|
|
|
if(be.notTicked) {
|
|
|
|
if(be.notTicked) {
|
|
|
|
|
|
|
|
System.out.println("Ticking pre reset, PC at " + be.core.cpu.getCpuState().pc);
|
|
|
|
be.reset();
|
|
|
|
be.reset();
|
|
|
|
|
|
|
|
System.out.println("Ticking post reset, PC at " + be.core.cpu.getCpuState().pc);
|
|
|
|
be.notTicked = false;
|
|
|
|
be.notTicked = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for(int i = 0; i < 500; i++)
|
|
|
|
for(int i = 0; i < 500; i++)
|
|
|
|
|
|
|
|
System.out.println("Stepping, PC at " + be.core.cpu.getCpuState().pc);
|
|
|
|
be.step();
|
|
|
|
be.step();
|
|
|
|
if(be.core.isWaitingOnInterrupt()){
|
|
|
|
if(be.core.isWaitingOnInterrupt()){
|
|
|
|
be.core.setWaitingOnInterrupt();
|
|
|
|
be.core.setWaitingOnInterrupt();
|
|
|
|