diff --git a/.gitignore b/.gitignore index 56d2b6c..8b75e09 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.db Event Assembler/ *.sav +ToDo.txt diff --git a/ASM/Egg/eatEgg.elf b/ASM/Egg/eatEgg.elf index dc0706a..6167ecb 100644 Binary files a/ASM/Egg/eatEgg.elf and b/ASM/Egg/eatEgg.elf differ diff --git a/ASM/Egg/eatEgg.s b/ASM/Egg/eatEgg.s index 8ee46e4..ac3c44b 100644 --- a/ASM/Egg/eatEgg.s +++ b/ASM/Egg/eatEgg.s @@ -12,7 +12,7 @@ bne End mov r3,#0 strh r3,[r0,#0x6] @destroy egg ldrh r3,[r0,#0xE] -add r3,#1 @add size +add r3,#4 @add size strh r3,[r0,#0xE] End: diff --git a/ASM/Egg/makeEgg.elf b/ASM/Egg/makeEgg.elf index 0864668..49356ad 100644 Binary files a/ASM/Egg/makeEgg.elf and b/ASM/Egg/makeEgg.elf differ diff --git a/ASM/Egg/makeEgg.s b/ASM/Egg/makeEgg.s index 88afea6..33b74d6 100644 --- a/ASM/Egg/makeEgg.s +++ b/ASM/Egg/makeEgg.s @@ -2,6 +2,7 @@ push {lr} +@check if egg exists ldr r0,=#0x02000000 ldrh r0,[r0,#6] @egg coords cmp r0,#0 @@ -15,42 +16,7 @@ mov r1,#1 and r0,r1 ldr r1,=#0x02000000 add r0,#20 -str r0,[r1,#0x14] - -@make a list of all tiles that are available -mov r0,#0 -mov r1,#2 -mov r2,#0 @ammount of tiles in the list*2 -b loopnoadd -loop: -add r0,#1 -loopnoadd: -cmp r0,#0x1E -bne dontincreasey -mov r0,#0 -add r1,#1 -dontincreasey: -cmp r1,#0x14 -beq endloop -@check if the coords conflict with the body, if they do, do not add them to the list -push {r0-r2} -ldr r2,=bonkSnake -mov lr,r2 -.short 0xF800 -mov r3,r0 -pop {r0-r2} -cmp r3,#1 -beq loop -ldr r3,=#0x02005000 -strb r0,[r3,r2] -add r2,#1 -strb r1,[r3,r2] -add r2,#1 -b loop -endloop: - -ldr r0,=#0x02000000 -strh r2,[r0,#0x16] @save length +strb r0,[r1,#0x14] @choose a tile from the list ldr r0,=rng diff --git a/ASM/Egg/makeEggMap.elf b/ASM/Egg/makeEggMap.elf new file mode 100644 index 0000000..201b38a Binary files /dev/null and b/ASM/Egg/makeEggMap.elf differ diff --git a/ASM/Egg/makeEggMap.s b/ASM/Egg/makeEggMap.s new file mode 100644 index 0000000..e66d6f1 --- /dev/null +++ b/ASM/Egg/makeEggMap.s @@ -0,0 +1,42 @@ +.thumb + +push {lr} + +@make a list of all tiles that are available +mov r0,#0 +mov r1,#2 +mov r2,#0 @ammount of tiles in the list*2 +b loopnoadd +loop: +add r0,#1 +loopnoadd: +cmp r0,#0x1E +bne dontincreasey +mov r0,#0 +add r1,#1 +dontincreasey: +cmp r1,#0x14 +beq endloop +@check if the coords conflict with the body, if they do, do not add them to the list +push {r0-r2} +ldr r2,=bonkSnake +mov lr,r2 +.short 0xF800 +mov r3,r0 +pop {r0-r2} +cmp r3,#1 +beq loop +ldr r3,=#0x02005000 +strb r0,[r3,r2] +add r2,#1 +strb r1,[r3,r2] +add r2,#1 +b loop +endloop: + +ldr r0,=#0x02000000 +strh r2,[r0,#0x16] @save length + +End: +pop {r0} +bx r0 diff --git a/ASM/Egg/updateEggMap.elf b/ASM/Egg/updateEggMap.elf new file mode 100644 index 0000000..89bcd2e Binary files /dev/null and b/ASM/Egg/updateEggMap.elf differ diff --git a/ASM/Egg/updateEggMap.s b/ASM/Egg/updateEggMap.s new file mode 100644 index 0000000..6b6dcff --- /dev/null +++ b/ASM/Egg/updateEggMap.s @@ -0,0 +1,42 @@ +.thumb +push {lr} + +@update egg map +ldr r2,=#0x02000000 +ldrh r0,[r2,#0x1A] @previous tail position +ldrh r1,[r2] @size +lsl r1,#1 +sub r1,#2 +add r1,#0x20 +ldrh r1,[r2,r1] @current head position +cmp r0,r1 +beq End + +@find head position in egg buffer +ldr r3,=#0x02005000 +headloop: +ldrh r2,[r3] +cmp r2,r1 +beq endheadloop +add r3,#2 +b headloop +endheadloop: + +cmp r0,#0 +bne endremoveloop +removeloop: +ldrh r2,[r3,#2] +strh r2,[r3] +add r3,#2 +ldrh r2,[r3] +cmp r2,#0 +beq endremoveloop +b removeloop +endremoveloop: + +@add the tile the tail was previously in +strh r0,[r3] + +End: +pop {r0} +bx r0 diff --git a/ASM/Snake/cleanSnake.elf b/ASM/Snake/cleanSnake.elf deleted file mode 100644 index d41e257..0000000 Binary files a/ASM/Snake/cleanSnake.elf and /dev/null differ diff --git a/ASM/Snake/cleanSnake.s b/ASM/Snake/cleanSnake.s deleted file mode 100644 index 38618cd..0000000 --- a/ASM/Snake/cleanSnake.s +++ /dev/null @@ -1,17 +0,0 @@ -.thumb - -ldr r0,=bgTilemapsBuffer -ldr r0,[r0] -ldr r1,=#0x500 -add r1,r0 -mov r2,#0 - -loop: -str r2,[r0] -add r0,#4 -cmp r0,r1 -beq End -b loop - -End: -bx lr diff --git a/ASM/Snake/moveSnake.elf b/ASM/Snake/moveSnake.elf index 7427eda..78d903a 100644 Binary files a/ASM/Snake/moveSnake.elf and b/ASM/Snake/moveSnake.elf differ diff --git a/ASM/Snake/moveSnake.s b/ASM/Snake/moveSnake.s index d10db70..7bafa3d 100644 --- a/ASM/Snake/moveSnake.s +++ b/ASM/Snake/moveSnake.s @@ -4,6 +4,8 @@ push {lr} push {r4,r5} ldr r4,=#0x02000000 +ldrh r0,[r4,#0x20] +strh r0,[r4,#0x1A] ldrb r0,[r4,#0xD] cmp r0,#0xF0 bhi EndTrampolin @@ -15,15 +17,6 @@ ldr r3,=#540 cmp r0,r3 beq gameOverWinTrampolin -b skipTrampolin -EndTrampolin: -b End -gameOverTrampolin: -b gameOver -gameOverWinTrampolin: -b gameOverWin -skipTrampolin: - mov r3,r5 add r3,#0x20 ldrh r0,[r5] @@ -37,25 +30,25 @@ ldrb r3,[r5,#2] cmp r3,#0 bne dontcheckleft cmp r1,#0 -beq gameOver +beq gameOverTrampolin dontcheckleft: cmp r3,#3 bne dontcheckright cmp r1,#0x1D -beq gameOver +beq gameOverTrampolin dontcheckright: cmp r3,#1 bne dontcheckup cmp r2,#2 -beq gameOver +beq gameOverTrampolin dontcheckup: cmp r3,#2 bne dontcheckdown cmp r2,#0x13 -beq gameOver +beq gameOverTrampolin dontcheckdown: ldrh r0,[r5] @@ -88,6 +81,15 @@ ldrb r1,[r4] @head x ldrb r2,[r4,#1] @head y ldrb r3,[r5,#2] @facing +b skipTrampolin +EndTrampolin: +b End +gameOverTrampolin: +b gameOver +gameOverWinTrampolin: +b gameOverWin +skipTrampolin: + cmp r3,#0 bne dontmoveleft cmp r1,#0 @@ -197,6 +199,8 @@ pop {r0-r3} strb r1,[r4,r0] add r0,#1 strb r2,[r4,r0] +mov r0,#0 +strh r0,[r4,#0x1A] b End End: diff --git a/ASM/Snake/startSnake.elf b/ASM/Snake/startSnake.elf index 59300e8..5225095 100644 Binary files a/ASM/Snake/startSnake.elf and b/ASM/Snake/startSnake.elf differ diff --git a/ASM/Snake/startSnake.s b/ASM/Snake/startSnake.s index 4b37408..bd8c823 100644 --- a/ASM/Snake/startSnake.s +++ b/ASM/Snake/startSnake.s @@ -10,9 +10,11 @@ sub r0,#1 strh r0,[r1,#2] sub r0,#1 strh r0,[r1,#4] +sub r0,#1 +strh r0,[r1,#6] @set starting size of snake -mov r0,#3 +mov r0,#4 ldr r1,=#0x02000000 strh r0,[r1] strh r0,[r1,#0xE] diff --git a/ASM/Snake/turnSnake.elf b/ASM/Snake/turnSnake.elf index 5f63da8..56441e2 100644 Binary files a/ASM/Snake/turnSnake.elf and b/ASM/Snake/turnSnake.elf differ diff --git a/ASM/Snake/turnSnake.s b/ASM/Snake/turnSnake.s index f918374..f8b8b41 100644 --- a/ASM/Snake/turnSnake.s +++ b/ASM/Snake/turnSnake.s @@ -15,6 +15,16 @@ mov r2,#0xF add r0,r2 mvn r0,r0 +ldr r2,=#0x04000130 +ldrb r2,[r2] +mov r3,r2 +mvn r2,r2 +lsr r3,#4 +cmp r3,#0xF +beq nobuttons +mov r0,r2 +nobuttons: + @get current facing and remove that and the opposite from the button presses ldrb r3,[r1,#2] mov r2,#0x30 diff --git a/ASM/boot.elf b/ASM/boot.elf index 380643e..cb9e4ff 100644 Binary files a/ASM/boot.elf and b/ASM/boot.elf differ diff --git a/ASM/boot.s b/ASM/boot.s index e0ae019..0856982 100644 --- a/ASM/boot.s +++ b/ASM/boot.s @@ -6,37 +6,61 @@ bx r0 .thumb toThumb: +ldr r0,=#0x04000200 +mov r1,#1 +strb r1,[r0,#8] @set Master Interrupt Control to 1, enabling interrupts + +ldr r0,=#0x04000200 +mov r1,#1 +strh r1,[r0] @set first bit of REG_IE (enable irq v-blank) + +ldr r0,=#0x04000004 +mov r2,#8 +strh r2,[r0] @set 3rd bit of DISPSTAT (enable irq v-blank) + +ldr r0,=#0x03007FFC +ldr r1,=interrupt +str r1,[r0] @set the interrupt routine + ldr r0,=#0x04000000 mov r1,#0 -strb r1,[r0] +strb r1,[r0] @set video mode -mov r1,#1 -strb r1,[r0,#1] +mov r1,#0xFF +mov r2,#0x50 +strb r1,[r0,r2] @activate bg blending -@enable timer -ldr r1,=#0x102 -mov r2,#0x83 -strb r2,[r0,r1] +mov r1,#0x10 +add r2,#4 +strb r1,[r0,r2] @start with a black screen -@set background 0 to 256 colors mode -@mov r1,#0x80 -@strb r1,[r0,#8] +mov r1,#3 +strb r1,[r0,#1] @turn on bg layers 0 and 1 -mov r1,#0x1F -strb r1,[r0,#9] +@enable timer 0, 1 and 2 +ldr r1,=#0x100 +ldr r2,=#0xEEDB +strh r2,[r0,r1] @start time for counter 0, 4389 until overflow +add r1,#2 +mov r2,#0x81 +strh r2,[r0,r1] @speed = 16.78MHz/64 +add r1,#2 +mov r2,#0x84 +add r1,#2 +strh r2,[r0,r1] @count up when the previous one overflows +@this, if my math is right, should be 16.78MHz/64/4389 = 59.73Hz, the refresh rate of the console +add r1,#4 +mov r2,#0x80 +strh r2,[r0,r1] @used for the first rng seed -ldr r0,=snekIMG -ldr r1,=#0x06000000 -ldr r3,=loadData -mov lr,r3 -.short 0xF800 +@set the offset for the bg map +mov r1,#0x1F +strb r1,[r0,#9] @set the offset for the bg map 0 +mov r1,#0x1E +strb r1,[r0,#11] @set the offset for the bg map 1 -ldr r0,=snekPAL -ldr r1,=#0x05000000 -ldr r3,=loadData -mov lr,r3 -.short 0xF800 +swi #5 -ldr r0,=mainLoop +ldr r0,=titlescreenLoop mov lr,r0 .short 0xF800 diff --git a/ASM/copyBuffers.elf b/ASM/copyBuffers.elf index c743e84..0030d4a 100644 Binary files a/ASM/copyBuffers.elf and b/ASM/copyBuffers.elf differ diff --git a/ASM/copyBuffers.s b/ASM/copyBuffers.s index 42d0a86..d26864a 100644 --- a/ASM/copyBuffers.s +++ b/ASM/copyBuffers.s @@ -9,7 +9,7 @@ loop1: mov r6,r7 lsl r6,#2 mov r2,#0 -ldr r3,=#0x5000 +ldr r3,=#0x500 ldr r0,=#0x02000000 add r0,#0x10 ldrb r0,[r0,r7] diff --git a/ASM/fadeIn.elf b/ASM/fadeIn.elf new file mode 100644 index 0000000..a172f77 Binary files /dev/null and b/ASM/fadeIn.elf differ diff --git a/ASM/fadeIn.s b/ASM/fadeIn.s new file mode 100644 index 0000000..0ef0492 --- /dev/null +++ b/ASM/fadeIn.s @@ -0,0 +1,31 @@ +.thumb + +push {lr} + +ldr r0,=#0x04000050 +mov r1,#0xFF +strb r1,[r0] + +mov r2,#0x10 +strb r2,[r0,#4] +ldr r1,=#0x02000000 +lsl r2,#1 +strb r2,[r1,#0x15] + +loop: +swi #5 +ldr r0,=#0x04000050 +ldr r1,=#0x02000000 +ldrb r2,[r1,#0x15] +cmp r2,#0 +beq End +mov r3,r2 +lsr r3,#1 +sub r2,#1 +strb r3,[r0,#4] +strb r2,[r1,#0x15] +b loop + +End: +pop {r0} +bx r0 diff --git a/ASM/fadeOut.elf b/ASM/fadeOut.elf new file mode 100644 index 0000000..b45ae2a Binary files /dev/null and b/ASM/fadeOut.elf differ diff --git a/ASM/fadeOut.s b/ASM/fadeOut.s new file mode 100644 index 0000000..313a025 --- /dev/null +++ b/ASM/fadeOut.s @@ -0,0 +1,31 @@ +.thumb + +push {lr} + +ldr r0,=#0x04000050 +mov r1,#0xFF +strb r1,[r0] + +mov r2,#0 +strb r2,[r0,#4] +ldr r1,=#0x02000000 +strb r2,[r1,#0x15] + +loop: +swi #5 +ldr r0,=#0x04000050 +ldr r1,=#0x02000000 +ldrb r2,[r1,#0x15] +mov r3,r2 +lsr r2,#1 +cmp r2,#0x10 +beq End +add r3,#1 +strb r3,[r1,#0x15] +lsr r3,#1 +strb r3,[r0,#4] +b loop + +End: +pop {r0} +bx r0 diff --git a/ASM/fillDest.elf b/ASM/fillDest.elf new file mode 100644 index 0000000..3ef4a57 Binary files /dev/null and b/ASM/fillDest.elf differ diff --git a/ASM/fillDest.s b/ASM/fillDest.s new file mode 100644 index 0000000..c74da01 --- /dev/null +++ b/ASM/fillDest.s @@ -0,0 +1,24 @@ +.thumb + +push {lr} +push {r4-r6} + +mov r4,r0 @value +mov r5,r1 @destination +mov r6,r2 @size in words + +mov r0,r6 @words to copy +lsl r0,#2 @size in bytes +mov r1,#0 + +loop: @just write numbers of words to destination +cmp r0,r1 +beq End +str r4,[r5,r1] +add r1,#4 +b loop + +End: +pop {r4-r6} +pop {r0} +bx r0 diff --git a/ASM/mainLoop.elf b/ASM/mainLoop.elf index 3569975..4bb8008 100644 Binary files a/ASM/mainLoop.elf and b/ASM/mainLoop.elf differ diff --git a/ASM/mainLoop.s b/ASM/mainLoop.s index 24da79e..62f56be 100644 --- a/ASM/mainLoop.s +++ b/ASM/mainLoop.s @@ -1,31 +1,95 @@ .thumb -ldrb r0,=#0x02000000 -mov r1,#0x8 -strb r1,[r0,#3] @speed -mov r1,#0 -strb r1,[r0,#4] @counter, game logic will only trigger if the counter matches the speed or is higher (in case of powerups) +ldr r0,=fillDest +mov lr,r0 +mov r0,#0 +ldr r1,=bgTilemapsBuffer +ldr r1,[r1] +ldr r2,=#0x200 +.short 0xF800 -ldr r0,=#0x04000200 +ldr r0,=fillDest +mov lr,r0 +mov r0,#0 +ldr r1,=bgTilemapsBuffer +ldr r1,[r1,#4] +ldr r2,=#0x200 +.short 0xF800 + +@temporary black border +ldr r0,=fillDest +mov lr,r0 +ldr r0,=#0x000A000A +ldr r1,=bgTilemapsBuffer +ldr r1,[r1] +ldr r2,=#0x20 +.short 0xF800 + +@set background 0 to 16 colors mode +ldr r0,=#0x04000000 mov r1,#1 -strb r1,[r0,#8] @set Master Interrupt Control to 1, enabling interrupts +strb r1,[r0,#8] -ldr r0,=#0x04000200 +@disable bg 1 for now mov r1,#1 -strh r1,[r0] @set first bit of REG_IE (enable irq v-blank) +strb r1,[r0,#1] + +ldr r0,=snekIMG +ldr r1,=#0x06000000 +ldr r3,=loadData +mov lr,r3 +.short 0xF800 -ldr r0,=#0x04000004 -mov r2,#8 -strh r2,[r0] @set 3rd bit of DISPSTAT (enable irq v-blank) +ldr r0,=snekPAL +ldr r1,=#0x05000000 +ldr r3,=loadData +mov lr,r3 +.short 0xF800 -ldr r0,=#0x03007FFC -ldr r1,=interrupt -str r1,[r0] @set the interrupt routine +ldrb r0,=#0x02000000 +mov r1,#8 +strb r1,[r0,#3] @speed ldr r0,=startSnake mov lr,r0 .short 0xF800 +ldr r0,=#0x02000000 +add r0,#0x10 +mov r1,#1 +strb r1,[r0] @set bg 0 and 1 to be updated +strb r1,[r0,#1] + +ldr r0,=drawSnake +mov lr,r0 +.short 0xF800 + +ldr r0,=makeEggMap +mov lr,r0 +.short 0xF800 + +ldr r0,=makeEgg +mov lr,r0 +.short 0xF800 + +ldr r0,=drawEgg +mov lr,r0 +.short 0xF800 + +ldr r0,=copyBuffers +mov lr,r0 +.short 0xF800 + +ldr r0,=#0x02000000 +add r0,#0x10 +mov r1,#0 +strb r1,[r0] @set bg 0 and 1 to not be updated +strb r1,[r0,#1] + +ldr r0,=fadeIn +mov lr,r0 +.short 0xF800 + main: ldr r2,=#0x02000000 ldr r3,=#0x04000130 @@ -36,8 +100,6 @@ beq noButtons strb r1,[r2,#5] noButtons: -swi #5 @wait for vblank - ldr r0,=copyBuffers mov lr,r0 .short 0xF800 @@ -47,26 +109,42 @@ add r0,#0x10 mov r1,#0 strb r1,[r0] @set bg 0 to not be updated +ldr r2,=#0x02000000 +ldr r3,=#0x04000130 +ldrb r1,[r3] @save button presses so that the player does not need to hold down the button until the counter matches the speed +lsr r1,#4 +cmp r1,#0xF +beq noButtons2 +strb r1,[r2,#5] +noButtons2: + ldrb r0,=#0x02000000 +ldr r3,=#0x04000100 +ldrh r3,[r3,#4] @counter +ldrb r1,[r0,#4] @counter checked +cmp r1,#1 +beq counterused +strh r3,[r0,#0x18] @counter last time logic was ran +mov r1,#1 +strb r1,[r0,#4] @counter checked +counterused: ldrb r1,[r0,#3] @speed -ldrb r2,[r0,#4] @counter -mov r3,r2 -add r3,#1 -strb r3,[r0,#4] @counter -cmp r2,r1 -blo skipSnake @if counter is lower than speed, skip game logic and wait another frame -mov r3,#0 -strb r3,[r0,#4] @counter +ldrh r2,[r0,#0x18] @counter last time logic was ran +cmp r3,r2 +blo runSnake +add r2,r1 +cmp r3,r2 +bhs runSnake +b skipSnake @skip game logic + +runSnake: +strh r3,[r0,#0x18] @update counter ldr r0,=#0x02000000 add r0,#0x10 mov r1,#1 strb r1,[r0] @set bg 0 to be updated -ldr r0,=makeEgg -mov lr,r0 -.short 0xF800 - ldr r0,=turnSnake mov lr,r0 .short 0xF800 @@ -79,6 +157,10 @@ ldr r0,=eatEgg mov lr,r0 .short 0xF800 +ldr r0,=updateEggMap +mov lr,r0 +.short 0xF800 + ldr r0,=makeEgg mov lr,r0 .short 0xF800 @@ -88,8 +170,13 @@ ldrb r0,[r0,#0xD] cmp r0,#0xF0 bhi nobg0draw -ldr r0,=cleanSnake +ldr r0,=fillDest mov lr,r0 +mov r0,#0 +ldr r1,=bgTilemapsBuffer +ldr r1,[r1] +add r1,#0x80 +ldr r2,=#0x120 .short 0xF800 ldr r0,=drawSnake @@ -102,6 +189,8 @@ mov lr,r0 nobg0draw: -skipSnake: +b main +skipSnake: +swi #5 @wait for vblank b main diff --git a/ASM/rng.elf b/ASM/rng.elf index 26a20e1..db1deb4 100644 Binary files a/ASM/rng.elf and b/ASM/rng.elf differ diff --git a/ASM/rng.s b/ASM/rng.s index d4f8915..178759c 100644 --- a/ASM/rng.s +++ b/ASM/rng.s @@ -10,7 +10,7 @@ strb r3,[r1,#12] cmp r2,#0 bne notfirst ldr r2,=#0x04000100 -ldrh r0,[r2] +ldrh r0,[r2,#8] b wasfirst notfirst: diff --git a/ASM/titlescreenLoop.elf b/ASM/titlescreenLoop.elf new file mode 100644 index 0000000..5e8b2b7 Binary files /dev/null and b/ASM/titlescreenLoop.elf differ diff --git a/ASM/titlescreenLoop.s b/ASM/titlescreenLoop.s new file mode 100644 index 0000000..7d5319b --- /dev/null +++ b/ASM/titlescreenLoop.s @@ -0,0 +1,74 @@ +.thumb + +@set background 0 to 256 colors mode, and change priority +ldr r0,=#0x04000000 +mov r1,#0x81 +strb r1,[r0,#8] + + +@set background 1 starting tile block +ldr r0,=#0x04000000 +mov r1,#0x08 +strb r1,[r0,#10] + +ldr r0,=titlescreenIMG +ldr r1,=#0x06000000 +ldr r3,=loadData +mov lr,r3 +.short 0xF800 + +ldr r0,=titlescreenPAL +ldr r1,=#0x05000000 +ldr r3,=loadData +mov lr,r3 +.short 0xF800 + +ldr r0,=titlescreenTSA +ldr r1,=bgTilemaps +ldr r1,[r1] +ldr r3,=loadData +mov lr,r3 +.short 0xF800 + +ldr r0,=presstartIMG +ldr r1,=#0x06009800 +ldr r3,=loadData +mov lr,r3 +.short 0xF800 + +ldr r0,=fillDest +mov lr,r0 +ldr r0,=#0x00C000C0 +ldr r1,=bgTilemaps +ldr r1,[r1,#4] +ldr r2,=#0x200 +.short 0xF800 + +ldr r0,=presstartTSA +ldr r1,=bgTilemaps +ldr r1,[r1,#4] +ldr r2,=#0x38C +add r1,r2 +ldr r3,=loadData +mov lr,r3 +.short 0xF800 + +ldr r0,=fadeIn +mov lr,r0 +.short 0xF800 + +titlescreen: +ldr r0,=#0x04000130 +ldrb r0,[r0] +mov r1,#8 +and r0,r1 +cmp r0,#0 +bne titlescreen + +ldr r0,=fadeOut +mov lr,r0 +.short 0xF800 + +ldr r0,=mainLoop +mov lr,r0 +.short 0xF800 diff --git a/Graphics/heckmirror.png b/Graphics/heckmirror.png new file mode 100644 index 0000000..979f4d3 Binary files /dev/null and b/Graphics/heckmirror.png differ diff --git a/Graphics/pressstart.png b/Graphics/pressstart.png new file mode 100644 index 0000000..fe53618 Binary files /dev/null and b/Graphics/pressstart.png differ diff --git a/Graphics/pressstart.tsa.bin b/Graphics/pressstart.tsa.bin new file mode 100644 index 0000000..eb00abb Binary files /dev/null and b/Graphics/pressstart.tsa.bin differ diff --git a/Graphics/snek.png b/Graphics/snek.png index daccecb..4893a9d 100644 Binary files a/Graphics/snek.png and b/Graphics/snek.png differ diff --git a/Graphics/titlescreen.img.bin b/Graphics/titlescreen.img.bin new file mode 100644 index 0000000..ce8f114 --- /dev/null +++ b/Graphics/titlescreen.img.bin @@ -0,0 +1,10 @@ +9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999=9999999B999;BGGG999CGGGG99=IGGGG99DGGGGG9BGGGGGG=GGGGGGGDGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGB9999999GC999999GG=99999GGI=9999GGGDA999GGGGE999GGGGGE99GGGGGGB;999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\X99999995999999999999999999999999999999999999999999999999XXXXXXXX\XXXXXXX9\XXXXXX995\XXXX9999\XXX999995\X9999999599999999XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\XXXXXXX9\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999bG99999=IG9999ADGG9999BGGG999CGGGG99=IGGGG9ADGGGGG9BGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGIGGGGGGC5GGGGI@8GGGE>6GGB<4GC:4 GGGD=;@_GD?8444A:--6_@;BIGGG..6>CG-4< -GGGGGGGGGGGGGGGGBGGGGGGG6?IGGGGG-4GGGGG@6GGGGC8GGGD<4GGG@4C:4:4 8E<GGGGGGGGIGGGGGGG>IGGGGGG-_GGGGGG4AGGGGG6EGGGG+:IGGG-@GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGI=9GGGGGGD=GGGGGGGDGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG999999999999999999999999B9999999GB;99999GGC99999GGG=9999GGGI=9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999f99>}xro9999999999999999999999999999999999999999>f~orrrorrlumknpnn9999999\99999999999999999999999999999999>rrrtjjjrppppnkqlXXXXXXXX5\XXXXXX99\XXXXX9995\XXX999995XX9999995\>9999orrx}99XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX5\XXXXXX99\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999=999999=D999999EG99999BGG99=IGGGG9=DGGGGG9EGGGGGGBGGGGGGGIGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGIGGGGGGGAGGB8GI>4GC8G>E8@. :.7EGG +GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGDA99GGGGGE99GGGGGGB;GGGGGGGCGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG99999999999999999999999999999999=9999999I=999999GDa99999GGD9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999>99999U~r9999xru999xoms99xokss9xoksssf~omssssfyrouknytompsssompssssspssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssspnmlrrxssssnqorsssssspmssssssssssssssssssssssssssssssssssssssssf995\XXXof99\XXorr995\smrj>99sspljrf9ssssujy9sssssojsssssnjrXXXXXXXXXXXXXXXXXXXXXXXX\XXXXXXX95\XXXXX9995:XXX99995\XXU999995\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX999999999999999999999999999999999999999999999999999999999999999C9999=IGG999=DGGG999BGGGG99BGGGGG9=IGGGGGaDGGGGGGBGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG;GGGGGG@-GGGGI?46GGGI>4@LGGI<6ISGGGGGGGGGGGGGGGGGGE=@?>><8-++++--->H)GGGGGSGGGGGGI:GGGGGGC4><-+IIC@@4SCG6768:"RSSSSF*. EF +6/8888JSRRQE+8/QEVRSIG+88866744SSSSRRQQ +...448QQQQMQ/SS06DGGGGGG+@EEBCA:-----++.0>FAESCGGGGGGGG@GGGGCA@-CGGC.+8GG:4_B-<-8>+S?866S@.-CGGGGGGGG><:888:I+6++--JLKKLLLKPNEGGGGGGGGGGGGGGGGEGGGGGGG.EGGGGGG4>GGGGGG,4IGGGGG6>U|999999999999999U9999999999999fy999999r999999r>fgUUfoyrrrrrtlrqsssssxlpsssssrmsssssslpssssssqsssssssnssssssspsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssӺsssssssssssujssssssprsssssssussssssskssssssspssssssssssssssssssssssss9999999rU999999r999999rrf99999otfffffqjtrrrrrmttooooortowwww\XXXXXXX95\XXXXX999\XXXX99995\XXfff>>>\XrrrrryyzrrrrrrrrwwwwwwwwXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/WzttttrtttttttwwxyytttXXXXXXXXXXXXXXXXXXXXXXXXX7WhztjjtttttttttttttttttttttttttjjjXXXXXXXXXXXXXXXXXXXd6666zzzzttttttttttttttttttttttttttttjjjjjjtt999999=I999999DG99999BGG9999=GGG999=DGGG999EGGGG99BGGGGG9=IGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG@0GGC0JG>1RE8KA:P?>SS><R?@;F8CIIIG8+--0G+IQQPOK: 8664+ AA@<-GGG@-.4661S?S,S>SS0S6S/R8RIGIGIII'IH)FE?SE,SSSRQL?874M GHS: S0 R8QQRSSQ/..4468-19>rns_^9ymssxusssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssnsssssssssssssnusssssswsssssnuwojrwwwwwjtooooqwrtuwot999wwxt999wwwr999wwwryf99wwwrr99wwwwwwwworrrrooo|9999999999999999999999999999999999999999wwwwxrttoorrrtttyy|*9999999999999999999999999999999999999999jjtzh/XXXXX:XXXXXXX9\XXXXXX995\XXXX99995XXX999995\X99999995hhhhWWWWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\XXXXXXXaDGGGGGGEGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG:1:>S?/QC-KG6>SG?-?LQSGG@--6:>GGGE>644VSJ:867+SRKGFEGKLNQ4446668?+E@/-M:R:N-,RG-*Q:Q Q Q0P8O/O6OSSSOPSI6QSI.ESJ+/NJ1<:SO:SK>SQC&SCMOL4:IGGS@4CGGGK7?GGGGE4IGGGGN-9GGGGH4EGGGQ/9wwwwrt|ywwwwrtoowwwwotowwwwwwtrwwwwwwrrw9999999999999999>99999>fyyyyrrrroooooxxwwwwwwwwwwwwwwwwwwwwwwwww9999999999999999Urrrrrrrrwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww9999999999999999Uf>99rrrrryywxxooorrwwwwwwwwwwwwwwwwwwwwwwww9\XXXXXX995\XXXX9999\XXXU995\XrrryfGGA-GB7:*:::G=8QSSG=6PGC4LIIDEBC>+<<:88:8+4.C:::<@ELSSSCL4AN4KP7SM6G-E+S>L44O4ONMLKGGG.IGOG+1K+LL-:O P6R0SJ7QHS@4O@4OF.M@-MS?+LS>+MS<-MS<LM0 ,PQ4R6S/GA:?111+++/:"@@?8MQ f<<<<>>?G64QP4<>CS<6GGL+@G?.GO+9@-Q-CQGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGIGGGGGGG>GGGGGGG-DGGGGGG4>GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGIGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGrussssssxrpsssssjqsssssI{rkuqpsG(okuolGG(rGGGIrGGGGGxrssssssssssssssssssssspnksssnqtuuwoT2 +T2Tssssssnqssssssssnsssssssrssss㸦Ķkpssssssssssssssssssssssssssssssssppnmuorr¾ɸssssssssssssssssnёr¦ĸ­rt֣trsīϾ¦ܜܿ֫ww֡ww֫wwwwwrrwwwwwwotwwwwwwotrwwwwwwtjuwwwwwrtwwwuurtuwwuuoj֫wwuuxjwwwwwwwwwwwwwwwwxwwwwwwwjjjjjjjjyyyy|U999999999999999999999wwwwwwwwwwwwwwwwwwwwwwwwjjjtrrrr|yyrtttt9999>>fU9999999999999999wwwwwwwwwwwwwwwwwwwwwwwwroooowwwttttttttU9999999999999999wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwurrroowwu|yrtttrr99fUy9999999>GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGC-GGB.CGG8:QGGC78HGKGGGB4---GGGGIEBEGGGGGGGGGGGGGGGGLLLKG)F?---++-EB=AA=BDGGGGGGGGGGGGGGGGS@+Q)+SLC<+--0++6?>464GGGGGGC6GGGGGGG9 EA?1@QOOLKGH64.-- -84@?44+,S6?-GGG=?>?EGGGGGGGGGGGGGGGQ6:A++R80G4S*0G?LKG>8EG:4.--6CGG99?@BGGGGGGGGGGGGGGGGGGGN<G?GGGGGGGGGGGGGGGGE-DGGGGGS6?GGGGGG8GGGGGLI8EGGGG+48EGGGGCGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG#GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGCGGGGGGGBGGGGGGGT +2  + G +  +GG2 +x +2!2T2 ?, 9992 + 9999A9999GGE9999GGGGB999rr9999999999999999999999999999999999999999¸rrrrryǪf99999gr999999|r999999t999999fr9999999ܹܜtwwuuwj֡wuuwrܶwuuuruuuuoܫuuuwuuuwΝuuw֫uuu|9999999r>999999t999999j999999j999999j|999999rr>99999rtf99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999GGGGGGGGGGGGGGGG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999wry>9999urrf9999uor9999uot9999uwt9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG8E>7GG=<64GGGIC>86GGGGGGDCGGGGGGGGGGGGGGGGGGGGGGGG4 @<8644-+GGIDEEA@GGGGGGGGGGGGGGGG-++---.468<@@@ACEDGGGGGGGGGGGGGGGGGG+-8;++6?EG++4rܚyjjjruΝ֡ܰuwr|9999uwry>999uurrU999uuot999uwoj999wwwj999wwjywwtjrrt999999999999999999999999999999999999999999999999tttttttt999999999999999999999999999999999999999999999>fU|yrrttttrrrr9999999999999999999999999999999>9999Uy|rttrtttrroowooxwwwwwGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGI%GGG%xr)xroukGGGGGGGGGGGGGGGGGGGGGGGGGGGGG(G(xrrxrroukpoumnsssspsssssssGGGGGGGGGGGGGGGGGG(rrrrooouqknppsssssssssssssssssssssssssGGGGGGGGGI)(%}xxrrrroluqmmknnssssssssssssssssssssssssssssssssGGGGGI)(}{xxooollluupppsssssssssssssssssssssssssssssssssssss%oorrrrroqmmkknnpssssssssssssssssssssssssssssssssssssssss}{{xxorooolluuqppssssssssssssssssssssssssssssssssssssssssssssssrrrrrroommkknnppssssssssssssssssssssssssssssssssssssssssssssssssoolluuqqpsssssssssssssssssssssssssssssssssssssssssssssssssssssssmmkkkkkkssssssssssssssssssssssssssssssssssssssssssssssssssssssssknnnnnnnssssssssssssssssssssssssssssssssssssssssssssssssssssssssnnnnnnnnsssssssssssssssssssssssssssssssssssssssssssssssssssssssspppnnnnksssssssssssssssssssssssssssssssssssssssssssssssssssssssskkuwwwossskqwwwssspvwwwssssnqwwssssskqwsssssskwssssssskssssssssoortwworwwotwwotwwwtwwwtwwwrܕwwrܳwwrjxwwwwrjwwwwwrjoww֝wojoww֡wojowwܫwojrwwܶwxjrwwuwjrwwxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGIGGGG(rlGGGrunGGGGGG(GGGG%{rGG({rlqI}rlmpsooqpsssounsssssksssssssssssssss}rolmpssoqnsssssnssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssppnssssssssssssssssssssssssssssssssssssssssssssssssssssssspkmqquullssssssssssssssssssssssssssssssssssssssssssssssssppppppnnlwww{{{}ssssssssssssssssssssssssssssssssssssssssssssssssnkkkmmmq}}}}}}}}ssssssssssssssssssssssssssssssssssssssssssssssssqqquuuuu}{{{{{{}sssssssssssssssssssssssssssssssssssssssssssssssslllllooo}}}}}ssssssssssssssssssssssssssssssssssssssssspppppppoooooooo}ssssssssssssssssssssssssssssssssssssssssppppppppoooooooo}}}}}}ssssssssssssssssssssssssssssssssssssssssppnnnnnkrrrrrrjtsssssssssssssssssssssssssssssssssssssssskkkkkkkkrrrrrrrrsssssssssssssssssssssssssssssssssssssssskkknnnnnrrrrrrjjutspqtssnrssprssprnpnrjrorٔruwjrwwΝwjrww֙wjrww֡wjrww֫wtrwwܳwtrwwܶwttrrܶwti|rwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxrtttjjjjttttttyywwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwooorrrtjjjjjjjtr|f>wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxoorrrjjtttry|yU>999999999GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGVGGGGGGIGGGGGGrGGGGG)oGGGGGrmGG{oqssGomsssokssss}oksssssrmssssssupssssssnssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssmssssssmrssssssojssssssssssssspnqsspnmlospmorGklrGGGry)GGGGrGGGGGGGGGGGGGpnmqlorrlry})GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGrx}%(IGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG%()IIGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGoGGoGI}oG%xuGrmIon%xlpшrmswr99wr99wr99wr~99wt99wt99xt99xt999>>>>>999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGIopGGGGrmsGGGIopsGGG(ussGGGomssGGGonssGGIopssGGI}lsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssrtssssssojssssssujsssssspossssssspssssssssssssssssssssssssGGGGGGGGGGGGGGr)GGGGGjjr}IGurjjjtrxspkqloorssssssppssssssssGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG%rrrjjjtrnkkmqqulssssssssGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG)GGGGGGGrrx}oorrrrrrsssppnkkGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG%()IIGrooxxx{xmmqquuuuGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGxxxx}llloorrrGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG%rrrrrrrrGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG%%%%V%ooxxxxrrGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGrrtjtttrGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGrrrrrrrrGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGroooooooGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG)}{rrrrolluqqknGGGGGGGVGGGGGGIGGGGGIrGGGG%roI%xoln}xrouksslumnssssssssssssopsrqssopssnssssssssssssssssΛr99or99rrU99rye99ܿr|>99֫t999֦t999xt999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGI}lsssGGI}lsssGGGopssGGGonssGGGokssGGG)xussGGGGopsGGGGrksssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssppsssssssssssssssssssssssssssssssssssssssssssssssssssssssspnnkkkmmssssssssssssssssssssssssssssssssssssssssssssssssssssssssmmmmmkkksssssssssssssssssssssssssssssssssssssssssssssssssssssssskkkkkkkksssssssssssssssssssssssssssssssssssssssssssssssssssssssskkknnnnnssssssssssssssssssssssssssssssssssssssssssssssssssssssssnnppppppssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssѤѵֶrrf999ְr|>999Νt9999rt9999rye9999t?9999t99999ry>99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGIxosGGGGGjqGGGGGIxrGGGGGGrGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGssssssssssssssssksssssssonssssssronsssssrokssssGrrqsssGGxrlpssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssѮۡѻxˬrȢrѻȫ{%ѾxGģIGj999999t999999|?9999999999999A9999999DA999999GE999999GGB99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG%{romGGGGIrrGGGGGG}GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGsssssssslkssssssrrlkssss{rrlmpsGI}rrouGGGGxrGGGGGGIGGGGGGGGssssssssssssssssssssssssssssssssmpssssssrrluumkn{orrrrjGG(}xrsssssssssssssssssssssssssssssssssssssssspsssssssrrouknpsrtjjrrolssssssssssssssssssssssssssssssssssssssssssssssssssssssssumknppssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssѤsssssssssssssssѤɫĭ¦ϸGɦ(GG̫}GGG̫GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGB9999GGGG=999GGGGI=99GGGGGD=9GGGGGGD9GGGGGGGBGGGGGGGGGGGGGGGG999999999999999999999999999999999999999999999999B9999999GC99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG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/Graphics/titlescreen.pal.bin new file mode 100644 index 0000000..0935a62 Binary files /dev/null and b/Graphics/titlescreen.pal.bin differ diff --git a/Graphics/titlescreen.png b/Graphics/titlescreen.png new file mode 100644 index 0000000..4dd45c0 Binary files /dev/null and b/Graphics/titlescreen.png differ diff --git a/Graphics/titlescreen.tsa.bin b/Graphics/titlescreen.tsa.bin new file mode 100644 index 0000000..b338a99 Binary files /dev/null and b/Graphics/titlescreen.tsa.bin differ diff --git a/RAM map.txt b/RAM map.txt index c7f2387..fee5dcc 100644 --- a/RAM map.txt +++ b/RAM map.txt @@ -1,7 +1,7 @@ $02000000 SHORT Snake current size $02000002 BYTE Snake facing direction $02000003 BYTE Game speed -$02000004 BYTE Counter +$02000004 BYTE 1 if counter has ever been used $02000005 BYTE Buttons being pressed $02000006 SHORT Egg coordinates $02000008 WORD RNG seed @@ -13,8 +13,10 @@ $02000011 BYTE Update background map 1 flag $02000012 BYTE Update background map 2 flag $02000013 BYTE Update background map 3 flag $02000014 BYTE Tile to use for egg -.. +$02000015 BYTE Current fade coeficient $02000016 SHORT Length of list at $02005000 +$02000018 SHORT FPS counter last time logic was ran +$0200001A SHORT Previous position of tail (used for the list at $02005000), 0 if the snek just grew ... $02000020 LIST Snake body piece coordinates -$02005000 LIST Buffer with available tiles for eggs +$02005000 LIST Buffer with available tiles for eggs, updated when the snake moves diff --git a/ROM Buildfile.event b/ROM Buildfile.event index 45428c1..77cb257 100644 --- a/ROM Buildfile.event +++ b/ROM Buildfile.event @@ -24,30 +24,55 @@ PUSH; ORG $B0; String(00); POP romStart: #inctext lyn "ASM\boot.elf" //change to thumb and set the background layers, tiles and palettes up +ALIGN 4 +titlescreenLoop: +#inctext lyn "ASM\titlescreenLoop.elf" //load the titlescreen and wait for a start press to begin the game + +ALIGN 4 mainLoop: #inctext lyn "ASM\mainLoop.elf" //wait for vblank and execute the gameplay routines +ALIGN 4 interrupt: #inctext lyn "ASM\interrupt.elf" //change to thumb after waiting for vblank and acknowledge interrupt +ALIGN 4 +fadeIn: +#inctext lyn "ASM\fadeIn.elf" + +ALIGN 4 +fadeOut: +#inctext lyn "ASM\fadeOut.elf" + +ALIGN 4 rng: #inctext lyn "ASM\rng.elf" //get random number, return it in r0 and also set it as the next seed +ALIGN 4 drawTile: #inctext lyn "ASM\drawTile.elf" //draw tile at given coords and background layer +ALIGN 4 copyBuffers: #inctext lyn "ASM\copyBuffers.elf" //copy the tilemap buffers over to their destination +ALIGN 4 makeTileAttribute: #inctext lyn "ASM\makeTileAttribute.elf" //piece together the short for the tile based on the attributes +ALIGN 4 loadData: #inctext lyn "ASM\loadData.elf" //load data from source to destination +ALIGN 4 +fillDest: +#inctext lyn "ASM\fillDest.elf" //fill destination with given value and size + +ALIGN 4 startSnake: #inctext lyn "ASM\Snake\startSnake.elf" //prepare the snake's starting position +ALIGN 4 turnSnake: #inctext lyn "ASM\Snake\turnSnake.elf" //change the direction the snake is heading towards //the snake can't change direction to the one she is already facing towards nor the one opposite to it @@ -56,32 +81,44 @@ turnSnake: //the snake also can't turn towards the border of the screen if adjacent to it //in addition, the snake can't turn if doing so is going to make her face her own body immediately +ALIGN 4 moveSnake: #inctext lyn "ASM\Snake\moveSnake.elf" //check if the snake has grown and move all pieces of the body as needed +ALIGN 4 bonkSnake: #inctext lyn "ASM\Snake\bonkSnake.elf" //check if the given coords are already occupied by snake, return 1 if it is -cleanSnake: -#inctext lyn "ASM\Snake\cleanSnake.elf" //wipe the background layer to avoid leftover snake bits - +ALIGN 4 drawSnake: #inctext lyn "ASM\Snake\drawSnake.elf" //draw snake according to the positions +ALIGN 4 drawSnakeBody: #inctext lyn "ASM\Snake\drawSnakeBody.elf" //routine that specifically draws the body segments (so not head/tail/tongue) //the checks got long enough for it to justify a routine //snake body shapes are the -, the |, the luigi, the waluigi, the mirror luigi and the mirror waluigi, of course +ALIGN 4 makeEgg: #inctext lyn "ASM\Egg\makeEgg.elf" //spawn egg and write the coords and tile to ram for the drawEgg routine +ALIGN 4 eatEgg: #inctext lyn "ASM\Egg\eatEgg.elf" //check if head and egg are in the same coords, and if so remove egg and add size to snake +ALIGN 4 drawEgg: #inctext lyn "ASM\Egg\drawEgg.elf" //draw egg according to the coords and tile in ram +ALIGN 4 +makeEggMap: +#inctext lyn "ASM\Egg\makeEggMap.elf" //make the starting map for the egg + +ALIGN 4 +updateEggMap: +#inctext lyn "ASM\Egg\updateEggMap.elf" //change tiles in egg map according to new head and tail positions + /* facing directions of the snake: 1 @@ -98,14 +135,14 @@ facing directions of the snake: ALIGN 4 bgTilemapsBuffer: WORD $03000000 -WORD $0 +WORD $03000800 WORD $0 WORD $0 ALIGN 4 bgTilemaps: WORD $0600F800 -WORD $0 +WORD $0600F000 WORD $0 WORD $0 @@ -118,3 +155,29 @@ ALIGN 4 snekPAL: SHORT 0 8 #incext png2dmp "Graphics\snek.png" --palette-only + +ALIGN 4 +titlescreenIMG: +SHORT 0 9600 +#incbin "Graphics\titlescreen.img.bin" + +ALIGN 4 +titlescreenPAL: +SHORT 0 128 +#incbin "Graphics\titlescreen.pal.bin" + +ALIGN 4 +titlescreenTSA: +SHORT 0 320 +#incbin "Graphics\titlescreen.tsa.bin" + +ALIGN 4 +presstartIMG: +SHORT 0 256 +#incext png2dmp "Graphics\pressstart.png" + +ALIGN 4 +presstartTSA: +SHORT 0 25 +#incbin "Graphics\pressstart.tsa.bin" + diff --git a/rom.gba b/rom.gba index d8062dd..5acff3d 100644 Binary files a/rom.gba and b/rom.gba differ