Project64 Forums

Project64 Forums (
-   Open Discussion (
-   -   Banjo-Tooie EEPROM Save Editor (

HatCat 24th March 2014 08:25 PM

Banjo-Tooie EEPROM Save Editor
1 Attachment(s)
Some people wanted a save editor for Banjo-Tooie to speed up some things. It is capable of doing a few things that GameShark cheat codes are not capable of (due to their lack of bit-precision access, without overwriting over flags when setting bytes), which seems important in this game's case due to Rareware's enjoyment of unaligned data storage, custom checksum security and save buffer swapping and destroying to throw code hackers off. :)

The release binaries currently cover both Win64 and Linux/Debian 64-bit. You need a 64-bit CPU to run this program unless you want to compile it yourself; with all the 64-bit bit-wise logic math going on computing Rareware's crazy checksums, I didn't see a point to bother including 32-bit binaries.

There is no graphical UI frontend to this program; feel free to make one if you want, even though the included batch script makes command-line execution equal to if not superior to the ease of throwing in a GUI. :p

Things which I did not have the time/patience to implement:
  • the secret multiplayer Jinjo character unlocked in the game's global settings, possibly some Stop 'N Swop beta stuff
  • precise, exact control over which jiggies were collected, instead of just 0 or all 90 of them (same thing for the 900 musical notes and learned moves bits, including Jamjars' moves you learn in Tooie as well as disabling/re-enabling old moves learned from Bottles in Kazooie)
  • trivial Boolean flag stuff, like did this or that character talk to you for the very first time yet
  • warp pads...should have implemented this to make navigation across the worlds much easier but did not have time to...but remember, open-source! :P
  • marking certain in-game cheat codes as either unlocked for in-game toggling or "heard of" and ready for entering in the Mayahem Temple code chamber, rather than just instantaneously enabling or disabling them through this save editor, which is currently the only method
  • probably other stuff not obvious enough for me to think of... (Game save data here has a lot of bits to check.)
For a full list of what IS supported or the syntax passed on the terminal to edit the save file, read the MANUAL text. The README text is just a documentation of the 128-byte global settings flags for general view (things like which mini-games, bosses and cinematic sequences have been unlocked for replay), not assistance with using the program.

HatCat 24th March 2014 08:26 PM

I first started this program when someone named bryc hacked out the 32-bit checksum algorithm used by Banjo-Kazooie. He gave me some Nemu64 breakpoints and debugging tips for when I decided I would try to do the same thing as him, but for Banjo-Tooie's very, very slightly different 64-bit checksum algorithm. My implementation of Rareware's checksum technique was more literal, as I virtually wrote a MIPS CPU faker and some C-language functions to re-assemble what I got from the Nemu64 CPU running this game.

RPGMaster 25th March 2014 01:59 AM

Today I'll work on making a GUI. I really need to cut down on video games so this will be a good exercise for me to do :) . I can't be bothered with doing the actual work, so it'll just be a frontend of your program.

Lol I was going to attempt doing this in pure winapi, but after realizing the extra work I'd have to do, I said to myself "nvm" xD. Now the next big challenge will be figuring out how cram all the options using as little space as possible. I'll also have to figure out how to add the file explorer thing.

Edit: Here's the link to my frontend gui .

HatCat 25th March 2014 02:11 AM

Heh, the closest thing I've ever done to a GUI is Flash Player stuff. No idea how it works, but maybe to prioritize past the file explorer integration you could make the file path a simple text box for quickly specifying the directory, then later go back to add a button that uses a file explorer shell of some sort.

Obviously you can use whatever API you want. Maybe it's an ideal practice scenario for writing a GUI for something that's not complete (as a full-fledged save editor), in ways that you account for forward-extensibility with options that might get added in later versions. It might add to the challenge about how you lay out the space.

RPGMaster 25th March 2014 02:27 AM

Ya I know I can use a textbox for file directory. Right now I'm trying to figure out an ideal way to handle all the different variables. What I will do is use winapi and stdio. I might as well learn how to make user friendly GUI's since I normally just cheap out and do things like textbox for file directory.

Edit: Lol I must admit, adding all the items is time consuming. The reason I stated that GUI's were quick for me was because I never had a ton of checkboxes. Lol even though I've learned some new tricks for making GUI's quicker, it's still going to take a while (I like to make it look nice).

I did most of the GUI. I'll probably upload it on Wednesday. What is the minimum post count required before I can post links? I just want to make sure before I end up posting the link. Also I might skip a few features for now if you don't mind.

HatCat 25th March 2014 02:07 PM

I like using stdio in plain or console stuff, but in Microsoft winapi stuff they try and make you use functions specific to Windows so you don't have too many dependencies or redundant ones (like msvcrxxx.dll where user32 would have done it, etc.). Still, in the initial design that's not important.

That's funny, I thought the minimum post count was like, <= 30 posts? I thought for sure you'd have enough by now. I guess Mr. zilmar couldn't help but change it again? Well you can always create a new post with the test, and delete the post yourself if it passes.

RPGMaster 25th March 2014 06:37 PM

Lol halfway through making the GUI I realised a flaw in my design after reading through your documentation. My plan was to make the checkboxes determine most of the variables. The problem is for those 1 bit variables like unlocking 90 jigsaw pieces. If the user did not want to alter this variable, there would be no way to do so if I were to use checkboxes. So my option is to either use text box and use up more space or remove the option of setting the variable to 0.

Which one would you prefer I do? So far the gui window is unfortunately very big lol. I won't have much time today, but I might release an early version just to get people to test it. I'd like feedback on improving the gui as well. I'm worse at GUI's than I thought :( . Tbh I've never even used checkboxes before LOL. I'd normally have 2 radio buttons to do the job of 1 boolean variable.

Oh I never tried posting a link yet, but I just wanted to make sure that I was able to post links.

HatCat 25th March 2014 07:58 PM

Normally I'd say the ideal solution is to just read the save file yourself and fill in the checkbox with the current setting, but I see your problem. Somebody might have some of the jiggies (> 0 but < 90), and this checkbox will mean either none or all 90 of them when saving...

Hm, aren't there some checkboxes that have 3 possible values? Checked, unchecked, and checked but with a kind of grayed-out look (not disabled just gray-ish) where the setting is ignored? I've seen it before in some UIs, but IDK if you can do that.

If that fails, the simplest thing would be to just add checkboxes for all of the 90 individual jiggies for a future release where I add per-jiggy-toggling, rather than spend your time worrying about the current limitation about it being either 0 or all 90. Of course since I haven't hacked out which bits correspond to which jiggies, you'd merely work on the layout of the 90 checkboxes of each jiggy (maybe 10 checkboxes per each world/course combo box entry to save space or some shit) for when I DO document those bits. Keep them permanently disabled/deactivated and there just to reserve the space for use in a future edition where all 90 jiggies are accessible.

RPGMaster 25th March 2014 08:23 PM

Ok well I wasn't able to finish in time lol. I will upload whatever i have done tomorrow. I will try to learn how to use more features in winapi. Right now I am using a textbox for file directory lol...

I could definitely use help with GUI design lol. I hope my current one isn't too bad. I will probably have to use multiple windows, eventually since it won't be able to fit in 1 window.

HatCat 25th March 2014 08:46 PM

I guess you'll just have to include multiple tabs!

One for the 90 jiggies' check boxes (or have only 10 checkboxes since there are 9 worlds with 10 jiggies apiece, so you can have a combo drop-down box thing), one for all the objects and items (text input boxes for how many extra honeycomb pieces, Cheato pages, glowbos, some other trivial objects and items, ranging from -32768 to +32767 each),'d just have to keep redesigning it until your creativity morphs enough I guess lol.

Just one more thing I hate about GUIs...there's always bias, and I'm not a fan of organizing things into tabs unnecessarily, but it looks like you have no other choice.

I'm happy to offer some advice as well based on the current appearance of your GUI, but I have no programmer advice on the matter :D so by all means, take all the time you need if it helps.

All times are GMT. The time now is 06:04 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.