From 8305686468f507799492e890262da3aa8cf8e2d6 Mon Sep 17 00:00:00 2001 From: David Stancu Date: Mon, 5 Feb 2018 23:11:30 -0500 Subject: [PATCH] DRY on up down logic, need to do the same for l/r logic, and then stepping logic for the row interleave (probably with y register) --- src/main.S | 217 +++++------------------------------------------------ 1 file changed, 19 insertions(+), 198 deletions(-) diff --git a/src/main.S b/src/main.S index cccab6d..218c87b 100644 --- a/src/main.S +++ b/src/main.S @@ -51,24 +51,32 @@ keydown nop jmp dispchar up clc - cpx #1488 - beq rtsout - rep #$30 - pha - txa - sbc #128 - tax - pla - sep #$20 + phy + ldy #0 + jsr updown + ply jmp rtsout + down clc + phy + ldy #1 + jsr updown + ply + jmp rtsout + +updown clc cpx #1488 beq rtsout rep #$30 pha txa - adc #128 - tax + cpy #0 + beq linedown + bne lineup +lineup adc #128 + jmp linecont +linedown sbc #128 +linecont tax pla sep #$20 jmp rtsout @@ -125,190 +133,3 @@ hithere strl "this was excruciating" brkboi brk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -