PS1 tonyhax - A Software backup loader exploit for the PS1 (leverages save game exploit)

Looks like those Classic PlayStation Consoles are still making waves in the homebrew scene. We have seen vibrant development on the PS2 with just recent things like OpenTuna and also recent MechaCon Firmware dumped which can potentially bring various possibilities discussed here. However the PS2 is not alone as its daddy the original OG the PlayStation 1 now has a Software Backup Loader Exploit that leverages saves game exploits from Tony Hawk Pro Skater 2 & 3 from developer socram8888 . The developer has titled the project "tonyhax" and will work with both the PAL and NTSC versions of the game

The developer has provided a technical write up and easy to follow explanation as well as a YouTube video we have also attached below. Checkout the latest exploit to hit the PS1.

maxresdefault.jpg

  • tonyhax
    Presenting tonyhax - a softmod backup loader for the Sony PlayStation 1. This is a backup loader that leverages a save game exploit present on Tony Hawk's Pro Skater 2 and 3, in both the European PAL and American NTSC-U versions. For more information, see https://orca.pet/tonyhax.

    Why?
    • The first question that might pop up on your mind regarding this project is "why the F%$# didn't you just install a modchip?".
      • The answer is simple: I didn't want to mod my mint, boxed PSone, but I didn't want to leave it rotting on a shelf either.
    • Also, as an owner of a SCPH-102 console, these are a pain in the ass when it comes to chipping - in addition to the generic SCEx wobble check performed by the CD controller that is easily patchable, the boot menu on these also checks for the region string, which involve installing even more wires and a full sized Arduino Pro Mini or AtMega328 chip to patch the CPU BIOS to play out of region games. Not cool.



  • How does this works?
    • In layman terms, this exploit uses an oversight from the programmers: the game does not check that the skater name in the save file hasn't been tampered and fits in the space the program allocated for it. If we externally change the username to something longer, we can overwrite other vital parts of the memory and run our own code.

    • In more technical terms, this exploit consists of a specially crafted save game with:
      • Highscores replaced with a first-stage payload of 144 bytes.
      • An abnormally long skater name, with the memory address of the first-stage payload inserted.
    stackra.png

    When entering the skater customization menu, the menu is dinamically generated to include the saved skater names in a way like:
    void trim_string(char * buffer, int len) {
    char trimmed[x];

    // Copy to our local buffer
    strcpy(trimmed, buffer);

    // Trim it
    trimmed[len - 4] = '.';
    trimmed[len - 3] = '.';
    trimmed[len - 2] = '.';
    trimmed[len - 1] = 0;

    // Copy back to the original buffer
    strcpy(buffer, trimmed);
    }

    void create_skater_entry(int id) {
    char menutext[x];
    int textlen;

    sprintf(menutext, "Skater %c: %s", 'A' + id, custom_skater_data[id].name);
    while ((textlen = strlen(menutext)) > MAX_LEN) {
    trim_string(menutext, textlen);
    }

    // ...
    }
    Essentially, if a string that's too long to overflow the buffer is specified, the buffer overflows and overwrites part of the stack as we want to, but then it gets hammered with periods.

    However, as trim_string is a a subcall and has a local buffer, if we specify a character name with the right length (165 characters, exactly), the null terminator in the trimmed buffer overlaps the first character of menutext, resulting in a menu entry with length of 0, thus sparing the rest of the stack contents.

    After some more menu-related stuff, the return address is finally pulled from the stack and the code jumps to it. This return address points to the beginning of the high scores menu, whose contents are also loaded with no checks from the memory card, and where we have the first-stage payload.
    highscores.png

    This first stage payload is about 144 bytes, and its sole purpose is to load the secondary program loader (or SPL for short) from an additional save file in the memory card using the PS1 BIOS calls. Once loaded, it jumps straight to it.

    As the console is left in an inconsistent state, the SPL first reinitializes the system kernel (RAM, devices…), by using the very same calls the ROM executes during the booting of the console.
    After that, the GPU is reset. Once the GPU is ready again, the sets up the video to a resolution of 320x240, unpacks the 1bpp font from the BIOS ROM into VRAM, and draws the basic border and program name to know everything is working fine until this point.

    With a fully working screen, it then proceeds to unlocks the CD drive to accept discs missing the SCEx signature, leveraging the CD BIOS unlock commands found by Martin Korth. These unlock commands are a sort of backdoor, and the drive, probably in order to keep them secret, returns an error instead of a success message. The SPL is coded to expect a particular error to be returned, and will actually abort if the drive returns that it succeeded or if it returns another unexpected error code.

    After unlocking it, it waits for the lid to be opened and closed, allowing the user to insert a new CD.
    After that, the CD filesystem is reinitialized. It proceeds to read the SYSTEM.CNF configuration file, reinitializes the kernel with the parameters the game needs, and finally loads and runs the game's main executable.

  • Installation
    • To install this exploit, you'd need a means of copying the save file to a PS1 memory card. Personally, I've used a PS2 with Free McBoot and uLaunchELF.
    • All you have to do is copy the game's crafted save file and the TONYHAX-SPL file into the card. That's it.
    • Once installed, you can freely copy it to other cards using the PS1 and the memory card management menu, and distribute it freely amongst friends.

    Usage

    • Once installed, all you have to do is boot the game like you'd normally do.
    • Once you get to the main menu, it'll load the save game (it should say "Loading TONYHAX"). After it's done, go to the "CREATE SKATER" function and press X. After a couple seconds, tonyhax should boot.

    Save games
    • BASLUS-01066TNHXG01: Tony Hawk's Pro Skater 2 (NTSC-U) (SLUS-01066)
    • BESLES-02908TNHXG01: Tony Hawk's Pro Skater 2 (PAL-E) (SLES-02908)
    • BASLUS-01419TNHXG01: Tony Hawk's Pro Skater 3 (NTSC-U) (SLUS-01419)
    • BESLES-03645TNHXG01: Tony Hawk's Pro Skater 3 (PAL-E) (SLES-03645)
    • TONYHAX: tonyhax's secondary program loader (SPL)

  • Compatibility

    I've personally only attempted this with a PAL SCPH-102 PSone, but according to Martin Korth's documentation this should work with:
    • Every PAL console.
    • Every NTSC-U console except the very early SCPH-1000.
    • NetYaroze consoles.
    However, this will not work with:
    • Japanese NTSC-J consoles (stubbed/bugged CD unlock).
    • NTSC-U SCPH-1000 consoles (BIOS predates the introduction of the CD unlock command).


