diff --git a/src/libsrc/dgr.pla b/src/libsrc/dgr.pla index 7f4ebd4..547ea7c 100755 --- a/src/libsrc/dgr.pla +++ b/src/libsrc/dgr.pla @@ -1,5 +1,5 @@ import cmdsys - predef memset, memcpy, heapmark, heapalloc, heaprelease, call + predef puts, memset, memcpy, heapmark, heapalloc, heaprelease, call byte MACHID // // System flags: memory allocator screen holes. @@ -44,7 +44,7 @@ word = $0450,$04D0,$0550,$05D0,$0650,$06D0,$0750,$07D0 word[] dgr2rows = $0800,$0880,$0900,$0980,$0A00,$0A80,$0B00,$0B80 word = $0828,$08A8,$0928,$09A8,$0A28,$0AA8,$0B28,$0BA8 word = $0850,$08D0,$0950,$09D0,$0A50,$0AD0,$0B50,$0BD0 -word[] dgrbuff = @dgr1rows, @dgr2rows +export word[] dgrbuff = @dgr1rows, @dgr2rows // // Color mapping. // @@ -53,20 +53,6 @@ byte[] = $44,$CC,$55,$DD,$66,$EE,$77,$FF byte[] oddclr = $00,$11,$22,$33,$44,$00,$66,$77 byte[] = $88,$99,$AA,$BB,$CC,$DD,$EE,$FF -byte[] sprite1 = $0,$0,$5,$5,$5,$5,$0,$0 -byte[] = $0,$5,$A,$A,$A,$A,$5,$0 -byte[] = $5,$A,$F,$F,$F,$F,$A,$5 -byte[] = $5,$A,$F,$0,$0,$F,$A,$5 -byte[] = $5,$A,$F,$0,$0,$F,$A,$5 -byte[] = $5,$A,$F,$F,$F,$F,$A,$5 -byte[] = $0,$5,$A,$A,$A,$A,$5,$0 -byte[] = $0,$0,$5,$5,$5,$5,$0,$0 - -byte[] tile1 = $88,$11,$88,$11,$88,$11,$AA,$00 -byte[] = $88,$11,$88,$11,$88,$11,$AA,$00 -byte[] = $88,$11,$88,$11,$88,$11,$AA,$00 -byte[] = $0A,$05,$0A,$05,$0A,$05,$0A,$00 - asm dgrInc(buff) !SOURCE "vmsrc/plvmzp.inc" GBASL = $26 @@ -668,48 +654,16 @@ export def dgrClear(buff, clr) return dgrFill(buff, 0, 0, @clrtile) end // -// Test routine +// Make sure we are a 128K //e or //c // -def dgrTest - byte b, l, k - word i, j, ii, ij - - b = dgrMode - for k = 15 downto 0 - dgrClear(dgrbuff[0], k) - next - for l = 0 to 79 - dgrColor(l) - dgrLine(dgrbuff[0], 0, 0, l, 47) - next - for l = 47 downto 0 - dgrColor(l) - dgrLine(dgrbuff[0], 0, 0, 79, l) - next - ii = 2 - ij = -1 - i = 40 - j = 10 +if MACHID & $F0 <> $B0 + puts("\n128K REQUIRED FOR DOUBLE LO-RES.") ^$C010 - while ^$C000 < 128 - dgrFill(dgrbuff[b], k, k, @tile1) - dgrBLT(dgrbuff[b], i, j, 8, 8, @sprite1) - b = dgrShow(b) - k++ - i = i + ii - if i < -3 or i > 75 - ii = -ii - fin - j = j + ij - if j < -3 or j > 43 - ij = -ij - fin - loop - ^$C010 - txtMode -end - + while ^$C000 < 128; loop +fin +// // Assembly fixups +// _dgrPlotPix:1 = @_dgrSetPix _dgrHLinPix:1 = @_dgrSetPix _dgrVLinPix:1 = @_dgrSetPix @@ -722,5 +676,4 @@ _dgrSetOddEvn:1 = @evnclr _dgrSetOddOdd:1 = @oddclr // Put read AUX mem routine in scary location memcpy($0100, @auxRead, 9) -dgrTest done diff --git a/src/makefile b/src/makefile index 9411fb6..96b66ea 100644 --- a/src/makefile +++ b/src/makefile @@ -25,6 +25,7 @@ HELLO = HELLO\#FE1000 MON = MON\#FE1000 HGR1 = HGR1\#FE1000 HGR1TEST= HGR1TEST\#FE1000 +DGRTEST = DGRTEST\#FE1000 TEST = TEST\#FE1000 TESTLIB = TESTLIB\#FE1000 PROFILE = PROFILE\#FE1000 @@ -50,7 +51,7 @@ TXTTYPE = .TXT #SYSTYPE = \#FF2000 #TXTTYPE = \#040000 -all: $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVM03) $(CMD) $(MEMMGR) $(MEMTEST) $(FIBER) $(SB) $(MON) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(ROGUEIO) $(HGR1) $(DGR) +all: $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVM03) $(CMD) $(MEMMGR) $(MEMTEST) $(FIBER) $(SB) $(MON) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(ROGUEIO) $(HGR1) $(DGR) $(DGRTEST) clean: -rm *FE1000 *FF2000 $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVM03) @@ -159,6 +160,10 @@ $(DGR): libsrc/dgr.pla $(PLVM02) $(PLASM) ./$(PLASM) -AM < libsrc/dgr.pla > libsrc/dgr.a acme --setpc 4094 -o $(DGR) libsrc/dgr.a +$(DGRTEST): samplesrc/dgrtest.pla $(PLVM02) $(PLASM) + ./$(PLASM) -AM < samplesrc/dgrtest.pla > samplesrc/dgrtest.a + acme --setpc 4094 -o $(DGRTEST) samplesrc/dgrtest.a + $(ROGUE): samplesrc/rogue.pla $(PLVM02) $(PLASM) ./$(PLASM) -AM < samplesrc/rogue.pla > samplesrc/rogue.a acme --setpc 4094 -o $(ROGUE) samplesrc/rogue.a