From a0199eaaf0dfc41dfa685a024b8558629d846528 Mon Sep 17 00:00:00 2001 From: Lorenzooone Date: Mon, 21 Oct 2019 19:10:52 +0200 Subject: [PATCH] Make the tea/coffee cutscenes print the proper text --- src/data/bigfont.bin | Bin 12288 -> 12288 bytes src/data/flyover-table.tbl | 2 +- src/m2-flyover.asm | 47 +++++++++++++++++++++++++++++++++++++ src/m2-hack.asm | 10 ++++++++ 4 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/data/bigfont.bin b/src/data/bigfont.bin index db214314f6f2baab116f159a079e64e2bca52fcb..464d0b95fce11c8372b1e7ed2f2765833660576a 100644 GIT binary patch literal 12288 zcmds7Ynt334BOmb=KhzhBqIU|NetQcN13t^ux$Ael9{hRKkwTIDz17)`v>5*XE3)i z8}xl4ficx2zx`|*J7ByfmO2uRwt(aZu{w2(H=mCM!2isG#w=m%O+t^55^b29k5>xq#d+lZgAh1{aV{4%FgF@MJJ!QFSvkM$&HR#N!n${=gFs;F)Nqm;Pjp6M@2=l*`mHNthSUI4oNQq3a0`gmTWu*N=EVA^LrL>9OBUTEuKqjVA+jgPE~aI-T-6vo+HR7(8rulGqy>X<8-B2#R`@f<2lZzY&O;-j&E`e zeXnZGF?S3`{2tff0OJtxM*DM`GIiRSw`%StN)4{Wb_W$j(qp!^%bUFmwhaZ##ZiXuCUS4s9%Aab@GgR z7qtWuBu<^2XWGcD*D`pYjXFbNGu{aCdro*1g-`L z@%`T=&m516prgyZRc1%K;W3M=at?GEsi*o?g{~)Yden0}0(LEa+S$#Q-~Ub$_Y3x$ zL&cI5ihlx4Bq#!&VAM&MO25JlvW61kDs9Hz1&D;fgV^- zs0h5+#dod*W)}h4$39;m798;Lt0?Y@v$I-x01T`%-t2eUvG2zYQUFQCfu1Q_i0*yk z+oMaiK27cn9@OFZ(DOT3mV8X$J9VslkcjsIDtT^nGb*V31#H7jw^ENN0tMUweYOs9 z*sAUp_qFg8cq@N%{*owM#b1VjG%nkaj){A`L|<&|>4q0P>E@d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YWql5=M_u4DfS@7HGVef`eZefcW(^Lqo%tsUD- zKfczfUYS4CJg~^&{<#EA?pba!KJ1|9>iLx@?IQ(B!+_86XZx7Pwt}?{G~1uR8(DR? zXPkS0m;at~>i7*FJx}l@ekEb7U*tb(nDZx-_;2@st@L|Jeib~ulO_MsV}2w#gQxCi z5_5mTzWZJ7+T{enpi}FYjyu2O`n_pfnZd*RsDZu5R4^hVU8#_rV^@=WX%0y4%{w71 z+~Con-~Rbw?QQGW_QBuGe@kijf46>tDS4bGiRy|Am95ws&3O+gj7lc>FgXtTWF4O?x$K zFZG8D8BeS+SMplyb?EaSe5w)$+WUvIlvDhBYoEZ1-}e&p;kny3SR`f&f3*XnfadX& z`{?)5M%nF?Mh~(dd!@tkfBNixGxhx=ySz7!eR%Z4cn62hrk-wQL@646AG;c|wC4UT zq735nZW%~!S<^@9K&DZ z!~^Np0G1D-Jbtrlw)q9Wjd6F9G0g$d!SbR2)xGXJvw1OH0AW?zX|#YdfahSASs zywzPQR^K1Aydi{_4h~MVIOIf6(Ja<2b)?lv8vzB+m!H651{xpq3wSh( z4<3HI|3=&)XYHG-`Wl|4KFr_1h1ANUJNnY>6=a_;c-ZX>v&?-p9)(x&QFr8%`Ey1usFT{tMFEvvei z#t-KXW%<2q!}zSP&tG@Oze7&pwQ9+A>|e#toab+E8!g@eo)VnzAk==DKMi-W&;QSc z53Z|^H?JSn=kMRYW7qzFu_STEKF=(+=2Jf%>+uWJ)PC8%5zkE9*Q$MDHv80Hkqmh1 Mth!Twc#!k|9|gF8>Hq)$ diff --git a/src/data/flyover-table.tbl b/src/data/flyover-table.tbl index 2bac261..deb22e9 100644 --- a/src/data/flyover-table.tbl +++ b/src/data/flyover-table.tbl @@ -53,7 +53,7 @@ 8024=D 8025=E 8026=F -8022=G +8027=G 8028=H 8029=I 802A=J diff --git a/src/m2-flyover.asm b/src/m2-flyover.asm index cba4361..7ae0cc2 100644 --- a/src/m2-flyover.asm +++ b/src/m2-flyover.asm @@ -1,3 +1,12 @@ +//============================================================================== +//Makes it so largevwf gets what it expects from the tea routine +wrapper_largevwf_tea: +push {r4,lr} +mov r4,r5 +bl largevwf +mov r5,r4 +pop {r4,pc} + //============================================================================== //Writes the bigfont letters to RAM largevwf: @@ -98,6 +107,44 @@ pop {r5-r7,pc} .pool +//============================================================================== +//Gets in r0 the current height. In r5 DMA channel 3 and in r4 the letter buffer +flyover_scroll_routine: +push {lr} +sub r0,r0,#1 +mov r1,#0x3F +mov r2,r0 +and r2,r1 +cmp r2,r1 +bne @@end +lsr r0,r0,#6 //Get the value beyond the 0x40 +mov r1,#3 +and r0,r1 +add r1,r0,#1 +lsl r0,r0,#0xD //Multiply the value obtained by 0x2000 +lsl r1,r1,#0xD //Get ending address +ldr r2,=#0x06008000 +ldr r3,=#0x84000100 +add r0,r0,r2 +add r1,r1,r2 +mov r2,r5 //DMA Transfer channel 3 +@@cycle: +str r4,[r2,#0] +str r0,[r2,#4] +str r3,[r2,#8] +ldr r5,[r2,#8] +mov r5,#0x80 +lsl r5,r5,#0x3 +add r0,r0,r5 +add r4,r4,r5 +cmp r0,r1 +bne @@cycle +mov r5,r2 +@@end: +pop {pc} + +.pool + //.org 0x80c4c0c //.byte 0x20,0x1C,0x51,0x46,0x2A,0x22 diff --git a/src/m2-hack.asm b/src/m2-hack.asm index 56dcbeb..d4f943a 100644 --- a/src/m2-hack.asm +++ b/src/m2-hack.asm @@ -1296,9 +1296,19 @@ nop .org 0x80B3A80 :: dw flyover_tea .org 0x80B3AA4 :: dw flyover_coffee +//Change line size to 0x20 pixels +//.org 0x80B3ABA :: add r0,#0x20 +//.org 0x80B3B0C :: mov r1,#0x3F :: and r0,r1 :: nop +//.org 0x80B4162 :: bl flyover_scroll_routine :: b 0x80B41B0 +//.org 0x80B3B44 :: dw 0x85000900 + + //Flyover remapping .org 0x80B3482 :: bl largevwf :: b 0x80B348E +//Flyover remapping +.org 0x80B3B5E :: bl wrapper_largevwf_tea :: b 0x80B3A18 + // Weld the odd-numbered flyover letters .org 0x80B3254 :: bl flyoverweld :: nop