2017-12-22 22:24:30 +01:00
|
|
|
|
NEW
|
2019-07-25 17:10:59 +02:00
|
|
|
|
AUTO 3,1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2017-11-17 17:16:05 +01:00
|
|
|
|
* HLINE X1,X2 at Y1 (XOR,SET,ORA)
|
2017-07-05 16:45:19 +02:00
|
|
|
|
*--------------------------------------
|
2017-12-22 22:24:30 +01:00
|
|
|
|
HLINE lda CB.Cache+S.CB.M
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-12-22 22:24:30 +01:00
|
|
|
|
cmp #S.CB.M.MONO
|
2017-11-14 17:57:34 +01: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 16:45:19 +02:00
|
|
|
|
|
2017-12-06 17:26:36 +01:00
|
|
|
|
lda CB.Cache+S.CB.COLOR
|
2017-11-14 17:57:34 +01:00
|
|
|
|
beq .1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-12-06 17:26:36 +01:00
|
|
|
|
lda #%01111111
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-15 08:27:12 +01:00
|
|
|
|
.1 ldx LBUF.C1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-12-06 17:26:36 +01:00
|
|
|
|
.2 sta LBUF.DATA,x
|
2017-11-15 08:27:12 +01:00
|
|
|
|
cpx LBUF.C2
|
2017-11-16 17:46:18 +01:00
|
|
|
|
inx
|
|
|
|
|
bcc .2
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-14 17:57:34 +01:00
|
|
|
|
ldy CB.Cache+S.CB.Y1
|
|
|
|
|
jmp LBUF.DrawAtY
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-16 17:46:18 +01:00
|
|
|
|
HLINE.C16 lda CB.Cache+S.CB.X1
|
2017-11-14 17:57:34 +01:00
|
|
|
|
and #%11111100
|
|
|
|
|
tay
|
|
|
|
|
lda CB.Cache+S.CB.X1+1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-14 17:57:34 +01:00
|
|
|
|
jsr LBUF.SetBounds1YA
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-14 17:57:34 +01:00
|
|
|
|
lda CB.Cache+S.CB.X2
|
2017-11-16 17:46:18 +01:00
|
|
|
|
ora #%00000011
|
2017-11-14 17:57:34 +01:00
|
|
|
|
tay
|
|
|
|
|
lda CB.Cache+S.CB.X2+1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-14 17:57:34 +01:00
|
|
|
|
jsr LBUF.SetBounds2YA
|
|
|
|
|
|
2017-11-15 08:27:12 +01:00
|
|
|
|
lda CB.Cache+S.CB.COLOR
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
clc
|
|
|
|
|
adc L.Color.Pixels
|
2019-08-02 16:36:49 +02:00
|
|
|
|
sta ZPTmpWord
|
2017-11-15 08:27:12 +01:00
|
|
|
|
lda L.Color.Pixels+1
|
|
|
|
|
adc #0
|
2019-08-02 16:36:49 +02:00
|
|
|
|
sta ZPTmpWord+1
|
2017-11-15 08:27:12 +01:00
|
|
|
|
|
2017-11-16 17:46:18 +01:00
|
|
|
|
ldx LBUF.C1
|
2017-11-15 08:27:12 +01:00
|
|
|
|
|
|
|
|
|
.1 txa
|
|
|
|
|
and #3 Compute index in Palette (Mod 4)
|
2017-11-14 17:57:34 +01:00
|
|
|
|
|
2017-11-15 08:27:12 +01:00
|
|
|
|
tay
|
2019-08-02 16:36:49 +02:00
|
|
|
|
.2 lda (ZPTmpWord),y
|
2017-11-15 08:27:12 +01:00
|
|
|
|
|
2017-11-16 08:12:03 +01:00
|
|
|
|
sta LBUF.DATA,x
|
2017-11-15 08:27:12 +01:00
|
|
|
|
cpx LBUF.C2
|
2017-11-15 17:29:23 +01:00
|
|
|
|
inx
|
|
|
|
|
bcc .1
|
2017-11-15 08:27:12 +01:00
|
|
|
|
|
|
|
|
|
ldy CB.Cache+S.CB.Y1
|
|
|
|
|
jmp LBUF.DrawAtY
|
2017-07-05 16:45:19 +02:00
|
|
|
|
*--------------------------------------
|
2017-11-17 17:16:05 +01:00
|
|
|
|
* VLINE Y1,Y2 at X1 (XOR,SET,ORA)
|
2017-07-05 16:45:19 +02:00
|
|
|
|
*--------------------------------------
|
2017-12-22 22:24:30 +01:00
|
|
|
|
VLINE lda CB.Cache+S.CB.M
|
|
|
|
|
cmp #S.CB.M.MONO
|
2017-11-17 17:16:05 +01:00
|
|
|
|
bne VLINE.C16
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
VLINE.MONO >LDYA CB.Cache+S.CB.X1
|
|
|
|
|
|
2019-07-30 10:57:25 +02:00
|
|
|
|
jsr DIVMOD7YA X = MOD 7
|
2017-11-17 17:16:05 +01:00
|
|
|
|
tay
|
|
|
|
|
lda COL.OFS,y
|
2019-07-30 10:57:25 +02:00
|
|
|
|
sta ZPTmpByte Save COL (DIV)
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
lda COL.BANK,y
|
|
|
|
|
tay
|
|
|
|
|
sta $C000,y Select proper BANK
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2019-07-30 10:57:25 +02:00
|
|
|
|
ldy CB.Cache+S.CB.Y1
|
|
|
|
|
clc
|
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
lda CB.Cache+S.CB.OP
|
|
|
|
|
* cmp #S.CB.OP.XOR
|
|
|
|
|
beq VLINE.MONO.XOR
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
lda CB.Cache+S.CB.COLOR
|
|
|
|
|
bne VLINE.MONO.WHITE
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
VLINE.MONO.BLACK
|
2019-07-30 10:57:25 +02:00
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
.1 lda BASEL,y
|
2018-05-04 16:55:29 +02:00
|
|
|
|
adc ZPTmpByte
|
2017-11-15 08:27:12 +01:00
|
|
|
|
sta ZPBasePtr
|
2017-11-17 17:16:05 +01:00
|
|
|
|
lda BASEH,y
|
2017-11-15 08:27:12 +01:00
|
|
|
|
sta ZPBasePtr+1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
lda (ZPBasePtr)
|
|
|
|
|
and Mono.NMasks,x
|
|
|
|
|
sta (ZPBasePtr)
|
|
|
|
|
cpy CB.Cache+S.CB.Y2
|
|
|
|
|
iny
|
2017-07-05 16:45:19 +02:00
|
|
|
|
bcc .1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
VLINE.MONO.WHITE
|
2019-07-30 10:57:25 +02:00
|
|
|
|
lda #$1D ORA abs,x
|
|
|
|
|
.HS 2C BIT ABS
|
2017-11-17 17:16:05 +01:00
|
|
|
|
VLINE.MONO.XOR
|
2019-07-30 10:57:25 +02:00
|
|
|
|
lda #$5D EOR abs,x
|
|
|
|
|
sta .2
|
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
.1 lda BASEL,y
|
2018-05-04 16:55:29 +02:00
|
|
|
|
adc ZPTmpByte
|
2017-11-15 08:27:12 +01:00
|
|
|
|
sta ZPBasePtr
|
2017-11-17 17:16:05 +01:00
|
|
|
|
lda BASEH,y
|
2017-11-15 08:27:12 +01:00
|
|
|
|
sta ZPBasePtr+1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
lda (ZPBasePtr)
|
2019-07-30 10:57:25 +02:00
|
|
|
|
.2 eor Mono.Masks,x SELF MODIFIED
|
2017-11-17 17:16:05 +01:00
|
|
|
|
sta (ZPBasePtr)
|
|
|
|
|
cpy CB.Cache+S.CB.Y2
|
|
|
|
|
iny
|
|
|
|
|
bcc .1
|
2017-07-05 16:45:19 +02: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)
|
|
|
|
|
|
2019-07-30 10:57:25 +02:00
|
|
|
|
ldx CB.Cache+S.CB.Y1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2019-07-30 10:57:25 +02:00
|
|
|
|
.1 phy
|
|
|
|
|
phx
|
2017-11-17 17:16:05 +01:00
|
|
|
|
|
2019-07-30 10:57:25 +02:00
|
|
|
|
jsr SETPIXEL.C16.YX
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2019-07-30 10:57:25 +02:00
|
|
|
|
plx
|
|
|
|
|
ply
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2019-07-30 10:57:25 +02:00
|
|
|
|
cpy CB.Cache+S.CB.Y2
|
2017-07-05 16:45:19 +02:00
|
|
|
|
iny
|
2019-07-30 10:57:25 +02:00
|
|
|
|
bcc .1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
|
2019-07-30 10:57:25 +02:00
|
|
|
|
rts
|
2017-07-05 16:45:19 +02:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2018-12-19 08:12:58 +01:00
|
|
|
|
SAVE USR/SRC/DRV/DHGR.DRV.S.LINE
|
|
|
|
|
LOAD USR/SRC/DRV/DHGR.DRV.S
|
2017-07-05 16:45:19 +02:00
|
|
|
|
ASM
|