forked from PCSX2/pcsx2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from LuminarLight/tool-mode
Tool mode
- Loading branch information
Showing
30 changed files
with
622 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*3A84D099* | ||
*C20596DB* |
32 changes: 32 additions & 0 deletions
32
bin/patches/SCED-51700_F41C1B29_Jak2junedemoPAL_DebugMode.pnach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[TOOL] | ||
gametitle=Jak II: Renegade [Demo] - (PAL)(SCED-51700) | ||
author=Luminar | ||
description=Makes the game boot in Debug Mode. You will spawn in the void. Use the Debug Menu to escape. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits | ||
comment=Credits to Luminar Light for making this pnach. | ||
comment=You will spawn in the void. Use the Debug Menu to escape. | ||
|
||
// NOP Disabling MasterDebug | ||
patch=0,EE,00100400,word,00000000 | ||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100408,word,00000000 | ||
// NOP SendFromBufferD call in InitListener - This is called only when MasterDebug is on | ||
patch=0,EE,00108930,word,00000000 | ||
|
||
// 0x4ff0000 for global heap initialization - Set in InitMachine | ||
patch=0,EE,001031dc,word,3c0604ff | ||
|
||
// This is about changing the stack pointer | ||
// Shoves a MIPS instruction into near the very top of the entry point | ||
// Ghidra blows up here, but binary ninja can handle it | ||
// Orginally at this position there is `2D E8 40 00` - `daddu $sp, $v0, $zero` | ||
// This changes it to - `lui sp, 0x0800` Which loads the value 0x0800 to the stackpointer register, modifying it. | ||
patch=0,EE,0010017c,word,3c1d0800 | ||
|
||
// Change DebugBootMessage from `demo` to `play`. | ||
patch=0,EE,00127610,word,79616c70 | ||
|
||
// The level that the game wants to load on startup with 'play' DebugBootMessage is missing. Getting around this problem with DebugBootLevel is not a correct solution, since it modifies how the game looks for DGO files - making most levels unreachable. | ||
// It is possible to tell the game to load a different DGO instead of the missing one. The patches below will make the game load 'DEMO.DGO' instead of 'PRI.DGO'. | ||
// This is the only level that it wants on startup - the game will work fine now, but you will spawn in the void. Just use the Debug Menu to escape. | ||
patch=1,EE,0087AB78,word,6f6d6564 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[TOOL] | ||
gametitle=Jak and Daxter: The Precursor Legacy - (PAL-M6) - (SCES-50361) | ||
author=Luminar | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits | ||
comment=Credits to Luminar Light for making the patch for this game build. | ||
|
||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100290,word,00000000 | ||
// NOP Disabling MasterDebug | ||
patch=0,EE,0010029c,word,00000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[TOOL] | ||
gametitle=Jak II: Renegade - (PAL-M7)(SCES-51608) | ||
author=Luminar | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits | ||
comment=Credits to Luminar Light for making the patch for this game build. | ||
|
||
// NOP Disabling MasterDebug | ||
patch=0,EE,001003f8,word,00000000 | ||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100400,word,00000000 | ||
// NOP SendFromBufferD call in InitListener - This is called only when MasterDebug is on | ||
patch=0,EE,00108d88,word,00000000 | ||
|
||
// 0x4ff0000 for global heap initialization - Set in InitMachine | ||
patch=0,EE,00103364,word,3c0604ff | ||
|
||
// This is about changing the stack pointer | ||
// Shoves a MIPS instruction into near the very top of the entry point | ||
// Ghidra blows up here, but binary ninja can handle it | ||
// Orginally at this position there is `2D E8 40 00` - `daddu $sp, $v0, $zero` | ||
// This changes it to - `lui sp, 0x0800` Which loads the value 0x0800 to the stackpointer register, modifying it. | ||
patch=0,EE,0010017c,word,3c1d0800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[TOOL] | ||
gametitle=Jak 3 - (PAL-M7)(SCES-52460) | ||
author=Luminar | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits in Jak 1/2. ELF edits for Jak 3 figured out by xTVaser. | ||
comment=Credits to Luminar Light for making the patch for this game build. | ||
|
||
// NOP Disabling MasterDebug | ||
patch=0,EE,00100404,word,00000000 | ||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100408,word,00000000 | ||
// NOP SendFromBufferD call in InitListener - This is called only when MasterDebug is on | ||
patch=0,EE,00109998,word,00000000 | ||
|
||
// 0x4ff0000 for global heap initialization - Set in InitMachine | ||
patch=0,EE,0010372c,word,3c0604ff | ||
|
||
// This is about changing the stack pointer | ||
// Shoves a MIPS instruction into near the very top of the entry point | ||
// Ghidra blows up here, but binary ninja can handle it | ||
// Orginally at this position there is `2D E8 40 00` - `daddu $sp, $v0, $zero` | ||
// This changes it to - `lui sp, 0x0800` Which loads the value 0x0800 to the stackpointer register, modifying it. | ||
patch=0,EE,0010017c,word,3c1d0800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
[TOOL] | ||
gametitle=Jak X (PAL)(SCES-53286) | ||
author=Luminar | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to Luminar for making the patch for this build. | ||
comment=Special thanks to water111 and Vaser for their relevant research done for earlier Jak games. It helped make this possible. | ||
|
||
//---// The following patches are on the "ELF side". //---// | ||
// The ELF of Jak X is encrypted/packed/compressed (not sure which). It unpacks itself while booting. So analyzing it is a bit more difficult, but doable if you use a memory dump. | ||
// If you want to patch the "early part" of memory, you should add condition (E-type extended) patches to ensure you only write after the unpacking is done. | ||
|
||
// nop the disabling of MasterDebug, this will make MasterDebug stay 1 | ||
// Edit: We don't actually need this, and I couldn't find a way to make the game work with MasterDebug on. So this patch is commented out for now, but kept here for reference. | ||
//patch=1,EE,00266884,word,00000000 | ||
|
||
// nop the disabling of DebugSegment, this will make DebugSegment stay 1 | ||
patch=1,EE,0026688c,word,00000000 | ||
// nop the disabling of DebugSymbols, this will make DebugSymbols stay 1 | ||
patch=1,EE,00266898,word,00000000 | ||
|
||
// The following patch was copied from Jak 3's patches (found the same thing in Jak X), but since it only matters with MasterDebug, we can comment it out. | ||
// NOP SendFromBufferD call in InitListener - This is called only when MasterDebug is on | ||
//patch=1,EE,00270470,word,00000000 | ||
|
||
// Extra console logs. Very useful. | ||
// The E-type patch is needed because writing the patch too early causes weird problems, preventing us from booting the game. | ||
patch=1,EE,E00027D2,extended,00282EC1 | ||
patch=1,EE,001EDA00,extended,00000001 | ||
|
||
// nop the weird function call in InitMachine that returns something but we don't use it because I rewrote the init heap function calls. | ||
patch=1,EE,0026a054,word,00000000 | ||
|
||
// Change malloc param to 0x10, because it is like that in Jak 3 and it works. | ||
patch=1,EE,0026a064,word,24040010 | ||
|
||
// Rewrite init heap function call for global heap. | ||
patch=1,EE,0026a0d4,word,8e04bb40 | ||
patch=1,EE,0026a0d8,word,3c0604d2 | ||
patch=1,EE,0026a0dc,word,34c609a0 | ||
patch=1,EE,0026a0e0,word,00402825 | ||
patch=1,EE,0026a0e4,word,0c096e30 | ||
patch=1,EE,0026a0e8,word,00000000 | ||
|
||
// Rewrite init heap function call for debug heap. | ||
patch=1,EE,0026a10c,word,3c0f0026 | ||
patch=1,EE,0026a110,word,3c0602f0 | ||
patch=1,EE,0026a114,word,8de4bb44 | ||
patch=1,EE,0026a118,word,00000000 | ||
patch=1,EE,0026a11c,word,0c096e30 | ||
patch=1,EE,0026a120,word,3c050500 | ||
|
||
// This was copied straight from the Jak 3 patches (I found the same place in Jak X). | ||
// This is about changing the stack pointer | ||
// Shoves a MIPS instruction into near the very top of the entry point | ||
// Ghidra blows up here, but binary ninja can handle it | ||
// Orginally at this position there is `2D E8 40 00` - `daddu $sp, $v0, $zero` | ||
// This changes it to - `lui sp, 0x0800` Which loads the value 0x0800 to the stackpointer register, modifying it. | ||
patch=1,EE,002665d4,word,3c1d0800 | ||
|
||
//---// The following patches are on the "GOAL side". //---// | ||
|
||
// Make 'read-sound-info-tweaks' unable to get stuck in a while loop, by ruining the loop itself. | ||
// This is needed to be able to boot the game in "debug mode". Without this patch, the game will get stuck forever, after printing "reading sound info ..." twice. | ||
patch=1,EE,067a69b4,word,00000000 | ||
|
||
// Make 'set-blackout-frames' always act as if the parameter was 0. The other branch will never be called. | ||
// This gets rid of the (sometimes infinite) blackout you get when using Game... Continue... to warp to a continue-point. | ||
patch=1,EE,00ad3834,word,00000000 |
11 changes: 11 additions & 0 deletions
11
bin/patches/SCPS-15021_EDE4FE64_JakTPLntscj_DebugMode.pnach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[TOOL] | ||
gametitle=Jak x Daxter: Kyuusekai no Isan - (NTSC-J) - (SCPS-15021) | ||
author=Luminar | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits | ||
comment=Credits to Luminar Light for making the patch for this game build. | ||
|
||
// NOP Disabling DebugSegment | ||
patch=0,EE,0010028c,word,00000000 | ||
// NOP Disabling MasterDebug | ||
patch=0,EE,00100298,word,00000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[TOOL] | ||
gametitle=Jak II - (NTSC-J)(SCPS-15057) | ||
//author= | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits | ||
|
||
// NOP Disabling MasterDebug | ||
patch=0,EE,001003f8,word,00000000 | ||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100400,word,00000000 | ||
// NOP SendFromBufferD call in InitListener - This is called only when MasterDebug is on | ||
patch=0,EE,00108cd0,word,00000000 | ||
|
||
// 0x4ff0000 for global heap initialization - Set in InitMachine | ||
patch=0,EE,001032bc,word,3c0604ff | ||
|
||
// This is about changing the stack pointer | ||
// Shoves a MIPS instruction into near the very top of the entry point | ||
// Ghidra blows up here, but binary ninja can handle it | ||
// Orginally at this position there is `2D E8 40 00` - `daddu $sp, $v0, $zero` | ||
// This changes it to - `lui sp, 0x0800` Which loads the value 0x0800 to the stackpointer register, modifying it. | ||
patch=0,EE,0010017c,word,3c1d0800 | ||
|
||
// Example - Changing the Starting Level, Disabled by Default | ||
// Load halfpipe level by default - "halfpipe" BigEndian - 68 61 6c 66 | 70 69 70 65 | ||
// LittleEndian: | ||
//patch=0,EE,00127f10,word,666C6168 | ||
//patch=0,EE,00127f14,word,65706970 |
10 changes: 10 additions & 0 deletions
10
bin/patches/SCUS-97124_1B3976AB_JakTPLntscv1_DebugMode.pnach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[TOOL] | ||
gametitle=Jak and Daxter - The Precursor Legacy - (U) - (SCUS-97124) | ||
//author= | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits | ||
|
||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100290,word,00000000 | ||
// NOP Disabling MasterDebug | ||
patch=0,EE,0010029c,word,00000000 |
10 changes: 10 additions & 0 deletions
10
bin/patches/SCUS-97124_472E7699_JakTPLntscv2_DebugMode.pnach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[TOOL] | ||
gametitle=Jak and Daxter - The Precursor Legacy - (U) - (SCUS-97124) | ||
//author= | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits | ||
|
||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100290,word,00000000 | ||
// NOP Disabling MasterDebug | ||
patch=0,EE,0010029c,word,00000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[TOOL] | ||
gametitle=Jak II - (U)(SCUS-97265) | ||
//author= | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits | ||
|
||
// NOP Disabling MasterDebug | ||
patch=0,EE,001003f8,word,00000000 | ||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100400,word,00000000 | ||
// NOP SendFromBufferD call in InitListener - This is called only when MasterDebug is on | ||
patch=0,EE,00108cd0,word,00000000 | ||
|
||
// 0x4ff0000 for global heap initialization - Set in InitMachine | ||
patch=0,EE,001032bc,word,3c0604ff | ||
|
||
// This is about changing the stack pointer | ||
// Shoves a MIPS instruction into near the very top of the entry point | ||
// Ghidra blows up here, but binary ninja can handle it | ||
// Orginally at this position there is `2D E8 40 00` - `daddu $sp, $v0, $zero` | ||
// This changes it to - `lui sp, 0x0800` Which loads the value 0x0800 to the stackpointer register, modifying it. | ||
patch=0,EE,0010017c,word,3c1d0800 | ||
|
||
// Example - Changing the Starting Level, Disabled by Default | ||
// Load halfpipe level by default - "halfpipe" BigEndian - 68 61 6c 66 | 70 69 70 65 | ||
// LittleEndian: | ||
//patch=0,EE,00127f10,word,666C6168 | ||
//patch=0,EE,00127f14,word,65706970 |
33 changes: 33 additions & 0 deletions
33
bin/patches/SCUS-97273_A2034C69_Jak2marchdemoNTSC_DebugMode.pnach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[TOOL] | ||
gametitle=Jak II [Demo] - (U)(SCUS-97273) | ||
author=Luminar | ||
description=Makes the game boot in Debug Mode. You will spawn in the void. Use the Debug Menu to escape. | ||
comment=Enables Developer/Debug Mode - Credit to water111 and Vaser for discovering / documenting the required ELF edits for the Jak 2 Demo. | ||
comment=Thanks to Luminar Light for figuring out how to get around the missing level problem. | ||
comment=You will spawn in the void. Use the Debug Menu to escape. | ||
|
||
// NOP Disabling MasterDebug | ||
patch=0,EE,001002ec,word,00000000 | ||
// NOP Disabling DebugSegment | ||
patch=0,EE,001002f4,word,00000000 | ||
// NOP SendFromBufferD call in InitListener - This is called only when MasterDebug is on | ||
patch=0,EE,00108660,word,00000000 | ||
|
||
// 0x4ff0000 for global heap initialization - Set in InitMachine | ||
patch=0,EE,00102fac,word,3c0604ff | ||
|
||
// This is about changing the stack pointer | ||
// Shoves a MIPS instruction into near the very top of the entry point | ||
// Ghidra blows up here, but binary ninja can handle it | ||
// Orginally at this position there is `2D E8 40 00` - `daddu $sp, $v0, $zero` | ||
// This changes it to - `lui sp, 0x0800` Which loads the value 0x0800 to the stackpointer register, modifying it. | ||
patch=0,EE,00100068,word,3c1d0800 | ||
|
||
// This changes the DebugBootMessage from `demo` to `play`. | ||
patch=0,EE,00126e10,word,79616c70 | ||
|
||
// The levels that the game wants to load on startup with 'play' DebugBootMessage are missing. Getting around this problem with DebugBootLevel is not a correct solution, since it modifies how the game looks for DGO files - making most levels unreachable. | ||
// It is possible to tell the game to load a different DGO instead of the missing ones. The patches below will make the game load 'DEMO.DGO' instead of 'FEA.DGO' and 'PRI.DGO'. | ||
// These are the only two levels that it wants on startup - the game will work fine now, but you will spawn in the void. Just use the Debug Menu to escape. | ||
patch=1,EE,0077BB18,word,6f6d6564 | ||
patch=1,EE,0077C1B8,word,6f6d6564 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[TOOL] | ||
gametitle=Jak 3 - (U)(SCUS-97330) | ||
//author= | ||
description=Makes the game boot in Debug Mode. | ||
comment=Enables Developer/Debug Mode - Credit to water111 for discovering / documenting the required ELF edits in Jak 1/2. ELF edits for Jak 3 figured out by xTVaser. | ||
|
||
// NOP Disabling MasterDebug | ||
patch=0,EE,00100404,word,00000000 | ||
// NOP Disabling DebugSegment | ||
patch=0,EE,00100408,word,00000000 | ||
// NOP SendFromBufferD call in InitListener - This is called only when MasterDebug is on | ||
patch=0,EE,001098f0,word,00000000 | ||
|
||
// 0x4ff0000 for global heap initialization - Set in InitMachine | ||
patch=0,EE,00103694,word,3c0604ff | ||
|
||
// This is about changing the stack pointer | ||
// Shoves a MIPS instruction into near the very top of the entry point | ||
// Ghidra blows up here, but binary ninja can handle it | ||
// Orginally at this position there is `2D E8 40 00` - `daddu $sp, $v0, $zero` | ||
// This changes it to - `lui sp, 0x0800` Which loads the value 0x0800 to the stackpointer register, modifying it. | ||
patch=0,EE,0010017c,word,3c1d0800 |
Oops, something went wrong.