{"action":"created","issue":{"url":"https://api.github.com/repos/PCSX2/pcsx2/issues/627","repository_url":"https://api.github.com/repos/PCSX2/pcsx2","labels_url":"https://api.github.com/repos/PCSX2/pcsx2/issues/627/labels{/name}","comments_url":"https://api.github.com/repos/PCSX2/pcsx2/issues/627/comments","events_url":"https://api.github.com/repos/PCSX2/pcsx2/issues/627/events","html_url":"https://github.com/PCSX2/pcsx2/issues/627","id":92272805,"number":627,"title":"First fast boot attempt: ELF starts executing before pnach loads","user":{"login":"Aced14","id":13129485,"avatar_url":"https://avatars.githubusercontent.com/u/13129485?v=3","gravatar_id":"","url":"https://api.github.com/users/Aced14","html_url":"https://github.com/Aced14","followers_url":"https://api.github.com/users/Aced14/followers","following_url":"https://api.github.com/users/Aced14/following{/other_user}","gists_url":"https://api.github.com/users/Aced14/gists{/gist_id}","starred_url":"https://api.github.com/users/Aced14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aced14/subscriptions","organizations_url":"https://api.github.com/users/Aced14/orgs","repos_url":"https://api.github.com/users/Aced14/repos","events_url":"https://api.github.com/users/Aced14/events{/privacy}","received_events_url":"https://api.github.com/users/Aced14/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"gregory38","id":1569559,"avatar_url":"https://avatars.githubusercontent.com/u/1569559?v=3","gravatar_id":"","url":"https://api.github.com/users/gregory38","html_url":"https://github.com/gregory38","followers_url":"https://api.github.com/users/gregory38/followers","following_url":"https://api.github.com/users/gregory38/following{/other_user}","gists_url":"https://api.github.com/users/gregory38/gists{/gist_id}","starred_url":"https://api.github.com/users/gregory38/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregory38/subscriptions","organizations_url":"https://api.github.com/users/gregory38/orgs","repos_url":"https://api.github.com/users/gregory38/repos","events_url":"https://api.github.com/users/gregory38/events{/privacy}","received_events_url":"https://api.github.com/users/gregory38/received_events","type":"User","site_admin":false},"assignees":[{"login":"gregory38","id":1569559,"avatar_url":"https://avatars.githubusercontent.com/u/1569559?v=3","gravatar_id":"","url":"https://api.github.com/users/gregory38","html_url":"https://github.com/gregory38","followers_url":"https://api.github.com/users/gregory38/followers","following_url":"https://api.github.com/users/gregory38/following{/other_user}","gists_url":"https://api.github.com/users/gregory38/gists{/gist_id}","starred_url":"https://api.github.com/users/gregory38/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregory38/subscriptions","organizations_url":"https://api.github.com/users/gregory38/orgs","repos_url":"https://api.github.com/users/gregory38/repos","events_url":"https://api.github.com/users/gregory38/events{/privacy}","received_events_url":"https://api.github.com/users/gregory38/received_events","type":"User","site_admin":false}],"milestone":null,"comments":15,"created_at":"2015-07-01T05:23:45Z","updated_at":"2016-07-31T02:46:15Z","closed_at":"2016-07-28T19:25:27Z","body":"**PCSX2 version:**\r\n1.3.1 GIT 2015-04-27 (g0ab0c6c)\r\n\r\n**PCSX2 options:**\r\nCheats or widescreen patches\r\n\r\n**Plugins used:**\r\nGSdx, LyliPad-Scp-r5875, SPU2-X, cdvdGigaherz, nuvee ps2 usb 0.2.0, FWnull Driver and GigaHeRz's DEV9 Driver\r\n\r\n**Plugin settings:**\r\nGSdx software mode and LyliPad-Scp's DS3 native mode; no settings modifications affect this issue\r\n\r\n**Description:**\r\nI recently created updated widescreen hacks for Smuggler's Run (not yet released). One of these was an ELF hack meant to replace an old \"live\" memory hack. Unfortunately my hack only worked intermittently. I'm experienced with creating ELF hacks and nothing seemed wrong with this particular one. Nevertheless, I tried modifying it in several ways in the hopes of getting it working 100% of the time to no avail.\r\n\r\nUpon further experimentation, I found that the only circumstance in which the pnach version of my hack doesn't work is if I fast boot the game right after launching PCSX2 (subsequent fast boots work within the same running instance of PCSX2). PCSX2 starts the game, runs the original MIPS instruction my hack is supposed to override, then replaces the original instruction with my injected one. This makes my hack all but useless, because the hack's instruction isn't getting injected before the point in time it needs to run at.\r\n\r\nThis issue affects pnaches across-the-board, in every game.\r\n\r\n**How to replicate:**\r\n\r\n1. Launch PCSX2 and run any game. In the log window, take note of the game's CRC and entrypoint.\r\n2. Create a pnach file named after your game's CRC (example: 0E7F91DA.pnach) and insert this line of code into it:  \r\n``patch=1,EE,????????,extended,0000000D //Break - Replace ???????? with your game's entrypoint and replace the first 0 with a 2 (example: 20100008).``\r\n3. Place your pnach file in either PCSX2's /cheats/ or /cheats_ws/ folder.\r\n4. Exit PCSX2 completely. You shouldn't have any PCSX2 windows open at all.\r\n5. Launch PCSX2, enable cheats or widescreen patches (depending on where you placed your pnach file), then fast boot your game. The game should start normally.\r\n6. In the same running instance of PCSX2, shut down the game, then fast boot it again. The game should immediately freeze at a black screen. This step can be repeated over and over again with the same outcome.\r\n7. Step 5 isn't working properly because PCSX2 isn't injecting the pnach's breakpoint until after the game's ELF entrypoint instruction has already executed. Step 6 works properly.\r\n\r\n**Last known version to work:**\r\nNever worked (oldest tested version: R5267).\r\n\r\n**PC specifications:**\r\nCPU: Intel Core i7 2600K @ 3.4GHz; GPU: XFX Radeon HD 6970 2GB; OS: Windows 7 SP1\r\n\r\n**Other comments:**\r\nN/A"},"comment":{"url":"https://api.github.com/repos/PCSX2/pcsx2/issues/comments/236404929","html_url":"https://github.com/PCSX2/pcsx2/issues/627#issuecomment-236404929","issue_url":"https://api.github.com/repos/PCSX2/pcsx2/issues/627","id":236404929,"user":{"login":"Aced14","id":13129485,"avatar_url":"https://avatars.githubusercontent.com/u/13129485?v=3","gravatar_id":"","url":"https://api.github.com/users/Aced14","html_url":"https://github.com/Aced14","followers_url":"https://api.github.com/users/Aced14/followers","following_url":"https://api.github.com/users/Aced14/following{/other_user}","gists_url":"https://api.github.com/users/Aced14/gists{/gist_id}","starred_url":"https://api.github.com/users/Aced14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aced14/subscriptions","organizations_url":"https://api.github.com/users/Aced14/orgs","repos_url":"https://api.github.com/users/Aced14/repos","events_url":"https://api.github.com/users/Aced14/events{/privacy}","received_events_url":"https://api.github.com/users/Aced14/received_events","type":"User","site_admin":false},"created_at":"2016-07-31T02:46:15Z","updated_at":"2016-07-31T02:46:15Z","body":"@avih I agree with your reasoning :). Although I should note that due to #1482's issue, in the past 1 used to work identically to how 0 now works when full booting (at least in my BIOS, so long as it didn't crash).\r\n\r\nCall me crazy, but... do you think there'd be any value in introducing something along the lines of ``patch=2`` to perform both 0+1's functions with a single line?\r\n\r\nI've never encountered any situations that I'd consider to warrant 0+1, but it can't hurt to have all options covered. On the other hand, it might not be worth the development effort unless anyone runs into a real-world need for it."}}
{"actor":{"display_login":"Aced14"}}