From 6571626ea4e682fa3cebc3f84716238a86b72b86 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Wed, 20 Feb 2019 20:18:58 +0100 Subject: [PATCH 1/3] Revert APU change --- hw/xbox/mcpx_apu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xbox/mcpx_apu.c b/hw/xbox/mcpx_apu.c index 58b643f574..640678d740 100644 --- a/hw/xbox/mcpx_apu.c +++ b/hw/xbox/mcpx_apu.c @@ -850,10 +850,10 @@ static void se_frame(void *opaque) NV_PAVS_VOICE_PAR_STATE, NV_PAVS_VOICE_PAR_STATE_ACTIVE_VOICE)) { MCPX_DPRINTF("voice %d not active...!\n", d->regs[current]); - fe_method(d, SE2FE_IDLE_VOICE, d->regs[current]); } else { process_voice(d, mixbins, d->regs[current]); } + fe_method(d, SE2FE_IDLE_VOICE, d->regs[current]); MCPX_DPRINTF("next voice %d\n", d->regs[next]); d->regs[current] = d->regs[next]; } From 1b0c9196ac7478fef5bcd9a081edb6fcb60700b9 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Wed, 20 Feb 2019 20:19:44 +0100 Subject: [PATCH 2/3] Ignore signed texture errors --- hw/xbox/nv2a/nv2a_pgraph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xbox/nv2a/nv2a_pgraph.c b/hw/xbox/nv2a/nv2a_pgraph.c index 1e8645e949..eba45e9a00 100644 --- a/hw/xbox/nv2a/nv2a_pgraph.c +++ b/hw/xbox/nv2a/nv2a_pgraph.c @@ -3579,11 +3579,13 @@ static void pgraph_bind_textures(NV2AState *d) default: assert(false); break; } +#if 0 /* Check for unsupported features */ assert(!(filter & NV_PGRAPH_TEXFILTER0_ASIGNED)); assert(!(filter & NV_PGRAPH_TEXFILTER0_RSIGNED)); assert(!(filter & NV_PGRAPH_TEXFILTER0_GSIGNED)); assert(!(filter & NV_PGRAPH_TEXFILTER0_BSIGNED)); +#endif glActiveTexture(GL_TEXTURE0 + i); if (!enabled) { From 3f88b68fa44b71fd81d9841b890a369ff4de8e68 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Wed, 20 Feb 2019 20:19:21 +0100 Subject: [PATCH 3/3] Add FIFO logging --- hw/xbox/nv2a/nv2a_debug.h | 2 +- hw/xbox/nv2a/nv2a_pfifo.c | 2 ++ hw/xbox/nv2a/nv2a_pgraph.c | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/xbox/nv2a/nv2a_debug.h b/hw/xbox/nv2a/nv2a_debug.h index eddd62f7a8..a9cdfe9078 100644 --- a/hw/xbox/nv2a/nv2a_debug.h +++ b/hw/xbox/nv2a/nv2a_debug.h @@ -28,7 +28,7 @@ # define NV2A_DPRINTF(format, ...) do { } while (0) #endif -// #define DEBUG_NV2A_GL +#define DEBUG_NV2A_GL #ifdef DEBUG_NV2A_GL #include diff --git a/hw/xbox/nv2a/nv2a_pfifo.c b/hw/xbox/nv2a/nv2a_pfifo.c index dac42b08f1..2d1cb55465 100644 --- a/hw/xbox/nv2a/nv2a_pfifo.c +++ b/hw/xbox/nv2a/nv2a_pfifo.c @@ -315,6 +315,8 @@ static void pfifo_run_pusher(NV2AState *d) // NV2A_DPRINTF("push %d 0x%x 0x%x - subch %d\n", put/4, method_entry, word, method_subchannel); +printf("Moving 0x%08X / 0x%08X: 0x%04X = 0x%08X\n", dma_get_v, dma_put_v, method_entry, word); + assert(put < 128*4 && (put%4) == 0); d->pfifo.regs[NV_PFIFO_CACHE1_METHOD + put*2] = method_entry; d->pfifo.regs[NV_PFIFO_CACHE1_DATA + put*2] = word; diff --git a/hw/xbox/nv2a/nv2a_pgraph.c b/hw/xbox/nv2a/nv2a_pgraph.c index eba45e9a00..4afd6ae274 100644 --- a/hw/xbox/nv2a/nv2a_pgraph.c +++ b/hw/xbox/nv2a/nv2a_pgraph.c @@ -572,7 +572,11 @@ static void pgraph_method(NV2AState *d, } break; } - case NV_KELVIN_PRIMITIVE: { switch (method) { + case NV_KELVIN_PRIMITIVE: { + +printf("method: 0x%04X: 0x%08X\n", method, parameter); + + switch (method) { case NV097_SET_OBJECT: kelvin->object_instance = parameter; break;