Skip to content

Commit

Permalink
Try to improve accuracy against n64 system test
Browse files Browse the repository at this point in the history
  • Loading branch information
project64 authored and gonetz committed Nov 12, 2023
1 parent 7dc5b9f commit a367b3e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/RDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ inline u32 READ_RDP_DATA(u32 address)
void RDP_ProcessRDPList()
{
if (ConfigOpen || dwnd().isResizeWindow()) {
dp_start = dp_current = dp_end;
dp_current = dp_end;
gDPFullSync();
return;
}
Expand Down Expand Up @@ -623,5 +623,5 @@ void RDP_ProcessRDPList()
gDP.changed |= CHANGED_COLORBUFFER;
gDP.changed &= ~CHANGED_CPU_FB_WRITE;

dp_start = dp_current = dp_end;
dp_current = dp_end;
}
17 changes: 16 additions & 1 deletion src/gDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,21 @@ void gDPTextureRectangle(f32 ulx, f32 uly, f32 lrx, f32 lry, s32 tile, s16 s, s1

void gDPFullSync()
{
enum
{
DPC_STATUS_XBUS_DMEM_DMA = 0x001, // Bit 0: xbus_dmem_dma
DPC_STATUS_FREEZE = 0x002, // Bit 1: Freeze
DPC_STATUS_FLUSH = 0x004, // Bit 2: Flush
DPC_STATUS_START_GCLK = 0x008, // Bit 3: Start GCLK
DPC_STATUS_TMEM_BUSY = 0x010, // Bit 4: TMEM busy
DPC_STATUS_PIPE_BUSY = 0x020, // Bit 5: Pipe busy
DPC_STATUS_CMD_BUSY = 0x040, // Bit 6: CMD busy
DPC_STATUS_CBUF_READY = 0x080, // Bit 7: CBUF ready
DPC_STATUS_DMA_BUSY = 0x100, // Bit 8: DMA busy
DPC_STATUS_END_VALID = 0x200, // Bit 9: End valid
DPC_STATUS_START_VALID = 0x400, // Bit 10: Start valid
};

if (config.frameBufferEmulation.copyAuxToRDRAM != 0) {
frameBufferList().copyAux();
frameBufferList().removeAux();
Expand All @@ -980,7 +995,7 @@ void gDPFullSync()
}

*REG.MI_INTR |= MI_INTR_DP;

*REG.DPC_STATUS &= ~(DPC_STATUS_PIPE_BUSY | DPC_STATUS_CMD_BUSY | DPC_STATUS_START_GCLK);
CheckInterrupts();

DebugMsg( DEBUG_NORMAL, "gDPFullSync();\n" );
Expand Down

0 comments on commit a367b3e

Please sign in to comment.