PS1 Freeing The Launch PSX Consoles In 2022 - The Story Of The SetSessionSuperUltraCommandSmash

alexfree

Developer
Foreword: I've posted about this in other forums, but just realized no post exists here (my favorite forum period)! This is the newest exploit type to date for the PS1. Me and MottZilla were an unstoppable force back then. The only programs to implement this are stealthrom by MottZilla and Tonyhax International by myself. Unirom still remains closed source (the whole reason Tonyhax International exists, even MottZilla was working on a PS1 backup loader alternative at this time until I came out with Tonyhax International).

If you want to support all SCPH-1000 consoles and early SCPH-3000 consoles you need to do this. As a plus, if you do implement this in your soft-mod and those consoles don't have a mod-chip then standard APv1/APv2 protections are useless! This is due to a backdoor that no one back in the day thought would ever trigger. The only protections that are useful on these consoles are EDC and LibCrypt. Tonyhax International applies bypasses regardless incase these consoles are chipped, but I still find that insane. Even Spyro YOTD USA btw...

Time Frame: 2022

MottZilla and I wanted to make a backup/import loader program that would work on Japanese PS1 consoles. The original idea was to buy a Japanese console, implement a backup loader that does an 'artificial swap trick', and have it then send the SetSession(1) command to update the TOC from the real NTSC-J PSX game disc to the backup or import disc. Updating the TOC is important because some games check it as an additional anti-piracy measure. More importantly however, games which contain CD audio need to seek to the audio tracks based on information derived from the TOC. So if you don't update the TOC, you may get game crashes related to 'missing' CD audio track information, silence or static during CD audio playback in-game, or even trip an additional anti-piracy check if the game has that.

At the time we were working on this, UNIROM was the only program which provided this functionality already using the SetSession command for Japanese consoles. I really however wanted to do this myself since UNIROM is not open source and it would be a fun challenge.

Since I really like launch consoles, I picked up a SCPH-1000 console to develop this idea on. MottZilla had developed a 'SwapBoot' program from scratch which implemented the idea, and he tested it on his console and it worked to update the TOC with the SetSession command and an 'artifical swap trick' enabling playing import/backup discs.

I went to test it on my newly acquired SCPH-1000, and... it didn't update the TOC. This was not reproducible at all on MottZilla's end for him with his console, it worked fine. MottZilla and I emailed quite a bit back and forth discussing this. Eventually it got to the point that MottZilla wrote an entire 'CDROM Debugger' program from scratch. It has a menu that you can use to send specific CDROM commands. Some of the options in the menu also send sequences of commands, and you can attempt to boot a backup/import disc whenever you want after sending any CD commands you want to test out.
hash-6a3f297f411b3572_2023-01-18_16-08-02-png.367748


With all of this, I still could not update the TOC with the SetSession command on my SCPH-1000. So I tried my SCPH-1001 (which is also a really early launch unit). Same problem! How did MottZilla have it work for his console? None of my consoles were working. I tried UNIROM and the function which sends SetSession after an 'artificial swap trick' and same thing, TOC would not update.

At this point, in sheer frustration I began spamming the SetSession(1) command rapidly in the menu maybe 10 times while doing a test in the CDROM Debugger that MottZilla wrote on my SCPH-1001. Then I booted the disc, and... it worked! CD audio playback, on my SCPH-1001. So what was going on?

I tried another game disc with CD audio on the SCPH-1001, the game Dead Or Alive with ~30 audio tracks. I tried the same thing, mashing the SetSession command about 10 times, and then booting the game. It didn't work. I tried the same game disc with CD audio that did work on the SCPH-1001 on the SCPH-1000. It didn't work either.

So why did the first game disc work at all on the SCPH-1001? The only real difference is the game disc that worked was that it has only one audio track.

