From a8053975ac28ec7e27ca48fcf8b303d7c507038b Mon Sep 17 00:00:00 2001 From: jeffman Date: Thu, 26 Sep 2019 22:36:43 -0400 Subject: [PATCH] Add text palette control --- src/m2-title.asm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/m2-title.asm b/src/m2-title.asm index beed36b..2b5e81a 100644 --- a/src/m2-title.asm +++ b/src/m2-title.asm @@ -59,6 +59,15 @@ str r0,[r1,4] ldr r0,=0x84000008 str r0,[r1,8] ldr r0,[r1,8] + +// Copy to OBJ pal 0 as well for the text +str r2,[r1] +ldr r0,=0x5000200 +str r0,[r1,4] +ldr r0,=0x84000008 +str r0,[r1,8] +ldr r0,[r1,8] + pop {r3} // Return to old sequence 0 code @@ -150,6 +159,7 @@ bhi @@next1 ldr r0,[r1,8] mov r2,0 str r2,[sp] + mov r2,sp str r2,[r1] ldr r0,=0x5000100 @@ -157,6 +167,15 @@ bhi @@next1 ldr r0,=0x85000040 str r0,[r1,8] ldr r0,[r1,8] + + // Black for OBJ pal 0 + str r2,[r1] + ldr r0,=0x5000200 + str r0,[r1,4] + ldr r0,=0x85000040 + str r0,[r1,8] + ldr r0,[r1,8] + pop {r2} b @@advance_frame @@ -192,6 +211,7 @@ bhi @@next2 add r0,r0,r1 // Copy to BG pal 8 + mov r4,r0 ldr r1,=0x40000D4 str r0,[r1] ldr r0,=0x5000100 @@ -199,6 +219,15 @@ bhi @@next2 ldr r0,=0x84000008 str r0,[r1,8] ldr r0,[r1,8] + + // Copy to OBJ pal 0 + str r4,[r1] + ldr r0,=0x5000200 + str r0,[r1,4] + ldr r0,=0x84000008 + str r0,[r1,8] + ldr r0,[r1,8] + b @@advance_frame @@next2: