Well I finally made a working modchip for the saturn.
It has been buggin me for ever and I started the project way back a few months after hacking up a 21pin modchip in another thread and worked off and on it since then.
Took a long time just to understand the protocol for commands and data between the saturn and CD. But I think I have most all of it figured out.
The whole process basically boils down to a few sequences.
When theres a request to seek out to some LBA thats in the security ring you have to disable the commands to the cd drive which in the original mods case was just replacing the parity byte with the wrong value which makes the cd ignore the command.
The authenticate process usually issues 4 seek commands to various parts of the ring and you have to supply it with a same repsonse (status) data that the cd drive would give.
After that it will issue a few read commands to various parts of the ring. And this is the hard part since you have to supply some 'fake' ring data. I tried originally to implement it all in a fpga but I ran into a stumbling block in trying to convert LBA to MSF which requires several divisions and multiplies. So I now have a board with a 8051 (cypress fx2) and FPGA where all the MSF calculations is done on the 8051.
The majority of the mode2 ring data is really not critical. Subcode doesnt matter and much of the payload doesnt matter. Its the MSF that has to be correct when its being sent along with the correct MSF in the status data in the command interface.
I still dont see where there would be any problem in burning a cdr with the ring data. you just need some software that will burn the correct data and TOC. I believe subcode would play a factor in this since the ring has the characteristics of LEADOUT and the status data is generated from this subcode info. Im sure the track number 'AA' which indicates leadout would make a difference. I will try to do some more testing to see what all it really looks for in the status data.
heres some tech info:
http://www.crazynation.org/SEGA/Saturn/cd_tech.htm
and some command log for reference:
http://www.crazynation.org/SEGA/Saturn/files/command_log.txt
project files:
http://www.crazynation.org/SEGA/Saturn/files/MODCHIP.ZIP
other:
http://www.crazynation.org/SEGA/Saturn/files/
I tried before to implement a CD emulator that would just use the PC as the virtual cd and have all the commands and data sent back and forth but it didnt work out to good. I could send the TOC data and respond to seek commands but It never did like the sector data I sent it. Didnt realize till now that the global 8mhz clock is synchronized to the 2mhz clock that is used for sector data. It must drive some state machine that decodes the incoming sector data, and since I was transmitting in bursts from the usb there would be empty spaces with the 8mhz clock running even though I would freeze the cd sector signals state.
What I still dont exactly know is how the commercial saturn modchips are implemented. I think the 'gal' on the board is some sort of FIFO that is pushed bytes from the uc and sends them in the correct serial format. But I dont know how large the fifo would be since the hardest part of all this is quickly calculating the MSF and getting back to filling the fifo and the status data to the command interface. Its quite a lot to keep going and I have most of it implemented in the fpga which takes a lot of resources. and it still takes a good while to do on the 8051 and sometimes the authenticate process will still fail or take a long time. I notice when it does this that it seems to miss properly updating the MSF along with the status data MSF values, and the saturn will keep issuing read commands at a lower LBA to it finally accepts it.
-cheers
It has been buggin me for ever and I started the project way back a few months after hacking up a 21pin modchip in another thread and worked off and on it since then.
Took a long time just to understand the protocol for commands and data between the saturn and CD. But I think I have most all of it figured out.
The whole process basically boils down to a few sequences.
When theres a request to seek out to some LBA thats in the security ring you have to disable the commands to the cd drive which in the original mods case was just replacing the parity byte with the wrong value which makes the cd ignore the command.
The authenticate process usually issues 4 seek commands to various parts of the ring and you have to supply it with a same repsonse (status) data that the cd drive would give.
After that it will issue a few read commands to various parts of the ring. And this is the hard part since you have to supply some 'fake' ring data. I tried originally to implement it all in a fpga but I ran into a stumbling block in trying to convert LBA to MSF which requires several divisions and multiplies. So I now have a board with a 8051 (cypress fx2) and FPGA where all the MSF calculations is done on the 8051.
The majority of the mode2 ring data is really not critical. Subcode doesnt matter and much of the payload doesnt matter. Its the MSF that has to be correct when its being sent along with the correct MSF in the status data in the command interface.
I still dont see where there would be any problem in burning a cdr with the ring data. you just need some software that will burn the correct data and TOC. I believe subcode would play a factor in this since the ring has the characteristics of LEADOUT and the status data is generated from this subcode info. Im sure the track number 'AA' which indicates leadout would make a difference. I will try to do some more testing to see what all it really looks for in the status data.
heres some tech info:
http://www.crazynation.org/SEGA/Saturn/cd_tech.htm
and some command log for reference:
http://www.crazynation.org/SEGA/Saturn/files/command_log.txt
project files:
http://www.crazynation.org/SEGA/Saturn/files/MODCHIP.ZIP
other:
http://www.crazynation.org/SEGA/Saturn/files/
I tried before to implement a CD emulator that would just use the PC as the virtual cd and have all the commands and data sent back and forth but it didnt work out to good. I could send the TOC data and respond to seek commands but It never did like the sector data I sent it. Didnt realize till now that the global 8mhz clock is synchronized to the 2mhz clock that is used for sector data. It must drive some state machine that decodes the incoming sector data, and since I was transmitting in bursts from the usb there would be empty spaces with the 8mhz clock running even though I would freeze the cd sector signals state.
What I still dont exactly know is how the commercial saturn modchips are implemented. I think the 'gal' on the board is some sort of FIFO that is pushed bytes from the uc and sends them in the correct serial format. But I dont know how large the fifo would be since the hardest part of all this is quickly calculating the MSF and getting back to filling the fifo and the status data to the command interface. Its quite a lot to keep going and I have most of it implemented in the fpga which takes a lot of resources. and it still takes a good while to do on the 8051 and sometimes the authenticate process will still fail or take a long time. I notice when it does this that it seems to miss properly updating the MSF along with the status data MSF values, and the saturn will keep issuing read commands at a lower LBA to it finally accepts it.
-cheers