Skip to content

Commit

Permalink
- added physical copy function from DDD which fixes DBAT conflicts (t…
Browse files Browse the repository at this point in the history
…his should fix several game problems, old and new ones)

- more clean syscall on installer
- removed debugger IP and merged it with the log server IP
- added support for ID4 (additional to ID6)
- fixed some crashs with the game settings window
- temporary fix for duplication launch with pressing A button
- added setting to disable game settings window and launch game directly
  • Loading branch information
dimok789 committed May 5, 2016
1 parent 6381bb9 commit 888710c
Show file tree
Hide file tree
Showing 33 changed files with 952 additions and 2,353 deletions.
23 changes: 5 additions & 18 deletions installer/kernel_patches.S
Original file line number Diff line number Diff line change
Expand Up @@ -128,28 +128,15 @@ SC_0x25_KernelCopyData:

.globl Syscall_0x36
Syscall_0x36:
mflr r0
stwu r1, -0x10(r1)
stw r30, 0x4(r1)
stw r31, 0x8(r1)
mr r5, r0
mr r6, r1
li r0, 0x3600
sc
nop
mr r0, r5
mr r1, r6
lwz r30, 0x04(r1)
lwz r31, 0x08(r1)
addi r1, r1, 0x10
mtlr r0
blr

.globl KernelPatches
KernelPatches:
# store the old DBAT0
mfdbatu r30, 0
mfdbatl r31, 0
mfdbatu r5, 0
mfdbatl r6, 0

# memory barrier
eieio
Expand Down Expand Up @@ -284,12 +271,12 @@ KernelPatches:
isync

# restore DBAT 0 and return from interrupt
mtdbatu 0, r30
mtdbatl 0, r31
mtdbatu 0, r5
mtdbatl 0, r6

# memory barrier
eieio
isync

rfi
blr

9 changes: 6 additions & 3 deletions installer/kexploit.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void run_kexploit(private_data_t *private_data)
OSDynLoad_FindExport(coreinit_handle, 0, "OSFreeToSystem", &OSFreeToSystem);

/* OS thread functions */
bool (*OSCreateThread)(void *thread, void *entry, int argc, void *args, uint32_t *stack, uint32_t stack_size, int priority, uint16_t attr);
bool (*OSCreateThread)(void *thread, void *entry, int argc, void *args, uint32_t stack, uint32_t stack_size, int priority, uint16_t attr);
int (*OSResumeThread)(void *thread);
void (*OSExitThread)();
int (*OSIsThreadTerminated)(void *thread);
Expand Down Expand Up @@ -91,7 +91,7 @@ void run_kexploit(private_data_t *private_data)
/* Make a thread to modify the semaphore */
OSContext *thread = (OSContext*)private_data->MEMAllocFromDefaultHeapEx(0x1000,8);
uint32_t *stack = (uint32_t*)private_data->MEMAllocFromDefaultHeapEx(0xa0,0x20);
if (!OSCreateThread(thread, (void*)0x11a1dd8, 0, NULL, stack + 0x28, 0xa0, 0, 0x1 | 0x8)) OSFatal("Failed to create thread");
if (!OSCreateThread(thread, (void*)0x11a1dd8, 0, NULL, ((uint32_t)stack) + 0xa0, 0xa0, 0, 0x1 | 0x8)) OSFatal("Failed to create thread");

/* Set up the ROP chain */
thread->gpr[1] = (uint32_t)stack;
Expand All @@ -117,6 +117,9 @@ void run_kexploit(private_data_t *private_data)

stack[0x94/4] = (uint32_t)OSExitThread;

DCFlushRange(stack, 0xa0);
DCFlushRange(thread, 0x1000);

/* Start the thread */
OSResumeThread(thread);

Expand All @@ -140,7 +143,7 @@ void run_kexploit(private_data_t *private_data)
private_data->MEMFreeToDefaultHeap(stack);

/* Register a new OSDriver, DRVHAX */
char drvname[6] = {'D', 'R', 'V', 'H', 'A', 'X'};
char drvname[8] = {'D', 'R', 'V', 'H', 'A', 'X', '\0'};
Register(drvname, 6, NULL, NULL);

/* Modify its save area to point to the kernel syscall table */
Expand Down
22 changes: 14 additions & 8 deletions languages/chinese.lang
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ msgid ""
msgstr ""
"Project-Id-Version: Loadiine GX2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-05 01:39+0200\n"
"POT-Creation-Date: 2016-05-06 00:24+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: kavid by 91wii.com \n"
"Language-Team: 91wii.com\n"
"Language: Chinese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: Chinese\n"

