diff options
| author | SND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-04-16 18:04:29 +0000 |
|---|---|---|
| committer | SND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-04-16 18:04:29 +0000 |
| commit | b3f5eecbcd660065b8d1c92029e5e6fa0a74ecdb (patch) | |
| tree | 57c3edede233016ba0464665e1af127794fa1e29 | |
| parent | e09dfb4e415fa52df9aaeed4b8c1d3ea06d880ce (diff) | |
Big endian CDDA support. Uses Config.Cdda (previously bool). Now enum. Gtk gui was modified for new enum, but compatibility was kept so that other guis don't go nuts.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@90008 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | data/pcsxr.ui | 97 | ||||
| -rwxr-xr-x | gui/ConfDlg.c | 4 | ||||
| -rwxr-xr-x | gui/Config.c | 4 | ||||
| -rwxr-xr-x | libpcsxcore/cdriso.c | 6 | ||||
| -rwxr-xr-x | libpcsxcore/cdrom.c | 6 | ||||
| -rwxr-xr-x | libpcsxcore/psxcommon.h | 8 |
6 files changed, 91 insertions, 34 deletions
diff --git a/data/pcsxr.ui b/data/pcsxr.ui index 2a7ed4c3..573f07fb 100644 --- a/data/pcsxr.ui +++ b/data/pcsxr.ui @@ -1711,23 +1711,6 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="GtkCheckButton_CDDA"> - <property name="label" translatable="yes">Disable CD Audio</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> <object class="GtkCheckButton" id="GtkCheckButton_SlowBoot"> <property name="label" translatable="yes">Slow Boot</property> <property name="visible">True</property> @@ -1881,6 +1864,57 @@ </packing> </child> <child> + <object class="GtkFrame" id="frame_pref"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <child> + <object class="GtkHBox" id="hbox51"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="spacing">10</property> + <child> + <object class="GtkLabel" id="label_cdda"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">CD Audio</property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="GtkCombo_CDDA"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore5</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext5"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> <object class="GtkFrame" id="frame16"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -1939,11 +1973,11 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">3</property> </packing> </child> <child> - <object class="GtkFrame" id="frame_rew"> + <object class="GtkFrame" id="frame_rew"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label_xalign">0</property> @@ -1952,7 +1986,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">5</property> - <property name="spacing">4</property> + <property name="spacing">4</property> <child> <object class="GtkLabel" id="label70"> <property name="visible">True</property> @@ -2018,7 +2052,7 @@ <property name="expand">False</property> <property name="fill">False</property> <property name="position">4</property> - </packing> + </packing> </child> <child> <object class="GtkEntry" id="GtkEntry_RewindMem"> @@ -2061,7 +2095,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </object> @@ -2453,7 +2487,7 @@ <object class="GtkMenuItem" id="GtkMenuItem_LoadSlotRecent"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Most _Recent</property> + <property name="label" translatable="yes">Slot _Recent</property> <property name="use_underline">True</property> <accelerator key="R" signal="activate" modifiers="GDK_MOD1_MASK"/> </object> @@ -4355,4 +4389,21 @@ </row> </data> </object> + <object class="GtkListStore" id="liststore5"> + <columns> + <!-- ITEMS HERE MUST MATCH psxcommon.h ENUM !--> + <column type="gchararray"/> + </columns> + <data> + <row> + <col id="0" translatable="yes">Enabled (Little endian)</col> + </row> + <row> + <col id="0" translatable="yes">Disabled</col> + </row> + <row> + <col id="0" translatable="yes">Enabled (Big endian)</col> + </row> + </data> + </object> </interface> diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c index 9b414f79..7041c259 100755 --- a/gui/ConfDlg.c +++ b/gui/ConfDlg.c @@ -900,7 +900,7 @@ void OnCpu_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) { Config.Xa = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Xa"))); 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.Cdda = gtk_combo_box_get_active(GTK_COMBO_BOX(gtk_builder_get_object(builder, "GtkCombo_CDDA"))); Config.SlowBoot = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_SlowBoot"))); Config.PsxAuto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_PsxAuto"))); @@ -981,7 +981,7 @@ void OnConf_Cpu() { 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_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_combo_box_set_active(GTK_COMBO_BOX(gtk_builder_get_object(builder, "GtkCombo_CDDA")), Config.Cdda); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_SlowBoot")), Config.SlowBoot); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_PsxAuto")), Config.PsxAuto); diff --git a/gui/Config.c b/gui/Config.c index 5f9a0c99..8d6253c2 100755 --- a/gui/Config.c +++ b/gui/Config.c @@ -130,7 +130,7 @@ int LoadConfig(PcsxConfig *Conf) { Config.SioIrq = GetValueb(data, "SioIrq"); Config.Mdec = GetValueb(data, "Mdec"); Config.PsxAuto = GetValueb(data, "PsxAuto"); - Config.Cdda = GetValueb(data, "Cdda"); + Config.Cdda = GetValuel(data, "Cdda"); Config.SlowBoot= GetValueb(data, "SlowBoot"); Config.Debug = GetValueb(data, "Dbg"); Config.PsxOut = (Config.PsxOut || GetValueb(data, "PsxOut")); @@ -179,7 +179,7 @@ void SaveConfig() { SetValueb("SioIrq", Config.SioIrq); SetValueb("Mdec", Config.Mdec); SetValueb("PsxAuto", Config.PsxAuto); - SetValueb("Cdda", Config.Cdda); + SetValuel("Cdda", Config.Cdda); SetValueb("SlowBoot",Config.SlowBoot); SetValueb("Dbg", Config.Debug); SetValueb("PsxOut", Config.PsxOut); diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 4481b33d..95a787b4 100755 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -1980,8 +1980,8 @@ long CALLBACK ISOreadCDDA(unsigned char m, unsigned char s, unsigned char f, uns break; } - // data tracks play silent - if (ti[track].type != CDDA) { + // data tracks play silent (or CDDA set to silent) + if (ti[track].type != CDDA || Config.Cdda == CDDA_DISABLED) { memset(buffer, 0, CD_FRAMESIZE_RAW); return 0; } @@ -2006,7 +2006,7 @@ long CALLBACK ISOreadCDDA(unsigned char m, unsigned char s, unsigned char f, uns return -1; } - if (cddaBigEndian) { + if (Config.Cdda == CDDA_ENABLED_BE || cddaBigEndian) { int i; unsigned char tmp; diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 69d665a6..2aa6f9ad 100755 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -703,7 +703,7 @@ void cdrInterrupt() { ReadTrack(cdr.SetSectorPlay); cdr.TrackChanged = FALSE; - if (!Config.Cdda) + if (Config.Cdda != CDDA_DISABLED) CDR_play(cdr.SetSectorPlay); // Vib Ribbon: gameplay checks flag @@ -1582,7 +1582,7 @@ void cdrReset() { int cdrFreeze(gzFile f, int Mode) { u8 tmpp[3]; - if (Mode == 0 && !Config.Cdda) + if (Mode == 0 && Config.Cdda != CDDA_DISABLED) CDR_stop(); gzfreeze(&cdr, sizeof(cdr)); @@ -1600,7 +1600,7 @@ int cdrFreeze(gzFile f, int Mode) { if (cdr.Play) { Find_CurTrack(cdr.SetSectorPlay); - if (!Config.Cdda) + if (Config.Cdda != CDDA_DISABLED) CDR_play(cdr.SetSectorPlay); } } diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index b6f83e74..8def3612 100755 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -141,7 +141,7 @@ typedef struct { boolean SioIrq; boolean Mdec; boolean PsxAuto; - boolean Cdda; + u8 Cdda; boolean HLE; boolean SlowBoot; boolean Debug; @@ -189,6 +189,12 @@ enum { CPU_INTERPRETER }; // CPU Types +enum { + CDDA_ENABLED_LE = 0, + CDDA_DISABLED, + CDDA_ENABLED_BE +}; // CDDA Types + int EmuInit(); void EmuReset(); void EmuShutdown(); |
