From 6ee21af0cf2f68c323f1e0243a14c43f55856245 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Tue, 15 May 2018 17:23:02 -0500 Subject: [PATCH] Fix Secret of Evermore PAL version. --- apu/bapu/smp/memory.cpp | 8 ++++---- debug.cpp | 19 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/apu/bapu/smp/memory.cpp b/apu/bapu/smp/memory.cpp index aecba720..4d450cb4 100644 --- a/apu/bapu/smp/memory.cpp +++ b/apu/bapu/smp/memory.cpp @@ -60,12 +60,12 @@ void SMP::mmio_write(unsigned addr, unsigned data) { if(data & 0x30) { synchronize_cpu(); if(data & 0x20) { - cpu.port_write(3, 0x00); - cpu.port_write(2, 0x00); + port_write(3, 0x00); + port_write(2, 0x00); } if(data & 0x10) { - cpu.port_write(1, 0x00); - cpu.port_write(0, 0x00); + port_write(1, 0x00); + port_write(0, 0x00); } } diff --git a/debug.cpp b/debug.cpp index e2792498..21fbaaec 100644 --- a/debug.cpp +++ b/debug.cpp @@ -197,11 +197,14 @@ #include "memmap.h" #include "cpuops.h" #include "dma.h" -#include "apu/apu.h" #include "display.h" #include "debug.h" #include "missing.h" +#include "apu/apu.h" + +#include "apu/bapu/snes/snes.hpp" + extern SDMA DMA[8]; extern FILE *apu_trace; FILE *trace = NULL, *trace2 = NULL; @@ -1644,19 +1647,13 @@ static void debug_process_command (char *Line) *Line = 0; } - +*/ if (*Line == 'a') { - printf("APU in-ports : %02X %02X %02X %02X\n", IAPU.RAM[0xF4], IAPU.RAM[0xF5], IAPU.RAM[0xF6], IAPU.RAM[0xF7]); - printf("APU out-ports: %02X %02X %02X %02X\n", APU.OutPorts[0], APU.OutPorts[1], APU.OutPorts[2], APU.OutPorts[3]); - printf("ROM/RAM switch: %s\n", (IAPU.RAM[0xf1] & 0x80) ? "ROM" : "RAM"); - - for (int i = 0; i < 3; i++) - if (APU.TimerEnabled[i]) - printf("Timer%d enabled, Value: 0x%03X, 4-bit: 0x%02X, Target: 0x%03X\n", - i, APU.Timer[i], IAPU.RAM[0xfd + i], APU.TimerTarget[i]); + printf("S-CPU-side ports S-CPU writes these, S-SMP reads: %02X %02X %02X %02X\n", SNES::cpu.port_read(0), SNES::cpu.port_read(1), SNES::cpu.port_read(2), SNES::cpu.port_read(3)); + printf("S-SMP-side ports S-SMP writes these, S-CPU reads: %02X %02X %02X %02X\n", SNES::smp.port_read(0), SNES::smp.port_read(1), SNES::smp.port_read(2), SNES::smp.port_read(3)); } - +/* if (*Line == 'P') { Settings.TraceDSP = !Settings.TraceDSP;