CyberWarriorX
Established Member
I guess I was rather curious as to how the cd block functioned in more depth, so I decided to put my disassembly knowledge to the test and used sega's CDC library as a basis for writing my own library. See attached file.
As you can see it's basically the recreation of the source that sega decided not to release in any form. Hopefully this will help out anyone trying to understand how the cd block works.
I also spent some time going through the bios and noticed there's actually 3 cd block commands that aren't used anywhere else aside from the bios. They are: 0xE0, 0xE1, and 0xE2. When the saturn is turned on, and validates the ip of the said game, it calls 0xE0 and 0xE1 commands before it reads in the first program. Ironically enough, psy-q's "cd block unlocking" function is nothing more than a couple of bios calls that end up calling those two commands(and from the looks of it, potentially 0xE2 as well under the right conditions). Anyways, I tried my best to implement those commands as well(they're under cdc_unk.c).
Aside from CDC_CdInit and CDC_TgetToc, I haven't tested out every single function to verify that they work 100% correctly so please keep that in mind.
Cyber Warrior X
As you can see it's basically the recreation of the source that sega decided not to release in any form. Hopefully this will help out anyone trying to understand how the cd block works.
I also spent some time going through the bios and noticed there's actually 3 cd block commands that aren't used anywhere else aside from the bios. They are: 0xE0, 0xE1, and 0xE2. When the saturn is turned on, and validates the ip of the said game, it calls 0xE0 and 0xE1 commands before it reads in the first program. Ironically enough, psy-q's "cd block unlocking" function is nothing more than a couple of bios calls that end up calling those two commands(and from the looks of it, potentially 0xE2 as well under the right conditions). Anyways, I tried my best to implement those commands as well(they're under cdc_unk.c).
Aside from CDC_CdInit and CDC_TgetToc, I haven't tested out every single function to verify that they work 100% correctly so please keep that in mind.
Cyber Warrior X