nonmatch sub_080B1568

This commit is contained in:
Henny022p
2021-02-19 14:30:49 +01:00
parent 143e9809fc
commit 5384f3daa9
3 changed files with 24 additions and 62 deletions
+23
View File
@@ -21,3 +21,26 @@ u32 sub_080B1520(u16 unk_1) {
return ret;
}
NONMATCH("asm/non_matching/code_080B1520/sub_080B1568.inc", void sub_080B1568(u32 unk_1, u32 unk_2, u32 unk_3)) {
u32 temp;
u16 u1;
u16 IME_save;
u16* ptr;
u1 = unk_3;
IME_save = REG_IME;
REG_IME = 0;
temp = REG_WAITCNT & 0xf8ff;
ptr = *gUnk_02036A50;
temp |= ptr[3];
REG_WAITCNT = temp;
REG_DMA3SAD = unk_1;
REG_DMA3DAD = unk_2;
REG_DMA3CNT = u1 | 0x80000000;
if ((REG_DMA3CNT_H & 0x8000) != 0) {
while ((REG_DMA3CNT_H & 0x8000) != 0) {}
}
REG_IME = IME_save;
}
END_NONMATCH