Tonyhax International: Backup Loader For All Japanese, USA, and PAL PS1 Consoles/Early PS2 Consoles + GameShark Flasher

General homebrew games, programs and PlayStation PS-EXE's
alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » January 12th, 2023, 10:47 am

Version 1.1.8 (1/11/2023) https://alex-free.github.io/tonyhax-international/

tonyhax-v1.1.8-international: https://github.com/alex-free/tonyhax/re ... tional.zip

Changes:

A new and exciting boot method known as GameSharkHAX (https://alex-free.github.io/tonyhax-int ... -code.html) has been added to Tonyhax International. This is a brand new ‘way in’ to the Tonyhax International loader for all PS1 and PS2 consoles that are supported by Tonyhax International (SCPH-1000-SCPH-39004). It uses GameShark codes to boot the Tonyhax International loader off a memory card file mid-game.

Condensed the Boot CD back to just one BIN+CUE file set. It is not actually necessary to have 2 different versions of the Boot CD, the single BIN+CUE file set in all Tonyhax International releases from here on out will work in every supported use case.

The documentation has been split into multiple markdown and html files. This makes it much more easy to maintain for me, and easier for you to comprehend, read, and share. The ‘all in one html file’ style before became unmanageable due to the sheer amount of info that has been added since the initial release.

User avatar
Shendo
Verified
C Programming Expert
C Programming Expert
Posts: 250
Joined: Mar 21, 2012
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-7502
Discord: ShendoXT
Location: Croatia, EU

Post by Shendo » January 12th, 2023, 1:26 pm

I think I know why you had issues creating proper .mcs linked files.
You need to align everything to 8192 bytes for each slot (+128 byte header).
So if it's over 16K (2 slots) then create 24K (+128 byte header) with padded data.

Check out the Memory Card file format, mainly directory frames,
bytes 04 through 07, that's where the save size resides.

You can also check how MemcardRex imports single save data.
It has to generate directory frames for each block (as .mcs only has info for the first one).
Since only save name in the first directory frame is relevant required space is calculated by the file size,
not the size defined in that first frame that's why padding is needed.

I've could have used the other approach and just pad the slot with zeroes and use size from the directory frame but:
  • That info then might be wrong, with incomplete block.
  • If not 8K aligned save is probably broken, because why would any tool export incomplete block?
uLE might be padding data, that's why it works is my guess.
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » January 20th, 2023, 3:25 pm

Shendo wrote: January 12th, 2023, 1:26 pm I think I know why you had issues creating proper .mcs linked files.
You need to align everything to 8192 bytes for each slot (+128 byte header).
So if it's over 16K (2 slots) then create 24K (+128 byte header) with padded data.

Check out the Memory Card file format, mainly directory frames,
bytes 04 through 07, that's where the save size resides.

You can also check how MemcardRex imports single save data.
It has to generate directory frames for each block (as .mcs only has info for the first one).
Since only save name in the first directory frame is relevant required space is calculated by the file size,
not the size defined in that first frame that's why padding is needed.

I've could have used the other approach and just pad the slot with zeroes and use size from the directory frame but:
  • That info then might be wrong, with incomplete block.
  • If not 8K aligned save is probably broken, because why would any tool export incomplete block?
uLE might be padding data, that's why it works is my guess.
Thank you very much, you are exactly correct!

First 0x180 bytes of the original tonyhax-tpl.mcs:

51 00 00 00 00 40 00 00 02 00 42 45 53 4C 45 4D 2D 39 39 39 39 39 54 4F 4E 59 48 41 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4A 53 43 11 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 44 44 52 53 49 5A 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1F 02 FF 7F 10 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 11 11 11 11 11 11 01 01 00 00 00 00 00 00 31 01 22 22 02 02 00 02 31 01 00 02 00 02 00 02 31 01 00 02 00 22 22 02 31 01 00 02 00 02 00 02 31 01 00 02 00 02 00 02 31 01 00 00 00 00 00 00 31 01 22 02 22 02 02 00 31 01 02 00 02 02 02 00 31 01 22 02 22 02 02 00 31 01 00 02 02 00 02 00 31 01 22 02 02 00 22 02 31 01 00 00 00 00 00 00 31 11 11 11 11 11 11 11 31 30 33 33 33 33 33 33 33

Using your information, I changed byte 6 from 40 to 60 (16K to 24K). I am not sure if byte 9 is the number of 'linked slots' or not, but I changed it from 2 to 3. I wrote these first 0x180 bytes to the beginning of a new file, and padded it to 24K + 128 bytes (0x6080):

51 00 00 00 00 60 00 00 03 00 48 41 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4A 53 43 11 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 44 44 52 53 49 5A 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1F 02 FF 7F 10 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 11 11 11 11 11 11 01 01 00 00 00 00 00 00 31 01 22 22 02 02 00 02 31 01 00 02 00 02 00 02 31 01 00 02 00 22 22 02 31 01 00 02 00 02 00 02 31 01 00 02 00 02 00 02 31 01 00 00 00 00 00 00 31 01 22 02 22 02 02 00 31 01 02 00 02 02 02 00 31 01 22 02 22 02 02 00 31 01 00 02 02 00 02 00 31 01 22 02 02 00 22 02 31 01 00 00 00 00 00 00 31 11 11 11 11 11 11 11 31 30 33 33 33 33 33 33 33

NOTE: Tonyhax International is using the filename 'HAX' instead of 'BESLEM-99999TONYHAX' to allow for more exploits (yes space is that important in some exploitation of games!) So that changes some bytes in the above comparison as well.

And, it works beautifully!
Screenshot from 2023-01-19 23-17-17.png
Screenshot from 2023-01-19 23-19-59.png
I've pushed an update to github with these improvements, which will be in version 1.1.9.
You do not have the required permissions to view the files attached to this post.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » January 21st, 2023, 3:33 pm

I found these videos curiously:
https://www.youtube.com/watch?v=aI6yOw806hA
https://www.youtube.com/watch?v=JTAyRf-7qsg

These videos are using a GameShark v4.11a CD that does allow just booting the CD by pressing the X button on your controller.
This does not work with older GameShark CD versions, which includes the GameShark Lite and original GameShark CDX v3.3. I've tried this previously before developing GSHAX. The older GameShark CD versions force you to open and close the CD drive before it will start booting a game (resetting drive authentication and disc licensing status).

If you do however have a GameShark CD v4.0 or newer this method would allow you to simply start up the Tonyhax International Boot CD like in the video.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » February 13th, 2023, 8:14 am

I'm back at it, focusing on some GSHAX codes. I just created one for my favourite game, Parasite Eve!

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » March 10th, 2023, 10:30 am

Tonyhax International v1.1.9 is out now: https://github.com/alex-free/tonyhax/re ... tional.zip

Changes:

Fixes potential lockups/freezing right before booting.

Fixed the Cool Boarders 4 save game exploit not working correctly (thank you AngelDavil88 for pointing this out)!

The save game file template ‘hack’ I was using has been replaced with a proper equivalent for the 24KB tonyhax.exe maximum file size RAM setup currently in use (thanks Shendo)!

A new GameSharkHAX code for Parasite Eve USA is now available.

GameSharkHAX codes are all now auto-generated in the build step thanks to my new program GSHAX Tool.

Added more info on the GameSharkHAX code method, specifically on which exact GameShark model versions are useful with this boot method (even though all GameShark model versions work regardless of their usefulness).

The documentation is now only in markdown format (the website is only using auto-generated HTML from said markdown via GitHub pages now). The pandoc requirement hence has been removed from the build step.

The build-tool-chain.sh script now automatically compiles MKPSXISO at the end of building the MIPS toolchain for the PSX.

Updated [MKPSXISO] to the latest commit as of 3/6/2023.

Added info to the Boot CD documentation that explains how to use specific GameShark cartridge or GameShark CD versions to start the Tonyhax International Boot CD.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » March 17th, 2023, 4:14 pm

Version 1.2.0 (3/17/2023)

tonyhax-v1.2.0-international - https://github.com/alex-free/tonyhax/re ... tional.zip

Changes:

Fixes lockup/freezing that only occurred in specific games (i.e. Tekken 3) when using the FreePSXBoot exploit boot method. Now however, Before starting any backup or import disc in the loader YOU MUST REMOVE THE FREEPSXBOOT MEMORY CARD to ensure successful booting of your backup or import disc. THIS APPLIES TO BOTH SLOT 1 AND SLOT 2 FREEPSXBOOT CARDS. This enables more games to work through this boot method and simplifies the loader. The loader will tell you to remove the FreePSXBoot memory card as well now.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » March 29th, 2023, 10:16 am

Tonyhax International v1.2.1 is out: https://github.com/alex-free/tonyhax/re ... tional.zip


Changes:


Updated GSHAX Tool to v2.0. All GameSharkHAX codes have been updated to improved versions. Usage has changed for the WipEout and Parasite Eve codes!

Thanks to the new GSHAX Tool v2.0 update, a GameSharkHAX code for Ridge Racer is now available.

The first stage loaders: entry.bin and entry-bb.bin are now included in each release to aid in the development of GameSharkHAX and save game exploits.

Added the missing source code to the GameShark cheat engine that MottZilla wrote to the source tree, as well as instructions on assembling it (available at docs/mottzilla-gameshark-engine.txt). It is not however ‘dynamically generated’ by the build system, yet… The compiled version is still hardcoded as an unsigned char array.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » April 27th, 2023, 12:31 pm

Version 1.2.2 (4/26/2023)

tonyhax-1.2.2-international: https://github.com/alex-free/tonyhax/re ... tional.zip

Changes:

The Tonyhax International loader now does SetMemSize(8), SysInitMemory (0xA000E000, 0x2000), and InitDefInt(3). This makes it much more similar to how the real PSX BIOS boots games, and it fixes all known issues with booting games via the GameShark Code method.

Fixed a race condition that rarely effected booting games via the flashed cheat cart and GameShark Code. The issue was that sometimes the console BIOS would execute CD commmands before starting the ROM too closely to when Tonyhax International would call the first CD INIT on startup. This issue also could happen in GSHAX, when a game was sending CD commands right before the GSHAX exploit would trigger and then starting the Tonyhax International loader. The issue previously manifested as being stuck on the first Initializing CD text forever.

Updated GSHAX Tool to v2.0.1, which auto-calculates the MIPS assembly binary offset during code generation in the build step.

Fixed an issue with the build.sh script due to missing template folders in the gshax directory since the last update.

Improved documentation.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » April 29th, 2023, 2:01 pm

Version 1.2.3 (4/28/2023)

tonyhax-1.2.3-international https://github.com/alex-free/tonyhax/re ... tional.zip

Changes:

Optimized out many unnecessary functions, improving load speed of games slightly.

(Really) fixed an issue with the build.sh script due to missing template folders in the gshax directory since the last update. Git is dumb about not being able to include empty folders so the build.sh script just creates them if they don't exit now.

Added info related to a GameShark Lite save game file.

karehaani
Active PSXDEV User
Active PSXDEV User
Posts: 49
Joined: Jul 25, 2022
PlayStation Model: SCPH3000
Location: japan

Post by karehaani » April 30th, 2023, 2:49 am

Great update!
thank you for your hard work

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 1st, 2023, 2:50 am

Version 1.2.4 (4/30/2023)

tonyhax-1.2.4-international: https://github.com/alex-free/tonyhax/re ... tional.zip

Changes:

Added the ability to boot into the stock Sony BIOS from the Tonyhax International ROM version. This allows you to access the Memory Card Manager/CD Player functionallity of the stock Sony BIOS without removing the Tonyhax International flashed cheat cart from the back of your console. To use this new feature, simply start your console with the CD drive open, and with the Tonyhax International flash cart in the back of your console. Once Tonyhax International starts, press X on a controller when you get to the text stating to insert a disc into the console to continue.

Added info about how the HAX and FF9 save files of the Tonyhax International loader for the GameSharkHAX and Save game exploit can screw up filenames in the stock Sony BIOS (a non-fatal, just annoying issue).

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 1st, 2023, 4:09 am

karehaani wrote: April 30th, 2023, 2:49 am Great update!
thank you for your hard work
Good to hear from you!

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 4th, 2023, 5:04 pm

Version 1.2.5 (5/4/2023)

tonyhax-1.2.5-international: https://github.com/alex-free/tonyhax/re ... tional.zip

Changes:

Added the ability to apply your own GameShark Codes to any game you want to boot! Huge thanks to MottZilla's guidance on controller support as well as the original cheat engine used to power all of this.

The Tonyhax International loader ROM version now only displays the Press X to access the Memory Card Manager/CD Player text when the CD drive is open when the ROM version of the loader starts, for a more clean interactive look.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 8th, 2023, 7:25 am

Version 1.2.6 (5/7/2023) https://github.com/alex-free/tonyhax/re ... tional.zip


Changes:

Fixed the ability to apply your own GameShark Codes to any game you want to boot for consoles that did not have BIOS v3.0. Only consoles with BIOS v3.0 were previously working, this has now been fixed and all PSX/PS2 consoles are now confirmed working correctly.

Expanded the amount of codes able to be applied by the anti-piracy bypass system for future-proofing.

The Tonyhax International loader ROM version now only displays the Press X to access the Memory Card Manager/CD Player text when the CD drive is open when the ROM version of the loader starts for Japanese consoles as well, to match the behavior of the other USA/PAL consoles for consistency.

Updated PSEXE2ROM and MKPSXISO to the latest versions.

Updated the Tonyhax International GameShark Generator program to v1.0.2. Now you can simply drag and drop the txt file of GameShark codes directly onto the thigsgen.exe or thigsgen executable file to generate the raw save file named TONYHAXINTGS which contains the GameShark codes you want to load with Tonyhax International.

Added info about how the Final Fantasy IX save exploit file being present when using the SCPH-1000 memory card manager will lock up the console (so don't use it like that :)).

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 18th, 2023, 1:27 am

Version 1.2.7 (5/17/2023)

tonyhax-international-v1.2.7: https://github.com/alex-free/tonyhax/re ... v1.2.7.zip

Changes:

REWROTE the GameShark functionality to support ALL of the following GameShark code types: 50, 80, 30, D0, E0. This rewrite includes things like a TONYHAXINTGS save file checksum system, a new and improved GameShark cheat code engine, and optimizations to THIGSGEN, now at v2.0.
Fixed an issue with the -rom version that would cause it to display the Press X to boot Sony BIOS text twice.
Added back the PAL/European Boot CD image to releases since it is now useful for GameShark code support.
Added some YouTube video tutorial links (by Jay Time) to the ROM and GameShark Support pages.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 19th, 2023, 3:06 pm

tonyhax-international-v1.2.8 https://github.com/alex-free/tonyhax/re ... v1.2.8.zip

Changes:

Added support for GameShark code types E1 and D1. Tonyhax International now supports applying the following GameShark code types: 50, 80, 30, D0, E0 D1 E1.

Significantly optimized the GameShark cheat engine (now at v1.0.2) with the help of MottZilla.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 25th, 2023, 1:45 pm

Version 1.2.9 (5/24/2023)

tonyhax-international-v1.2.9 : https://github.com/alex-free/tonyhax/re ... v1.2.9.zip

Changes:

Added APv2 bypasses for Tron ni Kobun, NFL GameDay 2001, NFL GameDay 2001 Demo, NFL GameDay 2002, NFL GameDay 2003, NFL GameDay 2004, NFL GameDay 2005, NHL FaceOff 2001 Demo, NHL FaceOff 2001, NCAA Final Four 2001, NCAA Game Breaker 2001, NCAA Game Breaker 2001 Demo, NBA Shootout 2001, NBA Shootout 2001 Demo, NBA Shootout 2002, NBA Shootout 2002 demo, NBA Shootout 2003, NBA Shootout 2004, MLB 2002, MLB 2002 Demo, MLB 2003, MLB 2003 Demo, and MLB 2004.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 27th, 2023, 3:03 pm

Version 1.3.0 (5/27/2023)
tonyhax-international-v1.3.0 https://github.com/alex-free/tonyhax/re ... v1.3.0.zip
Changes:

Added APv2 bypasses for Spyro: Year Of The Dragon USA Rev 0 and USA Rev 1!

Updated the loader ram layout from last usable 24k to last usable 32k to allow for larger executable size. Tonyhax International HAX and FF9 save files now take up 4 slots instead of 3 on a PSX memory card. PLEASE make sure to update your save game exploit files and or gshax codes/files.

alexfree
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 221
Joined: Oct 21, 2021
I am a: Programmer, Gamer
PlayStation Model: SCPH-1000
Location: USA
Contact:

Post by alexfree » May 29th, 2023, 11:54 am

Version 1.3.1 (5/28/2023)
tonyhax-international-v1.3.1 https://github.com/alex-free/tonyhax/re ... v1.3.1.zip
Changes:

Fixed an issue caused by FreePSXBoot's builder program's -fastload option that resulted in failure to read GameShark codes from the memory card on BIOS v4.4-v4.5. This issue has now been resolved by removing that argument and having the same generate command as the original Tonyhax did.

Fixed regressions in GameShark cheat engine due to some previous overly-aggressive optimizations.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests