2011-01-11 02:55:51 +00:00
namespace BizHawk.MultiClient
2011-02-19 20:31:32 +00:00
{
2011-01-11 02:55:51 +00:00
public class Config
{
2011-02-19 20:31:32 +00:00
public Config ( )
{
2011-02-20 06:13:26 +00:00
SMSController [ 0 ] = new SMSControllerTemplate ( true ) ;
SMSController [ 1 ] = new SMSControllerTemplate ( false ) ;
PCEController [ 0 ] = new PCEControllerTemplate ( true ) ;
PCEController [ 1 ] = new PCEControllerTemplate ( false ) ;
PCEController [ 2 ] = new PCEControllerTemplate ( false ) ;
PCEController [ 3 ] = new PCEControllerTemplate ( false ) ;
PCEController [ 4 ] = new PCEControllerTemplate ( false ) ;
2011-02-20 07:16:34 +00:00
NESController [ 0 ] = new NESControllerTemplate ( true ) ;
NESController [ 1 ] = new NESControllerTemplate ( false ) ;
NESController [ 2 ] = new NESControllerTemplate ( false ) ;
NESController [ 3 ] = new NESControllerTemplate ( false ) ;
2011-04-24 02:01:36 +00:00
TI83Controller [ 0 ] = new TI83ControllerTemplate ( true ) ;
2011-02-19 20:31:32 +00:00
}
2011-01-11 02:55:51 +00:00
// General Client Settings
2011-01-26 05:06:44 +00:00
public int TargetZoomFactor = 2 ;
2011-01-11 02:55:51 +00:00
public string LastRomPath = "." ;
2011-01-18 01:55:01 +00:00
public bool AutoLoadMostRecentRom = false ; //TODO: eventually make a class or struct for all the auto-loads, which will include recent roms, movies, etc, as well as autoloading any modeless dialog
2011-01-18 03:40:53 +00:00
public RecentFiles RecentRoms = new RecentFiles ( 8 ) ;
2011-02-15 17:04:07 +00:00
public bool PauseWhenMenuActivated = true ;
2011-02-18 05:12:23 +00:00
public bool SaveWindowPosition = true ;
2011-02-18 05:16:21 +00:00
public bool StartPaused = false ;
2011-02-18 02:10:46 +00:00
public int MainWndx = - 1 ; //Negative numbers will be ignored
public int MainWndy = - 1 ;
2011-01-11 02:55:51 +00:00
2011-02-21 09:48:53 +00:00
// Run-Control settings
public int FrameProgressDelayMs = 500 ; //how long until a frame advance hold turns into a frame progress?
public int FrameSkip = 0 ;
public int SpeedPercent = 100 ;
public bool LimitFramerate = true ;
public bool AutoMinimizeSkipping = true ;
public bool DisplayVSync = false ;
2011-03-01 09:32:12 +00:00
public bool RewindEnabled = true ;
2011-02-21 09:48:53 +00:00
2011-02-15 16:41:03 +00:00
// Display options
2011-04-21 23:11:06 +00:00
public int MessagesColor = - 1 ;
2011-02-15 16:41:03 +00:00
public bool DisplayFPS = false ;
2011-03-20 14:08:35 +00:00
public int DispFPSx = 0 ;
public int DispFPSy = 0 ;
2011-02-15 16:41:03 +00:00
public bool DisplayFrameCounter = false ;
2011-03-20 14:08:35 +00:00
public int DispFrameCx = 0 ;
public int DispFrameCy = 12 ;
2011-02-15 16:41:03 +00:00
public bool DisplayLagCounter = false ;
2011-03-20 14:08:35 +00:00
public int DispLagx = 0 ;
public int DispLagy = 36 ;
2011-02-15 16:41:03 +00:00
public bool DisplayInput = false ;
2011-03-20 14:08:35 +00:00
public int DispInpx = 0 ;
public int DispInpy = 24 ;
2011-03-21 00:54:30 +00:00
public bool ForceGDI = false ;
2011-02-15 16:41:03 +00:00
2011-02-15 20:18:12 +00:00
// Sound options
public bool SoundEnabled = true ;
public bool MuteFrameAdvance = true ;
2011-04-07 00:40:33 +00:00
// Lua Console
public RecentFiles RecentLua = new RecentFiles ( 8 ) ;
2011-04-09 00:08:27 +00:00
public bool AutoLoadLua = false ;
public bool LuaConsoleSaveWindowPosition = true ;
public int LuaConsoleWndx = - 1 ; //Negative numbers will be ignored even with save window position set
public int LuaConsoleWndy = - 1 ;
public int LuaConsoleWidth = - 1 ;
public int LuaConsoleHeight = - 1 ;
2011-04-07 00:40:33 +00:00
2011-01-19 04:18:33 +00:00
// RamWatch Settings
public bool AutoLoadRamWatch = false ;
public RecentFiles RecentWatches = new RecentFiles ( 8 ) ;
2011-02-21 17:29:47 +00:00
public bool RamWatchSaveWindowPosition = true ;
2011-01-20 00:40:23 +00:00
public int RamWatchWndx = - 1 ; //Negative numbers will be ignored even with save window position set
public int RamWatchWndy = - 1 ;
2011-04-09 00:08:27 +00:00
public int RamWatchWidth = - 1 ;
2011-02-24 16:34:41 +00:00
public int RamWatchHeight = - 1 ;
public bool RamWatchShowChangeColumn = true ;
public bool RamWatchShowPrevColumn = false ;
2011-02-24 16:51:31 +00:00
public bool RamWatchShowChangeFromPrev = true ;
2011-03-18 18:13:24 +00:00
public int RamWatchAddressWidth = - 1 ;
public int RamWatchValueWidth = - 1 ;
public int RamWatchPrevWidth = - 1 ;
public int RamWatchChangeWidth = - 1 ;
public int RamWatchNotesWidth = - 1 ;
2011-01-19 04:18:33 +00:00
2011-01-28 03:52:43 +00:00
// RamSearch Settings
public bool AutoLoadRamSearch = false ;
2011-02-21 17:29:47 +00:00
public bool RamSearchSaveWindowPosition = true ;
2011-02-21 04:22:54 +00:00
public RecentFiles RecentSearches = new RecentFiles ( 8 ) ;
2011-02-18 19:53:41 +00:00
public int RamSearchWndx = - 1 ; //Negative numbers will be ignored even with save window position set
public int RamSearchWndy = - 1 ;
public int RamSearchWidth = - 1 ; //Negative numbers will be ignored
2011-02-21 18:03:19 +00:00
public int RamSearchHeight = - 1 ;
public int RamSearchPreviousAs = 0 ;
2011-02-22 16:06:28 +00:00
public bool RamSearchPreviewMode = true ;
2011-02-23 04:16:39 +00:00
public bool AlwaysExludeRamWatch = false ;
2011-01-28 03:52:43 +00:00
2011-03-06 15:25:21 +00:00
// HexEditor Settings
public bool AutoLoadHexEditor = false ;
public bool HexEditorSaveWindowPosition = true ;
public int HexEditorWndx = - 1 ; //Negative numbers will be ignored even with save window position set
public int HexEditorWndy = - 1 ;
public int HexEditorWidth = - 1 ;
public int HexEditorHeight = - 1 ;
2011-03-28 15:47:33 +00:00
// NESPPU Settings
2011-03-16 14:37:01 +00:00
public bool AutoLoadNESPPU = false ;
2011-03-08 19:05:23 +00:00
public bool NESPPUSaveWindowPosition = true ;
public int NESPPUWndx = - 1 ;
public int NESPPUWndy = - 1 ;
2011-03-28 15:47:33 +00:00
// NESDebuger Settings
public bool AutoLoadNESDebugger = false ;
public bool NESDebuggerSaveWindowPosition = true ;
public int NESDebuggerWndx = - 1 ;
public int NESDebuggerWndy = - 1 ;
public int NESDebuggerWidth = - 1 ;
public int NESDebuggerHeight = - 1 ;
2011-03-30 00:09:07 +00:00
// NESNameTableViewer Settings
public bool AutoLoadNESNameTable = false ;
public bool NESNameTableSaveWindowPosition = true ;
public int NESNameTableWndx = - 1 ;
public int NESNameTableWndy = - 1 ;
2011-03-16 14:37:01 +00:00
// Cheats Dialog
public bool AutoLoadCheats = false ;
public bool CheatsSaveWindowPosition = true ;
2011-03-20 20:25:17 +00:00
public bool DisableCheatsOnLoad = false ;
2011-03-20 21:37:01 +00:00
public bool LoadCheatFileByGame = true ;
2011-03-21 00:03:40 +00:00
public bool CheatsAutoSaveOnClose = true ;
2011-03-16 14:37:01 +00:00
public RecentFiles RecentCheats = new RecentFiles ( 8 ) ;
public int CheatsWndx = - 1 ;
public int CheatsWndy = - 1 ;
public int CheatsWidth = - 1 ;
public int CheatsHeight = - 1 ;
2011-03-17 17:43:57 +00:00
public int CheatsNameWidth = - 1 ;
public int CheatsAddressWidth = - 1 ;
public int CheatsValueWidth = - 1 ;
public int CheatsDomainWidth = - 1 ;
public int CheatsOnWidth = - 1 ;
2011-03-16 14:37:01 +00:00
2011-03-19 01:10:03 +00:00
// NES Game Genie Encoder/Decoder
public bool NESGGAutoload = false ;
public bool NESGGSaveWindowPosition = true ;
public int NESGGWndx = - 1 ;
public int NESGGWndy = - 1 ;
2011-02-11 02:30:45 +00:00
//Movie Settings
public RecentFiles RecentMovies = new RecentFiles ( 8 ) ;
2011-04-25 01:28:48 +00:00
//TI83
public bool TI83disableSaveSlotKeys = true ;
public bool TI83autoloadKeyPad = true ;
public bool TI83KeypadSaveWindowPosition = true ;
public int TI83KeyPadWndx = - 1 ;
public int TI83KeyPadWndy = - 1 ;
2011-01-11 02:55:51 +00:00
// Client Hotkey Bindings
2011-02-15 20:51:07 +00:00
public string HardResetBinding = "LeftShift+Tab" ; //TODO: This needs to be Ctrl+R but how?
public string FastForwardBinding = "J1 B6, Tab" ;
public string RewindBinding = "J1 B5, LeftShift+R, RightShift+R" ;
2011-01-28 06:46:33 +00:00
public string EmulatorPauseBinding = "Pause" ;
2011-01-11 02:55:51 +00:00
public string FrameAdvanceBinding = "F" ;
public string ScreenshotBinding = "F12" ;
2011-01-29 08:42:35 +00:00
public string ToggleFullscreenBinding = "LeftAlt+Return, RightAlt+Return" ;
2011-02-15 17:15:51 +00:00
public string QuickSave = "I" ;
public string QuickLoad = "P" ;
2011-02-15 17:38:30 +00:00
public string SelectSlot0 = "0" ;
public string SelectSlot1 = "1" ;
public string SelectSlot2 = "2" ;
public string SelectSlot3 = "3" ;
public string SelectSlot4 = "4" ;
public string SelectSlot5 = "5" ;
public string SelectSlot6 = "6" ;
public string SelectSlot7 = "7" ;
public string SelectSlot8 = "8" ;
public string SelectSlot9 = "9" ;
2011-02-20 04:31:21 +00:00
public string SaveSlot0 = "LeftShift+F10" ;
public string SaveSlot1 = "LeftShift+F1" ;
public string SaveSlot2 = "LeftShift+F2" ;
public string SaveSlot3 = "LeftShift+F3" ;
public string SaveSlot4 = "LeftShift+F4" ;
public string SaveSlot5 = "LeftShift+F5" ;
public string SaveSlot6 = "LeftShift+F6" ;
public string SaveSlot7 = "LeftShift+F7" ;
public string SaveSlot8 = "LeftShift+F8" ;
public string SaveSlot9 = "LeftShift+F9" ;
public string LoadSlot0 = "F10" ;
public string LoadSlot1 = "F1" ;
public string LoadSlot2 = "F2" ;
public string LoadSlot3 = "F3" ;
public string LoadSlot4 = "F4" ;
public string LoadSlot5 = "F5" ;
public string LoadSlot6 = "F6" ;
public string LoadSlot7 = "F7" ;
public string LoadSlot8 = "F8" ;
public string LoadSlot9 = "F9" ;
2011-04-07 01:30:42 +00:00
public string ToolBox = "T" ;
2011-04-10 23:07:39 +00:00
public string SaveNamedState = "" ;
public string LoadNamedState = "" ;
2011-04-11 00:43:28 +00:00
public string PreviousSlot = "" ;
public string NextSlot = "" ;
2011-04-11 01:30:11 +00:00
public string RamWatch = "" ;
public string RamSearch = "" ;
public string RamPoke = "" ;
public string HexEditor = "" ;
public string LuaConsole = "" ;
public string Cheats = "" ;
2011-04-17 18:19:51 +00:00
public string OpenROM = "LeftControl+O" ;
public string CloseROM = "LeftControl+W" ;
2011-04-16 20:12:16 +00:00
public string FrameCounterBinding = "" ;
public string FPSBinding = "" ;
public string LagCounterBinding = "" ;
public string InputDisplayBinding = "" ;
2011-02-20 02:59:15 +00:00
2011-01-11 02:55:51 +00:00
// SMS / GameGear Settings
2011-01-28 06:46:33 +00:00
public bool SmsEnableFM = true ;
public bool SmsAllowOverlock = false ;
2011-02-14 05:02:26 +00:00
public bool SmsForceStereoSeparation = false ;
2011-02-19 20:31:32 +00:00
2011-02-20 06:13:26 +00:00
public string SmsReset = "Tab" ;
2011-01-11 02:55:51 +00:00
public string SmsPause = "J1 B10, Space" ;
2011-02-19 20:31:32 +00:00
public SMSControllerTemplate [ ] SMSController = new SMSControllerTemplate [ 2 ] ;
2011-01-11 02:55:51 +00:00
// PCEngine Settings
2011-02-19 21:27:10 +00:00
public PCEControllerTemplate [ ] PCEController = new PCEControllerTemplate [ 5 ] ;
2011-01-11 02:55:51 +00:00
// Genesis Settings
public string GenP1Up = "J1 Up, UpArrow" ;
public string GenP1Down = "J1 Down, DownArrow" ;
public string GenP1Left = "J1 Left, LeftArrow" ;
public string GenP1Right = "J1 Right, RightArrow" ;
public string GenP1A = "J1 B1, Z" ;
public string GenP1B = "J1 B2, X" ;
public string GenP1C = "J1 B9, C" ;
2011-02-19 22:07:52 +00:00
public string GenP1Start = "J1 B10, Return" ;
//GameBoy Settings
2011-02-20 07:16:34 +00:00
public NESControllerTemplate GameBoyController = new NESControllerTemplate ( true ) ;
2011-04-24 02:01:36 +00:00
//NES settings
public string NESReset = "Backspace" ;
2011-02-20 07:16:34 +00:00
public NESControllerTemplate [ ] NESController = new NESControllerTemplate [ 4 ] ;
2011-04-24 02:01:36 +00:00
//TI 83 settings
public TI83ControllerTemplate [ ] TI83Controller = new TI83ControllerTemplate [ 1 ] ;
2011-01-11 02:55:51 +00:00
}
2011-02-19 22:07:52 +00:00
2011-02-19 20:31:32 +00:00
public class SMSControllerTemplate
{
public string Up ;
public string Down ;
public string Left ;
public string Right ;
public string B1 ;
public string B2 ;
2011-02-20 15:25:00 +00:00
public bool Enabled ;
2011-02-20 06:13:26 +00:00
public SMSControllerTemplate ( ) { }
public SMSControllerTemplate ( bool defaults )
2011-02-19 20:31:32 +00:00
{
2011-02-20 06:13:26 +00:00
if ( defaults )
2011-02-20 03:51:18 +00:00
{
2011-02-20 15:25:00 +00:00
Enabled = true ;
2011-02-20 06:52:39 +00:00
Up = "J1 Up, UpArrow" ;
Down = "J1 Down, DownArrow" ;
Left = "J1 Left, LeftArrow" ;
2011-02-20 06:13:26 +00:00
Right = "J1 Right, RightArrow" ;
2011-02-20 06:52:39 +00:00
B1 = "J1 B1, Z" ;
B2 = "J1 B2, X" ;
2011-02-20 03:51:18 +00:00
}
2011-02-20 06:52:39 +00:00
else
{
2011-02-20 15:25:00 +00:00
Enabled = false ;
2011-02-20 06:52:39 +00:00
Up = "" ;
Down = "" ;
Right = "" ;
Left = "" ;
B1 = "" ;
B2 = "" ;
}
2011-02-19 20:31:32 +00:00
}
}
2011-02-20 06:13:26 +00:00
2011-02-19 21:27:10 +00:00
public class PCEControllerTemplate
{
public string Up ;
public string Down ;
public string Left ;
public string Right ;
public string I ;
public string II ;
public string Run ;
public string Select ;
2011-02-20 15:25:00 +00:00
public bool Enabled ;
2011-02-20 06:13:26 +00:00
public PCEControllerTemplate ( ) { }
public PCEControllerTemplate ( bool defaults )
2011-02-19 21:27:10 +00:00
{
2011-02-20 06:13:26 +00:00
if ( defaults )
2011-02-20 03:51:18 +00:00
{
2011-02-20 15:25:00 +00:00
Enabled = true ;
2011-02-20 06:52:39 +00:00
Up = "J1 Up, UpArrow" ;
Down = "J1 Down, DownArrow" ;
Left = "J1 Left, LeftArrow" ;
Right = "J1 Right, RightArrow" ;
I = "J1 B1, Z" ;
II = "J1 B2, X" ;
Run = "J1 B10, C" ;
Select = "J1 B9, V" ;
}
else
{
2011-02-20 15:25:00 +00:00
Enabled = false ;
2011-02-20 06:52:39 +00:00
Up = "" ;
Down = "" ;
Right = "" ;
Left = "" ;
I = "" ;
II = "" ;
Run = "" ;
Select = "" ;
2011-02-20 03:51:18 +00:00
}
2011-02-19 21:27:10 +00:00
}
}
2011-02-20 06:13:26 +00:00
2011-02-19 22:07:52 +00:00
public class NESControllerTemplate
{
public string Up ;
public string Down ;
public string Left ;
public string Right ;
public string A ;
public string B ;
public string Start ;
public string Select ;
2011-02-20 15:25:00 +00:00
public bool Enabled ;
2011-02-20 07:16:34 +00:00
public NESControllerTemplate ( ) { }
public NESControllerTemplate ( bool defaults )
2011-02-19 22:07:52 +00:00
{
2011-02-20 07:16:34 +00:00
if ( defaults )
{
2011-02-20 15:25:00 +00:00
Enabled = true ;
2011-02-20 07:16:34 +00:00
Up = "J1 Up, UpArrow" ;
Down = "J1 Down, DownArrow" ;
Left = "J1 Left, LeftArrow" ;
Right = "J1 Right, RightArrow" ;
2011-03-07 10:41:46 +00:00
A = "J1 B1, X" ;
B = "J1 B2, Z" ;
2011-02-20 07:16:34 +00:00
Start = "J1 B10, Return" ;
Select = "J1 B9, Space" ;
}
else
{
2011-02-20 15:25:00 +00:00
Enabled = false ;
2011-02-20 07:16:34 +00:00
Up = "" ;
Down = "" ;
Right = "" ;
Left = "" ;
A = "" ;
B = "" ;
Start = "" ;
Select = "" ;
}
2011-02-19 22:07:52 +00:00
}
}
2011-04-24 02:01:36 +00:00
public class TI83ControllerTemplate
{
public string _0 ;
public string _1 ;
public string _2 ;
public string _3 ;
public string _4 ;
public string _5 ;
public string _6 ;
public string _7 ;
public string _8 ;
public string _9 ;
public string DOT ;
public string ON ;
public string ENTER ;
public string DOWN ;
public string UP ;
public string LEFT ;
public string RIGHT ;
public string PLUS ;
public string MINUS ;
public string MULTIPLY ;
public string DIVIDE ;
public string CLEAR ;
2011-04-24 13:26:26 +00:00
public string EXP ;
public string DASH ;
public string PARACLOSE ;
public string TAN ;
public string VARS ;
public string PARAOPEN ;
public string COS ;
public string PRGM ;
public string STAT ;
public string SIN ;
public string MATRIX ;
public string X ;
public string STO ;
public string LN ;
public string LOG ;
public string SQUARED ;
public string NEG1 ;
public string MATH ;
public string ALPHA ;
public string GRAPH ;
public string TRACE ;
public string ZOOM ;
public string WINDOW ;
public string Y ;
public string SECOND ;
public string MODE ;
public string DEL ;
2011-04-24 02:01:36 +00:00
public TI83ControllerTemplate ( ) { }
public bool Enabled ;
2011-04-24 16:57:43 +00:00
public string COMMA ;
2011-04-24 02:01:36 +00:00
public TI83ControllerTemplate ( bool defaults )
{
if ( defaults )
{
Enabled = true ;
2011-04-24 16:57:43 +00:00
_0 = "NumberPad0" ; //0
_1 = "NumberPad1" ; //1
_2 = "NumberPad2" ; //2
_3 = "NumberPad3" ; //3
_4 = "NumberPad4" ; //4
_5 = "NumberPad5" ; //5
_6 = "NumberPad6" ; //6
_7 = "NumberPad7" ; //7
_8 = "NumberPad8" ; //8
_9 = "NumberPad9" ; //9
DOT = "NumberPadPeriod" ; //10
ON = "Space" ; //11
ENTER = "Return" ; //12
UP = "UpArrow" ; //13
DOWN = "DownArrow" ; //14
LEFT = "LeftArrow" ; //15
RIGHT = "RightArrow" ; //16
PLUS = "NumberPadPlus" ; //17
MINUS = "NumberPadMinus" ; //18
MULTIPLY = "NumberPadStar" ; //19
DIVIDE = "NumberPadSlash" ; //20
CLEAR = "Escape" ; //21
EXP = "6" ; //22
DASH = "Minus" ; //23
PARACLOSE = "0" ; //24
PARAOPEN = "9" ; //25
TAN = "T" ; //26
VARS = "V" ; //27
COS = "C" ; //28
PRGM = "R" ; //29
STAT = "S" ; //30
MATRIX = "LeftBracket" ; //31
X = "X" ; //32
STO = "Insert" ; //33
LN = "L" ; //34
LOG = "O" ; //35
SQUARED = "2" ; //36
NEG1 = "1" ; //37
MATH = "M" ; //38
ALPHA = "A" ; //39
GRAPH = "G" ; //40
TRACE = "Home" ; //41
ZOOM = "Z" ; //42
WINDOW = "W" ; //43
Y = "Y" ; //44
SECOND = "Slash" ; //45
MODE = "BackSlash" ; //46
DEL = "Delete" ; //47
COMMA = "Comma" ; //48
SIN = "Period" ; //49
2011-04-24 02:01:36 +00:00
}
else
{
Enabled = false ;
_0 = "" ;
_1 = "" ;
_2 = "" ;
_3 = "" ;
_4 = "" ;
_5 = "" ;
_6 = "" ;
_7 = "" ;
_8 = "" ;
_9 = "" ;
DOT = "" ;
ON = "" ;
ENTER = "" ;
UP = "" ;
DOWN = "" ;
LEFT = "" ;
RIGHT = "" ;
PLUS = "" ;
MINUS = "" ;
MULTIPLY = "" ;
DIVIDE = "" ;
CLEAR = "" ;
2011-04-24 13:26:26 +00:00
EXP = "" ;
DASH = "" ;
PARACLOSE = "" ;
TAN = "" ;
VARS = "" ;
PARAOPEN = "" ;
COS = "" ;
PRGM = "" ;
STAT = "" ;
SIN = "" ;
MATRIX = "" ;
X = "" ;
STO = "" ;
LN = "" ;
LOG = "" ;
SQUARED = "" ;
NEG1 = "" ;
MATH = "" ;
ALPHA = "" ;
GRAPH = "" ;
TRACE = "" ;
ZOOM = "" ;
WINDOW = "" ;
Y = "" ;
SECOND = "" ;
MODE = "" ;
DEL = "" ;
2011-04-24 16:57:43 +00:00
COMMA = "" ;
2011-04-24 02:01:36 +00:00
}
}
}
2011-01-11 02:55:51 +00:00
}