X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fslipway%2Fdemos%2FDemo4.java;h=5f9bfa075d0a134b0e7f314ab404b9075a9a1c6b;hb=f17df62ee603a39a5ff8d499dfaf0a6d8fe19353;hp=d3a06b0a072eab7fe5a0c54fb379d5764b813911;hpb=a639737cdb1c89b00c2fd2ee21ed9e0308afbf0f;p=slipway.git diff --git a/src/edu/berkeley/slipway/demos/Demo4.java b/src/edu/berkeley/slipway/demos/Demo4.java index d3a06b0..5f9bfa0 100644 --- a/src/edu/berkeley/slipway/demos/Demo4.java +++ b/src/edu/berkeley/slipway/demos/Demo4.java @@ -188,55 +188,7 @@ public class Demo4 implements KeyListener { } public static void scan(FpslicDevice dev, FpslicDevice.Cell cell, int source, boolean setup) { - if (setup) { - //if (source != NONE) cell.c(source); - if (cell.b()) cell.b(false); - if (cell.f()) cell.f(false); - } - if (cell.out(L3)!=setup) cell.out(L3, setup); - if (cell.vx(L3)!=setup) cell.v(L3, setup); - - FpslicDevice.SectorWire sw = cell.vwire(L3); - //System.out.println("wire is: " + sw); - - if (sw.row > (12 & ~0x3) && sw.north()!=null && sw.north().drives(sw)) - sw.north().drives(sw, false); - while(sw.row > (12 & ~0x3) && sw.south() != null) { - //System.out.println(sw + " -> " + sw.south()); - if (sw.drives(sw.south())!=setup) sw.drives(sw.south(), setup); - sw = sw.south(); - } - if (sw.row < (12 & ~0x3) && sw.south() != null && sw.south().drives(sw)) - sw.north().drives(sw, false); - while(sw.row < (12 & ~0x3) && sw.north() != null) { - //System.out.println(sw + " -> " + sw.north()); - if (sw.drives(sw.north())!=setup) sw.drives(sw.north(), setup); - sw = sw.north(); - } - - //cell = dev.cell(19, 15); - cell = dev.cell(cell.col, 15); - /* - System.out.println("cell is " + cell); - cell.xlut(0xff); - cell.ylut(0xff); - cell.b(false); - cell.f(false); - cell.c(XLUT); - cell.out(L3, true); - cell.oe(NONE); - */ - if (cell.hx(L3) != setup) cell.h(L3, setup); - if (cell.vx(L3) != setup) cell.v(L3, setup); - sw = cell.hwire(L3); - - if (sw.west()!=null && sw.west().drives(sw)) { sw.west().drives(sw, false); } - while(sw.east() != null) { - //System.out.println(sw + " -> " + sw.east()); - if (sw.drives(sw.east())!=setup) sw.drives(sw.east(), setup); - sw = sw.east(); - } - + ExperimentUtils.scan(cell, source, setup); }