+/**
+ * Slipway board (Fpslic via FTDI USB-UART, running <tt>SlipwaySlave.c</tt>)
+ */
+public class FakeBoard extends FpslicDevice implements Board {
+
+ private byte[][][] cache;
+ public FakeBoard(int width, int height) {
+ super(width, height);
+ cache = new byte[256][][];
+ for(int i=0; i < cache.length; i++) {
+ cache[i] = new byte[256][];
+ for(int j=0; j < cache.length; j++) {
+ cache[i][j] = new byte[256];
+ }
+ }
+ }
+
+ public void flush() { }
+ public void mode4(int z, int y, int x, int d) {
+ cache[z][y][x] = (byte)d;
+ }
+ public byte mode4(int z, int y, int x) {
+ return cache[z][y][x];
+ }
+
+ public void reset() throws IOException { }
+
+ public OutputStream getConfigStream() throws IOException {
+ return new OutputStream() {
+ public void flush() { }
+ public void write(int b) { }
+ public void write(byte[] b, int x, int y) { }
+ };