Saturday 17 October 2015

BBC floppy disk transfer

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

I've had a request to transfer some files from .ssd disk images to real 5.25" floppy disks for use on a BBC micro. In the same way as my PET microSD gives the Commodore PET a microSD card disk drive, there are similar things for the BBC. These include John Kortink's GoMMC, and the RetroClinic DataCentre. Unfortunately, most of my BBCs are out of the way at the moment, so I was looking for a quick alternative.
Serial transfer is a good option in this case. The BBC has an RS423 serial port which is sort of RS232 compatible. About 20 years ago at University I had ended up with a laptop (an NEC V30 8088 clone) which had two floppy drives and a cracked screen. I also had a BBC micro and a television set, so I ended up writing up projects and dissertations on the BBC micro in Wordwise Plus and transferring them using a serial terminal program to the PC floppy drive to take into the University library to print out. It was mainly text, although I remember some of the electronics needing dodgy ASCII art circuit diagrams that had to be completed by hand once printed out. Ah, the days before WYSIWYG was at out fingertips.
I still have the BBC micro I used then (but that is also out of reach). I did manage to find the cable I had used though as the BBC's serial connector is the rather odd 5 pin DIN 'domino' pattern, which is not very common these days.
One one end of the cable goes a BBC micro. Here an issue 4 with an 8271 and Acorn DFS, and a 40/80 track switchable disk drive. PC users had it easy with 5.25" floppy disks, they were either 360K or 1.2MB, and you could usually tell by the label on the disk (DSDD or DSHD). Things were a lot more complicated for some of the other machines. With the BBC you had 40 or 80 track, DFS or ADFS, or some other propriety systems. Some single sided, some double sided, and some where you could access both sides as separate disks, but not as a continuous block. It can be very confusing when you pick up a random disks knowing what format it was written in.
At the PC end I am using a program called DFS Explorer, this allows the transfer of .ssd files to and from real disk over serial. In the 90's setup, I had a DOS boot disk in the laptop with a autoexec.bat (or was it config.sys?) set to redirect the console to the serial port, so I could use a terminal program on the BBC as if I was typing on the laptop (the BBC had a better keyboard), and would show the output from the laptop on the TV (since the latop screen was damaged and had been removed). Here is almost the reverse of that.
To begin the transfer process, you type a few commands onto the BBC to set the baud rate (1200 baud) and tell it to listen to the serial port and process what is received as if it came from the keyboard. It is effectively typing in the program you need at the BBC end. Very neat.
The program is transferred over and you save it to a disk on the BBC (or transfer it again next time you need it). When you run it, the BBC becomes a slave to the program running on the PC end.
I initially had some problems, due to a cheap USB to serial adapter. The BASIC program transferred fine, but the handshaking is more stringent on the data transfer and it wouldn't go. The cheap USB to serial adapters are often very implemented and don't follow the RS232 spec very well. Once I switched to a proper serial port it was fine.
At the BBC end, the data is written out to disk. It can also work in reverse, so you can create .ssd images from real floppies. Since I'd found some of my old disks with the cable, I too the opportunity to read archive those. So that's worked out quite easily, no additional hardware required, other than the cable, and no need to even open up the BBC. DFS Explorer, can be used as downloaded, or you can register for £5 to support the author, which I always like to do when I find something useful like that.
This works in a similar way to CBMXfer that I've used to transfer disk images from PC to a Commodore PET and a Commodore 64. Although in the Commodore case, the drives are intelligent, so the PC interfaces direct with the drive, rather than needing to use the computer as a slave. There is also something similar under way for the Spectrum, ZXTrans. The Spectrum is short of a serial port, so I am working on building a modern replacement for the Interface 1, to give a Spectrum a real serial port, or more likely, a USB connection with a microcontroller acting as USB-serial-Spectrum.
All labelled and ready to go. Now I had better test that Repton has transferred over properly, make sure all of the levels work correctly.....