Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7dec2db
Modular pademu, prototypes of xbox modules and hid joystick module
belek666 May 24, 2020
2b6c279
Fixed the screwed analog inputs in the xbox360usb module
RoloDeOvo Sep 19, 2020
494d658
Added compatibility list.
RoloDeOvo Sep 19, 2020
c07e024
Deleted current compatibilty list for poor formatting.
RoloDeOvo Sep 19, 2020
f16f354
Added a better compatibility list.
RoloDeOvo Sep 19, 2020
a7b15f2
Compatibility list updated. Crazy Taxi confirmed to work
RoloDeOvo Sep 19, 2020
603e00d
Megaman X Collection confirmed to work with PADEMU
RoloDeOvo Sep 19, 2020
7314ea4
Klonoa 2 works with PADEMU but it will infinite load sometimes.
RoloDeOvo Sep 19, 2020
279f169
Jak and Daxter doesn't work with PADEMU
RoloDeOvo Sep 19, 2020
f6e4778
Update COMPATIBILITY.md
RoloDeOvo Sep 19, 2020
1b90f85
Update COMPATIBILITY.md
RoloDeOvo Sep 19, 2020
9e36ff2
Nights Into Dreams confirmed to work with Xbox PADEMU
RoloDeOvo Sep 23, 2020
bfe60f0
Alien Hominid works with Xbox PADEMU
RoloDeOvo Sep 23, 2020
c075f82
3 more games confirmed to work with Xbox PADEMU
RoloDeOvo Oct 5, 2020
e23170f
RaC 2 confirmed to work with Xbox PADEMU
RoloDeOvo Oct 5, 2020
8520351
Added some info
RoloDeOvo Oct 5, 2020
ac7b48c
Update COMPATIBILITY.md
RoloDeOvo Oct 5, 2020
d1ac38a
Red Faction confirmed to work with Xbox PADEMU
RoloDeOvo Oct 5, 2020
567ed58
THPS4 works with Xbox PADEMU.
RoloDeOvo Oct 5, 2020
ebbce34
Warriors Orochi 2 works with Xbox PADEMU.
RoloDeOvo Oct 5, 2020
ccfa57d
Burnout 2 works with Xbox PADEMU.
RoloDeOvo Oct 5, 2020
ba24cb2
Sonic Mega Collection Plus works with Xbox PADEMU.
RoloDeOvo Oct 5, 2020
4c5927f
Jak II confirmed to work with Xbox PADEMU
RoloDeOvo Oct 6, 2020
ff90ec9
Added devices to compatibility list.
RoloDeOvo Oct 21, 2020
11f6cf1
Delete compatibility list from master branch
RoloDeOvo Oct 21, 2020
1434b21
Merge pull request #6 from RoloDeOvo/master
belek666 Oct 22, 2020
c0bed3a
merged and fixed conflicts
belek666 Oct 22, 2020
66b9354
clang format
belek666 Oct 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 61 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ else
endif

ifeq ($(PADEMU),1)
IOP_OBJS += bt_pademu.o usb_pademu.o ds34usb.o ds34bt.o libds34usb.a libds34bt.a
IOP_OBJS += pademu.o btstack.o ds3usb.o ds4usb.o xbox360usb.o xboxoneusb.o \
ds3bt.o ds4bt.o hidusb.o ds34usb.o ds34bt.o libds34usb.a libds34bt.a
EE_CFLAGS += -DPADEMU
EE_INCS += -Imodules/ds34bt/ee -Imodules/ds34usb/ee
PADEMU_FLAGS = PADEMU=1
Expand Down Expand Up @@ -291,8 +292,15 @@ clean:
echo " -ds34bt"
$(MAKE) -C modules/ds34bt clean
echo " -pademu"
$(MAKE) -C modules/pademu USE_BT=1 clean
$(MAKE) -C modules/pademu USE_USB=1 clean
$(MAKE) -C modules/pademu clean
$(MAKE) -C modules/pademu/btstack clean
$(MAKE) -C modules/pademu/ds3usb clean
$(MAKE) -C modules/pademu/ds4usb clean
$(MAKE) -C modules/pademu/xbox360usb clean
$(MAKE) -C modules/pademu/xboxoneusb clean
$(MAKE) -C modules/pademu/ds3bt clean
$(MAKE) -C modules/pademu/ds4bt clean
$(MAKE) -C modules/pademu/hidusb clean
echo "-pc tools"
$(MAKE) -C pc clean

