I have hinted at my SCDTools before in previous posts and even released a few scripts individually. The SCDTools is a combination of PERL scripts along with some shell scripts. Some of the most useful are creating a Sega CD data track, converting images to Sega VDP formats, converting Sega VDP formats to images, converting wave to PCM, and decoding/encoding Sega CD Cinepak. All the scripts I have made for Sega CD development are located at: http://sourceforge.net/p/scdtools/ If you run each script you will get a full description of the script, but here is a (very) quick description of each script: Code (Text): scd68kdcleanup Kind of cleans up output from 68kd (68k disassembler) scdasm Wrapper for your favorite assembler and favorite options scdasmall Run asmx, asm68k, and SNASM68K and verify they have the same output scdchecksum A specific tool to make a 16 bit checksum for all but first two bytes and put the 16 bit checksum at the first two bytes of the file. Used for a specific homebrew game. scdcinepakencode Encode a cinepak file scdcinepakencodeframe Encode the image data for a cinepak frame scdget Retreive the iso for the Sega CD in your CD-ROM Uses dd program scdhex Does a search and replace using hex strings (I used for Sonic CD hacking) scdimg2tile Converts an image to Sega VDP data Uses Perl's Image::Magick library scdimgvdppalette TODO work in progress scdisofilefromoffset Determines the filename from which an ISO byte index corresponds to Uses isoinfo program scdlittle2bigword I used this to convert cram part of savestate file the more convient endian scdmake Used to make a Sega CD ISO scdmoviedecode Used to decode a Cinepak for Sega file scdtile2img Converts Sega VDP data to a PNG scdupdatebinfile Takes a binary file and replaces it at a specified byte index in a file. Useful for overwriting data in an ISO file. scdwav2pcm Converts a wav file to Sega CD PCM data scdwrite Writes Sega CD files out to a CD-R
Great tools Bgvanbur. Thanks. I'm trying to use scdmake on windows. I get it to create the iso without any errors but the iso wont play. Freezes at Sega logo. When I run scdmake, 3 blank cmd windows open. I am thinking the problem is with the cfg file. I am just using the default cfg file. Or with these lines Code (Text): system("scdasm -v=$verbosity $ipasm $ipbin $iplst"); Code (Text): system("scdasm -v=$verbosity $spasm $spbin $splst"); I have tried hard coding the path Code (Text): system("C:\\Perl64\\bin\\scdasm -v=$verbosity $spasm $spbin $splst"); and adding the perl command Code (Text): system("perl C:\\Perl64\\bin\\scdasm -v=$verbosity $spasm $spbin $splst"); But that didn't seem to make a difference. This is the first time I have ever used Perl so that could be the problem. Any tips from anyone would be greatly appreciated. Thanks in advance.
In the SCDMAKE.CF you can add "$ipassemble = 0;" and "$spassemble = 0;" to have scdmake not assemble the IP and SP. When you do this, you need to make sure your IP.BIN and SP.BIN are updated appropriately. You mentioned in a PM that you wanted to use scdmake for Sonic CD. Here are the things needed to append to the SCDMAKE.CFG to be able to rebuild the Sonic CD. Code (Text): $ipassemble = 0; $spassemble = 0; # soniccd.isoinfo is the output of "isoinfo -l -I soniccd.iso" $isoMatch = 'soniccd.isoinfo'; $isoMatchFileExtent = 0x17; # SEGA CD DEV manual says fill unused file bytes with 0xFF # but the Sega developed Sonic CD uses 0x00... $fillUnusedFileWithZero = 1; Here is the copy of the IP.BIN, SP.BIN, soniccd.isoinfo, and SCDMAKE.CFG I used to quickly rebuild Sonic CD. You also need to copy all of the files from the Sonic CD to the same directory. It will make an iso where the only differences are "useless" fields (such as file dates). https://dl.dropbox.com/u/26821164/SONICCDSTUFF.ZIP Note: Sonic CD requires some files to be in a specific file locations in the ISO which is why we need the $isoMatch support.
Thank you. It is working great. This line caused it to not work. $isoMatch = 'soniccd.isoinfo'; But if I delete it everything seems to be working perfectly. And seems to be working with and without this line. $isoMatchFileExtent = 0x17; I am testing with Sonic CD but I want to be able to do with other games too. Do I need to make my own IP.BIN and SP.BIN files for each cd? How do I do that? Thank you very much. This tool and instructions have helped a lot.
You need to update to the latest scdmake for $isoMatch to work with a file with a .isoinfo suffix. Sorry that I forgot to mention that. IP is the initial program (used by the MAIN-CPU on the Genesis) and the SP is the system program (used by the SUB-CPU on the Sega CD). These are different for every game. To extract these for different CDs, you can now use the new scdextractipsp tool I just added to SCDTools! Sample usage: Code (Text): > scdextractipsp Z80ACCESS.ISO Making IP.BIN from ISO offset $00000784 with size $0000087C Making SP.BIN from ISO offset $00001000 with size $00000800
I wrote a 'base' template for Sega CD development, and it includes some basic IP and SP code that you can probably work off of. I have these tools included with build scripts and all, but I haven't tested them on Windows so you're on your own there.