From 423520257011b7b41c9bdce41bd1de7a14488300 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 25 Oct 2014 01:01:41 +0000 Subject: [PATCH] fix vrc7 sound savestates --- trunk/src/boards/vrc7.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/trunk/src/boards/vrc7.cpp b/trunk/src/boards/vrc7.cpp index d6ffdd27..e6b173a3 100644 --- a/trunk/src/boards/vrc7.cpp +++ b/trunk/src/boards/vrc7.cpp @@ -26,6 +26,12 @@ static int32 IRQCount, CycleCount; static uint8 *WRAM = NULL; static uint32 WRAMSIZE; +#include "emu2413.h" + +static int32 dwave = 0; +static OPLL *VRC7Sound = NULL; +static OPLL **VRC7Sound_saveptr = &VRC7Sound; + static SFORMAT StateRegs[] = { { &vrc7idx, 1, "VRCI" }, @@ -37,16 +43,12 @@ static SFORMAT StateRegs[] = { &IRQLatch, 1, "IRQL" }, { &IRQCount, 4, "IRQC" }, { &CycleCount, 4, "CYCC" }, - { 0 } + { (void**)VRC7Sound_saveptr, sizeof(*VRC7Sound) | FCEUSTATE_INDIRECT, "VRC7" }, + {0} }; // VRC7 Sound -#include "emu2413.h" - -static int32 dwave = 0; -static OPLL *VRC7Sound = NULL; - void DoVRC7Sound(void) { int32 z, a; if (FSettings.soundq >= 1)