Decomp CD_set_test_parmnum, CdReadCallback, & CdLastPos (#1056)

This commit is contained in:
Ross Squires 2024-02-11 14:33:03 -05:00 committed by GitHub
parent 9a56580b1d
commit 2294523fcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 3 deletions

View File

@ -624,6 +624,8 @@ CD_nopen = 0x80032ABC;
CD_pos = 0x80032AC0;
CD_mode = 0x80032AC4;
CD_com = 0x80032AC5;
CD_TestParmNum = 0x80032D4C;
CD_ReadCallbackFunc = 0x80032DB8;
_snd_seq_tick_env = 0x80032EF0;
_spu_EVdma = 0x800330F0;
_spu_keystat = 0x800330F4;

View File

@ -22,6 +22,8 @@ INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/bios", CD_datasync);
INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/bios", CD_getsector);
INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/bios", CD_set_test_parmnum);
extern int CD_TestParmNum;
void CD_set_test_parmnum(int parmNum) { CD_TestParmNum = parmNum; }
INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/bios", callback);

View File

@ -1,4 +1,5 @@
#include "common.h"
#include "psxsdk/libcd.h"
INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread", cb_read);
@ -8,4 +9,10 @@ INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread", CdRead);
INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread", CdReadSync);
INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread", CdReadCallback);
extern CdlCB CD_ReadCallbackFunc;
CdlCB CdReadCallback(CdlCB func) {
CdlCB prevFunc = CD_ReadCallbackFunc;
CD_ReadCallbackFunc = func;
return prevFunc;
}

View File

@ -10,7 +10,9 @@ int CdMode(void) { return CD_mode; }
int CdLastCom(void) { return CD_com; }
INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/sys", CdLastPos);
extern int CD_pos;
int* CdLastPos(void) { return &CD_pos; }
INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/sys", CdReset);