2022-10-20 06:07:40 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.InitCacheA sta CB.Cache+S.CB.CMD
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
|
|
|
|
ldx #S.CB-1
|
2022-10-20 06:07:40 +00:00
|
|
|
|
|
|
|
|
|
.1 stz CB.Cache,x
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.GetInCache >STYA .1+1
|
|
|
|
|
|
|
|
|
|
ldx #S.CB-1
|
|
|
|
|
|
|
|
|
|
.1 lda $ffff,x SELF MODIFIED
|
|
|
|
|
sta CB.Cache,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
CB.GetWndYCacheX
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta CB.Cache,x
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta CB.Cache+1,x
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-10-27 15:14:06 +00:00
|
|
|
|
CB.BorderLineH lda #S.CB.CMD.HLINE
|
|
|
|
|
sta CB.Cache+S.CB.CMD
|
|
|
|
|
lda #S.CB.OP.SET
|
|
|
|
|
sta CB.Cache+S.CB.OP
|
|
|
|
|
lda #S.CB.M.MONO
|
|
|
|
|
sta CB.Cache+S.CB.M
|
|
|
|
|
lda PREFS.BorderColor
|
|
|
|
|
sta CB.Cache+S.CB.COLOR
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-10-26 06:12:16 +00:00
|
|
|
|
CB.FillRectMonoA
|
|
|
|
|
sta CB.Cache+S.CB.COLOR
|
|
|
|
|
|
|
|
|
|
lda #S.CB.CMD.FILLRECT
|
|
|
|
|
sta CB.Cache+S.CB.CMD
|
|
|
|
|
|
|
|
|
|
lda #S.CB.OP.SET
|
|
|
|
|
sta CB.Cache+S.CB.OP
|
|
|
|
|
|
|
|
|
|
lda #S.CB.M.MONO
|
|
|
|
|
sta CB.Cache+S.CB.M
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-10-20 06:07:40 +00:00
|
|
|
|
CB.GetBuf clc
|
|
|
|
|
|
|
|
|
|
ldx hCBBuf
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
>LDYAI 512
|
|
|
|
|
>SYSCALL2 GetMem
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
stx hCBBuf
|
|
|
|
|
>STYA ZPCBBufPtr
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.Cache2CBBuf
|
|
|
|
|
lda CB.Cache
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
ldy CB.CmdLen-1,x
|
|
|
|
|
|
|
|
|
|
ldx #0
|
|
|
|
|
|
|
|
|
|
.1 lda CB.Cache,x
|
|
|
|
|
sta (ZPCBBufPtr)
|
|
|
|
|
inc ZPCBBufPtr
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
inc ZPCBBufPtr+1
|
|
|
|
|
|
|
|
|
|
.2 inx
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-11-03 06:59:03 +00:00
|
|
|
|
* Y,A = Target Object
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.FlushBufToYA jsr CLIP.GetRect
|
2022-10-20 06:07:40 +00:00
|
|
|
|
|
2022-11-02 16:00:52 +00:00
|
|
|
|
lda hCBBuf
|
|
|
|
|
beq .8
|
2022-10-20 06:07:40 +00:00
|
|
|
|
|
2022-11-02 16:00:52 +00:00
|
|
|
|
lda #0
|
2022-10-20 06:07:40 +00:00
|
|
|
|
sta (ZPCBBufPtr)
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
lda hCBBuf
|
|
|
|
|
>SYSCALL2 GetMemPtr
|
|
|
|
|
>STYA ZPCBBufPtr
|
2022-10-20 06:07:40 +00:00
|
|
|
|
|
2022-11-02 16:00:52 +00:00
|
|
|
|
jsr PTR.Disable
|
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
.2 lda (ZPCBBufPtr)
|
2022-10-20 06:07:40 +00:00
|
|
|
|
beq .7
|
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>LDYA ZPCBBufPtr
|
2022-10-20 06:07:40 +00:00
|
|
|
|
jsr CB.GetInCache A = CB.CMD
|
|
|
|
|
|
|
|
|
|
cmp #S.CB.CMD.DRAWTEXT2
|
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
lda #S.CB.CMD.DRAWTEXT+S.CB.CMD.OSD
|
|
|
|
|
sta CB.Cache+S.CB.CMD
|
|
|
|
|
jsr CB.GFXWrite
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
jsr CLIP.CB.Cache
|
|
|
|
|
bcs .3
|
|
|
|
|
|
|
|
|
|
jsr CB.GFXWrite
|
|
|
|
|
|
|
|
|
|
.3 lda CB.Cache+S.CB.SrcPtr
|
|
|
|
|
>SYSCALL2 FreeStkObj
|
|
|
|
|
bra .5
|
|
|
|
|
|
|
|
|
|
.4 jsr CLIP.CB.Cache
|
|
|
|
|
bcs .5
|
|
|
|
|
|
|
|
|
|
jsr CB.GFXWrite
|
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
.5 lda (ZPCBBufPtr) Get Cmd
|
2022-10-20 06:07:40 +00:00
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
lda CB.CmdLen-1,x
|
|
|
|
|
sec +1
|
2022-10-25 06:05:54 +00:00
|
|
|
|
adc ZPCBBufPtr
|
|
|
|
|
sta ZPCBBufPtr
|
2022-10-20 06:07:40 +00:00
|
|
|
|
bcc .2
|
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
inc ZPCBBufPtr+1
|
2022-10-20 06:07:40 +00:00
|
|
|
|
bra .2
|
|
|
|
|
|
|
|
|
|
.7 lda hCBBuf
|
|
|
|
|
stz hCBBuf
|
|
|
|
|
>SYSCALL2 FreeMem
|
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jmp PTR.Enable
|
2022-10-20 06:07:40 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2022-11-03 16:21:26 +00:00
|
|
|
|
CB.GFXWritePtr jsr PTR.Disable
|
|
|
|
|
jsr CB.GFXWrite
|
|
|
|
|
jmp PTR.Enable
|
|
|
|
|
*--------------------------------------
|
2022-10-20 06:07:40 +00:00
|
|
|
|
CB.GFXWrite >PUSHB WND.Screen+S.OBJ.hPARENT
|
|
|
|
|
>PUSHBI IOCTL.WRITE
|
|
|
|
|
>PUSHW L.CB.Cache
|
|
|
|
|
>SYSCALL2 IOCTL
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-11-02 16:00:52 +00:00
|
|
|
|
CB.SetX2Y2 lda CB.Cache+S.CB.SrcW
|
|
|
|
|
clc
|
|
|
|
|
adc CB.Cache+S.CB.X1
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
lda CB.Cache+S.CB.SrcW+1
|
|
|
|
|
adc CB.Cache+S.CB.X1+1
|
|
|
|
|
tax
|
|
|
|
|
pla
|
|
|
|
|
bne .2
|
2022-10-20 06:07:40 +00:00
|
|
|
|
|
2022-11-02 16:00:52 +00:00
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.2 dec
|
|
|
|
|
sta CB.Cache+S.CB.X2
|
|
|
|
|
stx CB.Cache+S.CB.X2+1
|
|
|
|
|
|
|
|
|
|
lda CB.Cache+S.CB.SrcH
|
2022-10-20 06:07:40 +00:00
|
|
|
|
|
2022-11-02 16:00:52 +00:00
|
|
|
|
clc
|
|
|
|
|
adc CB.Cache+S.CB.Y1
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
lda CB.Cache+S.CB.SrcH+1
|
|
|
|
|
adc CB.Cache+S.CB.Y1+1
|
|
|
|
|
tax
|
|
|
|
|
pla
|
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.3 dec
|
|
|
|
|
sta CB.Cache+S.CB.Y2
|
|
|
|
|
stx CB.Cache+S.CB.Y2+1
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.ToGlobal >STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
.1 ldy #S.OBJ.X1
|
|
|
|
|
ldx #S.CB.X1
|
|
|
|
|
jsr CB.AddPtr1YtoCBX
|
|
|
|
|
|
|
|
|
|
ldy #S.WND.InnerY1
|
|
|
|
|
ldx #S.CB.Y1
|
|
|
|
|
jsr CB.AddPtr1YtoCBX
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X1
|
|
|
|
|
ldx #S.CB.X2
|
|
|
|
|
jsr CB.AddPtr1YtoCBX
|
|
|
|
|
|
|
|
|
|
ldy #S.WND.InnerY1
|
|
|
|
|
ldx #S.CB.Y2
|
|
|
|
|
jsr CB.AddPtr1YtoCBX
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.hPARENT+1
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
beq .8 00xx = hDev
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
stx ZPPtr1+1
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.AddPtr1YtoCBX
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
clc
|
|
|
|
|
adc CB.Cache,x
|
|
|
|
|
sta CB.Cache,x
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
adc CB.Cache+1,x
|
|
|
|
|
sta CB.Cache+1,x
|
|
|
|
|
rts
|
2022-10-20 06:07:40 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libgui.s.cb
|
|
|
|
|
LOAD usr/src/lib/libgui.s
|
|
|
|
|
ASM
|