Why is this not working please game
parent
273add3a38
commit
5b4b61d96b
@ -1 +1 @@
|
||||
Subproject commit c6de658396d537fd0c1fc0046d5222c2dc44de3d
|
||||
Subproject commit e82ee867d35793695a3d5013f654c1732c06b74c
|
@ -0,0 +1,9 @@
|
||||
package net.brokenmoon.redcontrol.api;
|
||||
|
||||
import com.simon816.j65el02.device.RedBus;
|
||||
|
||||
public class FakeBus extends RCBus{
|
||||
public FakeBus(RedBus redBus) {
|
||||
super(redBus);
|
||||
}
|
||||
}
|
@ -1,18 +1,37 @@
|
||||
package net.brokenmoon.redcontrol.api;
|
||||
|
||||
import com.simon816.j65el02.Bus;
|
||||
import com.simon816.j65el02.Cpu;
|
||||
import com.simon816.j65el02.CpuState;
|
||||
import net.brokenmoon.redcontrol.blockentities.CpuEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class RCCpu extends Cpu {
|
||||
|
||||
private final World world;
|
||||
private final BlockPos pos;
|
||||
private CpuEntity cpuEntity;
|
||||
|
||||
public RCCpu(World world, BlockPos pos) {
|
||||
this.world = world;
|
||||
this.pos = pos;
|
||||
public RCCpu(CpuEntity cpuEntity) {
|
||||
this.cpuEntity = cpuEntity;
|
||||
}
|
||||
|
||||
public void setInterrupt(boolean val){
|
||||
state.intWait = val;
|
||||
}
|
||||
|
||||
@Override
|
||||
private int readByte(int address) {
|
||||
return this.cpuEntity.getBus().read(address, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
private void writeMemory(int address, int value, boolean x) {
|
||||
this.getBus().write(address, value);
|
||||
boolean flag = x ? this.state.indexWidthFlag : this.state.mWidthFlag;
|
||||
if (!this.state.emulationFlag && !flag) {
|
||||
this.cpuEntity.getBus().write(address + 1, value >>> 8);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
}
|
||||
|
Loading…
Reference in New Issue