Room Message Expander [CLF78]
#1
This code will let you add more room messages than the game normally allows (and also replace existing ones). Please check the Notes below before using this code.

NTSC-U
0262C906 0000XXXX
0262B956 0000XXXX
0262B95A 0000XXXX
0262B2F6 0000XXXX
C262B2FC 00000004
5400083C 3C60YYYY
6063YYYY 7C63022E
382101A0 4E800020
60000000 00000000
C262D06C 00000003
7C741B78 2C030000
40A20008 3A80FFFF
60000000 00000000

PAL
025DC3EA 0000XXXX
025DB3E2 0000XXXX
025DB3E6 0000XXXX
025DAD82 0000XXXX
C25DAD88 00000004
5400083C 3C60YYYY
6063YYYY 7C63022E
382101A0 4E800020
60000000 00000000
C25DCB50 00000003
7C741B78 2C030000
40A20008 3A80FFFF
60000000 00000000

NTSC-J
025DBCC6 0000XXXX
025DACBE 0000XXXX
025DACC2 0000XXXX
025DA65E 0000XXXX
C25DA664 00000004
5400083C 3C60YYYY
6063YYYY 7C63022E
382101A0 4E800020
60000000 00000000
C25DC42C 00000003
7C741B78 2C030000
40A20008 3A80FFFF
60000000 00000000

NTSC-K
025CA586 0000XXXX
025C957E 0000XXXX
025C9582 0000XXXX
025C8F1E 0000XXXX
C25C8F24 00000004
5400083C 3C60YYYY
6063YYYY 7C63022E
382101A0 4E800020
60000000 00000000
C25CACEC 00000003
7C741B78 2C030000
40A20008 3A80FFFF
60000000 00000000

Notes:
  • XXXX = Total amount of messages
  • YYYYYYYY = Address of the array of the BMG IDs (use a 06 code to store the BMG IDs as halfwords)
  • This does not allow adding more "room start" buttons (i haven't figured out how to make them work properly yet, besides removing existing ones).
  • All users must be running the code for it to take effect. Users without it will receive the original messages (or none at all if the message ID is bigger than the amount of original messages).
ASM Sources:

Load BMGs from custom array:
Code:
# Set array location here
.set BMGArray, 0xXXXXXXXX

# Modified original instruction
slwi r0, r0, 2

# Load the BMG ID
lis r3, BMGArray@h
ori r3, r3, BMGArray@l
lhzx r3, r3, r0

# Copy of the game's original instructions to return directly from here
addi r1, r1, 0x1A0
blr

Hide button if message doesn't exist:
Code:
# Original instruction
mr r20, r3

# Check if BMG is 0
cmpwi r3, 0
bne+ end

# Replace r20 with -1 to hide message button
li r20, -1

# Return
end:

Code created by: CLF78
Reply
#2
(05-03-2021, 01:14 PM)CLF78 Wrote: NTSC-U
0262C907 0000XXXX
I think, this is a bug and  0262C906 0000XXXX is correct.
(verified with my new porting command)
Reply
#3
That's likely just a simple typo on their part. It doesn't affect anything though as the codehandler will automatically align the calculated address if it is odd like that
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#4
But it is most likely undefined behavior because this feature is not really documented (Am I wrong?). And if porting to C or real assembler, it is simply a wrong address. So it is better to fix it.
Reply
#5
Yes it should be fixed, I was simply explaining why it could be working in that state Tongue
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#6
Oh i did not notice the typo, it's fixed now. Thank you for reporting!
Reply
#7
(05-06-2021, 01:26 PM)CLF78 Wrote: Oh i did not notice the typo, it's fixed now. Thank you for reporting!
I noticed it only, because I verify my new address porting command ("wstrt PORT") with all new cheats.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)