okay I think this will work (I hope I dont break EVERYTHING)
@ -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);
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package net.brokenmoon.redcontrol.api;
|
||||
|
||||
import com.simon816.j65el02.Bus;
|
||||
import com.simon816.j65el02.device.Device;
|
||||
import com.simon816.j65el02.device.RedBus;
|
||||
import com.simon816.j65el02.device.RedBusState;
|
||||
import net.brokenmoon.redcontrol.RedControl;
|
||||
|
||||
public class TempBus extends Bus {
|
||||
public TempBus(RedBus redBus) {
|
||||
super(redBus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(int address, int data, RedBusState state) {
|
||||
Device device = findDevice(address,state);
|
||||
//RedControl.LOGGER.info("Writing to bus with device " + device + "at address " + (address - device.startAddress(state)) + " with data " + data + " with target " + state.activeDeviceId + " and redbus offset of " + state.offset);
|
||||
device.write(address - device.startAddress(state) % 0x2000, data, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(int address, boolean cpuAccess, RedBusState state) {
|
||||
Device device = findDevice(address,state);
|
||||
//RedControl.LOGGER.info("Reading from bus with device " + device + "at address " + (address - device.startAddress(state)) + " with target " + state.activeDeviceId + " and redbus offset of " + state.offset);
|
||||
return device.read(address - device.startAddress(state) % 0x2000, cpuAccess, state) & 0xff;
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package net.brokenmoon.redcontrol.api;
|
||||
|
||||
import com.simon816.j65el02.device.RedBus;
|
||||
import com.simon816.j65el02.device.RedBusState;
|
||||
import net.brokenmoon.redcontrol.RedControl;
|
||||
|
||||
public class TempRedBus extends RedBus {
|
||||
|
||||
@Override
|
||||
public void write(int address, int data, RedBusState state) {
|
||||
RedControl.LOGGER.info("Writing at " + address);
|
||||
if (!state.enabled) {
|
||||
return;
|
||||
}
|
||||
Peripheral peripheral = this.peripherals[state.activeDeviceId];
|
||||
if (peripheral != null) {
|
||||
peripheral.write(address, data & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(int address, boolean cpuAccess, RedBusState state) {
|
||||
RedControl.LOGGER.info("Reading at " + address);
|
||||
if (!state.enabled) {
|
||||
return 0;
|
||||
}
|
||||
Peripheral peripheral = this.peripherals[state.activeDeviceId];
|
||||
if (peripheral != null) {
|
||||
return peripheral.read(address);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=north": { "model": "redcontrol:block/cpu", "uvlock": false },
|
||||
"facing=east": { "model": "redcontrol:block/cpu", "y": 90, "uvlock": false },
|
||||
"facing=south": { "model": "redcontrol:block/cpu", "y": 180, "uvlock": false },
|
||||
"facing=west": { "model": "redcontrol:block/cpu", "y": 270, "uvlock": false }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=north": { "model": "redcontrol:block/disk_drive", "uvlock": false },
|
||||
"facing=east": { "model": "redcontrol:block/disk_drive", "y": 90, "uvlock": false },
|
||||
"facing=south": { "model": "redcontrol:block/disk_drive", "y": 180, "uvlock": false },
|
||||
"facing=west": { "model": "redcontrol:block/disk_drive", "y": 270, "uvlock": false }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=north": { "model": "redcontrol:block/monitor", "uvlock": false },
|
||||
"facing=east": { "model": "redcontrol:block/monitor", "y": 90, "uvlock": false },
|
||||
"facing=south": { "model": "redcontrol:block/monitor", "y": 180, "uvlock": false },
|
||||
"facing=west": { "model": "redcontrol:block/monitor", "y": 270, "uvlock": false }
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
{ "parent": "block/block",
|
||||
"textures": {
|
||||
"front": "redcontrol:block/cpu",
|
||||
"left": "redcontrol:block/monitor_left",
|
||||
"right": "redcontrol:block/monitor_right",
|
||||
"back": "redcontrol:block/monitor_back",
|
||||
"top": "redcontrol:block/monitor_bottom",
|
||||
"bottom": "redcontrol:block/monitor_top"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0, 0 ],
|
||||
"to": [ 16, 16, 16 ],
|
||||
"faces": {
|
||||
"down": { "texture": "#bottom", "cullface": "down" },
|
||||
"up": { "texture": "#top", "cullface": "up" },
|
||||
"north": { "texture": "#front", "cullface": "north" },
|
||||
"south": { "texture": "#back", "cullface": "south" },
|
||||
"west": { "texture": "#right", "cullface": "west" },
|
||||
"east": { "texture": "#left", "cullface": "east" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
{ "parent": "block/block",
|
||||
"textures": {
|
||||
"front": "redcontrol:block/disk_drive",
|
||||
"left": "redcontrol:block/monitor_left",
|
||||
"right": "redcontrol:block/monitor_right",
|
||||
"back": "redcontrol:block/monitor_back",
|
||||
"top": "redcontrol:block/monitor_bottom",
|
||||
"bottom": "redcontrol:block/monitor_top"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0, 0 ],
|
||||
"to": [ 16, 16, 16 ],
|
||||
"faces": {
|
||||
"down": { "texture": "#bottom", "cullface": "down" },
|
||||
"up": { "texture": "#top", "cullface": "up" },
|
||||
"north": { "texture": "#front", "cullface": "north" },
|
||||
"south": { "texture": "#back", "cullface": "south" },
|
||||
"west": { "texture": "#right", "cullface": "west" },
|
||||
"east": { "texture": "#left", "cullface": "east" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
{ "parent": "block/block",
|
||||
"textures": {
|
||||
"front": "redcontrol:block/monitor_front",
|
||||
"left": "redcontrol:block/monitor_left",
|
||||
"right": "redcontrol:block/monitor_right",
|
||||
"back": "redcontrol:block/monitor_back",
|
||||
"top": "redcontrol:block/monitor_bottom",
|
||||
"bottom": "redcontrol:block/monitor_top"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0, 0 ],
|
||||
"to": [ 16, 16, 16 ],
|
||||
"faces": {
|
||||
"down": { "texture": "#bottom", "cullface": "down" },
|
||||
"up": { "texture": "#top", "cullface": "up" },
|
||||
"north": { "texture": "#front", "cullface": "north" },
|
||||
"south": { "texture": "#back", "cullface": "south" },
|
||||
"west": { "texture": "#right", "cullface": "west" },
|
||||
"east": { "texture": "#left", "cullface": "east" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "redcontrol:block/cpu"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "redcontrol:block/disk_drive"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "redcontrol:block/monitor"
|
||||
}
|
After Width: | Height: | Size: 231 B |
After Width: | Height: | Size: 226 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 297 B |
After Width: | Height: | Size: 109 B |
After Width: | Height: | Size: 276 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 267 B |
After Width: | Height: | Size: 105 B |