From baa4de371356b57d87cc3fafcf9c615022ad1a62 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Tue, 5 Jul 2011 14:05:36 -0500 Subject: [PATCH] Save a few more mmapped registers to SPC files. Fix key-on trigger. --- apu/apu.cpp | 3 +-- apu/bapu/smp/smp_state.cpp | 2 +- gtk/src/gtk_file.cpp | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apu/apu.cpp b/apu/apu.cpp index aeb116e9..c41634c8 100644 --- a/apu/apu.cpp +++ b/apu/apu.cpp @@ -492,8 +492,6 @@ bool8 S9xInitAPU (void) spc::shrink_buffer = NULL; spc::resampler = NULL; - SNES::dsp.spc_dsp.set_spc_snapshot_callback(SPCSnapshotCallback); - return (TRUE); } @@ -590,6 +588,7 @@ void S9xResetAPU (void) SNES::smp.power (); SNES::dsp.power (); SNES::dsp.spc_dsp.set_output ((SNES::SPC_DSP::sample_t *) spc::landing_buffer, spc::buffer_size >> 1); + SNES::dsp.spc_dsp.set_spc_snapshot_callback(SPCSnapshotCallback); spc::resampler->clear(); } diff --git a/apu/bapu/smp/smp_state.cpp b/apu/bapu/smp/smp_state.cpp index 7c5179c4..e3b9d446 100644 --- a/apu/bapu/smp/smp_state.cpp +++ b/apu/bapu/smp/smp_state.cpp @@ -48,7 +48,7 @@ void SMP::save_spc (uint8 *block) { memset (out.id666, 0, 210); memcpy (out.apuram, apuram, 65536); - for (int i = 0xf2; i <= 0xf7; i++) + for (int i = 0xf2; i <= 0xf9; i++) { out.apuram[i] = mmio_read (i); } diff --git a/gtk/src/gtk_file.cpp b/gtk/src/gtk_file.cpp index 0610d439..2182e39e 100644 --- a/gtk/src/gtk_file.cpp +++ b/gtk/src/gtk_file.cpp @@ -157,6 +157,7 @@ S9xGetDirectory (enum s9x_getdirtype dirtype) case SCREENSHOT_DIR: case SPC_DIR: sprintf (path, "%s", gui_config->export_directory); + break; default: path[0] = '\0';