Hacking Patch database for EZ Flash IV 2.x

rs1n

Well-Known Member
OP
Member
Joined
Jul 26, 2013
Messages
310
Trophies
1
XP
1,250
Country
United States
After tinkering with kernel 2.05 for a bit, it occurred to me that the auto patcher seemingly just creates .PAT files found in the PATCH directory. It occurred to me that a lot of the initial time-to-wait can be bypassed if we could simply just copy pre-existing .PAT files. I am still waiting on a second micro-to-mini adapter, but I plan to test this by copying over my current micro SD card onto the new micro SD card to see if it skips the initial patching process since there will already be existing .PAT files.

Does a collection of .PAT files already exist?

Also, somewhat related -- I recall there being limits on the number of files within each directory. What happens if one were to place the entire GBA library onto the flash cart (sorted into subdirectories, of course)? I would presume that the PATCH and SAVER directories would eventually surpass the limit, would they not?
 

kuwanger

Well-Known Member
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
1
XP
1,793
Country
United States
I forget if anyone has actually created a patch collection. AFAIK, the EZ Omega uses the same .PAT format in its auto patcher so you could look at it if interested on what it's doing/how it works. The issue with number of files in a directory has to do with the kernel sorting filenames. It doesn't apply to being able to access files.

Having said that, if you've got a directory with hundreds of save files be prepared to wait 20+ seconds for saves as each startup it'll have to scan most the SAVER directory. I imagine the same will be an issue with the PATCH folder. The only real solution to this would be something like the kernel to be modified to have sub-folders keyed to the header or something. Of course, you can try it yourself with just a bunch of dummy .PAT files and then see how it behaves.
 

rs1n

Well-Known Member
OP
Member
Joined
Jul 26, 2013
Messages
310
Trophies
1
XP
1,250
Country
United States
These issues are definitely drawbacks. Then again, even with the entire game library, I doubt that many people would actually play through every single game (almost 2900, including duplicates) and cycle through them all on a regular basis to even warrant all those files being on the cart all at once. In practice, I see myself as only having a handful of .PAT and .SAV files needed on the cart itself.

With a library of .PAT files (and possibly even .SAV files), it would definitely make life a little easier for the typical user. This way, not only can you drag and drop .GBA files, you can do the same with .PAT files. I guess I am still on the fence about the auto patcher. In the meantime, I will keep a backup of all the .PAT files I generate just so I do not have to wait through them again should I need swap out SD cards for whatever reason.

Does the 2.05 kernel just skip auto patching if a .GBA file is already patched from EZ Client?

EDIT: Feel free to correct me (i.e. educate me) for the following since I have only skimmed the Omega source tree. It seems that the .PAT files are mostly for handing save file type as well as other options/addons such as sleep, soft-reset, etc. If this is correct, it would suggest that .PAT files might not be the same from one user to the next.
 
Last edited by rs1n,

kuwanger

Well-Known Member
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
1
XP
1,793
Country
United States
If this is correct, it would suggest that .PAT files might not be the same from one user to the next.

Yes, the EZ IV has the keyset.cfg. EZ Omega has even more flexibility with the options. The fast patch engine for the EZ Omega most avoids the need for .PAT files by having a list of all patch addresses and save types for all games. I don't think the EZ IV has sufficient hardware save compatibility so it requires patching some save types? Don't quote me on that, though. In any case, I can't guarantee the EZ IV and Omega produce sufficiently compatible .PAT files, but from what little I know of the EZ IV kernel from disassembly and the like, the two are rather similar. For example, gba_sleep_patch.s confirms their auto patch engine is based on dwedit's sleep patch program (and quite probably based upon my fork).

In the meantime, I will keep a backup of all the .PAT files I generate just so I do not have to wait through them again should I need swap out SD cards for whatever reason.

