Patch database for EZ Flash IV 2.x

Discussion in 'GBA - Flashing Hardware and Software' started by rs1n, Jul 21, 2019.

  1. rs1n
    OP

    rs1n Advanced Member

    Newcomer
    2
    Jul 26, 2013
    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?
     
  2. kuwanger

    kuwanger GBAtemp Advanced Maniac

    Member
    9
    Jul 26, 2006
    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.
     
  3. rs1n
    OP

    rs1n Advanced Member

    Newcomer
    2
    Jul 26, 2013
    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, Jul 21, 2019
  4. kuwanger

    kuwanger GBAtemp Advanced Maniac

    Member
    9
    Jul 26, 2006
    United States
    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).

    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.
     
  5. rs1n
    OP

    rs1n Advanced Member

    Newcomer
    2
    Jul 26, 2013
    United States
    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.
     
Loading...