From 4efee7e9f1f6780813263666260a9c98bc99b7e9 Mon Sep 17 00:00:00 2001 From: byuu <2107894+byuu@users.noreply.github.com> Date: Tue, 1 Oct 2019 06:51:17 +0900 Subject: [PATCH] Hotfix for Magical Drop (Japan)'s "tokoton mode" --- bsnes/sfc/dsp/dsp.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bsnes/sfc/dsp/dsp.cpp b/bsnes/sfc/dsp/dsp.cpp index e44ab63a..56e62266 100644 --- a/bsnes/sfc/dsp/dsp.cpp +++ b/bsnes/sfc/dsp/dsp.cpp @@ -60,6 +60,14 @@ auto DSP::power(bool reset) -> void { spc_dsp.soft_reset(); spc_dsp.set_output(samplebuffer, 8192); } + + if(configuration.hacks.hotfixes) { + //Magical Drop (Japan) does not initialize the DSP registers at startup. + //Tokoton mode will hang forever in some instances even on real hardware. + if(cartridge.headerTitle() == "MAGICAL DROP") { + for(uint address : range(0x80)) spc_dsp.write(address, 0xff); + } + } } auto DSP::mute() -> bool {