Hardware [RELEASE] ezgba v0.1.0a - an EZ4 compatible ROM patcher

foobar_

Member
OP
Newcomer
Joined
Apr 2, 2014
Messages
21
Trophies
0
XP
159
Country
United States
I'd like to share a tool I made: ezgba v0.2.0a-2

The official EZ-Flash 4 client is a piece of crap, so I wrote another one.
The EZ Flash 4 requires a special header patch to save properly, which my app will apply. In addition, all the standard patches, like SRAM, trimming, IPS, etc. are supported.

It features a CLI/GUI interface, and is cross platform. Windows, Mac OS X, and Linux users can all enjoy.
Source code is included; I'm releasing it under the WTFPL-2.

Lpzbi8z.png


The SRAM patches are 1:1 with gbata, with the exception of ROM padding. gbata likes to ensure the ROM padding is either all 0xff or all 0x00, but I don't know how it determines which value to use. This shouldn't affect anything.

See the included README.md for more information.

Extra thanks go to:
TrolleyDave & FAST6191 - for the SRAM patching thread
Martin Korth - GBATek, the most useful document in the world




Download here (v0.2.0a-2)
SHA1 6dd9913383a0d7a524cf9e3d955a00bc32d13089 *ezgba-v0.2.0a-2.rar

Windows users can just run the *.exe.
On OS X, use homebrew to install the boost and wxmac packages before using.
If you use Linux, you probably already have boost and wxWidgets.

New in v0.2.0a:
  • batch processing
  • dummy save creation
  • no installing extra dependencies on Windows

Download old version (v0.1.0a-3)
SHA1 961a837c2f716612ac40326bde1941721a4340cd *ezgba-v0.1.0a-3.rar
Version 0.1.0a-3 requires the GTK+ runtime: Windows Mac OS X (install the gtk+3 package)

