2022-10-18 05:56:59 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PTR.Update lda PTR.T
|
|
|
|
|
cmp #PTR.T.WAIT
|
|
|
|
|
bcc PTR.Set.RTS
|
|
|
|
|
|
|
|
|
|
inc
|
|
|
|
|
inc
|
|
|
|
|
cmp #PTR.T.WAIT+12
|
|
|
|
|
bne PTR.Set
|
|
|
|
|
|
|
|
|
|
lda #PTR.T.WAIT
|
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
* Set SrcPtr, SrcW, SrcH
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
PTR.Set sta PTR.T
|
|
|
|
|
|
2022-11-03 16:21:26 +00:00
|
|
|
|
jsr PTR.Disable
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-11-03 16:21:26 +00:00
|
|
|
|
ldx PTR.T
|
2022-10-18 05:56:59 +00:00
|
|
|
|
lda L.Cursors,x
|
|
|
|
|
sta CB.PTR+S.CB.SrcPtr
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
lda L.Cursors+1,x
|
|
|
|
|
sta CB.PTR+S.CB.SrcPtr+1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldy #S.BM.W+3
|
|
|
|
|
ldx #3
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.1 lda (ZPPtr1),y
|
|
|
|
|
sta CB.PTR+S.CB.SrcW,x
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bra PTR.Enable
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
PTR.Set.RTS rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PTR.SetRect >STYA ZPPtr1
|
|
|
|
|
jsr PTR.Disable
|
|
|
|
|
sec
|
|
|
|
|
ror PTR.T
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldy #7
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.1 lda (ZPPtr1),y
|
|
|
|
|
sta PTR.Rect,y
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-11-03 16:21:26 +00:00
|
|
|
|
bra PTR.Enable
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
* SetPos DestX,DestY
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
PTR.SetPos >PULLW ZPPtr1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr PTR.Disable
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
|
|
|
|
.1 ldy #S.POINT-1
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPPtr1),y
|
|
|
|
|
sta PTR.Pos,y
|
|
|
|
|
dey
|
|
|
|
|
bpl .2
|
2022-11-03 16:21:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
PTR.Enable bit PTR.bVisible
|
2022-10-18 05:56:59 +00:00
|
|
|
|
bmi PTR.Show.I
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-10-18 05:56:59 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-11-02 06:54:30 +00:00
|
|
|
|
PTR.Disable bit PTR.bVisible
|
|
|
|
|
bmi PTR.Hide.I
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-11-03 16:21:26 +00:00
|
|
|
|
PTR.Disable.8 clc
|
2022-11-02 06:54:30 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-10-18 05:56:59 +00:00
|
|
|
|
PTR.Hide lda PTR.bVisible
|
2022-11-03 16:21:26 +00:00
|
|
|
|
bpl PTR.Disable.8
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
|
|
|
|
stz PTR.bVisible
|
2022-11-03 16:21:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
PTR.Hide.I bit PTR.T
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
jmp PTR.ShowRect.I
|
|
|
|
|
|
|
|
|
|
.1 lda #S.CB.OP.RESTORE
|
2022-11-03 16:21:26 +00:00
|
|
|
|
bra PTR.Draw.I
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
PTR.Show lda PTR.bVisible
|
2022-11-03 16:21:26 +00:00
|
|
|
|
bmi PTR.Disable.8
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
|
|
|
|
dec PTR.bVisible
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PTR.Show.I ldx PTR.T
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bpl .10
|
|
|
|
|
|
|
|
|
|
jmp PTR.ShowRect.I
|
|
|
|
|
|
|
|
|
|
.10 lda PTR.Pos+S.POINT.X
|
2022-10-18 05:56:59 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc PTR.HotPoints,x
|
|
|
|
|
sta CB.PTR+S.CB.X1
|
|
|
|
|
|
|
|
|
|
lda PTR.Pos+S.POINT.X+1
|
|
|
|
|
sbc #0
|
|
|
|
|
sta CB.PTR+S.CB.X1+1
|
|
|
|
|
|
|
|
|
|
lda PTR.Pos+S.POINT.Y
|
|
|
|
|
sec
|
|
|
|
|
sbc PTR.HotPoints+1,x
|
|
|
|
|
sta CB.PTR+S.CB.Y1
|
|
|
|
|
|
|
|
|
|
lda PTR.Pos+S.POINT.Y+1
|
|
|
|
|
sbc #0
|
|
|
|
|
sta CB.PTR+S.CB.Y1+1
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldx CB.PTR+S.CB.SrcW+1
|
|
|
|
|
lda CB.PTR+S.CB.SrcW
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.1 dec
|
|
|
|
|
clc
|
|
|
|
|
adc CB.PTR+S.CB.X1
|
|
|
|
|
sta CB.PTR+S.CB.X2
|
|
|
|
|
txa
|
|
|
|
|
adc CB.PTR+S.CB.X1+1
|
|
|
|
|
sta CB.PTR+S.CB.X2+1
|
|
|
|
|
|
|
|
|
|
ldx CB.PTR+S.CB.SrcH+1
|
|
|
|
|
lda CB.PTR+S.CB.SrcH
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.2 dec
|
|
|
|
|
clc
|
|
|
|
|
adc CB.PTR+S.CB.Y1
|
|
|
|
|
sta CB.PTR+S.CB.Y2
|
|
|
|
|
txa
|
|
|
|
|
adc CB.PTR+S.CB.Y1+1
|
|
|
|
|
sta CB.PTR+S.CB.Y2+1
|
|
|
|
|
|
2022-10-18 05:56:59 +00:00
|
|
|
|
lda #S.CB.OP.ORA+S.CB.OP.MASK+S.CB.OP.SAVE
|
2022-12-07 07:02:29 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-18 05:56:59 +00:00
|
|
|
|
PTR.Draw.I sta CB.PTR+S.CB.OP
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
|
|
|
|
ldx #S.CB
|
|
|
|
|
|
|
|
|
|
.1 lda CB.PTR-1,x
|
|
|
|
|
sta CLIP.Cache-1,x
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
* ldx #0 select CLIP.Sreen
|
|
|
|
|
jsr CLIP.BitBltX
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
jsr CB.GFXWrite
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PTR.ShowRect.I lda #S.CB.CMD.HLINE
|
|
|
|
|
sta CLIP.Cache+S.CB.CMD
|
|
|
|
|
lda #S.CB.OP.XOR
|
|
|
|
|
sta CLIP.Cache+S.CB.OP
|
|
|
|
|
lda #S.CB.M.MONO
|
|
|
|
|
sta CLIP.Cache+S.CB.M
|
|
|
|
|
lda #C.WHITE
|
|
|
|
|
sta CLIP.Cache+S.CB.COLOR
|
|
|
|
|
>DEBUG
|
|
|
|
|
ldx #5 X1,Y1,X2
|
|
|
|
|
|
|
|
|
|
.1 lda PTR.Rect+S.RECT.X1,x
|
|
|
|
|
sta CLIP.Cache+S.CB.X1,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
jsr .7
|
|
|
|
|
|
|
|
|
|
>LDYA PTR.Rect+S.RECT.Y2
|
|
|
|
|
>STYA CLIP.Cache+S.CB.Y1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.7
|
|
|
|
|
* ldx #0 select CLIP.Sreen
|
|
|
|
|
* jsr CLIP.HLine
|
2022-11-03 16:21:26 +00:00
|
|
|
|
* bcs .8
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
|
|
|
|
jsr CB.GFXWrite
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libgui.s.ptr
|
|
|
|
|
LOAD usr/src/lib/libgui.s
|
|
|
|
|
ASM
|