summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-04-07 13:50:24 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2018-04-07 13:50:24 -0400
commitb8aa92332113127b908973d681c287b32e538a15 (patch)
tree3ab5a16f86d779db1fcf2b7af39212c7fef993c2
parenteaaa093ccaca498e79a0630941cfba0f31fbd9fb (diff)
Decompile rodata
-rw-r--r--data/unk_debug_menu_3.s105
-rw-r--r--ld_script.txt1
-rw-r--r--src/debug/unk_debug_menu_3.c73
3 files changed, 67 insertions, 112 deletions
diff --git a/data/unk_debug_menu_3.s b/data/unk_debug_menu_3.s
deleted file mode 100644
index 100821c9b..000000000
--- a/data/unk_debug_menu_3.s
+++ /dev/null
@@ -1,105 +0,0 @@
- .section .rodata
-
- .align 2
-
-Str_842E238:: @ 0x842E238
- .string "タマゴ$"
-
-.if DEBUG
-
-Str_842E23C:: @ 0x842E23C
- .string "ガイブ$"
-
-Str_842E240:: @ 0x842E240
- .string "ENGLISH$"
-
-Str_842E248:: @ 0x842E248
- .string "TOURNAMENT$"
-
-Str_842E253:: @ 0x842E253
- .string " そら  カードイー$"
-
-Str_842E25E:: @ 0x842E25E
- .string "ポケコッコ$"
-
-Str_842E264:: @ 0x842E264
- .string "ticket$"
-
-Str_842E26B:: @ 0x842E26B
- .string "{PKMN}$"
-
-Str_842E26E:: @ 0x842E26E
- .string "wrong {PKMN}$"
-
-Str_842E277:: @ 0x842E277
- .string "ribbon$"
-
-Str_842E27E:: @ 0x842E27E
- .string "DEX$"
-
-Str_842E282:: @ 0x842E282
- .string "message$"
-
-Str_842E28A:: @ 0x842E28A
- .string "egg$"
-
-Str_842E28E:: @ 0x842E28E
- .string "RAM seed$"
-
-Str_842E297:: @ 0x842E297
- .string "trainer$"
-
-Str_842E29F:: @ 0x842E29F
- .string "clock$"
-
-Str_842E2A5:: @ 0x842E2A5
- .string "item$"
-
-Str_842E2AA:: @ 0x842E2AA
- .string "goods$"
-
-Str_842E2B0:: @ 0x842E2B0
- .string "potion$"
-
-Str_842E2B7:: @ 0x842E2B7
- .string "ball$"
-
-Str_842E2BC:: @ 0x842E2BC
- .string "cheri berry$"
-
-Str_842E2C8:: @ 0x842E2C8
- .string "TM01$"
-
- .align 2
-gUnknown_Debug_842E2D0::
- .4byte Str_842E264, debug_sub_813C404+1
- .4byte Str_842E26B, debug_sub_813C810+1
- .4byte Str_842E26E, debug_sub_813C888+1
- .4byte Str_842E277, debug_sub_813C430+1
- .4byte Str_842E27E, debug_sub_813C488+1
- .4byte Str_842E282, debug_sub_813C45C+1
- .4byte Str_842E28A, debug_sub_813C740+1
- .4byte Str_842E28E, debug_sub_813C5B4+1
- .4byte Str_842E297, debug_sub_813C93C+1
- .4byte Str_842E29F, debug_sub_813C4B4+1
- .4byte Str_842E2A5, debug_sub_813C4D4+1
- .4byte Str_842E2AA, debug_sub_813C500+1
- .4byte Str_842E2B0, debug_sub_813C580+1
- .4byte Str_842E2B7, debug_sub_813C58C+1
- .4byte Str_842E2BC, debug_sub_813C598+1
- .4byte Str_842E2C8, debug_sub_813C5A4+1
-
-gUnknown_Debug_842E350::
- .4byte 0x10
- .4byte gUnknown_Debug_845DAE1
- .4byte gUnknown_Debug_845DDB2
- .4byte gUnknown_Debug_845E306
- .4byte gUnknown_Debug_845E3E0
- .4byte gUnknown_Debug_845E3E0
- .4byte gUnknown_Debug_845E402
- .4byte gUnknown_Debug_845E402
- .4byte gUnknown_Debug_845E422
- .4byte gUnknown_Debug_845E422
- .4byte gUnknown_Debug_845E443
-
-.endif
diff --git a/ld_script.txt b/ld_script.txt
index dffcb1fef..d6a7bfb98 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -648,7 +648,6 @@ SECTIONS {
src/cable_car.o(.rodata);
src/save.o(.rodata);
src/debug/unk_debug_menu_3.o(.rodata);
- data/unk_debug_menu_3.o(.rodata);
src/field_effect_helpers.o(.rodata);
src/contest_ai.o(.rodata);
src/battle/battle_controller_safari.o(.rodata);
diff --git a/src/debug/unk_debug_menu_3.c b/src/debug/unk_debug_menu_3.c
index 373c01f5b..f9ae9b4b5 100644
--- a/src/debug/unk_debug_menu_3.c
+++ b/src/debug/unk_debug_menu_3.c
@@ -10,6 +10,8 @@
#include "berry.h"
#include "mail_data.h"
+const u8 Str_842E238[] = _("タマゴ");
+
#if DEBUG
extern u8 gUnknown_Debug_845DAE1[];
@@ -129,7 +131,7 @@ extern u8 gUnknown_Debug_845DDB2[];
extern u8 gUnknown_Debug_845DDB2End[];
extern u8 gUnknown_Debug_845DDD6[];
-extern const u8 Str_842E23C[]; //static const u8 Str_842E23C[] = _("ガイブ");
+const u8 Str_842E23C[] = _("ガイブ");
size_t debug_sub_813C5B4(u8 * dest)
{
@@ -154,8 +156,8 @@ size_t debug_sub_813C5B4(u8 * dest)
return size;
}
-extern const u8 Str_842E240[];
-extern const u8 Str_842E248[];
+const u8 Str_842E240[] = _("ENGLISH");
+const u8 Str_842E248[] = _("TOURNAMENT");
void debug_sub_813C638(struct Pokemon * mon, u16 species, u8 level, u16 itemId)
{
@@ -198,7 +200,6 @@ extern u8 gUnknown_Debug_845E443[];
extern u8 gUnknown_Debug_845E443End[];
extern u8 gUnknown_Debug_845E467[];
extern u8 gUnknown_Debug_845E4CB[];
-extern const u8 Str_842E238[];
size_t debug_sub_813C740(u8 * dest)
{
@@ -231,7 +232,6 @@ size_t debug_sub_813C740(u8 * dest)
return size;
}
-// same reason as before
size_t debug_sub_813C810(u8 * dest)
{
struct MailStruct mail;
@@ -285,7 +285,8 @@ void debug_sub_813C904(void)
extern u8 gUnknown_Debug_845E4EF[];
extern u8 gUnknown_Debug_845E4EFEnd[];
extern u8 gUnknown_Debug_845E506[];
-extern const u8 Str_842E253[];
+
+const u8 Str_842E253[] = _(" そら  カードイー");
size_t debug_sub_813C93C(u8 * dest)
{
@@ -304,4 +305,64 @@ size_t debug_sub_813C93C(u8 * dest)
return size;
}
+const u8 Str_842E25E[] = _("ポケコッコ");
+const u8 Str_842E264[] = _("ticket");
+const u8 Str_842E26B[] = _("{PKMN}");
+const u8 Str_842E26E[] = _("wrong {PKMN}");
+const u8 Str_842E277[] = _("ribbon");
+const u8 Str_842E27E[] = _("DEX");
+const u8 Str_842E282[] = _("message");
+const u8 Str_842E28A[] = _("egg");
+const u8 Str_842E28E[] = _("RAM seed");
+const u8 Str_842E297[] = _("trainer");
+const u8 Str_842E29F[] = _("clock");
+const u8 Str_842E2A5[] = _("item");
+const u8 Str_842E2AA[] = _("goods");
+const u8 Str_842E2B0[] = _("potion");
+const u8 Str_842E2B7[] = _("ball");
+const u8 Str_842E2BC[] = _("cheri berry");
+const u8 Str_842E2C8[] = _("TM01");
+
+const struct {
+ const u8 * name;
+ size_t (*func)(u8 * dest);
+} gUnknown_Debug_842E2D0[] = {
+ {Str_842E264, debug_sub_813C404},
+ {Str_842E26B, debug_sub_813C810},
+ {Str_842E26E, debug_sub_813C888},
+ {Str_842E277, debug_sub_813C430},
+ {Str_842E27E, debug_sub_813C488},
+ {Str_842E282, debug_sub_813C45C},
+ {Str_842E28A, debug_sub_813C740},
+ {Str_842E28E, debug_sub_813C5B4},
+ {Str_842E297, debug_sub_813C93C},
+ {Str_842E29F, debug_sub_813C4B4},
+ {Str_842E2A5, debug_sub_813C4D4},
+ {Str_842E2AA, debug_sub_813C500},
+ {Str_842E2B0, debug_sub_813C580},
+ {Str_842E2B7, debug_sub_813C58C},
+ {Str_842E2BC, debug_sub_813C598},
+ {Str_842E2C8, debug_sub_813C5A4}
+};
+
+extern u8 gUnknown_Debug_845E306[];
+
+const struct {
+ u8 unk0;
+ u8 *scripts[10];
+} gUnknown_Debug_842E350 = {
+ 0x10, {
+ gUnknown_Debug_845DAE1,
+ gUnknown_Debug_845DDB2,
+ gUnknown_Debug_845E306,
+ gUnknown_Debug_845E3E0,
+ gUnknown_Debug_845E3E0,
+ gUnknown_Debug_845E402,
+ gUnknown_Debug_845E402,
+ gUnknown_Debug_845E422,
+ gUnknown_Debug_845E422,
+ gUnknown_Debug_845E443
+ }
+};
+
#endif // DEBUG