X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fobits%2Fdevice%2Fatmel%2FAt40k.java;h=b0a6d3c44a0a40708b46f7bb45c2dda2a5787316;hb=f1c69310f6d8022607efcd9c60f104afc5e89aae;hp=50b088226ff716c3f3bfffc5a9e1a6c9bfc7e379;hpb=22afcc1de75c02f1d41f2283aa07550e7b5d82d3;p=slipway.git diff --git a/src/edu/berkeley/obits/device/atmel/At40k.java b/src/edu/berkeley/obits/device/atmel/At40k.java index 50b0882..b0a6d3c 100644 --- a/src/edu/berkeley/obits/device/atmel/At40k.java +++ b/src/edu/berkeley/obits/device/atmel/At40k.java @@ -86,12 +86,8 @@ public class At40k { if (w.plane!=plane) throw new Error(); if (Math.abs(w.coarse()-coarse())!=4) throw new Error(w.coarse() + " -- " + coarse()); boolean topleft = horizontal ? (w.coarse() < coarse()) : (w.coarse() > coarse()); - //if (w.coarse() < coarse()) return w.switchbox(this); - //if (topleft) return w.switchbox(this); int col = _col() + (( horizontal && !topleft) ? 1 : 0); - //if (!horizontal) topleft = !topleft; int row = _row() + ((!horizontal && topleft) ? 1 : 0); - //if (!horizontal) topleft = !topleft; return (code(topleft) << 24) | (row<<16) | (col<<8); } throw new Error("not implemented"); @@ -156,8 +152,8 @@ public class At40k { /* bit positions mean: [MSB] zxy z_y zx_ z__ _xy __y _x_ ___ [LSB] */ public void xlut(int table) { dev.mode4(7, row, col, (byte)(table & 0xff)); } public byte xlut() { return (byte)(dev.mode4(7, row, col) & 0xff); } - public String printXLut() { return printLut(xlut(), "y", "x", "t"); } - public String printXLutX() { return printLut(xlut(), str(yi(), "y"), str(xi(), "x"), str(ti(), "t")); } + public String printXLut() { return printLut(xlut(), "x", "y", "t"); } + public String printXLutX() { return printLut(xlut(), str(xi(), "x"), str(yi(), "y"), str(ti(), "t")); } public String str(int x, String def) { switch(x) { @@ -183,7 +179,7 @@ public class At40k { public void ylut(int table) { dev.mode4(6, row, col, (byte)(table & 0xff)); } public byte ylut() { return (byte)(dev.mode4(6, row, col) & 0xff); } public String printYLut() { return printLut(ylut(), "y", "x", "t"); } - public String printYLutX() { return printLut(ylut(), str(yi(), "y"), str(xi(), "x"), str(ti(), "t")); } + public String printYLutX() { return printLut(ylut(), str(yi(), "y"), str(xi(), "x"), str(ti(), "t")) + Integer.toString(ylut() & 0xff, 16); } public void ff_reset_value(boolean value) { //dev.mode4( /* FIXME WRONG!!! */, row, col, 3, !value); return;