That's something I've recommended for everyone since day one because sd card corruption is sadly a thing on the EZ Flash IV and Omega both, although I think that improved a lot more with the IV once they started being able to actually properly create files. *sigh* I do agree there'd be some benefit with a PAT library selection, but I imagine that'd be still somewhat tedious without some program to look through the ones you need, copy them over, and rename them. That'd actually be pretty easy in python.
 

rs1n

Well-Known Member
OP
Member
Joined
Jul 26, 2013
Messages
310
Trophies
1
XP
1,250
Country
United States
That's something I've recommended for everyone since day one because sd card corruption is sadly a thing on the EZ Flash IV and Omega both, although I think that improved a lot more with the IV once they started being able to actually properly create files. *sigh* I do agree there'd be some benefit with a PAT library selection, but I imagine that'd be still somewhat tedious without some program to look through the ones you need, copy them over, and rename them. That'd actually be pretty easy in python.

I think a tool/script that looks through a folder of ROMs (on your computer, presumably) and batch-creates the .PAT files based off of the KEYSET.CFG file would be really nice. Perhaps this would eventually duplicate the role of the old EZ Client program, but allowing users to select the games they want to send over to their SD card (along with appropriate .PAT files) would be an additional time-saver.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Kirbydogs @ Kirbydogs:
    might be for my phone
  • BigOnYa @ BigOnYa:
    Maybe a free RAM upgrade to download.
    +1
  • Kirbydogs @ Kirbydogs:
    Forgot I enabled a Windows XP cursor.
  • Kirbydogs @ Kirbydogs:
    You don't even need any 3rd-party app for Windows to do so, or any customly-forged or any drag-and-dropped files
  • Kirbydogs @ Kirbydogs:
    It's just the (None) selection, and when paired with the "enable shadow" effect, it's really neat.
  • JollyBaker @ JollyBaker:
    wow you're right
  • K3Nv2 @ K3Nv2:
    Indiana game starts kind of boring they should've added pickpotting nuns
  • BigOnYa @ BigOnYa:
    Yea it gets alot fun-er once you get to the pyramids. More gunplay/ guns also.
  • K3Nv2 @ K3Nv2:
    Whip the nuns good
    +1
  • BigOnYa @ BigOnYa:
    Once you get enough money, buy the guides from the guy you get the camera from, they show all the notes, medicene, books, artifacts locations. Helps alot.
  • BigOnYa @ BigOnYa:
    I got stuck earlier in a underground chamber without a map, couldnt find a way out, felt like I was stuck in Psi's basement of horrors. (Had to swim underwater to dif room to escape)
  • K3Nv2 @ K3Nv2:
    Psis basement was originally very dark but the meth gave enough light
    +1
  • BigOnYa @ BigOnYa:
    I wonder if in Florida, during concerts instead of lighters they just lift up theyre lit meth pipes.
  • K3Nv2 @ K3Nv2:
    Meth vapes are a hot seller
  • Sicklyboy @ Sicklyboy:
    that's methed up
    +1
  • Sicklyboy @ Sicklyboy:
    Well, that's a new one for me. Cleaning some linear rails for my 3d printer I'm building, spraying the hell out of them with brake cleaner to strip the light oil off of it so I can grease them up properly
  • Sicklyboy @ Sicklyboy:
    This old can of brake cleaner ran out of propellant with like 15% of the fluid left in the can, wtf
  • Sicklyboy @ Sicklyboy:
    Now I have to go run out to my truck to get a new can and it's dark and cold and wet and windy :(
  • K3Nv2 @ K3Nv2:
    Don't huff the cleaner in the store wait tell you get to your car
  • K3Nv2 @ K3Nv2:
    They were talking about how a principal and assistant tried framing a kid with a weed cartridge on the radio and I'm just like how did that kid get hated that much
    +1
  • Sicklyboy @ Sicklyboy:
    of course it's texas
    +1
  • Sicklyboy @ Sicklyboy:
    shithole state
  • K3Nv2 @ K3Nv2:
    Florida would also be acceptable
    K3Nv2 @ K3Nv2: Florida would also be acceptable