Burstimg is a program to copy single and double sided 5¼"-Commodore disks into D64- and D71 disk images, for example on a SD2IEC or similar devices. It works sector based, which means that it creates exact copies of the disk in contrast to file based copies (copy protected disks probably won’t work). As the name suggests, it uses the fast burst mode to speed up reading the disks. Therefore you need a Commodore 1570 or 1571-drive and a Commodore 128 to use the program, the 1541 floppy drive is not supported.
Load burstimg with DLOAD"BURSTIMG" (on drive 8) or DLOAD"BURSTIMG",U9 (on drive 9), start the program with RUN and choose single or double sided disks (S or D, alternatively you can type the number of tracks to be copied (35 or 70 for single or double sided)). After that enter the device number of the source drive with the original disk (for example 8) and the target device, where the image should be stored (for example 9). The source drive must be a Commodore 1570 or 1571, whereas the target device may be any sort of drive with enough free space. At last enter the filename of the image to be created. While copying the 40 column screen will be blanked.
It is also possible to call the machine language routine directly with BANK15:SYS7629,t,sd,td,,n$ (t: number of tracks, sd: source device, td: target device, n$: image name).
Example: BANK15:SYS7629,70,8,9,,"IMAGE.D71"
Note: There is only simple error checking. Always test the created disk image afterwards.
The time burstimg needs to copy a whole disk depends on the hardware you use. On a test setting with a Commodore 128D using the internal 1571 drive and an SD2IEC, a single sided disk is copied in about 4 minutes, a double sided disk in about 8 minutes. Writing to the SD2IEC is the slower part compared to reading the floppy disk.
1.)Using burst mode for reading:
Before using the burst read command on a disk for the first time, you have to send an "inquire disk" to the drive via the command channel:
"U0" 4
In basic this can be done with OPEN15,8,15,"U0"+CHR$(4):CLOSE15
The read command itself has the form
"U0" 0 track sector number next
track: track from which to read (1-35 on single sided disks, 1-70 on double sided disks)
sector: start sector (first one is 0, last sector depends on track, see table below)
number: number of sectors
next: track to which head is moved after reading (optional)
When reading more than one sector, you don’t get the sectors 0,1,2, ... but 0,5,10, ... The difference of 5 is called interleave. The reason for this is that after reading one sector, the program has to process the data delivered from the drive. During this time the disk continues to spin and therefore after reading data for example from sector 1 one would have to wait almost a whole rotation until sector 2 is back under the head. The default value on a 1570/1571 drive for interleave is 5, but it can be changed with the command
"U0" 8 interleave (in basic: OPEN15,8,15,"U0"+CHR$(8)+CHR$(5):CLOSE15)
If you go beyond the last sector, reading continues on the same track. On track 1, which has 21 sectors, this results in the order 0, 5, 10, 15, 20, 4, 9, 14, 19, 3, 8, 13, 18, 2, 7, 12, 17, 1, 6, 11, 16.
The value for the next track in the read command must be on the same side of the disk. "U0" 0 35 0 17 36 is not allowed as track 35 is on the first side, track 36 on the second.
After the read command has been sent, data has to be read directly via CIA-registers (see source code for details). This part of burstimg is based on the read example in the Commodore 1570/71 manual.
2.)Commodore 128 particularities:
Writing the image is done with the standard kernal routines. If you are used to C64 programming, you know the SETNAM routine ($FFBD) to specify the name of a file (parameters: length in A, low/high byte in X/Y). But on the Commodore 128 you have to set the ram bank where the name is stored before with the "new" SETBNK routine ($FF68). The bank number (same as with the basic BANK command) has to be in X, A may contain the memory bank for LOAD/SAVE/VERIFY, but doesn’t matter when writing bytes with CHROUT ($FFD2).
Burstimg doesn’t call SETNAM, but uses COMNAME ($9236) from the basic rom. This routine first checks for a comma, then reads a string and sets the content as filename.
3.)Number of sectors on tracks:
Tracks 1-17, 36-52: 21 (0-20)
Tracks 18-24, 53-59: 19 (0-18)
Tracks 25-30, 60-65: 18 (0-17)
Tracks 31-35, 66-70: 17 (0-16)
Executable: burstimg
Source code: burstimg.txt