Permalink
Browse files

Add support for DTL-T10000

  • Loading branch information...
1 parent fe03c0d commit b2e8af7444abbc928a0dbc541da0f210c945a589 @root670 committed Mar 27, 2016
Showing with 53 additions and 6 deletions.
  1. +18 −1 Makefile
  2. +4 −0 settings.c
  3. +31 −5 util.c
View
@@ -3,6 +3,8 @@
# by root670
#
+DTL_T10000 = 0
+
EE_BIN = cheatdevice.elf
# Helper libraries
@@ -40,11 +42,20 @@ OBJS += bootstrap_elf.o
GSKIT = $(PS2DEV)/gsKit
-EE_LIBS += -lpad -lgskit_toolkit -lgskit -ldmakit -lc -lkernel -lmc -lpatches -lerl -lcdvd -lz
+ifeq ($(DTL_T10000),1)
+ EE_CFLAGS += -D_DTL_T10000 -g
+ EE_LIBS += -lpadx
+else
+ EE_LIBS += -lpad
+endif
+EE_LIBS += -lgskit_toolkit -lgskit -ldmakit -lc -lkernel -lmc -lpatches -lerl -lcdvd -lz
EE_LDFLAGS += -L$(PS2SDK)/ee/lib -L$(PS2SDK)/ports/lib -L$(GSKIT)/lib -s
EE_INCS += -I$(GSKIT)/include -I$(PS2SDK)/ports/include
IRX_OBJS += usbd_irx.o usb_mass_irx.o iomanX_irx.o
+ifeq ($(DTL_T10000),1)
+ IRX_OBJS += sio2man_irx.o mcman_irx.o mcserv_irx.o padman_irx.o
+endif
EE_OBJS = $(IRX_OBJS) $(OBJS) main.o
@@ -55,6 +66,12 @@ modules:
bin2o resources/iomanX.irx iomanX_irx.o _iomanX_irx
bin2o resources/usbd.irx usbd_irx.o _usbd_irx
bin2o resources/usb_mass.irx usb_mass_irx.o _usb_mass_irx
+ifeq ($(DTL_T10000),1)
+ bin2o $(PS2SDK)/iop/irx/freesio2.irx sio2man_irx.o _sio2man_irx
+ bin2o $(PS2SDK)/iop/irx/mcman.irx mcman_irx.o _mcman_irx
+ bin2o $(PS2SDK)/iop/irx/mcserv.irx mcserv_irx.o _mcserv_irx
+ bin2o $(PS2SDK)/iop/irx/freepad.irx padman_irx.o _padman_irx
+endif
# Graphics
bin2o resources/background.png background_png.o _background_png
View
@@ -19,7 +19,11 @@ int initSettingsMan()
{
printf("\n ** Initializing Settings Manager **\n");
+ #ifdef _DTL_T10000
+ ini = ini_load("host:CheatDevicePS2.ini");
+ #else
ini = ini_load("CheatDevicePS2.ini");
+ #endif
if(!ini)
{
printf("Error opening CheatDevicePS2.ini\n");
View
@@ -15,6 +15,17 @@
#include <sbv_patches.h>
#include <libmc.h>
+#ifdef _DTL_T10000
+extern u8 _sio2man_irx_start[];
+extern int _sio2man_irx_size;
+extern u8 _mcman_irx_start[];
+extern int _mcman_irx_size;
+extern u8 _mcserv_irx_start[];
+extern int _mcserv_irx_size;
+extern u8 _padman_irx_start[];
+extern int _padman_irx_size;
+#endif
+
extern u8 _iomanX_irx_start[];
extern int _iomanX_irx_size;
extern u8 _ps2kbd_irx_start[];
@@ -33,10 +44,12 @@ void loadModules()
/* IOP reset routine taken from ps2rd */
SifInitRpc(0);
- while (!SifIopReset("rom0:UDNL rom0:EELOADCNF", 0))
- ;
- while (!SifIopSync())
- ;
+ #ifdef _DTL_T10000
+ while (!SifIopReset("rom0:UDNL", 0));
+ #else
+ while (!SifIopReset("rom0:UDNL rom0:EELOADCNF", 0));
+ #endif
+ while (!SifIopSync());
/* exit services */
fioExit();
@@ -57,17 +70,30 @@ void loadModules()
FlushCache(0);
FlushCache(2);
- //sbv_patch_enable_lmb();
+ sbv_patch_enable_lmb();
+ sbv_patch_disable_prefix_check();
+
+ #ifdef _DTL_T10000
+ SifExecModuleBuffer(_sio2man_irx_start, _sio2man_irx_size, 0, NULL, &ret);
+ SifExecModuleBuffer(_padman_irx_start, _padman_irx_size, 0, NULL, &ret);
+ SifExecModuleBuffer(_mcman_irx_start, _mcman_irx_size, 0, NULL, &ret);
+ SifExecModuleBuffer(_mcserv_irx_start, _mcserv_irx_size, 0, NULL, &ret);
+ #else
SifLoadModule("rom0:SIO2MAN", 0, NULL);
SifLoadModule("rom0:PADMAN", 0, NULL);
SifLoadModule("rom0:MCMAN", 0, NULL);
SifLoadModule("rom0:MCSERV", 0, NULL);
+ #endif
SifExecModuleBuffer(_iomanX_irx_start, _iomanX_irx_size, 0, NULL, &ret);
SifExecModuleBuffer(_usbd_irx_start, _usbd_irx_size, 0, NULL, &ret);
SifExecModuleBuffer(_usb_mass_irx_start, _usb_mass_irx_size, 0, NULL, &ret);
+ #ifdef _DTL_T10000
+ mcInit(MC_TYPE_XMC);
+ #else
mcInit(MC_TYPE_MC);
+ #endif
padInit(0);
padPortOpen(0, 0, padBuff);

0 comments on commit b2e8af7

Please sign in to comment.