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