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-07-05 14:45:19 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2017-11-17 16:16:05 +00:00
|
|
|
|
* HLINE X1,X2 at Y1 (XOR,SET,ORA)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-22 21:24:30 +00:00
|
|
|
|
HLINE lda CB.Cache+S.CB.M
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-12-22 21:24:30 +00:00
|
|
|
|
cmp #S.CB.M.MONO
|
2017-11-14 16:57:34 +00:00
|
|
|
|
bne HLINE.C16
|
|
|
|
|
|
|
|
|
|
HLINE.MONO >LDYA CB.Cache+S.CB.X1
|
|
|
|
|
jsr LBUF.SetBounds1YA
|
|
|
|
|
>LDYA CB.Cache+S.CB.X2
|
|
|
|
|
jsr LBUF.SetBounds2YA
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-12-06 16:26:36 +00:00
|
|
|
|
lda CB.Cache+S.CB.COLOR
|
2017-11-14 16:57:34 +00:00
|
|
|
|
beq .1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-12-06 16:26:36 +00:00
|
|
|
|
lda #%01111111
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-15 07:27:12 +00:00
|
|
|
|
.1 ldx LBUF.C1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-12-06 16:26:36 +00:00
|
|
|
|
.2 sta LBUF.DATA,x
|
2017-11-15 07:27:12 +00:00
|
|
|
|
cpx LBUF.C2
|
2017-11-16 16:46:18 +00:00
|
|
|
|
inx
|
|
|
|
|
bcc .2
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-14 16:57:34 +00:00
|
|
|
|
ldy CB.Cache+S.CB.Y1
|
|
|
|
|
jmp LBUF.DrawAtY
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
HLINE.C16 lda CB.Cache+S.CB.X1
|
2017-11-14 16:57:34 +00:00
|
|
|
|
and #%11111100
|
|
|
|
|
tay
|
|
|
|
|
lda CB.Cache+S.CB.X1+1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-14 16:57:34 +00:00
|
|
|
|
jsr LBUF.SetBounds1YA
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-14 16:57:34 +00:00
|
|
|
|
lda CB.Cache+S.CB.X2
|
2017-11-16 16:46:18 +00:00
|
|
|
|
ora #%00000011
|
2017-11-14 16:57:34 +00:00
|
|
|
|
tay
|
|
|
|
|
lda CB.Cache+S.CB.X2+1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-14 16:57:34 +00:00
|
|
|
|
jsr LBUF.SetBounds2YA
|
|
|
|
|
|
2017-11-15 07:27:12 +00:00
|
|
|
|
lda CB.Cache+S.CB.COLOR
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
clc
|
|
|
|
|
adc L.Color.Pixels
|
2017-11-23 16:51:52 +00:00
|
|
|
|
sta .2+1
|
2017-11-15 07:27:12 +00:00
|
|
|
|
lda L.Color.Pixels+1
|
|
|
|
|
adc #0
|
2017-11-23 16:51:52 +00:00
|
|
|
|
sta .2+2
|
2017-11-15 07:27:12 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
ldx LBUF.C1
|
2017-11-15 07:27:12 +00:00
|
|
|
|
|
|
|
|
|
.1 txa
|
|
|
|
|
and #3 Compute index in Palette (Mod 4)
|
2017-11-14 16:57:34 +00:00
|
|
|
|
|
2017-11-15 07:27:12 +00:00
|
|
|
|
tay
|
2017-11-23 16:51:52 +00:00
|
|
|
|
.2 lda $ffff,y SELF MODIFIED
|
2017-11-15 07:27:12 +00:00
|
|
|
|
|
2017-11-16 07:12:03 +00:00
|
|
|
|
sta LBUF.DATA,x
|
2017-11-15 07:27:12 +00:00
|
|
|
|
cpx LBUF.C2
|
2017-11-15 16:29:23 +00:00
|
|
|
|
inx
|
|
|
|
|
bcc .1
|
2017-11-15 07:27:12 +00:00
|
|
|
|
|
|
|
|
|
ldy CB.Cache+S.CB.Y1
|
|
|
|
|
jmp LBUF.DrawAtY
|
|
|
|
|
|
2017-07-05 14:45:19 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-11-17 16:16:05 +00:00
|
|
|
|
* VLINE Y1,Y2 at X1 (XOR,SET,ORA)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-22 21:24:30 +00:00
|
|
|
|
VLINE lda CB.Cache+S.CB.M
|
|
|
|
|
cmp #S.CB.M.MONO
|
2017-11-17 16:16:05 +00:00
|
|
|
|
bne VLINE.C16
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
VLINE.MONO >LDYA CB.Cache+S.CB.X1
|
|
|
|
|
|
|
|
|
|
jsr DIVMOD7YA
|
|
|
|
|
tay
|
|
|
|
|
lda COL.OFS,y
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte Save COL (DIV)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda COL.BANK,y
|
|
|
|
|
tay
|
|
|
|
|
sta $C000,y Select proper BANK
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda CB.Cache+S.CB.OP
|
|
|
|
|
* cmp #S.CB.OP.XOR
|
|
|
|
|
beq VLINE.MONO.XOR
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda CB.Cache+S.CB.COLOR
|
|
|
|
|
bne VLINE.MONO.WHITE
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
VLINE.MONO.BLACK
|
|
|
|
|
ldy CB.Cache+S.CB.Y1
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.1 lda BASEL,y
|
2018-05-04 14:55:29 +00:00
|
|
|
|
adc ZPTmpByte
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta ZPBasePtr
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda BASEH,y
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta ZPBasePtr+1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda (ZPBasePtr)
|
|
|
|
|
and Mono.NMasks,x
|
|
|
|
|
sta (ZPBasePtr)
|
|
|
|
|
cpy CB.Cache+S.CB.Y2
|
|
|
|
|
iny
|
2017-07-05 14:45:19 +00:00
|
|
|
|
bcc .1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
VLINE.MONO.WHITE
|
|
|
|
|
|
|
|
|
|
.1 lda BASEL,y
|
2018-05-04 14:55:29 +00:00
|
|
|
|
adc ZPTmpByte
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta ZPBasePtr
|
|
|
|
|
lda BASEH,y
|
|
|
|
|
sta ZPBasePtr+1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda (ZPBasePtr)
|
|
|
|
|
ora Mono.Masks,x
|
|
|
|
|
sta (ZPBasePtr)
|
|
|
|
|
cpy CB.Cache+S.CB.Y2
|
|
|
|
|
iny
|
|
|
|
|
bcc .1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
rts
|
|
|
|
|
VLINE.MONO.XOR
|
|
|
|
|
|
|
|
|
|
.1 lda BASEL,y
|
2018-05-04 14:55:29 +00:00
|
|
|
|
adc ZPTmpByte
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta ZPBasePtr
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda BASEH,y
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta ZPBasePtr+1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda (ZPBasePtr)
|
|
|
|
|
eor Mono.Masks,x
|
|
|
|
|
sta (ZPBasePtr)
|
|
|
|
|
cpy CB.Cache+S.CB.Y2
|
|
|
|
|
iny
|
|
|
|
|
bcc .1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
VLINE.C16 lda CB.Cache+S.CB.X1
|
|
|
|
|
lsr CB.Cache+S.CB.X1+1 divide by 4
|
|
|
|
|
ror
|
|
|
|
|
lsr CB.Cache+S.CB.X1+1
|
|
|
|
|
ror
|
|
|
|
|
tay Y=X/4 (range 0->139)
|
|
|
|
|
lda DIV7.0,y A=X/4/7 (range 0->19)
|
|
|
|
|
|
|
|
|
|
asl times 2 (range 0->38)
|
|
|
|
|
|
|
|
|
|
ldx CB.Cache+S.CB.Y1
|
|
|
|
|
adc BASEL,x setup line Base Ptr (cc by asl)
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta ZPBasePtr ZPBasePtr now point to first of...
|
2017-07-05 14:45:19 +00:00
|
|
|
|
lda BASEH,x
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta ZPBasePtr+1 ...the 4 columns
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
|
|
|
|
lda MOD7.0,y get MOD
|
|
|
|
|
|
|
|
|
|
asl times 4 to compute index in MASK tables
|
|
|
|
|
asl
|
|
|
|
|
tax set in X for Masks,NMasks
|
|
|
|
|
|
|
|
|
|
lda CB.Cache+S.CB.COLOR
|
|
|
|
|
|
|
|
|
|
asl times 4 to compute index in PIXELS table
|
|
|
|
|
asl
|
|
|
|
|
tay
|
|
|
|
|
|
|
|
|
|
lda Color.Masks,x bits in 1st byte to light?
|
|
|
|
|
beq .10
|
2017-11-17 16:16:05 +00:00
|
|
|
|
|
2017-07-05 14:45:19 +00:00
|
|
|
|
and Color.Pixels,y apply color
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
|
|
|
|
sta SETPAGE2
|
|
|
|
|
|
2017-11-15 07:27:12 +00:00
|
|
|
|
lda (ZPBasePtr)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
and Color.NMasks,x reset existing pixel,
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta (ZPBasePtr)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
|
|
|
|
.10 inx
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
lda Color.Masks,x
|
|
|
|
|
beq .11
|
2017-11-17 16:16:05 +00:00
|
|
|
|
|
2017-07-05 14:45:19 +00:00
|
|
|
|
and Color.Pixels,y apply color
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
|
|
|
|
sta CLRPAGE2
|
|
|
|
|
|
2017-11-15 07:27:12 +00:00
|
|
|
|
lda (ZPBasePtr)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
and Color.NMasks,x reset existing pixel,
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta (ZPBasePtr)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-15 07:27:12 +00:00
|
|
|
|
.11 inc ZPBasePtr
|
2017-07-05 14:45:19 +00:00
|
|
|
|
inx
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
lda Color.Masks,x
|
|
|
|
|
beq .12
|
2017-11-17 16:16:05 +00:00
|
|
|
|
|
2017-07-05 14:45:19 +00:00
|
|
|
|
and Color.Pixels,y apply color
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
|
|
|
|
sta SETPAGE2
|
|
|
|
|
|
2017-11-15 07:27:12 +00:00
|
|
|
|
lda (ZPBasePtr)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
and Color.NMasks,x reset existing pixel,
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta (ZPBasePtr)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
|
|
|
|
.12 inx
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
lda Color.Masks,x
|
|
|
|
|
beq .13
|
2017-11-17 16:16:05 +00:00
|
|
|
|
|
2017-07-05 14:45:19 +00:00
|
|
|
|
and Color.Pixels,y apply color
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
|
|
|
|
sta CLRPAGE2
|
|
|
|
|
|
2017-11-15 07:27:12 +00:00
|
|
|
|
lda (ZPBasePtr)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
and Color.NMasks,x reset existing pixel,
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-15 07:27:12 +00:00
|
|
|
|
sta (ZPBasePtr)
|
2017-07-05 14:45:19 +00:00
|
|
|
|
|
2017-11-14 16:57:34 +00:00
|
|
|
|
.13 rts
|
2017-07-05 14:45:19 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/BIN/DRV/DHGR.DRV.S.LINE
|
|
|
|
|
LOAD USR/SRC/BIN/DRV/DHGR.DRV.S
|
2017-07-05 14:45:19 +00:00
|
|
|
|
ASM
|