Dreamcast Dumping Script (for *nix)

This forum is for the discussion of dumping games. Get help with your dumping here.

Moderator: Moderators

Post Reply
User avatar
Site Founder & Admin
Site Founder & Admin
Posts: 315
Joined: Fri Apr 06, 2007 11:12 am

Dreamcast Dumping Script (for *nix)

Post by darcagn » Mon Jul 08, 2013 9:44 am

I've been buying a lot of discs lately and needed a faster way to both dump/post info and to verify that my discs are good.

Usage: dcdump.sh [dreamcastIP]

  • Downloads all tracks automatically using default dumping parameters
  • Spins down GD-ROM drive when dumping is completed
  • Prints GDI and file size/hashes to the terminal so that you can quickly compare info
  • Generates postinfo.txt file with everything ready to go for a perfect post here at Dumpcast. Just write in your ringcode and paste into a new post.
Download here

Script tested on OS X Mavericks, OS X Snow Leopard, and Ubuntu. On OS X, you will need to install wget first--the easiest way to do this is by using a package manager such as Homebrew, fink, or MacPorts. The hash generation code relies on OpenSSL so make sure that is installed too. Everything else should be standard on any common *nix distro.

Comments and suggestions welcomed. I will be happy to address any cross-platform issues to get it running on your system.


Code: Select all

echo "Dreamcast Dumping Script by darcagn"
echo "   for use with httpd-ack gd-rom dumper software"
echo "   => http://dumpcast.dcemulation.org/\n"

if [ -z "$1" ];
		echo "usage: dcdump.sh [dreamcast's IP address]"
		echo "IP of Dreamcast not specified. Quitting.\n "

echo "Beginning to download files from httpd-ack...\n"
wget -r -w 1 -nH -R dc_bios*,dc_flash*,syscalls*,httpd-ack* $1

echo "Required disc access complete, spinning down disc..."
wget -q -t 1 -O /dev/null $1/cdrom_spin_down

echo "Renaming downloaded tracks to their correct filenames..."
for i in track*
	do mv "$i" "`echo $i | sed s/.ipbintoc.*$//`"

echo "Generating dump information...\n"

echo "[b][u]Disc Information[/u]:[/b]" > postinfo.txt
cat index.html \
	| head -16 | tail -10 \
	| sed 's/<tr><td>/[b]/g' \
	| sed 's/<\/td><td colspan=3>/:[\/b] /g' \
	| sed 's/<\/td><\/tr>//g' >> postinfo.txt
rm index.html

echo "GDI info...\n"

printf "\nringcode:[code]<<write in ringcode here>>
\n\ngdi information:

Code: Select all

" >> postinfo.txt
cat disc.gdi | tr -d "\r" | tee -a postinfo.txt
echo "
\n" >> postinfo.txt
printf "file information:[quote]" >> postinfo.txt

echo "\nCalculating filesizes and hashes... This may take a while, please be patient.\n"

printf "disc.gdi " | tee -a postinfo.txt
filesize="size "`ls -nl disc.gdi | awk '{print $5}'`
printf "\t$filesize\t"
printf "%s " "$filesize" >> postinfo.txt
crc32="crc "`crc32 disc.gdi`
printf "$crc32 "
printf "%s " "$crc32" >> postinfo.txt
md5="md5 "`openssl md5 disc.gdi | awk -F"=" '{ print $2 }' | sed 's/ //g'`
printf "$md5 "
printf "%s " "$md5" >> postinfo.txt
sha1="sha1"`openssl sha1 disc.gdi | awk -F"=" '{ print $2 }'`
printf "%s\n" "$sha1"
printf "%s\n" "$sha1" >> postinfo.txt

for track in track*
printf "$track " | tee -a postinfo.txt
filesize="size "`ls -nl $track | awk '{print $5}'`
printf "\t$filesize\t"
printf "%s " "$filesize" >> postinfo.txt
crc32="crc "`crc32 $track`
printf "$crc32 "
printf "%s " "$crc32" >> postinfo.txt
md5="md5 "`openssl md5 $track | awk -F"=" '{ print $2 }' | sed 's/ //g'`
printf "$md5 "
printf "%s " "$md5" >> postinfo.txt
sha1="sha1"`openssl sha1 $track | awk -F"=" '{ print $2 }'`
printf "%s\n" "$sha1"
printf "%s\n" "$sha1" >> postinfo.txt

echo "[/quote]\n" >> postinfo.txt
echo "\npostinfo.txt generated... all done!"[/code]
Posts: 9
Joined: Sat Mar 22, 2014 3:54 am

Re: Dreamcast Dumping Script (for *nix)

Post by Maximilian1st » Thu Apr 14, 2016 1:54 am

is your script able to output the nicely coloured text as in this post viewtopic.php?f=5&t=1744 and is it still up to date? The httpd-ack image is to be found on the forum right?
Thank you in advance for the kind answer,
Post Reply