Batch processing with CLI: Windows OSX/*NIX
Automatically creating dummy save files with CLI: Windows




x3wJA5M.png
9B2QnEb.png
yV24Vpz.png
WV9mKcv.png
 
Last edited by foobar_,

Adhrast

Active Member
Newcomer
Joined
Nov 29, 2006
Messages
31
Trophies
0
XP
302
Country
Italy
I think I'm in love with you.
I've just bought a GBM and a new EZFlash IV MicroSD, and the proprietary client was driving me nuts.
Also, being a Mac OS user was giving me even more headaches :/
This is just perfect, keep up the good work!

EDIT: I was trying on my break at work on Windows, I installed the Gtk runtime and it runs.
The problem is: I select a rom, I leave everything checked as it is, click the "Write patched file" button, give the rom a name and try to save it on the Desktop. The wheel just keeps spinning and nothing happens :/ what am I doing wrong? I already tried to run it as admin
 
Last edited by Adhrast,

Adhrast

Active Member
Newcomer
Joined
Nov 29, 2006
Messages
31
Trophies
0
XP
302
Country
Italy
Wow, this is all far more difficult than I thought.
I tried to look things up but couldn't get anything to work, when I double click the .app it tells me it can't open it.
Any tips? This would be wonderful if only I could get it to work...
 

foobar_

Member
OP
Newcomer
Joined
Apr 2, 2014
Messages
21
Trophies
0
XP
159
Country
United States
I'll need some more information here; what OS version is your Windows/Mac machine? 32-bit or 64-bit?
Did you have antivirus on your Windows machine? Sometimes they like to deny write permissions for unknown programs.
Where did you try to save on your PC, local or network drive?
Did you install GTK runtime on your Mac as well?

For Windows, try the debug build and post the console output: http://www.datafilehost.com/d/1e46128f
Give me a screenshot from your Mac too, and I'll have a look.
 

Adhrast

Active Member
Newcomer
Joined
Nov 29, 2006
Messages
31
Trophies
0
XP
302
Country
Italy
Ok, that was a fast reply :D
My computer at work is a Windows 7 laptop, 64bit, and yes it has antivirus. I tried to save both on local and on network.

I tried to install GTK via Homebrew on my Macbook Air 11" (mid 2011), but maybe i didn't install the right "formula"?
When I try to start "ezgba.app" the screenshot is the answer I get.
It's Italian, you probably don't even need a translation, but anyway it says "Can't open the application "ezgba.app"."
 

Attachments

  • Schermata 2015-08-22 alle 09.57.07.png
    Schermata 2015-08-22 alle 09.57.07.png
    52.5 KB · Views: 951
Last edited by Adhrast,

foobar_

Member
OP
Newcomer
Joined
Apr 2, 2014
Messages
21
Trophies
0
XP
159
Country
United States
I updated the download link on the first post - it's the same thing, except with file permissions fixed. That should fix Mac OS X.
If it still doesn't open, you need the right gtk runtime - try running brew install gtk+3

Give it a whirl and tell me if it's fixed :D
 

Adhrast

Active Member
Newcomer
Joined
Nov 29, 2006
Messages
31
Trophies
0
XP
302
Country
Italy
Whoah man, now everything works perfectly!
I still have to try it on the flashcard as it's still on its way here, but the patcher now boots up, loads the rom and saves it where I tell it to :D
So it should be alright!
Thanks a lot foobar_, what you're doing is EXTREMELY appreciated!
 

Plstic

Guru Meditation Error
Member
Joined
Apr 21, 2010
Messages
1,196
Trophies
1
Location
Milwaukee WI
XP
2,810
Country
United States
The patcher seems to hang when trying to patch a game for me. The wheel just keeps on circulating. I'm on windows 10. I don't think it should take too long for it to patch lol.

EDIT: The debug version you posted earlier works fine.
 
Last edited by Plstic,

foobar_

Member
OP
Newcomer
Joined
Apr 2, 2014
Messages
21
Trophies
0
XP
159
Country
United States
Hmm.. I was able to reproduce the neverending spinner issue, but I'll have to investigate sometime later, it's too late for today.

EDIT:
Took a quick look, implemented quick fix. Download link in first post updated.
 
Last edited by foobar_,

JimmyZ

Sarcastic Troll
Member
Joined
Apr 2, 2009
Messages
681
Trophies
0
XP
762
Country
Zimbabwe
nice work!

does it include the software reset patch?

and the ability to create blank save files would be nice, since I'm stuck on firmware 1.74, later versions doesn't work.
 
  • Like
Reactions: Deleted-236924

foobar_

Member
OP
Newcomer
Joined
Apr 2, 2014
Messages
21
Trophies
0
XP
159
Country
United States
Reset patch isn't supported, since I don't use it at all. There's a bunch of games that don't play nice with reset patch too.
If you really wanted reset patch, I think there's already a separate tool for it.

There's nothing special about creating blank saves.
Just stick anything in your "sd:/saver" directory - it could be a JPEG of your cat, your favorite mp3, a blank txt file, etc.
Then rename it to match your ROM file, and the EZ4 will just overwrite it on save.
 

JimmyZ

Sarcastic Troll
Member
Joined
Apr 2, 2009
Messages
681
Trophies
0
XP
762
Country
Zimbabwe
about reset, yeah I know sometimes it doesn't work but when it works, it's really nice.

for the blank save, usually users prefer the GUI won't like to do these things.

no offense.
 

foobar_

Member
OP
Newcomer
Joined
Apr 2, 2014
Messages
21
Trophies
0
XP
159
Country
United States
I don't think you understand what I was saying..
I have no incentive to spend too much effort on work I can't benefit from.
No apologies :evil:
 

suloku

Well-Known Member
Member
Joined
Apr 28, 2008
Messages
883
Trophies
0
XP
866
Country
This is great! Thank you very much! I only have one doubt, ezclient needed a database for correct patching, does your patcher autodetect or this makes it so we don't need the database?

Also, I like it being command line, there are tons of ways to run it, a simple batch file to drag and drop files on it and get them patched right away.
And since it is command line anyone can write a GUI for it.

On a side note, I tried running the gui version after installing gtk3-runtime_3.8.1_64-bit just to find out that it won't run under the 64bit runtime.
 

s3phir0th115

Well-Known Member
Member
Joined
Dec 31, 2008
Messages
728
Trophies
1
XP
1,003
Country
United States
Thanks for making this! I'm patching my collection for it now, and not needing to boot into Windows or use wine/vm is very helpful.

Something I might suggest is a batch mode functionality. Doing them one by one is a bit of a pain.

Fortunately having a command line version made implementing this fairly trivial:

Code:
#!/bin/bash
for a in *.gba; do
  ezgba-cli --in-place -i "$a"
done
 
  • Like
Reactions: Gyron_Oldvic

suloku

Well-Known Member
Member
Joined
Apr 28, 2008
Messages
883
Trophies
0
XP
866
Country
I was just about to post the batch file for that (overwrites the gba files, so keep originals):
Code:
for /r %%v in (*.gba) do ezgba-cli.exe -i "%%v" --in-place

This one will create new romname-patch.gba
Code:
for /r %%v in (*.gba) do ezgba-cli.exe -i "%%v" -o "%%~nv-patch.gba"

EDIT: ok, the database seems to be for creating the save files, I thought it only needed to be a file, but the size does also have to be that of the save file of the game. Too bad I couldn't get the 1.77 kernel working (that is not a gba game message appears when trying to boot).

There's nothing special about creating blank saves.
Just stick anything in your "sd:/saver" directory - it could be a JPEG of your cat, your favorite mp3, a blank txt file, etc.
Then rename it to match your ROM file, and the EZ4 will just overwrite it on save.

Does that really work? I tried with 0 byte files and got my sd corrupted, ezIV client creates them with the supposed filesize of the save.

Was it because they were 0 byte files? I don't really feel like trying to corrupt my card again for trying (I'm going on a trip in an hour).

Also, does the patching process depend on the size of the savegame too? I'm asking because if your program detects the save size and type before patching, adding an option to create the correct sized .sav file would be great and very easy to implement. If it needs a database with save sizes it's another story though.
 
Last edited by suloku,
  • Like
Reactions: Gyron_Oldvic

foobar_

Member
OP
Newcomer
Joined
Apr 2, 2014
Messages
21
Trophies
0
XP
159
Country
United States
Zero byte files worked fine when I tested it (was on 1.72 at the time, IIRC).
Never gotten an error message on 1.77, but I've gotten black screen before. I think we might be on different hardware.
I've got a Sandisk 2gb mini sd with the more recent but non-microsd EZ4 model, on original AGB-001. What are you using?

SRAM patch depends solely on save type.

Can you try a dummy file size of 1024 kB?
EEPROM has two save sizes, which can't be reliably detected outside of an emulator. I've never investigated, but the official client probably uses the larger size as a one-size-fits-all. If I'm correct about their EEPROM handling, 1024 kB dummy files might work.
 

suloku

Well-Known Member
Member
Joined
Apr 28, 2008
Messages
883
Trophies
0
XP
866
Country
Mine is the ezIV lite deluxe, currently on the 1.72 reset version due to being unable to boot any roms under 1.77, with a 4gB kingston sdhc card (the non sdhc card I've been ysing since I bought it will only be detected if it is fat16 and only when updating the kernel, by the way the 4gB sdhc was unable to updatr thr kernel (black screen).

I'll test tomorrow again with 0 byte and a 1024 byte files, see what happens, I already though about using the largrst save size as dummy, since that might prevent corruption due to the eziv never writting outside of the file (theorically).

I've also seen the sources of some tools and seems like detecting eeprom size can't be done, and whilst the others can, and even the 128kB per save even on a 128mB sd card isn't that much...

Ps: just for personal curiosity, I compared a file patched with your program with the same one patched with eziv client and they are very different, how come? I didn't think they would be the same patches, but neither thought them to be that different
 

foobar_

Member
OP
Newcomer
Joined
Apr 2, 2014
Messages
21
Trophies
0
XP
159
Country
United States
There are some games (eg. Top Gun, Breath of Fire) that require specialized patches, but ezgba doesn't detect/apply them. gbata and the official client will handle (some of (?)) them, but ezgba relies on user to apply the appropriate IPS patch. Could be you have one of these - there's a list of these games in README.md.
I used gbata's SRAM patches as base, since there was already a thread on it. When I was experimenting with the official EZ client, it had the same SRAM patches as gbata, but in different locations (ie. the first occurrence of the pattern would be patched instead of the last, etc). I'd be surprised if they were completely different though. What ROM did you test with?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Badcatalex @ Badcatalex:
    sony should #stopkillinggames
  • Badcatalex @ Badcatalex:
    they killed LittleBigPlanet online, which was the main core of every LBP game
  • BakerMan @ BakerMan:
    for real
  • BakerMan @ BakerMan:
    at least with them, it was because of the DDOS attacks, ubisoft was just scummy
  • BakerMan @ BakerMan:
    fuck ubisoft, and fuck activision
    +1
  • realtimesave @ realtimesave:
    Nintendo needs to release a new console, switch is getting such shitty little games lately lol it's pathetic
  • Purple_Heart @ Purple_Heart:
    Lmao a new flashcart... The Unlock Switch... I knew it's not fake xD
    +1
  • NinStar @ NinStar:
    A new consoles won't solve that problem
  • NinStar @ NinStar:
    It will actually make it worse
  • The Real Jdbye @ The Real Jdbye:
    well actually
    a new console won't do anything right now, because the games are still in development, that's why there are few games being released
  • The Real Jdbye @ The Real Jdbye:
    it won't make the games finish any faster
  • Veho @ Veho:
    2/3rds of launch titles for the Switch 2 will just be lazy ports of Switch games anyway.
  • The Real Jdbye @ The Real Jdbye:
    probably
  • The Real Jdbye @ The Real Jdbye:
    maybe mario kart 9 will be a launch title
  • The Real Jdbye @ The Real Jdbye:
    i really want a new mario kart
  • Veho @ Veho:
    What, you mean the endless stream of DLCs doesn't count?
  • Veho @ Veho:
    Why develop a new game when you can just sell season passes forever?
  • Veho @ Veho:
    I'm still on MKDS so I'm not bothered :tpi:
  • The Real Jdbye @ The Real Jdbye:
    i like the dlc tbh, i'd like a new game more
  • ZeroT21 @ ZeroT21:
    but the current version is still selling fine at full price
  • SylverReZ @ SylverReZ:
    Hello
  • ZeroT21 @ ZeroT21:
    sup
    +1
  • SylverReZ @ SylverReZ:
    @realtimesave, You seen the Unlock Switch flashcart yet?
  • K3Nv2 @ K3Nv2:
    I'll see the 19.0 update that blocks use ability to it
    +1
  • K3Nv2 @ K3Nv2:
    Lol newegg+
    Screenshot-20240423-053504-Gmail.jpg
    K3Nv2 @ K3Nv2: Lol newegg+