diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 0e52b918..d2ed530d 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/GTEST.S.txt b/BIN/GTEST.S.txt index 4731544e..06348214 100644 --- a/BIN/GTEST.S.txt +++ b/BIN/GTEST.S.txt @@ -57,42 +57,34 @@ CS.INIT clc *-------------------------------------- CS.RUN jsr GFX.Open bcs .9 + jsr LoadResources bcs .9 + >LDYA L.CB.RECT jsr GFX.Write.YA - - >LDYA L.BM.Apple >STYA CB.Apple+S.CB.SrcPtr >LDYA L.CB.PIX jsr GFX.Write.YA - - >LDYA L.CB.Apple jsr GFX.Write.YA - - - lda #0 - sec - rts lda hFontB sta CB.TEXTB+S.CB.hFont >LDYA L.MESSAGEB >STYA CB.TEXTB+S.CB.TxtPtr + >LDYA L.CB.TEXTB -* >SYSCALL OSD + jsr GFX.Write.YA bcs .9 >LDYA L.CB.TEXTB jsr GFX.Write.YA - - lda hFont sta CB.TEXT+S.CB.hFont @@ -100,7 +92,7 @@ CS.RUN jsr GFX.Open >STYA CB.TEXT+S.CB.TxtPtr >LDYA L.CB.TEXT -* >SYSCALL OSD + jsr GFX.Write.YA bcs .9 >LDYA L.CB.TEXT @@ -218,7 +210,7 @@ CB.PIX .DA #S.CB.CMD.BITBLT .BS 2 SrcPtr .DA 0 DSTPTR -CB.TEXTB .DA #S.CB.CMD.DRAWTEXT +CB.TEXTB .DA #S.CB.CMD.DRAWTEXT+S.CB.CMD.OSD .DA #S.CB.OP.SET+S.CB.OP.INVERSE .DA #S.CB.M.MONO .BS 1 hFONT @@ -231,7 +223,7 @@ CB.TEXTB .DA #S.CB.CMD.DRAWTEXT .BS 2 TXTPTR .DA 0 DSTPTR -CB.TEXT .DA #S.CB.CMD.DRAWTEXT +CB.TEXT .DA #S.CB.CMD.DRAWTEXT+S.CB.CMD.OSD .DA #S.CB.OP.SET .DA #S.CB.M.MONO .BS 1 hFONT @@ -243,7 +235,6 @@ CB.TEXT .DA #S.CB.CMD.DRAWTEXT .DA 184 DstY .BS 2 TXTPTR .DA 0 DSTPTR - *-------------------------------------- BM.Apple .DA #S.BM.F.BBP4 .DA #2 RowBytes diff --git a/DRV/DHGR.DRV.S.BLT.txt b/DRV/DHGR.DRV.S.BLT.txt index 16627821..ff97edce 100644 --- a/DRV/DHGR.DRV.S.BLT.txt +++ b/DRV/DHGR.DRV.S.BLT.txt @@ -15,8 +15,8 @@ NEW * S.CB.SrcPtr+1 = 0, hMem in S.CB.SrcPtr * S.CB.DstPtr : pointer to Save Buffer *-------------------------------------- -BITBLT ldy CB.CACHE+S.CB.SrcPtr - lda CB.CACHE+S.CB.SrcPtr+1 +BITBLT ldy CB.Cache+S.CB.SrcPtr + lda CB.Cache+S.CB.SrcPtr+1 bne BITBLT.1 sta SETREADAUX diff --git a/DRV/DHGR.DRV.S.OSD.txt b/DRV/DHGR.DRV.S.OSD.txt index 5ddd6d3b..a537b72f 100644 --- a/DRV/DHGR.DRV.S.OSD.txt +++ b/DRV/DHGR.DRV.S.OSD.txt @@ -18,27 +18,32 @@ TXTPTR .EQ ZPDRV+22 *-------------------------------------- * Y,A = Ptr to S.CB in MAIN *-------------------------------------- -X.OSD ldy CB.Cache+S.CB.DstPtr - lda CB.Cache+S.CB.DstPtr+1 - bne .11 Ptr To Aux +X.OSD ldy CBX.Cache+S.CB.DstPtr + lda CBX.Cache+S.CB.DstPtr+1 + bne .1 Ptr To Aux + tya hBM in Aux - beq .7 no Src BM + beq .4 no Src BM >SYSCALL2 GetMemPtr -.11 >STYA ZPDstBMPtr +.1 >STYA ZPDstBMPtr + ldx #0 -.1 lda (ZPDstBMPtr) + +.2 lda (ZPDstBMPtr) sta DstBM.Cache,x inc ZPDstBMPtr - bne .2 + bne .3 inc ZPDstBMPtr+1 -.2 inx +.3 inx cpx #S.BM - bne .1 + bne .2 -.7 ldx CB.Cache+S.CB.CMD +.4 lda CBX.Cache+S.CB.CMD + asl + tax jmp (.8,x) *-------------------------------------- .8 .DA OSD.SETPIXEL @@ -52,7 +57,7 @@ X.OSD ldy CB.Cache+S.CB.DstPtr .DA OSD.DRAWTEXT .DA OSD.GETTEXTSIZE *-------------------------------------- -OSD.SETPIXEL >LDYA CB.Cache+S.CB.Y1 +OSD.SETPIXEL >LDYA CBX.Cache+S.CB.Y1 ldx DstBM.Cache+S.BM.RowBytes jsr YAMultX pha @@ -63,32 +68,32 @@ OSD.SETPIXEL >LDYA CB.Cache+S.CB.Y1 pla adc ZPDstBMPtr+1 sta ZPDstBMPtr+1 - lda CB.Cache+S.CB.M + lda CBX.Cache+S.CB.M bit #S.CB.M.C16 bne OSD.SETPIXEL.C16 -OSD.SETPIXEL.M lda CB.Cache+S.CB.X1 +OSD.SETPIXEL.M lda CBX.Cache+S.CB.X1 pha and #$7 MOD 7 tax pla - lsr CB.Cache+S.CB.X1 + lsr CBX.Cache+S.CB.X1 ror - lsr CB.Cache+S.CB.X1 + lsr CBX.Cache+S.CB.X1 ror - lsr CB.Cache+S.CB.X1 + lsr CBX.Cache+S.CB.X1 ror clc adc ZPDstBMPtr sta ZPDstBMPtr - lda CB.Cache+S.CB.X1 + lda CBX.Cache+S.CB.X1 adc ZPDstBMPtr+1 sta ZPDstBMPtr+1 - lda CB.Cache+S.CB.OP + lda CBX.Cache+S.CB.OP * cmp #S.CB.OP.XOR beq .2 - lda CB.Cache+S.CB.COLOR + lda CBX.Cache+S.CB.COLOR bne .1 lda (ZPDstBMPtr) and Mono8.NMasks,x @@ -126,7 +131,7 @@ OSD.FILLRECT * S.CB.SrcPtr+1 = 0, hMem in S.CB.SrcPtr * S.CB.DstPtr : pointer to Save Buffer *-------------------------------------- -OSD.BITBLT >LDYA CB.CACHE+S.CB.SrcPtr +OSD.BITBLT >LDYA CBX.Cache+S.CB.SrcPtr bne OSD.BITBLT.1 tya >SYSCALL2 GetMemPtr @@ -166,7 +171,7 @@ OSD.DRAWTEXT sec *-------------------------------------- OSD.GETTEXTSIZE clc php - lda CB.Cache+S.CB.hFONT + lda CBX.Cache+S.CB.hFONT >SYSCALL2 GetMemPtr >STYA ZPFontPtr ldy #S.FON-1 @@ -181,30 +186,35 @@ OSD.GETTEXTSIZE clc lda ZPFontPtr+1 adc /S.FON sta ZPTablePtr+1 -.2 >LDYA CB.Cache+S.CB.TxtPtr +.2 >LDYA CBX.Cache+S.CB.TxtPtr >STYA TXTPTR - stz CB.Cache+S.CB.SrcW - stz CB.Cache+S.CB.SrcW+1 + stz CBX.Cache+S.CB.SrcW + stz CBX.Cache+S.CB.SrcW+1 lda FON.Cache+S.FON.PixH - sta CB.Cache+S.CB.SrcH - stz CB.Cache+S.CB.SrcH+1 + sta CBX.Cache+S.CB.SrcH + stz CBX.Cache+S.CB.SrcH+1 .3 jsr OSD.TXTPTR.GetNext beq .4 + + inc TXTPTR + bne .31 + inc TXTPTR+1 +.31 jsr OSD.FON.GetChar lda (ZPCharPtr) Get Char PixelW sec - adc CB.Cache+S.CB.SrcW - sta CB.Cache+S.CB.SrcW + adc CBX.Cache+S.CB.SrcW + sta CBX.Cache+S.CB.SrcW bcc .3 - inc CB.Cache+S.CB.SrcW+1 + inc CBX.Cache+S.CB.SrcW+1 bra .3 .4 plp - lda CB.Cache+S.CB.SrcW - ldx CB.Cache+S.CB.SrcW+1 - ldy CB.Cache+S.CB.SrcH - bcc OSD.GETRECTBUFSIZE.RTS + lda CBX.Cache+S.CB.SrcW + ldx CBX.Cache+S.CB.SrcW+1 + ldy CBX.Cache+S.CB.SrcH + bcc OSD.DRAWTEXT.RTS sta DstBM.Cache+S.BM.W stx DstBM.Cache+S.BM.W+1 sty DstBM.Cache+S.BM.H @@ -212,9 +222,9 @@ OSD.GETTEXTSIZE clc lda #S.BM.F.BBP1 sta DstBM.Cache+S.BM.F jsr OSD.BM.Create - bcs OSD.GETRECTBUFSIZE.RTS + bcs OSD.DRAWTEXT.RTS sta OSD.DRAWTEXT.END+1 save hBM, ZPDstBMPtr=BMData - >LDYA CB.Cache+S.CB.TxtPtr + >LDYA CBX.Cache+S.CB.TxtPtr >STYA TXTPTR stz GWORD reset Col index in BM @@ -223,6 +233,12 @@ OSD.GETTEXTSIZE clc OSD.DRAWTEXT.LOOP jsr OSD.TXTPTR.GetNext beq OSD.DRAWTEXT.END + + inc TXTPTR + bne .31 + inc TXTPTR+1 +.31 + jsr OSD.FON.GetChar lda (ZPCharPtr) Char PixW sta GBYTE @@ -249,14 +265,14 @@ OSD.DRAWTEXT.LOOP adc GWORD Update Col Index in BM sta GWORD bra OSD.DRAWTEXT.LOOP - +OSD.DRAWTEXT.RTS OSD.DRAWTEXT.END lda #$FF SELF MODIFIED - sta CB.Cache+S.CB.SrcPtr Save hBM in Src CB - stz CB.Cache+S.CB.SrcPtr+1 + sta CBX.Cache+S.CB.SrcPtr Save hBM in Src CB + stz CBX.Cache+S.CB.SrcPtr+1 lda #S.CB.CMD.BITBLT - sta CB.Cache+S.CB.CMD + sta CBX.Cache+S.CB.CMD jmp CB.Update *-------------------------------------- OSD.DRAWTEXT.JMP @@ -509,7 +525,7 @@ OSD.BM.Create lda DstBM.Cache+S.BM.W sta .4+2 ldy #0 - lda CB.Cache+S.CB.OP + lda CBX.Cache+S.CB.OP and #S.CB.OP.INVERSE beq .3 @@ -554,20 +570,22 @@ OSD.YAMultX stx GBYTE bne .2 rts *-------------------------------------- -CB.Update ldy #S.CB-1 - sta SETWRITEAUX +CB.Update sta CLRWRITEAUX -.1 lda CB.Cache,y + ldx CBX.Cache + ldy CB.CmdLen,x + +.1 lda CBX.Cache,y sta (ZPCmdPtr),y dey bpl .1 - sta CLRWRITEAUX + sta SETWRITEAUX clc rts *-------------------------------------- -*CB.Cache .BS S.CB +CBX.Cache .BS S.CB FON.Cache .BS S.FON SrcBM.Cache .BS S.BM DstBM.Cache .BS S.BM diff --git a/DRV/DHGR.DRV.S.txt b/DRV/DHGR.DRV.S.txt index 4f8317a1..cfac7e1d 100644 --- a/DRV/DHGR.DRV.S.txt +++ b/DRV/DHGR.DRV.S.txt @@ -39,7 +39,7 @@ L.DRV.CS.START .DA DRV.CS.START L.FD.DEV .DA FD.DEV L.FD.DEV.NAME .DA FD.DEV.NAME *-------------------------------------- -L.X.OSD .DA X.OSD +L.OSD .DA OSD .DA 0 End Of Reloc Table *-------------------------------------- Dev.Detect >LDYA L.MSG.DETECT @@ -48,9 +48,11 @@ Dev.Detect >LDYA L.MSG.DETECT and #MACHID.T cmp #MACHID.T.IIc bne .1 + * stz DCB+S.DCB.GFX.S //c : 80c Mode >LDYA L.MSG.DETECT.IIC bra .3 + .1 php sei sta SET80STORE @@ -192,17 +194,17 @@ DrvReloc lda FD.DEV+S.FD.DEV.DRVPTR rts *-------------------------------------- -OSD.install >LDYA L.X.OSD +OSD.install >LDYA L.OSD >STYA ZPPtr1 - + >LDYAI X.OSD >STYA ZPPtr2 - + lda /X.OSD.LEN eor #$ff pha - lda /X.OSD.LEN + lda #X.OSD.LEN eor #$ff tax @@ -215,7 +217,7 @@ OSD.install >LDYA L.X.OSD pla inc - beq .8 + beq .3 pha @@ -225,10 +227,20 @@ OSD.install >LDYA L.X.OSD iny bne .1 - inc ZPPtr1 - inc ZPPtr2 + inc ZPPtr1+1 + inc ZPPtr2+1 bra .1 +.3 ldy #OSD.TXTPTR.GetNext.LEN-1 + +.4 lda OSD.TXTPTR.GetNext,y + sta SETPAGE2 + sta $2000+240,y + sta CLRPAGE2 + sta $2000+240,y + dey + bpl .4 + .8 sta CLRWRITEAUX rts *-------------------------------------- @@ -435,31 +447,39 @@ CLOSE lda #S.DIB.S.OPENED WRITE >STYA ZPIOCTL NON STANDARD sta SET80STORE lda (ZPIOCTL) Get Cmd - -.1 tax + bmi .2 + + tax ldy CB.CmdLen,x -.2 lda (ZPIOCTL),y + asl + pha + +.1 lda (ZPIOCTL),y sta CB.Cache,y dey - bpl .2 - + bpl .1 + plx + jmp (J.Cmds,x) -.10 jmp (J.Cmds,x) +.2 sta SETWRITEAUX + and #$7f + tax + ldy CB.CmdLen,x + +.3 lda (ZPIOCTL),y + sta CBX.Cache,y + dey + bpl .3 -*-------------------------------------- -OSD.TXTPTR.GetNext - sta CLRREADAUX - lda (TXTPTR) sta SETREADAUX - beq OSD.TXTPTR.RTS -OSD.TXTPTR.Next inc TXTPTR - bne OSD.TXTPTR.RTS - inc TXTPTR+1 -OSD.TXTPTR.RTS rts + jsr X.OSD + sta CLRREADAUX + sta CLRWRITEAUX + rts *-------------------------------------- * IN: * Y = LO @@ -579,13 +599,16 @@ Shift.R.HI .DA /SHIFT.L6 .DA /SHIFT.L2 .DA /SHIFT.L1 *-------------------------------------- -CB.CmdLen .DA S.CB.Y1+1 SETPIXEL - .DA S.CB.Y1+1 GETPIXEL - .DA S.CB.X2+1 HLINE - .DA S.CB.Y2+1 VLINE - .DA S.CB.Y2+1 FILLRECT - .DA S.CB.DstPtr+1 BITBLT - .DA S.CB.DstPtr+1 GETRECTBUFSIZE +CB.CmdLen .DA #S.CB.Y1+1 SETPIXEL + .DA #S.CB.Y1+1 GETPIXEL + .DA #S.CB.X2+1 HLINE + .DA #S.CB.Y2+1 VLINE + .DA #S.CB.Y2+1 FILLRECT + .DA #S.CB.DstPtr+1 BITBLT + .DA #S.CB.DstPtr+1 GETRECTBUFSIZE + .DA #S.CB.Y2+1 DRAWLINE + .DA #S.CB.TxtPtr+1 DRAWTEXT + .DA #S.CB.SrcH+1 GETTEXTSIZE *-------------------------------------- CB.Cache .BS S.CB BM.Cache .BS S.BM @@ -610,9 +633,18 @@ DCB .DA #S.DCB.T.GFX *-------------------------------------- DRV.END *-------------------------------------- - .PH $1000 +OSD .PH $1000 .INB usr/src/drv/dhgr.drv.s.osd .EP +*-------------------------------------- + .PH $2000+240 +OSD.TXTPTR.GetNext + sta CLRREADAUX + lda (TXTPTR) + sta SETREADAUX + rts +OSD.TXTPTR.GetNext.LEN .EQ *-OSD.TXTPTR.GetNext + .EP *-------------------------------------- .LIST ON DRV.CS.SIZE .EQ DRV.CS.END-DRV.CS.START diff --git a/INC/GFX.I.txt b/INC/GFX.I.txt index 366405aa..cf618e9b 100644 --- a/INC/GFX.I.txt +++ b/INC/GFX.I.txt @@ -41,15 +41,16 @@ S.FON .EQ 8 *-------------------------------------- S.CB.CMD .EQ 0 S.CB.CMD.SETPIXEL .EQ 0 -S.CB.CMD.GETPIXEL .EQ 2 -S.CB.CMD.HLINE .EQ 4 -S.CB.CMD.VLINE .EQ 6 -S.CB.CMD.FILLRECT .EQ 8 -S.CB.CMD.BITBLT .EQ 10 -S.CB.CMD.GETRECTBUFSIZE .EQ 12 -S.CB.CMD.DRAWLINE .EQ 14 -S.CB.CMD.DRAWTEXT .EQ 16 -S.CB.CMD.GETTEXTSIZE .EQ 18 +S.CB.CMD.GETPIXEL .EQ 1 +S.CB.CMD.HLINE .EQ 2 +S.CB.CMD.VLINE .EQ 3 +S.CB.CMD.FILLRECT .EQ 4 +S.CB.CMD.BITBLT .EQ 5 +S.CB.CMD.GETRECTBUFSIZE .EQ 6 +S.CB.CMD.DRAWLINE .EQ 7 +S.CB.CMD.DRAWTEXT .EQ 8 +S.CB.CMD.GETTEXTSIZE .EQ 9 +S.CB.CMD.OSD .EQ 128 S.CB.OP .EQ 1 S.CB.OP.XOR .EQ 0 screen EOR bitmap -> Screen S.CB.OP.SET .EQ 2 replace screen with bitmap