2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2018-11-17 17:17:13 +00:00
|
|
|
|
PREFIX
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2017-11-16 16:46:18 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBUF.SetBounds1YA
|
|
|
|
|
jsr DIVMOD7YA A=DIV, X=MOD
|
|
|
|
|
sta LBUF.C1
|
2017-11-20 06:59:59 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
lda C1.MASK,x
|
|
|
|
|
sta LBUF.C1.MASK
|
|
|
|
|
lda C1.DATA,x
|
|
|
|
|
sta LBUF.C1.DATA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBUF.SetBounds2YA
|
|
|
|
|
jsr DIVMOD7YA A=DIV, X=MOD
|
|
|
|
|
sta LBUF.C2
|
2017-11-27 07:11:31 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
cmp LBUF.C1 C1=C2, go combine in C1
|
|
|
|
|
beq .1
|
2017-11-27 07:11:31 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
lda C2.MASK,x
|
|
|
|
|
sta LBUF.C2.MASK
|
|
|
|
|
lda C2.DATA,x
|
|
|
|
|
sta LBUF.C2.DATA
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 lda C1.MASK,x
|
|
|
|
|
and C2.MASK,x
|
|
|
|
|
sta LBUF.C1.MASK
|
|
|
|
|
|
|
|
|
|
lda C1.DATA,x
|
2017-12-07 07:42:58 +00:00
|
|
|
|
ora C2.DATA,x
|
|
|
|
|
sta LBUF.C1.DATA
|
2017-11-16 16:46:18 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBUF.DrawAtY lda BASEL,y setup line Base Ptr
|
|
|
|
|
sta ZPBasePtr
|
|
|
|
|
lda BASEH,y
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta ZPBasePtr+1
|
|
|
|
|
|
|
|
|
|
lda CB.Cache+S.CB.OP
|
|
|
|
|
bit #S.CB.OP.RESTORE
|
2017-12-01 15:53:29 +00:00
|
|
|
|
bne .4
|
2017-11-17 16:16:05 +00:00
|
|
|
|
bit #S.CB.OP.SAVE
|
2017-12-01 15:53:29 +00:00
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
ldx LBUF.C1
|
|
|
|
|
|
|
|
|
|
.1 ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
|
|
|
|
lda (ZPBasePtr),y
|
|
|
|
|
sta (ZPBMSavePtr)
|
2017-11-17 16:16:05 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
inc ZPBMSavePtr
|
|
|
|
|
bne .2
|
|
|
|
|
inc ZPBMSavePtr+1
|
|
|
|
|
|
|
|
|
|
.2 cpx LBUF.C2
|
|
|
|
|
inx
|
|
|
|
|
bcc .1
|
2017-11-17 16:16:05 +00:00
|
|
|
|
|
|
|
|
|
lda CB.Cache+S.CB.OP
|
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.3 and #$F
|
2017-11-17 16:16:05 +00:00
|
|
|
|
tax
|
|
|
|
|
jmp (J.LBUF.DrawAtY,x)
|
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.4 ldx LBUF.C1
|
|
|
|
|
|
|
|
|
|
.5 ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
|
|
|
|
lda (ZPBMSavePtr)
|
|
|
|
|
sta (ZPBasePtr),y
|
|
|
|
|
|
|
|
|
|
inc ZPBMSavePtr
|
|
|
|
|
bne .6
|
|
|
|
|
inc ZPBMSavePtr+1
|
|
|
|
|
|
|
|
|
|
.6 cpx LBUF.C2
|
|
|
|
|
inx
|
|
|
|
|
bcc .5
|
|
|
|
|
|
|
|
|
|
rts
|
2017-11-17 16:16:05 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBUF.DrawAtY.XOR
|
2017-11-27 16:39:09 +00:00
|
|
|
|
LBUF.DrawAtY.AND.XOR
|
2017-11-17 16:16:05 +00:00
|
|
|
|
ldx LBUF.C1 x C1->C2
|
|
|
|
|
|
|
|
|
|
ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
|
|
|
|
lda (ZPBasePtr),y Get C1
|
|
|
|
|
and LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-27 07:11:31 +00:00
|
|
|
|
eor (ZPBasePtr),y
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
beq .2 C1=C2, go setup C2
|
|
|
|
|
bcs .8 C1+1 > C2, we are done...
|
|
|
|
|
|
|
|
|
|
.1 ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
2017-11-27 07:11:31 +00:00
|
|
|
|
lda LBUF.DATA,x
|
|
|
|
|
eor (ZPBasePtr),y
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta (ZPBasePtr),y
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.2 ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
|
|
|
|
lda (ZPBasePtr),y Get C2
|
|
|
|
|
and LBUF.C2.MASK clear ONLY bits ending at X2 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-27 07:11:31 +00:00
|
|
|
|
eor (ZPBasePtr),y
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
|
|
|
|
|
.8 rts
|
2017-11-16 16:46:18 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBUF.DrawAtY.SET
|
2017-12-22 21:24:30 +00:00
|
|
|
|
LBUF.DrawAtY.AND.SET
|
2017-11-16 16:46:18 +00:00
|
|
|
|
ldx LBUF.C1 x C1->C2
|
|
|
|
|
|
|
|
|
|
ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
2017-11-30 07:33:45 +00:00
|
|
|
|
lda (ZPBasePtr),y Clear screen at C1
|
|
|
|
|
and LBUF.C1.MASK with MASK bits
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-30 07:33:45 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte ora with screen bits
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
2017-12-04 16:42:08 +00:00
|
|
|
|
beq .7 C1=C2, go setup C2
|
2017-11-16 16:46:18 +00:00
|
|
|
|
bcs .8 C1+1 > C2, we are done...
|
2017-12-04 16:42:08 +00:00
|
|
|
|
|
|
|
|
|
phx
|
|
|
|
|
|
|
|
|
|
ldy COL.BANK,x C1+1,3,5,7.....
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
2017-12-04 16:42:08 +00:00
|
|
|
|
.1 lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y
|
2017-12-04 16:42:08 +00:00
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
inx
|
2017-11-16 16:46:18 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
2017-12-04 16:42:08 +00:00
|
|
|
|
bcc .1
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-12-04 16:42:08 +00:00
|
|
|
|
plx
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
beq .7
|
|
|
|
|
|
|
|
|
|
ldy COL.BANK,x C1+2,4,6,8....
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
|
|
|
|
.2 lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
|
|
|
|
sta (ZPBasePtr),y
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
bcc .2
|
|
|
|
|
|
|
|
|
|
ldx LBUF.C2
|
|
|
|
|
|
|
|
|
|
.7 ldy COL.BANK,x
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
2017-12-07 07:42:58 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
lda (ZPBasePtr),y Get C2
|
|
|
|
|
and LBUF.C2.MASK clear ONLY bits ending at X2 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-30 07:33:45 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBUF.DrawAtY.ORA
|
2017-11-17 16:16:05 +00:00
|
|
|
|
ldx LBUF.C1 x C1->C2
|
|
|
|
|
|
|
|
|
|
ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda (ZPBasePtr),y Get C1
|
|
|
|
|
and LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-30 07:33:45 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-27 07:11:31 +00:00
|
|
|
|
ora (ZPBasePtr),y
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
beq .2 C1=C2, go setup C2
|
|
|
|
|
bcs .8 C1+1 > C2, we are done...
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.1 ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
2017-11-27 07:11:31 +00:00
|
|
|
|
ora (ZPBasePtr),y
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y
|
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
bne .1
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.2 ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-30 07:33:45 +00:00
|
|
|
|
lda LBUF.MASK,x get MASK bits
|
|
|
|
|
ora LBUF.C2.MASK
|
|
|
|
|
and (ZPBasePtr),y
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-30 07:33:45 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-30 07:33:45 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
2017-11-17 16:16:05 +00:00
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2017-11-29 06:59:27 +00:00
|
|
|
|
LBUF.DrawAtY.AND.ORA
|
2017-11-17 16:16:05 +00:00
|
|
|
|
ldx LBUF.C1 x C1->C2
|
2017-12-22 21:24:30 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-27 16:39:09 +00:00
|
|
|
|
lda LBUF.MASK,x get MASK bits
|
|
|
|
|
ora LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
|
|
|
|
|
and (ZPBasePtr),y Clear screen at C1
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-27 16:39:09 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte ora with screen bits
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
beq .2 C1=C2, go setup C2
|
|
|
|
|
bcs .8 C1+1 > C2, we are done...
|
|
|
|
|
|
|
|
|
|
.1 ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
|
|
|
|
|
2017-11-27 16:39:09 +00:00
|
|
|
|
lda (ZPBasePtr),y
|
|
|
|
|
and LBUF.MASK,x
|
|
|
|
|
ora LBUF.DATA,x set all bytes between C1+1 & C2-1
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y
|
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.2 ldy COL.BANK,x
|
|
|
|
|
sta $C000,y
|
|
|
|
|
ldy COL.OFS,x
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-27 16:39:09 +00:00
|
|
|
|
lda LBUF.MASK,x get MASK bits
|
|
|
|
|
ora LBUF.C2.MASK
|
|
|
|
|
and (ZPBasePtr),y
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-27 16:39:09 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
|
|
|
|
|
.8 rts
|
2017-11-16 16:46:18 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/BIN/DRV/DHGR.DRV.S.LBUF
|
|
|
|
|
LOAD USR/SRC/BIN/DRV/DHGR.DRV.S
|
2017-11-16 16:46:18 +00:00
|
|
|
|
ASM
|