stal $e19d00,x
inx
inx
- cpx #$300
+ cpx #$100
bne fillrest
lda #$0000
bne cmap
YVAL = 0
-COLIDX = 1
+TMPVAL = 1
sep #$20 ; accum 8bit
ldx #0 ; fb index
stz YVAL
-yloop lda YVAL
- and #$f
- sta COLIDX
+yloop ldy #0000 ; column/2 on Y reg
+xloop tya
asl
+ and #$0f
+ sta TMPVAL ; save first pixel X coordinate
+ inc ; increment by 1 for the next pixel
+ eor YVAL
+ asl ; move next pixel value to high nibble
asl
asl
asl
- ora COLIDX
- ldy #160 ; 160 bytes across
-xloop stal FB_BASE,x
+ ora TMPVAL ; first pixel X -> low nibble
+ eor YVAL
+
+ stal FB_BASE, x ; write the pixel pair
inx
- dey
+ iny
+ cpy #160
bne xloop
inc YVAL
lda YVAL