--- np2/statsave.c 2003/10/18 07:28:50 1.4 +++ np2/statsave.c 2003/10/21 11:22:05 1.10 @@ -12,14 +12,14 @@ #include "pc9861k.h" #include "mpu98ii.h" #include "board14.h" +#include "bios.h" #include "vram.h" -#include "maketext.h" #include "palettes.h" -#include "font.h" +#include "maketext.h" #include "sound.h" -#include "bios.h" #include "fmboard.h" #include "beep.h" +#include "font.h" #include "fddfile.h" #include "fdd_mtr.h" #include "sxsi.h" @@ -43,14 +43,13 @@ typedef struct { enum { NP2FLAG_BIN = 0, NP2FLAG_TERM, - NP2FLAG_CORE, + NP2FLAG_CLOCK, NP2FLAG_DMA, NP2FLAG_EGC, NP2FLAG_EXT, NP2FLAG_EVT, NP2FLAG_GIJ, NP2FLAG_FM, - NP2FLAG_BEEP, NP2FLAG_MIDI, NP2FLAG_DISK }; @@ -349,17 +348,13 @@ static int flagload_common(NP2FFILE *f, // ----- -static int flagload_core(NP2FFILE *f, const STENTRY *t) { +static int flagload_clock(NP2FFILE *f, const STENTRY *t) { int ret; ret = flagload_common(f, t); - if (opna_rate) { - pc.sampleclock = (pc.realclock / opna_rate) + 1; - } - else { - pc.sampleclock = 0; - } + sound_changeclock(); + beep_changeclock(); return(ret); } @@ -499,9 +494,6 @@ static int flagload_ext(NP2FFILE *f, con // ----- typedef struct { - SINT32 remainclock; - SINT32 baseclock; - UINT32 clock; UINT readyevents; UINT waitevents; } NEVTSAVE; @@ -540,9 +532,6 @@ static int flagsave_evt(NP2FFILE *f, con int ret; UINT i; - nevt.remainclock = nevent.remainclock; - nevt.baseclock = nevent.baseclock; - nevt.clock = nevent.clock; nevt.readyevents = nevent.readyevents; nevt.waitevents = nevent.waitevents; @@ -601,9 +590,6 @@ static int flagload_evt(NP2FFILE *f, con ret = flagload_load(f, &nevt, sizeof(nevt)); - nevent.remainclock = nevt.remainclock; - nevent.baseclock = nevt.baseclock; - nevent.clock = nevt.clock; nevent.readyevents = 0; nevent.waitevents = 0; @@ -855,6 +841,7 @@ static int flagload_fm(NP2FFILE *f, cons break; default: + saveflg = 0; break; } @@ -1174,8 +1161,7 @@ int statsave_save(const char *filename) for (i=0; i