X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.c;h=4d6f9400140dc7e3dd9dceee1d9db05baef48477;hb=9d917eea21607c7c239d4b0cd850d660c0c8e4c5;hp=22bdb19912d7ff31710e6aadc7b2417139a6c114;hpb=8ab3e3c1cf696cb776b14ab511f98aa8ab22797e;p=picodrive.git diff --git a/Pico/Pico.c b/Pico/Pico.c index 22bdb19..4d6f940 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -137,7 +137,7 @@ int PicoReset(int hard) Pico.m.pal=pal; Pico.video.status = 0x3408 | pal; // always set bits | vblank | pal - sound_reset(); // pal must be known here + PsndReset(); // pal must be known here if (PicoMCD & 1) { PicoResetMCD(hard); @@ -202,11 +202,9 @@ static __inline void SekRunM68k(int cyc) { int cyc_do; SekCycleAim+=cyc; - //printf("aim: %i, cnt: %i\n", SekCycleAim, SekCycleCnt); if((cyc_do=SekCycleAim-SekCycleCnt) <= 0) return; - //printf("cyc_do: %i\n", cyc_do); -#if defined(EMU_C68K) && defined(EMU_M68K) - // this means we do run-compare Cyclone vs Musashi +#if defined(EMU_CORE_DEBUG) + // this means we do run-compare SekCycleCnt+=CM_compareRun(cyc_do); #elif defined(EMU_C68K) PicoCpuCM68k.cycles=cyc_do; @@ -215,7 +213,7 @@ static __inline void SekRunM68k(int cyc) #elif defined(EMU_M68K) SekCycleCnt+=m68k_execute(cyc_do); #elif defined(EMU_F68K) - SekCycleCnt+=m68k_emulate(cyc_do); + SekCycleCnt+=fm68k_emulate(cyc_do+1); #endif } @@ -223,8 +221,7 @@ static __inline void SekStep(void) { // this is required for timing sensitive stuff to work int realaim=SekCycleAim; SekCycleAim=SekCycleCnt+1; -#if defined(EMU_C68K) && defined(EMU_M68K) - // this means we do run-compare Cyclone vs Musashi +#if defined(EMU_CORE_DEBUG) SekCycleCnt+=CM_compareRun(1); #elif defined(EMU_C68K) PicoCpuCM68k.cycles=1; @@ -233,7 +230,7 @@ static __inline void SekStep(void) #elif defined(EMU_M68K) SekCycleCnt+=m68k_execute(1); #elif defined(EMU_F68K) - SekCycleCnt+=m68k_emulate(1); + SekCycleCnt+=fm68k_emulate(1); #endif SekCycleAim=realaim; } @@ -258,17 +255,17 @@ static __inline void getSamples(int y) if(y == 224) { if(emustatus & 2) - curr_pos += sound_render(curr_pos, PsndLen-PsndLen/2); - else curr_pos = sound_render(0, PsndLen); + curr_pos += PsndRender(curr_pos, PsndLen-PsndLen/2); + else curr_pos = PsndRender(0, PsndLen); if (emustatus&1) emustatus|=2; else emustatus&=~2; if (PicoWriteSound) PicoWriteSound(curr_pos); // clear sound buffer - sound_clear(); + PsndClear(); } else if(emustatus & 3) { emustatus|= 2; emustatus&=~1; - curr_pos = sound_render(0, PsndLen/2); + curr_pos = PsndRender(0, PsndLen/2); } } @@ -296,7 +293,7 @@ static void PicoRunZ80Simple(int line_from, int line_to) if (PicoOpt&1) { // we have ym2612 enabled, so we have to run Z80 in lines, so we could update DAC and timers for (line = line_from; line < line_to; line++) { - sound_timers_and_dac(line); + Psnd_timers_and_dac(line); if ((line == 224 || line == line_sample) && PsndOut) getSamples(line); if (line == 32 && PsndOut) emustatus &= ~1; if (line >= line_from_r && line < line_to_r) @@ -400,10 +397,10 @@ static int PicoFrameSimple(void) // here we render sound if ym2612 is disabled if (!(PicoOpt&1) && PsndOut) { - int len = sound_render(0, PsndLen); + int len = PsndRender(0, PsndLen); if (PicoWriteSound) PicoWriteSound(len); // clear sound buffer - sound_clear(); + PsndClear(); } // a gap between flags set and vint