Quickest way to add new CRC for existing hack?
#11
I guess, never did anything like that yet in lua, which makes it fun;f. Gonna try when I get bored with what I'm doing now.

I guess it should read crc list from some text file and apply it to gsdx instead of simple "write one crc here, second there and replace"(which for hex editor would be enough) to make it easier with GSdx updates.


Edit: I made a small script which theoretically should work fine, but it's not worth a bump xD, stupid CE uses lua 5.1 and it has a stupid limitation which makes impossible to make patcher like that flawless, basically it works for all crc except those which has even 1 byte of 0x00 ;c, stupid thing, lua 5.2 doesn't seem to have that bug, but I kind of not feel like transfering my script to pure lua, maybe later.

Sponsored links

#12
miseru you magnificent bastard you've saved me again. A simple hex edit did the trick Ninja
#13
(06-28-2012, 02:28 PM)synce Wrote: Is there a simpler alternative to dynacrc. I know nothing about compiling Smile The only way to patch Haunting Ground/Demento for widescreen is through the elf, which changes the crc and disables the current hack. Probably some other games will be affected too

BTW, why can't this be done with a pnach file?
#14
I couldn't say for certain, I just know some games store the necessary values dynamically and some are just complicated.... Maybe someone like hyakki or miseru can better explain Smile
#15
I wouldn't say it suits the thread name with the "quickest way", if someone's fast with his hands he can do it manually faster still;P but I made a lame patcher to feed of crc list for easy patching. It's pretty stupid, workaround'ish, soo I don't bother releasing it in any other thread. Through it should be pretty fast in compare to what it does:
-checks the list of CRC's from the file,
-finds correct place where GSdx stores CRC(based on aob scan with wildcards - should always work, tested on both normal and debug GSdx),
-finds the first adress for all crc's to patch and patches only that ensuring nothing get's broken by it;3.

Basically I lost interest in this when I found how buggy it is in outdated lua implemented in cheat engine;P, in new lua it could be done nicer, in any other scripting or programming language probably even better;], I wrote something about considering to pass on pure lua, but then it would take time, be boring etc. I gaved it another try through only to see if I could find a way to do this anyway within CE;3. The fail wasn't an option I guess;P.

Very hacky, althrough it's still "just" CE trainer, it'll will work only as an exe, and soo I'm releasing it as such:
-GSdxCRC Patcher, short wall of text aka manual included.

Has no gui, only ini file to input GSdx filename, Patched GSdx filename, optional adress to plugins directory and ofc crc to patch. Checks for a pattern soo it should sooner fail completely than patch something else than configured CRC's;].
Edit:
I didn't really wanted to bother with this again;P, it's usefullness is very limited to people who cannot hex edit or just want to patch more crc's at once easily every time they update GSdx, but I messed around the method I used a bit longer and after some findings I had to return to this;].
Small Update:
-Found some serious flaw in my method and corrected it - around 4 times faster patching, especially with bigger amount of CRC's to patch,
-Added error messages - they'll show only if program fails to do something, mostly when user forget's to set something in the ini file or does it incorrectly, if it doesn't show anything the file should be patched correctly.

update ad:
- now the error messages should show correctly(shucks I never tested it;P, anyway when configured correctly no need for error message and it was/is easy to configure anyway;P)
- corrected 1 typo which resulted in serious bug limiting the visible list of crc's to patch to like first 1/5>.>, hopefully the only person that used it, had a game CRC inside that range and it still worked. Somehow I tested it only on few early ones as well soo didn't notice untill accidently finding it now. xD Please redownlod if you had broken version(well still working for 1/5 of the CRC's, but that's a stupid bug to have;P).
-added short(and hopefully clear) manual as below:

Manual:
-Unpack to PCSX2\plugins directory or to any other one*,
-open included ini file and type GSdx filename as the file you wish to patch,
-you can also type Patched GSdx name as you wish,
-*if you unpacked it to any different directory, set a path to plugin directory as well(otherwise leave it to false),
-set CRC's in a list in format: ExistingCRC/NewCRC(for example 0x42E05BAF/0x2113EA2E),
-save the ini file and run the program:3, if anything bad happens it should show error message, otherwise it'll just silently finish it's work.

You can later re-run it when upgrading GSdx to quickly patch it again, patching should take from X to XX seconds after depending how many crc's you had on the list(safety checks are the heaviest, soo 2-3 crc's will not take much more time than 1).


Notes:
- if you set optional plugins directory make sure it ends with "\"
- the patcher filename MUST HAVE "GSdxCRC" string(in case you wish to rename it;]),
- patched GSdx filename can be same, but for safety reasons probably better for it to differ,
- make absolutely sure GSdx you're patching to is NOT used at the moment(or the patching will fail without any error message),
- do not add any empty lines and keep correct format of the ini file, especially crc list,


----------
Oh and one note from me, I understand GSdxCRC patcher will most likely be used for so called "elf" patches, just an info for people who think otherwise, you can simply patch the ISO itself just like I said with my RG patcher before some guy start taking the info we gathered to patch elf files;], it obviously still changes CRC, but at least it can be burned and ran on modded ps2 easier, made it for my game as I'm not really into keeping any files unpacked off iso nor using those elf aobs to begin with;3. It's good to know it's in that elf, but that's it, memory or file edit, it's still just about searching for floats we found earlier;].

