• R/O
  • SSH
  • HTTPS

gpsp-kai: Commit


Commit MetaInfo

Revision576 (tree)
Zeit2010-03-19 10:25:24
Autortakka

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/iso_tool/Makefile (revision 575)
+++ trunk/iso_tool/Makefile (revision 576)
@@ -17,8 +17,8 @@
1717
1818 LIBDIR = ./
1919 LDFLAGS =
20-LIBS = -lpspsystemctrl_user -lpsppower -lpspkubridge -lz -lpspumd -lpspgu -lpsputility -lpsprtc -lpspaudiolib -lpspaudio -lpspnet -lpsphttp
21-LIBS += -lcurl -lpspgum -lm
20+LIBS = -lpspsystemctrl_user -lpspsystemctrl_kernel -lpsppower -lpspkubridge -lz -lpspumd -lpspgu -lpsputility -lpsprtc -lpspaudiolib -lpspaudio -lpspnet -lpsphttp
21+LIBS += -lcurl -lpspgum -lm
2222
2323
2424 OBJS = main.o \
--- trunk/iso_tool/menu.c (revision 575)
+++ trunk/iso_tool/menu.c (revision 576)
@@ -12,6 +12,10 @@
1212 #include <psprtc.h>
1313 #include <psputility.h>
1414 #include <psputility_sysparam.h>
15+#include <pspumd.h>
16+#include <systemctrl.h>
17+#include <systemctrl_se.h>
18+#include <pspctrl_kernel.h>
1519
1620 #include "menu.h"
1721
@@ -51,6 +55,7 @@
5155 int soft_reboot(char *dir, char *file, file_type type, int opt_1, int opt_2);
5256 int remove_file(char *dir, char *file, file_type type, int opt_1, int opt_2);
5357 int fix_header(char *dir, char *file, file_type type, int opt_1, int opt_2);
58+int boot_iso(char *dir, char *file, file_type type, int opt_1, int opt_2);
5459
5560 int file_trans(char* out_path, char *in_path, trans_type type, int level, int limit, int opt_1, int opt_2);
5661
@@ -68,6 +73,7 @@
6873 { MENU_COMMAND, "EBOOTリカバリ", (eboot_recovery), NULL, 0, 0 },
6974 { MENU_COMMAND, "リネーム", (rename_file), NULL, 0, 0 },
7075 { MENU_COMMAND, "CSO変換", (iso2cso), NULL, 2048, 0 },
76+ { MENU_COMMAND, "起動", (boot_iso), NULL, 2048, 0 },
7177 { MENU_NOP, "--------------", (NULL), NULL, 0, 0 },
7278 { MENU_COMMAND, "削除", (remove_file), NULL, 0, 0 },
7379 { MENU_NOP, "\0", (NULL), NULL, 0, 0 }
@@ -1247,3 +1253,41 @@
12471253 ret = ms_write(header_size, path, 0x04, 1);
12481254 return DONE;
12491255 }
1256+
1257+int boot_iso(char *dir, char *file, file_type type, int opt_1, int opt_2)
1258+{
1259+ char path[MAX_PATH];
1260+ SEConfig config;
1261+ int ret;
1262+
1263+ strcpy(path, dir);
1264+ strcat(path, file);
1265+
1266+ sctrlSEUmountUmd();
1267+ sctrlSESetDiscOut(1);
1268+ sctrlSEGetConfig(&config);
1269+ switch(config.umdmode)
1270+ {
1271+ // Normal
1272+ case 0:
1273+ sctrlSEMountUmdFromFile(path, 0, config.useisofsonumdinserted);
1274+ break;
1275+ // OE isofs
1276+ case 1:
1277+ sctrlSEMountUmdFromFile(path, 1, 1);
1278+ break;
1279+ // M33 Driver
1280+ case 2:
1281+ sctrlSEMountUmdFromFile(path, 1, 1);
1282+ break;
1283+ // Sony NP9660
1284+ case 3:
1285+ sctrlSEMountUmdFromFile(path, 1, 1);
1286+ break;
1287+ }
1288+ sceUmdActivate(1, "disc0:");
1289+// sceUmdWaitDriveStat(UMD_WAITFORINIT);
1290+
1291+ sctrlKernelLoadExecVSHDisc("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", NULL);
1292+ return DONE;
1293+}
Show on old repository browser