Download

Source: https://orca.pet/tonyhax/
.Thanks to psx-place member @HWNJ for the heads up!!​
 
Last edited:
save game exploit reminds me of the early vita exploits. I think I was using monkey ball for the vita and some sort of motorcycle racing game for the ps1.
 
reminds me of cubic ninja for the 3ds. when that was the exploitable game, prices shot up from what I remember. I had a copy, but I sold it after it was no longer needed.
 
I got a few copies of THPS2 and THPS3 locally just in case. But I am fairly sure lots of other games will have a similar exploit so it wont be an issue.

More games already do!

I ordered Brunswick 1 because it was cheaper than THPS when I looked a couple days back.

One thing to consider that I did not consider when I bought Brunswick is the amount of blocks/KBs used for the save files. All 3 supported THPS use 1 block/8KB for the exploited save and then 1 block/8KB for the loader. Brunswick 1 uses 2 blocks/16KB for the the exploited save and Brunswick 2 uses 3 blocks/24KB for the exploited save and then the 1 block/8KB for the loader. So the Brunswicks will require 1 or 2 more blocks depending on part 1 or 2. If memory space is important to you one of the 3 supported THPS is probably a better choice. I would have probably splurged the extra 5 bucks for THPS if I knew that at the time. Definitely not a big deal though.

Save games

  • BASLUS-00571: Brunswick Circuit Pro Bowling (NTSC-US) (SLUS-00571)
  • BASLUS-00856: Brunswick Circuit Pro Bowling 2 (NTSC-US) (SLUS-00856)
  • BASLUS-01066TNHXG01: Tony Hawk's Pro Skater 2 (NTSC-US) (SLUS-01066)
  • BASLUS-01419TNHXG01: Tony Hawk's Pro Skater 3 (NTSC-US) (SLUS-01419)
  • BASLUS-01485TNHXG01: Tony Hawk's Pro Skater 4 (NTSC-US) (SLUS-01485)
  • BESLES-01376: Brunswick Circuit Pro Bowling (PAL-E) (SLES-01376)
  • BESLES-02618: Brunswick Circuit Pro Bowling 2 (PAL-E) (SLES-02618)
  • BESLES-02908TNHXG01: Tony Hawk's Pro Skater 2 (PAL-EU) (SLES-02908)
  • BESLES-02909TNHXG01: Tony Hawk's Pro Skater 2 (PAL-FR) (SLES-02909)
  • BESLES-02910TNHXG01: Tony Hawk's Pro Skater 2 (PAL-DE) (SLES-02910)
  • BESLES-03645TNHXG01: Tony Hawk's Pro Skater 3 (PAL-EU) (SLES-03645)
  • BESLES-03646TNHXG01: Tony Hawk's Pro Skater 3 (PAL-FR) (SLES-03646)
  • BESLES-03647TNHXG01: Tony Hawk's Pro Skater 3 (PAL-DE) (SLES-03647)
  • BESLES-03954TNHXG01: Tony Hawk's Pro Skater 4 (PAL-EU) (SLES-03954)
  • BESLES-03955TNHXG01: Tony Hawk's Pro Skater 4 (PAL-DE) (SLES-03955)
  • BESLES-03956TNHXG01: Tony Hawk's Pro Skater 4 (PAL-FR) (SLES-03956)
  • TONYHAX-SPL: tonyhax's secondary program loader (SPL)
 