msgid "Loadiine GX2"
msgstr "Loadiine GX2"
Expand Down Expand Up @@ -95,6 +95,9 @@ msgstr "图形化"
msgid "Game View Selection"
msgstr "游戏查看选择"

msgid "Adjust log server IP and port"
msgstr "更改日志服务器的ip和端口"

msgid "Customize games path"
msgstr "自定义游戏路径"

Expand All @@ -107,9 +110,6 @@ msgstr "加载器"
msgid "Set save mode"
msgstr "设置存档模式"

msgid "Adjust log server IP and port"
msgstr "更改日志服务器的ip和端口"

msgid "Game"
msgstr "游戏"

Expand Down Expand Up @@ -140,6 +140,12 @@ msgstr "电视显示样式"
msgid "Game View DRC"
msgstr "平板显示样式"

msgid "Show Game Settings"
msgstr ""

msgid "Host IP"
msgstr ""

msgid "Game Path"
msgstr "游戏路径"

Expand All @@ -152,9 +158,6 @@ msgstr "游戏存档模式"
msgid "Log Server Control"
msgstr "日志服务器控制"

msgid "Log Server IP"
msgstr "日志服务器IP"

msgid "PyGecko"
msgstr "金手指"

Expand All @@ -181,3 +184,6 @@ msgstr "卡拉OK模式"

msgid "Art Atelier Mode"
msgstr "绘心教室模式"

#~ msgid "Log Server IP"
#~ msgstr "日志服务器IP"
22 changes: 14 additions & 8 deletions languages/chinese_tr.lang
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ msgid ""
msgstr ""
"Project-Id-Version: Loadiine GX2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-05 01:39+0200\n"
"POT-Creation-Date: 2016-05-06 00:24+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: kavid by 91wii.com \n"
"Language-Team: 91wii.com\n"
"Language: Chinese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: Chinese\n"

msgid "Loadiine GX2"
msgstr "Loadiine GX2"
Expand Down Expand Up @@ -95,6 +95,9 @@ msgstr "圖形化"
msgid "Game View Selection"
msgstr "遊戲查看選擇"

msgid "Adjust log server IP and port"
msgstr "更改日誌服務器的ip和端口"

msgid "Customize games path"
msgstr "自定義遊戲路徑"

Expand All @@ -107,9 +110,6 @@ msgstr "加載器"
msgid "Set save mode"
msgstr "設置存檔模式"

msgid "Adjust log server IP and port"
msgstr "更改日誌服務器的ip和端口"

msgid "Game"
msgstr "遊戲"

Expand Down Expand Up @@ -140,6 +140,12 @@ msgstr "電視顯示樣式"
msgid "Game View DRC"
msgstr "平板顯示樣式"

msgid "Show Game Settings"
msgstr ""

msgid "Host IP"
msgstr ""

msgid "Game Path"
msgstr "遊戲路徑"

Expand All @@ -152,9 +158,6 @@ msgstr "遊戲存檔模式"
msgid "Log Server Control"
msgstr "日誌服務器控制"

msgid "Log Server IP"
msgstr "日誌服務器IP"

msgid "PyGecko"
msgstr "金手指"

Expand All @@ -181,3 +184,6 @@ msgstr "卡拉OK模式"

msgid "Art Atelier Mode"
msgstr "繪心教室模式"

#~ msgid "Log Server IP"
#~ msgstr "日誌服務器IP"
19 changes: 11 additions & 8 deletions languages/english.lang
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ msgid ""
msgstr ""
"Project-Id-Version: Loadiine GX2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-05 01:39+0200\n"
"POT-Creation-Date: 2016-05-06 00:24+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: \n"

msgid "Loadiine GX2"
msgstr ""
Expand Down Expand Up @@ -95,6 +95,9 @@ msgstr ""
msgid "Game View Selection"
msgstr ""

msgid "Adjust log server IP and port"
msgstr ""

msgid "Customize games path"
msgstr ""

Expand All @@ -107,9 +110,6 @@ msgstr ""
msgid "Set save mode"
msgstr ""

msgid "Adjust log server IP and port"
msgstr ""

msgid "Game"
msgstr ""

Expand Down Expand Up @@ -140,6 +140,12 @@ msgstr ""
msgid "Game View DRC"
msgstr ""

msgid "Show Game Settings"
msgstr ""

msgid "Host IP"
msgstr ""

msgid "Game Path"
msgstr ""

Expand All @@ -152,9 +158,6 @@ msgstr ""
msgid "Log Server Control"
msgstr ""

msgid "Log Server IP"
msgstr ""

msgid "PyGecko"
msgstr ""

Expand Down
Loading

0 comments on commit 888710c

Please sign in to comment.