------------
If anyone interested I added ppf-o-matic3, ppf studio and an example ppf file as a counter proposition to "elf patches" which are pretty stupid and limited to more knowledgeable users only, while ppf patches can be used by anyone, are instantly applied and can have an undo data;].
Anyway you can find those here under "ISO patch" label, made one only for DC2, feel free to use those programs to mass produce existing "elf patches" into ppf;]. Most of the time you'll have to increase the size of the pattern to search by firstly finding it in ELF, couse those posted by people can easily repeat alot in whole iso;], otherwise you can also rebuild it, but well, that's the least efficient method ever. xD


------------
About the side question about widescreen, the patches in all of those games could still be made on pnach, the problem is pnach files update is at best a bit slower or similar to GS update, soo if a game updates value all the time, there are only two ways to fix it, one is to change the code of the game itself, the other is to simply edit the data within the files. Patches editing game assembly are still possible, but there are few problems with this such as lack of knowledge which makes any code above constant write some kind of magic;], lack of experience in ps2 which makes it bothersome and timewasting even when having some basics with assembly and ofc, general humanity which makes most people join projects either only to leech or find the easiest way they can think off to fix existing problems.(Like me with that bt hackfix...>.<)
#16
(06-29-2012, 12:10 AM)synce Wrote: miseru you magnificent bastard you've saved me again. A simple hex edit did the trick Ninja

Synce,
so you get the Haunting Ground in widescreen mode via ELF without the graphical glitch now? Could you explain what you did?

Sorry, tried to understand Miseru's explanation but I'm still not sure what to do...

So... I need to hex-edit the GSdx32-AVX-r5322.dll (the one that I'm using) correct?
The Haunting Ground CRC is 901AAC09
So basically according to Miseru I need to flip it to
90CAA109?

But I couldn't find that... could you help? What do I have to find and replace? Thanks in advance Smile
cpu: i5-2410m | gpu: Nvidia GT 555m 2GB | mem: 4 GB
#17
If that game's new CRC is 90CAA109 and old one is 901AAC09 then yeah, that's what you have to do;3.
You just have to remember to swap bytes when you'll be searching/replacing it(I write how in my post on the previous page), otherwise at best you'll not find anything, at worst even modify something else breaking your gsdx;P.

If you update GSdx often and/or you'll want to change more crc's like that, you could try using the patcher I released above, should be easy to use and no need to swap bytes manually;3.
#18
(07-04-2012, 10:44 PM)miseru99 Wrote: If that game's new CRC is 90CAA109 and old one is 901AAC09 then yeah, that's what you have to do;3.
You just have to remember to swap bytes when you'll be searching/replacing it(I write how in my post on the previous page), otherwise at best you'll not find anything, at worst even modify something else breaking your gsdx;P.

If you update GSdx often and/or you'll want to change more crc's like that, you could try using the patcher I released above, should be easy to use and no need to swap bytes manually;3.

Hi Miseru,
I read the readme for your patch and there are things that I don't quite understand...

-Add your crc's at the end of that ini file, they should look like:
0x42E05BAF/0x12300001
0x7800DC84/0xFF534502
0xA6167B59/0x7543DF03
0xDDB59F46/0x86FF8009
0xC8EE2562/0xBF2FF865

for the 1st example how did you get 0x12300001? (goes the same for the next examples). I thought it's just simply flipping some numbers? In that case... what is my Haunting Ground new CRC then?
cpu: i5-2410m | gpu: Nvidia GT 555m 2GB | mem: 4 GB
#19
;3 this is just format to input crc's as old_crc/new_crc in my patcher, in your example it would be:
0x901AAC09/0x90CAA109

I made up those crc's in my example there;P.

If you prefer to do it manually, here's my original post(*sight* it was on previous page you lazy human you;C)

(06-28-2012, 06:40 PM)miseru99 Wrote: I guess there's an easier way that nobody posted here, just hexedit the GSdx.dll you're using, find your unpatched game CRC and change to patched one. Just remember you have to swap bytes ie if your game CRC would be:
Code:
0x12345678
you actually must search for:
Code:
78563412
while hex editing GSdx.dll to find it. Ofc swap your current game crc to change it as well.
No need for building custom version nor adding it as a new feature.
#20
I did read that 2-3 times actually Tongue2 otherwise how could I have known about those numbers that have to be flipped? Mentioned that to Synce didn't I? hehe.

Sorry Miseru, but to be frank I have no technical background and can be a bit slow when reading something which is a bit well.... you can say complex perhaps (for someone like me Tongue2).

Anyway... thanks for your help, I really appreciate it. Will let you know about the result tomorrow... just came back from watching late night (too late actually) "Amazing Spiderman" and pretty much asleep now Tongue2. To be honest I like the Spiderman but not the Peter Parker.
cpu: i5-2410m | gpu: Nvidia GT 555m 2GB | mem: 4 GB




Users browsing this thread: 1 Guest(s)