Eventually It was figured out that the more audio tracks in the TOC, the more times you need to spam SetSession(1) to update the TOC in this way. Older CDROM Controller Firmware versions also require more SetSession commands in general to update the TOC (which is why the SCPH-1000 didn't work with just 10 SetSession commands). But another issue was hit with this. Sometimes, not every audio track would play in the game. What was the problem now?

So there appears to be a threshold amount of SetSession(1) spamming that needs to be done to update the TOC with this method. You need to send a certain amount of SetSession commands (dependent on CDROM firmware version) to even get a TOC to begin updating. And when it begins updating, if there are more then 1 CD audio tracks there is a really good chance that not every audio track entry will be updated! To figure this out, MottZilla updated the CDROM Debugger to display the entire TOC contents in the main menu, so that SetSession(1) could be sent any number of times and the TOC contents could be looked at as well before booting a game disc.

It turns out, with many more subsequent SetSession(1) commands after hitting the update TOC threshold (highly dependent on the CDROM firmware version), you can eventually update the entire TOC and all audio track info.

MottZilla wrote the original SetSessionSuperUltraCommandSmashv1 code. This is how it works:
1) Send a specific amount of SetSession(1) commands back to back in order to break the update TOC threshold. This is a best guess, which sucks reliability wise. The VC0A firmware requires the most spammed command in general to break the threshold. The VC0B takes a bit less, and the VC1A barely needs any to start updating the TOC.
2) Once past the threshold, the number of tracks in the TOC is read. The TOC should be at least partially updated at this point, which still returns the correct number of tracks even though much of the track info is still missing at this point. The function uses this number and checks every TOC entry for 00:00 tracks (which are tracks that have info missing and not updated). Until it finds none of these 00:00 tracks it keeps spamming sequences of SetSession(1) commands back to back. It then does this all over again, checking for 00:00 tracks. Once there are no 00:00 tracks the function exits and the TOC is fully updated.

This worked, but there were 2 problems. It was very slow, and if the threshold was not passed it failed to update the TOC as there is no reliable way to figure out if the TOC started updating or not (at least that we found at the time). And even if you pass the threshold, you need to do quite a bit more spamming after that to complete the TOC update. For example, games with many audio tracks (~50 for Tomb Raider) could take 5 minutes to complete on the SCPH-1001. But on the SCPH-1000 the same game could take 10 minutes. Tomb Raider is an extreme example however, games with ~30 audio tracks took only about 5 minutes on the SCPH-1000.

The SetSession(1) command sets the session number to 1 and updates the TOC. It is really designed for multi-session discs (i.e. change to session 2 on the disc with SetSession(2)), but the TOC updating side effect is the only way to actually update the TOC without re-authenticating the disc and CDROM drive (which stops any swap trick from working).

The VC0A, VC0B, and VC1A CDROM controller firmware versions found in the earliest consoles (SCPH-1000s, early SCPH-3000s, early SCPH-1001s, and early SCPH-1002s) have a bug however that makes the TOC not update with SetSession(1). The bug is that the CDROM controller thinks the TOC has already been updated by the SetSession(1) command so it does not change it (@nocash confirmed this in an email). This bug is fixed in VC1B and higher, the versions found in all later consoles. This is why MottZilla had success and I had confusing failure with the same exact SwapBoot loader using SetSession(1) to update the TOC.

So I ported the SetSessionSuperUltraCommandSmash code from the CDROM Debugger (written with the PSYQ SDK) to Tonyhax, and made Tonyhax International. Which still to this day is the only soft-mod that can properly update the TOC in backup/import discs on SCPH-1000 and early SCPH-3000 consoles (which have either VC0A or VC0B firmware). Although the early SCPH-1001 and early SCPH-1002 consoles also have the bug in the VC1A firmware, they can already be unlocked which negates the need for an artificial swap trick and the SetSession(1) command.

MottZilla had long theorized that somehow involving the SetSession(2) command could trigger the TOC being updated. Nocash also had mentioned in an email before that if you could read the TOC on Session 2 of the disc instead it would work since the bug only applies to the first session. This would however require converting the disc image to a multi-session one, not ideal and I never figured out how to do it.

When there is not an actual Session 2 on the disc and you send the SetSession(2) command 3 different interrupts occur instead of the 2 that normally do with SetSession(1) (which always exists). Instead of INT3->INT2 for SetSession(1), SetSession(2) returns INT3->INT5->INT5, and then the disc stops and the CDROM drive becomes unresponsive due to a seek error because of the non-existent Session 2 that is not actually on the disc (PSX discs are only containing one session).

What I eventually figured out by testing MottZilla's 'send SetSession(2) then SetSession(1)' idea (by mistake, again) was that you can instead do this:
- SetSession(2)
- Wait for INT3.
- Wait for INT5.
- Immediately send SetSession(1), you will beat the next INT5.
- Wait for INT3.
- Wait for INT2.

What happens I think, is that the CDROM drive is told to go to Session 2. It doesn't find Session 2, but before it can make the CDROM drive unresponsive you can tell the CDROM drive to go to Session 1. Session 1 does exist, the CDROM drive goes to it, it notices you are coming from Session 2 and it knows to update the TOC (using a different non-bugged code path) since the session 'changed'.

This works. It takes about 30 seconds, but on every VC0A, VC0B, and VC1A CDROM firmware that has the SetSession(1) bug you can use this instead and guarantee an updated TOC without de authenticating the disc. Much better then 10 minutes.

