Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

70100 OK #49

Merged
merged 4 commits into from
Jul 20, 2024
Merged
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
1 change: 1 addition & 0 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ extern MallocRecord D_800F8E58;
extern u8 D_800FAAF8;
extern u8 D_800FAB1C;
extern u8 D_800FAB20;
extern UNK_TYPE D_80108620;
extern UNK_TYPE D_80108624;
extern UNK_TYPE D_80108628;
extern UNK_TYPE D_8010DF40;
Expand Down
23 changes: 23 additions & 0 deletions src/main/O2/70100.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "global.h"

#define WAIT_ON_IOBUSY_ALT(stat) \
do { \
stat = IO_READ(PI_STATUS_REG); \
} while (stat & (PI_STATUS_IO_BUSY | PI_STATUS_DMA_BUSY))

#define ADDRESS_1 (PI_DOM1_ADDR2 + 0x458) // 0x10000458
#define ADDRESS_2 (PI_DOM1_ADDR2 + 0x45C) // 0x1000045C

void func_8006F500(void) {
register u32 stat;
u16 addr1Val;
u16 addr2Val;

WAIT_ON_IOBUSY_ALT(stat);
addr1Val = IO_READ(ADDRESS_1);

WAIT_ON_IOBUSY_ALT(stat);
addr2Val = IO_READ(ADDRESS_2);

D_80108620 = (addr1Val << 16) | addr2Val;
}
1 change: 1 addition & 0 deletions yamls/us/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
- [0x6CB80, asm]
- [0x6DBC0, asm]
- [0x6DF40, asm] # Probably has at least 1 file split
- [0x70100, c, O2/70100]
- [0x70160, asm]
- [0x70200, c, fault]
- [0x720B0, pad]
Expand Down