summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-02-14 19:18:22 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-02-14 19:18:22 +0000
commit111ada78b7d179e115466c726ae1d7d05fed9ddb (patch)
tree300aa4b88b4cafdf036891cebc5ffc9b9c5156c5
parent1b05b0e9736ab40e15190e608d1662921903a0c6 (diff)
downloadpcsxr-111ada78b7d179e115466c726ae1d7d05fed9ddb.tar.gz
sio;
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82898 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--data/pcsxr.ui103
-rwxr-xr-xgui/ConfDlg.c106
-rwxr-xr-xgui/ConfDlg.h4
-rwxr-xr-xgui/Config.c10
-rwxr-xr-xgui/LnxMain.c3
-rwxr-xr-xgui/Plugin.c4
-rwxr-xr-xlibpcsxcore/cdrom.c4
-rwxr-xr-xlibpcsxcore/misc.c4
-rwxr-xr-xlibpcsxcore/plugins.h2
-rwxr-xr-xlibpcsxcore/psemu_plugin_defs.h1
-rwxr-xr-xlibpcsxcore/psxcommon.h4
-rwxr-xr-xlibpcsxcore/psxhw.c6
-rwxr-xr-xlibpcsxcore/r3000a.c2
-rwxr-xr-xlibpcsxcore/sio.c4
-rwxr-xr-xmacosx/PcsxrController.m2
-rwxr-xr-xwin32/gui/ConfigurePlugins.c4
-rwxr-xr-xwin32/gui/WndMain.c4
-rwxr-xr-xwin32/gui/plugin.c4
18 files changed, 224 insertions, 47 deletions
diff --git a/data/pcsxr.ui b/data/pcsxr.ui
index c220fd36..e812bd4f 100644
--- a/data/pcsxr.ui
+++ b/data/pcsxr.ui
@@ -803,7 +803,7 @@
<object class="GtkTable" id="table4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">6</property>
+ <property name="n_rows">7</property>
<property name="n_columns">5</property>
<property name="column_spacing">5</property>
<property name="row_spacing">5</property>
@@ -1248,8 +1248,8 @@
<property name="icon_name">gtk-find</property>
</object>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -1264,8 +1264,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -1293,8 +1293,96 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">5</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="image39">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-connect</property>
+ </object>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Link cable:</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="GtkCombo_Sio1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btn_ConfSio1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="OnConfConf_Sio1Conf" swapped="no"/>
+ <child>
+ <object class="GtkImage" id="image40">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-preferences</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btn_AboutSio1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="OnConfConf_Sio1About" swapped="no"/>
+ <child>
+ <object class="GtkImage" id="image41">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-info</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
</packing>
</child>
</object>
@@ -1558,7 +1646,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="GtkCheckButton_Sio">
+ <object class="GtkCheckButton" id="GtkCheckButton_SioIrq">
<property name="label" translatable="yes">SIO IRQ Always Enabled</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -3490,7 +3578,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -3505,7 +3592,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -3520,7 +3606,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c
index d71d829e..a92cd958 100755
--- a/gui/ConfDlg.c
+++ b/gui/ConfDlg.c
@@ -62,6 +62,9 @@ PluginConf CdrConfS;
PluginConf Pad1ConfS;
PluginConf Pad2ConfS;
PluginConf NetConfS;
+#ifdef ENABLE_SIO1API
+PluginConf Sio1ConfS;
+#endif
PluginConf BiosConfS;
#define FindComboText(combo, list, conf) \
@@ -144,7 +147,11 @@ void ConfigurePlugins() {
widget = gtk_builder_get_object(builder, "btn_ConfCdr");
g_signal_connect_data(G_OBJECT(widget), "clicked",
G_CALLBACK(on_configure_plugin), (gpointer) PSE_LT_CDR, NULL, G_CONNECT_AFTER);
-
+#ifdef ENABLE_SIO1API
+ widget = gtk_builder_get_object(builder, "btn_ConfSio1");
+ g_signal_connect_data(G_OBJECT(widget), "clicked",
+ G_CALLBACK(on_configure_plugin), (gpointer) PSE_LT_SIO1, NULL, G_CONNECT_AFTER);
+#endif
widget = gtk_builder_get_object(builder, "btn_AboutGpu");
g_signal_connect_data(G_OBJECT(widget), "clicked",
G_CALLBACK(on_about_plugin), (gpointer) PSE_LT_GPU, NULL, G_CONNECT_AFTER);
@@ -164,7 +171,11 @@ void ConfigurePlugins() {
widget = gtk_builder_get_object(builder, "btn_AboutCdr");
g_signal_connect_data(G_OBJECT(widget), "clicked",
G_CALLBACK(on_about_plugin), (gpointer) PSE_LT_CDR, NULL, G_CONNECT_AFTER);
-
+#ifdef ENABLE_SIO1API
+ widget = gtk_builder_get_object(builder, "btn_AboutSio1");
+ g_signal_connect_data(G_OBJECT(widget), "clicked",
+ G_CALLBACK(on_about_plugin), (gpointer) PSE_LT_SIO1, NULL, G_CONNECT_AFTER);
+#endif
widget = gtk_builder_get_object(builder, "GtkFileChooser_Bios");
g_signal_connect_data(G_OBJECT(widget), "current_folder_changed",
G_CALLBACK(OnBiosPath_Changed), builder, NULL, G_CONNECT_AFTER);
@@ -279,7 +290,28 @@ void OnConf_CdRom() {
SysCloseLibrary(drv);
}
+#ifdef ENABLE_SIO1API
+void OnConf_Sio1() {
+ void *drv;
+ SIO1configure conf;
+ char Plugin[MAXPATHLEN];
+
+ sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Sio1);
+ drv = SysLoadLibrary(Plugin);
+ if (drv == NULL) { printf("Error with file %s\n", Plugin); return; }
+
+ while (gtk_events_pending()) gtk_main_iteration();
+
+ conf = (SIO1configure)SysLoadSym(drv, "SIO1configure");
+ if (conf != NULL) {
+ conf();
+ }
+ else
+ SysInfoMessage (_("No configuration required"), _("This plugin doesn't need to be configured."));
+ SysCloseLibrary(drv);
+}
+#endif
void OnConf_Pad() {
void *drv;
PADconfigure conf;
@@ -291,7 +323,7 @@ void OnConf_Pad() {
while (gtk_events_pending()) gtk_main_iteration();
- conf = (GPUconfigure)SysLoadSym(drv, "PADconfigure");
+ conf = (PADconfigure)SysLoadSym(drv, "PADconfigure");
if (conf != NULL) {
conf();
}
@@ -307,7 +339,7 @@ void OnConf_Pad() {
while (gtk_events_pending()) gtk_main_iteration();
- conf = (GPUconfigure)SysLoadSym(drv, "PADconfigure");
+ conf = (PADconfigure)SysLoadSym(drv, "PADconfigure");
if (conf != NULL) {
conf();
}
@@ -322,6 +354,9 @@ static int all_config_set() {
if ((strlen(Config.Gpu) != 0) &&
(strlen(Config.Spu) != 0) &&
(strlen(Config.Cdr) != 0) &&
+#ifdef ENABLE_SIO1API
+ (strlen(Config.Sio1) != 0) &&
+#endif
(strlen(Config.Pad1) != 0) &&
(strlen(Config.Pad2) != 0))
retval = TRUE;
@@ -372,6 +407,11 @@ static void on_configure_plugin(GtkWidget *widget, gpointer user_data) {
case PSE_LT_CDR:
ConfPlugin(CDRconfigure, CdrConfS, Config.Cdr, "CDRconfigure", ConfDlg);
break;
+#ifdef ENABLE_SIO1API
+ case PSE_LT_SIO1:
+ ConfPlugin(SIO1configure, Sio1ConfS, Config.Sio1, "SIO1configure", ConfDlg);
+ break;
+#endif
}
} else
ConfigurePlugins();
@@ -393,6 +433,11 @@ static void on_about_plugin(GtkWidget *widget, gpointer user_data) {
case PSE_LT_CDR:
ConfPlugin(CDRconfigure, CdrConfS, Config.Cdr, "CDRabout", ConfDlg);
break;
+#ifdef ENABLE_SIO1API
+ case PSE_LT_SIO1:
+ ConfPlugin(SIO1configure, Sio1ConfS, Config.Sio1, "SIO1about", ConfDlg);
+ break;
+#endif
}
} else
ConfigurePlugins();
@@ -449,6 +494,9 @@ void OnConf_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
GetComboText(GpuConfS.Combo, GpuConfS.plist, Config.Gpu);
GetComboText(SpuConfS.Combo, SpuConfS.plist, Config.Spu);
GetComboText(CdrConfS.Combo, CdrConfS.plist, Config.Cdr);
+#ifdef ENABLE_SIO1API
+ GetComboText(Sio1ConfS.Combo, Sio1ConfS.plist, Config.Sio1);
+#endif
GetComboText(Pad1ConfS.Combo, Pad1ConfS.plist, Config.Pad1);
GetComboText(Pad2ConfS.Combo, Pad2ConfS.plist, Config.Pad2);
GetComboText(BiosConfS.Combo, BiosConfS.plist, Config.Bios);
@@ -541,6 +589,9 @@ int plugins_configured() {
if (plugin_is_available (Config.Gpu) == FALSE) { Config.Gpu[0] = '\0'; return FALSE; }
if (plugin_is_available (Config.Spu) == FALSE) { Config.Spu[0] = '\0'; return FALSE; }
if (plugin_is_available (Config.Cdr) == FALSE) { Config.Cdr[0] = '\0'; return FALSE; }
+#ifdef ENABLE_SIO1API
+ if (plugin_is_available (Config.Sio1) == FALSE) { Config.Sio1[0] = '\0'; return FALSE; }
+#endif
if (plugin_is_available (Config.Pad1) == FALSE) { Config.Pad1[0] = '\0'; return FALSE; }
if (plugin_is_available (Config.Pad2) == FALSE) { Config.Pad2[0] = '\0'; return FALSE; }
@@ -597,12 +648,33 @@ void UpdatePluginsBIOS() {
char name[256];
gchar *linkname;
- GpuConfS.plugins = 0; SpuConfS.plugins = 0; CdrConfS.plugins = 0;
- Pad1ConfS.plugins = 0; Pad2ConfS.plugins = 0; BiosConfS.plugins = 0;
- GpuConfS.glist = NULL; SpuConfS.glist = NULL; CdrConfS.glist = NULL;
- Pad1ConfS.glist = NULL; Pad2ConfS.glist = NULL; BiosConfS.glist = NULL;
- GpuConfS.plist[0][0] = '\0'; SpuConfS.plist[0][0] = '\0'; CdrConfS.plist[0][0] = '\0';
- Pad1ConfS.plist[0][0] = '\0'; Pad2ConfS.plist[0][0] = '\0'; BiosConfS.plist[0][0] = '\0';
+ GpuConfS.plugins = 0;
+ SpuConfS.plugins = 0;
+ CdrConfS.plugins = 0;
+#ifdef ENABLE_SIO1API
+ Sio1ConfS.plugins = 0;
+#endif
+ Pad1ConfS.plugins = 0;
+ Pad2ConfS.plugins = 0;
+ BiosConfS.plugins = 0;
+ GpuConfS.glist = NULL;
+ SpuConfS.glist = NULL;
+ CdrConfS.glist = NULL;
+#ifdef ENABLE_SIO1API
+ Sio1ConfS.glist = NULL;
+#endif
+ Pad1ConfS.glist = NULL;
+ Pad2ConfS.glist = NULL;
+ BiosConfS.glist = NULL;
+ GpuConfS.plist[0][0] = '\0';
+ SpuConfS.plist[0][0] = '\0';
+ CdrConfS.plist[0][0] = '\0';
+#ifdef ENABLE_SIO1API
+ Sio1ConfS.plist[0][0] = '\0';
+#endif
+ Pad1ConfS.plist[0][0] = '\0';
+ Pad2ConfS.plist[0][0] = '\0';
+ BiosConfS.plist[0][0] = '\0';
// Load and get plugin info
dir = opendir(Config.PluginsDir);
@@ -629,6 +701,9 @@ void UpdatePluginsBIOS() {
if (PSE_getLibType == NULL) {
if (strstr(linkname, "gpu") != NULL) type = PSE_LT_GPU;
else if (strstr(linkname, "cdr") != NULL) type = PSE_LT_CDR;
+#ifdef ENABLE_SIO1API
+ else if (strstr(linkname, "sio1") != NULL) type = PSE_LT_SIO1;
+#endif
else if (strstr(linkname, "spu") != NULL) type = PSE_LT_SPU;
else if (strstr(linkname, "pad") != NULL) type = PSE_LT_PAD;
else { g_free(linkname); continue; }
@@ -651,6 +726,10 @@ void UpdatePluginsBIOS() {
if (type & PSE_LT_CDR)
ComboAddPlugin(Cdr);
+#ifdef ENABLE_SIO1API
+ if (type & PSE_LT_SIO1)
+ ComboAddPlugin(Sio1);
+#endif
if (type & PSE_LT_GPU)
ComboAddPlugin(Gpu);
if (type & PSE_LT_SPU)
@@ -681,6 +760,9 @@ static void UpdatePluginsBIOS_UpdateGUI() {
ConfCreatePConf("Pad1", Pad1);
ConfCreatePConf("Pad2", Pad2);
ConfCreatePConf("Cdr", Cdr);
+#ifdef ENABLE_SIO1API
+ ConfCreatePConf("Sio1", Sio1);
+#endif
ConfCreatePConf("Bios", Bios);
}
@@ -792,7 +874,7 @@ void OnCpu_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
Config.PsxType = PSX_TYPE_PAL;
Config.Xa = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Xa")));
- Config.Sio = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Sio")));
+ Config.SioIrq = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_SioIrq")));
Config.Mdec = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Mdec")));
Config.Cdda = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_CDDA")));
Config.SlowBoot = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_SlowBoot")));
@@ -855,7 +937,7 @@ void OnConf_Cpu() {
gtk_widget_set_sensitive(GTK_WIDGET (PsxCombo), !Config.PsxAuto);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Xa")), Config.Xa);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Sio")), Config.Sio);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_SioIrq")), Config.SioIrq);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Mdec")), Config.Mdec);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_CDDA")), Config.Cdda);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_SlowBoot")), Config.SlowBoot);
diff --git a/gui/ConfDlg.h b/gui/ConfDlg.h
index 22ea0263..ef1c0203 100755
--- a/gui/ConfDlg.h
+++ b/gui/ConfDlg.h
@@ -29,6 +29,7 @@ void OnConf_CdRom();
void OnConf_Pad();
void OnConf_Cpu();
void OnConf_Net();
+void OnConf_Sio1();
void ConfigurePlugins();
@@ -45,6 +46,9 @@ extern PluginConf CdrConfS;
extern PluginConf Pad1ConfS;
extern PluginConf Pad2ConfS;
extern PluginConf NetConfS;
+#ifdef ENABLE_SIO1API
+extern PluginConf Sio1ConfS;
+#endif
extern PluginConf BiosConfS;
#endif
diff --git a/gui/Config.c b/gui/Config.c
index 8c03a69c..bce65ac3 100755
--- a/gui/Config.c
+++ b/gui/Config.c
@@ -114,6 +114,9 @@ int LoadConfig(PcsxConfig *Conf) {
GetValue(data, "Gpu", Config.Gpu);
GetValue(data, "Spu", Config.Spu);
GetValue(data, "Cdr", Config.Cdr);
+#ifdef ENABLE_SIO1API
+ GetValue(data, "Sio1", Config.Sio1);
+#endif
GetValue(data, "Pad1", Config.Pad1);
GetValue(data, "Pad2", Config.Pad2);
GetValue(data, "Net", Config.Net);
@@ -124,7 +127,7 @@ int LoadConfig(PcsxConfig *Conf) {
GetValue(data, "IsoImgDir", Config.IsoImgDir);
Config.Xa = GetValueb(data, "Xa");
- Config.Sio = GetValueb(data, "Sio");
+ Config.SioIrq = GetValueb(data, "SioIrq");
Config.Mdec = GetValueb(data, "Mdec");
Config.PsxAuto = GetValueb(data, "PsxAuto");
Config.Cdda = GetValueb(data, "Cdda");
@@ -157,6 +160,9 @@ void SaveConfig() {
SetValue("Gpu", Config.Gpu);
SetValue("Spu", Config.Spu);
SetValue("Cdr", Config.Cdr);
+#ifdef ENABLE_SIO1API
+ SetValue("Sio1", Config.Sio1);
+#endif
SetValue("Net", Config.Net);
SetValue("Pad1", Config.Pad1);
SetValue("Pad2", Config.Pad2);
@@ -167,7 +173,7 @@ void SaveConfig() {
SetValue("IsoImgDir", Config.IsoImgDir);
SetValueb("Xa", Config.Xa);
- SetValueb("Sio", Config.Sio);
+ SetValueb("SioIrq", Config.SioIrq);
SetValueb("Mdec", Config.Mdec);
SetValueb("PsxAuto", Config.PsxAuto);
SetValueb("Cdda", Config.Cdda);
diff --git a/gui/LnxMain.c b/gui/LnxMain.c
index 716b9462..24b883ae 100755
--- a/gui/LnxMain.c
+++ b/gui/LnxMain.c
@@ -386,6 +386,9 @@ int main(int argc, char *argv[]) {
set_default_plugin(GpuConfS.plist[0], Config.Gpu);
set_default_plugin(SpuConfS.plist[0], Config.Spu);
set_default_plugin(CdrConfS.plist[0], Config.Cdr);
+#ifdef ENABLE_SIO1API
+ set_default_plugin(Sio1ConfS.plist[0], Config.Sio1);
+#endif
set_default_plugin(Pad1ConfS.plist[0], Config.Pad1);
set_default_plugin(Pad2ConfS.plist[0], Config.Pad2);
set_default_plugin(BiosConfS.plist[0], Config.Bios);
diff --git a/gui/Plugin.c b/gui/Plugin.c
index 2677677b..62e8feb3 100755
--- a/gui/Plugin.c
+++ b/gui/Plugin.c
@@ -234,8 +234,8 @@ void PADhandleKey(int key) {
gpuShowPic();
break;
case XK_F5:
- Config.Sio ^= 0x1;
- if (Config.Sio)
+ Config.SioIrq ^= 0x1;
+ if (Config.SioIrq)
sprintf(Text, _("SIO IRQ Always Enabled"));
else sprintf(Text, _("SIO IRQ Not Always Enabled"));
GPU_displayText(Text);
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c
index e338417a..db12b197 100755
--- a/libpcsxcore/cdrom.c
+++ b/libpcsxcore/cdrom.c
@@ -250,8 +250,6 @@ static void adjustTransferIndex(void)
// FIXME: do this in SPU instead
void cdrDecodedBufferInterrupt()
{
- u16 buf_ptr[0x400], lcv;
-
#if 0
return;
#endif
@@ -267,12 +265,10 @@ void cdrDecodedBufferInterrupt()
if( (SPU_readRegister( H_SPUirqAddr ) * 8) >= 0x800 ) return;
-
// turn off plugin SPU IRQ decoded buffer handling
SPU_registerCallback( 0 );
-
/*
Vib Ribbon
diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c
index 30073a28..f311d1c5 100755
--- a/libpcsxcore/misc.c
+++ b/libpcsxcore/misc.c
@@ -641,7 +641,7 @@ int SendPcsxInfo() {
return 0;
NET_sendData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING);
- NET_sendData(&Config.Sio, sizeof(Config.Sio), PSE_NET_BLOCKING);
+ NET_sendData(&Config.SioIrq, sizeof(Config.SioIrq), PSE_NET_BLOCKING);
NET_sendData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING);
NET_sendData(&Config.RCntFix, sizeof(Config.RCntFix), PSE_NET_BLOCKING);
NET_sendData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING);
@@ -657,7 +657,7 @@ int RecvPcsxInfo() {
return 0;
NET_recvData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING);
- NET_recvData(&Config.Sio, sizeof(Config.Sio), PSE_NET_BLOCKING);
+ NET_recvData(&Config.SioIrq, sizeof(Config.SioIrq), PSE_NET_BLOCKING);
NET_recvData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING);
NET_recvData(&Config.RCntFix, sizeof(Config.RCntFix), PSE_NET_BLOCKING);
NET_recvData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING);
diff --git a/libpcsxcore/plugins.h b/libpcsxcore/plugins.h
index 5d6aa9d2..27b92822 100755
--- a/libpcsxcore/plugins.h
+++ b/libpcsxcore/plugins.h
@@ -26,8 +26,6 @@ extern "C" {
#include "psxcommon.h"
-//#define ENABLE_SIO1API 1
-
#ifndef _WIN32
typedef void* HWND;
diff --git a/libpcsxcore/psemu_plugin_defs.h b/libpcsxcore/psemu_plugin_defs.h
index d1b05ac3..27642157 100755
--- a/libpcsxcore/psemu_plugin_defs.h
+++ b/libpcsxcore/psemu_plugin_defs.h
@@ -16,6 +16,7 @@ extern "C" {
#define PSE_LT_SPU 4
#define PSE_LT_PAD 8
#define PSE_LT_NET 16
+#define PSE_LT_SIO1 32
// DLL function return codes
#define PSE_ERR_SUCCESS 0 // every function in DLL if completed sucessfully should return this value
diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h
index 1a825417..a725547d 100755
--- a/libpcsxcore/psxcommon.h
+++ b/libpcsxcore/psxcommon.h
@@ -129,7 +129,9 @@ typedef struct {
char Pad1[MAXPATHLEN];
char Pad2[MAXPATHLEN];
char Net[MAXPATHLEN];
+#ifdef ENABLE_SIO1API
char Sio1[MAXPATHLEN];
+#endif
char Mcd1[MAXPATHLEN];
char Mcd2[MAXPATHLEN];
char Bios[MAXPATHLEN];
@@ -138,7 +140,7 @@ typedef struct {
char PatchesDir[MAXPATHLEN];
char IsoImgDir[MAXPATHLEN];
boolean Xa;
- boolean Sio;
+ boolean SioIrq;
boolean Mdec;
boolean PsxAuto;
boolean Cdda;
diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c
index 53df663d..06f00d03 100755
--- a/libpcsxcore/psxhw.c
+++ b/libpcsxcore/psxhw.c
@@ -27,7 +27,7 @@
#include "gpu.h"
void psxHwReset() {
- if (Config.Sio) psxHu32ref(0x1070) |= SWAP32(0x80);
+ if (Config.SioIrq) psxHu32ref(0x1070) |= SWAP32(0x80);
if (Config.SpuIrq) psxHu32ref(0x1070) |= SWAP32(0x200);
memset(psxH, 0, 0x10000);
@@ -422,7 +422,7 @@ void psxHwWrite16(u32 add, u16 value) {
#ifdef PSXHW_LOG
PSXHW_LOG("IREG 16bit write %x\n", value);
#endif
- if (Config.Sio) psxHu16ref(0x1070) |= SWAPu16(0x80);
+ if (Config.SioIrq) psxHu16ref(0x1070) |= SWAPu16(0x80);
if (Config.SpuIrq) psxHu16ref(0x1070) |= SWAPu16(0x200);
psxHu16ref(0x1070) &= SWAPu16(value);
return;
@@ -537,7 +537,7 @@ void psxHwWrite32(u32 add, u32 value) {
#ifdef PSXHW_LOG
PSXHW_LOG("IREG 32bit write %x\n", value);
#endif
- if (Config.Sio) psxHu32ref(0x1070) |= SWAPu32(0x80);
+ if (Config.SioIrq) psxHu32ref(0x1070) |= SWAPu32(0x80);
if (Config.SpuIrq) psxHu32ref(0x1070) |= SWAPu32(0x200);
psxHu32ref(0x1070) &= SWAPu32(value);
return;
diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c
index 957908d1..4d014b72 100755
--- a/libpcsxcore/r3000a.c
+++ b/libpcsxcore/r3000a.c
@@ -150,7 +150,7 @@ void psxBranchTest() {
psxRcntUpdate();
if (psxRegs.interrupt) {
- if ((psxRegs.interrupt & (1 << PSXINT_SIO)) && !Config.Sio) { // sio
+ if ((psxRegs.interrupt & (1 << PSXINT_SIO)) && !Config.SioIrq) { // sio
if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_SIO].sCycle) >= psxRegs.intCycle[PSXINT_SIO].cycle) {
psxRegs.interrupt &= ~(1 << PSXINT_SIO);
sioInterrupt();
diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c
index ace3e94d..df9479a3 100755
--- a/libpcsxcore/sio.c
+++ b/libpcsxcore/sio.c
@@ -85,7 +85,7 @@ static int DongleInit;
#if 0
// Breaks Twisted Metal 2 intro
#define SIO_INT(eCycle) { \
- if (!Config.Sio) { \
+ if (!Config.SioIrq) { \
psxRegs.interrupt |= (1 << PSXINT_SIO); \
psxRegs.intCycle[PSXINT_SIO].cycle = eCycle; \
psxRegs.intCycle[PSXINT_SIO].sCycle = psxRegs.cycle; \
@@ -97,7 +97,7 @@ static int DongleInit;
#endif
#define SIO_INT(eCycle) { \
- if (!Config.Sio) { \
+ if (!Config.SioIrq) { \
psxRegs.interrupt |= (1 << PSXINT_SIO); \
psxRegs.intCycle[PSXINT_SIO].cycle = eCycle; \
psxRegs.intCycle[PSXINT_SIO].sCycle = psxRegs.cycle; \
diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m
index 233dbb87..3d18b8dc 100755
--- a/macosx/PcsxrController.m
+++ b/macosx/PcsxrController.m
@@ -398,7 +398,7 @@ NSString *saveStatePath;
prefByteKeys = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSValue valueWithPointer:&Config.Xa], @"NoXaAudio",
//[NSValue valueWithPointer:&Config.UseNet], @"NetPlay",
- [NSValue valueWithPointer:&Config.Sio], @"SioIrqAlways",
+ [NSValue valueWithPointer:&Config.SioIrq], @"SioIrqAlways",
[NSValue valueWithPointer:&Config.Mdec], @"BlackAndWhiteMDECVideo",
[NSValue valueWithPointer:&Config.PsxAuto], @"AutoDetectVideoType",
[NSValue valueWithPointer:&Config.PsxType], @"VideoTypePAL",
diff --git a/win32/gui/ConfigurePlugins.c b/win32/gui/ConfigurePlugins.c
index 2edc2bf8..1c8080f5 100755
--- a/win32/gui/ConfigurePlugins.c
+++ b/win32/gui/ConfigurePlugins.c
@@ -68,7 +68,7 @@ int LoadConfig() {
QueryKey(256, "Lang", Conf->Lang);
QueryKeyV("Xa", Conf->Xa);
- QueryKeyV("Sio", Conf->Sio);
+ QueryKeyV("SioIrq", Conf->SioIrq);
QueryKeyV("Mdec", Conf->Mdec);
QueryKeyV("PsxAuto", Conf->PsxAuto);
QueryKeyV("Cdda", Conf->Cdda);
@@ -120,7 +120,7 @@ void SaveConfig() {
SetKey("BiosDir", Conf->BiosDir, strlen(Conf->BiosDir), REG_SZ);
SetKeyV("Xa", Conf->Xa);
- SetKeyV("Sio", Conf->Sio);
+ SetKeyV("SioIrq", Conf->SioIrq);
SetKeyV("Mdec", Conf->Mdec);
SetKeyV("PsxAuto", Conf->PsxAuto);
SetKeyV("Cdda", Conf->Cdda);
diff --git a/win32/gui/WndMain.c b/win32/gui/WndMain.c
index f8401f21..b3d45b2e 100755
--- a/win32/gui/WndMain.c
+++ b/win32/gui/WndMain.c
@@ -1326,7 +1326,7 @@ BOOL CALLBACK ConfigureCpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lPar
Static_SetText(GetDlgItem(hW,IDC_SELPSX), _("Psx System Type"));
Button_SetCheck(GetDlgItem(hW,IDC_XA), Config.Xa);
- Button_SetCheck(GetDlgItem(hW,IDC_SIO), Config.Sio);
+ Button_SetCheck(GetDlgItem(hW,IDC_SIO), Config.SioIrq);
Button_SetCheck(GetDlgItem(hW,IDC_MDEC), Config.Mdec);
Button_SetCheck(GetDlgItem(hW,IDC_CDDA), Config.Cdda);
Button_SetCheck(GetDlgItem(hW,IDC_SLOWBOOT),Config.SlowBoot);
@@ -1360,7 +1360,7 @@ BOOL CALLBACK ConfigureCpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lPar
else Config.PsxType = 1;
Config.Xa = Button_GetCheck(GetDlgItem(hW,IDC_XA));
- Config.Sio = Button_GetCheck(GetDlgItem(hW,IDC_SIO));
+ Config.SioIrq = Button_GetCheck(GetDlgItem(hW,IDC_SIO));
Config.Mdec = Button_GetCheck(GetDlgItem(hW,IDC_MDEC));
Config.Cdda = Button_GetCheck(GetDlgItem(hW,IDC_CDDA));
Config.SlowBoot= Button_GetCheck(GetDlgItem(hW,IDC_SLOWBOOT));
diff --git a/win32/gui/plugin.c b/win32/gui/plugin.c
index cf968a18..d4d8c284 100755
--- a/win32/gui/plugin.c
+++ b/win32/gui/plugin.c
@@ -118,8 +118,8 @@ void PADhandleKey(int key) {
break;
case VK_F5:
- Config.Sio ^= 0x1;
- if (Config.Sio)
+ Config.SioIrq ^= 0x1;
+ if (Config.SioIrq)
sprintf(Text, _("*PCSXR*: Sio Irq Always Enabled"));
else sprintf(Text, _("*PCSXR*: Sio Irq Not Always Enabled"));
GPU_displayText(Text);