Skip to content

Commit

Permalink
other improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanis002 committed Oct 13, 2024
1 parent 5b1fefe commit dd14084
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config/oot-e/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ flashGet64 = .text:0x80045150; // type:function size:0x8 scope:local
flashGetBlock = .text:0x80045158; // type:function size:0x108 scope:local
fn_80045260 = .text:0x80045260; // type:function size:0x50
fn_800452B0 = .text:0x800452B0; // type:function size:0x50
fn_80045300 = .text:0x80045300; // type:function size:0x10
flashGetSize = .text:0x80045300; // type:function size:0x10
flashEvent = .text:0x80045310; // type:function size:0x1DC
SetTableTevStages = .text:0x800454EC; // type:function size:0x3B4
SetNumTexGensChans = .text:0x800458A0; // type:function size:0x164
Expand Down
2 changes: 1 addition & 1 deletion config/oot-j/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ flashGet64 = .text:0x80045150; // type:function size:0x8 scope:local
flashGetBlock = .text:0x80045158; // type:function size:0x108 scope:local
fn_80045260 = .text:0x80045260; // type:function size:0x50
fn_800452B0 = .text:0x800452B0; // type:function size:0x50
fn_80045300 = .text:0x80045300; // type:function size:0x10
flashGetSize = .text:0x80045300; // type:function size:0x10
flashEvent = .text:0x80045310; // type:function size:0x1DC
SetTableTevStages = .text:0x800454EC; // type:function size:0x3B4
SetNumTexGensChans = .text:0x800458A0; // type:function size:0x164
Expand Down
2 changes: 1 addition & 1 deletion config/oot-u/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ flashGet64 = .text:0x8004516C; // type:function size:0x8 scope:local
flashGetBlock = .text:0x80045174; // type:function size:0x108 scope:local
fn_80045260 = .text:0x8004527C; // type:function size:0x50
fn_800452B0 = .text:0x800452CC; // type:function size:0x50
fn_80045300 = .text:0x8004531C; // type:function size:0x10
flashGetSize = .text:0x8004531C; // type:function size:0x10
flashEvent = .text:0x8004532C; // type:function size:0x1DC
SetTableTevStages = .text:0x80045508; // type:function size:0x3B4
SetNumTexGensChans = .text:0x800458BC; // type:function size:0x164
Expand Down
2 changes: 1 addition & 1 deletion include/emulator/flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typedef struct Flash {

bool fn_80045260(Flash* pFLASH, s32 arg1, void* arg2);
bool fn_800452B0(Flash* pFLASH, s32 arg1, void* arg2);
bool fn_80045300(Flash* pFLASH, u32* arg1);
bool flashGetSize(Flash* pFLASH, u32* pnFlashSize);
bool flashEvent(Flash* pFLASH, s32 nEvent, void* pArgument);

extern _XL_OBJECTTYPE gClassFlash;
Expand Down
5 changes: 2 additions & 3 deletions src/emulator/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ bool fn_800452B0(Flash* pFLASH, s32 arg1, void* arg2) {
return true;
}

bool fn_80045300(Flash* pFLASH, u32* arg1) {
*arg1 = pFLASH->nFlashSize;

bool flashGetSize(Flash* pFLASH, u32* pnFlashSize) {
*pnFlashSize = pFLASH->nFlashSize;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/emulator/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -2624,7 +2624,7 @@ bool __osEepStatus(Cpu* pCPU) {
return false;
}

if (pFLASH != NULL && fn_80045300(pFLASH, &nStatus)) {
if (pFLASH != NULL && flashGetSize(pFLASH, &nStatus)) {
status[0] = 0x80 | (nStatus == 0x4000 ? 0x40 : 0);
status[1] = 0;
status[2] = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/emulator/store.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ bool fn_80061BC0(Store* pStore, void* pHeapTarget, s32 nOffset, s32 nByteCount)
static void fn_80061C08(s32 nResult, NANDCommandBlock* block) {
Store* pStore = (Store*)NANDGetUserData(block);

if (nResult != 0) {
if (nResult != NAND_RESULT_OK) {
pStore->eResult = nResult;
}

Expand All @@ -199,7 +199,7 @@ static void fn_80061C4C(s32 nResult, NANDCommandBlock* block) {
pStore->eResult = nResult;
nCloseResult = NANDCloseAsync(&pStore->nandFileInfo, fn_80061C08, &pStore->nandCmdBlock);

if (nCloseResult) {
if (nCloseResult != NAND_RESULT_OK) {
pStore->eResult = nCloseResult;
pStore->unk_B9 = 1;
}
Expand Down

0 comments on commit dd14084

Please sign in to comment.