From 1ddeeb725e3adb839274beef6ae293711eb31f49 Mon Sep 17 00:00:00 2001 From: RevoSucks Date: Sun, 30 Jul 2023 17:29:51 -0400 Subject: [PATCH] fix up DDC0 to be consistent with addresses --- include/functions.h | 2 +- src/DDC0.c | 27 ++++++++++++--------------- src/dp_intro.c | 2 +- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/include/functions.h b/include/functions.h index 2cc83af3..63877dfe 100644 --- a/include/functions.h +++ b/include/functions.h @@ -18,7 +18,7 @@ extern void func_80003004(void *); // type unknown extern void func_80003B30(void *, s32, s32, s32); // types unknown // 5580.s -extern void func_80004CC0(void *, s32, s32); // types unknown +extern void func_80004CC0(OSThread *, s32, s32); extern void func_80004CF4(void *); // types unknown extern void func_80004D20(void *); // types unknown extern void func_800052B4(void); diff --git a/src/DDC0.c b/src/DDC0.c index ff9d92f6..adccb240 100644 --- a/src/DDC0.c +++ b/src/DDC0.c @@ -2,16 +2,6 @@ #include "dp_intro.h" extern s32 D_800A83A0; -extern s32 D_800A847C; -extern s32 D_800A8478; - -extern OSThread D_800A8480; -extern u8 D_800AA660[]; - -extern OSMesgQueue D_800A83AC; -extern OSMesgQueue D_800A8414; - -extern void func_80004CC0(void *, s32, s32); struct Unk800A83A8 { OSMesg mesg; @@ -24,6 +14,13 @@ struct Unk800A83A8 { extern struct Unk800A83A8 D_800A83A8[]; +extern s32 D_800A8478; +extern s32 D_800A847C; + +extern OSThread D_800A8480; + +extern u8 D_800AA660[]; + void func_8000D1C0(void) { } @@ -106,10 +103,10 @@ void func_8000D3A8(void *unused) { D_800A83A0 = 1; D_800A847C = -1; D_800A8478 = 0; - osCreateMesgQueue(&D_800A83AC, &D_800A83A8[0].mesg, 1); - osCreateMesgQueue(&D_800A8414, &D_800A83A8[1].mesg, 1); - osSendMesg(&D_800A83AC, (void* )0x444F4E45, 0); - osSendMesg(&D_800A8414, (void* )0x444F4E45, 0); + osCreateMesgQueue(&D_800A83A8[0].queue, &D_800A83A8[0].mesg, 1); + osCreateMesgQueue(&D_800A83A8[1].queue, &D_800A83A8[1].mesg, 1); + osSendMesg(&D_800A83A8[0].queue, (void* )0x444F4E45, 0); + osSendMesg(&D_800A83A8[1].queue, (void* )0x444F4E45, 0); func_800373D8(); func_8004AF24(0); func_8004AE90(3, 4); @@ -120,7 +117,7 @@ void func_8000D3A8(void *unused) { func_80009210(); if ((D_800A83A0 != 0) && (D_800A62E0.unkA38 < 0x15)) { func_80037340(&D_800A83A8[D_800A8478].mesg20); - func_800053B4(&D_800A83A8[D_800A8478], 0); + func_800053B4(&D_800A83A8[D_800A8478].mesg, 0); } D_800A8478 ^= 1; func_80009210(); diff --git a/src/dp_intro.c b/src/dp_intro.c index b23e3a1e..a15415ad 100644 --- a/src/dp_intro.c +++ b/src/dp_intro.c @@ -228,7 +228,7 @@ void func_8000183C(UNUSED void *arg) { __osSetFpcCsr(0x01000C01); func_80001C1C(&D_8008474C, 0, 1, 2, 0xFF, 0, 0, 0); func_80001C1C(&D_8008473C, 0, 1, 2, 0xFF, 0, 0, 0); - func_80004CC0(&D_80083CA0, 0, 4); + func_80004CC0(&D_80083CA0.thread, 0, 4); func_80005328(&D_80083CA0); func_80001380(&D_800846C0); while(1) {