diff options
| author | coco875 <59367621+coco875@users.noreply.github.com> | 2024-01-01 03:56:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-31 19:56:14 -0700 |
| commit | 98474c5b94e453fcee4d332657e45b2f626c62a3 (patch) | |
| tree | f68be5a0abfb02c0dbd25d6297c67f041ca18598 /src/os | |
| parent | 2727a5e5ddc3bc439b2d0b7f2e681650b79b2fb5 (diff) | |
fix todo, bug not appears and change theme (#525)
* fix todo, bug not appears and change theme
* fix warning
Diffstat (limited to 'src/os')
| -rw-r--r-- | src/os/contpfs.c | 15 | ||||
| -rw-r--r-- | src/os/leointerrupt.c | 2 | ||||
| -rw-r--r-- | src/os/math/cosf.c | 2 | ||||
| -rw-r--r-- | src/os/math/sinf.c | 2 | ||||
| -rw-r--r-- | src/os/osContInit.c | 3 | ||||
| -rw-r--r-- | src/os/osCreatePiManager.c | 3 | ||||
| -rw-r--r-- | src/os/osEPiRawStartDma.c | 6 | ||||
| -rw-r--r-- | src/os/osEepromProbe.c | 2 | ||||
| -rw-r--r-- | src/os/osPfsDeleteFile.c | 6 | ||||
| -rw-r--r-- | src/os/osPiRawStartDma.c | 3 | ||||
| -rw-r--r-- | src/os/osPiStartDma.c | 2 | ||||
| -rw-r--r-- | src/os/osViBlack.c | 2 | ||||
| -rw-r--r-- | src/os/osViSwapBuffer.c | 3 | ||||
| -rw-r--r-- | src/os/piint.h | 9 |
14 files changed, 37 insertions, 23 deletions
diff --git a/src/os/contpfs.c b/src/os/contpfs.c index 5946547ae..4aecdaa2d 100644 --- a/src/os/contpfs.c +++ b/src/os/contpfs.c @@ -56,7 +56,8 @@ s32 __osRepairPackId(OSPfs *pfs, __OSPackId *badid, __OSPackId *newid) { pfs->activebank = j; ERRCK(__osPfsSelectBank(pfs)) - ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)&temp)); //TODO: fix magic number + //! @todo fix magic number + ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)&temp)); temp[0] = j | 0x80; for (i = 1; i < ARRLEN(temp); i++) { @@ -80,7 +81,8 @@ s32 __osRepairPackId(OSPfs *pfs, __OSPackId *badid, __OSPackId *newid) ERRCK(__osPfsSelectBank(pfs)); ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)temp)); if (temp[0] != 128) - break; //TODO: remove magic constant + //! @todo remove magic constant + break; } j++; } @@ -173,7 +175,8 @@ s32 __osGetId(OSPfs *pfs) return ret; } } - if ((id->deviceid & 1) == 0) //TODO: remove magic constant + //! @todo remove magic constant + if ((id->deviceid & 1) == 0) { ERRCK(__osRepairPackId(pfs, id, &newid)); id = &newid; @@ -186,7 +189,8 @@ s32 __osGetId(OSPfs *pfs) } pfs->version = id->version; pfs->banks = id->banks; - pfs->inode_start_page = pfs->banks * 2 + 3; //TODO: loads of magic constants.. + //! @todo loads of magic constants.. + pfs->inode_start_page = pfs->banks * 2 + 3; pfs->dir_size = 16; pfs->inode_table = 8; pfs->minode_table = pfs->banks * PFS_ONE_PAGE + 8; @@ -240,7 +244,8 @@ s32 __osPfsRWInode(OSPfs *pfs, __OSInode *inode, u8 flag, u8 bank) for (j = 0; j < 8; j++) { - addr = ((u8 *)inode->inode_page + j * 32); //TODO: don't like this =/ //maybe &inode->inode_table[j*PFS_ONE_PAGE].ipage or something + //! @todo don't like this =/ //maybe &inode->inode_table[j*PFS_ONE_PAGE].ipage or something + addr = ((u8 *)inode->inode_page + j * 32); if (flag == PFS_WRITE) { ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->inode_table + bank * 8 + j, addr, FALSE); diff --git a/src/os/leointerrupt.c b/src/os/leointerrupt.c index 83a4f39ec..db221dba9 100644 --- a/src/os/leointerrupt.c +++ b/src/os/leointerrupt.c @@ -8,7 +8,7 @@ u8 leoDiskStack[OS_PIM_STACKSIZE]; // technically should have a OS_LEO_STACKSIZE #ifdef VERSION_SH -// TODO: so many magic constants :'( +//! @todo so many magic constants :'( static void __osLeoResume(void); static void __osLeoAbnormalResume(void); diff --git a/src/os/math/cosf.c b/src/os/math/cosf.c index 2b01c12a5..be8816344 100644 --- a/src/os/math/cosf.c +++ b/src/os/math/cosf.c @@ -1,6 +1,6 @@ // These unions are necessary to put the constants in .rodata rather than .data. -// TODO: is it possible to remove them somehow? +//! @todo is it possible to remove them somehow? typedef union { /* 0x0 */ double d; diff --git a/src/os/math/sinf.c b/src/os/math/sinf.c index bdc83168e..e893adbe1 100644 --- a/src/os/math/sinf.c +++ b/src/os/math/sinf.c @@ -1,6 +1,6 @@ // These unions are necessary to put the constants in .rodata rather than .data. -// TODO: is it possible to remove them somehow? +//! @todo is it possible to remove them somehow? typedef union { /* 0x0 */ double d; diff --git a/src/os/osContInit.c b/src/os/osContInit.c index 1e85c7fbe..6a20606df 100644 --- a/src/os/osContInit.c +++ b/src/os/osContInit.c @@ -31,7 +31,8 @@ s32 osContInit(OSMesgQueue *mq, u8 *bitpattern, OSContStatus *status) { osSetTimer(&timer, 500000 * osClockRate / 1000000 - currentTime, 0, &timerMesgQueue, &mesg); osRecvMesg(&timerMesgQueue, &mesg, OS_MESG_BLOCK); } - _osContNumControllers = 4; // TODO: figure out what it means + //! @todo figure out what it means + _osContNumControllers = 4; __osPackRequestData(0); ret = __osSiRawStartDma(OS_WRITE, _osContCmdBuf); osRecvMesg(mq, &mesg, OS_MESG_BLOCK); diff --git a/src/os/osCreatePiManager.c b/src/os/osCreatePiManager.c index da3b028f0..68c491eb6 100644 --- a/src/os/osCreatePiManager.c +++ b/src/os/osCreatePiManager.c @@ -2,7 +2,8 @@ #define OS_PI_MGR_MESG_BUFF_SIZE 1 -#ifdef VERSION_SH // TODO: In libreultra this is in an include +//! @todo In libreultra this is in an include +#ifdef VERSION_SH extern OSPiHandle *CartRomHandle; extern OSPiHandle *LeoDiskHandle; #endif diff --git a/src/os/osEPiRawStartDma.c b/src/os/osEPiRawStartDma.c index b8cd8245a..31d9fd37c 100644 --- a/src/os/osEPiRawStartDma.c +++ b/src/os/osEPiRawStartDma.c @@ -2,13 +2,13 @@ #include "hardware.h" #include "new_func.h" #include "PR/R4300.h" -// TODO: This define is from piint.h, but including that causes problems... +//! @todo This define is from piint.h, but including that causes problems... #define UPDATE_REG(reg, var) \ if (cHandle->var != pihandle->var) \ IO_WRITE(reg, pihandle->var); -// TODO: This define is from os.h, but including that causes problems... +//! @todo This define is from os.h, but including that causes problems... #define PI_DOMAIN1 0 -// TODO: These defines are from PR/rcp.h, but including that causes problems... +//! @todo These defines are from PR/rcp.h, but including that causes problems... #define IO_WRITE(addr, data) (*(vu32 *) PHYS_TO_K1(addr) = (u32)(data)) s32 osEPiRawStartDma(OSPiHandle *pihandle, s32 dir, u32 cart_addr, void *dram_addr, u32 size) { diff --git a/src/os/osEepromProbe.c b/src/os/osEepromProbe.c index d550b8464..475af4469 100644 --- a/src/os/osEepromProbe.c +++ b/src/os/osEepromProbe.c @@ -1,6 +1,6 @@ #include "libultra_internal.h" -// TODO: merge with osEepromWrite +//! @todo merge with osEepromWrite typedef struct { u16 unk00; u8 unk02; diff --git a/src/os/osPfsDeleteFile.c b/src/os/osPfsDeleteFile.c index ac784347a..c0e628ad0 100644 --- a/src/os/osPfsDeleteFile.c +++ b/src/os/osPfsDeleteFile.c @@ -31,7 +31,8 @@ s32 osPfsDeleteFile(OSPfs *pfs, u16 company_code, u32 game_code, u8 *game_name, for (bank = dir.start_page.inode_t.bank; bank < pfs->banks;) { ERRCK(__osPfsRWInode(pfs, &inode, OS_READ, bank)); - ERRCK(__osPfsReleasePages(pfs, &inode, startpage, &sum, bank, &last_page, 1)); //TODO: magic constant + //! @todo magic constant + ERRCK(__osPfsReleasePages(pfs, &inode, startpage, &sum, bank, &last_page, 1)); ERRCK(__osPfsRWInode(pfs, &inode, OS_WRITE, bank)); if (last_page.ipage == 1) break; @@ -84,7 +85,8 @@ s32 __osPfsReleasePages(OSPfs *pfs, __OSInode *inode, u8 start_page, u16 *sum, u if (next_page.inode_t.page < offset && next_page.ipage != 1) return PFS_ERR_INCONSISTENT; *last_page = next_page; - if (flag == 1) //TODO: magic number + //! @todo magic number + if (flag == 1) inode->inode_page[start_page].ipage = 3; ERRCK(__osBlockSum(pfs, start_page, sum, bank)); diff --git a/src/os/osPiRawStartDma.c b/src/os/osPiRawStartDma.c index ca6044e6e..4362b23b5 100644 --- a/src/os/osPiRawStartDma.c +++ b/src/os/osPiRawStartDma.c @@ -1,7 +1,8 @@ #include "libultra_internal.h" #include "hardware.h" -extern u32 osRomBase; // TODO: figure out why this is like this +//! @todo figure out why this is like this +extern u32 osRomBase; s32 osPiRawStartDma(s32 dir, u32 cart_addr, void *dram_addr, size_t size) { register int status; diff --git a/src/os/osPiStartDma.c b/src/os/osPiStartDma.c index 9940ba287..8dd0c22b8 100644 --- a/src/os/osPiStartDma.c +++ b/src/os/osPiStartDma.c @@ -10,7 +10,7 @@ s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, v return -1; } - // TODO: name magic constants + //! @todo name magic constants if (direction == OS_READ) { mb->hdr.type = 11; } else { diff --git a/src/os/osViBlack.c b/src/os/osViBlack.c index 277dfedb2..782e3b13c 100644 --- a/src/os/osViBlack.c +++ b/src/os/osViBlack.c @@ -2,7 +2,7 @@ extern OSViContext *__osViNext; -// TODO: name magic constants +//! @todo name magic constants void osViBlack(u8 active) { register u32 int_disabled = __osDisableInt(); if (active) { diff --git a/src/os/osViSwapBuffer.c b/src/os/osViSwapBuffer.c index c2cb1d506..eb341b6da 100644 --- a/src/os/osViSwapBuffer.c +++ b/src/os/osViSwapBuffer.c @@ -5,6 +5,7 @@ extern OSViContext *__osViNext; void osViSwapBuffer(void *vaddr) { u32 int_disabled = __osDisableInt(); __osViNext->buffer = vaddr; - __osViNext->unk00 |= 0x10; // TODO: figure out what this flag means + //! @todo figure out what this flag means + __osViNext->unk00 |= 0x10; __osRestoreInt(int_disabled); } diff --git a/src/os/piint.h b/src/os/piint.h index 766021952..39278eed9 100644 --- a/src/os/piint.h +++ b/src/os/piint.h @@ -83,9 +83,12 @@ #define LEO_BM_CTL_SECTOR_MASK 0x00FF0000 #define LEO_BM_CTL_SECTOR_SHIFT 16 -#define LEO_CMD_TYPE_0 0 //TODO: name -#define LEO_CMD_TYPE_1 1 //TODO: name -#define LEO_CMD_TYPE_2 2 //TODO: name +//! @todo name +#define LEO_CMD_TYPE_0 0 +//! @todo name +#define LEO_CMD_TYPE_1 1 +//! @todo name +#define LEO_CMD_TYPE_2 2 #define LEO_ERROR_GOOD 0 #define LEO_ERROR_3 3 |
