projects
/
a2gs_xortest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed off-by one on palette setup
[a2gs_xortest]
/
xortest.s
diff --git
a/xortest.s
b/xortest.s
index
ce89274
..
9995ff1
100644
(file)
--- a/
xortest.s
+++ b/
xortest.s
@@
-1,5
+1,7
@@
org $800
org $800
+LARGE = 0
+
REG_NEWVID = $c029
FB_BASE = $e12000
REG_NEWVID = $c029
FB_BASE = $e12000
@@
-12,7
+14,7
@@
FB_BASE = $e12000
rep #$30 ; accum/index 16bit
lda #$0000
ldx #$0000
rep #$30 ; accum/index 16bit
lda #$0000
ldx #$0000
-fillrest
+fillrest ; @30f
stal $e19d00,x
inx
inx
stal $e19d00,x
inx
inx
@@
-20,7
+22,7
@@
fillrest
bne fillrest
lda #$0000
bne fillrest
lda #$0000
-cmap pha
+cmap pha ; @31d
sta 0
asl
tax ; offset = i * 2
sta 0
asl
tax ; offset = i * 2
@@
-34,28
+36,46
@@
cmap pha
stal $e19e00,x
pla
inc
stal $e19e00,x
pla
inc
- cmp #$000f
+ cmp #$0010
bne cmap
YVAL = 0
TMPVAL = 1
bne cmap
YVAL = 0
TMPVAL = 1
+YNIB = 2
- sep #$20 ; accum 8bit
- ldx #0 ; fb index
+ sep #$20 ; accum 8bit @337
+ ldx #0000 ; fb index
stz YVAL
stz YVAL
-yloop ldy #0000 ; column/2 on Y reg
-xloop tya
+yloop ldy #0000 ; column/2 on Y reg @33e
+xloop lda YVAL ; @341
+
+ DO LARGE
+ lsr
+ FIN
+
+ and #$0f
+ sta YNIB
+ tya
+
+ DO LARGE = 0
asl
asl
+ inc ; increment X, next pixel on low nibble
+ FIN
+
and #$0f
sta TMPVAL ; save first pixel X coordinate
and #$0f
sta TMPVAL ; save first pixel X coordinate
- inc ; increment by 1 for the next pixel
- eor YVAL
+
+ DO LARGE = 0
+ dec ; decrement back for high nibble pixel
+ FIN
+
+ eor YNIB
asl ; move next pixel value to high nibble
asl
asl
asl
ora TMPVAL ; first pixel X -> low nibble
asl ; move next pixel value to high nibble
asl
asl
asl
ora TMPVAL ; first pixel X -> low nibble
- eor YVAL
+ eor YNIB
stal FB_BASE, x ; write the pixel pair
inx
stal FB_BASE, x ; write the pixel pair
inx
@@
-67,6
+87,6
@@
xloop tya
cmp #200
bne yloop
cmp #200
bne yloop
-infloop bra infloop
+infloop bra infloop ; @36d
; vi:ft=asm_ca65
; vi:ft=asm_ca65