Skip to content

Commit

Permalink
Merge pull request #55 from RevoSucks/decompile_DDC0
Browse files Browse the repository at this point in the history
fix up DDC0 to be consistent with addresses
  • Loading branch information
RevoSucks authored Jul 30, 2023
2 parents 165ac9e + 1ddeeb7 commit 702b8c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
27 changes: 12 additions & 15 deletions src/DDC0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {

}
Expand Down Expand Up @@ -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);
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/dp_intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 702b8c0

Please sign in to comment.