Romhacking => Newcomer's Board => Topic started by: SpiralDrift on February 21, 2021, 09:47:43 pm

Title: How to properly rebuild Sega CD disc images?
Post by: SpiralDrift on February 21, 2021, 09:47:43 pm
1. I extracted some files from Track 01.bin (Road Rash redump image) and edited them. These were proper edits as detailed in the long version below.
2. Using UltraISO, I overwrote the original files in the disc image and created a new bin/cue via "Save as".
3. The newly created bin/cue doesn't seem to work in any emulators.

How do I correctly save the new files to the disc image? Is overwriting the relevant bytes at the original positions the only way, or can it be done with some other disc image program?

I'll go into detail in case anyone else tries to do the same with this particular game and could use the info. Basically, I'm trying to replace the licensed music in Road Rash with the sequenced music from the PS1, 3DO and PC versions.

Half of the audio tracks are stored on the data track with the extensions .22K. These are signed/magnitude 8-bit PCM, which can be converted to WAV with SCDTools. These files play on the menus but not in-game. The music that plays during races seems to be stored in pieces in the .ALV files (but this isn't relevant to my question).

I've converted the music I want to the required format using SCDTools. I CAN insert them using CDMage, right-clicking a file and clicking "Import" to insert the new file over the old one. It gives the option to pad the remaining bytes with zeros. The resulting image works in emulators with the new music but with long pauses after each song due to the added padding.

So, is this the only way to insert edited files, or is there a way to rebuild the data track using just the files? Any help or information will be greatly appreciated.
Title: Re: How to properly rebuild Sega CD disc images?
Post by: KingMike on March 02, 2021, 12:33:56 pm
I don't know technical details but one thing I thought of right away is: EA was known to checksum-protect their Genesis games (aka "the Master Codes"), did they do that with Sega CD too?
Title: Re: How to properly rebuild Sega CD disc images?
Post by: Tony H on March 02, 2021, 06:01:31 pm
That is possible, but I recently made a bunch of Sega CD editors that patch cheat codes into the ISO/bin file, and none of them needed a master code.  I'm not sure, but my guess is that it would take too long to do a checksum check on a file that big.
Title: Re: How to properly rebuild Sega CD disc images?
Post by: SpiralDrift on March 03, 2021, 02:28:55 pm
I've done binary injects of the new songs and didn't have any trouble booting the disc image afterward. The new songs all worked as well (the menu songs at least).

The problem is that binary injects aren't optimal since you can't go past the original file sizes and going under poses problems of its own. So the ability to rebuild the data track from the extracted files would be super useful. Otherwise, if the locations are hard-coded like pointers or something, that would be useful to know as well. It's just been hard finding any info on this stuff.