From 30a924fa48d8dc609953aca435b11bf2b2a5cd8d Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Tue, 15 May 2018 18:27:56 -0500 Subject: [PATCH] Revert "Fix Secret of Evermore PAL version." This reverts commit 6ee21af0cf2f68c323f1e0243a14c43f55856245. --- apu/bapu/smp/memory.cpp | 8 ++++---- debug.cpp | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/apu/bapu/smp/memory.cpp b/apu/bapu/smp/memory.cpp index 4d450cb4..aecba720 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) { - port_write(3, 0x00); - port_write(2, 0x00); + cpu.port_write(3, 0x00); + cpu.port_write(2, 0x00); } if(data & 0x10) { - port_write(1, 0x00); - port_write(0, 0x00); + cpu.port_write(1, 0x00); + cpu.port_write(0, 0x00); } } diff --git a/debug.cpp b/debug.cpp index 21fbaaec..e2792498 100644 --- a/debug.cpp +++ b/debug.cpp @@ -197,14 +197,11 @@ #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; @@ -1647,13 +1644,19 @@ static void debug_process_command (char *Line) *Line = 0; } -*/ + if (*Line == 'a') { - 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)); + 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]); } -/* + if (*Line == 'P') { Settings.TraceDSP = !Settings.TraceDSP;