DISKDUMP - A utility to dump H-17 disks in emulator "portable" format. by: David A. Shaw heath8080a@aol.com http://members.aol.com/heath8080a/ Diskdump is used to export H-17 diskettes from a working H8/H89 into the all-ascii portable disk format established by Dave Wallace and I for interchanging disk images between H8 emulators. v1.1 adds the ability to dump disks in any format: -- 40 tracks, 1 side -- 40 tracks, 2 sides -- 80 tracks, 1 side -- 80 tracks, 2 sides The disk may have been initialized by any version of init, including HDOS 1.6. v1.2 allows sy0: to be used as a dump source, whether or not the system was booted in stand-alone mode. v2.0 allows for I/O errors when reading the diskette, and provides appropriate fill for the sector(s) that could not be read. It also adds disk content documentation to the portable image, including volume number in decimal, disk directory (with size and type), and marks each dumped sector with its type, and it's relative sector into the owning file, where applicable. Groups marked in RGT.SYS as containing bad sectors will not be read; fill content will be provided for these sectors. v2.1 calculates a check character and puts the "check" comment in the disk image. This allows the emulator to validate the portable image at load time. Assembling the program: The package consists of these files: diskdump.asm - the diskdump program hdos .acm - HDOS scall definitions hdosrom .acm - HDOS ROM entry points ascii .acm - ascii characters defs Put these files on a disk and run the assembler as follows (we're assuming the files are on sy1: in this example): asm sy1:diskdump=sy1:diskdump Using the program: You will need to connect another computer to a serial port on your H8 or H89 to capture the ascii text output. On an H8, the easiest way to go is to connect a Mac or PC to the console port. Configure the Mac or PC for 9600 bps, 8-bits, no parity. You can use any communications software that will "talk" to a serial port like this. Xterm on the Mac or HyperTerminal on the PC should work fine. On an H89, you will have to use one of the other serial ports. In that case, you'll need to have an AT.dvd device driver that will copy ascii text output without inserting form-feeds, escape sequences, or other trash into the output stream. Set the port to the modem port on the H89 and connect the Mac or PC to that port. Running the program: The command line is: diskdump = Examples: diskdump tt:=sy2: diskdump at:=sy1: In the first example, the dumped output will be written to the console, and the disk device used will be SY2:. In the second example, we'll read disks on SY1: and dump them to AT:. (You can use the same drive that you run the program from; the program's load channel is cleared on start up.) If there is a disk mounted in the chosen disk device, it will be dismounted and you'll be asked to remove it. The program will wait until the disk is removed from the drive. You'll be asked to insert a disk to be dumped. When the disk is inserted, diskdump will automatically start collecting directory and file type information from the disk. You will be prompted to press a key to start dumping the disk. You should open a capture file on your attached Mac or PC and press any key on the H8's console. If you are careful about starting capture where prompted, you may use the resulting dump image without further editing on the capture machine. Progress will be shown on the front panel of the H8: -- the left-most 3 digits will show the total number of logical tracks to be dumped (40, 80 or 160, depending on disk format); -- the center three digits will show the track currently being dumped; -- the right-most digits will show the sector currently being dumped. Be patient - dumping a disk takes quite a bit of time. You can dump as many disks as you like in one session. The only consideration is that you'll need a text editor that can handle the large file size on the capture computer, in order to separate the images. My recommendation is that you start a new capture file with every disk dumped. This allows you to mount the disks with no further editing, if you are careful to start the capture at the correct place. (Note: Don't worry about capturing messages that follow the disk image; the Mac emulator will load the disk with any amount of trailing garbage.) Enter Ctl-D to quit the program. Cleaning up the resulting disk image: Unlike previous versions of diskdump, there are no "cut lines" preceeding and following the disk image. If you start capturing the output when prompted, you can use the image as transmitted. Cases where you might need to clean up the image: (1) You captured messages ahead of the disk image. (2) Your AT: driver inserts NL or other characters at OPEN time. (3) You are capturing multiple disk images in one output file. Option: Diskdump, as assembled, sets the write-protected flag in the exported image. If you like, you can increase the level of protection to "locked", meaning the image will be permanently write protected. Simply change the PROT equate at the front of the source file. -------------------------------------------------------------------------------- Should you have any problems or questions, please feel free to contact me at heath8080a@aol.com. Dave Shaw -------------------------------------------------------------------------------- I hearby release diskdump into the public domain. You are free to use, distribute, or modify diskdump as you see fit. While I believe diskdump works correctly, I make no representations about completeness of the program, bug-free status, support for any particular hardware configuration, suitability to any given computing problem, etc. It is what it is. There is no warranty, expressed or implied. I will endeavor to fix any problems reported, but cannot guarantee that any such problems can or will be fixed. --------------------------------------------------------------------------------