--- np2/statsave.c 2003/10/16 17:57:09 1.1 +++ np2/statsave.c 2003/10/20 06:36:33 1.7 @@ -43,8 +43,7 @@ typedef struct { enum { NP2FLAG_BIN = 0, NP2FLAG_TERM, - NP2FLAG_286, - NP2FLAG_CORE, + NP2FLAG_CLOCK, NP2FLAG_DMA, NP2FLAG_EGC, NP2FLAG_EXT, @@ -350,43 +349,12 @@ static int flagload_common(NP2FFILE *f, // ----- -static int flagsave_286(NP2FFILE *f, const STENTRY *t) { - - int ret; - - ret = flagsave_create(f, t); - if (ret != NP2FLAG_FAILURE) { - ret |= flagsave_save(f, &i286r, sizeof(I286REGS)); - ret |= flagsave_save(f, &i286s, sizeof(I286STAT)); - ret |= flagsave_close(f); - } - return(ret); -} - -static int flagload_286(NP2FFILE *f, const STENTRY *t) { - - int ret; - - ret = flagload_load(f, &i286r, sizeof(I286REGS)); - ret |= flagload_load(f, &i286s, sizeof(I286STAT)); - (void)t; - return(ret); -} - - -// ----- - -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(); return(ret); } @@ -526,9 +494,6 @@ static int flagload_ext(NP2FFILE *f, con // ----- typedef struct { - SINT32 remainclock; - SINT32 baseclock; - UINT32 clock; UINT readyevents; UINT waitevents; } NEVTSAVE; @@ -543,7 +508,7 @@ typedef struct { static int nevent_save(NP2FFILE *f, int num) { NEVTITEM nit; - int i; + UINT i; ZeroMemory(&nit, sizeof(nit)); for (i=0; i