mirror of
https://github.com/pret/pmd-red.git
synced 2025-02-21 13:53:51 +00:00
isemi-identified VRAM and split personality test funcs
This commit is contained in:
parent
fc7f14ab66
commit
2582d7a868
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_8009804
|
thumb_func_start vram_related_8009804
|
||||||
sub_8009804:
|
vram_related_8009804:
|
||||||
push {lr}
|
push {lr}
|
||||||
movs r1, 0xC0
|
movs r1, 0xC0
|
||||||
lsls r1, 19
|
lsls r1, 19
|
||||||
@ -83,7 +83,7 @@ _08009890: .4byte 0x06010000
|
|||||||
_08009894: .4byte 0x00001f7f
|
_08009894: .4byte 0x00001f7f
|
||||||
_08009898: .4byte 0x05000200
|
_08009898: .4byte 0x05000200
|
||||||
_0800989C: .4byte 0x00a000a0
|
_0800989C: .4byte 0x00a000a0
|
||||||
thumb_func_end sub_8009804
|
thumb_func_end vram_related_8009804
|
||||||
|
|
||||||
thumb_func_start sub_80098A0
|
thumb_func_start sub_80098A0
|
||||||
sub_80098A0:
|
sub_80098A0:
|
||||||
|
2022
asm/code_8027C84.s
2022
asm/code_8027C84.s
File diff suppressed because it is too large
Load Diff
@ -2181,7 +2181,7 @@ _08043CD4: .4byte gUnknown_203B41C
|
|||||||
thumb_func_start sub_8043CD8
|
thumb_func_start sub_8043CD8
|
||||||
sub_8043CD8:
|
sub_8043CD8:
|
||||||
push {lr}
|
push {lr}
|
||||||
bl sub_8009804
|
bl vram_related_8009804
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
thumb_func_end sub_8043CD8
|
thumb_func_end sub_8043CD8
|
||||||
|
1519
asm/code_8095014.s
1519
asm/code_8095014.s
File diff suppressed because it is too large
Load Diff
1446
asm/code_809747C.s
Normal file
1446
asm/code_809747C.s
Normal file
File diff suppressed because it is too large
Load Diff
2030
asm/personality_test.s
Normal file
2030
asm/personality_test.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -27,5 +27,6 @@ struct Dungeon
|
|||||||
|
|
||||||
extern struct Dungeon gDungeons[];
|
extern struct Dungeon gDungeons[];
|
||||||
extern struct DungeonName gDungeonNames[];
|
extern struct DungeonName gDungeonNames[];
|
||||||
|
const u8 *GetDungeonName1(u8 dungeon);
|
||||||
|
|
||||||
#endif //GUARD_DUNGEON_H
|
#endif //GUARD_DUNGEON_H
|
||||||
|
@ -97,7 +97,8 @@ SECTIONS {
|
|||||||
asm/code_801D760.o(.text);
|
asm/code_801D760.o(.text);
|
||||||
src/code_8027C84_pre.o(.text);
|
src/code_8027C84_pre.o(.text);
|
||||||
asm/code_8027C84.o(.text);
|
asm/code_8027C84.o(.text);
|
||||||
src/code_8027C84.o(.text);
|
asm/personality_test.o(.text);
|
||||||
|
src/personality_test.o(.text);
|
||||||
asm/code_803D110.o(.text);
|
asm/code_803D110.o(.text);
|
||||||
src/code_8040094.o(.text);
|
src/code_8040094.o(.text);
|
||||||
asm/code_8040094.o(.text);
|
asm/code_8040094.o(.text);
|
||||||
@ -124,6 +125,8 @@ SECTIONS {
|
|||||||
asm/code_8092334.o(.text);
|
asm/code_8092334.o(.text);
|
||||||
src/code_8094F88.o(.text);
|
src/code_8094F88.o(.text);
|
||||||
asm/code_8095014.o(.text);
|
asm/code_8095014.o(.text);
|
||||||
|
src/code_809747C.o(.text);
|
||||||
|
asm/code_809747C.o(.text);
|
||||||
src/code_8097F40.o(.text);
|
src/code_8097F40.o(.text);
|
||||||
asm/code_8097F40.o(.text);
|
asm/code_8097F40.o(.text);
|
||||||
asm/code_8098468.o(.text);
|
asm/code_8098468.o(.text);
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
#include "global.h"
|
|
||||||
|
|
||||||
extern u8 gUnknown_80F42D0[];
|
|
||||||
extern u8 gUnknown_80F42F0[];
|
|
||||||
extern u8 gUnknown_203B408;
|
|
||||||
|
|
||||||
u8 sub_803D0D8()
|
|
||||||
{
|
|
||||||
return gUnknown_203B408;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sub_803D0E4(u8 r0)
|
|
||||||
{
|
|
||||||
gUnknown_203B408 = r0;
|
|
||||||
}
|
|
||||||
|
|
||||||
u8 sub_803D0F0(u8 r0)
|
|
||||||
{
|
|
||||||
return gUnknown_80F42F0[r0];
|
|
||||||
}
|
|
||||||
|
|
||||||
u8 sub_803D100(u8 r0)
|
|
||||||
{
|
|
||||||
return gUnknown_80F42D0[r0];
|
|
||||||
}
|
|
81
src/code_809747C.c
Normal file
81
src/code_809747C.c
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "dungeon.h"
|
||||||
|
|
||||||
|
extern u32 *gStoryMissionText[];
|
||||||
|
extern const u8 gDummyScenarioText;
|
||||||
|
extern u32 gUnknown_8109CC0;
|
||||||
|
extern u8 sub_80A270C();
|
||||||
|
extern void sub_80015C0(u8, u8);
|
||||||
|
|
||||||
|
const u8 *sub_809747C(s16 r0)
|
||||||
|
{
|
||||||
|
if(r0 == 0xD)
|
||||||
|
{
|
||||||
|
return &gDummyScenarioText;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetDungeonName1(sub_80A270C());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const u8 *sub_80974A0(s16 r0)
|
||||||
|
{
|
||||||
|
if(r0 == 0xD)
|
||||||
|
{
|
||||||
|
return &gDummyScenarioText;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetDungeonName1(sub_80A270C());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NONMATCHING
|
||||||
|
NAKED
|
||||||
|
#endif
|
||||||
|
u32 *sub_80974C4(s16 r0)
|
||||||
|
{
|
||||||
|
#ifdef NONMATCHING
|
||||||
|
// TODO fix regswap memes of r0/r1
|
||||||
|
if(r0 <= 0x1E)
|
||||||
|
{
|
||||||
|
return gStoryMissionText[(r0 << 1)];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return &gUnknown_8109CC0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
asm_unified("\tpush {lr}\n"
|
||||||
|
"\tlsls r0, 16\n"
|
||||||
|
"\tasrs r0, 16\n"
|
||||||
|
"\tcmp r0, 0x1E\n"
|
||||||
|
"\tble _080974D8\n"
|
||||||
|
"\tldr r0, _080974D4\n"
|
||||||
|
"\tb _080974E0\n"
|
||||||
|
"\t.align 2, 0\n"
|
||||||
|
"_080974D4: .4byte gUnknown_8109CC0\n"
|
||||||
|
"_080974D8:\n"
|
||||||
|
"\tlsls r0, 3\n"
|
||||||
|
"\tldr r1, _080974E4\n"
|
||||||
|
"\tadds r0, r1\n"
|
||||||
|
"\tldr r0, [r0]\n"
|
||||||
|
"_080974E0:\n"
|
||||||
|
"\tpop {r1}\n"
|
||||||
|
"\tbx r1\n"
|
||||||
|
"\t.align 2, 0\n"
|
||||||
|
"_080974E4: .4byte gStoryMissionText");
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80974E8(void)
|
||||||
|
{
|
||||||
|
sub_80015C0(0, 0x2E);
|
||||||
|
sub_80015C0(0, 0x2F);
|
||||||
|
}
|
||||||
|
|
||||||
|
void nullsub_208(void)
|
||||||
|
{
|
||||||
|
}
|
@ -28,3 +28,28 @@ const u16 gPartners[10] =
|
|||||||
SPECIES_MUDKIP
|
SPECIES_MUDKIP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern u8 gUnknown_80F42D0[];
|
||||||
|
extern u8 gUnknown_80F42F0[];
|
||||||
|
extern u8 gUnknown_203B408;
|
||||||
|
|
||||||
|
u8 sub_803D0D8()
|
||||||
|
{
|
||||||
|
return gUnknown_203B408;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_803D0E4(u8 r0)
|
||||||
|
{
|
||||||
|
gUnknown_203B408 = r0;
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 sub_803D0F0(u8 r0)
|
||||||
|
{
|
||||||
|
return gUnknown_80F42F0[r0];
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 sub_803D100(u8 r0)
|
||||||
|
{
|
||||||
|
return gUnknown_80F42D0[r0];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user