Closed eadmaster closed 2 years ago
Is it possible: Yes, for a large number of cases but not all. Does it make sense to do it here? No, it doesn't
While most CDI images are of commercial titles that came from GD-ROM's in the first place, the process of going from a GD-ROM to a CD-ROM is not a 1 to 1 conversion that was performed in the same way for every title. Bootable CD's on Dreamcast (and thus CDI images) required scrambled startup executables to run. In the early days of self booting CDI images, it was common to just take the original binaries from the GD-ROM and scramble them when producing a CD. But sometimes games would have protection to prevent them from running on CD's and the games would need to be custom modified to work in that manner. This type of change cannot be automatically reversed. By 2001 in the late part of the Dreamcast's life, self booting CD titles were no longer scrambling the startup executable and instead used custom logic added to the disc bootsector (IP.BIN) to account for the scrambling process entirely in memory - this meant games could be distributed in CDI format without even modifying the startup executable at all. However, this process meant that you no longer had the original version of IP.BIN unmodified, and thus now have one with custom code intended for CD-ROMs that won't work correctly on GD-ROM's. Besides that, any unlicensed games or homebrew would be built against KOS, whose disc access library knows nothing about GD-ROM's. It was only ever coded to work from actual CD's, so any unofficial will not know how to read data from the drive if they are converted to GDI / GD-ROM.
In short:
It is definitely possible to convert most CDI's back into GDI if they originated from a commercial title. But GDIbuilder is for building new high density data tracks for a GDI image - it is not for extraction from existing disc images because there were already tools available to extract CDI images and even GDI images.
There are probably already tools to assist with this process manually, I'm not sure.
I am looking for a simple way to convert a CDI image into GDI. Is it possible to add CDI input support to the cmdline tool?