Expand Down Expand Up @@ -493,17 +501,59 @@ modules/ds34usb/iop/ds34usb.irx: modules/ds34usb/iop
$(EE_ASM_DIR)ds34usb.s: modules/ds34usb/iop/ds34usb.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ds34usb_irx

modules/pademu/bt_pademu.irx: modules/pademu
$(MAKE) -C $< USE_BT=1
modules/pademu/pademu.irx: modules/pademu
$(MAKE) -C $<

$(EE_ASM_DIR)pademu.s: modules/pademu/pademu.irx
$(BIN2S) $< $@ pademu_irx

modules/pademu/btstack/btstack.irx: modules/pademu/btstack
$(MAKE) -C $<

$(EE_ASM_DIR)btstack.s: modules/pademu/btstack/btstack.irx
$(BIN2S) $< $@ btstack_irx

modules/pademu/ds3usb/ds3usb.irx: modules/pademu/ds3usb
$(MAKE) -C $<

$(EE_ASM_DIR)ds3usb.s: modules/pademu/ds3usb/ds3usb.irx
$(BIN2S) $< $@ ds3usb_irx

modules/pademu/ds4usb/ds4usb.irx: modules/pademu/ds4usb
$(MAKE) -C $<

$(EE_ASM_DIR)ds4usb.s: modules/pademu/ds4usb/ds4usb.irx
$(BIN2S) $< $@ ds4usb_irx

$(EE_ASM_DIR)bt_pademu.s: modules/pademu/bt_pademu.irx
$(BIN2S) $< $@ bt_pademu_irx
modules/pademu/xbox360usb/xbox360usb.irx: modules/pademu/xbox360usb
$(MAKE) -C $<

modules/pademu/usb_pademu.irx: modules/pademu
$(MAKE) -C $< USE_USB=1
$(EE_ASM_DIR)xbox360usb.s: modules/pademu/xbox360usb/xbox360usb.irx
$(BIN2S) $< $@ xbox360usb_irx

modules/pademu/xboxoneusb/xboxoneusb.irx: modules/pademu/xboxoneusb
$(MAKE) -C $<

$(EE_ASM_DIR)xboxoneusb.s: modules/pademu/xboxoneusb/xboxoneusb.irx
$(BIN2S) $< $@ xboxoneusb_irx

modules/pademu/ds3bt/ds3bt.irx: modules/pademu/ds3bt
$(MAKE) -C $<

$(EE_ASM_DIR)ds3bt.s: modules/pademu/ds3bt/ds3bt.irx
$(BIN2S) $< $@ ds3bt_irx

modules/pademu/ds4bt/ds4bt.irx: modules/pademu/ds4bt
$(MAKE) -C $<

$(EE_ASM_DIR)ds4bt.s: modules/pademu/ds4bt/ds4bt.irx
$(BIN2S) $< $@ ds4bt_irx

modules/pademu/hidusb/hidusb.irx: modules/pademu/hidusb
$(MAKE) -C $<

$(EE_ASM_DIR)usb_pademu.s: modules/pademu/usb_pademu.irx
$(BIN2S) $< $@ usb_pademu_irx
$(EE_ASM_DIR)hidusb.s: modules/pademu/hidusb/hidusb.irx
$(BIN2S) $< $@ hidusb_irx

$(EE_ASM_DIR)usbhdfsd.s: $(PS2SDK)/iop/irx/usbhdfsd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ usbhdfsd_irx
Expand Down
1 change: 1 addition & 0 deletions ee_core/include/ee_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ int EnableCheatOp;
#ifdef PADEMU
int EnablePadEmuOp;
int PadEmuSettings;
int PadEmuModules;
#endif

