The Guru is proudly supported by....
Title
This article is Copyright 'The Guru' 2007. The may not copy any portion of this for your own web site or printed publication without my explicit permission.


This page briefly explains how to dump CD's and Hard Drives, explicitly for the purpose of reading them for use with MAME emulation.

First of all, you need to get yourself some software to read your CD/HDD. I personally used WinHex for backing up HDDs for several years, but that program isn't free and may or may not be best suited to the task depending on who you talk to ;-)
So we'll look at using free programs. For HDD's we can use the MAME-supplied CHDMAN program and for CD's we'll use a program called Burn At Once. If you don't have these programs already, get them while you read this tutorial....
MAME
Burn At Once

Use the quick links below to jump to each section.

HDDs | CDs


B A C K I N G   U P   H D D ' s
Power off your PC. Plug in the HDD and boot up your PC to your Windows XP desktop (sorry, the scope of this article does not include other operating systems, so I'm not going to cover them!)
When the PC is booted, go to START then click CONTROL PANEL. Then double click ADMINISTRATIVE TOOLS then COMPUTER MANAGEMENT.

Click DISK MANAGEMENT then maximize the screen so you can see everything.

Look for the HDD that you added. It will probably be the last one shown, but you may want to do this first before adding the new HDD then note the differences to be sure you select the correct one!
You have to know which physical volume your target hard disk is mapped as. On the right hand side it shows you a list of all the physical hard disks you have plugged in. They will be listed as 'Disk 0', 'Disk 1', 'Disk 2' etc. Make a note of which disk number your target hard disk is.
Once you've done that, it's easy to image the HDD into a file. Copy the MAME-supplied chdman.exe to a local hard drive that has enough space for the image (in my case I copy it to F:). Then open a DOS prompt and CD to that drive. For example, assuming my user name is 'user1', the drive I want to backup is physical drive 3 and I want to image the HDD to my F: drive....
(opening DOS prompt will bring you here)....
C:\Documents and Settings\user1\
type F: then press ENTER
(again make sure you are on a local hard drive that has enough free space to hold the image!)
Then type the following:
chdman -createhd \\.\PHYSICALDRIVE3 image.chd then press ENTER

where 'image.chd' is the name of the CHD file you want to create and the '3' next to PHYSICALDRIVE is the disk number listed in the DISK MANAGEMENT screen for the HDD you want to backup.
You will see a screen like this and you must wait until the drive is completely read....

After a period of time, you will see a new file on your drive called image.chd
Type dir and it should be listed....


Of course, you did that to backup an undumped game for us (MAMEDEV) didn't you? So now copy that file to a CD/DVD and post it out to us (or upload it somewhere and contact someone from MAMEDEV) so it can be added to MAME, purely for research purposes of course! :-)

Note that you can also use chdman to re-create a real HDD from a backup CHD image in much the same way:
chdman -extract image.chd \\.\PHYSICALDRIVE3

(remember to replace the '3' with the drive you want to re-create, don't get it wrong or you will completely overwrite the wrong HDD!)

Note that this method also works for drives connected via an external USB box. The above example test drive was a 2 1/2 inch HDD connected via an external USB cable. The final image is only ~8MB because the drive was empty :-)

B A C K I N G   U P   C D ' s
Now we'll look at backing up CD's using Burn At Once. This is essentially a DOS program called CDRDAO + a built-in frontend, so it's very easy to use.
Download the program (get the first file on that page) or just use any search engine to find it. Install the program and load it....


It should find your CD reader/burner automatically. I believe the program uses ASPI, so if you install any other common CD Burning program like NERO, you should already have any necessary libraries for CD reading/burning and your drive should be found easily.

From the top menu, select 'Device Settings'. In the 'Read Settings' section, ensure 'Read Raw' and 'Raw RW Subs' are selected/checked. If you have multiple CD readers/burners in your machine, select the correct one from the list of devices.


Select 'Device Settings' again from the menu to close that window and return to the main window which shows the command log.

From the top menu select 'Read/Copy', then select 'Read To Image'
A window will pop up telling you how big the image will be and asks you to OK it. You will also see a TOC (table of contents) in the lower command log showing you the number and type of tracks and how long they are. Your TOC will look different and may show additional DATA and AUDIO tracks.


Click OK on the 'Confirm Read' prompt, then when the save dialog pops up, select a location and file name for the image (I'll use 'image'), then click 'save'. The program will append .toc and .dat to the images so you don't need to specify an extension.

That is really it. Just wait and the image will be read and saved to your selected HDD as a binary image file called 'image.dat' and an 'image.toc' file. When it is finished, the program will ask if you want to load the image for burning. Select 'No' and close Burn At Once.

If you wanted to leave it there, just backup the files onto a CD/DVD and send them out to us or upload them somewhere and contact us (again you did this just for MAMEDEV didn't you?)

If you want to now create a CHD from that file, open a DOS prompt, change directory to the location of your newly saved image file, ensure CHDMAN.EXE is locally available on that drive or in the path, then type...
chdman -createcd image.toc image.chd
where 'image.toc' is the file you just saved using Burn At Once, and 'image.chd' is the name of the CHD you want to create.

To unpack a CHD image of a CD, type the following...
chdman -extractcd image.chd image.toc image.bin
where 'image.chd' is the CHD file you want to unpack, and 'image.toc' and 'image.bin' are the raw image files you want to create.

A note about '.toc' files.... 'image.toc' is just a text file and contains the full path to the .dat file, so if you moved the file after backing it up, you will need to manually edit the .toc and update the location of the .dat file before trying to convert it with CHDMAN.

To re-create a real CD from a raw unpacked image file, you can use any common CD/DVD burning program to re-write the image as a .iso file, so I'm not going to go into that here :-)


This article is Copyright 'The Guru' 2007. The may not copy any portion of this for your own web site or printed publication without my explicit permission.

Want to see more games in MAME? Please consider donating funds

The Guru's ROM Dump News Home How to Help Send Comments Links