From ba9157ef6832844d84bc8088b9db88dc45982364 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Fri, 10 Oct 2008 12:00:49 +0000 Subject: [PATCH] Add the Game Fix, Speed Hack, and Advanced Dialogs to the Linux port. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@186 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/Linux/Config.c | 18 + pcsx2/Linux/GtkGui.c | 959 ++++++++++------- pcsx2/Linux/Linux.h | 60 +- pcsx2/Linux/LnxMain.c | 467 ++++----- pcsx2/Linux/callbacks.h | 65 +- pcsx2/Linux/interface.c | 988 ++++++++++++++---- pcsx2/Linux/interface.h | 20 +- pcsx2/Linux/pcsx2.glade | 2188 ++++++++++++++++++++++++++++----------- pcsx2/Linux/support.c | 17 - pcsx2/Linux/support.h | 17 - pcsx2/build.sh | 2 + 11 files changed, 3251 insertions(+), 1550 deletions(-) diff --git a/pcsx2/Linux/Config.c b/pcsx2/Linux/Config.c index f569ed94cc..ae0b80b50a 100644 --- a/pcsx2/Linux/Config.c +++ b/pcsx2/Linux/Config.c @@ -88,6 +88,17 @@ int LoadConfig() { // cpu GetValuel("Options", Config.Options); + //hacks + GetValuel("Hacks", Config.Hacks); + GetValuel("Fixes", Config.GameFixes); + + Config.sseMXCSR = DEFAULT_sseMXCSR; + Config.sseVUMXCSR = DEFAULT_sseVUMXCSR; + + //sseMXCSR + GetValuel("sseMXCSR", Config.sseMXCSR); + //sseVUMXCSR + GetValuel("sseVUMXCSR", Config.sseVUMXCSR); GetValuel("Patch", Config.Patch); @@ -137,6 +148,13 @@ void SaveConfig() { SetValue("FW", Config.FW); //cpu SetValuel("Options", Config.Options); + //hacks + SetValuel("Hacks", Config.Hacks); + SetValuel("Fixes", Config.GameFixes); + //sseMXCSR + SetValuel("sseMXCSR", Config.sseMXCSR); + //sseVUMXCSR + SetValuel("sseVUMXCSR", Config.sseVUMXCSR); // misc SetValuel("Patch", Config.Patch); diff --git a/pcsx2/Linux/GtkGui.c b/pcsx2/Linux/GtkGui.c index 5d8a71957a..98c225b94d 100644 --- a/pcsx2/Linux/GtkGui.c +++ b/pcsx2/Linux/GtkGui.c @@ -15,107 +15,39 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include #include "support.h" #include "callbacks.h" #include "interface.h" #include "Linux.h" - -#include "Paths.h" - - -static int needReset = 1; -int confret; -int confplug=0; -extern int RunExe; - -_PS2EgetLibType PS2EgetLibType = NULL; -_PS2EgetLibVersion2 PS2EgetLibVersion2 = NULL; -_PS2EgetLibName PS2EgetLibName = NULL; - -// Helper Functions -void FindPlugins(); - -// Functions Callbacks -void OnFile_LoadElf(GtkMenuItem *menuitem, gpointer user_data); -void OnFile_Exit(GtkMenuItem *menuitem, gpointer user_data); -void OnEmu_Run(GtkMenuItem *menuitem, gpointer user_data); -void OnEmu_Reset(GtkMenuItem *menuitem, gpointer user_data); -void OnEmu_Arguments(GtkMenuItem *menuitem, gpointer user_data); -void OnConf_Gs(GtkMenuItem *menuitem, gpointer user_data); -void OnConf_Pads(GtkMenuItem *menuitem, gpointer user_data); -void OnConf_Cpu(GtkMenuItem *menuitem, gpointer user_data); -void OnConf_Conf(GtkMenuItem *menuitem, gpointer user_data); -void OnLanguage(GtkMenuItem *menuitem, gpointer user_data); -void OnHelp_Help(); -void OnHelp_About(GtkMenuItem *menuitem, gpointer user_data); - -GtkWidget *Window; -GtkWidget* pStatusBar = NULL; -GtkWidget *CmdLine; //2002-09-28 (Florin) -GtkWidget *ConfDlg; -GtkWidget *AboutDlg; -GtkWidget *DebugWnd; -GtkWidget *LogDlg; -GtkWidget *FileSel; - -GtkAccelGroup *AccelGroup; - -typedef struct { - GtkWidget *Combo; - GList *glist; - char plist[255][255]; - int plugins; -} PluginConf; - -PluginConf GSConfS; -PluginConf PAD1ConfS; -PluginConf PAD2ConfS; -PluginConf SPU2ConfS; -PluginConf CDVDConfS; -PluginConf DEV9ConfS; -PluginConf USBConfS; -PluginConf FWConfS; -PluginConf BiosConfS; +#include "GtkGui.h" +#include "R3000A.h" +#include "PsxMem.h" void StartGui() { GtkWidget *Menu; GtkWidget *Item; - GtkWidget* vbox; + GtkWidget* vbox; int i; - add_pixmap_directory(".pixmaps"); - + add_pixmap_directory(".pixmaps"); Window = create_MainWindow(); - + #ifdef PCSX2_VIRTUAL_MEM - gtk_window_set_title(GTK_WINDOW(Window), "PCSX2 "PCSX2_VERSION" Watermoose VM"); + gtk_window_set_title(GTK_WINDOW(Window), "PCSX2 "PCSX2_VERSION" Watermoose VM"); #else - gtk_window_set_title(GTK_WINDOW(Window), "PCSX2 "PCSX2_VERSION" Watermoose"); + gtk_window_set_title(GTK_WINDOW(Window), "PCSX2 "PCSX2_VERSION" Watermoose"); #endif - // status bar - pStatusBar = gtk_statusbar_new (); - gtk_box_pack_start (GTK_BOX(lookup_widget(Window, "status_box")), pStatusBar, TRUE, TRUE, 0); - gtk_widget_show (pStatusBar); + // status bar + pStatusBar = gtk_statusbar_new (); + gtk_box_pack_start (GTK_BOX(lookup_widget(Window, "status_box")), pStatusBar, TRUE, TRUE, 0); + gtk_widget_show (pStatusBar); - gtk_statusbar_push(GTK_STATUSBAR(pStatusBar),0, + gtk_statusbar_push(GTK_STATUSBAR(pStatusBar),0, "F1 - save, F2 - next state, Shift+F2 - prev state, F3 - load, F8 - snapshot"); - // add all the languages + // add all the languages Item = lookup_widget(Window, "GtkMenuItem_Language"); Menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(Item), Menu); @@ -133,12 +65,17 @@ void StartGui() { (gpointer)(uptr)i); } - // check the appropriate menu items - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(Window, "enable_console1")), Config.PsxOut); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(Window, "enable_patches1")), Config.Patch); - + // check the appropriate menu items + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(Window, "enable_console1")), Config.PsxOut); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(Window, "enable_patches1")), Config.Patch); + + // disable anything not implemented or not working properly. + gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(Window, "patch_browser1")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(Window, "patch_finder2")), FALSE); + //gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(Window, "GtkMenuItem_Advanced")), FALSE); + gtk_widget_show_all(Window); - gtk_window_activate_focus(GTK_WINDOW(Window)); + gtk_window_activate_focus(GTK_WINDOW(Window)); gtk_main(); } @@ -146,29 +83,27 @@ void RunGui() { StartGui(); } -int destroy=0; - void OnDestroy(GtkObject *object, gpointer user_data) { if (!destroy) OnFile_Exit(NULL, user_data); } int Pcsx2Configure() { - if (!UseGui) return 0; - confplug = 1; + if (!UseGui) + return 0; + + configuringplug = TRUE; Window = NULL; OnConf_Conf(NULL, 0); - confplug = 0; - return confret; + configuringplug = FALSE; + + return applychanges; } -int efile=0; -char elfname[256]; - void OnLanguage(GtkMenuItem *menuitem, gpointer user_data) { ChangeLanguage(langs[(int)(uptr)user_data].lang); - destroy=1; + destroy = TRUE; gtk_widget_destroy(Window); - destroy=0; + destroy = FALSE; gtk_main_quit(); while (gtk_events_pending()) gtk_main_iteration(); StartGui(); @@ -179,40 +114,36 @@ void SignalExit(int sig) { OnFile_Exit(NULL, 0); } -extern int g_ZeroGSOptions; void RunExecute(int run) { - if (needReset == 1) { + if (needReset == TRUE) { SysReset(); } - destroy=1; + destroy= TRUE; gtk_widget_destroy(Window); - destroy=0; + destroy=FALSE; gtk_main_quit(); while (gtk_events_pending()) gtk_main_iteration(); if (OpenPlugins(NULL) == -1) { - RunGui(); return; + RunGui(); + return; } signal(SIGINT, SignalExit); signal(SIGPIPE, SignalExit); - if (needReset == 1) { + if (needReset == TRUE) { - if( RunExe == 0 ) - cpuExecuteBios(); - if(!efile) - efile=GetPS2ElfName(elfname); - loadElfFile(elfname); + if( RunExe == 0 ) + cpuExecuteBios(); + if(!efile) + efile=GetPS2ElfName(elfname); + loadElfFile(elfname); - //if (efile == 2) - // efile=GetPS2ElfName(elfname); - //if (efile) - // loadElfFile(elfname); - RunExe = 0; - efile=0; - needReset = 0; + RunExe = 0; + efile = 0; + needReset = FALSE; } // this needs to be called for every new game! (note: sometimes launching games through bios will give a crc of 0) @@ -223,7 +154,7 @@ void RunExecute(int run) } void OnFile_RunCD(GtkMenuItem *menuitem, gpointer user_data) { - needReset = 1; + needReset = TRUE; efile = 0; RunExecute(1); } @@ -234,7 +165,7 @@ void OnRunElf_Ok(GtkButton* button, gpointer user_data) { File = (gchar*)gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); strcpy(elfname, File); gtk_widget_destroy(FileSel); - needReset = 1; + needReset = TRUE; efile = 1; RunExecute(1); } @@ -281,34 +212,41 @@ void OnFile_Exit(GtkMenuItem *menuitem, gpointer user_data) { } printf(_("PCSX2 Quitting\n")); - if (UseGui) gtk_main_quit(); - SysClose(); - if (UseGui) gtk_exit(0); - else exit(0); + + if (UseGui) + { + gtk_main_quit(); + SysClose(); + gtk_exit(0); + } + else + { + SysClose(); + exit(0); + } } void OnEmu_Run(GtkMenuItem *menuitem, gpointer user_data) { - if(needReset == 1) - RunExe = 1; - efile = 0; + if(needReset == TRUE) + RunExe = 1; + efile = 0; RunExecute(1); } void OnEmu_Reset(GtkMenuItem *menuitem, gpointer user_data) { - ResetPlugins(); - needReset = 1; - efile = 0; + ResetPlugins(); + needReset = TRUE; + efile = 0; } -int Slots[5] = { -1, -1, -1, -1, -1 }; - -void ResetMenuSlots(GtkMenuItem *menuitem, gpointer user_data) { + + void ResetMenuSlots(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *Item; char str[256]; int i; - + for (i=0; i<5; i++) { sprintf(str, "GtkMenuItem_LoadSlot%d", i+1); Item = lookup_widget(Window, str); @@ -317,11 +255,11 @@ void ResetMenuSlots(GtkMenuItem *menuitem, gpointer user_data) { else gtk_widget_set_sensitive(Item, TRUE); } -} + } void UpdateMenuSlots(GtkMenuItem *menuitem, gpointer user_data) { char str[256]; - int i; + int i = 0; for (i=0; i<5; i++) { sprintf(str, SSTATES_DIR "/%8.8X.%3.3d", ElfCRC, i); @@ -338,10 +276,6 @@ void States_Load(int num) { sprintf (Text, SSTATES_DIR "/%8.8X.%3.3d", ElfCRC, num); ret = LoadState(Text); -/* if (ret == 0) - sprintf (Text, _("*PCSX2*: Loaded State %d"), num+1); - else sprintf (Text, _("*PCSX2*: Error Loading State %d"), num+1); - GPU_displayText(Text);*/ Cpu->Execute(); } @@ -352,10 +286,10 @@ void States_Save(int num) { sprintf (Text, SSTATES_DIR "/%8.8X.%3.3d", ElfCRC, num); ret = SaveState(Text); - if (ret == 0) - sprintf(Text, _("*PCSX2*: Saving State %d"), num+1); - else sprintf(Text, _("*PCSX2*: Error Saving State %d"), num+1); - //StatusSet(Text); + if (ret == 0) + sprintf(Text, _("*PCSX2*: Saving State %d"), num+1); + else + sprintf(Text, _("*PCSX2*: Error Saving State %d"), num+1); RunExecute(1); } @@ -380,10 +314,6 @@ void OnLoadOther_Ok(GtkButton* button, gpointer user_data) { RunExecute(0); ret = LoadState(str); -/* if (ret == 0) - sprintf (Text, _("*PCSX*: Loaded State %s"), str); - else sprintf (Text, _("*PCSX*: Error Loading State %s"), str); - GPU_displayText(Text);*/ Cpu->Execute(); } @@ -428,10 +358,6 @@ void OnSaveOther_Ok(GtkButton* button, gpointer user_data) { RunExecute(0); ret = SaveState(str); -/* if (ret == 0) - sprintf (Text, _("*PCSX*: Saved State %s"), str); - else sprintf (Text, _("*PCSX*: Error Saving State %s"), str); - GPU_displayText(Text);*/ Cpu->Execute(); } @@ -460,10 +386,8 @@ void OnStates_SaveOther(GtkMenuItem *menuitem, gpointer user_data) { //2002-09-28 (Florin) void OnArguments_Ok(GtkButton *button, gpointer user_data) { - GtkWidget *widgetCmdLine; char *str; - widgetCmdLine = lookup_widget(CmdLine, "GtkEntry_dCMDLINE"); str = (char*)gtk_entry_get_text(GTK_ENTRY(widgetCmdLine)); memcpy(args, str, 256); @@ -485,6 +409,7 @@ void OnEmu_Arguments(GtkMenuItem *menuitem, gpointer user_data) { gtk_window_set_title(GTK_WINDOW(CmdLine), _("Program arguments")); widgetCmdLine = lookup_widget(CmdLine, "GtkEntry_dCMDLINE"); + gtk_entry_set_text(GTK_ENTRY(widgetCmdLine), args); //args exported by ElfHeader.h gtk_widget_show_all(CmdLine); @@ -495,40 +420,44 @@ void OnEmu_Arguments(GtkMenuItem *menuitem, gpointer user_data) { void OnConf_Gs(GtkMenuItem *menuitem, gpointer user_data) { - char file[255]; - getcwd(file, ARRAYSIZE(file)); - chdir(Config.PluginsDir); + char file[255]; + + getcwd(file, ARRAYSIZE(file)); + chdir(Config.PluginsDir); gtk_widget_set_sensitive(Window, FALSE); - GSconfigure(); - chdir(file); + GSconfigure(); + chdir(file); gtk_widget_set_sensitive(Window, TRUE); } void OnConf_Pads(GtkMenuItem *menuitem, gpointer user_data) { - char file[255]; - getcwd(file, ARRAYSIZE(file)); - chdir(Config.PluginsDir); + char file[255]; + + getcwd(file, ARRAYSIZE(file)); + chdir(Config.PluginsDir); gtk_widget_set_sensitive(Window, FALSE); PAD1configure(); if (strcmp(Config.PAD1, Config.PAD2)) PAD2configure(); - chdir(file); + chdir(file); gtk_widget_set_sensitive(Window, TRUE); } void OnConf_Spu2(GtkMenuItem *menuitem, gpointer user_data) { - char file[255]; - getcwd(file, ARRAYSIZE(file)); - chdir(Config.PluginsDir); + char file[255]; + + getcwd(file, ARRAYSIZE(file)); + chdir(Config.PluginsDir); gtk_widget_set_sensitive(Window, FALSE); SPU2configure(); gtk_widget_set_sensitive(Window, TRUE); - chdir(file); + chdir(file); } void OnConf_Cdvd(GtkMenuItem *menuitem, gpointer user_data) { - char file[255]; - getcwd(file, ARRAYSIZE(file)); - chdir(Config.PluginsDir); + char file[255]; + + getcwd(file, ARRAYSIZE(file)); + chdir(Config.PluginsDir); gtk_widget_set_sensitive(Window, FALSE); CDVDconfigure(); gtk_widget_set_sensitive(Window, TRUE); @@ -536,37 +465,38 @@ void OnConf_Cdvd(GtkMenuItem *menuitem, gpointer user_data) { } void OnConf_Dev9(GtkMenuItem *menuitem, gpointer user_data) { - char file[255]; - getcwd(file, ARRAYSIZE(file)); - chdir(Config.PluginsDir); + char file[255]; + + getcwd(file, ARRAYSIZE(file)); + chdir(Config.PluginsDir); gtk_widget_set_sensitive(Window, FALSE); DEV9configure(); gtk_widget_set_sensitive(Window, TRUE); - chdir(file); + chdir(file); } void OnConf_Usb(GtkMenuItem *menuitem, gpointer user_data) { - char file[255]; - getcwd(file, ARRAYSIZE(file)); - chdir(Config.PluginsDir); + char file[255]; + + getcwd(file, ARRAYSIZE(file)); + chdir(Config.PluginsDir); gtk_widget_set_sensitive(Window, FALSE); USBconfigure(); gtk_widget_set_sensitive(Window, TRUE); - chdir(file); + chdir(file); } void OnConf_Fw(GtkMenuItem *menuitem, gpointer user_data) { - char file[255]; - getcwd(file, ARRAYSIZE(file)); - chdir(Config.PluginsDir); + char file[255]; + + getcwd(file, ARRAYSIZE(file)); + chdir(Config.PluginsDir); gtk_widget_set_sensitive(Window, FALSE); FWconfigure(); gtk_widget_set_sensitive(Window, TRUE); - chdir(file); + chdir(file); } -GtkWidget *CpuDlg; - void OnCpu_Ok(GtkButton *button, gpointer user_data) { GtkWidget *Btn; long t; @@ -575,35 +505,34 @@ void OnCpu_Ok(GtkButton *button, gpointer user_data) { Cpu->Shutdown(); vu0Shutdown(); vu1Shutdown(); - - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_EERec"))) ) { + + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_EERec")))) newopts |= PCSX2_EEREC; - } - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_VU0rec"))) ) + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_VU0rec")))) newopts |= PCSX2_VU0REC; - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_VU1rec"))) ) + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_VU1rec")))) newopts |= PCSX2_VU1REC; - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_MTGS"))) ) + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_MTGS")))) newopts |= PCSX2_GSMULTITHREAD; - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_CpuDC"))) ) + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_CpuDC")))) newopts |= PCSX2_DUALCORE; - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitNormal"))) ) + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitNormal")))) newopts |= PCSX2_FRAMELIMIT_NORMAL; - else if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitLimit"))) ) + else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitLimit")))) newopts |= PCSX2_FRAMELIMIT_LIMIT; - else if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitFS"))) ) + else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitFS")))) newopts |= PCSX2_FRAMELIMIT_SKIP; - else if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_VUSkip"))) ) + else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_VUSkip")))) newopts |= PCSX2_FRAMELIMIT_VUSKIP; - if( (Config.Options&PCSX2_GSMULTITHREAD) ^ (newopts&PCSX2_GSMULTITHREAD) ) { + if ((Config.Options&PCSX2_GSMULTITHREAD) ^ (newopts&PCSX2_GSMULTITHREAD)) { Config.Options = newopts; SaveConfig(); - SysMessage("Restart Pcsx2"); + SysMessage("Restart Pcsx2"); exit(0); } - if( newopts & PCSX2_EEREC ) newopts |= PCSX2_COP2REC; + if (newopts & PCSX2_EEREC ) newopts |= PCSX2_COP2REC; Config.Options = newopts; @@ -611,9 +540,8 @@ void OnCpu_Ok(GtkButton *button, gpointer user_data) { SaveConfig(); cpuRestartCPU(); - + gtk_widget_destroy(CpuDlg); - if (Window) gtk_widget_set_sensitive(Window, TRUE); gtk_main_quit(); } @@ -628,67 +556,87 @@ void OnCpu_Cancel(GtkButton *button, gpointer user_data) { void OnConf_Cpu(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *Btn; - char str[512]; + char str[512]; CpuDlg = create_CpuDlg(); gtk_window_set_title(GTK_WINDOW(CpuDlg), _("Configuration")); - - if(!cpucaps.hasStreamingSIMDExtensions) { - Config.Options &= (PCSX2_VU0REC|PCSX2_VU1REC);//disable the config just in case - } - if(!cpucaps.hasMultimediaExtensions) { - Config.Options &= ~(PCSX2_EEREC|PCSX2_VU0REC|PCSX2_VU1REC|PCSX2_COP2REC);//return to interpreter mode - } - - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_EERec")), !!CHECK_EEREC); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_VU0rec")), !!CHECK_VU0REC); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_VU1rec")), !!CHECK_VU1REC); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_MTGS")), !!CHECK_MULTIGS); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_CpuDC")), !!CHECK_DUALCORE); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitNormal")), CHECK_FRAMELIMIT==PCSX2_FRAMELIMIT_NORMAL); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitLimit")), CHECK_FRAMELIMIT==PCSX2_FRAMELIMIT_LIMIT); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitFS")), CHECK_FRAMELIMIT==PCSX2_FRAMELIMIT_SKIP); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_VUSkip")), CHECK_FRAMELIMIT==PCSX2_FRAMELIMIT_VUSKIP); + + if(!cpucaps.hasStreamingSIMDExtensions) { + Config.Options &= (PCSX2_VU0REC|PCSX2_VU1REC);//disable the config just in case + } + if(!cpucaps.hasMultimediaExtensions) { + Config.Options &= ~(PCSX2_EEREC|PCSX2_VU0REC|PCSX2_VU1REC|PCSX2_COP2REC);//return to interpreter mode + } + + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_EERec")), !!CHECK_EEREC); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_VU0rec")), !!CHECK_VU0REC); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_VU1rec")), !!CHECK_VU1REC); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_MTGS")), !!CHECK_MULTIGS); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkCheckButton_CpuDC")), !!CHECK_DUALCORE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitNormal")), CHECK_FRAMELIMIT==PCSX2_FRAMELIMIT_NORMAL); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitLimit")), CHECK_FRAMELIMIT==PCSX2_FRAMELIMIT_LIMIT); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_LimitFS")), CHECK_FRAMELIMIT==PCSX2_FRAMELIMIT_SKIP); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(CpuDlg, "GtkRadioButton_VUSkip")), CHECK_FRAMELIMIT==PCSX2_FRAMELIMIT_VUSKIP); - sprintf(str, "Cpu Vendor: %s", cpuinfo.x86ID); - gtk_label_set_text(GTK_LABEL(lookup_widget(CpuDlg, "GtkLabel_CpuVendor")), str); - sprintf(str, "Familly: %s", cpuinfo.x86Fam); - gtk_label_set_text(GTK_LABEL(lookup_widget(CpuDlg, "GtkLabel_Family")), str); - sprintf(str, "Cpu Speed: %d MHZ", cpuinfo.cpuspeed); - gtk_label_set_text(GTK_LABEL(lookup_widget(CpuDlg, "GtkLabel_CpuSpeed")), str); + sprintf(str, "Cpu Vendor: %s", cpuinfo.x86ID); + gtk_label_set_text(GTK_LABEL(lookup_widget(CpuDlg, "GtkLabel_CpuVendor")), str); + sprintf(str, "Familly: %s", cpuinfo.x86Fam); + gtk_label_set_text(GTK_LABEL(lookup_widget(CpuDlg, "GtkLabel_Family")), str); + sprintf(str, "Cpu Speed: %d MHZ", cpuinfo.cpuspeed); + gtk_label_set_text(GTK_LABEL(lookup_widget(CpuDlg, "GtkLabel_CpuSpeed")), str); - strcpy(str,"Features: "); - if(cpucaps.hasMultimediaExtensions) strcat(str,"MMX"); - if(cpucaps.hasStreamingSIMDExtensions) strcat(str,",SSE"); - if(cpucaps.hasStreamingSIMD2Extensions) strcat(str,",SSE2"); - if(cpucaps.hasStreamingSIMD3Extensions) strcat(str,",SSE3"); - if(cpucaps.hasAMD64BitArchitecture) strcat(str,",x86-64"); - gtk_label_set_text(GTK_LABEL(lookup_widget(CpuDlg, "GtkLabel_Features")), str); + strcpy(str,"Features: "); + if(cpucaps.hasMultimediaExtensions) strcat(str,"MMX"); + if(cpucaps.hasStreamingSIMDExtensions) strcat(str,",SSE"); + if(cpucaps.hasStreamingSIMD2Extensions) strcat(str,",SSE2"); + if(cpucaps.hasStreamingSIMD3Extensions) strcat(str,",SSE3"); + if(cpucaps.hasAMD64BitArchitecture) strcat(str,",x86-64"); + gtk_label_set_text(GTK_LABEL(lookup_widget(CpuDlg, "GtkLabel_Features")), str); - //GtkLabel_CpuVendor - //GtkLabel_Family - //GtkLabel_CpuSpeed - //GtkLabel_Features gtk_widget_show_all(CpuDlg); if (Window) gtk_widget_set_sensitive(Window, FALSE); gtk_main(); } -#define FindComboText(combo,list,conf) \ - if (strlen(conf) > 0) { \ - int i; \ - for (i=2;i<255;i+=2) { \ - if (!strcmp(conf, list[i-2])) { \ - gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), list[i-1]); \ - break; \ - } \ - } \ +void SetActiveComboItem(GtkComboBox *widget,char plist[255][255], GList *list, char *conf) +{ + GList *temp; + int i = 0, pindex = 0, item = -1; + + if (strlen(conf) > 0) { + for (i=2;i<255;i+=2) { + if (!strcmp(conf, plist[i-2])) { + pindex = i - 1; + break; + } + } } + + i = 0; + temp = list; + + while (temp) + { + if (!strcmp(plist[pindex],temp->data)) + item = i; + + temp = temp->next; + i++; + } + + if (item <= 0) item = 0; + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), item); +} +#define FindComboText(combo,plist, list, conf) \ + if (strlen(conf) > 0) { \ + SetActiveComboItem(GTK_COMBO_BOX(combo), plist, list, conf); \ + } + #define GetComboText(combo,list,conf) \ { \ int i; \ - char *tmp = (char*)gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry)); \ + char *tmp = (char*)gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo)); \ for (i=2;i<255;i+=2) { \ if (!strcmp(tmp, list[i-1])) { \ strcpy(conf, list[i-2]); \ @@ -696,7 +644,7 @@ void OnConf_Cpu(GtkMenuItem *menuitem, gpointer user_data) } \ } \ } - + void OnConfConf_Ok(GtkButton *button, gpointer user_data) { GetComboText(GSConfS.Combo, GSConfS.plist, Config.GS) GetComboText(PAD1ConfS.Combo, PAD1ConfS.plist, Config.PAD1); @@ -710,23 +658,23 @@ void OnConfConf_Ok(GtkButton *button, gpointer user_data) { SaveConfig(); - if (confplug == 0) { + if (configuringplug == FALSE) { ReleasePlugins(); LoadPlugins(); } - needReset = 1; + needReset = TRUE; gtk_widget_destroy(ConfDlg); if (Window) gtk_widget_set_sensitive(Window, TRUE); gtk_main_quit(); - confret = 1; + applychanges = TRUE; } void OnConfConf_Cancel(GtkButton *button, gpointer user_data) { gtk_widget_destroy(ConfDlg); if (Window) gtk_widget_set_sensitive(Window, TRUE); gtk_main_quit(); - confret = 0; + applychanges = FALSE; } #define ConfPlugin(src, confs, plugin, name) \ @@ -860,91 +808,93 @@ void OnConfConf_FWAbout(GtkButton *button, gpointer user_data) { ConfPlugin(_FWabout, FWConfS, Config.FW, "FWabout"); } + +void SetComboToGList(GtkComboBox *widget, GList *list) +{ + GList *temp; + + while (gtk_combo_box_get_active_text(widget) != NULL) + { + gtk_combo_box_remove_text(GTK_COMBO_BOX(widget), 0); + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), 0); + } + + temp = list; + while (temp != NULL) + { + gtk_combo_box_append_text (GTK_COMBO_BOX (widget), temp->data); + + temp = temp->next; + } + + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), 0); +} + #define ConfCreatePConf(name, type) \ - type##ConfS.Combo = lookup_widget(ConfDlg, "GtkCombo_" name); \ - gtk_combo_set_popdown_strings(GTK_COMBO(type##ConfS.Combo), type##ConfS.glist); \ - FindComboText(type##ConfS.Combo, type##ConfS.plist, Config.type); \ + type##ConfS.Combo = lookup_widget(ConfDlg, "GtkCombo_" name); \ + SetComboToGList(GTK_COMBO_BOX(type##ConfS.Combo), type##ConfS.PluginNameList); \ + FindComboText(type##ConfS.Combo, type##ConfS.plist, type##ConfS.PluginNameList, Config.type); void UpdateConfDlg() { - FindPlugins(); + FindPlugins(); - ConfCreatePConf("Gs", GS); - ConfCreatePConf("Pad1", PAD1); - ConfCreatePConf("Pad2", PAD2); - ConfCreatePConf("Spu2", SPU2); - ConfCreatePConf("Cdvd", CDVD); - ConfCreatePConf("Dev9", DEV9); - ConfCreatePConf("Usb", USB); - ConfCreatePConf("FW", FW); - ConfCreatePConf("Bios", Bios); -} - -void OnPluginsPath_Ok() { - gchar *File; - - File = (gchar*)gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); - strcpy(Config.PluginsDir, File); - if (Config.PluginsDir[strlen(Config.PluginsDir)-1] != '/') - strcat(Config.PluginsDir, "/"); - - UpdateConfDlg(); - - gtk_widget_destroy(FileSel); -} - -void OnPluginsPath_Cancel() { - gtk_widget_destroy(FileSel); + ConfCreatePConf("Gs", GS); + ConfCreatePConf("Pad1", PAD1); + ConfCreatePConf("Pad2", PAD2); + ConfCreatePConf("Spu2", SPU2); + ConfCreatePConf("Cdvd", CDVD); + ConfCreatePConf("Dev9", DEV9); + ConfCreatePConf("Usb", USB); + ConfCreatePConf("FW", FW); + ConfCreatePConf("Bios", Bios); } void OnConfConf_PluginsPath(GtkButton *button, gpointer user_data) { - GtkWidget *Ok,*Cancel; - - FileSel = gtk_file_selection_new(_("Select Plugins Directory")); - - Ok = GTK_FILE_SELECTION(FileSel)->ok_button; - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnPluginsPath_Ok), NULL); - gtk_widget_show(Ok); - - Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; - gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnPluginsPath_Cancel), NULL); - gtk_widget_show(Cancel); - - gtk_widget_show(FileSel); - gdk_window_raise(FileSel->window); -} - -void OnBiosPath_Ok() { gchar *File; + GtkWidget *dialog; + gint result; + + dialog = gtk_file_chooser_dialog_new ("Choose the Plugin Directory:", GTK_WINDOW (ConfDlg), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); + result = gtk_dialog_run (GTK_DIALOG (dialog)); + + switch (result) + { + case (GTK_RESPONSE_OK): + File = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (dialog)); - File = (gchar*)gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); - strcpy(Config.BiosDir, File); - if (Config.BiosDir[strlen(Config.BiosDir)-1] != '/') - strcat(Config.BiosDir, "/"); - + strcpy(Config.PluginsDir, File); + if (Config.PluginsDir[strlen(Config.PluginsDir)-1] != '/') + strcat(Config.PluginsDir, "/"); + + default: + gtk_widget_destroy (dialog); + } + UpdateConfDlg(); - - gtk_widget_destroy(FileSel); -} - -void OnBiosPath_Cancel() { - gtk_widget_destroy(FileSel); } void OnConfConf_BiosPath(GtkButton *button, gpointer user_data) { - GtkWidget *Ok,*Cancel; + gchar *File; + GtkWidget *dialog; + gint result; + + dialog = gtk_file_chooser_dialog_new ("Choose the Bios Directory:", GTK_WINDOW (ConfDlg), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); + result = gtk_dialog_run (GTK_DIALOG (dialog)); + + switch (result) + { + case (GTK_RESPONSE_OK): + File = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (dialog)); - FileSel = gtk_file_selection_new(_("Select Bios Directory")); - - Ok = GTK_FILE_SELECTION(FileSel)->ok_button; - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnBiosPath_Ok), NULL); - gtk_widget_show(Ok); - - Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; - gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnBiosPath_Cancel), NULL); - gtk_widget_show(Cancel); - - gtk_widget_show(FileSel); - gdk_window_raise(FileSel->window); + strcpy(Config.BiosDir, File); + if (Config.PluginsDir[strlen(Config.BiosDir)-1] != '/') + strcat(Config.BiosDir, "/"); + + default: + gtk_widget_destroy (dialog); + } + + UpdateConfDlg(); } void OnConf_Conf(GtkMenuItem *menuitem, gpointer user_data) { @@ -960,25 +910,6 @@ void OnConf_Conf(GtkMenuItem *menuitem, gpointer user_data) { gtk_main(); } -GtkWidget *CmdLine; -GtkWidget *ListDV; -GtkListStore *ListDVModel; -GtkWidget *SetPCDlg, *SetPCEntry; -GtkWidget *SetBPADlg, *SetBPAEntry; -GtkWidget *SetBPCDlg, *SetBPCEntry; -GtkWidget *DumpCDlg, *DumpCTEntry, *DumpCFEntry; -GtkWidget *DumpRDlg, *DumpRTEntry, *DumpRFEntry; -GtkWidget *MemWriteDlg, *MemEntry, *DataEntry; -GtkAdjustment *DebugAdj; -static u32 dPC; -static u32 dBPA = -1; -static u32 dBPC = -1; -static char nullAddr[256]; -int DebugMode; // 0 - EE | 1 - IOP - -#include "R3000A.h" -#include "PsxMem.h" - void UpdateDebugger() { char *str; @@ -992,10 +923,16 @@ void UpdateDebugger() { u32 pc = dPC + i*4; if (DebugMode) { mem = (u32*)PSXM(pc); - } else + } + else mem = PSM(pc); - if (mem == NULL) { sprintf(nullAddr, "%8.8lX:\tNULL MEMORY", pc); str = nullAddr; } - else str = disR5900Fasm(*mem, pc); + + if (mem == NULL) { + sprintf(nullAddr, "%8.8lX:\tNULL MEMORY", pc); + str = nullAddr; + } + else + str = disR5900Fasm(*mem, pc); gtk_list_store_append(ListDVModel, &iter); gtk_list_store_set(ListDVModel, &iter, 0, str, -1); @@ -1038,7 +975,7 @@ void OnDebug_SetPC(GtkButton *button, gpointer user_data) { SetPCDlg = create_SetPCDlg(); SetPCEntry = lookup_widget(SetPCDlg, "GtkEntry_dPC"); - + gtk_widget_show_all(SetPCDlg); gtk_widget_set_sensitive(DebugWnd, FALSE); gtk_main(); @@ -1067,7 +1004,7 @@ void OnDebug_SetBPA(GtkButton *button, gpointer user_data) { SetBPAEntry = lookup_widget(SetBPADlg, "GtkEntry_BPA"); - gtk_widget_show_all(SetBPADlg); + gtk_widget_show_all(SetBPADlg); gtk_widget_set_sensitive(DebugWnd, FALSE); gtk_main(); } @@ -1094,7 +1031,7 @@ void OnDebug_SetBPC(GtkButton *button, gpointer user_data) { SetBPCEntry = lookup_widget(SetBPCDlg, "GtkEntry_BPC"); - gtk_widget_show_all(SetBPCDlg); + gtk_widget_show_all(SetBPCDlg); gtk_widget_set_sensitive(DebugWnd, FALSE); gtk_main(); } @@ -1121,25 +1058,30 @@ void OnDumpC_Ok(GtkButton *button, gpointer user_data) { if (DebugMode) { mem = PSXM(addrf); - } else { + } + else { mem = PSM(addrf); } - if (mem == NULL) { sprintf(nullAddr, "%8.8lX:\tNULL MEMORY", addrf); str = nullAddr; } - else str = disR5900Fasm(*mem, addrf); + + if (mem == NULL) { + sprintf(nullAddr, "%8.8lX:\tNULL MEMORY", addrf); + str = nullAddr; + } + else + str = disR5900Fasm(*mem, addrf); fprintf(f, "%s\n", str); addrf+= 4; } fclose(f); - gtk_widget_destroy(DumpCDlg); gtk_main_quit(); gtk_widget_set_sensitive(DebugWnd, TRUE); } void OnDumpC_Cancel(GtkButton *button, gpointer user_data) { - gtk_widget_destroy(DumpCDlg); +gtk_widget_destroy(DumpCDlg); gtk_main_quit(); gtk_widget_set_sensitive(DebugWnd, TRUE); } @@ -1150,7 +1092,7 @@ void OnDebug_DumpCode(GtkButton *button, gpointer user_data) { DumpCFEntry = lookup_widget(DumpCDlg, "GtkEntry_DumpCF"); DumpCTEntry = lookup_widget(DumpCDlg, "GtkEntry_DumpCT"); - gtk_widget_show_all(DumpCDlg); + gtk_widget_show_all(DumpCDlg); gtk_widget_set_sensitive(DebugWnd, FALSE); gtk_main(); } @@ -1184,7 +1126,6 @@ void OnDumpR_Ok(GtkButton *button, gpointer user_data) { } fclose(f); - gtk_widget_destroy(DumpRDlg); gtk_main_quit(); gtk_widget_set_sensitive(DebugWnd, TRUE); @@ -1202,7 +1143,7 @@ void OnDebug_RawDump(GtkButton *button, gpointer user_data) { DumpRFEntry = lookup_widget(DumpRDlg, "GtkEntry_DumpRF"); DumpRTEntry = lookup_widget(DumpRDlg, "GtkEntry_DumpRT"); - gtk_widget_show_all(DumpRDlg); + gtk_widget_show_all(DumpRDlg); gtk_widget_set_sensitive(DebugWnd, FALSE); gtk_main(); } @@ -1264,7 +1205,6 @@ void OnMemWrite32_Ok(GtkButton *button, gpointer user_data) { printf("memWrite32: %s, %s\n", mem, data); memWrite32(strtol(mem, (char**)NULL, 0), strtol(data, (char**)NULL, 0)); - gtk_widget_destroy(MemWriteDlg); gtk_main_quit(); gtk_widget_set_sensitive(DebugWnd, TRUE); @@ -1282,7 +1222,7 @@ void OnDebug_memWrite32(GtkButton *button, gpointer user_data) { MemEntry = lookup_widget(MemWriteDlg, "GtkEntry_Mem"); DataEntry = lookup_widget(MemWriteDlg, "GtkEntry_Data"); - gtk_widget_show_all(MemWriteDlg); + gtk_widget_show_all(MemWriteDlg); gtk_widget_set_sensitive(DebugWnd, FALSE); gtk_main(); @@ -1291,11 +1231,14 @@ void OnDebug_memWrite32(GtkButton *button, gpointer user_data) { void OnDebug_Debugger(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *scroll; - GtkCellRenderer *renderer; - GtkTreeViewColumn *column; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; if (OpenPlugins(NULL) == -1) return; - if (needReset) { SysReset(); needReset = 0; } + if (needReset) { + SysReset(); + needReset = FALSE; + } if (!efile) efile=GetPS2ElfName(elfname); @@ -1304,10 +1247,10 @@ void OnDebug_Debugger(GtkMenuItem *menuitem, gpointer user_data) { efile=0; dPC = cpuRegs.pc; - + DebugWnd = create_DebugWnd(); - - ListDVModel = gtk_list_store_new (1, G_TYPE_STRING); + + ListDVModel = gtk_list_store_new (1, G_TYPE_STRING); ListDV = lookup_widget(DebugWnd, "GtkList_DisView"); gtk_tree_view_set_model(GTK_TREE_VIEW(ListDV), GTK_TREE_MODEL(ListDVModel)); renderer = gtk_cell_renderer_text_new (); @@ -1315,7 +1258,6 @@ void OnDebug_Debugger(GtkMenuItem *menuitem, gpointer user_data) { "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (ListDV), column); - scroll = lookup_widget(DebugWnd, "GtkVScrollbar_VList"); DebugAdj = GTK_RANGE(scroll)->adjustment; @@ -1342,6 +1284,7 @@ void OnLogging_Ok(GtkButton *button, gpointer user_data) { int i, ret; #ifdef PCSX2_DEVBUILD + for (i=0; i<17; i++) { sprintf(str, "Log%d", i); Btn = lookup_widget(LogDlg, str); @@ -1389,13 +1332,12 @@ void OnDebug_Logging(GtkMenuItem *menuitem, gpointer user_data) { int i; LogDlg = create_Logging(); - for (i=0; i<17; i++) { sprintf(str, "Log%d", i); Btn = lookup_widget(LogDlg, str); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), varLog & (1<d_name); \ - type##ConfS.glist = g_list_append(type##ConfS.glist, type##ConfS.plist[type##ConfS.plugins-1]); \ + type##ConfS.PluginNameList = g_list_append(type##ConfS.PluginNameList, type##ConfS.plist[type##ConfS.plugins-1]); \ } void FindPlugins() { @@ -1460,13 +1402,13 @@ void FindPlugins() { struct dirent *ent; void *Handle; char plugin[256],name[256]; - + GSConfS.plugins = 0; CDVDConfS.plugins = 0; DEV9ConfS.plugins = 0; PAD1ConfS.plugins = 0; PAD2ConfS.plugins = 0; SPU2ConfS.plugins = 0; USBConfS.plugins = 0; FWConfS.plugins = 0; BiosConfS.plugins = 0; - GSConfS.glist = NULL; CDVDConfS.glist = NULL; DEV9ConfS.glist = NULL; - PAD1ConfS.glist = NULL; PAD2ConfS.glist = NULL; SPU2ConfS.glist = NULL; - USBConfS.glist = NULL; FWConfS.glist = NULL; BiosConfS.glist = NULL; + GSConfS.PluginNameList = NULL; CDVDConfS.PluginNameList = NULL; DEV9ConfS.PluginNameList = NULL; + PAD1ConfS.PluginNameList = NULL; PAD2ConfS.PluginNameList = NULL; SPU2ConfS.PluginNameList = NULL; + USBConfS.PluginNameList = NULL; FWConfS.PluginNameList = NULL; BiosConfS.PluginNameList = NULL; dir = opendir(Config.PluginsDir); if (dir == NULL) { @@ -1557,7 +1499,6 @@ void FindPlugins() { sprintf (plugin, "%s%s", Config.BiosDir, ent->d_name); if (stat(plugin, &buf) == -1) continue; -// if (buf.st_size < (1024*512)) continue; if (buf.st_size > (1024*4096)) continue; //2002-09-28 (Florin) if (!IsBIOS(ent->d_name, description)) continue;//2002-09-28 (Florin) @@ -1566,7 +1507,7 @@ void FindPlugins() { strncat(BiosConfS.plist[BiosConfS.plugins-1], ent->d_name, min(sizeof(BiosConfS.plist[0]-2), strlen(ent->d_name))); strcat(BiosConfS.plist[BiosConfS.plugins-1], ")"); strcpy(BiosConfS.plist[BiosConfS.plugins-2], ent->d_name); - BiosConfS.glist = g_list_append(BiosConfS.glist, BiosConfS.plist[BiosConfS.plugins-1]); + BiosConfS.PluginNameList = g_list_append(BiosConfS.PluginNameList, BiosConfS.plist[BiosConfS.plugins-1]); } closedir(dir); } @@ -1588,9 +1529,13 @@ void SysMessage(char *fmt, ...) { vsprintf(msg, fmt, list); va_end(list); - if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0; + if (msg[strlen(msg)-1] == '\n') + msg[strlen(msg)-1] = 0; - if (!UseGui) { printf("%s\n",msg); return; } + if (!UseGui) { + printf("%s\n",msg); + return; + } MsgDlg = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); @@ -1622,30 +1567,260 @@ void SysMessage(char *fmt, ...) { gtk_main(); } -void -on_patch_browser1_activate (GtkMenuItem *menuitem, - gpointer user_data) -{ -} +void on_patch_browser1_activate(GtkMenuItem *menuitem, gpointer user_data) {} -void -on_patch_finder2_activate (GtkMenuItem *menuitem, - gpointer user_data) -{ -} +void on_patch_finder2_activate(GtkMenuItem *menuitem, gpointer user_data) {} -void -on_enable_console1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_enable_console1_activate (GtkMenuItem *menuitem, gpointer user_data) { Config.PsxOut=(int)gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem); SaveConfig(); } -void -on_enable_patches1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_enable_patches1_activate(GtkMenuItem *menuitem, gpointer user_data) { Config.Patch=(int)gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem); SaveConfig(); } + +void on_Game_Fixes(GtkMenuItem *menuitem, gpointer user_data) +{ + GameFixDlg = create_GameFixDlg(); + + set_checked(GameFixDlg, "check_Slow_DVD", (Config.GameFixes & FLAG_SLOW_DVD)); + set_checked(GameFixDlg, "check_VU_Clip", (Config.GameFixes & FLAG_VU_CLIP)); + set_checked(GameFixDlg, "check_FPU_Clamp", (Config.GameFixes & FLAG_FPU_CLAMP)); + set_checked(GameFixDlg, "check_VU_Branch", (Config.GameFixes & FLAG_VU_BRANCH)); + + gtk_widget_show_all(GameFixDlg); + gtk_widget_set_sensitive(Window, FALSE); + gtk_main(); + } +void on_Game_Fix_Cancel(GtkButton *button, gpointer user_data) +{ + gtk_widget_destroy(GameFixDlg); + gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} +void on_Game_Fix_OK(GtkButton *button, gpointer user_data) +{ + + Config.GameFixes = 0; + Config.GameFixes |= is_checked(GameFixDlg, "check_Slow_DVD") ? FLAG_SLOW_DVD : 0; + Config.GameFixes |= is_checked(GameFixDlg, "check_VU_Clip") ? FLAG_VU_CLIP : 0; + Config.GameFixes |= is_checked(GameFixDlg, "check_FPU_Clamp") ? FLAG_FPU_CLAMP : 0; + Config.GameFixes |= is_checked(GameFixDlg, "check_VU_Branch") ? FLAG_VU_BRANCH : 0; + + SaveConfig(); + gtk_widget_destroy(GameFixDlg); + gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} + +void on_Speed_Hacks(GtkMenuItem *menuitem, gpointer user_data) +{ + int index; + SpeedHacksDlg = create_SpeedHacksDlg(); + + index = 1; //Default to normal + if get_flag(Config.Hacks, FLAG_VU_EXTRA_OVERFLOW) index = 2; + if get_flag(Config.Hacks, FLAG_VU_NO_OVERFLOW) index = 0; + gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboVUOverflow")), index); + + index = 1; //Default to normal + if get_flag(Config.Hacks, FLAG_FPU_EXTRA_OVERFLOW) index = 2; + if get_flag(Config.Hacks, FLAG_FPU_NO_OVERFLOW) index = 0; + + gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboFPUOverflow")), index); + + set_checked(SpeedHacksDlg, "check_EE_Double_Sync", (Config.Hacks & FLAG_EE_2_SYNC)); + set_checked(SpeedHacksDlg, "check_Tight_SPU_Sync", (Config.Hacks & FLAG_TIGHT_SPU_SYNC)); + set_checked(SpeedHacksDlg, "check_Disable_Underflow", (Config.Hacks & FLAG_NO_UNDERFLOW)); + set_checked(SpeedHacksDlg, "check_IOP_Double_Sync", (Config.Hacks & FLAG_IOP_2_SYNC)); + set_checked(SpeedHacksDlg, "check_Triple_Sync",(Config.Hacks & FLAG_TRIPLE_SYNC)); + set_checked(SpeedHacksDlg, "check_EE_Fast_Branches", (Config.Hacks & FLAG_FAST_BRANCHES)); + set_checked(SpeedHacksDlg, "check_Disable_VU_Flags", (Config.Hacks & FLAG_NO_VU_FLAGS)); + set_checked(SpeedHacksDlg, "check_Disable_FPU_Flags", (Config.Hacks & FLAG_NO_FPU_FLAGS)); + set_checked(SpeedHacksDlg, "check_ESC_Hack", (Config.Hacks & FLAG_ESC)); + + gtk_widget_show_all(SpeedHacksDlg); + gtk_widget_set_sensitive(Window, FALSE); + gtk_main(); + } +void on_Speed_Hack_Compatability(GtkButton *button, gpointer user_data) +{ + set_checked(SpeedHacksDlg, "check_EE_Double_Sync", FALSE); + + gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboVUOverflow")), 2); + gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboFPUOverflow")), 2); + + set_checked(SpeedHacksDlg, "check_Disable_Underflow", TRUE); + set_checked(SpeedHacksDlg, "check_IOP_Double_Sync", FALSE); + set_checked(SpeedHacksDlg, "check_Triple_Sync", FALSE); + set_checked(SpeedHacksDlg, "check_EE_Fast_Branches", FALSE); + set_checked(SpeedHacksDlg, "check_Disable_VU_Flags", TRUE); + set_checked(SpeedHacksDlg, "check_Disable_FPU_Flags", TRUE); + +} +void on_Speed_Hack_Speed(GtkButton *button, gpointer user_data) +{ + set_checked(SpeedHacksDlg, "check_EE_Double_Sync", TRUE); + + gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboVUOverflow")), 0); + gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboFPUOverflow")), 0); + + set_checked(SpeedHacksDlg, "check_Tight_SPU_Sync", FALSE); + set_checked(SpeedHacksDlg, "check_Disable_Underflow", TRUE); + set_checked(SpeedHacksDlg, "check_IOP_Double_Sync", TRUE); + set_checked(SpeedHacksDlg, "check_Triple_Sync", TRUE); + set_checked(SpeedHacksDlg, "check_EE_Fast_Branches", FALSE); + set_checked(SpeedHacksDlg, "check_Disable_VU_Flags", TRUE); + set_checked(SpeedHacksDlg, "check_Disable_FPU_Flags", TRUE); + +} +void on_Speed_Hack_Cancel(GtkButton *button, gpointer user_data) +{ + gtk_widget_destroy(SpeedHacksDlg); + gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} +void on_Speed_Hack_OK(GtkButton *button, gpointer user_data) +{ + int index; + + Config.Hacks = 0; + + Config.Hacks |= is_checked(SpeedHacksDlg, "check_EE_Double_Sync") ? FLAG_EE_2_SYNC : 0; + + switch (gtk_combo_box_get_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboVUOverflow")))) { + case 0: //Disabled + set_flag(Config.Hacks, FLAG_VU_NO_OVERFLOW, TRUE); + break; + case 1: //Normal + // Not having either flag set to true is normal + break; + case 2: //Extra + set_flag(Config.Hacks, FLAG_VU_EXTRA_OVERFLOW, TRUE); + break; + } + + Config.Hacks |= is_checked(SpeedHacksDlg, "check_Tight_SPU_Sync") ? FLAG_TIGHT_SPU_SYNC : 0; + Config.Hacks |= is_checked(SpeedHacksDlg, "check_Disable_Underflow") ? FLAG_NO_UNDERFLOW : 0; + Config.Hacks |= is_checked(SpeedHacksDlg, "check_IOP_Double_Sync") ? FLAG_IOP_2_SYNC : 0; + Config.Hacks |= is_checked(SpeedHacksDlg, "check_Triple_Sync") ? FLAG_TRIPLE_SYNC : 0; + Config.Hacks |= is_checked(SpeedHacksDlg, "check_EE_Fast_Branches") ? FLAG_FAST_BRANCHES : 0; + Config.Hacks |= is_checked(SpeedHacksDlg, "check_Disable_VU_Flags") ? FLAG_NO_VU_FLAGS : 0; + Config.Hacks |= is_checked(SpeedHacksDlg, "check_Disable_FPU_Flags")? FLAG_NO_FPU_FLAGS : 0; + Config.Hacks |= is_checked(SpeedHacksDlg, "check_ESC_Hack") ? FLAG_ESC : 0; + + switch (gtk_combo_box_get_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboFPUOverflow")))) { + case 0: //Disabled + set_flag(Config.Hacks, FLAG_FPU_NO_OVERFLOW, TRUE); + break; + case 1: //Normal + // Not having either flag set to true is normal + break; + case 2: //Extra + set_flag(Config.Hacks, FLAG_FPU_EXTRA_OVERFLOW, TRUE); + break; + } + + SaveConfig(); + + gtk_widget_destroy(SpeedHacksDlg); + gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} +void setAdvancedOptions() +{ + switch((Config.sseMXCSR & 0x6000) >> 13) + { + case 0: + set_checked(AdvDlg, "radio_EE_Round_Near", TRUE); + break; + case 1: + set_checked(AdvDlg, "radio_EE_Round_Negative",TRUE); + break; + case 2: + set_checked(AdvDlg, "radio_EE_Round_Positive", TRUE); + break; + case 3: + set_checked(AdvDlg, "radio_EE_Round_Zero", TRUE); + break; + } + + switch((Config.sseVUMXCSR & 0x6000) >> 13) + { + case 0: + set_checked(AdvDlg, "radio_VU_Round_Near", TRUE); + break; + case 1: + set_checked(AdvDlg, "radio_VU_Round_Negative",TRUE); + break; + case 2: + set_checked(AdvDlg, "radio_VU_Round_Positive", TRUE); + break; + case 3: + set_checked(AdvDlg, "radio_VU_Round_Zero", TRUE); + break; + } + + set_checked(AdvDlg, "check_EE_Flush_Zero", (Config.sseMXCSR & FLAG_FLUSH_ZERO) ? TRUE : FALSE); + set_checked(AdvDlg, "check_EE_Denormal_Zero", (Config.sseMXCSR & FLAG_DENORMAL_ZERO) ? TRUE : FALSE); + + set_checked(AdvDlg, "check_VU_Flush_Zero", (Config.sseVUMXCSR & FLAG_FLUSH_ZERO) ? TRUE : FALSE); + set_checked(AdvDlg, "check_VU_Denormal_Zero", (Config.sseVUMXCSR & FLAG_DENORMAL_ZERO) ? TRUE : FALSE); +} +void on_Advanced(GtkMenuItem *menuitem, gpointer user_data) +{ + AdvDlg = create_AdvDlg(); + + setAdvancedOptions(); + + gtk_widget_show_all(AdvDlg); + gtk_widget_set_sensitive(Window, FALSE); + gtk_main(); + } + +void on_Advanced_Defaults(GtkButton *button, gpointer user_data) +{ + Config.sseMXCSR = DEFAULT_sseMXCSR; + Config.sseVUMXCSR = DEFAULT_sseVUMXCSR; + + setAdvancedOptions(); + } +void on_Advanced_Cancel(GtkButton *button, gpointer user_data) +{ + gtk_widget_destroy(AdvDlg); + gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} +void on_Advanced_OK(GtkButton *button, gpointer user_data) +{ + Config.sseMXCSR &= 0x1fbf; + Config.sseVUMXCSR &= 0x1fbf; + + + Config.sseMXCSR |= is_checked(AdvDlg, "radio_EE_Round_Near") ? FLAG_ROUND_NEAR : 0; + Config.sseMXCSR |= is_checked(AdvDlg, "radio_EE_Round_Negative") ? FLAG_ROUND_NEGATIVE : 0; + Config.sseMXCSR |= is_checked(AdvDlg, "radio_EE_Round_Positive") ? FLAG_ROUND_POSITIVE : 0; + Config.sseMXCSR |= is_checked(AdvDlg, "radio_EE_Round_Zero") ? FLAG_ROUND_ZERO : 0; + + Config.sseVUMXCSR |= is_checked(AdvDlg, "radio_VU_Round_Near") ? FLAG_ROUND_NEAR : 0; + Config.sseVUMXCSR |= is_checked(AdvDlg, "radio_VU_Round_Negative") ? FLAG_ROUND_NEGATIVE : 0; + Config.sseVUMXCSR |= is_checked(AdvDlg, "radio_VU_Round_Positive") ? FLAG_ROUND_POSITIVE : 0; + Config.sseVUMXCSR |= is_checked(AdvDlg, "radio_VU_Round_Zero") ? FLAG_ROUND_ZERO : 0; + + Config.sseMXCSR |= is_checked(AdvDlg, "check_EE_Flush_Zero") ? FLAG_FLUSH_ZERO : 0; + Config.sseVUMXCSR |= is_checked(AdvDlg, "check_VU_Flush_Zero") ? FLAG_FLUSH_ZERO : 0; + + Config.sseMXCSR |= is_checked(AdvDlg, "check_EE_Denormal_Zero") ? FLAG_DENORMAL_ZERO : 0; + Config.sseVUMXCSR |= is_checked(AdvDlg, "check_VU_Denormal_Zero") ? FLAG_DENORMAL_ZERO : 0; + + SetCPUState(Config.sseMXCSR, Config.sseVUMXCSR); + SaveConfig(); + + gtk_widget_destroy(AdvDlg); + gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} \ No newline at end of file diff --git a/pcsx2/Linux/Linux.h b/pcsx2/Linux/Linux.h index e14f64f1c7..359e3c8272 100644 --- a/pcsx2/Linux/Linux.h +++ b/pcsx2/Linux/Linux.h @@ -19,29 +19,63 @@ #ifndef __LINUX_H__ #define __LINUX_H__ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include + +#include +#include +#include +#include +#include + + +#include "../Paths.h" #include "Common.h" typedef struct { char lang[256]; } _langs; +typedef enum +{ + GS, + PAD1, + PAD2, + SPU, + CDVD, + DEV9, + USB, + FW, + BIOS +} plugin_types; + +GtkWidget *check_eerec, *check_vu0rec, *check_vu1rec; +GtkWidget *check_mtgs , *check_cpu_dc; +GtkWidget *check_console , *check_patches; +GtkWidget *radio_normal_limit, *radio_limit_limit, *radio_fs_limit, *radio_vuskip_limit; + _langs *langs; unsigned int langsMax; -extern int UseGui; +extern int g_SaveGSStream; +extern int g_ZeroGSOptions; + char cfgfile[256]; -int LoadConfig(); -void SaveConfig(); - -void StartGui(); -void RunGui(); - -int Pcsx2Configure(); - -void InitLanguages(); -char *GetLanguageNext(); -void CloseLanguages(); -void ChangeLanguage(char *lang); #endif /* __LINUX_H__ */ diff --git a/pcsx2/Linux/LnxMain.c b/pcsx2/Linux/LnxMain.c index be6a079111..02522a9f0d 100644 --- a/pcsx2/Linux/LnxMain.c +++ b/pcsx2/Linux/LnxMain.c @@ -16,126 +16,77 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include - #include "Common.h" #include "PsxCommon.h" #include "Linux.h" +#include "LnxMain.h" -#include "../Paths.h" - -int UseGui = 1; -int needReset = 1; -int RunExe = 0; -extern int g_SaveGSStream; -extern int g_ZeroGSOptions; +DIR *dir; #ifdef PCSX2_DEVBUILD - TESTRUNARGS g_TestRun; -char* g_pRunGSState = NULL; +#endif +#ifdef PCSX2_VIRTUAL_MEM + +static int s_nPageSize = 0; +static int s_nShmCounter = 0; #endif int main(int argc, char *argv[]) { char *file = NULL; char elfname[256]; - char *lang; int runcd=0; int efile = 0; - char* g_pRunGSState = NULL; - int i; + //char* g_pRunGSState = NULL; + int i = 1; struct stat buf; #ifdef PCSX2_VIRTUAL_MEM - void* pmem = mmap(PS2MEM_BASE, 0x40000000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0); + void* pmem = mmap(PS2MEM_BASE, 0x40000000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0); - if( pmem != PS2MEM_BASE ) { - SysMessage("Failed to allocate virtual memory %x-%x. Use TLB build", - PS2MEM_BASE, PS2MEM_BASE+0x40000000); - return -1; - } + if( pmem != PS2MEM_BASE ) { + SysMessage("Failed to allocate virtual memory %x-%x. Use TLB build", + PS2MEM_BASE, PS2MEM_BASE+0x40000000); + return -1; + } #endif - #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, "Langs"); textdomain(PACKAGE); #endif - printf("\n"); - mkdir(CONFIG_DIR, 0755); + printf("\n"); + mkdir(CONFIG_DIR, 0755); - strcpy(cfgfile, CONFIG_DIR "/pcsx2.cfg"); + strcpy(cfgfile, CONFIG_DIR "/pcsx2.cfg"); #ifdef PCSX2_DEVBUILD - memset(&g_TestRun, 0, sizeof(g_TestRun)); + memset(&g_TestRun, 0, sizeof(g_TestRun)); #endif - i = 1; - while(i < argc) { - char* token = argv[i++]; + while(i < argc) { + char* token = argv[i++]; if( stricmp(token, "-help") == 0 || stricmp(token, "--help") == 0 || stricmp(token, "-h") == 0 ) { - char* phelpmsg = - "\tpcsx2 [options] [file]\n\n" - "-cfg [file] {configuration file}\n" - "-efile [efile] {0 - reset, 1 - runcd (default), 2 - loadelf}\n" - "-help {display this help file}\n" - "-nogui {Don't use gui when launching}\n" - "-loadgs [file} {Loads a gsstate}\n" - "\n" -#ifdef PCSX2_DEVBUILD - "Testing Options: \n" - "\t-frame [frame] {game will run up to this frame before exiting}\n" - "\t-image [name] {path and base name of image (do not include the .ext)}\n" - "\t-jpg {save images to jpg format}\n" - "\t-log [name] {log path to save log file in}\n" - "\t-logopt [hex] {log options in hex (see debug.h) }\n" - "\t-numimages [num] {after hitting frame, this many images will be captures every 20 frames}\n" - "\t-test {Triggers testing mode (only for dev builds)}\n" - "\n" -#endif - - "Load Plugins:\n" - "\t-cdvd [dllpath] {specify the dll load path of the CDVD plugin}\n" - "\t-gs [dllpath] {specify the dll load path of the GS plugin}\n" - "-pad [tsxcal] {specify to hold down on the triangle, square, circle, x, start, select buttons}\n" - "\t-spu [dllpath] {specify the dll load path of the SPU2 plugin}\n" - "\n"; - //SysMessage(phelpmsg); return 0; } - else if( stricmp(token, "-efile") == 0 ) { + else if( stricmp(token, "-efile") == 0 ) { token = argv[i++]; if( token != NULL ) { efile = atoi(token); } } - else if( stricmp(token, "-nogui") == 0 ) { - UseGui = 0; - } - else if( stricmp(token, "-loadgs") == 0 ) { + else if( stricmp(token, "-nogui") == 0 ) { + UseGui = FALSE; + } + else if( stricmp(token, "-loadgs") == 0 ) { g_pRunGSState = argv[i++]; } #ifdef PCSX2_DEVBUILD @@ -152,7 +103,7 @@ int main(int argc, char *argv[]) { sscanf(token, "%x", &varLog); } } - else if( stricmp(token, "-frame") == 0 ) { + else if( stricmp(token, "-frame") == 0 ) { token = argv[i++]; if( token != NULL ) { g_TestRun.frame = atoi(token); @@ -179,9 +130,9 @@ int main(int argc, char *argv[]) { token = argv[i++]; g_TestRun.pspudll = token; } - else if( stricmp(token, "-test") == 0 ) { - g_TestRun.enabled = 1; - } + else if( stricmp(token, "-test") == 0 ) { + g_TestRun.enabled = 1; + } #endif else if( stricmp(token, "-pad") == 0 ) { token = argv[i++]; @@ -192,25 +143,35 @@ int main(int argc, char *argv[]) { g_pRunGSState = token; } else { - file = token; - printf("opening file %s\n", file); + file = token; + printf("opening file %s\n", file); } } #ifdef PCSX2_DEVBUILD g_TestRun.efile = efile; - g_TestRun.ptitle = file; + g_TestRun.ptitle = file; #endif - if (LoadConfig() == -1) { + // make gtk thread safe if using MTGS + if( CHECK_MULTIGS ) { + g_thread_init(NULL); + gdk_threads_init(); + } - if (UseGui) gtk_init(NULL, NULL); + if (UseGui) { + gtk_init(NULL, NULL); + } + + if (LoadConfig() == -1) { memset(&Config, 0, sizeof(Config)); strcpy(Config.BiosDir, DEFAULT_BIOS_DIR "/"); strcpy(Config.PluginsDir, DEFAULT_PLUGINS_DIR "/"); Config.Patch = 1; - Config.Options = PCSX2_EEREC|PCSX2_VU0REC|PCSX2_VU1REC|PCSX2_COP2REC; + Config.Options = PCSX2_EEREC | PCSX2_VU0REC | PCSX2_VU1REC | PCSX2_COP2REC; + Config.sseMXCSR = DEFAULT_sseMXCSR; + Config.sseVUMXCSR = DEFAULT_sseVUMXCSR; SysMessage(_("Pcsx2 needs to be configured")); Pcsx2Configure(); @@ -218,70 +179,47 @@ int main(int argc, char *argv[]) { return 0; } - // make gtk thread safe if using MTGS - if( CHECK_MULTIGS ) { - g_thread_init(NULL); - gdk_threads_init(); - } - - if (UseGui) gtk_init(NULL, NULL); - - if (Config.Lang[0] == 0) { - strcpy(Config.Lang, "en"); - } - - langs = (_langs*)malloc(sizeof(_langs)); - strcpy(langs[0].lang, "en"); - InitLanguages(); i=1; - while ((lang = GetLanguageNext()) != NULL) { - langs = (_langs*)realloc(langs, sizeof(_langs)*(i+1)); - strcpy(langs[i].lang, lang); - i++; - } - CloseLanguages(); - langsMax = i; - - if( Config.PsxOut ) { - // output the help commands - SysPrintf("\tF1 - save state\n"); - SysPrintf("\t(Shift +) F2 - cycle states\n"); - SysPrintf("\tF3 - load state\n"); + InitLanguages(); + + if( Config.PsxOut ) { + // output the help commands + SysPrintf("\tF1 - save state\n"); + SysPrintf("\t(Shift +) F2 - cycle states\n"); + SysPrintf("\tF3 - load state\n"); #ifdef PCSX2_DEVBUILD - SysPrintf("\tF10 - dump performance counters\n"); - SysPrintf("\tF11 - save GS state\n"); - SysPrintf("\tF12 - dump hardware registers\n"); + SysPrintf("\tF10 - dump performance counters\n"); + SysPrintf("\tF11 - save GS state\n"); + SysPrintf("\tF12 - dump hardware registers\n"); #endif - } + } if (SysInit() == -1) return 1; #ifdef PCSX2_DEVBUILD if( g_pRunGSState ) { - LoadGSState(g_pRunGSState); + LoadGSState(g_pRunGSState); SysClose(); return 0; } #endif - if (UseGui&&file==NULL) { + if (UseGui && (file == NULL)) { StartGui(); return 0; } - if (OpenPlugins(file) == -1) { - return -1; - } + if (OpenPlugins(file) == -1) return -1; + SysReset(); + SetCPUState(Config.sseMXCSR, Config.sseVUMXCSR); cpuExecuteBios(); - if (file) - strcpy(elfname, file); - if (!efile) - efile=GetPS2ElfName(elfname); - loadElfFile(elfname); + if (file) strcpy(elfname, file); + if (!efile) efile=GetPS2ElfName(elfname); + loadElfFile(elfname); - if( GSsetGameCRC != NULL ) + if( GSsetGameCRC != NULL ) GSsetGameCRC(ElfCRC, g_ZeroGSOptions); Cpu->Execute(); @@ -289,10 +227,26 @@ int main(int argc, char *argv[]) { return 0; } -DIR *dir; - void InitLanguages() { + char *lang; + int i = 1; + + if (Config.Lang[0] == 0) { + strcpy(Config.Lang, "en"); + } + + langs = (_langs*)malloc(sizeof(_langs)); + strcpy(langs[0].lang, "en"); dir = opendir(LANGS_DIR); + + while ((lang = GetLanguageNext()) != NULL) { + langs = (_langs*)realloc(langs, sizeof(_langs)*(i+1)); + strcpy(langs[i].lang, lang); + i++; + } + + CloseLanguages(); + langsMax = i; } char *GetLanguageNext() { @@ -322,42 +276,35 @@ void ChangeLanguage(char *lang) { } void KeyEvent(keyEvent* ev) { - char Text[256]; - int ret; - static int shift = 0; + static int shift = 0; - if (ev == NULL) - return; + if (ev == NULL) return; + + if( GSkeyEvent != NULL ) GSkeyEvent(ev); - if( GSkeyEvent != NULL ) - GSkeyEvent(ev); + if( ev->event == KEYPRESS ) + if( ev->key == XK_Shift_L || ev->key == XK_Shift_R ) + shift = 1; + else + if (ev->event == KEYRELEASE) { + if( ev->key == XK_Shift_L || ev->key == XK_Shift_R ) + shift = 0; + return; + } - if( ev->event == KEYPRESS ) { - if( ev->key == XK_Shift_L || ev->key == XK_Shift_R ) - shift = 1; - } - else { - if (ev->event == KEYRELEASE) { - if( ev->key == XK_Shift_L || ev->key == XK_Shift_R ) - shift = 0; - } - - return; - } - - switch (ev->key) { + switch (ev->key) { case XK_F1: ProcessFKeys(1, shift); break; case XK_F2: ProcessFKeys(2, shift); break; - case XK_F3: ProcessFKeys(3, shift); break; - case XK_F4: ProcessFKeys(4, shift); break; - case XK_F5: ProcessFKeys(5, shift); break; - case XK_F6: ProcessFKeys(6, shift); break; - case XK_F7: ProcessFKeys(7, shift); break; - case XK_F8: ProcessFKeys(8, shift); break; - case XK_F9: ProcessFKeys(9, shift); break; - case XK_F10: ProcessFKeys(10, shift); break; - case XK_F11: ProcessFKeys(11, shift); break; - case XK_F12: ProcessFKeys(12, shift); break; + case XK_F3: ProcessFKeys(3, shift); break; + case XK_F4: ProcessFKeys(4, shift); break; + case XK_F5: ProcessFKeys(5, shift); break; + case XK_F6: ProcessFKeys(6, shift); break; + case XK_F7: ProcessFKeys(7, shift); break; + case XK_F8: ProcessFKeys(8, shift); break; + case XK_F9: ProcessFKeys(9, shift); break; + case XK_F10: ProcessFKeys(10, shift); break; + case XK_F11: ProcessFKeys(11, shift); break; + case XK_F12: ProcessFKeys(12, shift); break; case XK_Escape: signal(SIGINT, SIG_DFL); @@ -372,8 +319,7 @@ void KeyEvent(keyEvent* ev) { #endif ClosePlugins(); - if (!UseGui) - exit(0); + if (!UseGui) exit(0); RunGui(); break; default: @@ -390,22 +336,22 @@ int SysInit() { mkdir(LOGS_DIR, 0755); #ifdef PCSX2_DEVBUILD - if( g_TestRun.plogname != NULL ) + if( g_TestRun.plogname != NULL ) emuLog = fopen(g_TestRun.plogname, "w"); - if( emuLog == NULL ) - emuLog = fopen(LOGS_DIR "/emuLog.txt","wb"); + if( emuLog == NULL ) + emuLog = fopen(LOGS_DIR "/emuLog.txt","wb"); #endif - if( emuLog != NULL ) - setvbuf(emuLog, NULL, _IONBF, 0); + if( emuLog != NULL ) + setvbuf(emuLog, NULL, _IONBF, 0); #endif if(cpuInit() == -1 ) - return -1; + return -1; while (LoadPlugins() == -1) { - if (Pcsx2Configure() == 0) - exit(1); + if (Pcsx2Configure() == FALSE) + exit(1); } return 0; @@ -428,56 +374,46 @@ void SysClose() { void SysPrintf(char *fmt, ...) { va_list list; char msg[512]; - char* ptr, *src; - int len, i, j, s; + char* ptr, *src; + int len, i, j, s; va_start(list, fmt); vsprintf(msg, fmt, list); va_end(list); - if (Config.PsxOut == 0) { + if (Config.PsxOut == 0) { #ifdef EMU_LOG #ifndef LOG_STDOUT - if (emuLog != NULL && !(varLog & 0x80000000)) { - fprintf(emuLog, "%s", msg); - } + if (emuLog != NULL && !(varLog & 0x80000000)) { + fprintf(emuLog, "%s", msg); + } #endif #endif - return; - } + return; + } - // due to various linux ways of writing lines, convert all \r\n to \n -// src = msg; -// while( (ptr = strstr(src, "\r\n")) != NULL ) { -// ptr[0] = 0; -// printf("%s\n", src); -// src = ptr+2; -// } -// -// if( src[0] != 0 ) -// printf("%s", src); - printf("%s", msg); + printf("%s", msg); #ifdef EMU_LOG #ifndef LOG_STDOUT - if (emuLog != NULL && !(varLog & 0x80000000)) { - ptr = msg; len = strlen(msg); - for (i=0, j=0; ipname = (char*)malloc(20); - sprintf(pblock->pname, "/pcsx2_shm%d", s_nShmCounter++); - shm_unlink(pblock->pname); // unlink to make sure one can be created - pblock->fd = shm_open(pblock->pname, O_RDWR|O_CREAT, 0); + pblock->pname = (char*)malloc(20); + sprintf(pblock->pname, "/pcsx2_shm%d", s_nShmCounter++); + shm_unlink(pblock->pname); // unlink to make sure one can be created + pblock->fd = shm_open(pblock->pname, O_RDWR|O_CREAT, 0); - if( pblock->fd < 0 ) { - perror("shm_open failed"); - SysMessage("Failed to create shared memory object %s\n", pblock->pname); - return -1; - } + if( pblock->fd < 0 ) { + perror("shm_open failed"); + SysMessage("Failed to create shared memory object %s\n", pblock->pname); + return -1; + } - if( ftruncate(fd, size) < 0 ) { - perror("ftruncate failed"); - SysMessage("Failed to allocate 0x%x bytes to shm\n", size); - } + if( ftruncate(fd, size) < 0 ) { + perror("ftruncate failed"); + SysMessage("Failed to allocate 0x%x bytes to shm\n", size); + } - pblock->size = size; + pblock->size = size; - return 0; + return 0; } void SysPhysicalFree(PSMEMORYBLOCK* pblock) { - assert( pblock != NULL ); - if( pblock->fd ) - close(pblock->fd); - if( pblock->pname ) { - shm_unlink(pblock->pname); - free(pblock->pname); - } - memset(pblock, 0, sizeof(PSMEMORYBLOCK)); + assert( pblock != NULL ); + if( pblock->fd ) + close(pblock->fd); + if( pblock->pname ) { + shm_unlink(pblock->pname); + free(pblock->pname); + } + memset(pblock, 0, sizeof(PSMEMORYBLOCK)); } int SysVirtualPhyAlloc(void* base, u32 size, PSMEMORYBLOCK* pblock) { - void* pmem; - assert(pblock != NULL && pblock->fd >= 0 && pblock->size >= size ); - pmem = mmap(base, size, PROT_READ|PROT_WRITE, MAP_SHARED, pblock->fd, 0); + void* pmem; + assert(pblock != NULL && pblock->fd >= 0 && pblock->size >= size ); + pmem = mmap(base, size, PROT_READ|PROT_WRITE, MAP_SHARED, pblock->fd, 0); - if( pmem != base ) { + if( pmem != base ) { - if( pmem == (void*)-1 ) { - munmap(base, size); - } + if( pmem == (void*)-1 ) { + munmap(base, size); + } SysPrintf("Failed to map memory at 0x%x of size 0x%x with shm %s\n", (uptr)base, (uptr)size, pblock->pname); return -1; - } + } return 0; } void SysVirtualFree(void* lpMemReserved, u32 size) { - if( munmap(lpMemReserved, size) < 0 ) - SysPrintf("Failed to unmap %x\n", lpMemReserved); + if( munmap(lpMemReserved, size) < 0 ) + SysPrintf("Failed to unmap %x\n", lpMemReserved); } int SysMapUserPhysicalPages(void* Addr, uptr NumPages, PSMEMORYBLOCK* pblock, int pageoffset) { - void* pmem; - if( pblock == NULL ) { - // unmap - if( munmap(base, size) < 0 ) { - SysPrintf("SysMapUserPhysicalPages: Failed to unmap %x\n", Addr); - return 0; - } - } - else { - // map - pmem = mmap(Addr, NumPages*s_nPageSize, PROT_READ|PROT_WRITE, MAP_SHARED, pblock->fd, pageoffset*s_nPageSize); - if( pmem != base ) { - SysPrintf("SysMapUserPhysicalPages: Failed to map 0x%x, size=0x%x, offset=0x%x\n", - Addr, NumPages*s_nPageSize, pageoffset*s_nPageSize); - return 0; - } - } + void* pmem; + if( pblock == NULL ) { + // unmap + if( munmap(base, size) < 0 ) { + SysPrintf("SysMapUserPhysicalPages: Failed to unmap %x\n", Addr); + return 0; + } + } + else { + // map + pmem = mmap(Addr, NumPages*s_nPageSize, PROT_READ|PROT_WRITE, MAP_SHARED, pblock->fd, pageoffset*s_nPageSize); + if( pmem != base ) { + SysPrintf("SysMapUserPhysicalPages: Failed to map 0x%x, size=0x%x, offset=0x%x\n", + Addr, NumPages*s_nPageSize, pageoffset*s_nPageSize); + return 0; + } + } - return 1; + return 1; } #endif diff --git a/pcsx2/Linux/callbacks.h b/pcsx2/Linux/callbacks.h index ff074f3c85..615bb7f993 100644 --- a/pcsx2/Linux/callbacks.h +++ b/pcsx2/Linux/callbacks.h @@ -1,20 +1,3 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ #include @@ -130,6 +113,18 @@ void OnConf_Cpu (GtkMenuItem *menuitem, gpointer user_data); +void +on_Game_Fixes (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_Speed_Hacks (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_Advanced (GtkMenuItem *menuitem, + gpointer user_data); + void on_patch_browser1_activate (GtkMenuItem *menuitem, gpointer user_data); @@ -401,3 +396,39 @@ OnMemWrite32_Ok (GtkButton *button, void OnMemWrite32_Cancel (GtkButton *button, gpointer user_data); + +void +on_Game_Fix_OK (GtkButton *button, + gpointer user_data); + +void +on_Game_Fix_Cancel (GtkButton *button, + gpointer user_data); + +void +on_Speed_Hack_Compatability (GtkButton *button, + gpointer user_data); + +void +on_Speed_Hack_Speed (GtkButton *button, + gpointer user_data); + +void +on_Speed_Hack_OK (GtkButton *button, + gpointer user_data); + +void +on_Speed_Hack_Cancel (GtkButton *button, + gpointer user_data); + +void +on_Advanced_Defaults (GtkButton *button, + gpointer user_data); + +void +on_Advanced_OK (GtkButton *button, + gpointer user_data); + +void +on_Advanced_Cancel (GtkButton *button, + gpointer user_data); diff --git a/pcsx2/Linux/interface.c b/pcsx2/Linux/interface.c index c61381854c..5cddbb8363 100644 --- a/pcsx2/Linux/interface.c +++ b/pcsx2/Linux/interface.c @@ -1,20 +1,3 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ /* * DO NOT EDIT THIS FILE - it is generated by Glade. */ @@ -59,10 +42,10 @@ create_MainWindow (void) GtkWidget *load1; GtkWidget *load1_menu; GtkWidget *slot_1; - GtkWidget *slot_3; + GtkWidget *slot_2; + GtkWidget *slot_3_; GtkWidget *slot_4; GtkWidget *slot_5; - GtkWidget *slot_2; GtkWidget *other1; GtkWidget *save1; GtkWidget *save1_menu; @@ -91,6 +74,9 @@ create_MainWindow (void) GtkWidget *GtkMenuItem_FW; GtkWidget *separator4; GtkWidget *GtkMenuItem_Cpu; + GtkWidget *GtkMenuItem_Game_Fixes; + GtkWidget *GtkMenuItem_Speed_Hacks; + GtkWidget *GtkMenuItem_Advanced; GtkWidget *GtkMenuItem_Language; GtkWidget *misc1; GtkWidget *misc1_menu; @@ -159,22 +145,22 @@ create_MainWindow (void) gtk_widget_show (slot_1); gtk_container_add (GTK_CONTAINER (load1_menu), slot_1); - slot_3 = gtk_menu_item_new_with_mnemonic (_("Slot 2")); - gtk_widget_show (slot_3); - gtk_container_add (GTK_CONTAINER (load1_menu), slot_3); + slot_2 = gtk_menu_item_new_with_mnemonic (_("Slot 2")); + gtk_widget_show (slot_2); + gtk_container_add (GTK_CONTAINER (load1_menu), slot_2); - slot_4 = gtk_menu_item_new_with_mnemonic (_("Slot 3")); + slot_3_ = gtk_menu_item_new_with_mnemonic (_("Slot 3")); + gtk_widget_show (slot_3_); + gtk_container_add (GTK_CONTAINER (load1_menu), slot_3_); + + slot_4 = gtk_menu_item_new_with_mnemonic (_("Slot 4")); gtk_widget_show (slot_4); gtk_container_add (GTK_CONTAINER (load1_menu), slot_4); - slot_5 = gtk_menu_item_new_with_mnemonic (_("Slot 4")); + slot_5 = gtk_menu_item_new_with_mnemonic (_("Slot 5")); gtk_widget_show (slot_5); gtk_container_add (GTK_CONTAINER (load1_menu), slot_5); - slot_2 = gtk_menu_item_new_with_mnemonic (_("Slot 5")); - gtk_widget_show (slot_2); - gtk_container_add (GTK_CONTAINER (load1_menu), slot_2); - other1 = gtk_menu_item_new_with_mnemonic (_("Other...")); gtk_widget_show (other1); gtk_container_add (GTK_CONTAINER (load1_menu), other1); @@ -286,6 +272,18 @@ create_MainWindow (void) gtk_widget_show (GtkMenuItem_Cpu); gtk_container_add (GTK_CONTAINER (GtkMenuItem_Configuration_menu), GtkMenuItem_Cpu); + GtkMenuItem_Game_Fixes = gtk_menu_item_new_with_mnemonic (_("Game Fixes")); + gtk_widget_show (GtkMenuItem_Game_Fixes); + gtk_container_add (GTK_CONTAINER (GtkMenuItem_Configuration_menu), GtkMenuItem_Game_Fixes); + + GtkMenuItem_Speed_Hacks = gtk_menu_item_new_with_mnemonic (_("Speed Hacks")); + gtk_widget_show (GtkMenuItem_Speed_Hacks); + gtk_container_add (GTK_CONTAINER (GtkMenuItem_Configuration_menu), GtkMenuItem_Speed_Hacks); + + GtkMenuItem_Advanced = gtk_menu_item_new_with_mnemonic (_("Advanced")); + gtk_widget_show (GtkMenuItem_Advanced); + gtk_container_add (GTK_CONTAINER (GtkMenuItem_Configuration_menu), GtkMenuItem_Advanced); + GtkMenuItem_Language = gtk_menu_item_new_with_mnemonic (_("_Language")); gtk_widget_show (GtkMenuItem_Language); gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Language); @@ -364,16 +362,16 @@ create_MainWindow (void) g_signal_connect ((gpointer) slot_1, "activate", G_CALLBACK (OnStates_Load1), NULL); - g_signal_connect ((gpointer) slot_3, "activate", + g_signal_connect ((gpointer) slot_2, "activate", G_CALLBACK (OnStates_Load2), NULL); - g_signal_connect ((gpointer) slot_4, "activate", + g_signal_connect ((gpointer) slot_3_, "activate", G_CALLBACK (OnStates_Load3), NULL); - g_signal_connect ((gpointer) slot_5, "activate", + g_signal_connect ((gpointer) slot_4, "activate", G_CALLBACK (OnStates_Load4), NULL); - g_signal_connect ((gpointer) slot_2, "activate", + g_signal_connect ((gpointer) slot_5, "activate", G_CALLBACK (OnStates_Load5), NULL); g_signal_connect ((gpointer) other1, "activate", @@ -436,6 +434,15 @@ create_MainWindow (void) g_signal_connect ((gpointer) GtkMenuItem_Cpu, "activate", G_CALLBACK (OnConf_Cpu), NULL); + g_signal_connect ((gpointer) GtkMenuItem_Game_Fixes, "activate", + G_CALLBACK (on_Game_Fixes), + NULL); + g_signal_connect ((gpointer) GtkMenuItem_Speed_Hacks, "activate", + G_CALLBACK (on_Speed_Hacks), + NULL); + g_signal_connect ((gpointer) GtkMenuItem_Advanced, "activate", + G_CALLBACK (on_Advanced), + NULL); g_signal_connect ((gpointer) patch_browser1, "activate", G_CALLBACK (on_patch_browser1_activate), NULL); @@ -472,10 +479,10 @@ create_MainWindow (void) GLADE_HOOKUP_OBJECT (MainWindow, load1, "load1"); GLADE_HOOKUP_OBJECT (MainWindow, load1_menu, "load1_menu"); GLADE_HOOKUP_OBJECT (MainWindow, slot_1, "slot_1"); - GLADE_HOOKUP_OBJECT (MainWindow, slot_3, "slot_3"); + GLADE_HOOKUP_OBJECT (MainWindow, slot_2, "slot_2"); + GLADE_HOOKUP_OBJECT (MainWindow, slot_3_, "slot_3_"); GLADE_HOOKUP_OBJECT (MainWindow, slot_4, "slot_4"); GLADE_HOOKUP_OBJECT (MainWindow, slot_5, "slot_5"); - GLADE_HOOKUP_OBJECT (MainWindow, slot_2, "slot_2"); GLADE_HOOKUP_OBJECT (MainWindow, other1, "other1"); GLADE_HOOKUP_OBJECT (MainWindow, save1, "save1"); GLADE_HOOKUP_OBJECT (MainWindow, save1_menu, "save1_menu"); @@ -504,6 +511,9 @@ create_MainWindow (void) GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_FW, "GtkMenuItem_FW"); GLADE_HOOKUP_OBJECT (MainWindow, separator4, "separator4"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Cpu, "GtkMenuItem_Cpu"); + GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Game_Fixes, "GtkMenuItem_Game_Fixes"); + GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Speed_Hacks, "GtkMenuItem_Speed_Hacks"); + GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Advanced, "GtkMenuItem_Advanced"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Language, "GtkMenuItem_Language"); GLADE_HOOKUP_OBJECT (MainWindow, misc1, "misc1"); GLADE_HOOKUP_OBJECT (MainWindow, misc1_menu, "misc1_menu"); @@ -637,12 +647,6 @@ create_ConfDlg (void) GtkWidget *ConfDlg; GtkWidget *vbox12; GtkWidget *table2; - GtkWidget *GtkCombo_Pad1; - GList *GtkCombo_Pad1_items = NULL; - GtkWidget *combo_entry4; - GtkWidget *GtkCombo_Pad2; - GList *GtkCombo_Pad2_items = NULL; - GtkWidget *combo_entry5; GtkWidget *hbuttonbox6; GtkWidget *GtkButton_PAD2configure; GtkWidget *GtkButton_PAD2test; @@ -658,53 +662,41 @@ create_ConfDlg (void) GtkWidget *GtkLabel_Graphics; GtkWidget *GtkLabel_FirstController; GtkWidget *GtkLabel_SecondController; - GtkWidget *GtkCombo_Gs; - GList *GtkCombo_Gs_items = NULL; - GtkWidget *combo_entry2; GtkWidget *GtkLabel_Sound; - GtkWidget *GtkCombo_Spu2; - GList *GtkCombo_Spu2_items = NULL; - GtkWidget *entry1; GtkWidget *hbuttonbox12; GtkWidget *GtkButton_SPU2configure; GtkWidget *GtkButton_SPU2test; GtkWidget *GtkButton_SPU2about; - GtkWidget *GtkCombo_Dev9; - GList *GtkCombo_Dev9_items = NULL; - GtkWidget *entry3; GtkWidget *hbuttonbox21; GtkWidget *GtkButton_DEV9configure; GtkWidget *GtkButton_DEV9test; GtkWidget *GtkButton_DEV9about; GtkWidget *label23; GtkWidget *GtkLabel_Cdvdrom; - GtkWidget *GtkCombo_Cdvd; - GList *GtkCombo_Cdvd_items = NULL; - GtkWidget *entry2; GtkWidget *hbuttonbox13; GtkWidget *GtkButton_CDVDconfigure; GtkWidget *GtkButton_CDVDtest; GtkWidget *GtkButton_CDVDabout; GtkWidget *label29; - GtkWidget *GtkCombo_Usb; - GList *GtkCombo_Usb_items = NULL; - GtkWidget *entry4; GtkWidget *hbuttonbox23; GtkWidget *GtkButton_USBconfigure; GtkWidget *GtkButton_USBtest; GtkWidget *GtkButton_USBabout; - GtkWidget *GtkCombo_Bios; - GList *GtkCombo_Bios_items = NULL; - GtkWidget *combo_entry7; - GtkWidget *GtkCombo_FW; - GList *GtkCombo_FW_items = NULL; - GtkWidget *entry5; GtkWidget *hbuttonbox24; GtkWidget *GtkButton_FWconfigure; GtkWidget *GtkButton_FWtest; GtkWidget *GtkButton_FireWireabout; GtkWidget *label30; GtkWidget *GtkLabel_Bios; + GtkWidget *GtkCombo_Gs; + GtkWidget *GtkCombo_Spu2; + GtkWidget *GtkCombo_Pad1; + GtkWidget *GtkCombo_Pad2; + GtkWidget *GtkCombo_Dev9; + GtkWidget *GtkCombo_Cdvd; + GtkWidget *GtkCombo_Usb; + GtkWidget *GtkCombo_FW; + GtkWidget *GtkCombo_Bios; GtkWidget *hbox5; GtkWidget *hbuttonbox11; GtkWidget *GtkButton_SelectPluginsDir; @@ -726,36 +718,6 @@ create_ConfDlg (void) gtk_box_pack_start (GTK_BOX (vbox12), table2, TRUE, TRUE, 0); gtk_table_set_col_spacings (GTK_TABLE (table2), 15); - GtkCombo_Pad1 = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Pad1)->popwin), - "GladeParentKey", GtkCombo_Pad1); - gtk_widget_show (GtkCombo_Pad1); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Pad1, 0, 1, 4, 5, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_Pad1_items = g_list_append (GtkCombo_Pad1_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Pad1), GtkCombo_Pad1_items); - g_list_free (GtkCombo_Pad1_items); - - combo_entry4 = GTK_COMBO (GtkCombo_Pad1)->entry; - gtk_widget_show (combo_entry4); - gtk_entry_set_invisible_char (GTK_ENTRY (combo_entry4), 8226); - - GtkCombo_Pad2 = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Pad2)->popwin), - "GladeParentKey", GtkCombo_Pad2); - gtk_widget_show (GtkCombo_Pad2); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Pad2, 1, 2, 4, 5, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_Pad2_items = g_list_append (GtkCombo_Pad2_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Pad2), GtkCombo_Pad2_items); - g_list_free (GtkCombo_Pad2_items); - - combo_entry5 = GTK_COMBO (GtkCombo_Pad2)->entry; - gtk_widget_show (combo_entry5); - gtk_entry_set_invisible_char (GTK_ENTRY (combo_entry5), 8226); - hbuttonbox6 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox6); gtk_table_attach (GTK_TABLE (table2), hbuttonbox6, 1, 2, 5, 6, @@ -843,21 +805,6 @@ create_ConfDlg (void) gtk_label_set_justify (GTK_LABEL (GtkLabel_SecondController), GTK_JUSTIFY_CENTER); gtk_misc_set_alignment (GTK_MISC (GtkLabel_SecondController), 0, 0.5); - GtkCombo_Gs = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Gs)->popwin), - "GladeParentKey", GtkCombo_Gs); - gtk_widget_show (GtkCombo_Gs); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Gs, 0, 1, 1, 2, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_Gs_items = g_list_append (GtkCombo_Gs_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Gs), GtkCombo_Gs_items); - g_list_free (GtkCombo_Gs_items); - - combo_entry2 = GTK_COMBO (GtkCombo_Gs)->entry; - gtk_widget_show (combo_entry2); - gtk_entry_set_invisible_char (GTK_ENTRY (combo_entry2), 8226); - GtkLabel_Sound = gtk_label_new (_("Sound")); gtk_widget_show (GtkLabel_Sound); gtk_table_attach (GTK_TABLE (table2), GtkLabel_Sound, 1, 2, 0, 1, @@ -866,21 +813,6 @@ create_ConfDlg (void) gtk_label_set_justify (GTK_LABEL (GtkLabel_Sound), GTK_JUSTIFY_CENTER); gtk_misc_set_alignment (GTK_MISC (GtkLabel_Sound), 0, 0.5); - GtkCombo_Spu2 = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Spu2)->popwin), - "GladeParentKey", GtkCombo_Spu2); - gtk_widget_show (GtkCombo_Spu2); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Spu2, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_Spu2_items = g_list_append (GtkCombo_Spu2_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Spu2), GtkCombo_Spu2_items); - g_list_free (GtkCombo_Spu2_items); - - entry1 = GTK_COMBO (GtkCombo_Spu2)->entry; - gtk_widget_show (entry1); - gtk_entry_set_invisible_char (GTK_ENTRY (entry1), 8226); - hbuttonbox12 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox12); gtk_table_attach (GTK_TABLE (table2), hbuttonbox12, 1, 2, 2, 3, @@ -902,21 +834,6 @@ create_ConfDlg (void) gtk_container_add (GTK_CONTAINER (hbuttonbox12), GtkButton_SPU2about); GTK_WIDGET_SET_FLAGS (GtkButton_SPU2about, GTK_CAN_DEFAULT); - GtkCombo_Dev9 = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Dev9)->popwin), - "GladeParentKey", GtkCombo_Dev9); - gtk_widget_show (GtkCombo_Dev9); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Dev9, 0, 1, 7, 8, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_Dev9_items = g_list_append (GtkCombo_Dev9_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Dev9), GtkCombo_Dev9_items); - g_list_free (GtkCombo_Dev9_items); - - entry3 = GTK_COMBO (GtkCombo_Dev9)->entry; - gtk_widget_show (entry3); - gtk_entry_set_invisible_char (GTK_ENTRY (entry3), 8226); - hbuttonbox21 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox21); gtk_table_attach (GTK_TABLE (table2), hbuttonbox21, 0, 1, 8, 9, @@ -954,21 +871,6 @@ create_ConfDlg (void) gtk_label_set_justify (GTK_LABEL (GtkLabel_Cdvdrom), GTK_JUSTIFY_CENTER); gtk_misc_set_alignment (GTK_MISC (GtkLabel_Cdvdrom), 0, 0.5); - GtkCombo_Cdvd = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Cdvd)->popwin), - "GladeParentKey", GtkCombo_Cdvd); - gtk_widget_show (GtkCombo_Cdvd); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Cdvd, 1, 2, 7, 8, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_Cdvd_items = g_list_append (GtkCombo_Cdvd_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Cdvd), GtkCombo_Cdvd_items); - g_list_free (GtkCombo_Cdvd_items); - - entry2 = GTK_COMBO (GtkCombo_Cdvd)->entry; - gtk_widget_show (entry2); - gtk_entry_set_invisible_char (GTK_ENTRY (entry2), 8226); - hbuttonbox13 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox13); gtk_table_attach (GTK_TABLE (table2), hbuttonbox13, 1, 2, 8, 9, @@ -998,21 +900,6 @@ create_ConfDlg (void) gtk_label_set_justify (GTK_LABEL (label29), GTK_JUSTIFY_CENTER); gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5); - GtkCombo_Usb = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Usb)->popwin), - "GladeParentKey", GtkCombo_Usb); - gtk_widget_show (GtkCombo_Usb); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Usb, 0, 1, 10, 11, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_Usb_items = g_list_append (GtkCombo_Usb_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Usb), GtkCombo_Usb_items); - g_list_free (GtkCombo_Usb_items); - - entry4 = GTK_COMBO (GtkCombo_Usb)->entry; - gtk_widget_show (entry4); - gtk_entry_set_invisible_char (GTK_ENTRY (entry4), 8226); - hbuttonbox23 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox23); gtk_table_attach (GTK_TABLE (table2), hbuttonbox23, 0, 1, 11, 12, @@ -1034,36 +921,6 @@ create_ConfDlg (void) gtk_container_add (GTK_CONTAINER (hbuttonbox23), GtkButton_USBabout); GTK_WIDGET_SET_FLAGS (GtkButton_USBabout, GTK_CAN_DEFAULT); - GtkCombo_Bios = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Bios)->popwin), - "GladeParentKey", GtkCombo_Bios); - gtk_widget_show (GtkCombo_Bios); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Bios, 1, 2, 13, 14, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_Bios_items = g_list_append (GtkCombo_Bios_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Bios), GtkCombo_Bios_items); - g_list_free (GtkCombo_Bios_items); - - combo_entry7 = GTK_COMBO (GtkCombo_Bios)->entry; - gtk_widget_show (combo_entry7); - gtk_entry_set_invisible_char (GTK_ENTRY (combo_entry7), 8226); - - GtkCombo_FW = gtk_combo_new (); - g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_FW)->popwin), - "GladeParentKey", GtkCombo_FW); - gtk_widget_show (GtkCombo_FW); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_FW, 1, 2, 10, 11, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - GtkCombo_FW_items = g_list_append (GtkCombo_FW_items, (gpointer) ""); - gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_FW), GtkCombo_FW_items); - g_list_free (GtkCombo_FW_items); - - entry5 = GTK_COMBO (GtkCombo_FW)->entry; - gtk_widget_show (entry5); - gtk_entry_set_invisible_char (GTK_ENTRY (entry5), 8226); - hbuttonbox24 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox24); gtk_table_attach (GTK_TABLE (table2), hbuttonbox24, 1, 2, 11, 12, @@ -1101,6 +958,60 @@ create_ConfDlg (void) gtk_label_set_justify (GTK_LABEL (GtkLabel_Bios), GTK_JUSTIFY_CENTER); gtk_misc_set_alignment (GTK_MISC (GtkLabel_Bios), 0, 0.5); + GtkCombo_Gs = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_Gs); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Gs, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + GtkCombo_Spu2 = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_Spu2); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Spu2, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + GtkCombo_Pad1 = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_Pad1); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Pad1, 0, 1, 4, 5, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + GtkCombo_Pad2 = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_Pad2); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Pad2, 1, 2, 4, 5, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + GtkCombo_Dev9 = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_Dev9); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Dev9, 0, 1, 7, 8, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + GtkCombo_Cdvd = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_Cdvd); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Cdvd, 1, 2, 7, 8, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + GtkCombo_Usb = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_Usb); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Usb, 0, 1, 10, 11, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + GtkCombo_FW = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_FW); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_FW, 1, 2, 10, 11, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + GtkCombo_Bios = gtk_combo_box_new_text (); + gtk_widget_show (GtkCombo_Bios); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Bios, 1, 2, 13, 14, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + hbox5 = gtk_hbox_new (FALSE, 14); gtk_widget_show (hbox5); gtk_box_pack_start (GTK_BOX (vbox12), hbox5, TRUE, TRUE, 0); @@ -1223,10 +1134,6 @@ create_ConfDlg (void) GLADE_HOOKUP_OBJECT_NO_REF (ConfDlg, ConfDlg, "ConfDlg"); GLADE_HOOKUP_OBJECT (ConfDlg, vbox12, "vbox12"); GLADE_HOOKUP_OBJECT (ConfDlg, table2, "table2"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Pad1, "GtkCombo_Pad1"); - GLADE_HOOKUP_OBJECT (ConfDlg, combo_entry4, "combo_entry4"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Pad2, "GtkCombo_Pad2"); - GLADE_HOOKUP_OBJECT (ConfDlg, combo_entry5, "combo_entry5"); GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox6, "hbuttonbox6"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_PAD2configure, "GtkButton_PAD2configure"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_PAD2test, "GtkButton_PAD2test"); @@ -1242,46 +1149,41 @@ create_ConfDlg (void) GLADE_HOOKUP_OBJECT (ConfDlg, GtkLabel_Graphics, "GtkLabel_Graphics"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkLabel_FirstController, "GtkLabel_FirstController"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkLabel_SecondController, "GtkLabel_SecondController"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Gs, "GtkCombo_Gs"); - GLADE_HOOKUP_OBJECT (ConfDlg, combo_entry2, "combo_entry2"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkLabel_Sound, "GtkLabel_Sound"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Spu2, "GtkCombo_Spu2"); - GLADE_HOOKUP_OBJECT (ConfDlg, entry1, "entry1"); GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox12, "hbuttonbox12"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_SPU2configure, "GtkButton_SPU2configure"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_SPU2test, "GtkButton_SPU2test"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_SPU2about, "GtkButton_SPU2about"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Dev9, "GtkCombo_Dev9"); - GLADE_HOOKUP_OBJECT (ConfDlg, entry3, "entry3"); GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox21, "hbuttonbox21"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_DEV9configure, "GtkButton_DEV9configure"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_DEV9test, "GtkButton_DEV9test"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_DEV9about, "GtkButton_DEV9about"); GLADE_HOOKUP_OBJECT (ConfDlg, label23, "label23"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkLabel_Cdvdrom, "GtkLabel_Cdvdrom"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Cdvd, "GtkCombo_Cdvd"); - GLADE_HOOKUP_OBJECT (ConfDlg, entry2, "entry2"); GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox13, "hbuttonbox13"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_CDVDconfigure, "GtkButton_CDVDconfigure"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_CDVDtest, "GtkButton_CDVDtest"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_CDVDabout, "GtkButton_CDVDabout"); GLADE_HOOKUP_OBJECT (ConfDlg, label29, "label29"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Usb, "GtkCombo_Usb"); - GLADE_HOOKUP_OBJECT (ConfDlg, entry4, "entry4"); GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox23, "hbuttonbox23"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_USBconfigure, "GtkButton_USBconfigure"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_USBtest, "GtkButton_USBtest"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_USBabout, "GtkButton_USBabout"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Bios, "GtkCombo_Bios"); - GLADE_HOOKUP_OBJECT (ConfDlg, combo_entry7, "combo_entry7"); - GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_FW, "GtkCombo_FW"); - GLADE_HOOKUP_OBJECT (ConfDlg, entry5, "entry5"); GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox24, "hbuttonbox24"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FWconfigure, "GtkButton_FWconfigure"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FWtest, "GtkButton_FWtest"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FireWireabout, "GtkButton_FireWireabout"); GLADE_HOOKUP_OBJECT (ConfDlg, label30, "label30"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkLabel_Bios, "GtkLabel_Bios"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Gs, "GtkCombo_Gs"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Spu2, "GtkCombo_Spu2"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Pad1, "GtkCombo_Pad1"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Pad2, "GtkCombo_Pad2"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Dev9, "GtkCombo_Dev9"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Cdvd, "GtkCombo_Cdvd"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Usb, "GtkCombo_Usb"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_FW, "GtkCombo_FW"); + GLADE_HOOKUP_OBJECT (ConfDlg, GtkCombo_Bios, "GtkCombo_Bios"); GLADE_HOOKUP_OBJECT (ConfDlg, hbox5, "hbox5"); GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox11, "hbuttonbox11"); GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_SelectPluginsDir, "GtkButton_SelectPluginsDir"); @@ -1571,7 +1473,7 @@ create_DebugWnd (void) hbox16 = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox16); - gtk_box_pack_start (GTK_BOX (vbox16), hbox16, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox16), hbox16, FALSE, TRUE, 0); GtkRadioButton_EE = gtk_radio_button_new_with_mnemonic (NULL, _("EE Debug Mode")); gtk_widget_show (GtkRadioButton_EE); @@ -1608,18 +1510,19 @@ create_DebugWnd (void) gtk_widget_show (GtkList_DisView); gtk_container_add (GTK_CONTAINER (viewport1), GtkList_DisView); GTK_WIDGET_UNSET_FLAGS (GtkList_DisView, GTK_CAN_FOCUS); + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (GtkList_DisView), FALSE); GtkVScrollbar_VList = gtk_vscrollbar_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 412, 1, 20, 2))); gtk_widget_show (GtkVScrollbar_VList); - gtk_box_pack_start (GTK_BOX (hbox7), GtkVScrollbar_VList, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (hbox7), GtkVScrollbar_VList, FALSE, TRUE, 0); vbox22 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox22); - gtk_box_pack_start (GTK_BOX (hbox6), vbox22, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (hbox6), vbox22, FALSE, TRUE, 0); vbuttonbox2 = gtk_vbutton_box_new (); gtk_widget_show (vbuttonbox2); - gtk_box_pack_start (GTK_BOX (vbox22), vbuttonbox2, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox22), vbuttonbox2, FALSE, TRUE, 0); button52 = gtk_button_new_with_mnemonic (_("Step")); gtk_widget_show (button52); @@ -1643,7 +1546,7 @@ create_DebugWnd (void) vbuttonbox3 = gtk_vbutton_box_new (); gtk_widget_show (vbuttonbox3); - gtk_box_pack_start (GTK_BOX (vbox22), vbuttonbox3, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox22), vbuttonbox3, FALSE, TRUE, 0); button58 = gtk_button_new_with_mnemonic (_("Set PC")); gtk_widget_show (button58); @@ -1667,7 +1570,7 @@ create_DebugWnd (void) vbuttonbox1 = gtk_vbutton_box_new (); gtk_widget_show (vbuttonbox1); - gtk_box_pack_start (GTK_BOX (vbox22), vbuttonbox1, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox22), vbuttonbox1, FALSE, TRUE, 0); button39 = gtk_button_new_with_mnemonic (_("Dump code")); gtk_widget_show (button39); @@ -1686,7 +1589,7 @@ create_DebugWnd (void) vbuttonbox4 = gtk_vbutton_box_new (); gtk_widget_show (vbuttonbox4); - gtk_box_pack_start (GTK_BOX (hbox6), vbuttonbox4, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (hbox6), vbuttonbox4, FALSE, TRUE, 0); gtk_box_set_spacing (GTK_BOX (vbuttonbox4), 10); button68 = gtk_button_new_with_mnemonic (_("memWrite32")); @@ -2757,3 +2660,646 @@ create_MemWrite32 (void) return MemWrite32; } +GtkWidget* +create_GameFixDlg (void) +{ + GtkWidget *GameFixDlg; + GtkWidget *dialog_vbox1; + GtkWidget *GameSettings; + GtkWidget *alignment5; + GtkWidget *vbox30; + GtkWidget *check_VU_Clip; + GtkWidget *check_FPU_Clamp; + GtkWidget *check_Slow_DVD; + GtkWidget *check_VU_Branch; + GtkWidget *label42; + GtkWidget *dialog_action_area1; + GtkWidget *cancelbutton1; + GtkWidget *button83; + + GameFixDlg = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (GameFixDlg), _("Game Special Fixes")); + gtk_window_set_type_hint (GTK_WINDOW (GameFixDlg), GDK_WINDOW_TYPE_HINT_DIALOG); + + dialog_vbox1 = GTK_DIALOG (GameFixDlg)->vbox; + gtk_widget_show (dialog_vbox1); + + GameSettings = gtk_frame_new (NULL); + gtk_widget_show (GameSettings); + gtk_box_pack_start (GTK_BOX (dialog_vbox1), GameSettings, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (GameSettings), GTK_SHADOW_NONE); + + alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment5); + gtk_container_add (GTK_CONTAINER (GameSettings), alignment5); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 0); + + vbox30 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox30); + gtk_container_add (GTK_CONTAINER (alignment5), vbox30); + + check_VU_Clip = gtk_check_button_new_with_mnemonic (_("VU Clip Hack - Special fix for God of War; Breaks Rockstar games!")); + gtk_widget_show (check_VU_Clip); + gtk_box_pack_start (GTK_BOX (vbox30), check_VU_Clip, FALSE, FALSE, 0); + + check_FPU_Clamp = gtk_check_button_new_with_mnemonic (_("FPU Clamp Hack - Special fix for Tekken 5 and maybe other games.")); + gtk_widget_show (check_FPU_Clamp); + gtk_box_pack_start (GTK_BOX (vbox30), check_FPU_Clamp, FALSE, FALSE, 0); + + check_Slow_DVD = gtk_check_button_new_with_mnemonic (_("Slow DVD access (fixes Tales of the Abyss)")); + gtk_widget_show (check_Slow_DVD); + gtk_box_pack_start (GTK_BOX (vbox30), check_Slow_DVD, FALSE, FALSE, 0); + + check_VU_Branch = gtk_check_button_new_with_mnemonic (_("VU Branch Hack - Special fix for Magna Carta; Breaks Crash Bandicoot!")); + gtk_widget_show (check_VU_Branch); + gtk_box_pack_start (GTK_BOX (vbox30), check_VU_Branch, FALSE, FALSE, 0); + + label42 = gtk_label_new (_("Some games need special settings.\nConfigure them here.")); + gtk_widget_show (label42); + gtk_frame_set_label_widget (GTK_FRAME (GameSettings), label42); + gtk_label_set_use_markup (GTK_LABEL (label42), TRUE); + + dialog_action_area1 = GTK_DIALOG (GameFixDlg)->action_area; + gtk_widget_show (dialog_action_area1); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END); + + cancelbutton1 = gtk_button_new_from_stock ("gtk-ok"); + gtk_widget_show (cancelbutton1); + gtk_dialog_add_action_widget (GTK_DIALOG (GameFixDlg), cancelbutton1, GTK_RESPONSE_OK); + GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT); + + button83 = gtk_button_new_from_stock ("gtk-cancel"); + gtk_widget_show (button83); + gtk_dialog_add_action_widget (GTK_DIALOG (GameFixDlg), button83, GTK_RESPONSE_CANCEL); + GTK_WIDGET_SET_FLAGS (button83, GTK_CAN_DEFAULT); + + g_signal_connect ((gpointer) cancelbutton1, "clicked", + G_CALLBACK (on_Game_Fix_OK), + NULL); + g_signal_connect ((gpointer) button83, "clicked", + G_CALLBACK (on_Game_Fix_Cancel), + NULL); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (GameFixDlg, GameFixDlg, "GameFixDlg"); + GLADE_HOOKUP_OBJECT_NO_REF (GameFixDlg, dialog_vbox1, "dialog_vbox1"); + GLADE_HOOKUP_OBJECT (GameFixDlg, GameSettings, "GameSettings"); + GLADE_HOOKUP_OBJECT (GameFixDlg, alignment5, "alignment5"); + GLADE_HOOKUP_OBJECT (GameFixDlg, vbox30, "vbox30"); + GLADE_HOOKUP_OBJECT (GameFixDlg, check_VU_Clip, "check_VU_Clip"); + GLADE_HOOKUP_OBJECT (GameFixDlg, check_FPU_Clamp, "check_FPU_Clamp"); + GLADE_HOOKUP_OBJECT (GameFixDlg, check_Slow_DVD, "check_Slow_DVD"); + GLADE_HOOKUP_OBJECT (GameFixDlg, check_VU_Branch, "check_VU_Branch"); + GLADE_HOOKUP_OBJECT (GameFixDlg, label42, "label42"); + GLADE_HOOKUP_OBJECT_NO_REF (GameFixDlg, dialog_action_area1, "dialog_action_area1"); + GLADE_HOOKUP_OBJECT (GameFixDlg, cancelbutton1, "cancelbutton1"); + GLADE_HOOKUP_OBJECT (GameFixDlg, button83, "button83"); + + return GameFixDlg; +} + +GtkWidget* +create_SpeedHacksDlg (void) +{ + GtkWidget *SpeedHacksDlg; + GtkWidget *dialog_vbox3; + GtkWidget *vbox31; + GtkWidget *label43; + GtkWidget *frame11; + GtkWidget *alignment6; + GtkWidget *vbox32; + GtkWidget *hbox22; + GtkWidget *ComboVUOverflow; + GtkWidget *label52; + GtkWidget *hbox23; + GtkWidget *ComboFPUOverflow; + GtkWidget *label53; + GtkWidget *check_Disable_Underflow; + GtkWidget *label44; + GtkWidget *frame12; + GtkWidget *alignment7; + GtkWidget *vbox35; + GtkWidget *check_Disable_VU_Flags; + GtkWidget *check_Disable_FPU_Flags; + GtkWidget *label45; + GtkWidget *frame13; + GtkWidget *alignment8; + GtkWidget *vbox34; + GtkWidget *check_EE_Double_Sync; + GtkWidget *check_IOP_Double_Sync; + GtkWidget *check_Triple_Sync; + GtkWidget *label46; + GtkWidget *frame14; + GtkWidget *alignment9; + GtkWidget *vbox33; + GtkWidget *check_EE_Fast_Branches; + GtkWidget *check_Tight_SPU_Sync; + GtkWidget *check_ESC_Hack; + GtkWidget *label47; + GtkWidget *dialog_action_area3; + GtkWidget *button73; + GtkWidget *button74; + GtkWidget *button75; + GtkWidget *button76; + + SpeedHacksDlg = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (SpeedHacksDlg), _("PCSX2 Speed Hacks")); + gtk_window_set_type_hint (GTK_WINDOW (SpeedHacksDlg), GDK_WINDOW_TYPE_HINT_DIALOG); + + dialog_vbox3 = GTK_DIALOG (SpeedHacksDlg)->vbox; + gtk_widget_show (dialog_vbox3); + + vbox31 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox31); + gtk_box_pack_start (GTK_BOX (dialog_vbox3), vbox31, TRUE, TRUE, 0); + + label43 = gtk_label_new (_("These hacks will affect the speed of PCSX2 but possibly compromise compatibility.\nIf you have problems, Disable all of these and try again.")); + gtk_widget_show (label43); + gtk_box_pack_start (GTK_BOX (vbox31), label43, FALSE, FALSE, 0); + gtk_label_set_justify (GTK_LABEL (label43), GTK_JUSTIFY_CENTER); + + frame11 = gtk_frame_new (NULL); + gtk_widget_show (frame11); + gtk_box_pack_start (GTK_BOX (vbox31), frame11, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame11), GTK_SHADOW_NONE); + + alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment6); + gtk_container_add (GTK_CONTAINER (frame11), alignment6); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 0, 0, 12, 0); + + vbox32 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox32); + gtk_container_add (GTK_CONTAINER (alignment6), vbox32); + + hbox22 = gtk_hbox_new (FALSE, 0); + gtk_widget_show (hbox22); + gtk_box_pack_start (GTK_BOX (vbox32), hbox22, FALSE, FALSE, 0); + + ComboVUOverflow = gtk_combo_box_new_text (); + gtk_widget_show (ComboVUOverflow); + gtk_box_pack_start (GTK_BOX (hbox22), ComboVUOverflow, FALSE, TRUE, 0); + gtk_combo_box_append_text (GTK_COMBO_BOX (ComboVUOverflow), _("Disabled (Speedup!)")); + gtk_combo_box_append_text (GTK_COMBO_BOX (ComboVUOverflow), _("Normal")); + gtk_combo_box_append_text (GTK_COMBO_BOX (ComboVUOverflow), _("Enabled (Helps SPS, Slow)")); + + label52 = gtk_label_new (_("VU Overflow Checks")); + gtk_widget_show (label52); + gtk_box_pack_start (GTK_BOX (hbox22), label52, FALSE, FALSE, 0); + + hbox23 = gtk_hbox_new (FALSE, 0); + gtk_widget_show (hbox23); + gtk_box_pack_start (GTK_BOX (vbox32), hbox23, FALSE, FALSE, 0); + + ComboFPUOverflow = gtk_combo_box_new_text (); + gtk_widget_show (ComboFPUOverflow); + gtk_box_pack_start (GTK_BOX (hbox23), ComboFPUOverflow, FALSE, TRUE, 0); + gtk_combo_box_append_text (GTK_COMBO_BOX (ComboFPUOverflow), _("Disabled (Speedup!)")); + gtk_combo_box_append_text (GTK_COMBO_BOX (ComboFPUOverflow), _("Normal")); + gtk_combo_box_append_text (GTK_COMBO_BOX (ComboFPUOverflow), _("Enabled (Helps SPS, Slow)")); + + label53 = gtk_label_new (_("FPU Overflow Checks")); + gtk_widget_show (label53); + gtk_box_pack_start (GTK_BOX (hbox23), label53, FALSE, FALSE, 0); + + check_Disable_Underflow = gtk_check_button_new_with_mnemonic (_("Disable Underflow Checks - *Checked = Disables underflow checks. ( Speedup! )")); + gtk_widget_show (check_Disable_Underflow); + gtk_box_pack_start (GTK_BOX (vbox32), check_Disable_Underflow, FALSE, FALSE, 0); + + label44 = gtk_label_new (_("Overflow and Underflow")); + gtk_widget_show (label44); + gtk_frame_set_label_widget (GTK_FRAME (frame11), label44); + gtk_label_set_use_markup (GTK_LABEL (label44), TRUE); + + frame12 = gtk_frame_new (NULL); + gtk_widget_show (frame12); + gtk_box_pack_start (GTK_BOX (vbox31), frame12, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame12), GTK_SHADOW_NONE); + + alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment7); + gtk_container_add (GTK_CONTAINER (frame12), alignment7); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 12, 0); + + vbox35 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox35); + gtk_container_add (GTK_CONTAINER (alignment7), vbox35); + + check_Disable_VU_Flags = gtk_check_button_new_with_mnemonic (_("Disable Extra VU Flags - When checked, PCSX2 doesn't set some flags that are rarely used by games. ( Speedup! )")); + gtk_widget_show (check_Disable_VU_Flags); + gtk_box_pack_start (GTK_BOX (vbox35), check_Disable_VU_Flags, FALSE, FALSE, 0); + + check_Disable_FPU_Flags = gtk_check_button_new_with_mnemonic (_("Disable Extra FPU Flags - When checked, PCSX2 doesn't set some flags that are rarely used by games. ( Speedup! )")); + gtk_widget_show (check_Disable_FPU_Flags); + gtk_box_pack_start (GTK_BOX (vbox35), check_Disable_FPU_Flags, FALSE, FALSE, 0); + + label45 = gtk_label_new (_("Flag Settings")); + gtk_widget_show (label45); + gtk_frame_set_label_widget (GTK_FRAME (frame12), label45); + gtk_label_set_use_markup (GTK_LABEL (label45), TRUE); + + frame13 = gtk_frame_new (NULL); + gtk_widget_show (frame13); + gtk_box_pack_start (GTK_BOX (vbox31), frame13, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame13), GTK_SHADOW_NONE); + + alignment8 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment8); + gtk_container_add (GTK_CONTAINER (frame13), alignment8); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment8), 0, 0, 12, 0); + + vbox34 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox34); + gtk_container_add (GTK_CONTAINER (alignment8), vbox34); + + check_EE_Double_Sync = gtk_check_button_new_with_mnemonic (_("EE Sync Hack (x2) - Doubles the cycle rate of the EE. ( Big Speedup in most games! )")); + gtk_widget_show (check_EE_Double_Sync); + gtk_box_pack_start (GTK_BOX (vbox34), check_EE_Double_Sync, FALSE, FALSE, 0); + + check_IOP_Double_Sync = gtk_check_button_new_with_mnemonic (_("IOP Sync Hack (x2) - Doubles the cycle rate of the IOP. ( Speedup but breaks some games. )")); + gtk_widget_show (check_IOP_Double_Sync); + gtk_box_pack_start (GTK_BOX (vbox34), check_IOP_Double_Sync, FALSE, FALSE, 0); + + check_Triple_Sync = gtk_check_button_new_with_mnemonic (_("EE/IOP Sync Hack (x3) - Makes EE and IOP hacks triple the cycle rate. ( Sometimes speeds games a bit more, but can break games. )")); + gtk_widget_show (check_Triple_Sync); + gtk_box_pack_start (GTK_BOX (vbox34), check_Triple_Sync, FALSE, FALSE, 0); + + label46 = gtk_label_new (_("Sync Hacks")); + gtk_widget_show (label46); + gtk_frame_set_label_widget (GTK_FRAME (frame13), label46); + gtk_label_set_use_markup (GTK_LABEL (label46), TRUE); + + frame14 = gtk_frame_new (NULL); + gtk_widget_show (frame14); + gtk_box_pack_start (GTK_BOX (vbox31), frame14, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame14), GTK_SHADOW_NONE); + + alignment9 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment9); + gtk_container_add (GTK_CONTAINER (frame14), alignment9); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment9), 0, 0, 12, 0); + + vbox33 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox33); + gtk_container_add (GTK_CONTAINER (alignment9), vbox33); + + check_EE_Fast_Branches = gtk_check_button_new_with_mnemonic (_("EE/IOP Fast Branches - Quick branching ( Very small speedup; Not Recommended! )")); + gtk_widget_show (check_EE_Fast_Branches); + gtk_box_pack_start (GTK_BOX (vbox33), check_EE_Fast_Branches, FALSE, FALSE, 0); + + check_Tight_SPU_Sync = gtk_check_button_new_with_mnemonic (_("Tighter SPU2 Sync ( FFXII vids) - Slower, not very useful anymore.")); + gtk_widget_show (check_Tight_SPU_Sync); + gtk_box_pack_start (GTK_BOX (vbox33), check_Tight_SPU_Sync, FALSE, FALSE, 0); + + check_ESC_Hack = gtk_check_button_new_with_mnemonic (_("Escape Hack - Use Esc key to fully exit PCSX2.")); + gtk_widget_show (check_ESC_Hack); + gtk_box_pack_start (GTK_BOX (vbox33), check_ESC_Hack, FALSE, FALSE, 0); + + label47 = gtk_label_new (_("Misc")); + gtk_widget_show (label47); + gtk_frame_set_label_widget (GTK_FRAME (frame14), label47); + gtk_label_set_use_markup (GTK_LABEL (label47), TRUE); + + dialog_action_area3 = GTK_DIALOG (SpeedHacksDlg)->action_area; + gtk_widget_show (dialog_action_area3); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END); + + button73 = gtk_button_new_with_mnemonic (_("Compatability")); + gtk_widget_show (button73); + gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button73, 0); + GTK_WIDGET_SET_FLAGS (button73, GTK_CAN_DEFAULT); + + button74 = gtk_button_new_with_mnemonic (_("Speed")); + gtk_widget_show (button74); + gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button74, 0); + GTK_WIDGET_SET_FLAGS (button74, GTK_CAN_DEFAULT); + + button75 = gtk_button_new_from_stock ("gtk-ok"); + gtk_widget_show (button75); + gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button75, GTK_RESPONSE_OK); + GTK_WIDGET_SET_FLAGS (button75, GTK_CAN_DEFAULT); + + button76 = gtk_button_new_from_stock ("gtk-cancel"); + gtk_widget_show (button76); + gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button76, GTK_RESPONSE_CANCEL); + GTK_WIDGET_SET_FLAGS (button76, GTK_CAN_DEFAULT); + + g_signal_connect ((gpointer) button73, "clicked", + G_CALLBACK (on_Speed_Hack_Compatability), + NULL); + g_signal_connect ((gpointer) button74, "clicked", + G_CALLBACK (on_Speed_Hack_Speed), + NULL); + g_signal_connect ((gpointer) button75, "clicked", + G_CALLBACK (on_Speed_Hack_OK), + NULL); + g_signal_connect ((gpointer) button76, "clicked", + G_CALLBACK (on_Speed_Hack_Cancel), + NULL); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (SpeedHacksDlg, SpeedHacksDlg, "SpeedHacksDlg"); + GLADE_HOOKUP_OBJECT_NO_REF (SpeedHacksDlg, dialog_vbox3, "dialog_vbox3"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, vbox31, "vbox31"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, label43, "label43"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, frame11, "frame11"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, alignment6, "alignment6"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, vbox32, "vbox32"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, hbox22, "hbox22"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, ComboVUOverflow, "ComboVUOverflow"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, label52, "label52"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, hbox23, "hbox23"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, ComboFPUOverflow, "ComboFPUOverflow"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, label53, "label53"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_Disable_Underflow, "check_Disable_Underflow"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, label44, "label44"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, frame12, "frame12"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, alignment7, "alignment7"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, vbox35, "vbox35"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_Disable_VU_Flags, "check_Disable_VU_Flags"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_Disable_FPU_Flags, "check_Disable_FPU_Flags"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, label45, "label45"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, frame13, "frame13"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, alignment8, "alignment8"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, vbox34, "vbox34"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_EE_Double_Sync, "check_EE_Double_Sync"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_IOP_Double_Sync, "check_IOP_Double_Sync"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_Triple_Sync, "check_Triple_Sync"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, label46, "label46"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, frame14, "frame14"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, alignment9, "alignment9"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, vbox33, "vbox33"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_EE_Fast_Branches, "check_EE_Fast_Branches"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_Tight_SPU_Sync, "check_Tight_SPU_Sync"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_ESC_Hack, "check_ESC_Hack"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, label47, "label47"); + GLADE_HOOKUP_OBJECT_NO_REF (SpeedHacksDlg, dialog_action_area3, "dialog_action_area3"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button73, "button73"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button74, "button74"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button75, "button75"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button76, "button76"); + + return SpeedHacksDlg; +} + +GtkWidget* +create_AdvDlg (void) +{ + GtkWidget *AdvDlg; + GtkWidget *dialog_vbox4; + GtkWidget *hbox21; + GtkWidget *frame15; + GtkWidget *alignment10; + GtkWidget *vbox36; + GtkWidget *frame17; + GtkWidget *alignment12; + GtkWidget *vbox38; + GtkWidget *radio_EE_Round_Near; + GSList *radio_EE_Round_Near_group = NULL; + GtkWidget *radio_EE_Round_Negative; + GtkWidget *radio_EE_Round_Positive; + GtkWidget *radio_EE_Round_Zero; + GtkWidget *label50; + GtkWidget *check_EE_Flush_Zero; + GtkWidget *check_EE_Denormal_Zero; + GtkWidget *label48; + GtkWidget *frame16; + GtkWidget *alignment11; + GtkWidget *vbox37; + GtkWidget *frame18; + GtkWidget *alignment13; + GtkWidget *vbox39; + GtkWidget *radio_VU_Round_Near; + GSList *radio_VU_Round_Near_group = NULL; + GtkWidget *radio_VU_Round_Negative; + GtkWidget *radio_VU_Round_Positive; + GtkWidget *radio_VU_Round_Zero; + GtkWidget *label51; + GtkWidget *check_VU_Flush_Zero; + GtkWidget *check_VU_Denormal_Zero; + GtkWidget *label49; + GtkWidget *dialog_action_area4; + GtkWidget *AdvDefaultBtn; + GtkWidget *button79; + GtkWidget *button80; + + AdvDlg = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (AdvDlg), _("Advanced Options")); + gtk_window_set_type_hint (GTK_WINDOW (AdvDlg), GDK_WINDOW_TYPE_HINT_DIALOG); + + dialog_vbox4 = GTK_DIALOG (AdvDlg)->vbox; + gtk_widget_show (dialog_vbox4); + + hbox21 = gtk_hbox_new (FALSE, 0); + gtk_widget_show (hbox21); + gtk_box_pack_start (GTK_BOX (dialog_vbox4), hbox21, TRUE, TRUE, 0); + + frame15 = gtk_frame_new (NULL); + gtk_widget_show (frame15); + gtk_box_pack_start (GTK_BOX (hbox21), frame15, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame15), GTK_SHADOW_NONE); + + alignment10 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment10); + gtk_container_add (GTK_CONTAINER (frame15), alignment10); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment10), 0, 0, 12, 0); + + vbox36 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox36); + gtk_container_add (GTK_CONTAINER (alignment10), vbox36); + + frame17 = gtk_frame_new (NULL); + gtk_widget_show (frame17); + gtk_box_pack_start (GTK_BOX (vbox36), frame17, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame17), GTK_SHADOW_NONE); + + alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment12); + gtk_container_add (GTK_CONTAINER (frame17), alignment12); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 0, 0, 12, 0); + + vbox38 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox38); + gtk_container_add (GTK_CONTAINER (alignment12), vbox38); + + radio_EE_Round_Near = gtk_radio_button_new_with_mnemonic (NULL, _("Nearest")); + gtk_widget_show (radio_EE_Round_Near); + gtk_box_pack_start (GTK_BOX (vbox38), radio_EE_Round_Near, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_EE_Round_Near), radio_EE_Round_Near_group); + radio_EE_Round_Near_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_EE_Round_Near)); + + radio_EE_Round_Negative = gtk_radio_button_new_with_mnemonic (NULL, _("Negative")); + gtk_widget_show (radio_EE_Round_Negative); + gtk_box_pack_start (GTK_BOX (vbox38), radio_EE_Round_Negative, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_EE_Round_Negative), radio_EE_Round_Near_group); + radio_EE_Round_Near_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_EE_Round_Negative)); + + radio_EE_Round_Positive = gtk_radio_button_new_with_mnemonic (NULL, _("Positive")); + gtk_widget_show (radio_EE_Round_Positive); + gtk_box_pack_start (GTK_BOX (vbox38), radio_EE_Round_Positive, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_EE_Round_Positive), radio_EE_Round_Near_group); + radio_EE_Round_Near_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_EE_Round_Positive)); + + radio_EE_Round_Zero = gtk_radio_button_new_with_mnemonic (NULL, _("Zero")); + gtk_widget_show (radio_EE_Round_Zero); + gtk_box_pack_start (GTK_BOX (vbox38), radio_EE_Round_Zero, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_EE_Round_Zero), radio_EE_Round_Near_group); + radio_EE_Round_Near_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_EE_Round_Zero)); + + label50 = gtk_label_new (_("Roundmode")); + gtk_widget_show (label50); + gtk_frame_set_label_widget (GTK_FRAME (frame17), label50); + gtk_label_set_use_markup (GTK_LABEL (label50), TRUE); + + check_EE_Flush_Zero = gtk_check_button_new_with_mnemonic (_("Flush to Zero")); + gtk_widget_show (check_EE_Flush_Zero); + gtk_box_pack_start (GTK_BOX (vbox36), check_EE_Flush_Zero, FALSE, FALSE, 0); + + check_EE_Denormal_Zero = gtk_check_button_new_with_mnemonic (_("Denormals are Zero")); + gtk_widget_show (check_EE_Denormal_Zero); + gtk_box_pack_start (GTK_BOX (vbox36), check_EE_Denormal_Zero, FALSE, FALSE, 0); + + label48 = gtk_label_new (_("EE Recs Options")); + gtk_widget_show (label48); + gtk_frame_set_label_widget (GTK_FRAME (frame15), label48); + gtk_label_set_use_markup (GTK_LABEL (label48), TRUE); + + frame16 = gtk_frame_new (NULL); + gtk_widget_show (frame16); + gtk_box_pack_start (GTK_BOX (hbox21), frame16, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame16), GTK_SHADOW_NONE); + + alignment11 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment11); + gtk_container_add (GTK_CONTAINER (frame16), alignment11); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment11), 0, 0, 12, 0); + + vbox37 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox37); + gtk_container_add (GTK_CONTAINER (alignment11), vbox37); + + frame18 = gtk_frame_new (NULL); + gtk_widget_show (frame18); + gtk_box_pack_start (GTK_BOX (vbox37), frame18, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame18), GTK_SHADOW_NONE); + + alignment13 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment13); + gtk_container_add (GTK_CONTAINER (frame18), alignment13); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment13), 0, 0, 12, 0); + + vbox39 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox39); + gtk_container_add (GTK_CONTAINER (alignment13), vbox39); + + radio_VU_Round_Near = gtk_radio_button_new_with_mnemonic (NULL, _("Nearest")); + gtk_widget_show (radio_VU_Round_Near); + gtk_box_pack_start (GTK_BOX (vbox39), radio_VU_Round_Near, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_VU_Round_Near), radio_VU_Round_Near_group); + radio_VU_Round_Near_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_VU_Round_Near)); + + radio_VU_Round_Negative = gtk_radio_button_new_with_mnemonic (NULL, _("Negative")); + gtk_widget_show (radio_VU_Round_Negative); + gtk_box_pack_start (GTK_BOX (vbox39), radio_VU_Round_Negative, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_VU_Round_Negative), radio_VU_Round_Near_group); + radio_VU_Round_Near_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_VU_Round_Negative)); + + radio_VU_Round_Positive = gtk_radio_button_new_with_mnemonic (NULL, _("Positive")); + gtk_widget_show (radio_VU_Round_Positive); + gtk_box_pack_start (GTK_BOX (vbox39), radio_VU_Round_Positive, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_VU_Round_Positive), radio_VU_Round_Near_group); + radio_VU_Round_Near_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_VU_Round_Positive)); + + radio_VU_Round_Zero = gtk_radio_button_new_with_mnemonic (NULL, _("Zero")); + gtk_widget_show (radio_VU_Round_Zero); + gtk_box_pack_start (GTK_BOX (vbox39), radio_VU_Round_Zero, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_VU_Round_Zero), radio_VU_Round_Near_group); + radio_VU_Round_Near_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_VU_Round_Zero)); + + label51 = gtk_label_new (_("Roundmode")); + gtk_widget_show (label51); + gtk_frame_set_label_widget (GTK_FRAME (frame18), label51); + gtk_label_set_use_markup (GTK_LABEL (label51), TRUE); + + check_VU_Flush_Zero = gtk_check_button_new_with_mnemonic (_("Flush to Zero")); + gtk_widget_show (check_VU_Flush_Zero); + gtk_box_pack_start (GTK_BOX (vbox37), check_VU_Flush_Zero, FALSE, FALSE, 0); + + check_VU_Denormal_Zero = gtk_check_button_new_with_mnemonic (_("Denormals are Zero")); + gtk_widget_show (check_VU_Denormal_Zero); + gtk_box_pack_start (GTK_BOX (vbox37), check_VU_Denormal_Zero, FALSE, FALSE, 0); + + label49 = gtk_label_new (_("VU Recs Options")); + gtk_widget_show (label49); + gtk_frame_set_label_widget (GTK_FRAME (frame16), label49); + gtk_label_set_use_markup (GTK_LABEL (label49), TRUE); + + dialog_action_area4 = GTK_DIALOG (AdvDlg)->action_area; + gtk_widget_show (dialog_action_area4); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_SPREAD); + + AdvDefaultBtn = gtk_button_new_with_mnemonic (_("Defaults")); + gtk_widget_show (AdvDefaultBtn); + gtk_dialog_add_action_widget (GTK_DIALOG (AdvDlg), AdvDefaultBtn, 0); + GTK_WIDGET_SET_FLAGS (AdvDefaultBtn, GTK_CAN_DEFAULT); + + button79 = gtk_button_new_from_stock ("gtk-ok"); + gtk_widget_show (button79); + gtk_dialog_add_action_widget (GTK_DIALOG (AdvDlg), button79, GTK_RESPONSE_OK); + GTK_WIDGET_SET_FLAGS (button79, GTK_CAN_DEFAULT); + + button80 = gtk_button_new_from_stock ("gtk-cancel"); + gtk_widget_show (button80); + gtk_dialog_add_action_widget (GTK_DIALOG (AdvDlg), button80, GTK_RESPONSE_CANCEL); + GTK_WIDGET_SET_FLAGS (button80, GTK_CAN_DEFAULT); + + g_signal_connect ((gpointer) AdvDefaultBtn, "clicked", + G_CALLBACK (on_Advanced_Defaults), + NULL); + g_signal_connect ((gpointer) button79, "clicked", + G_CALLBACK (on_Advanced_OK), + NULL); + g_signal_connect ((gpointer) button80, "clicked", + G_CALLBACK (on_Advanced_Cancel), + NULL); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (AdvDlg, AdvDlg, "AdvDlg"); + GLADE_HOOKUP_OBJECT_NO_REF (AdvDlg, dialog_vbox4, "dialog_vbox4"); + GLADE_HOOKUP_OBJECT (AdvDlg, hbox21, "hbox21"); + GLADE_HOOKUP_OBJECT (AdvDlg, frame15, "frame15"); + GLADE_HOOKUP_OBJECT (AdvDlg, alignment10, "alignment10"); + GLADE_HOOKUP_OBJECT (AdvDlg, vbox36, "vbox36"); + GLADE_HOOKUP_OBJECT (AdvDlg, frame17, "frame17"); + GLADE_HOOKUP_OBJECT (AdvDlg, alignment12, "alignment12"); + GLADE_HOOKUP_OBJECT (AdvDlg, vbox38, "vbox38"); + GLADE_HOOKUP_OBJECT (AdvDlg, radio_EE_Round_Near, "radio_EE_Round_Near"); + GLADE_HOOKUP_OBJECT (AdvDlg, radio_EE_Round_Negative, "radio_EE_Round_Negative"); + GLADE_HOOKUP_OBJECT (AdvDlg, radio_EE_Round_Positive, "radio_EE_Round_Positive"); + GLADE_HOOKUP_OBJECT (AdvDlg, radio_EE_Round_Zero, "radio_EE_Round_Zero"); + GLADE_HOOKUP_OBJECT (AdvDlg, label50, "label50"); + GLADE_HOOKUP_OBJECT (AdvDlg, check_EE_Flush_Zero, "check_EE_Flush_Zero"); + GLADE_HOOKUP_OBJECT (AdvDlg, check_EE_Denormal_Zero, "check_EE_Denormal_Zero"); + GLADE_HOOKUP_OBJECT (AdvDlg, label48, "label48"); + GLADE_HOOKUP_OBJECT (AdvDlg, frame16, "frame16"); + GLADE_HOOKUP_OBJECT (AdvDlg, alignment11, "alignment11"); + GLADE_HOOKUP_OBJECT (AdvDlg, vbox37, "vbox37"); + GLADE_HOOKUP_OBJECT (AdvDlg, frame18, "frame18"); + GLADE_HOOKUP_OBJECT (AdvDlg, alignment13, "alignment13"); + GLADE_HOOKUP_OBJECT (AdvDlg, vbox39, "vbox39"); + GLADE_HOOKUP_OBJECT (AdvDlg, radio_VU_Round_Near, "radio_VU_Round_Near"); + GLADE_HOOKUP_OBJECT (AdvDlg, radio_VU_Round_Negative, "radio_VU_Round_Negative"); + GLADE_HOOKUP_OBJECT (AdvDlg, radio_VU_Round_Positive, "radio_VU_Round_Positive"); + GLADE_HOOKUP_OBJECT (AdvDlg, radio_VU_Round_Zero, "radio_VU_Round_Zero"); + GLADE_HOOKUP_OBJECT (AdvDlg, label51, "label51"); + GLADE_HOOKUP_OBJECT (AdvDlg, check_VU_Flush_Zero, "check_VU_Flush_Zero"); + GLADE_HOOKUP_OBJECT (AdvDlg, check_VU_Denormal_Zero, "check_VU_Denormal_Zero"); + GLADE_HOOKUP_OBJECT (AdvDlg, label49, "label49"); + GLADE_HOOKUP_OBJECT_NO_REF (AdvDlg, dialog_action_area4, "dialog_action_area4"); + GLADE_HOOKUP_OBJECT (AdvDlg, AdvDefaultBtn, "AdvDefaultBtn"); + GLADE_HOOKUP_OBJECT (AdvDlg, button79, "button79"); + GLADE_HOOKUP_OBJECT (AdvDlg, button80, "button80"); + + return AdvDlg; +} + diff --git a/pcsx2/Linux/interface.h b/pcsx2/Linux/interface.h index 97303924b6..e06b9501bc 100644 --- a/pcsx2/Linux/interface.h +++ b/pcsx2/Linux/interface.h @@ -1,20 +1,3 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ /* * DO NOT EDIT THIS FILE - it is generated by Glade. */ @@ -32,3 +15,6 @@ GtkWidget* create_DumpRDlg (void); GtkWidget* create_Logging (void); GtkWidget* create_CmdLine (void); GtkWidget* create_MemWrite32 (void); +GtkWidget* create_GameFixDlg (void); +GtkWidget* create_SpeedHacksDlg (void); +GtkWidget* create_AdvDlg (void); diff --git a/pcsx2/Linux/pcsx2.glade b/pcsx2/Linux/pcsx2.glade index 7786648bd8..1e235637b3 100644 --- a/pcsx2/Linux/pcsx2.glade +++ b/pcsx2/Linux/pcsx2.glade @@ -93,7 +93,7 @@ - + True Slot 2 True @@ -102,7 +102,7 @@ - + True Slot 3 True @@ -111,7 +111,7 @@ - + True Slot 4 True @@ -120,7 +120,7 @@ - + True Slot 5 True @@ -366,6 +366,33 @@ + + + + True + Game Fixes + True + + + + + + + True + Speed Hacks + True + + + + + + + True + Advanced + True + + + @@ -783,136 +810,6 @@ Version x.x 0 15 - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 0 - 1 - 4 - 5 - - - - - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 1 - 2 - 4 - 5 - - - - True @@ -1160,71 +1057,6 @@ Version x.x - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 0 - 1 - 1 - 2 - - - - True @@ -1253,71 +1085,6 @@ Version x.x - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 1 - 2 - 1 - 2 - - - - True @@ -1373,71 +1140,6 @@ Version x.x - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 0 - 1 - 7 - 8 - - - - True @@ -1548,71 +1250,6 @@ Version x.x - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 1 - 2 - 7 - 8 - - - - True @@ -1696,71 +1333,6 @@ Version x.x - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 0 - 1 - 10 - 11 - - - - True @@ -1815,136 +1387,6 @@ Version x.x - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 1 - 2 - 13 - 14 - - - - - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - • - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 1 - 2 - 10 - 11 - - - - True @@ -2055,6 +1497,158 @@ Version x.x + + + + True + + False + True + + + 0 + 1 + 1 + 2 + fill + fill + + + + + + True + + False + True + + + 1 + 2 + 1 + 2 + fill + fill + + + + + + True + + False + True + + + 0 + 1 + 4 + 5 + fill + fill + + + + + + True + + False + True + + + 1 + 2 + 4 + 5 + fill + fill + + + + + + True + + False + True + + + 0 + 1 + 7 + 8 + fill + fill + + + + + + True + + False + True + + + 1 + 2 + 7 + 8 + fill + fill + + + + + + True + + False + True + + + 0 + 1 + 10 + 11 + fill + fill + + + + + + True + + False + True + + + 1 + 2 + 10 + 11 + fill + fill + + + + + + True + + False + True + + + 1 + 2 + 13 + 14 + fill + + 0 @@ -5232,4 +4826,1420 @@ Version x.x + + True + Game Special Fixes + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + VU Clip Hack - Special fix for God of War; Breaks Rockstar games! + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + FPU Clamp Hack - Special fix for Tekken 5 and maybe other games. + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Slow DVD access (fixes Tales of the Abyss) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + VU Branch Hack - Special fix for Magna Carta; Breaks Crash Bandicoot! + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + + + True + <b>Some games need special settings. +Configure them here.</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + + + True + PCSX2 Speed Hacks + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + Compatability + True + GTK_RELIEF_NORMAL + True + 0 + + + + + + + True + True + True + Speed + True + GTK_RELIEF_NORMAL + True + 0 + + + + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + False + 0 + + + + True + These hacks will affect the speed of PCSX2 but possibly compromise compatibility. +If you have problems, Disable all of these and try again. + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + Disabled (Speedup!) +Normal +Enabled (Helps SPS, Slow) + False + True + + + 0 + False + True + + + + + + True + VU Overflow Checks + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 0 + False + False + + + + + + True + False + 0 + + + + True + Disabled (Speedup!) +Normal +Enabled (Helps SPS, Slow) + False + True + + + 0 + False + True + + + + + + True + FPU Overflow Checks + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 0 + False + False + + + + + + True + True + Disable Underflow Checks - *Checked = Disables underflow checks. ( Speedup! ) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + + + True + <b>Overflow and Underflow</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + Disable Extra VU Flags - When checked, PCSX2 doesn't set some flags that are rarely used by games. ( Speedup! ) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Disable Extra FPU Flags - When checked, PCSX2 doesn't set some flags that are rarely used by games. ( Speedup! ) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + + + True + <b>Flag Settings</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + EE Sync Hack (x2) - Doubles the cycle rate of the EE. ( Big Speedup in most games! ) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + IOP Sync Hack (x2) - Doubles the cycle rate of the IOP. ( Speedup but breaks some games. ) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + EE/IOP Sync Hack (x3) - Makes EE and IOP hacks triple the cycle rate. ( Sometimes speeds games a bit more, but can break games. ) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + + + True + <b>Sync Hacks</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + EE/IOP Fast Branches - Quick branching ( Very small speedup; Not Recommended! ) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Tighter SPU2 Sync ( FFXII vids) - Slower, not very useful anymore. + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Escape Hack - Use Esc key to fully exit PCSX2. + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + + + True + <b>Misc</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + + + True + Advanced Options + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_SPREAD + + + + True + True + True + Defaults + True + GTK_RELIEF_NORMAL + True + 0 + + + + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + Nearest + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Negative + True + GTK_RELIEF_NORMAL + True + False + False + True + radio_EE_Round_Near + + + 0 + False + False + + + + + + True + True + Positive + True + GTK_RELIEF_NORMAL + True + False + False + True + radio_EE_Round_Near + + + 0 + False + False + + + + + + True + True + Zero + True + GTK_RELIEF_NORMAL + True + False + False + True + radio_EE_Round_Near + + + 0 + False + False + + + + + + + + + + True + <b>Roundmode</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + True + Flush to Zero + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Denormals are Zero + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + + + True + <b>EE Recs Options</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + Nearest + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Negative + True + GTK_RELIEF_NORMAL + True + False + False + True + radio_VU_Round_Near + + + 0 + False + False + + + + + + True + True + Positive + True + GTK_RELIEF_NORMAL + True + False + False + True + radio_VU_Round_Near + + + 0 + False + False + + + + + + True + True + Zero + True + GTK_RELIEF_NORMAL + True + False + False + True + radio_VU_Round_Near + + + 0 + False + False + + + + + + + + + + True + <b>Roundmode</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + True + Flush to Zero + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Denormals are Zero + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + + + True + <b>VU Recs Options</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + diff --git a/pcsx2/Linux/support.c b/pcsx2/Linux/support.c index 5f54c9b519..00aff29822 100644 --- a/pcsx2/Linux/support.c +++ b/pcsx2/Linux/support.c @@ -1,20 +1,3 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ /* * DO NOT EDIT THIS FILE - it is generated by Glade. */ diff --git a/pcsx2/Linux/support.h b/pcsx2/Linux/support.h index da8f182525..a32649e53c 100644 --- a/pcsx2/Linux/support.h +++ b/pcsx2/Linux/support.h @@ -1,20 +1,3 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ /* * DO NOT EDIT THIS FILE - it is generated by Glade. */ diff --git a/pcsx2/build.sh b/pcsx2/build.sh index ff9a9cfd5d..75498ccd9a 100644 --- a/pcsx2/build.sh +++ b/pcsx2/build.sh @@ -17,6 +17,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # +#export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse2 --enable-sse3 --prefix `pwd`" + echo --------------- echo Building Pcsx2 echo ---------------