int DisableDebug;
Expand Down
8 changes: 8 additions & 0 deletions ee_core/include/modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ enum OPL_MODULE_ID {
OPL_MODULE_ID_MCEMU,

OPL_MODULE_ID_PADEMU,
OPL_MODULE_ID_BTSTACK,
OPL_MODULE_ID_DS3USB,
OPL_MODULE_ID_DS4USB,
OPL_MODULE_ID_XBOX360USB,
OPL_MODULE_ID_XBOXONEUSB,
OPL_MODULE_ID_DS3BT,
OPL_MODULE_ID_DS4BT,
OPL_MODULE_ID_HIDUSB,

//Debugging modules
OPL_MODULE_ID_UDPTTY,
Expand Down
30 changes: 30 additions & 0 deletions ee_core/src/iopmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,38 @@ int New_Reset_Iop(const char *arg, int arglen)
}

#ifdef PADEMU
int btstack_loaded = 0;
if (iop_reboot_count >= 2 && EnablePadEmuOp) {
LoadOPLModule(OPL_MODULE_ID_PADEMU, 0, 4, (char *)&PadEmuSettings);
if (PadEmuModules & (1 << 0)) {
LoadOPLModule(OPL_MODULE_ID_DS3USB, 0, 0, NULL);
}
if (PadEmuModules & (1 << 1)) {
if (!btstack_loaded) {
LoadOPLModule(OPL_MODULE_ID_BTSTACK, 0, 0, NULL);
btstack_loaded = 1;
}
LoadOPLModule(OPL_MODULE_ID_DS3BT, 0, 0, NULL);
}
if (PadEmuModules & (1 << 2)) {
LoadOPLModule(OPL_MODULE_ID_DS4USB, 0, 0, NULL);
}
if (PadEmuModules & (1 << 3)) {
if (!btstack_loaded) {
LoadOPLModule(OPL_MODULE_ID_BTSTACK, 0, 0, NULL);
btstack_loaded = 1;
}
LoadOPLModule(OPL_MODULE_ID_DS4BT, 0, 0, NULL);
}
if (PadEmuModules & (1 << 4)) {
LoadOPLModule(OPL_MODULE_ID_XBOX360USB, 0, 0, NULL);
}
if (PadEmuModules & (1 << 5)) {
LoadOPLModule(OPL_MODULE_ID_XBOXONEUSB, 0, 0, NULL);
}
if (PadEmuModules & (1 << 6)) {
LoadOPLModule(OPL_MODULE_ID_HIDUSB, 0, 0, NULL);
}
}
#endif

Expand Down
1 change: 1 addition & 0 deletions ee_core/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static int eecoreInit(int argc, char **argv)
DPRINTF("PADEMU = %s\n", EnablePadEmuOp == 0 ? "Disabled" : "Enabled");

PadEmuSettings = _strtoi(_strtok(NULL, " "));
PadEmuModules = _strtoi(_strtok(NULL, " "));
#endif

