Overclock cleanup
This commit is contained in:
@@ -61,13 +61,14 @@ static int zapper_mode = 0; /* 0=absolute 1=relative */
|
|||||||
/* overclock the console by adding dummy scanlines to PPU loop
|
/* overclock the console by adding dummy scanlines to PPU loop
|
||||||
* disables DMC DMA and WaveHi filling for these dummies
|
* disables DMC DMA and WaveHi filling for these dummies
|
||||||
* doesn't work with new PPU */
|
* doesn't work with new PPU */
|
||||||
|
unsigned overclock_state = -1;
|
||||||
unsigned overclocked = 0;
|
unsigned overclocked = 0;
|
||||||
/* 7-bit samples have priority over overclocking */
|
unsigned skip_7bit_overclocking = 1; /* 7-bit samples have priority over overclocking */
|
||||||
unsigned skip_7bit_overclocking = 1;
|
unsigned totalscanlines = 0;
|
||||||
unsigned normal_scanlines = 240;
|
unsigned normal_scanlines = 240;
|
||||||
unsigned extrascanlines = 0;
|
unsigned extrascanlines = 0;
|
||||||
unsigned vblankscanlines = 0;
|
unsigned vblankscanlines = 0;
|
||||||
unsigned overclock_state = -1;
|
|
||||||
unsigned dendy = 0;
|
unsigned dendy = 0;
|
||||||
|
|
||||||
int FCEUnetplay;
|
int FCEUnetplay;
|
||||||
@@ -80,7 +81,6 @@ static uint16_t retro_palette[256];
|
|||||||
static uint16_t* fceu_video_out;
|
static uint16_t* fceu_video_out;
|
||||||
|
|
||||||
/* Some timing-related variables. */
|
/* Some timing-related variables. */
|
||||||
static int soundo = 1;
|
|
||||||
unsigned sndsamplerate = 48000;
|
unsigned sndsamplerate = 48000;
|
||||||
unsigned sndquality = 0;
|
unsigned sndquality = 0;
|
||||||
unsigned sndvolume = 150;
|
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)
|
void retro_set_controller_port_device(unsigned port, unsigned device)
|
||||||
{
|
{
|
||||||
unsigned i, arg = 0;
|
unsigned arg = 0;
|
||||||
void *InputDPtr;
|
void *InputDPtr;
|
||||||
|
|
||||||
if (port < 2) /* port #0 = player1/player3, port #1 = player2/player4 */
|
if (port < 2) /* port #0 = player1/player3, port #1 = player2/player4 */
|
||||||
|
|||||||
@@ -49,8 +49,6 @@
|
|||||||
|
|
||||||
uint64 timestampbase;
|
uint64 timestampbase;
|
||||||
|
|
||||||
extern int totalscanlines;
|
|
||||||
|
|
||||||
FCEUGI *GameInfo = NULL;
|
FCEUGI *GameInfo = NULL;
|
||||||
void (*GameInterface)(int h);
|
void (*GameInterface)(int h);
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ extern unsigned overclock_state;
|
|||||||
extern unsigned overclocked;
|
extern unsigned overclocked;
|
||||||
extern unsigned skip_7bit_overclocking;
|
extern unsigned skip_7bit_overclocking;
|
||||||
extern unsigned DMC_7bit;
|
extern unsigned DMC_7bit;
|
||||||
|
extern unsigned totalscanlines;
|
||||||
extern unsigned normal_scanlines;
|
extern unsigned normal_scanlines;
|
||||||
extern unsigned extrascanlines;
|
extern unsigned extrascanlines;
|
||||||
extern unsigned vblankscanlines;
|
extern unsigned vblankscanlines;
|
||||||
|
|||||||
@@ -127,8 +127,6 @@ static int maxsprites = 8;
|
|||||||
int scanline;
|
int scanline;
|
||||||
static uint32 scanlines_per_frame;
|
static uint32 scanlines_per_frame;
|
||||||
|
|
||||||
int totalscanlines;
|
|
||||||
|
|
||||||
uint8 PPU[4];
|
uint8 PPU[4];
|
||||||
uint8 PPUSPL;
|
uint8 PPUSPL;
|
||||||
uint8 NTARAM[0x800], PALRAM[0x20], SPRAM[0x100], SPRBUF[0x100];
|
uint8 NTARAM[0x800], PALRAM[0x20], SPRAM[0x100], SPRBUF[0x100];
|
||||||
|
|||||||
@@ -512,7 +512,7 @@ static void X6502_RunDebug(int32 cycles) {
|
|||||||
_tcount = 0;
|
_tcount = 0;
|
||||||
if (MapIRQHook) MapIRQHook(temp);
|
if (MapIRQHook) MapIRQHook(temp);
|
||||||
|
|
||||||
if (scanline < normal_scanlines || scanline == totalscanlines)
|
if (!overclocked)
|
||||||
FCEU_SoundCPUHook(temp);
|
FCEU_SoundCPUHook(temp);
|
||||||
|
|
||||||
_PC++;
|
_PC++;
|
||||||
|
|||||||
@@ -23,10 +23,6 @@
|
|||||||
|
|
||||||
#include "x6502struct.h"
|
#include "x6502struct.h"
|
||||||
|
|
||||||
extern int scanline;
|
|
||||||
extern unsigned normal_scanlines;
|
|
||||||
extern int totalscanlines;
|
|
||||||
|
|
||||||
#ifdef FCEUDEF_DEBUGGER
|
#ifdef FCEUDEF_DEBUGGER
|
||||||
void X6502_Debug(void (*CPUHook)(X6502 *),
|
void X6502_Debug(void (*CPUHook)(X6502 *),
|
||||||
uint8 (*ReadHook)(X6502 *, uint32),
|
uint8 (*ReadHook)(X6502 *, uint32),
|
||||||
|
|||||||
Reference in New Issue
Block a user