-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +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)) | ||
|
||
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/O2/70100/func_8006F500.s") | ||
#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; | ||
} |