mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 21:19:55 +00:00
Split libcd (#573)
Cross-references [PSY-Q 3.5 LIBCD](https://github.com/lab313ru/psx_psyq_signatures/blob/main/350/LIBCD.LIB.json).
This commit is contained in:
parent
5833f225f8
commit
4d0ee024f6
@ -42,9 +42,20 @@ segments:
|
||||
- [0x720C, hasm, psxsdk/libcard]
|
||||
- [0x72A4, c]
|
||||
- [0x9C14, hasm, psxsdk/libapi2]
|
||||
- [0x9C24, c, psxsdk/libapi]
|
||||
- [0x9C54, asm]
|
||||
|
||||
- [0x9C24, c, psxsdk/libcd/sys]
|
||||
- [0xA398, c, psxsdk/libcd/bios]
|
||||
- [0xBA98, c, psxsdk/libcd/iso9660]
|
||||
- [0xC464, asm]
|
||||
- [0xC484, c, psxsdk/libcd/cdread]
|
||||
- [0xCA6C, c, psxsdk/libcd/cdread2]
|
||||
- [0xCB20, c, psxsdk/libcd/c_002]
|
||||
- [0xCB80, c, psxsdk/libcd/c_003]
|
||||
- [0xCBD8, c, psxsdk/libcd/c_004]
|
||||
- [0xCCC8, c, psxsdk/libcd/c_005]
|
||||
- [0xCD50, c, psxsdk/libcd/c_007]
|
||||
- [0xCE0C, c, psxsdk/libcd/c_008]
|
||||
- [0xCE4C, c, psxsdk/libcd/c_009]
|
||||
- [0xCF10, c, psxsdk/libcd/c_010]
|
||||
- [0xCF30, c, psxsdk/libcd/c_011]
|
||||
- [0xDA90, c, psxsdk/libsnd/scsmvol]
|
||||
- [0xDAE0, c, psxsdk/libsnd/scssattr]
|
||||
|
@ -332,6 +332,9 @@ CdLastCom = 0x80019444;
|
||||
CdLastPos = 0x80019454;
|
||||
CdReset = 0x80019464;
|
||||
CdFlush = 0x800194D0;
|
||||
CdSetDebug = 0x800194F0;
|
||||
CdComstr = 0x80019508;
|
||||
CdIntstr = 0x8001953C;
|
||||
CdSync = 0x80019570;
|
||||
CdReady = 0x80019590;
|
||||
CdSyncCallback = 0x800195B0;
|
||||
@ -342,6 +345,7 @@ CdControlB = 0x80019844;
|
||||
CdMix = 0x80019988;
|
||||
CdGetSector = 0x800199AC;
|
||||
CdDataCallback = 0x800199D0;
|
||||
CdDataSync = 0x800199F4;
|
||||
CdIntToPos = 0x80019A14;
|
||||
CdPosToInt = 0x80019B18;
|
||||
getintr = 0x80019B98;
|
||||
@ -355,9 +359,10 @@ CD_initintr = 0x8001AD00;
|
||||
CD_init = 0x8001AD50;
|
||||
CD_datasync = 0x8001AF3C;
|
||||
CD_getsector = 0x8001B0A8;
|
||||
CD_set_test_parmnum = 0x8001B1A8;
|
||||
callback = 0x8001B1B8;
|
||||
CdSearchFile = 0x8001B298;
|
||||
cmp = 0x8001B578;
|
||||
_cmp = 0x8001B578;
|
||||
CD_newmedia = 0x8001B59C;
|
||||
CD_searchdir = 0x8001B878;
|
||||
CD_cachefile = 0x8001B920;
|
||||
@ -371,8 +376,19 @@ CdRead = 0x8001C080;
|
||||
CdReadSync = 0x8001C188;
|
||||
CdReadCallback = 0x8001C254;
|
||||
CdRead2 = 0x8001C26C;
|
||||
StCdInterrupt2 = 0x8001C300;
|
||||
StClearRing = 0x8001C320;
|
||||
StUnSetRing = 0x8001C380;
|
||||
StUnSetRing = 0x8001C380;
|
||||
data_ready_callback = 0x8001C3D8;
|
||||
StGetBackloc = 0x8001C468;
|
||||
StSetStream = 0x8001C4C8;
|
||||
StFreeRing = 0x8001C550;
|
||||
StFreeRing = 0x8001C550;
|
||||
init_ring_status = 0x8001C60C;
|
||||
StGetNext = 0x8001C64C;
|
||||
StGetNext = 0x8001C64C;
|
||||
StSetMask = 0x8001C710;
|
||||
StCdInterrupt = 0x8001C730;
|
||||
mem2mem = 0x8001D0A0;
|
||||
dma_execute = 0x8001D0D4;
|
||||
@ -523,12 +539,17 @@ CloseEvent = 0x800283A4;
|
||||
DisableEvent = 0x800283B4;
|
||||
SpuInitMalloc = 0x800283C4;
|
||||
SpuMalloc = 0x80028418;
|
||||
func_80028D3C = 0x80028D3C;
|
||||
SpuMallocWithStartAddr = 0x80028D40;
|
||||
SpuSetNoiseVoice = 0x80029070;
|
||||
SpuSetAnyVoice = 0x80029094;
|
||||
_spu_setReverbAttr = 0x80029810;
|
||||
SpuClearReverbWorkArea = 0x80029CE0;
|
||||
WaitEvent = 0x80029E7C;
|
||||
func_80029FBC = 0x80029FBC;
|
||||
func_8002A024 = 0x8002A024;
|
||||
func_8002A09C = 0x8002A09C;
|
||||
func_8002ABF4 = 0x8002ABF4;
|
||||
TestEvent = 0x8002AD5C;
|
||||
_spu_setInTransfer = 0x8002AD6C;
|
||||
SpuSetCommonAttr = 0x8002ADA8;
|
||||
|
@ -332,6 +332,9 @@ CdLastCom = 0x80019444;
|
||||
CdLastPos = 0x80019454;
|
||||
CdReset = 0x80019464;
|
||||
CdFlush = 0x800194D0;
|
||||
CdSetDebug = 0x800194F0;
|
||||
CdComstr = 0x80019508;
|
||||
CdIntstr = 0x8001953C;
|
||||
CdSync = 0x80019570;
|
||||
CdReady = 0x80019590;
|
||||
CdSyncCallback = 0x800195B0;
|
||||
@ -342,6 +345,7 @@ CdControlB = 0x80019844;
|
||||
CdMix = 0x80019988;
|
||||
CdGetSector = 0x800199AC;
|
||||
CdDataCallback = 0x800199D0;
|
||||
CdDataSync = 0x800199F4;
|
||||
CdIntToPos = 0x80019A14;
|
||||
CdPosToInt = 0x80019B18;
|
||||
getintr = 0x80019B98;
|
||||
@ -355,9 +359,10 @@ CD_initintr = 0x8001AD00;
|
||||
CD_init = 0x8001AD50;
|
||||
CD_datasync = 0x8001AF3C;
|
||||
CD_getsector = 0x8001B0A8;
|
||||
CD_set_test_parmnum = 0x8001B1A8;
|
||||
callback = 0x8001B1B8;
|
||||
CdSearchFile = 0x8001B298;
|
||||
cmp = 0x8001B578;
|
||||
_cmp = 0x8001B578;
|
||||
CD_newmedia = 0x8001B59C;
|
||||
CD_searchdir = 0x8001B878;
|
||||
CD_cachefile = 0x8001B920;
|
||||
@ -371,11 +376,19 @@ CdRead = 0x8001C080;
|
||||
CdReadSync = 0x8001C188;
|
||||
CdReadCallback = 0x8001C254;
|
||||
CdRead2 = 0x8001C26C;
|
||||
StCdInterrupt2 = 0x8001C300;
|
||||
StClearRing = 0x8001C320;
|
||||
func_8001C380 = 0x8001C380;
|
||||
StUnSetRing = 0x8001C380;
|
||||
StUnSetRing = 0x8001C380;
|
||||
data_ready_callback = 0x8001C3D8;
|
||||
StGetBackloc = 0x8001C468;
|
||||
StSetStream = 0x8001C4C8;
|
||||
func_8001C550 = 0x8001C550;
|
||||
func_8001C64C = 0x8001C64C;
|
||||
StFreeRing = 0x8001C550;
|
||||
StFreeRing = 0x8001C550;
|
||||
init_ring_status = 0x8001C60C;
|
||||
StGetNext = 0x8001C64C;
|
||||
StGetNext = 0x8001C64C;
|
||||
StSetMask = 0x8001C710;
|
||||
StCdInterrupt = 0x8001C730;
|
||||
mem2mem = 0x8001D0A0;
|
||||
dma_execute = 0x8001D0D4;
|
||||
|
@ -1493,7 +1493,6 @@ s32 SquareRoot12(s32, s32);
|
||||
long ratan2(long x, long y);
|
||||
void* DMACallback(int dma, void (*func)());
|
||||
void func_800192DC(s32 arg0, s32 arg1);
|
||||
void func_8001C550(s32);
|
||||
s32 func_8001D290(s32, s32);
|
||||
s32 func_8001D374(s8, s16, s16);
|
||||
void func_8001D2E0(s32, s32, s32);
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Location */
|
||||
typedef struct {
|
||||
u_char minute;
|
||||
@ -111,6 +110,9 @@ int CdMode(void);
|
||||
int CdLastCom(void);
|
||||
int CdReset(int mode);
|
||||
void CdFlush(void);
|
||||
int CdSetDebug(int level);
|
||||
char* CdComstr(u_char com);
|
||||
char* CdIntstr(u_char intr);
|
||||
int CdSync(int mode, u_char* result);
|
||||
int CdReady(int mode, u_char* result);
|
||||
CdlCB CdSyncCallback(CdlCB func);
|
||||
@ -140,4 +142,10 @@ int CdRead2(long mode);
|
||||
|
||||
void StClearRing(void);
|
||||
void StSetStream(u_long mode, u_long start_frame, u_long end_frame,
|
||||
void (*func1)(), void (*func2)());
|
||||
void (*func1)(), void (*func2)());
|
||||
|
||||
void StSetMask(u_long mask, u_long start, u_long end);
|
||||
u_long StGetNext(u_long** addr, u_long** header);
|
||||
u_long StFreeRing(u_long* base);
|
||||
int StGetBackloc(CdlLOC* loc);
|
||||
void StUnSetRing(void);
|
@ -1,12 +0,0 @@
|
||||
#include "common.h"
|
||||
#include <game.h>
|
||||
|
||||
extern u8 CD_status;
|
||||
extern u8 CD_mode;
|
||||
extern u8 CD_com;
|
||||
|
||||
int CdStatus(void) { return CD_status; }
|
||||
|
||||
int CdMode(void) { return CD_mode; }
|
||||
|
||||
int CdLastCom(void) { return CD_com; }
|
27
src/main/psxsdk/libcd/bios.c
Normal file
27
src/main/psxsdk/libcd/bios.c
Normal file
@ -0,0 +1,27 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", getintr);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_sync);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_ready);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_cw);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_vol);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_flush);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_initvol);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_initintr);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_init);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_datasync);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_getsector);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", CD_set_test_parmnum);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/bios", callback);
|
3
src/main/psxsdk/libcd/c_002.c
Normal file
3
src/main/psxsdk/libcd/c_002.c
Normal file
@ -0,0 +1,3 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_002", StClearRing);
|
3
src/main/psxsdk/libcd/c_003.c
Normal file
3
src/main/psxsdk/libcd/c_003.c
Normal file
@ -0,0 +1,3 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_003", StUnSetRing);
|
5
src/main/psxsdk/libcd/c_004.c
Normal file
5
src/main/psxsdk/libcd/c_004.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_004", data_ready_callback);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_004", StGetBackloc);
|
3
src/main/psxsdk/libcd/c_005.c
Normal file
3
src/main/psxsdk/libcd/c_005.c
Normal file
@ -0,0 +1,3 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_005", StSetStream);
|
3
src/main/psxsdk/libcd/c_007.c
Normal file
3
src/main/psxsdk/libcd/c_007.c
Normal file
@ -0,0 +1,3 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_007", StFreeRing);
|
3
src/main/psxsdk/libcd/c_008.c
Normal file
3
src/main/psxsdk/libcd/c_008.c
Normal file
@ -0,0 +1,3 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_008", init_ring_status);
|
3
src/main/psxsdk/libcd/c_009.c
Normal file
3
src/main/psxsdk/libcd/c_009.c
Normal file
@ -0,0 +1,3 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_009", StGetNext);
|
3
src/main/psxsdk/libcd/c_010.c
Normal file
3
src/main/psxsdk/libcd/c_010.c
Normal file
@ -0,0 +1,3 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/c_010", StSetMask);
|
11
src/main/psxsdk/libcd/cdread.c
Normal file
11
src/main/psxsdk/libcd/cdread.c
Normal file
@ -0,0 +1,11 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/cdread", cb_read);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/cdread", cd_read_retry);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/cdread", CdRead);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/cdread", CdReadSync);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/cdread", CdReadCallback);
|
5
src/main/psxsdk/libcd/cdread2.c
Normal file
5
src/main/psxsdk/libcd/cdread2.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/cdread2", CdRead2);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/cdread2", StCdInterrupt2);
|
15
src/main/psxsdk/libcd/iso9660.c
Normal file
15
src/main/psxsdk/libcd/iso9660.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/iso9660", CdSearchFile);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/iso9660", _cmp);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/iso9660", CD_newmedia);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/iso9660", CD_searchdir);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/iso9660", CD_cachefile);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/iso9660", cd_read);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/iso9660", cd_memcpy);
|
49
src/main/psxsdk/libcd/sys.c
Normal file
49
src/main/psxsdk/libcd/sys.c
Normal file
@ -0,0 +1,49 @@
|
||||
#include "common.h"
|
||||
|
||||
extern u8 CD_status;
|
||||
extern u8 CD_mode;
|
||||
extern u8 CD_com;
|
||||
|
||||
int CdStatus(void) { return CD_status; }
|
||||
|
||||
int CdMode(void) { return CD_mode; }
|
||||
|
||||
int CdLastCom(void) { return CD_com; }
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdLastPos);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdReset);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdFlush);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdSetDebug);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdComstr);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdIntstr);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdSync);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdReady);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdSyncCallback);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdReadyCallback);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdControl);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdControlF);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdControlB);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdMix);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdGetSector);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdDataCallback);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdDataSync);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdIntToPos);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libcd/sys", CdPosToInt);
|
@ -37,7 +37,7 @@ loop_1:
|
||||
arg0[2] = temp_v0_2;
|
||||
D_801BC340++;
|
||||
func_801BABA4(temp_v0, *((temp_v0_2) + arg0));
|
||||
func_8001C550(temp_v0);
|
||||
StFreeRing(temp_v0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user