Reformat to something more readable for me :3
Build libsm64 / Build libsm64 for linux (push) Failing after 28s
Build libsm64 / Build libsm64 for web (push) Failing after 29s
Build libsm64 / Build libsm64 for windows (push) Failing after 23s

This commit is contained in:
2026-05-24 11:31:35 -05:00
parent 4328104536
commit 9ff6947911
141 changed files with 29706 additions and 20450 deletions
+40 -24
View File
@@ -6,10 +6,11 @@
/* Types */
typedef struct {
#if !defined(VERSION_EU)
typedef struct
{
#if !defined(VERSION_EU)
u32 errStatus;
#endif
#endif
void *dramAddr;
void *C2Addr;
u32 sectorSize;
@@ -17,21 +18,23 @@ typedef struct {
u32 C1ErrSector[4];
} __OSBlockInfo;
typedef struct {
u32 cmdType; // 0
u16 transferMode; // 4
u16 blockNum; // 6
s32 sectorNum; // 8
typedef struct
{
u32 cmdType; // 0
u16 transferMode; // 4
u16 blockNum; // 6
s32 sectorNum; // 8
uintptr_t devAddr; // c
#if defined(VERSION_EU)
#if defined(VERSION_EU)
u32 errStatus; //error status added moved to blockinfo
#endif
u32 bmCtlShadow; // 10
u32 seqCtlShadow; // 14
#endif
u32 bmCtlShadow; // 10
u32 seqCtlShadow; // 14
__OSBlockInfo block[2]; // 18
} __OSTranxInfo;
typedef struct OSPiHandle_s {
typedef struct OSPiHandle_s
{
struct OSPiHandle_s *next;
u8 type;
u8 latency;
@@ -44,26 +47,33 @@ typedef struct OSPiHandle_s {
__OSTranxInfo transferInfo;
} OSPiHandle;
typedef struct {
typedef struct
{
u8 type;
uintptr_t address;
} OSPiInfo;
typedef struct {
typedef struct
{
u16 type;
u8 pri;
u8 status;
OSMesgQueue *retQueue;
} OSIoMesgHdr;
typedef struct {
/*0x00*/ OSIoMesgHdr hdr;
/*0x08*/ void *dramAddr;
/*0x0C*/ uintptr_t devAddr;
/*0x10*/ size_t size;
#if defined(VERSION_EU) || defined(VERSION_SH)
typedef struct
{
/*0x00*/
OSIoMesgHdr hdr;
/*0x08*/
void *dramAddr;
/*0x0C*/
uintptr_t devAddr;
/*0x10*/
size_t size;
#if defined(VERSION_EU) || defined(VERSION_SH)
OSPiHandle *piHandle; // from the official definition
#endif
#endif
} OSIoMesg;
/* Definitions */
@@ -76,13 +86,19 @@ typedef struct {
/* Functions */
s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, void *vAddr,
size_t nbytes, OSMesgQueue *mq);
s32 osPiStartDma(
OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, void *vAddr,
size_t nbytes, OSMesgQueue *mq);
void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgCnt);
OSMesgQueue *osPiGetCmdQueue(void);
s32 osPiWriteIo(uintptr_t devAddr, u32 data);
s32 osPiReadIo(uintptr_t devAddr, u32 *data);
s32 osPiRawStartDma(s32 dir, u32 cart_addr, void *dram_addr, size_t size);
s32 osEPiRawStartDma(OSPiHandle *piHandle, s32 dir, u32 cart_addr, void *dram_addr, size_t size);
#endif