Skip to content

Commit

Permalink
70100 OK (#49)
Browse files Browse the repository at this point in the history
* 70100 split

* func_8006F500 OK

* Move D_80108620 down
  • Loading branch information
hensldm authored Jul 20, 2024
1 parent ce37645 commit ca20e21
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
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

0 comments on commit ca20e21

Please sign in to comment.