From 43c707a68b62598af06a72446114691c8f01ceaa Mon Sep 17 00:00:00 2001 From: droniu Date: Tue, 25 May 2021 15:09:39 +0200 Subject: [PATCH] placing all X-es on board --- simple/example_sprites.chr | Bin 8192 -> 0 bytes simple/main.cdl | Bin 40960 -> 0 bytes simple/main.nes.deb | Bin 872 -> 0 bytes simple/main.s | 210 ++++++++++++++++++++++++++++++++++++- 4 files changed, 206 insertions(+), 4 deletions(-) delete mode 100644 simple/example_sprites.chr delete mode 100644 simple/main.cdl delete mode 100644 simple/main.nes.deb diff --git a/simple/example_sprites.chr b/simple/example_sprites.chr deleted file mode 100644 index 45c403a9983cb586185a0f05ab7913407e422f64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmZWue{dAneSdp<(jL-rd;BmQaNMpW40a|Hjv+BCble`c;~%NVICecaEe!`asDBW1 zLfXeowP+-;eM2eSf|0_xo0|s%hy}t9LViW}22$vwge9bfy=X>jy!xlu}g9 zv@AL#i#DT{$)N&(Dipx# z3Se~w>@H?gkRJ*#HMV5!T3sl>aRU&l74G_qN?aa<)O zs7g6w2h}RH9{3~AO>mwwF=)2w*gBzr5t0|0DRIk8)M}2S9zBQGOoG{O1k~y^+a^&R zdI$&=5WZ_Bi+%vz9zK{LrOKSIUR^AwREv`aG*;zOTX3Km!i#OrZ`;GqJq`IZ4SnA` zQ3TKKNwWVf*;E1cS22O9nw|V`%yFPw^i0}I1yK7L`_5ZL_RTub9FT~j1DS>7OP4}I z0GanB?ECg$Dpo+>1i|T%LoDmMm#K9f8>63sa2!Fw%vZ`#eu(d$sN-V*;JG!&54a^W zNNwhGMhfm{h*nmVmex2Cg!xpNIlitZbJWN2@I6>p)ADU_;uWc6woQVN!tOuzJuIm? zikeuwB*h>z*-y#Uyh1@Qvl=Ym`PkM>z`H6X!~YY8iY3GKF8SnQ)l4)V$F_BR=t|(v z2a$9fn`Y7(Rbh(a6x|ZGw2Onx#=*1|&0M%BrmbU1a#>lexdoO@)xZqxc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Oo?y(b1tHT2D6y;sI?Obw~ksaPffxZ5DM# z1p5hSY}4pB>;e+FBB~0w*RyF=A?9#_a>=RVhU=0ppl(%s&x<#;kiMX9H%Zrr?6C(1 zhF^a9hsf=0b9+1LB{nuQ444@kTTC~p#bXV7LIXf^oQ6H2CX*6h!=A#~rpVHvJu!9k zC?bSYXPA|=Bs|KhA8F2HkI9JiVmjcHmA?Jo`A+ZBZazBs>Z^Mv$Gc|xW@o3oDcs1- z(ysB}i@SNQe1M!O{`#eV@(|mDd}jL}|Mi8M2*JPYfQ9-7VnV?h>{xT~ z|2Xmmks7@l{W=@9DYeXdVg88mLJujcS!PeJiI zd(-mItcQzMML?v83Lw$K-GnoX^*8vBppWWT3U~jM9tm?jem#E8(IalI-~UGam_s+} z=d<$NDDS|TGosF`;(JsI8>@Hx6dPg0F8 zbG^^5NAENE^pTiljdFNtkBN^G?9%l4^TG6g+{<=;LP lTF0B9n diff --git a/simple/main.cdl b/simple/main.cdl deleted file mode 100644 index ca5ea44f24f65b3d8acaaf654c430de8c51b16e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 40960 zcmeIu0Sy2E0K%a6Pi+o2h(KY$fB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd t0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0Rsm92L_-300961 diff --git a/simple/main.nes.deb b/simple/main.nes.deb deleted file mode 100644 index 653533ab1fdb7b04dde38dc98daa56dd64e219c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 ScmZQz7zLvtFd7214gmlIXaE5K diff --git a/simple/main.s b/simple/main.s index 8b673c7..524392d 100644 --- a/simple/main.s +++ b/simple/main.s @@ -269,10 +269,13 @@ bne :+ sbc #$0070 ; go max left sta $0203 + dec position + dec position rts : adc #$0038 ; 56 pixels (7 tiles) to the right sta $0203 + inc position rts MoveLeft: lda $0203 @@ -280,10 +283,13 @@ bne :+ lda #$B4 sta $0203 + inc position + inc position rts : sbc #$0038 sta $0203 + dec position rts MoveUp: lda $0200 @@ -291,10 +297,19 @@ bne :+ lda #$A2 sta $0200 + inc position + inc position + inc position + inc position + inc position + inc position rts : sbc #$0038 sta $0200 + dec position + dec position + dec position rts MoveDown: lda $0200 @@ -302,10 +317,19 @@ bne :+ lda #$32 sta $0200 + dec position + dec position + dec position + dec position + dec position + dec position rts : adc #$0038 sta $0200 + inc position + inc position + inc position rts StartGame: lda #$01 @@ -339,16 +363,130 @@ DrawX: - lda position - cmp #$04 - beq DrawX4 + lda #$00 + cmp position + bne :+ + jmp DrawX0 + : + lda #$01 + cmp position + bne :+ + jmp DrawX1 + : + + lda #$02 + cmp position + bne :+ + jmp DrawX2 + : + + lda #$03 + cmp position + bne :+ + jmp DrawX3 + : + + lda #$04 + cmp position + bne :+ + jmp DrawX4 + : + + lda #$05 + cmp position + bne :+ + jmp DrawX5 + : + + lda #$06 + cmp position + bne :+ + jmp DrawX6 + : + + lda #$07 + cmp position + bne :+ + jmp DrawX7 + : + + lda #$08 + cmp position + bne :+ + jmp DrawX8 + : + + DrawX0: + ldx #$00 + bit $2002 + : lda #$28 ; high byte = 28 + cpx #$04 ; high byte = 29 + bmi :+ + adc #$00 ; cpx sets carry to 1 so its +1 actually + : sta $2006 + lda topleft, X + sta $2006 + lda xspr, X + sta $2007 + inx + cpx #$10 + bne :-- + rts + DrawX1: + ldx #$00 + bit $2002 + : lda #$28 + cpx #$04 + bmi :+ + adc #$00 + : sta $2006 + lda top, X + sta $2006 + lda xspr, X + sta $2007 + inx + cpx #$10 + bne :-- + rts + DrawX2: + ldx #$00 + bit $2002 + : lda #$28 + cpx #$04 + bmi :+ + adc #$00 + : sta $2006 + lda topright, X + sta $2006 + lda xspr, X + sta $2007 + inx + cpx #$10 + bne :-- + rts + DrawX3: + ldx #$00 + bit $2002 + : lda #$29 + cpx #$08 + bmi :+ + adc #$00 + : sta $2006 + lda left, X + sta $2006 + lda xspr, X + sta $2007 + inx + cpx #$10 + bne :-- + rts DrawX4: ldx #$00 bit $2002 : lda #$29 cpx #$08 bmi :+ - adc #$00 ; cpx sets carry to 1 so its +1 actually + adc #$00 : sta $2006 lda center, X sta $2006 @@ -358,6 +496,70 @@ cpx #$10 bne :-- rts + DrawX5: + ldx #$00 + bit $2002 + : lda #$29 + cpx #$08 + bmi :+ + adc #$00 + : sta $2006 + lda right, X + sta $2006 + lda xspr, X + sta $2007 + inx + cpx #$10 + bne :-- + rts + DrawX6: + ldx #$00 + bit $2002 + : lda #$2a + cpx #$0c + bmi :+ + adc #$00 + : sta $2006 + lda bottomleft, X + sta $2006 + lda xspr, X + sta $2007 + inx + cpx #$10 + bne :-- + rts + DrawX7: + ldx #$00 + bit $2002 + : lda #$2a + cpx #$0c + bmi :+ + adc #$00 + : sta $2006 + lda bottom, X + sta $2006 + lda xspr, X + sta $2007 + inx + cpx #$10 + bne :-- + rts + DrawX8: + ldx #$00 + bit $2002 + : lda #$2a + cpx #$0c + bmi :+ + adc #$00 + : sta $2006 + lda bottomright, X + sta $2006 + lda xspr, X + sta $2007 + inx + cpx #$10 + bne :-- + rts