Last edited:
More games already do!

I ordered Brunswick 1 because it was cheaper than THPS when I looked a couple days back.

One thing to consider that I did not consider when I bought Brunswick is the amount of blocks/KBs used for the save files. All 3 THPS use 1 block/8KB for the exploited save and then 1 block/8KB for the loader. Brunswick 1 uses 2 blocks/16KB for the the exploited save and Brunswick 2 uses 3 blocks/24KB for the exploited save and then the 1 block/8KB for the loader. So the Brunswicks will require 1 or 2 more blocks depending on part 1 or 2. If memory space is important to you one of the 3 THPS are probably a better choice. I would have probably splurged the extra 5 bucks for THPS if I knew that at the time. Definitely not a big deal though.

Save games

  • BASLUS-00571: Brunswick Circuit Pro Bowling (NTSC-US) (SLUS-00571)
  • BASLUS-00856: Brunswick Circuit Pro Bowling 2 (NTSC-US) (SLUS-00856)
  • BASLUS-01066TNHXG01: Tony Hawk's Pro Skater 2 (NTSC-US) (SLUS-01066)
  • BASLUS-01419TNHXG01: Tony Hawk's Pro Skater 3 (NTSC-US) (SLUS-01419)
  • BASLUS-01485TNHXG01: Tony Hawk's Pro Skater 4 (NTSC-US) (SLUS-01485)
  • BESLES-01376: Brunswick Circuit Pro Bowling (PAL-E) (SLES-01376)
  • BESLES-02618: Brunswick Circuit Pro Bowling 2 (PAL-E) (SLES-02618)
  • BESLES-02908TNHXG01: Tony Hawk's Pro Skater 2 (PAL-EU) (SLES-02908)
  • BESLES-02909TNHXG01: Tony Hawk's Pro Skater 2 (PAL-FR) (SLES-02909)
  • BESLES-02910TNHXG01: Tony Hawk's Pro Skater 2 (PAL-DE) (SLES-02910)
  • BESLES-03645TNHXG01: Tony Hawk's Pro Skater 3 (PAL-EU) (SLES-03645)
  • BESLES-03646TNHXG01: Tony Hawk's Pro Skater 3 (PAL-FR) (SLES-03646)
  • BESLES-03647TNHXG01: Tony Hawk's Pro Skater 3 (PAL-DE) (SLES-03647)
  • BESLES-03954TNHXG01: Tony Hawk's Pro Skater 4 (PAL-EU) (SLES-03954)
  • BESLES-03955TNHXG01: Tony Hawk's Pro Skater 4 (PAL-DE) (SLES-03955)
  • BESLES-03956TNHXG01: Tony Hawk's Pro Skater 4 (PAL-FR) (SLES-03956)
  • TONYHAX-SPL: tonyhax's secondary program loader (SPL)
I Have Tony Hawks 4, Nice! I'm going to try this.
 
More new games!

Version v1.2
socram8888 released this 32 minutes ago
Changes since v1.1.2

  • Add new games as entry points:
    • Castrol Honda Superbike Racing (NTSC-U) (SLUS-00882)
    • Castrol Honda Superbike Racing (PAL-E) (SLES-01182)
    • Castrol Honda VTR (PAL-E) (SLES-02942)
    • Cool Boarders 4 (NTSC-U) (SCUS-94559)
    • Cool Boarders 4 (PAL-E) (SCES-02283)
    • Crash Bandicoot 2: Cortex Strikes Back (NTSC-U) (SCUS-94154)
    • Crash Bandicoot 2: Cortex Strikes Back (PAL-E) (SCES-00967)
    • Crash Bandicoot 3: Warped (NTSC-U) (SCUS-94244)
    • Crash Bandicoot 3: Warped (PAL-E) (SCES-01420)
    • Sports Superbike (PAL-E) (SLES-03057)
    • Sports Superbike 2 (PAL-E) (SLES-03827)
    • XS Moto (NTSC-U) (SLUS-01506)
    • XS Moto (PAL-E) (SLES-04095)
  • Added support for European NetYaroze consoles.

