PCSX2 version:
v1.5.0-dev-1025-gcff8cb1 (2016-07-27; cff8cb1).
v1.5.0-dev-1025-gcff8cb1 (2016-07-27; cff8cb1).
PCSX2 options:
Defaults. No options modifications affect this issue.
Defaults. No options modifications affect this issue.
Apr 20, 2015 - CREATE THE PNACH FILE. Now, navigate to the emulator installation folder (usually in C: Program Files PCSX2, but it can be different). Pcsx2 pnach codes shared files: Here you can download pcsx2 pnach codes shared files that we have found in our database. Just click desired file title and download link will show up!
Plugins used:
Defaults (GSdx32-AVX, LilyPad, SPU2-X, cdvdGigaherz, USBnull, FWnull and DEV9ghzdrk). No particular plugins affect this issue.
Defaults (GSdx32-AVX, LilyPad, SPU2-X, cdvdGigaherz, USBnull, FWnull and DEV9ghzdrk). No particular plugins affect this issue.
Plugin settings:
Defaults. No settings modifications affect the issue.
Defaults. No settings modifications affect the issue.
Description:
If any game is full booted with pnaches (such as cheats and/or widescreen hacks) enabled, PCSX2 currently attempts to inject them into live memory between the end of the 'Sony Computer Entertainment' animation and prior to the start of the 'PlayStation 2' animation. As a result, game pnaches have the potential of corrupting BIOS memory, triggering freezes, log errors and even crashes.
If any game is full booted with pnaches (such as cheats and/or widescreen hacks) enabled, PCSX2 currently attempts to inject them into live memory between the end of the 'Sony Computer Entertainment' animation and prior to the start of the 'PlayStation 2' animation. As a result, game pnaches have the potential of corrupting BIOS memory, triggering freezes, log errors and even crashes.
Would it be possible to modify PCSX2's patching engine to only inject game pnaches into live memory after the 'PlayStation 2' logo animation has ended (once the BIOS has been cleared from live memory)?
How to replicate:
- This has only been tested with my North American launch PS2's dumped BIOS: USA v01.20 (02/09/2000). Since these replication steps are based on pnach/BIOS memory conflicts, the outcome might not be reproducible in other BIOS revisions if their conflicting addresses differ from mine. The pnach in step 5 is deliberately extremely long to increase the odds of conflicts.
- Launch PCSX2 and fast boot any game.
- In the log window, take note of the game's CRC.
- Exit PCSX2 completely.
- In PCSX2's cheats folder, create a pnach named after the game's CRC (example: 2EDE12D1.pnach). Place this gist's contents into the pnach.
- Ensure cheats are enabled by going to 'System - Enable Cheats'.
- Full boot the game.
- The BIOS' 'Sony Computer Entertainment' startup animation will play, followed by a frozen black screen. Depending on your BIOS, log errors and crashes may also occur. The 'PlayStation 2' logo animation will never be reached.
- Step 9 didn't work as expected. Both the 'Sony Computer Entertainment' and 'PlayStation 2' animations should've been able to playback fully, regardless of what the pnach does. Freezes/log errors/crashes as a result of the pnach's hacks shouldn't of occurred until after the 'PlayStation 2' animation finished playing.
Last known version to work:
- Never worked.
- Oldest tested version: R5766 (2013-12-05; 9e1717f).
PC specifications:
CPU: Intel Core i7 2600K @ 3.4GHz; GPU: XFX Radeon HD 6970 2GB; GPU driver: Crimson 16.2.1 Beta; OS: Windows 7 SP1.
CPU: Intel Core i7 2600K @ 3.4GHz; GPU: XFX Radeon HD 6970 2GB; GPU driver: Crimson 16.2.1 Beta; OS: Windows 7 SP1.
Other comments:
- This is the 'other' full boot pnach bug I referred to in #851.
- There's a risk that whatever gets implemented to fix this might cause #627's issue to start occurring in full boot mode (it currently only affects fast boot).
- @avih@gregory38 FYI.
Active3 years, 6 months ago
I am using many pnach files to cheat in many ps2 games and I can play them by using pcsx2 - The best playstation 2 emulator ever!
I also use Cheat Engine 6.5 to make even more cheats that do not exist in my pnach files, but this is very annoying to cheat with Cheat Engine, because the memory locations are always changing and moving to another locations every time either I continue playing the game or restart the game or the pcsx2.
I also auto assemble and inject game's code to cheat, but whenever I load a state or restart pcsx2, all changes I made with my code injection are lost! Even pointer scan, level and reference of Cheat Engine don't work with pcsx2, because this is every complicated emulator.
I have read that it makes many shift operations to calculate the addresses (of memory and assembly).
This is very annoying! I want to save these cheats I make with cheat engine.I don't want every time to scan for the values I want to change and inject the same codes over and over again.
pnach files are very comfortable, because they don't require you do anything, but just playing the game and enjoy everything they give you, like infinite health, ammo and etc.
I wonder if there is a way in a pnach file, making all the cheats that I make by cheat engine, and if yes, then how exactly?
Farewell Stack Exchange
Farewell Stack ExchangeFarewell Stack Exchange
closed as too broad by greg-449, dly, Ivo Coumans, arghtype, ColinJun 4 at 1:06
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1 Answer
Edit: Now that I've actually used reading comprehension.
Word of Warning:
This process is almost entirely based on both how emulators work, and how memory is used. I've not actually worked with memory editing with emulators, so there may be some twists and caveats I'm unaware of.
Wall o' Text:
The main problem here, is that static pointers, and other static values, are dependent on games and applications that run in the OS. For most games an apps, Cheat Engine is pretty simple, because it's running in the exact same OS.
After all, what makes a value static, is that it always has the same offset to the process' base memory address. Since Cheat Engine attaches to the process, it always knows where that base address is.
However, when you're talking about an emulator - that emulator basically works as its own OS, with its own processes, that runs in its own memory. Cheat Engine can easily attach to the emulator's process, but as it can't attach to the game itself, it doesn't know where that game's base memory is. Even worse, since the base memory is stored in dynamic memory, even the game's static memory will change location, from Cheat Engine's perspective.
However, since the emulator obviously needs to know where that base address is, that address works no differently than any other value you use Cheat Engine for. In other words, pcsx2 should have a static pointer, that points to that address. Once you have that pointer to that base address, you're halfway there.
The next half is using 'what accesses this address' and 'what writes to this address', along with the disassembler to trace the value you want to track, back to a static pointer within the game. Unfortunately this will require a fair bit of trial and error, because the only way you'll know if that pointer is static, is if its offset to the game's base address never changes. The only way you'll be able to check that is by closing and reopening the emulator a few times. Thankfully, by this point - you'll at least have the pointer to that base address.
When you're done, you'll have something that looks roughly like this:
static pointer(pcsx2)->base address(game)+offset to static pointer(game)->value(game)
Obviously, there's always the good chance that there may be some dynamic pointers in between, on either or both sides.
Hopefully this gets you on the right track,
Digital_UtopiaDigital_Utopia