2008-08-06 03:09:59 +02:00
|
|
|
/****************************************************************************
|
2008-09-12 07:28:40 +02:00
|
|
|
* Snes9x 1.51 Nintendo Wii/Gamecube Port
|
2008-08-06 03:09:59 +02:00
|
|
|
*
|
|
|
|
* softdev July 2006
|
|
|
|
* crunchy2 May 2007
|
2008-09-23 06:13:33 +02:00
|
|
|
* Michniewski 2008
|
2009-03-17 06:09:45 +01:00
|
|
|
* Tantric 2008-2009
|
2008-08-06 03:09:59 +02:00
|
|
|
*
|
|
|
|
* s9xconfig.cpp
|
|
|
|
*
|
2008-09-11 06:41:58 +02:00
|
|
|
* Configuration parameters are here for easy maintenance.
|
2008-08-06 03:09:59 +02:00
|
|
|
* Refer to Snes9x.h for all combinations.
|
|
|
|
* The defaults used here are taken directly from porting.html
|
2008-09-12 07:28:40 +02:00
|
|
|
***************************************************************************/
|
2008-08-06 03:09:59 +02:00
|
|
|
|
|
|
|
#include <gccore.h>
|
|
|
|
#include "snes9x.h"
|
|
|
|
#include "snes9xGX.h"
|
2008-12-19 23:00:20 +01:00
|
|
|
#include "input.h"
|
2009-01-30 08:25:30 +01:00
|
|
|
#include "filter.h"
|
2008-08-06 03:09:59 +02:00
|
|
|
|
2008-08-12 05:25:16 +02:00
|
|
|
struct SGCSettings GCSettings;
|
|
|
|
|
2009-03-17 06:09:45 +01:00
|
|
|
/****************************************************************************
|
2009-03-28 20:03:35 +01:00
|
|
|
* FixInvalidSettings
|
|
|
|
*
|
2009-03-17 06:09:45 +01:00
|
|
|
* Attempts to correct at least some invalid settings - the ones that
|
|
|
|
* might cause crashes
|
|
|
|
***************************************************************************/
|
|
|
|
void FixInvalidSettings()
|
|
|
|
{
|
2009-12-02 07:48:50 +01:00
|
|
|
if(GCSettings.LoadMethod > 4)
|
|
|
|
GCSettings.LoadMethod = DEVICE_AUTO;
|
|
|
|
if(GCSettings.SaveMethod > 4)
|
|
|
|
GCSettings.SaveMethod = DEVICE_AUTO;
|
2009-11-16 09:13:02 +01:00
|
|
|
if(!(GCSettings.zoomHor > 0.5 && GCSettings.zoomHor < 1.5))
|
|
|
|
GCSettings.zoomHor = 1.0;
|
|
|
|
if(!(GCSettings.zoomVert > 0.5 && GCSettings.zoomVert < 1.5))
|
|
|
|
GCSettings.zoomVert = 1.0;
|
2009-03-17 06:09:45 +01:00
|
|
|
if(!(GCSettings.xshift > -50 && GCSettings.xshift < 50))
|
|
|
|
GCSettings.xshift = 0;
|
|
|
|
if(!(GCSettings.yshift > -50 && GCSettings.yshift < 50))
|
|
|
|
GCSettings.yshift = 0;
|
|
|
|
if(!(GCSettings.MusicVolume >= 0 && GCSettings.MusicVolume <= 100))
|
|
|
|
GCSettings.MusicVolume = 40;
|
|
|
|
if(!(GCSettings.SFXVolume >= 0 && GCSettings.SFXVolume <= 100))
|
|
|
|
GCSettings.SFXVolume = 40;
|
2009-03-28 20:03:35 +01:00
|
|
|
if(GCSettings.Controller > CTRL_PAD4 || GCSettings.Controller < CTRL_MOUSE)
|
|
|
|
GCSettings.Controller = CTRL_PAD2;
|
2009-03-30 10:16:41 +02:00
|
|
|
if(!(GCSettings.render >= 0 && GCSettings.render < 3))
|
|
|
|
GCSettings.render = 2;
|
2009-04-22 20:21:37 +02:00
|
|
|
if(!(GCSettings.videomode >= 0 && GCSettings.videomode < 5))
|
|
|
|
GCSettings.videomode = 0;
|
2009-03-17 06:09:45 +01:00
|
|
|
}
|
|
|
|
|
2009-03-28 20:03:35 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* DefaultSettings
|
|
|
|
*
|
|
|
|
* Sets all the defaults!
|
|
|
|
***************************************************************************/
|
2008-08-06 03:09:59 +02:00
|
|
|
void
|
|
|
|
DefaultSettings ()
|
|
|
|
{
|
2009-12-23 08:21:05 +01:00
|
|
|
memset (&GCSettings, 0, sizeof (GCSettings));
|
|
|
|
|
2008-12-19 23:00:20 +01:00
|
|
|
ResetControls(); // controller button mappings
|
|
|
|
|
2009-10-02 00:35:12 +02:00
|
|
|
GCSettings.LoadMethod = DEVICE_AUTO; // Auto, SD, DVD, USB, Network (SMB)
|
2009-12-23 08:21:05 +01:00
|
|
|
GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB)
|
|
|
|
sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files
|
|
|
|
sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files
|
|
|
|
sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files
|
2008-08-07 05:25:02 +02:00
|
|
|
GCSettings.AutoLoad = 1;
|
|
|
|
GCSettings.AutoSave = 1;
|
2008-09-30 07:31:46 +02:00
|
|
|
|
2009-03-28 20:03:35 +01:00
|
|
|
GCSettings.Controller = CTRL_PAD2;
|
2008-09-30 07:31:46 +02:00
|
|
|
|
2009-04-22 20:21:37 +02:00
|
|
|
GCSettings.videomode = 0; // automatic video mode detection
|
2008-09-28 04:13:19 +02:00
|
|
|
GCSettings.render = 2; // Unfiltered
|
2009-01-30 08:25:30 +01:00
|
|
|
GCSettings.FilterMethod = FILTER_NONE; // no hq2x
|
2008-09-30 07:31:46 +02:00
|
|
|
|
2009-11-16 09:13:02 +01:00
|
|
|
GCSettings.widescreen = 0; // no aspect ratio correction
|
|
|
|
GCSettings.zoomHor = 1.0; // horizontal zoom level
|
|
|
|
GCSettings.zoomVert = 1.0; // vertical zoom level
|
2009-03-28 20:03:35 +01:00
|
|
|
GCSettings.xshift = 0; // horizontal video shift
|
|
|
|
GCSettings.yshift = 0; // vertical video shift
|
2008-08-07 05:25:02 +02:00
|
|
|
|
2009-03-11 18:28:37 +01:00
|
|
|
GCSettings.WiimoteOrientation = 0;
|
|
|
|
GCSettings.ExitAction = 0;
|
|
|
|
GCSettings.MusicVolume = 40;
|
|
|
|
GCSettings.SFXVolume = 40;
|
2009-05-20 07:22:50 +02:00
|
|
|
GCSettings.Rumble = 1;
|
2009-03-11 18:28:37 +01:00
|
|
|
|
2008-08-07 05:25:02 +02:00
|
|
|
/****************** SNES9x Settings ***********************/
|
|
|
|
|
2008-09-10 07:57:37 +02:00
|
|
|
// Default ALL to false
|
2008-08-07 05:25:02 +02:00
|
|
|
memset (&Settings, 0, sizeof (Settings));
|
2008-08-06 03:09:59 +02:00
|
|
|
|
2008-09-10 07:57:37 +02:00
|
|
|
// General
|
2009-11-30 09:14:38 +01:00
|
|
|
|
2008-08-07 05:25:02 +02:00
|
|
|
Settings.MouseMaster = false;
|
|
|
|
Settings.SuperScopeMaster = false;
|
|
|
|
Settings.MultiPlayer5Master = false;
|
2008-08-08 04:09:02 +02:00
|
|
|
Settings.JustifierMaster = false;
|
2008-10-29 06:48:40 +01:00
|
|
|
Settings.ShutdownMaster = true; // needs to be on for ActRaiser 2
|
2009-11-25 07:35:14 +01:00
|
|
|
Settings.ApplyCheats = true;
|
2008-08-06 03:09:59 +02:00
|
|
|
|
2009-11-30 09:14:38 +01:00
|
|
|
Settings.BlockInvalidVRAMAccess = false;
|
|
|
|
Settings.HDMATimingHack = 100;
|
|
|
|
|
|
|
|
// Sound defaults. On GC this is 32Khz/16bit/Stereo/InterpolatedSound
|
|
|
|
Settings.APUEnabled = true;
|
|
|
|
Settings.NextAPUEnabled = true;
|
2008-08-07 05:25:02 +02:00
|
|
|
Settings.SoundPlaybackRate = 32000;
|
|
|
|
Settings.Stereo = true;
|
|
|
|
Settings.SixteenBitSound = true;
|
2009-11-30 09:14:38 +01:00
|
|
|
Settings.SoundEnvelopeHeightReading = true;
|
2008-10-04 00:39:14 +02:00
|
|
|
Settings.SoundSync = true;
|
2009-11-30 09:14:38 +01:00
|
|
|
Settings.FixFrequency = false;
|
|
|
|
Settings.DisableSampleCaching = true;
|
|
|
|
Settings.InterpolatedSound = true;
|
2008-10-19 19:59:00 +02:00
|
|
|
Settings.ReverseStereo = true;
|
2008-08-06 03:09:59 +02:00
|
|
|
|
2008-09-10 07:57:37 +02:00
|
|
|
// Graphics
|
2008-08-07 05:25:02 +02:00
|
|
|
Settings.Transparency = true;
|
|
|
|
Settings.SupportHiRes = true;
|
2008-10-14 11:21:34 +02:00
|
|
|
Settings.SkipFrames = AUTO_FRAMERATE;
|
2008-08-07 05:25:02 +02:00
|
|
|
Settings.TurboSkipFrames = 19;
|
|
|
|
Settings.DisplayFrameRate = false;
|
2008-10-04 00:39:14 +02:00
|
|
|
Settings.AutoDisplayMessages = 0;
|
2008-09-10 19:33:35 +02:00
|
|
|
Settings.InitialInfoStringTimeout = 200; // # frames to display messages for
|
2008-08-07 05:25:02 +02:00
|
|
|
|
2008-09-10 07:57:37 +02:00
|
|
|
// Frame timings in 50hz and 60hz cpu mode
|
2008-08-07 05:25:02 +02:00
|
|
|
Settings.FrameTimePAL = 20000;
|
|
|
|
Settings.FrameTimeNTSC = 16667;
|
2008-08-06 03:09:59 +02:00
|
|
|
|
2009-11-30 09:14:38 +01:00
|
|
|
// SDD1 - Star Ocean Returns
|
|
|
|
Settings.SDD1Pack = true;
|
|
|
|
|
2008-08-07 05:25:02 +02:00
|
|
|
Settings.ForceNTSC = 0;
|
|
|
|
Settings.ForcePAL = 0;
|
|
|
|
Settings.ForceHiROM = 0;
|
|
|
|
Settings.ForceLoROM = 0;
|
|
|
|
Settings.ForceHeader = 0;
|
|
|
|
Settings.ForceNoHeader = 0;
|
2009-11-30 09:14:38 +01:00
|
|
|
Settings.ForceTransparency = 0;
|
2008-08-07 05:25:02 +02:00
|
|
|
Settings.ForceInterleaved = 0;
|
|
|
|
Settings.ForceInterleaved2 = 0;
|
|
|
|
Settings.ForceInterleaveGD24 = 0;
|
|
|
|
Settings.ForceNotInterleaved = 0;
|
2009-11-30 09:14:38 +01:00
|
|
|
Settings.ForceNoSuperFX = 0;
|
|
|
|
Settings.ForceSuperFX = 0;
|
|
|
|
Settings.ForceDSP1 = 0;
|
|
|
|
Settings.ForceNoDSP1 = 0;
|
2008-08-06 03:09:59 +02:00
|
|
|
}
|