This new version of the SetSessionSuperUltraCommandSmash is dubbed v2, and the older version v1. It was put into Tonyhax International a long time ago, providing reliability and fast booting for stock launch Japanese consoles at long last.

Nocash has also updated his documentation explaining this bug as well.

This wouldn't have been possible without MottZilla and Nocash. But 28 years later some random internet people finally fixed Sony's bug.

The bug probably wasn't known about for awhile by Sony for a few reasons. No one was using multi-session discs, and it was probably even rarer to use the SetSession(1) command in this way. There really isn't a reason to do this officially, hence the bug that slipped through.
 
Last edited:
About the name. MottZilla came up with it as a joke because we were sending the CDROM command 'SetSession' soo many times to 'break' into the TOC updating functionality in v1. I really like an album called 'SuperUltra', and it just stuck.

I've been trying to get this into Unirom for years, but I don't think it'll happen until the open sourcing is complete. They've been working on it for years, and the author even mentioned that if I had asked before releasing Tonyhax International they would've given me the source. But:
1) Still not open source to this day.
2) I would be an even worse C programmer if I didn't have all this experience from developing Tonyhax International. I kinda doubt some nobody at the time would get access too :)
3) I really think Tonyhax International is just too ahead of everything. Like I often wanted to develop my own soft-mod for the PS1 after Tonyhax International was released but it just doesn't make sense anymore. 1st mover advantage...

If anyone wants I'll implement this in your soft-mod! It's a shame it's so underground knowledge (hence this post, idk it's hard to promote certain things believe it or not).
 
Great write up. I read it with pleasure and was quite surprise of outcome.

While officially no one ever used multi session disc, on scene it was done before by Loser (for homebrew of course, not to bypass stuff). He written Multisession Disc Loader. For unknown to me reason, it stressing drive.
 
Great write up. I read it with pleasure and was quite surprise of outcome.

While officially no one ever used multi session disc, on scene it was done before by Loser (for homebrew of course, not to bypass stuff). He written Multisession Disc Loader. For unknown to me reason, it stressing drive.

We were very surprised too! Just trying random things. It was so crazy when it first worked because we didn't even know if a real soft-mod that updated the TOC was even possible on those early Japanese models because all you can do is fight with the CDROM controller. It seems so simple now, but so many things has to fall into place to even figure out what to do.

Interesting that you bring this up. From: https://www.psxdev.net/forum/viewtopic.php?t=1014

In short it lets u write to the same cdr many times (by way of a multisession
cd) and then be able to select and run the exe files in all sessions.
The psx does not support multisession cds and so limited multisession support
is emulated in software by this program.

What I think he is saying is that somehow the software is 'emulating multi-session' by forcing it to read data from i.e. the second session while still on the first (ignoring end of session/gap/etc. and jumping past it on seeks). I'm not sure if what he says is true about the PSX not supporting multi-session CDs natively i.e. with the actual SetSession command. It is very possible it wasn't known about or documented yet (IIRC Rama found it in 2017, the standard single SetSession(1) that works for all later Japanese consoles with the VC1B CDROM firmware. Unsure if it was ever tested on the launch consoles and known not to work for them at the time).

I am curious if a 'true' multi-session loader is possible. I could see how the loser method would stress the drive if I understand what's going on here correctly. A true multi-session loader using the hardware SetSession commands wouldn't tho if all the stars could align with it. There's a ton of hoops to jump through with it but last time I read no $ psx docs it seems possible.
 
Last edited:
Yep, exactly this application I have in mind.
He don't know, I'm pretty sure. It is uncharted land.

Does debugger apps was released or stays in private?
 
Yep, exactly this application I have in mind.
He don't know, I'm pretty sure. It is uncharted land.

Does debugger apps was released or stays in private?

Attached is the last version MottZilla did. There's a second page of options (forget how to get to it) and of course the coolest thing is the TOC reader:

:
Screen Shot 2025-03-13 at 4.59.25 PM.png


All the documentation is scattered in random emails, but it could be interesting to play with.

MottZIlla Quote from an old email:
Oh I forgot to mention, I changed the SetSession 16X that you wanted instead of changing it to do 16 instead of 3, it uses the track number like the Rapid SetSession so you can choose however many you want with that option now. So use R2 to get your "playtrack" to 16 and then when you use the option it'll do 16 SetSession/GetID back to back before doing any TOC reading stuff.
Ofcourse SetSession 2 is possible, it's just a minor change to send that command. But I have not yet found any good information on how you could actually take a game iso and burn it multi-session and then burn what NoCash was talking about as a 2nd session. But if you find info on how to do it, I can certainly add the command.
With this build see if Dead or Alive takes less than 4 and a half minutes to populate.

