From fa5bca53ce218347b706bcf9318d07c2e0ab1645 Mon Sep 17 00:00:00 2001 From: sup39 Date: Sun, 25 Feb 2024 19:30:52 +0900 Subject: [PATCH] fix (ILSEx v1.3.1): use white loading screen for episode area --- InstantLevelSelectExtra/@code.xml | 158 ++++++++++++++++------------- InstantLevelSelectExtra/info.xml | 2 +- InstantLevelSelectExtra/src/main.s | 74 +++++++++----- 3 files changed, 132 insertions(+), 102 deletions(-) diff --git a/InstantLevelSelectExtra/@code.xml b/InstantLevelSelectExtra/@code.xml index aa8974c..0ce354b 100644 --- a/InstantLevelSelectExtra/@code.xml +++ b/InstantLevelSelectExtra/@code.xml @@ -3,7 +3,7 @@ Instant Level Select Extra レベル選択EX sup39(サポミク) - 1.3 + 1.3.1 Feb 25, 2024 ::: warning @@ -69,7 +69,7 @@ 4. これで好きなだけハニスキを練習できます。他のエリアに入ろうとする時に自動的にやり直すので、手動でやり直す必要がありません。必要であれば`十字キー上`でやり直すこともできます。 - C20F9B74 00000057 + C20F9B74 0000005A 3C80817F 816D97D0 3D808040 80AC0D80 20050022 540A043D @@ -78,20 +78,20 @@ 28830001 4C451102 40A2000C 38A00008 90AC0D80 7C7D1B79 - 41820274 818D97E8 + 4182028C 818D97E8 280C0000 41820014 898C0064 38000021 - 5C00656B 40820258 + 5C00656B 40820270 70A00004 41A20040 881F0008 2C000008 41820034 881F000E 3D40803B 394A40E8 7CEA00AE 2C070001 - 4081022C 38070001 + 40810244 38070001 5400EFFE 7CE70214 54E7403E 60E700FF 480000FC 70A00008 - 41A2020C 4800003D + 41A20224 4800003D 00141516 0017181D 34000090 2F2E3020 32293328 2A1FBA3C @@ -144,22 +144,25 @@ 900B00D8 A00B00CC 60004000 54000524 B00B00CC B0FF0012 - 54E0C63E 819F0020 - 2C000007 2C80000E - 4C423382 3800003B - 41820008 38000000 - B00C00E4 A00C00E2 - 540007FA B00C00E2 - 54FDD7BE 3BBD0005 - 819F0034 38000000 - 900C0020 38000012 - 900C0024 380000FF - 280709FF 40A2000C - 3C00D2D2 6000D2FF - 900C0018 00000000 + 819F0020 54E0C63E + 2F000009 2880000F + 3940007D 5D4A05EF + 4EC51042 2C000007 + 2C80000E 4C423382 + 3800003B 41820008 + 38000000 B00C00E4 + A00C00E2 540007FA + B00C00E2 54FDD7BF + 3BBD0005 819F0034 + 38000000 900C0020 + 419A000C 40820010 + 4096000C 3C00D2D2 + 6000D200 600000FF + 900C0018 38000012 + 900C0024 00000000 - C22A6170 00000057 + C22A6170 0000005A 3C80817F 816D9FA0 3D808040 80AC4484 20050022 540A043D @@ -168,20 +171,20 @@ 28830001 4C451102 40A2000C 38A00008 90AC4484 7C7D1B79 - 41820274 818D9FB8 + 4182028C 818D9FB8 280C0000 41820014 898C0064 38000021 - 5C00656B 40820258 + 5C00656B 40820270 70A00004 41A20040 881F0008 2C000008 41820034 881F000E 3D40803E 394AF498 7CEA00AE 2C070001 - 4081022C 38070001 + 40810244 38070001 5400EFFE 7CE70214 54E7403E 60E700FF 480000FC 70A00008 - 41A2020C 4800003D + 41A20224 4800003D 00141516 0017181D 34000090 2F2E3020 32293328 2A1FBA3C @@ -234,22 +237,25 @@ 900B00D8 A00B00CC 60004000 54000524 B00B00CC B0FF0012 - 54E0C63E 819F0020 - 2C000007 2C80000E - 4C423382 3800003B - 41820008 38000000 - B00C00E4 A00C00E2 - 540007FA B00C00E2 - 54FDD7BE 3BBD0005 - 819F0034 38000000 - 900C0020 38000012 - 900C0024 380000FF - 280709FF 40A2000C - 3C00D2D2 6000D2FF - 900C0018 00000000 + 819F0020 54E0C63E + 2F000009 2880000F + 3940007D 5D4A05EF + 4EC51042 2C000007 + 2C80000E 4C423382 + 3800003B 41820008 + 38000000 B00C00E4 + A00C00E2 540007FA + B00C00E2 54FDD7BF + 3BBD0005 819F0034 + 38000000 900C0020 + 419A000C 40820010 + 4096000C 3C00D2D2 + 6000D200 600000FF + 900C0018 38000012 + 900C0024 00000000 - C229E080 00000057 + C229E080 0000005A 3C80817F 816D9EC8 3D808040 80ACBC24 20050022 540A043D @@ -258,20 +264,20 @@ 28830001 4C451102 40A2000C 38A00008 90ACBC24 7C7D1B79 - 41820274 818D9EE0 + 4182028C 818D9EE0 280C0000 41820014 898C0064 38000021 - 5C00656B 40820258 + 5C00656B 40820270 70A00004 41A20040 881F0008 2C000008 41820034 881F000E 3D40803D 394A6DB0 7CEA00AE 2C070001 - 4081022C 38070001 + 40810244 38070001 5400EFFE 7CE70214 54E7403E 60E700FF 480000FC 70A00008 - 41A2020C 4800003D + 41A20224 4800003D 00141516 0017181D 34000090 2F2E3020 32293328 2A1FBA3C @@ -324,22 +330,25 @@ 900B00D8 A00B00CC 60004000 54000524 B00B00CC B0FF0012 - 54E0C63E 819F0020 - 2C000007 2C80000E - 4C423382 3800003B - 41820008 38000000 - B00C00E4 A00C00E2 - 540007FA B00C00E2 - 54FDD7BE 3BBD0005 - 819F0034 38000000 - 900C0020 38000012 - 900C0024 380000FF - 280709FF 40A2000C - 3C00D2D2 6000D2FF - 900C0018 00000000 + 819F0020 54E0C63E + 2F000009 2880000F + 3940007D 5D4A05EF + 4EC51042 2C000007 + 2C80000E 4C423382 + 3800003B 41820008 + 38000000 B00C00E4 + A00C00E2 540007FA + B00C00E2 54FDD7BF + 3BBD0005 819F0034 + 38000000 900C0020 + 419A000C 40820010 + 4096000C 3C00D2D2 + 6000D200 600000FF + 900C0018 38000012 + 900C0024 00000000 - C2285FCC 00000057 + C2285FCC 0000005A 3C80817F 816D9E60 3D80803F 80AC5458 20050022 540A043D @@ -348,20 +357,20 @@ 28830001 4C451102 40A2000C 38A00008 90AC5458 7C7D1B79 - 41820274 818D9E78 + 4182028C 818D9E78 280C0000 41820014 898C0064 38000021 - 5C00656B 40820258 + 5C00656B 40820270 70A00004 41A20040 881F0008 2C000008 41820034 881F000E 3D40803D 394AF9B8 7CEA00AE 2C070001 - 4081022C 38070001 + 40810244 38070001 5400EFFE 7CE70214 54E7403E 60E700FF 480000FC 70A00008 - 41A2020C 4800003D + 41A20224 4800003D 00141516 0017181D 34000090 2F2E3020 32293328 2A1FBA3C @@ -414,18 +423,21 @@ 900B00D8 A00B00CC 60004000 54000524 B00B00CC B0FF0012 - 54E0C63E 819F0020 - 2C000007 2C80000E - 4C423382 3800003B - 41820008 38000000 - B00C00E4 A00C00E2 - 540007FA B00C00E2 - 54FDD7BE 3BBD0005 - 819F0034 38000000 - 900C0020 38000012 - 900C0024 380000FF - 280709FF 40A2000C - 3C00D2D2 6000D2FF - 900C0018 00000000 + 819F0020 54E0C63E + 2F000009 2880000F + 3940007D 5D4A05EF + 4EC51042 2C000007 + 2C80000E 4C423382 + 3800003B 41820008 + 38000000 B00C00E4 + A00C00E2 540007FA + B00C00E2 54FDD7BF + 3BBD0005 819F0034 + 38000000 900C0020 + 419A000C 40820010 + 4096000C 3C00D2D2 + 6000D200 600000FF + 900C0018 38000012 + 900C0024 00000000 diff --git a/InstantLevelSelectExtra/info.xml b/InstantLevelSelectExtra/info.xml index ac3525e..7e7d314 100644 --- a/InstantLevelSelectExtra/info.xml +++ b/InstantLevelSelectExtra/info.xml @@ -3,7 +3,7 @@ Instant Level Select Extra レベル選択EX sup39(サポミク) - 1.3 + 1.3.1 Feb 25, 2024 ::: warning diff --git a/InstantLevelSelectExtra/src/main.s b/InstantLevelSelectExtra/src/main.s index b41a14e..981f832 100644 --- a/InstantLevelSelectExtra/src/main.s +++ b/InstantLevelSelectExtra/src/main.s @@ -11,6 +11,8 @@ .set rApp, 31 # gpApplication .set rNextGameMode, 29 .set crAreaLock, 7 +.set crArea9, 6 +.set crArea234568, 5 .set $btnLevelSelect, 0x8 # D_UP .set $btnShineSelect, 0x4 # D_DOWN @@ -18,12 +20,6 @@ lis \reg, \val@h ori \reg, \reg, \val@l .endm -#.macro call addr -# li32 r12, \addr -# mtlr r12 -# blrl r12 -# #bl call -#.endm .L.prepare: ## prepare registers @@ -146,10 +142,6 @@ .long 0x12234070 .long 0x23467001 -#call: -# mtctr r12 -# bctr - .L.LevelSelect: mflr rD @@ -316,48 +308,74 @@ handlePlaza: ### write nextArea sth rAns, 0x12(rApp) -.set rMGP, 12 -# SirenaHotel(0x07) or Casino(0x0E) ? 59 : 0 +.L.handleStickCD: + lwz r12, 0x20(rApp) # TMarioGamePad* +## area rlwinm r0, rAns, 32-8, 0xFF # area - lwz rMGP, 0x20(rApp) # TMarioGamePad* +## crArea9(eq): area == 9 + cmpwi crArea9, r0, 9 +## crArea234568(eq) +### cr1(gt): area >= 0x10 + cmplwi cr1, r0, 0xF +### cr0(eq): area magic == 0 + li rTmp, 0x7D # 234568 => 111_1101 + rlwnm. rTmp, rTmp, r0, 31-8, 31-8 # LSB 8 +### crArea234568(eq) = !(area >= 0x10) && !(area magic == 0) + crnor 4*crArea234568+eq, 4*cr1+gt, eq +## SirenaHotel(0x07) or Casino(0x0E) ? 59 : 0 cmpwi r0, 0x07 # SirenaHotel cmpwi cr1, r0, 0x0E # Casino - cror eq, eq, 4*cr1+eq + cror eq, eq, 4*cr1+eq # (NOTE: cannot use rlwnm trick since area may >= 0x20) li r0, 59 - beq- .L.handleStickCD + beq- .L.handleStickCD.apply li r0, 0 -.L.handleStickCD: - sth r0, 0xe4(rMGP) +.L.handleStickCD.apply: + sth r0, 0xe4(r12) .L.handleStickFlag: ## clear 0x2 bit of 0xe2 flag - lhz r0, 0xe2(rMGP) + lhz r0, 0xe2(r12) rlwinm r0, r0, 0, 31, 29 - sth r0, 0xe2(rMGP) + sth r0, 0xe2(r12) ## set nextGameMode if gpMarDirector == NULL ### nextGameMode = nextArea == (shine select) ? 8 : 5 ## ep==0xFF ? 3 : 0 (Note: all valid ep id < 0x40) - rlwinm rNextGameMode, rAns, 32-6, 0x3 + ## cr0(eq) == ep!=0xFF + rlwinm. rNextGameMode, rAns, 32-6, 0x3 addi rNextGameMode, rNextGameMode, 5 .L.setFader: ## TSMSFader::setFadeStatus(gpApplication.fader, FadedOut(=0)) lwz r12, 0x34(rApp) +.L.setFader.status: ### this->status = FadedOut(0); li r0, 0 stw r0, 0x20(r12) +.L.setFader.color: +## TSMSFader::setColor(gpApplication.fader, color) +/** + * (9, *) => white (0xd2d2d2ff) + * (*, 0xFF) => black (0xff) + * (2|3|4|5|6|8, *) => white + * _ => black + */ +### area == 9 => white + beq crArea9, .L.setFader.color.white +### !(ep != 0xFF) => black (Note: DO NOT DESTROY cr0 UNTIL HERE!) + bne cr0, .L.setFader.color.black +### area != 2|3|4|5|6|8 => black + bne crArea234568, .L.setFader.color.black +.L.setFader.color.white: + li32 r0, 0xd2d2d200 +.L.setFader.color.black: + ori r0, r0, 0xff # r0 = 0 in .L.setFader.status +.L.setFader.color.apply: + stw r0, 0x18(r12) + ### this->color->a = 0xff; (overwritten afterward) ### (this->wipeRequest).type = 0x12; li r0, 0x12 stw r0, 0x24(r12) -## TSMSFader::setColor(gpApplication.fader, color=0xff) -### this->color = rAns == 0x09FF ? 0xd2d2d2ff : 0xff - li r0, 0xff - cmplwi rAns, 0x09FF - bne+ .L.setFader.color.apply - li32 r0, 0xd2d2d2ff -.L.setFader.color.apply: - stw r0, 0x18(r12) .L.done: