From 2a94cb7a79da5b59d1f9b985aab0f7c52d0dec0f Mon Sep 17 00:00:00 2001 From: Tharo <17233964+Thar0@users.noreply.github.com> Date: Tue, 5 Aug 2025 18:34:38 +0100 Subject: [PATCH] Fix maybe --- include/PR/rcp.h | 2 ++ include/PR/rdp.h | 43 -------------------------------------- include/ultra64.h | 1 + src/libultra/io/si.c | 2 +- src/libultra/io/sirawdma.c | 2 +- 5 files changed, 5 insertions(+), 45 deletions(-) diff --git a/include/PR/rcp.h b/include/PR/rcp.h index 6b3671ea8b..5142de323e 100644 --- a/include/PR/rcp.h +++ b/include/PR/rcp.h @@ -532,6 +532,8 @@ #define VI_CTRL_PIXEL_ADV(n) (((n) << 12) & VI_CTRL_PIXEL_ADV_MASK) /* Bit [15:12] pixel advance mode: Always 3 on N64 */ #define VI_CTRL_DITHER_FILTER_ON 0x10000 /* 16: dither-filter mode */ +#define VI_CTRL_PIXEL_ADV_3 VI_CTRL_PIXEL_ADV(3) + /* * Possible video clocks (NTSC or PAL) */ diff --git a/include/PR/rdp.h b/include/PR/rdp.h index 4bd6bc99d4..445359f687 100644 --- a/include/PR/rdp.h +++ b/include/PR/rdp.h @@ -1,50 +1,7 @@ #ifndef PR_RDP_H #define PR_RDP_H -/* DP Command Registers */ -#define DPC_START_REG 0x04100000 -#define DPC_END_REG 0x04100004 -#define DPC_CURRENT_REG 0x04100008 -#define DPC_STATUS_REG 0x0410000C -#define DPC_CLOCK_REG 0x04100010 -#define DPC_BUFBUSY_REG 0x04100014 -#define DPC_PIPEBUSY_REG 0x04100018 -#define DPC_TMEM_REG 0x0410001C - -/* DP Span Registers */ -#define DPS_TBIST_REG 0x04200000 -#define DPS_TEST_MODE_REG 0x04200004 -#define DPS_BUFTEST_ADDR_REG 0x04200008 -#define DPS_BUFTEST_DATA_REG 0x0420000C - -/* DP Status Read Flags */ -#define DPC_STATUS_XBUS_DMEM_DMA (1 << 0) -#define DPC_STATUS_FREEZE (1 << 1) -#define DPC_STATUS_FLUSH (1 << 2) -#define DPC_STATUS_START_GCLK (1 << 3) -#define DPC_STATUS_TMEM_BUSY (1 << 4) -#define DPC_STATUS_PIPE_BUSY (1 << 5) -#define DPC_STATUS_CMD_BUSY (1 << 6) -#define DPC_STATUS_CBUF_READY (1 << 7) -#define DPC_STATUS_DMA_BUSY (1 << 8) -#define DPC_STATUS_END_VALID (1 << 9) -#define DPC_STATUS_START_VALID (1 << 10) - -/* DP Status Write Flags */ -#define DPC_CLR_XBUS_DMEM_DMA (1 << 0) -#define DPC_SET_XBUS_DMEM_DMA (1 << 1) -#define DPC_CLR_FREEZE (1 << 2) -#define DPC_SET_FREEZE (1 << 3) -#define DPC_CLR_FLUSH (1 << 4) -#define DPC_SET_FLUSH (1 << 5) -#define DPC_CLR_TMEM_CTR (1 << 6) -#define DPC_CLR_PIPE_CTR (1 << 7) -#define DPC_CLR_CMD_CTR (1 << 8) -#define DPC_CLR_CLOCK_CTR (1 << 9) - - u32 osDpGetStatus(void); void osDpSetStatus(u32 data); - #endif diff --git a/include/ultra64.h b/include/ultra64.h index 2a834aaa69..b3b9c4342d 100644 --- a/include/ultra64.h +++ b/include/ultra64.h @@ -14,6 +14,7 @@ #include "PR/sptask.h" #include "PR/rcp.h" #include "PR/rdp.h" +#include "PR/os_internal_rsp.h" #include "PR/R4300.h" #include "PR/ucode.h" #include "PR/viint.h" diff --git a/src/libultra/io/si.c b/src/libultra/io/si.c index 4f9dff1543..688c5e7008 100644 --- a/src/libultra/io/si.c +++ b/src/libultra/io/si.c @@ -4,7 +4,7 @@ s32 __osSiDeviceBusy() { register u32 status = IO_READ(SI_STATUS_REG); - if (status & (SI_STATUS_DMA_BUSY | SI_STATUS_IO_READ_BUSY)) { + if (status & (SI_STATUS_DMA_BUSY | SI_STATUS_RD_BUSY)) { return true; } else { return false; diff --git a/src/libultra/io/sirawdma.c b/src/libultra/io/sirawdma.c index 4c5dc8cc93..eb6611c1c6 100644 --- a/src/libultra/io/sirawdma.c +++ b/src/libultra/io/sirawdma.c @@ -2,7 +2,7 @@ #include "alignment.h" s32 __osSiRawStartDma(s32 direction, void* dramAddr) { - if (IO_READ(SI_STATUS_REG) & (SI_STATUS_DMA_BUSY | SI_STATUS_IO_READ_BUSY)) { + if (IO_READ(SI_STATUS_REG) & (SI_STATUS_DMA_BUSY | SI_STATUS_RD_BUSY)) { return -1; }