diff --git a/src/drivers/libretro/libretro.c b/src/drivers/libretro/libretro.c index cbf695a..d1db283 100644 --- a/src/drivers/libretro/libretro.c +++ b/src/drivers/libretro/libretro.c @@ -61,13 +61,14 @@ static int zapper_mode = 0; /* 0=absolute 1=relative */ /* overclock the console by adding dummy scanlines to PPU loop * disables DMC DMA and WaveHi filling for these dummies * doesn't work with new PPU */ +unsigned overclock_state = -1; unsigned overclocked = 0; -/* 7-bit samples have priority over overclocking */ -unsigned skip_7bit_overclocking = 1; +unsigned skip_7bit_overclocking = 1; /* 7-bit samples have priority over overclocking */ +unsigned totalscanlines = 0; unsigned normal_scanlines = 240; unsigned extrascanlines = 0; unsigned vblankscanlines = 0; -unsigned overclock_state = -1; + unsigned dendy = 0; int FCEUnetplay; @@ -80,7 +81,6 @@ static uint16_t retro_palette[256]; static uint16_t* fceu_video_out; /* Some timing-related variables. */ -static int soundo = 1; unsigned sndsamplerate = 48000; unsigned sndquality = 0; unsigned sndvolume = 150; @@ -540,7 +540,7 @@ void retro_set_input_state(retro_input_state_t cb) void retro_set_controller_port_device(unsigned port, unsigned device) { - unsigned i, arg = 0; + unsigned arg = 0; void *InputDPtr; if (port < 2) /* port #0 = player1/player3, port #1 = player2/player4 */ diff --git a/src/fceu.c b/src/fceu.c index effbeff..b07ca0d 100644 --- a/src/fceu.c +++ b/src/fceu.c @@ -49,8 +49,6 @@ uint64 timestampbase; -extern int totalscanlines; - FCEUGI *GameInfo = NULL; void (*GameInterface)(int h); diff --git a/src/fceu.h b/src/fceu.h index 1d69e0d..29ad51b 100644 --- a/src/fceu.h +++ b/src/fceu.h @@ -10,6 +10,7 @@ extern unsigned overclock_state; extern unsigned overclocked; extern unsigned skip_7bit_overclocking; extern unsigned DMC_7bit; +extern unsigned totalscanlines; extern unsigned normal_scanlines; extern unsigned extrascanlines; extern unsigned vblankscanlines; diff --git a/src/ppu.c b/src/ppu.c index 110b5ae..5d5e5ff 100644 --- a/src/ppu.c +++ b/src/ppu.c @@ -127,8 +127,6 @@ static int maxsprites = 8; int scanline; static uint32 scanlines_per_frame; -int totalscanlines; - uint8 PPU[4]; uint8 PPUSPL; uint8 NTARAM[0x800], PALRAM[0x20], SPRAM[0x100], SPRBUF[0x100]; diff --git a/src/x6502.c b/src/x6502.c index ff8f16b..798244e 100644 --- a/src/x6502.c +++ b/src/x6502.c @@ -512,7 +512,7 @@ static void X6502_RunDebug(int32 cycles) { _tcount = 0; if (MapIRQHook) MapIRQHook(temp); - if (scanline < normal_scanlines || scanline == totalscanlines) + if (!overclocked) FCEU_SoundCPUHook(temp); _PC++; diff --git a/src/x6502.h b/src/x6502.h index 00dae4b..2ecf32c 100644 --- a/src/x6502.h +++ b/src/x6502.h @@ -23,10 +23,6 @@ #include "x6502struct.h" -extern int scanline; -extern unsigned normal_scanlines; -extern int totalscanlines; - #ifdef FCEUDEF_DEBUGGER void X6502_Debug(void (*CPUHook)(X6502 *), uint8 (*ReadHook)(X6502 *, uint32),