diff --git a/build.rb b/build.rb
index b9538a2aa1..62b67e6906 100755
--- a/build.rb
+++ b/build.rb
@@ -22,7 +22,7 @@ $pcsx2_prefix = " --prefix #{$main_dir}"
$plugins_prefix = " --prefix #{$plugin_install_dir}"
$plugin_list=["CDVDnull", "dev9null", "FWnull", "USBnull", "SPU2null", "zerogs", "zzogl", "zeropad", "zerospu2", "PeopsSPU2", "CDVDiso", "CDVDisoEFP", "CDVDlinuz"]
-$full_plugin_list=["CDVDnull", "dev9null", "FWnull", "USBnull", "SPU2null", "zerogs", "zzogl", "zeropad", "zerospu2", "PeopsSPU2", "CDVDiso", "CDVDisoEFP", "CDVDlinuz","GSnull","PadNull","wxpad"]
+$full_plugin_list=["CDVDnull", "dev9null", "FWnull", "USBnull", "SPU2null", "zerogs", "zzogl", "zeropad", "zerospu2", "PeopsSPU2", "CDVDiso", "CDVDisoEFP", "CDVDlinuz","GSnull","PadNull","onepad"]
$pcsx2_build_types = {
"dev" => " --enable-devbuild ",
diff --git a/pcsx2/CDVD/Makefile.am b/pcsx2/CDVD/Makefile.am
index be2de4296b..3973d99810 100644
--- a/pcsx2/CDVD/Makefile.am
+++ b/pcsx2/CDVD/Makefile.am
@@ -12,7 +12,7 @@ INCLUDES = -I$(top_srcdir) -I$(x86_dir) -I$(common_dir) -I$(third_dir)
noinst_LIBRARIES = libps2_cdvd.a
libps2_cdvd_a_SOURCES = \
-CDVD.cpp CDVDiso.cpp CDVDisodrv.cpp CdRom.cpp \
-CDVD.h CDVD_internal.h CDVDiso.h CDVDisodrv.h CDVDlib.h CdRom.h
+CDVD.cpp IsoFStools.cpp IsoFSdrv.cpp CdRom.cpp \
+CDVD.h CDVD_internal.h IsoFStools.h IsoFSdrv.h IsoFScdvd.h CdRom.h
#SUBDIRS =
\ No newline at end of file
diff --git a/pcsx2/IPU/IPU.cpp b/pcsx2/IPU/IPU.cpp
index 4b4cd3845c..4054336681 100644
--- a/pcsx2/IPU/IPU.cpp
+++ b/pcsx2/IPU/IPU.cpp
@@ -461,6 +461,7 @@ static __forceinline BOOL ipuIDEC(u32 val)
s_routine = so_create(mpeg2sliceIDEC, &s_RoutineDone, s_tempstack, sizeof(s_tempstack));
assert(s_routine != NULL);
+ //return;
so_call(s_routine);
if (s_RoutineDone) s_routine = NULL;
diff --git a/pcsx2/IPU/mpeg2lib/Mpeg.cpp b/pcsx2/IPU/mpeg2lib/Mpeg.cpp
index 7962dc57f1..7297baeb6a 100644
--- a/pcsx2/IPU/mpeg2lib/Mpeg.cpp
+++ b/pcsx2/IPU/mpeg2lib/Mpeg.cpp
@@ -1131,7 +1131,7 @@ void __forceinline finishmpeg2sliceIDEC(decoder_t* &decoder)
}
// This fixes Mana Khemia if uncommented, but needs testing.
-//#define ALWAYS_RESUME_BEFORE_EXITING
+#define ALWAYS_RESUME_BEFORE_EXITING
void mpeg2sliceIDEC(void* pdone)
{
u32 read;
@@ -1221,6 +1221,11 @@ void mpeg2sliceIDEC(void* pdone)
while (g_nIPU0Data > 0)
{
read = FIFOfrom_write((u32*)g_pIPU0Pointer, g_nIPU0Data);
+
+ if (read != 8)
+ {
+ Console::Error("g_nIPU0Data = 0x%x; read = 0x%x", params g_nIPU0Data, read);
+ }
if (read == 0)
{
@@ -1231,6 +1236,7 @@ void mpeg2sliceIDEC(void* pdone)
{
g_pIPU0Pointer += read * 16;
g_nIPU0Data -= read;
+
}
}
@@ -1240,6 +1246,14 @@ void mpeg2sliceIDEC(void* pdone)
NEEDBITS(decoder->bitstream_buf, decoder->bitstream_bits, decoder->bitstream_ptr);
mba_inc = 0;
+ #ifdef ALWAYS_RESUME_BEFORE_EXITING
+ if (!resumed)
+ {
+ so_resume();
+ Console::Error("Resume forced in mpeg2sliceIDEC:1");
+ }
+ #endif
+
while (1)
{
if (decoder->bitstream_buf >= 0x10000000)
@@ -1256,19 +1270,19 @@ void mpeg2sliceIDEC(void* pdone)
{
case 8: /* macroblock_escape */
+ Console::Error("macroblock escape ");
mba_inc += 33;
/* pass through */
case 15: /* macroblock_stuffing (MPEG1 only) */
+ Console::Error("macroblock_stuffing (MPEG1 only) ");
DUMPBITS(decoder->bitstream_buf, decoder->bitstream_bits, 11);
NEEDBITS(decoder->bitstream_buf, decoder->bitstream_bits, decoder->bitstream_ptr);
continue;
default: /* end of slice/frame, or error? */
{
- #ifdef ALWAYS_RESUME_BEFORE_EXITING
- if (!resumed) so_resume();
- #endif
+ Console::Error("UBITS(decoder->bitstream_buf, 11) is 0x%x", params UBITS(decoder->bitstream_buf, 11));
finishmpeg2sliceIDEC(decoder);
@@ -1297,7 +1311,11 @@ void mpeg2sliceIDEC(void* pdone)
}
#ifdef ALWAYS_RESUME_BEFORE_EXITING
- if (!resumed) so_resume();
+ if (!resumed)
+ {
+ so_resume();
+ Console::Error("Resume forced in mpeg2sliceIDEC:2");
+ }
#endif
finishmpeg2sliceIDEC(decoder);
diff --git a/pcsx2/Linux/interface.c b/pcsx2/Linux/interface.c
index 774b27f02c..2f00a89ecc 100644
--- a/pcsx2/Linux/interface.c
+++ b/pcsx2/Linux/interface.c
@@ -638,7 +638,6 @@ create_SpeedHacksDlg (void)
GtkWidget *alignment37;
GtkWidget *vbox76;
GtkWidget *check_iop_cycle_rate;
- GtkWidget *check_wait_cycles_sync_hack;
GtkWidget *check_intc_sync_hack;
GtkWidget *check_idle_loop_fastforward;
GtkWidget *label114;
@@ -792,12 +791,6 @@ create_SpeedHacksDlg (void)
gtk_box_pack_start (GTK_BOX (vbox76), check_iop_cycle_rate, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, check_iop_cycle_rate, _("Small speedup, and works well with most games."), NULL);
- check_wait_cycles_sync_hack = gtk_check_button_new_with_mnemonic (_("WaitCycles Sync Hack"));
- gtk_widget_set_name (check_wait_cycles_sync_hack, "check_wait_cycles_sync_hack");
- gtk_widget_show (check_wait_cycles_sync_hack);
- gtk_box_pack_start (GTK_BOX (vbox76), check_wait_cycles_sync_hack, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (tooltips, check_wait_cycles_sync_hack, _("Small speedup. Works well with most games, but it may cause certain games to crash, or freeze up during bootup or stage changes."), NULL);
-
check_intc_sync_hack = gtk_check_button_new_with_mnemonic (_("INTC Sync Hack"));
gtk_widget_set_name (check_intc_sync_hack, "check_intc_sync_hack");
gtk_widget_show (check_intc_sync_hack);
@@ -909,7 +902,6 @@ create_SpeedHacksDlg (void)
GLADE_HOOKUP_OBJECT (SpeedHacksDlg, alignment37, "alignment37");
GLADE_HOOKUP_OBJECT (SpeedHacksDlg, vbox76, "vbox76");
GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_iop_cycle_rate, "check_iop_cycle_rate");
- GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_wait_cycles_sync_hack, "check_wait_cycles_sync_hack");
GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_intc_sync_hack, "check_intc_sync_hack");
GLADE_HOOKUP_OBJECT (SpeedHacksDlg, check_idle_loop_fastforward, "check_idle_loop_fastforward");
GLADE_HOOKUP_OBJECT (SpeedHacksDlg, label114, "label114");
diff --git a/pcsx2/Linux/pcsx2.glade b/pcsx2/Linux/pcsx2.glade
index 841d42da45..0bff4658cb 100644
--- a/pcsx2/Linux/pcsx2.glade
+++ b/pcsx2/Linux/pcsx2.glade
@@ -1582,26 +1582,6 @@ If you have problems, Disable all of these and try again.
-
-
- True
- Small speedup. Works well with most games, but it may cause certain games to crash, or freeze up during bootup or stage changes.
- True
- WaitCycles Sync Hack
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
-
-
- 0
- False
- False
-
-
-
True
diff --git a/plugins/onepad/Linux/linux.cpp b/plugins/onepad/Linux/linux.cpp
index 833a567767..97e8d990a1 100644
--- a/plugins/onepad/Linux/linux.cpp
+++ b/plugins/onepad/Linux/linux.cpp
@@ -120,24 +120,6 @@ EXPORT_C_(void) PADupdate(int pad)
set_bit(status[pad], i); // pressed
break;
}
- case PAD_JOYSTICK:
- {
- int value = SDL_JoystickGetAxis((pjoy)->GetJoy(), key_to_axis(cpad, i));
-
- switch (i)
- {
- case PAD_LX:
- case PAD_LY:
- case PAD_RX:
- case PAD_RY:
- if (abs(value) > (pjoy)->GetDeadzone(value))
- Analog::ConfigurePad(i, pad, value);
- else
- Analog::ResetPad(i, pad);
- break;
- }
- break;
- }
case PAD_HAT:
{
int value = SDL_JoystickGetHat((pjoy)->GetJoy(), key_to_axis(cpad, i));
@@ -158,12 +140,40 @@ EXPORT_C_(void) PADupdate(int pad)
{
int value = SDL_JoystickGetAxis((pjoy)->GetJoy(), key_to_axis(cpad, i));
+ PAD_LOG("%s: %d (%d)\n", KeyName(cpad, i).c_str(), value, key_to_pov_sign(cpad, i));
if (key_to_pov_sign(cpad, i) && (value < -2048))
+ {
+ //PAD_LOG("%s Released+.\n", KeyName(cpad, i).c_str());
clear_bit(status[pad], i);
+ }
else if (!key_to_pov_sign(cpad, i) && (value > 2048))
+ {
+ //PAD_LOG("%s Released-\n", KeyName(cpad, i).c_str());
clear_bit(status[pad], i);
+ }
else
+ {
+ //PAD_LOG("%s Pressed.\n", KeyName(cpad, i).c_str());
set_bit(status[pad], i);
+ }
+ break;
+ }
+ case PAD_JOYSTICK:
+ {
+ int value = SDL_JoystickGetAxis((pjoy)->GetJoy(), key_to_axis(cpad, i));
+
+ switch (i)
+ {
+ case PAD_LX:
+ case PAD_LY:
+ case PAD_RX:
+ case PAD_RY:
+ if (abs(value) > (pjoy)->GetDeadzone(value))
+ Analog::ConfigurePad(pad, i, value);
+ else
+ Analog::ResetPad(pad, i);
+ break;
+ }
break;
}
default: break;
diff --git a/plugins/onepad/analog.cpp b/plugins/onepad/analog.cpp
index 2eef28a9fb..1e07f1c239 100644
--- a/plugins/onepad/analog.cpp
+++ b/plugins/onepad/analog.cpp
@@ -24,24 +24,24 @@ PADAnalog g_lanalog[NUM_OF_PADS], g_ranalog[NUM_OF_PADS];
namespace Analog
{
- u8 Pad(int padvalue, u8 i)
+ u8 Pad(int pad, u8 index)
{
- switch (padvalue)
+ switch (index)
{
case PAD_LX:
- return g_lanalog[i].x;
+ return g_lanalog[pad].x;
break;
case PAD_RX:
- return g_ranalog[i].x;
+ return g_ranalog[pad].x;
break;
case PAD_LY:
- return g_lanalog[i].y;
+ return g_lanalog[pad].y;
break;
case PAD_RY:
- return g_ranalog[i].y;
+ return g_ranalog[pad].y;
break;
default:
@@ -50,24 +50,24 @@ namespace Analog
}
}
- void SetPad(int padvalue, u8 i, u8 value)
+ void SetPad(u8 pad, int index, u8 value)
{
- switch (padvalue)
+ switch (index)
{
case PAD_LX:
- g_lanalog[i].x = value;
+ g_lanalog[pad].x = value;
break;
case PAD_RX:
- g_ranalog[i].x = value;
+ g_ranalog[ pad].x = value;
break;
case PAD_LY:
- g_lanalog[i].y = value;
+ g_lanalog[ pad].y = value;
break;
case PAD_RY:
- g_ranalog[i].y = value;
+ g_ranalog[pad].y = value;
break;
default:
@@ -75,30 +75,30 @@ namespace Analog
}
}
- void InvertPad(int padvalue, u8 i)
+ void InvertPad(u8 pad, int key)
{
- SetPad(padvalue, i, -Pad(padvalue, i));
+ SetPad(pad, key, -Pad(pad, key));
}
- void ResetPad(int padvalue, u8 i)
+ void ResetPad( u8 pad, int key)
{
- SetPad(padvalue, i, 0x80);
+ SetPad(pad, key, 0x80);
}
void Init()
{
- for (int i = 0; i < 2; ++i)
+ for (u8 pad = 0; pad < 2; ++pad)
{
- ResetPad(PAD_LX, i);
- ResetPad(PAD_LY, i);
- ResetPad(PAD_RX, i);
- ResetPad(PAD_RY, i);
+ ResetPad(pad, PAD_LX);
+ ResetPad(pad, PAD_LY);
+ ResetPad(pad, PAD_RX);
+ ResetPad(pad, PAD_RY);
}
}
- bool RevertPad(u8 padvalue)
+ bool RevertPad(u8 index)
{
- switch (padvalue)
+ switch (index)
{
case PAD_LX:
return ((conf.options & PADOPTION_REVERTLX) != 0);
@@ -122,18 +122,17 @@ namespace Analog
}
}
- void ConfigurePad(int padvalue, u8 i, int value)
+ void ConfigurePad( u8 pad, int index, int value)
{
- int temp = Pad(padvalue, i);
- SetPad(padvalue, i, value / 256);
- if (RevertPad(padvalue)) InvertPad(padvalue, i);
- SetPad(padvalue, i, Pad(padvalue, i) + 0x80);
-
- //PAD_LOG("Setting pad[%d]@%d to %d from %d\n", padvalue, i, value, temp);
+ int temp = Pad(pad, index);
+ SetPad(pad, index, value / 256);
+ if (RevertPad(index)) InvertPad(pad,index);
+ SetPad(pad, index, Pad(pad, index) + 0x80);
}
- int AnalogToPad(int padvalue)
+
+ int AnalogToPad(int index)
{
- switch (padvalue)
+ switch (index)
{
case PAD_R_LEFT:
return PAD_RX;
diff --git a/plugins/onepad/analog.h b/plugins/onepad/analog.h
index 62875cb1d0..ab3053ec14 100644
--- a/plugins/onepad/analog.h
+++ b/plugins/onepad/analog.h
@@ -25,12 +25,12 @@
namespace Analog
{
extern void Init();
- extern u8 Pad(int padvalue, u8 i);
- extern void SetPad(int padvalue, u8 i, u8 value);
- extern void InvertPad(int padvalue, u8 i);
- extern bool RevertPad(u8 padvalue);
- extern void ResetPad(int padvalue, u8 i);
- extern void ConfigurePad(int padvalue, u8 i, int value);
+ extern u8 Pad(int pad, u8 index);
+ extern void SetPad(u8 pad, int index, u8 value);
+ extern void InvertPad(u8 pad, int key);
+ extern bool RevertPad(u8 index);
+ extern void ResetPad( u8 pad, int key);
+ extern void ConfigurePad( u8 pad, int index, int value);
extern int KeypadToPad(u8 keypress);
- extern int AnalogToPad(int padvalue);
+ extern int AnalogToPad(int index);
}
\ No newline at end of file
diff --git a/plugins/onepad/keyboard.cpp b/plugins/onepad/keyboard.cpp
index caf3d2f36c..e94bf03554 100644
--- a/plugins/onepad/keyboard.cpp
+++ b/plugins/onepad/keyboard.cpp
@@ -92,13 +92,13 @@ void PollForX11KeyboardInput(int pad)
case PAD_R_UP:
case PAD_L_LEFT:
case PAD_L_UP:
- Analog::ConfigurePad(Analog::AnalogToPad(i), pad, DEF_VALUE);
+ Analog::ConfigurePad(pad, Analog::AnalogToPad(i), DEF_VALUE);
break;
case PAD_R_RIGHT:
case PAD_R_DOWN:
case PAD_L_RIGHT:
case PAD_L_DOWN:
- Analog::ConfigurePad(Analog::AnalogToPad(i), pad, -DEF_VALUE);
+ Analog::ConfigurePad(pad, Analog::AnalogToPad(i), -DEF_VALUE);
break;
}
i += 0xff00;
@@ -123,7 +123,7 @@ void PollForX11KeyboardInput(int pad)
// Analog Controls.
if ((i > PAD_RY) && (i <= PAD_R_LEFT))
{
- Analog::ResetPad(Analog::AnalogToPad(i), pad);
+ Analog::ResetPad(pad, Analog::AnalogToPad(i));
i += 0xff00;
}
diff --git a/plugins/onepad/onepad.cpp b/plugins/onepad/onepad.cpp
index b443f0a903..585e3c7178 100644
--- a/plugins/onepad/onepad.cpp
+++ b/plugins/onepad/onepad.cpp
@@ -195,7 +195,6 @@ void __Log(const char *fmt, ...)
{
va_list list;
- //if (padLog == NULL || !conf.log) return;
if (padLog == NULL) return;
va_start(list, fmt);
vfprintf(padLog, fmt, list);
@@ -393,10 +392,10 @@ u8 _PADpoll(u8 value)
stdpar[curPad][2] = status[curPad] >> 8;
stdpar[curPad][3] = status[curPad] & 0xff;
- stdpar[curPad][4] = Analog::Pad(PAD_RX, curPad);
- stdpar[curPad][5] = Analog::Pad(PAD_RY, curPad);
- stdpar[curPad][6] = Analog::Pad(PAD_LX, curPad);
- stdpar[curPad][7] = Analog::Pad(PAD_LY, curPad);
+ stdpar[curPad][4] = Analog::Pad(curPad, PAD_RX);
+ stdpar[curPad][5] = Analog::Pad(curPad, PAD_RY);
+ stdpar[curPad][6] = Analog::Pad(curPad, PAD_LX);
+ stdpar[curPad][7] = Analog::Pad(curPad, PAD_LY);
if (padMode[curPad] == 1)
cmdLen = 20;