SDL: added preliminary dendy support (set SDL.PAL to 2 to enable.. for now)
This commit is contained in:
parent
1df598e34d
commit
97437c8da4
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
#include "scalebit.h"
|
#include "scalebit.h"
|
||||||
#include "hq2x.h"
|
#include "hq2x.h"
|
||||||
#include "hq3x.h"
|
#include "hq3x.h"
|
||||||
|
|
|
@ -401,7 +401,7 @@ InitConfig()
|
||||||
void
|
void
|
||||||
UpdateEMUCore(Config *config)
|
UpdateEMUCore(Config *config)
|
||||||
{
|
{
|
||||||
int ntsccol, ntsctint, ntschue, flag, start, end;
|
int ntsccol, ntsctint, ntschue, flag, region, start, end;
|
||||||
std::string cpalette;
|
std::string cpalette;
|
||||||
|
|
||||||
config->getOption("SDL.NTSCpalette", &ntsccol);
|
config->getOption("SDL.NTSCpalette", &ntsccol);
|
||||||
|
@ -414,8 +414,8 @@ UpdateEMUCore(Config *config)
|
||||||
LoadCPalette(cpalette);
|
LoadCPalette(cpalette);
|
||||||
}
|
}
|
||||||
|
|
||||||
config->getOption("SDL.PAL", &flag);
|
config->getOption("SDL.PAL", ®ion);
|
||||||
FCEUI_SetVidSystem(flag ? 1 : 0);
|
FCEUI_SetRegion(region);
|
||||||
|
|
||||||
config->getOption("SDL.GameGenie", &flag);
|
config->getOption("SDL.GameGenie", &flag);
|
||||||
FCEUI_SetGameGenie(flag ? 1 : 0);
|
FCEUI_SetGameGenie(flag ? 1 : 0);
|
||||||
|
|
|
@ -40,6 +40,8 @@ extern int _sound;
|
||||||
extern long soundrate;
|
extern long soundrate;
|
||||||
extern long soundbufsize;
|
extern long soundbufsize;
|
||||||
|
|
||||||
|
extern int pal_emulation;
|
||||||
|
|
||||||
int CLImain(int argc, char *argv[]);
|
int CLImain(int argc, char *argv[]);
|
||||||
|
|
||||||
// Device management defaults
|
// Device management defaults
|
||||||
|
|
|
@ -72,6 +72,11 @@ int mutecapture;
|
||||||
#endif
|
#endif
|
||||||
static int noconfig;
|
static int noconfig;
|
||||||
|
|
||||||
|
int pal_emulation;
|
||||||
|
int dendy;
|
||||||
|
// TODO: actually implement swapDuty
|
||||||
|
int swapDuty;
|
||||||
|
|
||||||
// -Video Modes Tag- : See --special
|
// -Video Modes Tag- : See --special
|
||||||
static const char *DriverUsage=
|
static const char *DriverUsage=
|
||||||
"Option Value Description\n"
|
"Option Value Description\n"
|
||||||
|
@ -213,10 +218,23 @@ int LoadGame(const char *path)
|
||||||
// set pal/ntsc
|
// set pal/ntsc
|
||||||
int id;
|
int id;
|
||||||
g_config->getOption("SDL.PAL", &id);
|
g_config->getOption("SDL.PAL", &id);
|
||||||
if(id)
|
switch(id)
|
||||||
FCEUI_SetVidSystem(1);
|
{
|
||||||
else
|
case 0:
|
||||||
FCEUI_SetVidSystem(0);
|
FCEUI_SetVidSystem(0);
|
||||||
|
pal_emulation = 0;
|
||||||
|
dendy = 0;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
FCEUI_SetVidSystem(1);
|
||||||
|
pal_emulation = 1;
|
||||||
|
dendy = 0;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
FCEUI_SetVidSystem(0);
|
||||||
|
pal_emulation = 0;
|
||||||
|
dendy = 1;
|
||||||
|
}
|
||||||
|
|
||||||
std::string filename;
|
std::string filename;
|
||||||
g_config->getOption("SDL.Sound.RecordFile", &filename);
|
g_config->getOption("SDL.Sound.RecordFile", &filename);
|
||||||
|
|
|
@ -20,6 +20,9 @@ const int INVALID_STATE = 99;
|
||||||
extern int noGui;
|
extern int noGui;
|
||||||
extern int isloaded;
|
extern int isloaded;
|
||||||
|
|
||||||
|
extern int dendy;
|
||||||
|
extern int pal_emulation;
|
||||||
|
|
||||||
int LoadGame(const char *path);
|
int LoadGame(const char *path);
|
||||||
int CloseGame(void);
|
int CloseGame(void);
|
||||||
void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count);
|
void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count);
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
void RefreshThrottleFPS(void);
|
void RefreshThrottleFPS();
|
||||||
int SpeedThrottle(void);
|
int SpeedThrottle(void);
|
||||||
|
|
|
@ -56,8 +56,8 @@ extern bool isTaseditorRecording();
|
||||||
extern int32 fps_scale;
|
extern int32 fps_scale;
|
||||||
extern int32 fps_scale_unpaused;
|
extern int32 fps_scale_unpaused;
|
||||||
extern int32 fps_scale_frameadvance;
|
extern int32 fps_scale_frameadvance;
|
||||||
extern void RefreshThrottleFPS();
|
|
||||||
#endif
|
#endif
|
||||||
|
extern void RefreshThrottleFPS();
|
||||||
|
|
||||||
#ifdef _S9XLUA_H
|
#ifdef _S9XLUA_H
|
||||||
#include "fceulua.h"
|
#include "fceulua.h"
|
||||||
|
|
Loading…
Reference in New Issue