MottZilla:
Ok, the Verify TOC function now returns False if the track count is less than 2. Meaning if you executed the command on a single track disc it'll loop forever. However Triangle is still a Cancel/break option if it were to get stuck.
Try it out, if it works perfect, see if you can reduce the number of repeats from 16 to less and see what range is reliable. =)

On Wed, Apr 20, 2022 at 12:12 AM mottzilla <REDACTED> wrote:
Yeah, give me a little bit and I'll add that.

On Wed, Apr 20, 2022 at 12:07 AM Alex Free <REDACTED> wrote:
I didn't time it since I had to repeat the option again. Can you check for if the total track number is less then 2 in the verify TOC function, and if it is, to not break the loop even if there are no 00:00 tracks so I can properly time it and see if this is fixed and perfect?


Sent: Wednesday, April 20, 2022 at 12:54 AM
From: "mottzilla" <REDACTED>
To: "Alex Free" <REDACTED>
Subject: Re: MCTool issues with PS1 v2.0 (5/7/95) bios
Awesome! How long did it take to complete the process?
On Tue, Apr 19, 2022 at 11:40 PM Alex Free <REDACTED> wrote:
Nice full TOC of Tomb Raider on the 1000 :)
One thing I noticed. I set the track number to 16 for 16 repeats per loop. I ran the option and it completed. It displayed the total track number as 1 on the screen. I check the TOC and it doesn't have an audio tracks. I assume the check_toc function got the total track number as 1, then checked for 00:00 tracks, and then completed the loop. If we check to make sure the track number is higher then 1, then I think this will work perfectly as I simply ran the option again and got a full Tomb Raider TOC with all tracks.​
Also I like this one:

On Tue, Apr 19, 2022 at 2:51 AM Alex Free <REDACTED> wrote:
WE DID IT! That function takes 4 minutes and 30 seconds to complete but I have a full TOC for Dead Or Alive. Will test some other games later but looks solid :)
Congrats on probably one of the earliest USA Playstations ever made. Welcome to the launch console club.


Sent: Tuesday, April 19, 2022 at 3:33 AM
From: "mottzilla" <REDACTED>
To: "Alex Free" <REDACTED>
Subject: Re: MCTool issues with PS1 v2.0 (5/7/95) bios
The new option does what your theory wants. Multiple SetSession & GetIDs in a row (16) before it tries to GetTD (read TOC) and Verify that all tracks have valid time codes and retrying SetSession if it doesn't.
You could be on the right track, we are dealing with weird buggy behavior so no idea is too crazy. =)​
 

Attachments

Last edited:
Thank you very much. ^^

Your welcome! After that debugger version, it was further developed in Tonyhax International. v1.0.6 was the last version before SetSessionSuperUltraCommandSmashv2 was discovered. Here's the final code for SetSessionSuperUltraCommandSmash v1:

1) Set Initial number of SetSession command sequences to break the TOC depending on CDROM firmware version (128 for VC0A! 64 for VC0B and VC1A) - https://github.com/alex-free/tonyha...cd20207d588a08c731d49/loader/secondary.c#L582

2) void SetSessionSuperUltraCommandSmash() - https://github.com/alex-free/tonyha...cd20207d588a08c731d49/loader/secondary.c#L224

3) void get_toc_data() - https://github.com/alex-free/tonyha...cd20207d588a08c731d49/loader/secondary.c#L165

4) bool is_toc_complete() - https://github.com/alex-free/tonyha...cd20207d588a08c731d49/loader/secondary.c#L207

And here is the elegance of SetSessionSuperUltraCommandSmashv2 in it's entirety for comparison:

Code:
            debug_write("Sending SetSessionSuperUltraCommandSmash v2, please wait"); // DuckStation can get stuck here if you swap the disc and don't wait a few seconds (DuckStation auto starts the motor on disc swap which is actually super annoying since if this executes while it is doing the emulated motor on it will lock up, and it doesn't even need to work like that since real hardware doesn't and game code always starts up a swap disc for i.e. multi-disc games). DuckStation also always emulates a VC1A which triggers this code path with any Japanese BIOS.
            
            int8_t session = CD_SET_SESSION_2;
            cd_command(CD_CMD_SET_SESSION, (unsigned char *)&session, 1); cd_wait_int(); cd_wait_int(); // There is a 3rd response we are ignoring by sending SetSession 1 next ASAP after SetSession 2.
            
            session = 1;
            cd_command(CD_CMD_SET_SESSION, (unsigned char *)&session, 1); cd_wait_int(); cd_wait_int();
 
Back
Top