Skip to content

Commit 94e9f79

Browse files
committed
just some janky 3.10 support (english language only, without 3.10C support)
1 parent 0b4618c commit 94e9f79

5 files changed

Lines changed: 396 additions & 28 deletions

File tree

compile.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ elif [[ "$1" == "3.04m" || "$1" == "3.04M" ]]; then
4141
elif [[ "$1" == "3.04j" || "$1" == "3.04J" ]]; then
4242
echo "Building for DVD Player v3.04J"
4343
dvd_ver="304J"
44+
elif [[ "$1" == "3.10" ]]; then
45+
echo "Building for DVD Player v3.10"
46+
dvd_ver="310X"
4447
else
4548
echo "Building for DVD Player v3.00E/A"
4649
fi
@@ -120,7 +123,7 @@ cp --recursive fs build/
120123

121124
./build/injector.elf
122125

123-
truncate -s 8192 build/code.bin
126+
truncate -s $(wc -c < "build/fs/VIDEO_TS/VIDEO_TS.IFO") build/code.bin
124127
cp build/code.bin build/fs/VIDEO_TS/VIDEO_TS.BUP
125128
cp build/fs/VIDEO_TS/VTS_01_1.VOB build/fs/VIDEO_TS/VTS_02_1.VOB
126129
cp build/fs/VIDEO_TS/VTS_01_1.VOB build/fs/VIDEO_TS/VTS_03_1.VOB

src/code/code.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ static void setup_pointers() {
2424
u32 *video_ts_ifo_303j = (u32 *)0x0069de10;
2525
u32 *video_ts_ifo_304m = (u32 *)0x0095ac70;
2626
u32 *video_ts_ifo_304j = (u32 *)0x006d4df0;
27+
u32 *video_ts_ifo_310 = (u32 *)0x005b9cc8;
2728

2829
elf_off = 516 << 11;
2930
if (video_ts_ifo_300e[0] == 0x45444956) {
@@ -280,6 +281,25 @@ static void setup_pointers() {
280281
_sceCd_ncmd_semid = (int *)0x004ef8a8;
281282
return;
282283
}
284+
elf_off = 2464 << 11;
285+
if (video_ts_ifo_310[0] == 0x45444956) {
286+
sceSifSyncIop = (sceSifSyncIop_t)0x0020e958;
287+
sceSifResetIop = (sceSifResetIop_t)0x0020e7d8;
288+
sceSifInitRpc = (sceSifInitRpc_t)0x00208d80;
289+
sceSifExitRpc = (sceSifExitRpc_t)0x00208f20;
290+
sceSifCallRpc = (sceSifCallRpc_t)0x002096e8;
291+
sceSifWriteBackDCache = (sceSifWriteBackDCache_t)0x00208cd0;
292+
sceCdNCmdDiskReady = (sceCdNCmdDiskReady_t)0x002a6930;
293+
_sceCd_ncmd_prechk = (_sceCd_ncmd_prechk_t)0x002a67c0;
294+
_sceCd_cd_read_intr = (_sceCd_cd_read_intr_t)0x002a6128;
295+
sceCdSync = (sceCdSync_t)0x002a69c8;
296+
sceCdDiskReady = (sceCdDiskReady_t)0x002a7170;
297+
sceCdCbfunc_num = (int *)0x005ae418;
298+
_sceCd_c_cb_sem = (int *)0x005ae3f4;
299+
_sceCd_cd_ncmd = (void *)0x005af590;
300+
_sceCd_ncmd_semid = (int *)0x005ae3e8;
301+
return;
302+
}
283303
}
284304

285305
int readSector(int n, u8 *s) {

0 commit comments

Comments
 (0)