Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ extern u16 gButtonCurrent;
extern s8 gJoyX;
extern s8 gJoyY;

extern u16 D_800BE50C;
extern u16 D_800BE510;
extern u16 D_800BE508;
extern u16 D_800BE504;

#endif

44 changes: 44 additions & 0 deletions src/marina.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,50 @@
#include "common.h"

#include "boot.h"

#include "input.h"

typedef struct {
u32 flags;
u8 pad[0x54];
} MarinaEntry;

extern MarinaEntry D_800EF590[];

#ifdef NON_MATCHING
u8 func_80048600(s32 arg0) {
u16 idx = (u16)arg0;
u16 flags = D_801370CC;
u8 ret;

if (flags & D_800BE50C) {
ret = 1;
if (D_800EF590[idx].flags & 0x20) {
ret = 0x81;
}
} else {
ret = 0;
if (flags & D_800BE510) {
ret = 2;
if (D_800EF590[idx].flags & 0x20) {
ret = 0x82;
}
}
}

if (flags & D_800BE508) {
ret = (u8)(ret | 0x10);
}

if (flags & D_800BE504) {
ret = (u8)(ret | 0x20);
}

return ret;
}
#else
#pragma GLOBAL_ASM("asm/nonmatchings/marina/func_80048600.s")
#endif

#pragma GLOBAL_ASM("asm/nonmatchings/marina/func_800486F4.s")

Expand Down
2 changes: 1 addition & 1 deletion versions/us1/mischiefmakers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ segments:
- [0x027F70, asm] # has to do with on screen text
- [0x0438E0, asm]
- [0x048A30, asm]
- [0x049200, asm, marina]
- [0x049200, c, marina]
- [0x04FEB0, asm]
- [0x059EA0, asm]
- [0x05D120, asm]
Expand Down
24 changes: 23 additions & 1 deletion versions/us1/undefined_syms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,26 @@ rspbootTextEnd = 0x800BAAB0;
gspFast3DTextStart = 0x800BAAB0;
gspFast3DDataStart = 0x800EEA10;
aspMainTextStart = 0x800BBEB0;

D_801373F1 = 0x801373F1;
D_800E45D0 = 0x800E45D0;
D_800E4698 = 0x800E4698;
D_800E574C = 0x800E574C;
D_800E57D4 = 0x800E57D4;
D_800E58D4 = 0x800E58D4;
D_800E1180 = 0x800E1180;
D_800E58F0 = 0x800E58F0;
D_800E5910 = 0x800E5910;
D_800E59E0 = 0x800E59E0;
D_800E5970 = 0x800E5970;
D_800E5938 = 0x800E5938;
D_8019E574 = 0x8019E574;
D_8019E580 = 0x8019E580;
D_800E118C = 0x800E118C;
D_800E1198 = 0x800E1198;
D_800E11A0 = 0x800E11A0;
D_800E11AC = 0x800E11AC;
D_800E0648 = 0x800E0648;
D_801376BE = 0x801376BE;
D_801376B6 = 0x801376B6;
D_8019E578 = 0x8019E578;
D_8019E57C = 0x8019E57C;