GameRegionCodeMCS fileRaw file
tonyhax SPL required--tonyhax.mcsBESLEM-99999TONYHAX
Brunswick Circuit Pro BowlingNTSC-USLUS-00571brunswick1-us.mcsBASLUS-00571
Brunswick Circuit Pro BowlingPAL-ESLES-01376brunswick1-eu.mcsBESLES-01376
Brunswick Circuit Pro Bowling 2NTSC-USLUS-00856brunswick2-us.mcsBASLUS-00856
Brunswick Circuit Pro Bowling 2PAL-ESLES-02618brunswick2-eu.mcsBESLES-02618
Castrol Honda Superbike RacingNTSC-USLUS-00882castrolsb-us.mcsBASLUS-00882CHSv1
Castrol Honda Superbike RacingPAL-ESLES-01182castrolsb-eu.mcsBESLES_01182CHSv1
Castrol Honda VTRPAL-ESLES-02942castrolvtr-eu.mcsBESLES-02942CHSVTRv1
Cool Boarders 4NTSC-USCUS-94559coolbrd4-us.mcsBASCUS-9455916
Cool Boarders 4PAL-ESCES-02283coolbrd4-eu.mcsBESCES-0228316
Crash Bandicoot 2: Cortex Strikes BackNTSC-USCUS-94154crash2-us.mcsBASCUS-9415400047975
Crash Bandicoot 2: Cortex Strikes BackPAL-ESCES-00967crash2-eu.mcsBESCES-0096700765150
Crash Bandicoot 3: WarpedNTSC-USCUS-94244crash3-us.mcsBASCUS-9424400000000
Crash Bandicoot 3: WarpedPAL-ESCES-01420crash3-eu.mcsBESCES-0142000000000
Sports SuperbikePAL-ESLES-03057superbike1-eu.mcsBESLES-03057SSBv1
Sports Superbike 2PAL-ESLES-03827superbike2-eu.mcsBESLES-03827SSII
Tony Hawk's Pro Skater 2NTSC-USLUS-01066thps2-us.mcsBASLUS-01066TNHXG01
Tony Hawk's Pro Skater 2PAL-ESLES-02908thps2-eu.mcsBESLES-02908TNHXG01
Tony Hawk's Pro Skater 2PAL-DESLES-02910thps2-de.mcsBESLES-02910TNHXG01
Tony Hawk's Pro Skater 2PAL-FRSLES-02909thps2-fr.mcsBESLES-02909TNHXG01
Tony Hawk's Pro Skater 3NTSC-USLUS-01419thps3-us.mcsBASLUS-01419TNHXG01
Tony Hawk's Pro Skater 3PAL-ESLES-03645thps3-eu.mcsBESLES-03645TNHXG01
Tony Hawk's Pro Skater 3PAL-DESLES-03647thps3-de.mcsBESLES-03647TNHXG01
Tony Hawk's Pro Skater 3PAL-FRSLES-03646thps3-fr.mcsBESLES-03646TNHXG01
Tony Hawk's Pro Skater 4NTSC-USLUS-01485thps4-us.mcsBASLUS-01485TNHXG01
Tony Hawk's Pro Skater 4PAL-ESLES-03954thps4-eu.mcsBESLES-03954TNHXG01
Tony Hawk's Pro Skater 4PAL-DESLES-03955thps4-de.mcsBESLES-03955TNHXG01
Tony Hawk's Pro Skater 4PAL-FRSLES-03956thps4-fr.mcsBESLES-03956TNHXG01
XS MotoNTSC-USLUS-01506xsmoto-us.mcsBASLUS-01506XSMOTOv1
XS MotoPAL-ESLES-04095xsmoto-eu.mcsBESLES-04095XSMOTO
 
I appreciate the work gone into this but in the end are we not talking about a disc swap like from back in the day - which is hard on drives and leads to failures?
 
No! It starts some custom code which stops the disc and unlocks the drive.

You then hit the Open-Button and exchange the disc like in Multi-disc-games and the backup works without blocking any sensors.

Also... The swap is NOT "hard on drives" on a PS1, if the disc had been stopped before swapping!
 
I've never had a "drive" fail from swapping while disc is spinning, which this isn't, and I did thousands of swaps on my original ps1. The only part I've had fail from swapping live discs is the spindle hub, and I've had all of them fail, but they are $4 and easy to replace.
 
Yes, swapping a spinning disc would have been less wear on the drive...I'd always thought stopping the disc by opening the door was bad for the drive and I'd always shutdown to let the disc spin down before opening or else I had the door sensor disabled etc, but I see now for the PSone that they recommend opening the door to stop the disc for changing games discs etc so seems I was wrong all these years.
 
So now instead of PSXLauncher.ELF (which only works with v.9/SCPH 5000x or higher),
we also have an alternative for every PAL and NTSC-U PlayStation 2 with model number SCPH-39xxx or lower:
 
  • Like
Reactions: TnA
I don't understand why this works on PS2 (I don't have in mind save exploit but disc "swapping"). Pressing eject is also a signal for mechacon that disc verification must be perform again. While guy from this video just putting there CD-R and poof, booting.
 
Back
Top