I think most saturn users love Saturn Region Patcher from @Madroms.
But recently I used CDI image more often becaused I got the Rhea ODE.It's a bit inconvenient to patch the ISO or BIN first then reconvert to CDI if one day you want to switch the region of the converted image.So I decided to make a cdi patcher myself.
After reversed the cdi format for several days of spare time.I found it's a great container format especially for Saturn.And technically it's RAW image with all gap stored in either 2448 bytes per sector form if you checked the option "R-W(CD+G)" in advanced page of DiscJuggler.So things turn to be a bit easier.
The whole progress can be described below:
1.Determine if the image is 2448 bytes per secter CDI image by checking the CDI header.(CDI can be stay in other sector size format which I'm too lazy to support it right now.And the CDI header is stored in the end of cdi file.)
2.Patch the region string in 1st logical sector.(Skip first 150 sectors as CDI file format defines it.)
3.Patch the area init string in 2nd logical sector.
4.Fix the EDC and ECC code for the modified 1st and 2nd sectors.
So please check the attachment for the program(win32 platform only).
And source code can be get from:
https://github.com/SONIC3D/SaturnCDI
Sorry the code are very ugly.I initially plan to write a full CDI parse class.But as I'm really really busy in real life.I dropped this idea in 30 minutes after I started coding this tool.I just want to make it work ASAP.So the code becomes messy.But as it's really simple.It won't be that hard to understand.And I just have not much time to polish it I think.Got 2 trip plans in this week.Any problem,you can left message here and I will try to fix critical bugs when I see it reported here but may not provide feature extending or improvements.As I said it's just a simple region patcher for cdi image user.
=============
Here is the usage tutorial:
-Usage:
SSCdiRP.exe <region string> <cdi image filename>
SSCdiRP.exe JUE test.cdi
-Image format limitation:
CDI image file should be made with the option "R-W(CD+G)" checked in Advanced tab of DiscJuggler.
Or technically says,the image should be 2448 bytes per sector.
-Region string:
Region string is used to represent the regions you want to patch your exist
saturn image to.
It can be any combination of characters in "JTUBKAEL" in any order.
-J:Japan
-T:Asia NTSC
-U:USA
-B:Central/South American NTSC
-K:Korea
-A:Asia PAL
-E:Europe PAL
-L:Central/South American PAL
It's case sensitive and the order represent the priority in patching.
Using JUE means you want to patch the image with Japan support in top
priority and then USA and EUR support as the lowest priority.
The max count of region that can be applied to the image depends on the
original region support count.That means if the unpatched disc contains only
1 region support.Then even more than 1 region supplied in your command line
arguments.Only the first 1 will be accepted.
If the region count provided in arguments is less than the original region
count.Then region code in original region string will fill the rest place as
much as possible.
But recently I used CDI image more often becaused I got the Rhea ODE.It's a bit inconvenient to patch the ISO or BIN first then reconvert to CDI if one day you want to switch the region of the converted image.So I decided to make a cdi patcher myself.
After reversed the cdi format for several days of spare time.I found it's a great container format especially for Saturn.And technically it's RAW image with all gap stored in either 2448 bytes per sector form if you checked the option "R-W(CD+G)" in advanced page of DiscJuggler.So things turn to be a bit easier.
The whole progress can be described below:
1.Determine if the image is 2448 bytes per secter CDI image by checking the CDI header.(CDI can be stay in other sector size format which I'm too lazy to support it right now.And the CDI header is stored in the end of cdi file.)
2.Patch the region string in 1st logical sector.(Skip first 150 sectors as CDI file format defines it.)
3.Patch the area init string in 2nd logical sector.
4.Fix the EDC and ECC code for the modified 1st and 2nd sectors.
So please check the attachment for the program(win32 platform only).
And source code can be get from:
https://github.com/SONIC3D/SaturnCDI
Sorry the code are very ugly.I initially plan to write a full CDI parse class.But as I'm really really busy in real life.I dropped this idea in 30 minutes after I started coding this tool.I just want to make it work ASAP.So the code becomes messy.But as it's really simple.It won't be that hard to understand.And I just have not much time to polish it I think.Got 2 trip plans in this week.Any problem,you can left message here and I will try to fix critical bugs when I see it reported here but may not provide feature extending or improvements.As I said it's just a simple region patcher for cdi image user.
=============
Here is the usage tutorial:
-Usage:
SSCdiRP.exe <region string> <cdi image filename>
SSCdiRP.exe JUE test.cdi
-Image format limitation:
CDI image file should be made with the option "R-W(CD+G)" checked in Advanced tab of DiscJuggler.
Or technically says,the image should be 2448 bytes per sector.
-Region string:
Region string is used to represent the regions you want to patch your exist
saturn image to.
It can be any combination of characters in "JTUBKAEL" in any order.
-J:Japan
-T:Asia NTSC
-U:USA
-B:Central/South American NTSC
-K:Korea
-A:Asia PAL
-E:Europe PAL
-L:Central/South American PAL
It's case sensitive and the order represent the priority in patching.
Using JUE means you want to patch the image with Japan support in top
priority and then USA and EUR support as the lowest priority.
The max count of region that can be applied to the image depends on the
original region support count.That means if the unpatched disc contains only
1 region support.Then even more than 1 region supplied in your command line
arguments.Only the first 1 will be accepted.
If the region count provided in arguments is less than the original region
count.Then region code in original region string will fill the rest place as
much as possible.