X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ships%2FDvi.ship;h=b3c37f40c23ae83bf44cf0133a59d63a11ed002b;hb=aee85d3dd0435554e14e03b97f268752843a441f;hp=2c925a230070d63ef28a87b0c26d07a93680892e;hpb=ba3a0401352045ddbd85451322767694292e456a;p=fleet.git diff --git a/ships/Dvi.ship b/ships/Dvi.ship index 2c925a2..b3c37f4 100644 --- a/ships/Dvi.ship +++ b/ships/Dvi.ship @@ -31,11 +31,6 @@ percolate up: dvi_xclk_p 1 percolate up: dvi_de 1 percolate up: dvi_reset_b 1 -percolate up: gpio_led_c 1 -percolate up: gpio_led_e 1 -percolate up: gpio_led_n 1 -percolate up: gpio_led_s 1 -percolate up: gpio_led_w 1 percolate up: gpio_led_4 1 percolate up: gpio_led_5 1 @@ -459,12 +454,6 @@ NET dvi_gpio1 LOC="N30" | IOSTANDARD="LVCMOS18"; # Bank 15, Vcco=1 NET dvi_iic_scl LOC="U27" | PULLUP | IOSTANDARD="LVCMOS18"; # Bank 15, Vcco=1.8V, DCI using 49.9 ohm resistors NET dvi_iic_sda LOC="T29" | PULLUP | IOSTANDARD="LVCMOS18"; # Bank 15, Vcco=1.8V, DCI using 49.9 ohm resistors -NET gpio_led_c LOC="E8"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm resistors -NET gpio_led_e LOC="AG23"; # Bank 2, Vcco=3.3V -NET gpio_led_n LOC="AF13"; # Bank 2, Vcco=3.3V -NET gpio_led_s LOC="AG12"; # Bank 2, Vcco=3.3V -NET gpio_led_w LOC="AF23"; # Bank 2, Vcco=3.3V - NET gpio_led_0 LOC="H18"; # Bank 3, Vcco=2.5V, No DCI NET gpio_led_1 LOC="L18"; # Bank 3, Vcco=2.5V, No DCI NET gpio_led_2 LOC="G15"; # Bank 3, Vcco=2.5V, No DCI @@ -551,14 +540,76 @@ NET sram_oe_b LOC="B12"; # Bank 20, Vcco=3.3V, DCI using 49.9 ohm == TeX ============================================================== == Fleeterpreter ==================================================== - - public void service() { } +private java.awt.Frame frame = null; +private java.awt.Panel panel = null; +private long[][] bits; +public static int SCREEN_WIDTH = 577; +public static int SCREEN_HEIGHT = 478; +public void service() { + long x,y,d; + if (box_inPixelX.dataReadyForShip() && + box_inPixelY.dataReadyForShip() && + box_inPixelValue.dataReadyForShip()) { + x = box_inPixelX.removeDataForShip(); + y = box_inPixelY.removeDataForShip(); + d = box_inPixelValue.removeDataForShip(); + } else if (box_inAddrWrite.dataReadyForShip() && + box_inDataWrite.dataReadyForShip() && + box_out.readyForDataFromShip()) { + long addr = box_inAddrWrite.removeDataForShip(); + x = addr % SCREEN_WIDTH; + y = addr / SCREEN_WIDTH; + d = box_inDataWrite.removeDataForShip(); + box_out.addDataFromShip(0,true); + } else if (box_inAddrRead.dataReadyForShip() && + box_out.readyForDataFromShip()) { + long addr = box_inAddrRead.removeDataForShip(); + x = addr % SCREEN_WIDTH; + y = addr / SCREEN_WIDTH; + box_out.addDataFromShip(bits[(int)x][(int)y],false); + return; + } else { + return; + } + if (frame==null) { + frame = new java.awt.Frame(); + bits = new long[SCREEN_WIDTH][SCREEN_HEIGHT]; + for(int i=0; i> 12) & ~((-1L) << 6)) << 2), + (int)(((d >> 6) & ~((-1L) << 6)) << 2), + (int)(((d >> 0) & ~((-1L) << 6)) << 2) + ); + g2.setColor(c); + g2.fillRect((int)xx,(int)yy,1,1); + } + } + } + }; + frame.setLayout(new java.awt.BorderLayout()); + frame.add(panel, java.awt.BorderLayout.CENTER); + panel.setBackground(java.awt.Color.black); + frame.show(); + } + bits[(int)x][(int)y] = d; + panel.repaint(); +} == FleetSim ============================================================== == Constants ========================================================= == Test ============================================================== +#skip #expect 0 #expect 0