X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=xortest.s;fp=xortest.s;h=ce892745b8f9ec33692c4d02ac0e50b5a62531ba;hb=c4e4cf9bda70eed128e224e914b8abf6ae334a5d;hp=b876059c3bffbc4fab1555b514addbd88961535a;hpb=71180a72d4e205696eb3b0f6db03a56c65a845b5;p=a2gs_xortest diff --git a/xortest.s b/xortest.s index b876059..ce89274 100644 --- a/xortest.s +++ b/xortest.s @@ -16,7 +16,7 @@ fillrest stal $e19d00,x inx inx - cpx #$300 + cpx #$100 bne fillrest lda #$0000 @@ -38,23 +38,29 @@ cmap pha 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