The problem with my custom installer...

To unpack the game files for BatteryCheck, which is originally a windows PC game, I have created a custom installer about two years ago. It runs right on the console itself and it was no longer required to run the "setup.exe" on a windows PC first! The installer I have ported to the: GameCube, Wii and 3DS and it has a fairly simple text interface that looks kind of boring. It get's the job done but it's not really amazing to look at! :wink:
View attachment 265858
For a while I had the crazy idea to create a "Windows XP style" experience on the Wii:
View attachment 265857 View attachment 265859

While the idea for that was amazing, stupid and crazy at the same time....it would also mean I would have to write my own windows manager and handling input events on objects and stuff. Cool stuff actually, but not really important for an installer used only once and then to never be seen again! Which is why I chose not to continue with the idea and just stuck with the text based version.

Now comes the bad part...:wink:...over the past two years I have been actually trying to get something of a GUI working and putting a lot of "junk code" into the part that actually unpacks the files! It's a total mess now...and that needs to be cleaned up! A LOT! Not only are there platform specific checks for various "testing" I did, but also I abused this project to experiment on the NDS last year to load images into external ram! I have no idea why I put that stuff into the installer app!!!

I am thinking it's the easiest to kind of start from scratch on the setup source, and cherry pick the useful parts of the current "bc_setup" app I have. This means that when it's done the app will still be completely text based but also clear of all the extra junk it collected over the years! What I really want is that the function that actually does the unpacking does not print anything to the screen at all! It will only accept callback functions to be called when the percentage done changes. That function is than responsible for either writing it on screen as text or advancing a progress bar in a gui!

The new installer should also be compatible with the different types of installation files. Or more specifically where they came from:
- 1 - The original CD-ROM
- 2 - From the previously linked site as a ZIP file.
- 3 - The extracted or copied "Setup.exe" from option 1 or 2 that is about 12MB
- 4 - From archive.org as ISO
- 5 - From archive.org as EXE
- 6 - From digiex.net as ISO
- 7 - From digiex.net as ZIP
- 8 - Maybe the freeware version download from Stibat? (I don't have this version so I can't test it)

Right now only option 2 and 3 are directly supported by my installer. Option 1 is cool to have on a console, but most of them can't read the CD-ROM directly....unfortunately! For option 5 to work all that's needed is that it recognizes the capitalized name of the file as valid. Option 7 is similar to option 3 in that they are both zip files...but for option 4 I have looked at which offset the compressed data stream is located and just use zlib on that blob! I am not using any kind of ZIP library to locate the file in there. Making option 7 work just requires me to figure out it's different offset and then it should work.

The ISO files from both sources have the same SHA1 hash of 4a7343bc0257d18e777fca9ad340573c4ca9a92f meaning they are identical! I feared I would have to use some kind of iso9660 library before I would be able to access the Setup.exe that is embedded in the file, but the same trick I used for the ZIP files is possible here! The files is just there at an offset without any compression at all! I would just need to recalculate some of the offsets I already use and it should just work! :D

No matter which version you have the setup.exe should always be exactly 12,308,298 bytes (11,7MB) and have an SHA1 hash of f86f8805e3e39763789400cefda2bf2430ddb4a9. This is the only version that the installer is able to unpack from....but it will do NOTHING to verify it is actually this file version! I know it should...but currently it does not!
Currently the best option is to just do a google search for: batterycheck game download and then choose either the archive.org or digiex.net from the top results. I have verified the downloaded files and their hashes to be the same as from what I have on my CD-ROM. Here is a list of them in case you want to verify them yourself:
Code:
f86f8805e3e39763789400cefda2bf2430ddb4a9  Setup.exe
96ffaf435157f9067a6a9912fdffacafb3e8b2ca  batterycheck.zip
4a7343bc0257d18e777fca9ad340573c4ca9a92f  BATTERYCHECK.iso
f86f8805e3e39763789400cefda2bf2430ddb4a9  SETUP.EXE
4a7343bc0257d18e777fca9ad340573c4ca9a92f  Battery Check (CD Image).iso
29f053ef5f6ed118a0e0c27a8ef13a003439269f  Battery Check (Setup Only).zip
f86f8805e3e39763789400cefda2bf2430ddb4a9  SETUP.EXE
These are the file names and the SHA1 hashes that I have found. While each of them has a slightly different name, the relevant "setup.exe" is always what I said above: 11.7MB with a SHA1 hash of f86f8805e3e39763789400cefda2bf2430ddb4a9

What the "new installer" is really going to look like has not been decided yet! After cleaning it up and adding support for the new sources as discussed in the spoiler blocks above, I think it will still be the same simple text interface for now. Just rewritten in a way that will make it work on any platform and later be able to fit into a nice looking GUI! :D

Thank you for reading.:D
  • Like
Reactions: 2 people

Comments

Blog entry information

Author
Archerite
Views
225
Comments
2
Last update

More entries in Personal Blogs

More entries from Archerite

Share this entry

General chit-chat
Help Users
  • No one is chatting at the moment.
    BigOnYa @ BigOnYa: I played the intro to far cry 5, that is like some crazy Jim Jones cult shit. Still its petty...