i++;
Expand Down
1 change: 1 addition & 0 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ enum CONFIG_INDEX {
#define CONFIG_ITEM_PADEMUSOURCE "$PADEMUSource"
#define CONFIG_ITEM_ENABLEPADEMU "$EnablePadEmu"
#define CONFIG_ITEM_PADEMUSETTINGS "$PadEmuSettings"
#define CONFIG_ITEM_PADEMUMODULES "$PadEmuModules"

//OPL config keys
#define CONFIG_OPL_THEME "theme"
Expand Down
5 changes: 3 additions & 2 deletions include/dialogs.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ enum UI_ITEMS {
PADCFG_PADEMU_SOURCE,
PADCFG_PADEMU_CONFIG,
PADCFG_PADEMU_ENABLE,
PADCFG_PADEMU_MODE,
PADCFG_PADEMU_MODULES_LIST,
PADCFG_PADEMU_PORT,
PADCFG_PADEMU_VIB,
PADCFG_PADPORT,
Expand All @@ -157,8 +157,9 @@ enum UI_ITEMS {
PADCFG_PADEMU_MTAP_PORT,
PADCFG_PADEMU_WORKAROUND,
PADCFG_PADEMU_WORKAROUND_STR,
PADCFG_PADEMU_MODULES_SET,

COMPAT_MODE_BASE = 250,
COMPAT_MODE_BASE = 251,
#else
COMPAT_MODE_BASE = 200,
#endif
Expand Down
29 changes: 25 additions & 4 deletions include/extern_irx.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ extern int size_apemodpatch_irx;
extern void *audsrv_irx;
extern int size_audsrv_irx;

extern void *bt_pademu_irx;
extern int size_bt_pademu_irx;
extern void *btstack_irx;
extern int size_btstack_irx;

extern void *cdvdfsv_irx;
extern int size_cdvdfsv_irx;
Expand All @@ -34,6 +34,18 @@ extern int size_ds34bt_irx;
extern void *ds34usb_irx;
extern int size_ds34usb_irx;

extern void *ds3bt_irx;
extern int size_ds3bt_irx;

extern void *ds3usb_irx;
extern int size_ds3usb_irx;

extern void *ds4bt_irx;
extern int size_ds4bt_irx;

extern void *ds4usb_irx;
extern int size_ds4usb_irx;

extern void *filexio_irx;
extern int size_filexio_irx;

Expand All @@ -55,6 +67,9 @@ extern int size_hdd_mcemu_irx;
extern void *hdpro_atad_irx;
extern int size_hdpro_atad_irx;

extern void *hidusb_irx;
extern int size_hidusb_irx;

extern void *httpclient_irx;
extern int size_httpclient_irx;

Expand Down Expand Up @@ -94,6 +109,9 @@ extern int size_netman_irx;
extern void *f2techioppatch_irx;
extern int size_f2techioppatch_irx;

extern void *pademu_irx;
extern int size_pademu_irx;

extern void *padman_irx;
extern int size_padman_irx;

Expand Down Expand Up @@ -181,8 +199,11 @@ extern int size_usbhdfsdfsv_irx;
extern void *usb_mcemu_irx;
extern int size_usb_mcemu_irx;

extern void *usb_pademu_irx;
extern int size_usb_pademu_irx;
extern void *xbox360usb_irx;
extern int size_xbox360usb_irx;

extern void *xboxoneusb_irx;
extern int size_xboxoneusb_irx;

extern void *xhdd_irx;
extern int size_xhdd_irx;
Expand Down
7 changes: 3 additions & 4 deletions include/lang.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,9 @@ enum _STR_IDS {
_STR_PADEMU_SETTINGS,
_STR_PADEMU_ENABLE,
_STR_HINT_PADEMU_ENABLE,
_STR_PADEMU_MODE,
_STR_HINT_PADEMU_MODE,
_STR_DS34USB_MODE,
_STR_DS34BT_MODE,
_STR_PADEMU_MODULES,
_STR_HINT_PADEMU_MODULES,
_STR_HINT_PADEMU_MODULES_SET,
_STR_PADPORT,
_STR_HINT_PAD_PORT,
_STR_PADEMU_PORT,
Expand Down
1 change: 1 addition & 0 deletions include/opl.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ int showCfgPopup;
#ifdef PADEMU
int gEnablePadEmu;
int gPadEmuSettings;
int gPadEmuModules;
#endif

// ------------------------------------------------------------------------------------------------------------------------
Expand Down
16 changes: 2 additions & 14 deletions modules/pademu/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@

IOP_BIN = pademu.irx
IOP_OBJS = pademu.o sys_utils.o imports.o exports.o

ifeq ($(USE_USB),1)
IOP_BIN = usb_pademu.irx
IOP_CFLAGS += -DUSB
IOP_OBJS_DIR = obj.usb/
IOP_OBJS += ds34usb.o
endif

ifeq ($(USE_BT),1)
IOP_BIN = bt_pademu.irx
IOP_CFLAGS += -DBT
IOP_OBJS_DIR = obj.bt/
IOP_OBJS += ds34bt.o
endif
IOP_OBJS_DIR = obj.pademu/

ifeq ($(VMC),1)
IOP_CFLAGS += -DVMC
Expand Down
22 changes: 22 additions & 0 deletions modules/pademu/btstack/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

IOP_BIN = btstack.irx
IOP_OBJS = btstack.o imports.o exports.o
IOP_OBJS_DIR = obj.btstack/

IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%)

IOP_CFLAGS += -Wall -fno-builtin -DUSE_SMSUTILS
IOP_LDFLAGS += -s

all: OBJ_DIR $(IOP_BIN)

clean:
rm -f $(IOP_BIN) $(IOP_OBJS)

rebuild: clean all

OBJ_DIR:
mkdir -p $(IOP_OBJS_DIR)

include $(PS2SDK)/Defs.make
include ../Rules.make
Loading