mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-25 19:30:44 +00:00
Kernel 0.9.1 : GUI, BitBlt debugging....
This commit is contained in:
parent
e520199eb5
commit
c19f98bd81
Binary file not shown.
Binary file not shown.
@ -27,6 +27,14 @@ BITBLT >LDYA CB.CACHE+S.CB.SrcPtr
|
|||||||
dey
|
dey
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
|
lda ZPBMDataPtr
|
||||||
|
clc
|
||||||
|
adc BM.Cache+S.BM.MASK.OFS
|
||||||
|
sta ZPBMMaskPtr
|
||||||
|
lda ZPBMDataPtr+1
|
||||||
|
adc BM.Cache+S.BM.MASK.OFS+1
|
||||||
|
sta ZPBMMaskPtr+1
|
||||||
|
|
||||||
lda ZPBMDataPtr
|
lda ZPBMDataPtr
|
||||||
clc
|
clc
|
||||||
adc #S.BM
|
adc #S.BM
|
||||||
@ -43,19 +51,19 @@ BITBLT >LDYA CB.CACHE+S.CB.SrcPtr
|
|||||||
pha
|
pha
|
||||||
tya
|
tya
|
||||||
clc
|
clc
|
||||||
adc ZPBMDataPtr0
|
adc ZPBMDataPtr
|
||||||
sta ZPBMDataPtr0
|
sta BLT.BMDataPtr
|
||||||
pla
|
pla
|
||||||
pha
|
pha
|
||||||
adc ZPBMDataPtr0+1
|
adc ZPBMDataPtr+1
|
||||||
sta ZPBMDataPtr0+1
|
sta BLT.BMDataPtr+1
|
||||||
|
|
||||||
tya
|
tya
|
||||||
adc BM.Cache+S.BM.MASK.OFS
|
adc ZPBMMaskPtr
|
||||||
sta ZPBMMaskPtr0
|
sta BLT.BMMaskPtr
|
||||||
pla
|
pla
|
||||||
adc BM.Cache+S.BM.MASK.OFS+1
|
adc ZPBMMaskPtr+1
|
||||||
sta ZPBMMaskPtr0+1
|
sta BLT.BMMaskPtr+1
|
||||||
|
|
||||||
lda CB.Cache+S.CB.X1
|
lda CB.Cache+S.CB.X1
|
||||||
pha
|
pha
|
||||||
@ -72,133 +80,141 @@ BITBLT >LDYA CB.CACHE+S.CB.SrcPtr
|
|||||||
|
|
||||||
pha
|
pha
|
||||||
clc
|
clc
|
||||||
adc ZPBMDataPtr0
|
adc BLT.BMDataPtr
|
||||||
sta ZPBMDataPtr0
|
sta BLT.BMDataPtr
|
||||||
bcc .3
|
bcc .3
|
||||||
|
|
||||||
inc ZPBMDataPtr0+1
|
inc BLT.BMDataPtr+1
|
||||||
|
|
||||||
.3 pla
|
.3 pla
|
||||||
adc ZPBMMaskPtr0
|
adc BLT.BMMaskPtr
|
||||||
sta ZPBMMaskPtr0
|
sta BLT.BMMaskPtr
|
||||||
bcc .4
|
bcc .4
|
||||||
|
|
||||||
inc ZPBMMaskPtr0+1
|
inc BLT.BMMaskPtr+1
|
||||||
|
|
||||||
.4 lda S.CB.X2
|
.4 lda CB.Cache+S.CB.X2
|
||||||
sec
|
sec
|
||||||
sbc S.CB.X1
|
sbc CB.Cache+S.CB.X1
|
||||||
sta BLT.DX
|
sta BLT.DX
|
||||||
|
|
||||||
lda S.CB.X2+1
|
lda CB.Cache+S.CB.X2+1
|
||||||
sbc S.CB.X1+1
|
sbc CB.Cache+S.CB.X1+1
|
||||||
sta BLT.DX+1
|
sta BLT.DX+1
|
||||||
|
|
||||||
>LDYA S.CB.DestX
|
>LDYA CB.Cache+S.CB.DestX
|
||||||
jsr LBUF.SetBounds1YA
|
jsr LBUF.SetBounds1YA
|
||||||
stx BLT.SCRBitOfs
|
stx BLT.SCRBitOfs
|
||||||
|
|
||||||
lda S.CB.DestX
|
lda CB.Cache+S.CB.DestX
|
||||||
clc
|
clc
|
||||||
adc BLT.DX
|
adc BLT.DX
|
||||||
tay
|
tay
|
||||||
lda S.CB.DestX+1
|
lda CB.Cache+S.CB.DestX+1
|
||||||
adc BLT.DX+1
|
adc BLT.DX+1
|
||||||
jsr LBUF.SetBounds2YA
|
jsr LBUF.SetBounds2YA
|
||||||
|
|
||||||
lda S.CB.Y2
|
lda CB.Cache+S.CB.Y2
|
||||||
sec
|
sec
|
||||||
sbc S.CB.Y1
|
sbc CB.Cache+S.CB.Y1
|
||||||
|
inc
|
||||||
sta BLT.DY
|
sta BLT.DY
|
||||||
|
|
||||||
lda BLT.BMBitOfs
|
|
||||||
sta BLT.BMBitOfsL
|
|
||||||
lda LBUF.C1
|
|
||||||
sta BLT.ScreenC
|
|
||||||
|
|
||||||
>LDYA ZPBMDataPtr0
|
|
||||||
>STYA ZPBMDataPtr
|
|
||||||
>LDYA ZPBMMaskPtr0
|
|
||||||
>STYA ZPBMMaskPtr
|
|
||||||
|
|
||||||
ldx BLT.SCRBitOfs
|
ldx BLT.SCRBitOfs
|
||||||
beq BITBLT.LOOP
|
beq BITBLT.LOOP
|
||||||
|
|
||||||
ldy Shift.L.LO,x X = 1->6
|
ldy Shift.L.LO,x X = 1->6
|
||||||
sty ZPShiftPtr
|
sty ZPScrShiftPtr
|
||||||
|
|
||||||
ldy Shift.L.HI,x X = 1->6
|
ldy Shift.L.HI,x X = 1->6
|
||||||
sty ZPShiftPtr+1
|
sty ZPScrShiftPtr+1
|
||||||
|
|
||||||
|
BITBLT.LOOP >LDYA BLT.BMDataPtr
|
||||||
|
>STYA ZPBMDataPtr
|
||||||
|
>LDYA BLT.BMMaskPtr
|
||||||
|
>STYA ZPBMMaskPtr
|
||||||
|
|
||||||
BITBLT.LOOP ldx BLT.SCRBitOfs
|
lda BLT.BMBitOfs
|
||||||
|
sta BLT.BMBitOfsL
|
||||||
|
stz BLT.BMIdx
|
||||||
|
|
||||||
|
ldx LBUF.C1
|
||||||
|
stx BLT.ScrColIdx
|
||||||
|
stz LBUF.DATA,x make sure C1 not ORed with trash in "ora LBUF.DATA,x"
|
||||||
|
|
||||||
|
ldx BLT.SCRBitOfs
|
||||||
bne .2
|
bne .2
|
||||||
|
|
||||||
|
*------------ Shift 0
|
||||||
|
|
||||||
.1 jsr BLT.Get7BMDBits we have 0xxxxxxxx in A
|
.1 jsr BLT.Get7BMDBits we have 0xxxxxxxx in A
|
||||||
|
|
||||||
ldx BLT.ScreenC
|
ldx BLT.ScrColIdx
|
||||||
sta LBUF.DATA,x
|
sta LBUF.DATA,x
|
||||||
inc BLT.ScreenC
|
inc BLT.ScrColIdx
|
||||||
cpx LBUF.C2
|
cpx LBUF.C2
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
bra BITBLT.DRAW
|
bra BITBLT.DRAW
|
||||||
|
|
||||||
.2 jsr BLT.Get7BMDBits we have 0xxxxxxxx in A
|
*------------ Shift 1->6 Comment : SCRBitOfs=X=3
|
||||||
|
|
||||||
pha save it for 2nd part
|
.2 lda Shift7BitsCol1,x get #%00001111, BM bits that go in Col1
|
||||||
|
sta .4+1
|
||||||
|
lda Shift7BitsCol2,x get #%01110000, BM bits that go in Col2
|
||||||
|
sta .5+1
|
||||||
|
|
||||||
ldx BLT.SCRBitOfs
|
.3 jsr BLT.Get7BMDBits we have c6543210 in A, destination : COL=3210xxx, COL+1=xxxx654
|
||||||
and Mask7BitsH,x 0000xxxx, keep col1 bits only
|
|
||||||
|
pha save BM byte for 2nd col
|
||||||
|
|
||||||
|
.4 and #$ff SELF MODIFIED : MASK WITH #%00001111, keep col1 bits only
|
||||||
tay
|
tay
|
||||||
|
|
||||||
lda (ZPShiftPtr),y make 0xxxx000
|
lda (ZPScrShiftPtr),y make 0000dddd Shift left 3 : 0dddd000
|
||||||
|
|
||||||
ldy BLT.ScreenC
|
ldx BLT.ScrColIdx Get actual COL index
|
||||||
ora LBUF.DATA,y
|
ora LBUF.DATA,x Light proper bits : 0dddd???
|
||||||
sta LBUF.DATA,y
|
sta LBUF.DATA,x store 0xdddd???
|
||||||
|
|
||||||
pla
|
pla Get back BM Byte
|
||||||
|
|
||||||
inc BLT.ScreenC
|
.5 and #$ff SELF MODIFIED : #%01110000 get only col2 bites
|
||||||
cpy LBUF.C2
|
|
||||||
beq BITBLT.DRAW
|
|
||||||
|
|
||||||
and Mask7BitsL,x 0yyy0000
|
|
||||||
tay
|
tay
|
||||||
|
|
||||||
lda (ZPShiftPtr),y 00000yyy
|
lda (ZPScrShiftPtr),y shift right 4 (=shift left 3!!!) : 00000ddd
|
||||||
|
|
||||||
ldy BLT.ScreenC
|
sta LBUF.DATA+1,x
|
||||||
sta LBUF.DATA,y
|
|
||||||
|
|
||||||
inc BLT.ScreenC
|
inx
|
||||||
cpy LBUF.C2
|
stx BLT.ScrColIdx
|
||||||
bne .2
|
cpx LBUF.C2
|
||||||
|
bne .3
|
||||||
|
|
||||||
BITBLT.DRAW ldy S.CB.Y1
|
BITBLT.DRAW ldy CB.Cache+S.CB.DestY
|
||||||
jsr LBUF.DrawAtY
|
jsr LBUF.DrawAtY
|
||||||
inc S.CB.Y1
|
inc CB.Cache+S.CB.DestY
|
||||||
|
|
||||||
lda ZPBMDataPtr0
|
lda BLT.BMDataPtr
|
||||||
clc
|
clc
|
||||||
adc BM.Cache+S.BM.RowBytes
|
adc BM.Cache+S.BM.RowBytes
|
||||||
sta ZPBMDataPtr0
|
sta BLT.BMDataPtr
|
||||||
bcc .6
|
bcc .6
|
||||||
|
|
||||||
inc ZPBMDataPtr0+1
|
inc BLT.BMDataPtr+1
|
||||||
|
|
||||||
.6 lda ZPBMMaskPtr0
|
.6 lda BLT.BMMaskPtr
|
||||||
clc
|
clc
|
||||||
adc BM.Cache+S.BM.RowBytes
|
adc BM.Cache+S.BM.RowBytes
|
||||||
sta ZPBMMaskPtr0
|
sta BLT.BMMaskPtr
|
||||||
bcc .7
|
bcc .7
|
||||||
|
|
||||||
inc ZPBMMaskPtr0+1
|
inc BLT.BMMaskPtr+1
|
||||||
|
|
||||||
.7 dec BLT.DY
|
.7 dec BLT.DY
|
||||||
bne BITBLT.LOOP
|
beq .8
|
||||||
clc
|
jmp BITBLT.LOOP
|
||||||
|
|
||||||
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* BMD/BMM bits :
|
* BMD/BMM bits :
|
||||||
@ -210,7 +226,8 @@ BITBLT.DRAW ldy S.CB.Y1
|
|||||||
* ^
|
* ^
|
||||||
* SCRBitOfs (0->6)
|
* SCRBitOfs (0->6)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BLT.Get7BMDBits lda (ZPBMDataPtr)
|
BLT.Get7BMDBits ldy BLT.BMIdx
|
||||||
|
lda (ZPBMDataPtr),y
|
||||||
|
|
||||||
ldx BLT.BMBitOfsL
|
ldx BLT.BMBitOfsL
|
||||||
beq BLT.Get7BMBits0 OFS=0, done! and no need to advance ZPBMDataPtr
|
beq BLT.Get7BMBits0 OFS=0, done! and no need to advance ZPBMDataPtr
|
||||||
@ -219,28 +236,28 @@ BLT.Get7BMDBits lda (ZPBMDataPtr)
|
|||||||
beq BLT.Get7BMBits1 OFS was 1....done and go to next byte, OFS=0
|
beq BLT.Get7BMBits1 OFS was 1....done and go to next byte, OFS=0
|
||||||
|
|
||||||
ldy Shift.R.LO,x X = 1->6
|
ldy Shift.R.LO,x X = 1->6
|
||||||
sty ZPShiftPtr
|
sty ZPBMShiftPtr
|
||||||
|
|
||||||
ldy Shift.R.HI,x X = 1->6
|
ldy Shift.R.HI,x X = 1->6
|
||||||
sty ZPShiftPtr+1
|
sty ZPBMShiftPtr+1
|
||||||
|
|
||||||
and Mask7BitsL,x Get only left upper X bits
|
and Mask7BitsH,x Get only left upper X bits
|
||||||
tay xxxxx000
|
tay xxxxx000
|
||||||
|
|
||||||
lda (ZPShiftPtr),y shift'em RIGHT 000xxxxx
|
lda (ZPBMShiftPtr),y shift'em RIGHT 000xxxxx
|
||||||
pha
|
pha
|
||||||
|
|
||||||
inc ZPBMDataPtr Next BM data byte
|
inc BLT.BMIdx Next BM data byte
|
||||||
bne .2
|
|
||||||
inc ZPBMDataPtr+1
|
|
||||||
|
|
||||||
.2 lda (ZPBMDataPtr) get next byte
|
ldy BLT.BMIdx
|
||||||
and Mask7BitsH,x only first Y bits 000000yy
|
lda (ZPBMDataPtr),y get next byte
|
||||||
|
|
||||||
|
and Mask7BitsL,x only first Y bits 000000yy
|
||||||
tay
|
tay
|
||||||
|
|
||||||
pla get back right part bits 000xxxxx
|
pla get back right part bits 000xxxxx
|
||||||
|
|
||||||
ora (ZPShiftPtr),y shift right 000000yy and ORA with 000xxxxx=0yyxxxxx
|
ora (ZPBMShiftPtr),y shift right 000000yy and ORA with 000xxxxx=0yyxxxxx
|
||||||
|
|
||||||
dec BLT.BMBitOfsL X = 1->6, ADD 7 MOD 8.....
|
dec BLT.BMBitOfsL X = 1->6, ADD 7 MOD 8.....
|
||||||
rts
|
rts
|
||||||
@ -251,12 +268,8 @@ BLT.Get7BMBits0 and #%01111111 Get only 7 needed bits
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
BLT.Get7BMBits1 stz BLT.BMBitOfsL Was 1, add 7 bits, MOD 8=0
|
BLT.Get7BMBits1 stz BLT.BMBitOfsL Was 1, add 7 bits, MOD 8=0
|
||||||
|
inc BLT.BMIdx go to next byte in BM line
|
||||||
inc ZPBMDataPtr go to next byte
|
rts LSR did already 0xxxxxxx
|
||||||
bne .1
|
|
||||||
inc ZPBMDataPtr+1
|
|
||||||
|
|
||||||
.1 rts LSR did already 0xxxxxxx
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE /A2OSX.SRC/DRV/DHGR.DRV.S.RECT
|
SAVE /A2OSX.SRC/DRV/DHGR.DRV.S.RECT
|
||||||
|
@ -70,6 +70,7 @@ LBUF.DrawAtY.XOR
|
|||||||
lda LBUF.DATA,x get DATA bits
|
lda LBUF.DATA,x get DATA bits
|
||||||
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
||||||
ora GBYTE
|
ora GBYTE
|
||||||
|
eor (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y update screen
|
sta (ZPBasePtr),y update screen
|
||||||
|
|
||||||
inx
|
inx
|
||||||
@ -81,7 +82,8 @@ LBUF.DrawAtY.XOR
|
|||||||
sta $C000,y
|
sta $C000,y
|
||||||
ldy COL.OFS,x
|
ldy COL.OFS,x
|
||||||
|
|
||||||
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
lda LBUF.DATA,x
|
||||||
|
eor (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y
|
sta (ZPBasePtr),y
|
||||||
|
|
||||||
inx
|
inx
|
||||||
@ -98,6 +100,7 @@ LBUF.DrawAtY.XOR
|
|||||||
lda LBUF.DATA,x get DATA bits
|
lda LBUF.DATA,x get DATA bits
|
||||||
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
||||||
ora GBYTE
|
ora GBYTE
|
||||||
|
eor (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y update screen
|
sta (ZPBasePtr),y update screen
|
||||||
|
|
||||||
.8 rts
|
.8 rts
|
||||||
@ -109,7 +112,7 @@ LBUF.DrawAtY.SET
|
|||||||
sta $C000,y
|
sta $C000,y
|
||||||
ldy COL.OFS,x
|
ldy COL.OFS,x
|
||||||
|
|
||||||
lda (ZPBasePtr),y Get C1
|
lda (ZPBasePtr),y data for Get C1
|
||||||
and LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
|
and LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
|
||||||
sta GBYTE
|
sta GBYTE
|
||||||
lda LBUF.DATA,x get DATA bits
|
lda LBUF.DATA,x get DATA bits
|
||||||
@ -160,6 +163,7 @@ LBUF.DrawAtY.ORA
|
|||||||
lda LBUF.DATA,x get DATA bits
|
lda LBUF.DATA,x get DATA bits
|
||||||
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
||||||
ora GBYTE
|
ora GBYTE
|
||||||
|
ora (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y update screen
|
sta (ZPBasePtr),y update screen
|
||||||
|
|
||||||
inx
|
inx
|
||||||
@ -172,6 +176,7 @@ LBUF.DrawAtY.ORA
|
|||||||
ldy COL.OFS,x
|
ldy COL.OFS,x
|
||||||
|
|
||||||
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
||||||
|
ora (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y
|
sta (ZPBasePtr),y
|
||||||
|
|
||||||
inx
|
inx
|
||||||
@ -188,6 +193,7 @@ LBUF.DrawAtY.ORA
|
|||||||
lda LBUF.DATA,x get DATA bits
|
lda LBUF.DATA,x get DATA bits
|
||||||
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
||||||
ora GBYTE
|
ora GBYTE
|
||||||
|
ora (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y update screen
|
sta (ZPBasePtr),y update screen
|
||||||
|
|
||||||
.8 rts
|
.8 rts
|
||||||
@ -205,6 +211,7 @@ LBUF.DrawAtY.AND
|
|||||||
lda LBUF.DATA,x get DATA bits
|
lda LBUF.DATA,x get DATA bits
|
||||||
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
||||||
ora GBYTE
|
ora GBYTE
|
||||||
|
and (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y update screen
|
sta (ZPBasePtr),y update screen
|
||||||
|
|
||||||
inx
|
inx
|
||||||
@ -217,6 +224,7 @@ LBUF.DrawAtY.AND
|
|||||||
ldy COL.OFS,x
|
ldy COL.OFS,x
|
||||||
|
|
||||||
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
||||||
|
and (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y
|
sta (ZPBasePtr),y
|
||||||
|
|
||||||
inx
|
inx
|
||||||
@ -233,6 +241,7 @@ LBUF.DrawAtY.AND
|
|||||||
lda LBUF.DATA,x get DATA bits
|
lda LBUF.DATA,x get DATA bits
|
||||||
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
||||||
ora GBYTE
|
ora GBYTE
|
||||||
|
and (ZPBasePtr),y
|
||||||
sta (ZPBasePtr),y update screen
|
sta (ZPBasePtr),y update screen
|
||||||
|
|
||||||
.8 rts
|
.8 rts
|
||||||
|
@ -17,9 +17,9 @@ AUTO 6
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPCmdPtr .EQ ZPDRV
|
ZPCmdPtr .EQ ZPDRV
|
||||||
ZPBasePtr .EQ ZPDRV+2
|
ZPBasePtr .EQ ZPDRV+2
|
||||||
ZPShiftPtr .EQ ZPDRV+4
|
ZPBMShiftPtr .EQ ZPDRV+4
|
||||||
ZPBMDataPtr0 .EQ ZPDRV+6
|
|
||||||
ZPBMMaskPtr0 .EQ ZPDRV+8
|
ZPScrShiftPtr .EQ ZPDRV+8
|
||||||
ZPBMDataPtr .EQ ZPDRV+10
|
ZPBMDataPtr .EQ ZPDRV+10
|
||||||
ZPBMMaskPtr .EQ ZPDRV+12
|
ZPBMMaskPtr .EQ ZPDRV+12
|
||||||
ZPBMSavePtr .EQ ZPDRV+14
|
ZPBMSavePtr .EQ ZPDRV+14
|
||||||
@ -171,7 +171,7 @@ OPEN sta A2osX.SCRNDEVS+2 DEV.ID in A
|
|||||||
inx
|
inx
|
||||||
|
|
||||||
lda L.SHIFT,x Get relocated HI BYTE
|
lda L.SHIFT,x Get relocated HI BYTE
|
||||||
sta Shift.L.LO,y
|
sta Shift.L.HI,y
|
||||||
inx
|
inx
|
||||||
iny
|
iny
|
||||||
cpx #12
|
cpx #12
|
||||||
@ -181,11 +181,11 @@ OPEN sta A2osX.SCRNDEVS+2 DEV.ID in A
|
|||||||
ldy #6
|
ldy #6
|
||||||
|
|
||||||
.2 lda L.SHIFT,x Get relocated LO BYTE
|
.2 lda L.SHIFT,x Get relocated LO BYTE
|
||||||
sta Shift.L.LO,y
|
sta Shift.R.LO,y
|
||||||
inx
|
inx
|
||||||
|
|
||||||
lda L.SHIFT,x Get relocated HI BYTE
|
lda L.SHIFT,x Get relocated HI BYTE
|
||||||
sta Shift.L.LO,y
|
sta Shift.R.HI,y
|
||||||
inx
|
inx
|
||||||
dey
|
dey
|
||||||
bne .2
|
bne .2
|
||||||
@ -402,12 +402,15 @@ LBUF.C2.DATA .BS 1
|
|||||||
LBUF.MASK .BS 80
|
LBUF.MASK .BS 80
|
||||||
LBUF.DATA .BS 80
|
LBUF.DATA .BS 80
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BLT.BMBitOfs .BS 1
|
BLT.BMDataPtr .BS 2
|
||||||
BLT.BMBitOfsL .BS 1
|
BLT.BMMaskPtr .BS 2
|
||||||
BLT.SCRBitOfs .BS 1
|
|
||||||
BLT.DX .BS 2
|
BLT.DX .BS 2
|
||||||
BLT.DY .BS 1
|
BLT.DY .BS 1
|
||||||
BLT.ScreenC .BS 1
|
BLT.BMBitOfs .BS 1
|
||||||
|
BLT.BMBitOfsL .BS 1
|
||||||
|
BLT.BMIdx .BS 1
|
||||||
|
BLT.SCRBitOfs .BS 1
|
||||||
|
BLT.ScrColIdx .BS 1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
GBYTE .BS 1
|
GBYTE .BS 1
|
||||||
GWORD .BS 2
|
GWORD .BS 2
|
||||||
|
@ -5,36 +5,69 @@ INC 1
|
|||||||
AUTO 6
|
AUTO 6
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Mask7BitsL .DA #01111111 Useless
|
Mask7BitsH .DA #%01111111 Useless
|
||||||
.DA #01111110
|
.DA #%01111110
|
||||||
.DA #01111100
|
.DA #%01111100
|
||||||
.DA #01111000
|
.DA #%01111000
|
||||||
.DA #01110000
|
.DA #%01110000
|
||||||
.DA #01100000
|
.DA #%01100000
|
||||||
.DA #01000000
|
.DA #%01000000
|
||||||
Mask7BitsH .DA #00000000 Useless
|
|
||||||
.DA #00000001
|
Mask7BitsL .DA #%00000000 Useless
|
||||||
.DA #00000011
|
.DA #%00000001
|
||||||
.DA #00000111
|
.DA #%00000011
|
||||||
.DA #00001111
|
.DA #%00000111
|
||||||
.DA #00011111
|
.DA #%00001111
|
||||||
.DA #00111111
|
.DA #%00011111
|
||||||
|
.DA #%00111111
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
C1.MASK .DA #%10000000 mod 0.....
|
Shift7BitsCol1 .DA #%01111111 Useless
|
||||||
C2.DATA .DA #%10000001 ->C1.DATA
|
.DA #%00111111
|
||||||
|
.DA #%00011111
|
||||||
|
.DA #%00001111
|
||||||
|
.DA #%00000111
|
||||||
|
.DA #%00000011
|
||||||
|
.DA #%00000001
|
||||||
|
|
||||||
|
Shift7BitsCol2 .DA #%00000000 Useless
|
||||||
|
.DA #%01000000
|
||||||
|
.DA #%01100000
|
||||||
|
.DA #%01110000
|
||||||
|
.DA #%01111000
|
||||||
|
.DA #%01111100
|
||||||
|
.DA #%01111111
|
||||||
|
*--------------------------------------
|
||||||
|
C1.MASK .DA #%10000000 Clear (AND) Col 1 bits
|
||||||
|
.DA #%10000001
|
||||||
.DA #%10000011
|
.DA #%10000011
|
||||||
.DA #%10000111
|
.DA #%10000111
|
||||||
.DA #%10001111
|
.DA #%10001111
|
||||||
.DA #%10011111
|
.DA #%10011111
|
||||||
.DA #%10111111 ...to 6
|
.DA #%10111111
|
||||||
C1.DATA .DA #%11111111
|
|
||||||
C2.MASK .DA #%11111110
|
C1.DATA .DA #%11111111 set (ORA) COL 1 bits
|
||||||
|
.DA #%11111110
|
||||||
|
.DA #%11111100
|
||||||
|
.DA #%11111000
|
||||||
|
.DA #%11110000
|
||||||
|
.DA #%11100000
|
||||||
|
.DA #%11000000
|
||||||
|
*--------------------------------------
|
||||||
|
C2.MASK .DA #%11111110 Clear (AND) Col 1 bits
|
||||||
.DA #%11111100
|
.DA #%11111100
|
||||||
.DA #%11111000
|
.DA #%11111000
|
||||||
.DA #%11110000
|
.DA #%11110000
|
||||||
.DA #%11100000
|
.DA #%11100000
|
||||||
.DA #%11000000
|
.DA #%11000000
|
||||||
.DA #%10000000
|
.DA #%10000000
|
||||||
|
|
||||||
|
C2.DATA .DA #%10000001 set (ORA) COL 1 bits
|
||||||
|
.DA #%10000011
|
||||||
|
.DA #%10000111
|
||||||
|
.DA #%10001111
|
||||||
|
.DA #%10011111
|
||||||
|
.DA #%10111111
|
||||||
|
.DA #%11111111
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Mono.NMasks .DA #%01111110
|
Mono.NMasks .DA #%01111110
|
||||||
.DA #%01111101
|
.DA #%01111101
|
||||||
@ -82,19 +115,19 @@ Color.Masks .DA #%10001111,#%00000000,#%00000000,#%00000000
|
|||||||
* c1110000 c3322221 c5444433 c6666555
|
* c1110000 c3322221 c5444433 c6666555
|
||||||
Color.Pixels .DA #%00000000,#%00000000,#%00000000,#%00000000 black (color bit disable)
|
Color.Pixels .DA #%00000000,#%00000000,#%00000000,#%00000000 black (color bit disable)
|
||||||
.DA #%01111111,#%01111111,#%01111111,#%01111111 white (color bit disable)
|
.DA #%01111111,#%01111111,#%01111111,#%01111111 white (color bit disable)
|
||||||
.DA #%10010001,#%10100010,#%11000100,#%10001000 dark blue
|
.DA #%10101010,#%11010101,#%10101010,#%11010101 grey1
|
||||||
.DA #%10100010,#%11000100,#%10001000,#%10010001 dark green
|
|
||||||
.DA #%10110011,#%11100110,#%11001100,#%10011001 medium blue
|
|
||||||
.DA #%11000100,#%10001000,#%10010001,#%10100010 brown
|
|
||||||
.DA #%11010101,#%10101010,#%11010101,#%10101010 grey2
|
.DA #%11010101,#%10101010,#%11010101,#%10101010 grey2
|
||||||
|
.DA #%10010001,#%10100010,#%11000100,#%10001000 dark blue
|
||||||
|
.DA #%10110011,#%11100110,#%11001100,#%10011001 medium blue
|
||||||
|
.DA #%10111011,#%11110111,#%11101110,#%11011101 light blue
|
||||||
|
.DA #%10100010,#%11000100,#%10001000,#%10010001 dark green
|
||||||
.DA #%11100110,#%11001100,#%10011001,#%10110011 green
|
.DA #%11100110,#%11001100,#%10011001,#%10110011 green
|
||||||
.DA #%11110111,#%11101110,#%11011101,#%10111011 aqua
|
.DA #%11110111,#%11101110,#%11011101,#%10111011 aqua
|
||||||
.DA #%10001000,#%10010001,#%10100010,#%11000100 Magenta
|
.DA #%10001000,#%10010001,#%10100010,#%11000100 Magenta
|
||||||
.DA #%10011001,#%10110011,#%11100110,#%11001100 violet
|
.DA #%10011001,#%10110011,#%11100110,#%11001100 violet
|
||||||
.DA #%10101010,#%11010101,#%10101010,#%11010101 grey1
|
|
||||||
.DA #%10111011,#%11110111,#%11101110,#%11011101 light blue
|
|
||||||
.DA #%11001100,#%10011001,#%10110011,#%11100110 orange
|
|
||||||
.DA #%11011101,#%10111011,#%11110111,#%11101110 pink
|
.DA #%11011101,#%10111011,#%11110111,#%11101110 pink
|
||||||
|
.DA #%11000100,#%10001000,#%10010001,#%10100010 brown
|
||||||
|
.DA #%11001100,#%10011001,#%10110011,#%11100110 orange
|
||||||
.DA #%11101110,#%11011101,#%10111011,#%11110111 yellow
|
.DA #%11101110,#%11011101,#%10111011,#%11110111 yellow
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
COL.BANK .DA #SETPAGE2,#CLRPAGE2,#SETPAGE2,#CLRPAGE2
|
COL.BANK .DA #SETPAGE2,#CLRPAGE2,#SETPAGE2,#CLRPAGE2
|
||||||
|
@ -21,7 +21,7 @@ S.CB.OP.SET .EQ %00000010 replace screen with bitmap
|
|||||||
S.CB.OP.ORA .EQ %00000100 combine screen & bitmap -> Screen
|
S.CB.OP.ORA .EQ %00000100 combine screen & bitmap -> Screen
|
||||||
S.CB.OP.AND .EQ %00000110 Apply BitMap mask before painting
|
S.CB.OP.AND .EQ %00000110 Apply BitMap mask before painting
|
||||||
S.CB.OP.SAVE .EQ %00010000 Save Screen to DstPtr before painting
|
S.CB.OP.SAVE .EQ %00010000 Save Screen to DstPtr before painting
|
||||||
S.CB.OP.RESTORE .EQ %00100000 Restore Screen From DstPtr before painting
|
S.CB.OP.RESTORE .EQ %00100000 Restore Screen From DstPtr
|
||||||
S.CB.OP.COLOR .EQ %01000000 Assume BitMap is COLOR
|
S.CB.OP.COLOR .EQ %01000000 Assume BitMap is COLOR
|
||||||
S.CB.MODE .EQ 2
|
S.CB.MODE .EQ 2
|
||||||
S.CB.MODE.MONO .EQ %00000001 b/w (1 bit/pixel)
|
S.CB.MODE.MONO .EQ %00000001 b/w (1 bit/pixel)
|
||||||
|
@ -43,6 +43,8 @@ L.MouseData .DA MouseData
|
|||||||
L.Rect.CB .DA Rect.CB
|
L.Rect.CB .DA Rect.CB
|
||||||
L.SetPixel.CB .DA SetPixel.CB
|
L.SetPixel.CB .DA SetPixel.CB
|
||||||
L.DrawLines.CB .DA DrawLines.CB
|
L.DrawLines.CB .DA DrawLines.CB
|
||||||
|
L.Filename .DA Filename
|
||||||
|
L.BitBlT.CB .DA BitBlT.CB
|
||||||
.DA 0
|
.DA 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.INIT >LDYA L.MSG.INIT
|
CS.INIT >LDYA L.MSG.INIT
|
||||||
@ -222,8 +224,32 @@ Destop.Paint >PUSHW L.Rect.CB
|
|||||||
cmp #16
|
cmp #16
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
.4
|
.4 >PUSHW L.DrawLines.CB
|
||||||
>PUSHW L.DrawLines.CB
|
>LIBCALL hLIBGUI,LIBGUI.Draw
|
||||||
|
|
||||||
|
>PUSHWI 0 Aux type
|
||||||
|
>PUSHBI $CB Type
|
||||||
|
>PUSHBI SYS.FOpen.R
|
||||||
|
>PUSHW L.FILENAME
|
||||||
|
>SYSCALL LoadFile
|
||||||
|
|
||||||
|
txa
|
||||||
|
>SYSCALL GetMemPtr.A
|
||||||
|
>STYA BitBlT.CB+S.CB.SrcPtr
|
||||||
|
|
||||||
|
>LDYAI 105
|
||||||
|
>STYA BitBlT.CB+S.CB.DestX
|
||||||
|
>PUSHW L.BitBlt.CB
|
||||||
|
>LIBCALL hLIBGUI,LIBGUI.Draw
|
||||||
|
|
||||||
|
>LDYAI 246
|
||||||
|
>STYA BitBlT.CB+S.CB.DestX
|
||||||
|
>PUSHW L.BitBlt.CB
|
||||||
|
>LIBCALL hLIBGUI,LIBGUI.Draw
|
||||||
|
|
||||||
|
>LDYAI 387
|
||||||
|
>STYA BitBlT.CB+S.CB.DestX
|
||||||
|
>PUSHW L.BitBlt.CB
|
||||||
>LIBCALL hLIBGUI,LIBGUI.Draw
|
>LIBCALL hLIBGUI,LIBGUI.Draw
|
||||||
|
|
||||||
rts
|
rts
|
||||||
@ -247,7 +273,7 @@ MouseData .BS 5
|
|||||||
Rect.CB .DA #S.CB.CMD.FILLRECT
|
Rect.CB .DA #S.CB.CMD.FILLRECT
|
||||||
.DA #S.CB.OP.SET
|
.DA #S.CB.OP.SET
|
||||||
.DA #S.CB.MODE.C16
|
.DA #S.CB.MODE.C16
|
||||||
.DA #11
|
.DA #2
|
||||||
.DA 0
|
.DA 0
|
||||||
.DA 0
|
.DA 0
|
||||||
.DA 559
|
.DA 559
|
||||||
@ -258,36 +284,36 @@ Rect.CB .DA #S.CB.CMD.FILLRECT
|
|||||||
.DA #S.CB.MODE.MONO
|
.DA #S.CB.MODE.MONO
|
||||||
.DA #1
|
.DA #1
|
||||||
.DA 10
|
.DA 10
|
||||||
.DA 10
|
.DA 5
|
||||||
.DA 550
|
.DA 549
|
||||||
.DA 180
|
.DA 186
|
||||||
|
|
||||||
.DA #S.CB.CMD.FILLRECT
|
|
||||||
.DA #S.CB.OP.ORA
|
|
||||||
.DA #S.CB.MODE.C16
|
|
||||||
.DA #0
|
|
||||||
.DA 20
|
|
||||||
.DA 20
|
|
||||||
.DA 540
|
|
||||||
.DA 170
|
|
||||||
|
|
||||||
.DA #S.CB.CMD.FILLRECT
|
.DA #S.CB.CMD.FILLRECT
|
||||||
.DA #S.CB.OP.SET
|
.DA #S.CB.OP.SET
|
||||||
.DA #S.CB.MODE.C16
|
.DA #S.CB.MODE.C16
|
||||||
.DA #9
|
.DA #7
|
||||||
.DA 30
|
.DA 20
|
||||||
.DA 30
|
.DA 10
|
||||||
.DA 530
|
.DA 539
|
||||||
.DA 160
|
.DA 181
|
||||||
|
|
||||||
.DA #S.CB.CMD.FILLRECT
|
.DA #S.CB.CMD.FILLRECT
|
||||||
.DA #S.CB.OP.XOR
|
.DA #S.CB.OP.SET
|
||||||
.DA #S.CB.MODE.C16
|
.DA #S.CB.MODE.C16
|
||||||
.DA #8
|
.DA #4
|
||||||
|
.DA 30
|
||||||
|
.DA 15
|
||||||
|
.DA 529
|
||||||
|
.DA 176
|
||||||
|
|
||||||
|
.DA #S.CB.CMD.FILLRECT
|
||||||
|
.DA #S.CB.OP.SET
|
||||||
|
.DA #S.CB.MODE.MONO
|
||||||
|
.DA #0
|
||||||
.DA 40
|
.DA 40
|
||||||
.DA 40
|
.DA 20
|
||||||
.DA 520
|
.DA 519
|
||||||
.DA 150
|
.DA 171
|
||||||
|
|
||||||
.DA #0
|
.DA #0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -356,12 +382,30 @@ DrawLines.CB .DA #S.CB.CMD.DRAWLINE
|
|||||||
|
|
||||||
.DA #0
|
.DA #0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
Filename >CSTR "/A2OSX.BUILD/MARILYN"
|
||||||
|
*--------------------------------------
|
||||||
|
BitBlT.CB .DA #S.CB.CMD.BITBLT
|
||||||
|
.DA #S.CB.OP.SET
|
||||||
|
.DA #S.CB.MODE.MONO
|
||||||
|
.DA #0
|
||||||
|
.DA 0 X1
|
||||||
|
.DA 0 Y1
|
||||||
|
.DA 140 X2
|
||||||
|
.DA 149 y2
|
||||||
|
.DA 196 DestX
|
||||||
|
.DA 21 DestY
|
||||||
|
.BS 2 SrcPtr
|
||||||
|
.DA 0
|
||||||
|
|
||||||
|
.DA #0
|
||||||
|
*--------------------------------------
|
||||||
SetPixel.CB .DA #S.CB.CMD.SETPIXEL
|
SetPixel.CB .DA #S.CB.CMD.SETPIXEL
|
||||||
SetPixel.OP .BS 1
|
SetPixel.OP .BS 1
|
||||||
SetPixel.Mode .BS 1
|
SetPixel.Mode .BS 1
|
||||||
SetPixel.Color .BS 1
|
SetPixel.Color .BS 1
|
||||||
SetPixel.X .BS 2
|
SetPixel.X .BS 2
|
||||||
SetPixel.Y .BS 2
|
SetPixel.Y .BS 2
|
||||||
|
|
||||||
.DA #0
|
.DA #0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DUMMY
|
.DUMMY
|
||||||
|
BIN
marilyn.bmp
Normal file
BIN
marilyn.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
Loading…
Reference in New Issue
Block a user