diff --git a/mupen64plus-core/CMakeLists.txt b/mupen64plus-core/CMakeLists.txt index 7dc27a6..4fddd7f 100644 --- a/mupen64plus-core/CMakeLists.txt +++ b/mupen64plus-core/CMakeLists.txt @@ -76,7 +76,6 @@ add_library(mupen64plus SHARED src/device/rcp/ai/ai_controller.c src/device/rcp/mi/mi_controller.c src/device/rcp/pi/pi_controller.c - src/device/rcp/rdp/fb.c src/device/rcp/rdp/rdp_core.c src/device/rcp/ri/ri_controller.c src/device/rcp/rsp/rsp_core.c diff --git a/mupen64plus-core/src/device/rcp/pi/pi_controller.c b/mupen64plus-core/src/device/rcp/pi/pi_controller.c index 75c9de7..b6dc808 100644 --- a/mupen64plus-core/src/device/rcp/pi/pi_controller.c +++ b/mupen64plus-core/src/device/rcp/pi/pi_controller.c @@ -105,8 +105,6 @@ static void dma_pi_read(struct pi_controller* pi) return; } - pre_framebuffer_read(&pi->dp->fb, dram_addr); - /* PI seems to treat the first 128 bytes differently, see https://n64brew.dev/wiki/Peripheral_Interface#Unaligned_DMA_transfer */ if (length >= 0x7f && (length & 1)) length += 1; @@ -149,8 +147,6 @@ static void dma_pi_write(struct pi_controller* pi) length -= dram_addr & 0x7; uint32_t cycles = handler->dma_write(opaque, dram, dram_addr, cart_addr, length); - post_framebuffer_write(&pi->dp->fb, dram_addr, length); - /* Mark DMA as busy */ pi->regs[PI_STATUS_REG] |= PI_STATUS_DMA_BUSY; /* Update PI_DRAM_ADDR_REG and PI_CART_ADDR_REG */ diff --git a/mupen64plus-core/src/device/rcp/rdp/rdp_core.c b/mupen64plus-core/src/device/rcp/rdp/rdp_core.c index ef87166..920d795 100644 --- a/mupen64plus-core/src/device/rcp/rdp/rdp_core.c +++ b/mupen64plus-core/src/device/rcp/rdp/rdp_core.c @@ -88,8 +88,6 @@ void init_rdp(struct rdp_core* dp, { dp->sp = sp; dp->mi = mi; - - init_fb(&dp->fb, mem, rdram, r4300); } void poweron_rdp(struct rdp_core* dp) @@ -100,8 +98,6 @@ void poweron_rdp(struct rdp_core* dp) dp->do_on_unfreeze = 0; dp->mi->r4300->cp0.interrupt_unsafe_state &= ~INTR_UNSAFE_RDP; - - poweron_fb(&dp->fb); } @@ -146,9 +142,7 @@ void write_dpc_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mas dp->dpc_regs[DPC_CURRENT_REG] = dp->dpc_regs[DPC_START_REG]; dp->dpc_regs[DPC_STATUS_REG] &= ~DPC_STATUS_START_VALID; } - unprotect_framebuffers(&dp->fb); gfx.processRDPList(); - protect_framebuffers(&dp->fb); if (dp->mi->regs[MI_INTR_REG] & MI_INTR_DP) { dp->mi->regs[MI_INTR_REG] &= ~MI_INTR_DP; diff --git a/mupen64plus-core/src/device/rcp/rdp/rdp_core.h b/mupen64plus-core/src/device/rcp/rdp/rdp_core.h index b124bf6..28dff9a 100644 --- a/mupen64plus-core/src/device/rcp/rdp/rdp_core.h +++ b/mupen64plus-core/src/device/rcp/rdp/rdp_core.h @@ -24,11 +24,13 @@ #include -#include "fb.h" #include "osal/preproc.h" struct mi_controller; struct rsp_core; +struct memory; +struct rdram; +struct r4300_core; enum { @@ -91,8 +93,6 @@ struct rdp_core uint32_t dps_regs[DPS_REGS_COUNT]; unsigned char do_on_unfreeze; - struct fb fb; - struct rsp_core* sp; struct mi_controller* mi; }; diff --git a/mupen64plus-core/src/device/rcp/rsp/rsp_core.c b/mupen64plus-core/src/device/rcp/rsp/rsp_core.c index adf710f..dd173a6 100644 --- a/mupen64plus-core/src/device/rcp/rsp/rsp_core.c +++ b/mupen64plus-core/src/device/rcp/rsp/rsp_core.c @@ -61,8 +61,6 @@ static void do_sp_dma(struct rsp_core* sp, const struct sp_dma* dma) memaddr++; dramaddr++; } - if (dramaddr <= 0x800000) - post_framebuffer_write(&sp->dp->fb, dramaddr - length, length); dramaddr+=skip; } @@ -73,9 +71,6 @@ static void do_sp_dma(struct rsp_core* sp, const struct sp_dma* dma) else { for(j=0; jdp->fb, dramaddr); - for(i=0; imi->regs[MI_INTR_REG] & MI_INTR_SP; uint32_t dp_bit_set = sp->mi->regs[MI_INTR_REG] & MI_INTR_DP; - unprotect_framebuffers(&sp->dp->fb); uint32_t rsp_cycles = rsp.doRspCycles(sp->first_run) / 2; - protect_framebuffers(&sp->dp->fb); if (sp->mi->regs[MI_INTR_REG] & MI_INTR_DP && !dp_bit_set) { diff --git a/mupen64plus-core/src/main/savestates.c b/mupen64plus-core/src/main/savestates.c index c236bed..8d483c9 100644 --- a/mupen64plus-core/src/main/savestates.c +++ b/mupen64plus-core/src/main/savestates.c @@ -986,9 +986,6 @@ static int savestates_load_m64p(struct device* dev, char *filepath) input.controllerCommand(-1, NULL); } - /* reset fb state */ - poweron_fb(&dev->dp.fb); - dev->r4300.cp0.interrupt_unsafe_state = 0; *r4300_cp0_last_addr(&dev->r4300.cp0) = *r4300_pc(&dev->r4300);