Programming the BBC Micro with ease

No, this isn’t going to be a tutorial on BBC Basic. Nor am I about to offer programming tips and tricks. This is about being comfortable while hacking.

In the last post I wrote about recreating the first serious program I ever wrote on the BBC Micro. And I mentioned that I’d written the code using the BeebEm emulator running on a Windows 10 VM on my iMac. Yet if you’ve been here before you’ll know that I’m the proud owner of a real BBC Master Turbo that is now running again.

Huh? Why didn’t I write the code on the Master?

The answer is simple: my arthritis issues make it difficult to work sitting at a normal desk. For my day job, I sit in a recliner chair with my iMac and keyboard on articulated arms. The slightly reclined position eases problems with my neck. Also, the Master has a truly horrible keyboard. I’ve been on a long and still continuing search for the right mechanical keyboard to ease the pain in my fingers.

So there’ll be no more long hours hacking away at the Master itself, like I used to in my youth (“I’ll add just one more feature before I go to bed,” he said at 3am). Luckily, that’s not necessary.

BeebEm running on my Windows 10 VM.

Enter the DataCentre

Once the Master had been fixed, I decided to invest in a RetroClinic DataCentre. This comes with its own filing system, RamFS, on a ROM, and it not only allows you to do away with those pesky disks*, it makes transferring files between a modern PC and the Beeb a breeze.

The DataCentre, with a cute, wooden 16GB memory stick. Plugged into the IDE port is an IDE-to-CF adapter (which go for cheap on eBay) and a Compact Flash card. I haven’t used these yet. Not sure if I will.

The core of the system consists of RAM disk images. On powering on, the device convinces the Beeb that there are four drives attached, which you can access using the regular *DRIVE 0 to *DRIVE 3 commands. These disks are empty, though.

The DataCentre also has a USB port into which you can plug a memory stick, SSD drive or hard drive – anything that’s FAT or FAT32 formatted. This is available to the Beeb as *DRIVE 5. You can simply SAVE or LOAD to and from this drive as you would any other disk (except that it has considerably greater capacity than any floppy you ever encountered). Or, if you’ve saved a floppy disk image to this drive, you can transfer this to drives 0 to 3 with a single command – it’s essentially the equivalent of putting a floppy into a drive, but a bit more virtual.

There’s more to the DataCentre, too, like 62K of non-volatile RAM disk on *DRIVE 4, handy for anything you load a lot, such as ROM images you load into sideways RAM on the Master – I’ll be using this for Basic Editor. Much of this space is already taken up with utilities that come with the system, but you might find you don’t need those. A USB host port provides a way of connecting the DataCentre directly to a PC. And this and an IDE interface offered further connectivity if you’re prepared to roll up your sleeves and do some fancy coding to exploit them.

But for me, the thumbdrive appearing as *DRIVE 5 is the most useful and exciting feature. I’ve previously installed the TurboMMC device, which is a fine product. It allows you to have hundreds of floppy disk images available instantly. Within its own terms it works very well and I still have it attached to the Master. But you wouldn’t want to use it to transfer files from a PC – the process is just too long-winded.

With the DataCentre, here’s what was involved in moving the programs from BeebEm on the Mac/Windows to the BBC Master.

  • In BeebEm, I selected Edit -> Export Files from Disc and selected the relevant drive on which the programs were stored.
  • I selected both programs (you can select multiple files to export at once) and chose to save them to the memory stick.
  • In Windows, I renamed the files. BeebEm has some unfortunate ideas about file naming. For example, the program that was named ‘DOF’ was saved as $.DOF. The dollar sign is used by the Beeb’s filing system as a ‘directory’ designation. But Windows, and the DataCentre, see this as a file called ‘$’ with the extension ‘.DOF’. So I just renamed the files to get rid of the ‘$.’ at the beginning.
  • I removed the memory stick from the PC, plugged it into the DataCentre, typed *DRIVE 5 and that was it! The files were available to load into the Beeb (and edit and save back to the memory stick).

The reverse journey is just as easy.

The power cables for the DataCentre are a tad short for my taste and I’ve had trouble finding a convenient place to put it. I also really need to build it into a box – I’m thinking of repurposing the enclosure from an old, dead external hard drive. (Now done – see here.)

But now I can spend as many hours as I like hacking away at programs from the comfort of my regular workstation. The only challenge is where programs might need access to external hardware – the serial connection for comms, for example, or a printer. BeebEm does allow you to configure a PC’s ports as though they are the Beeb’s, but as I’m running Windows as a VM that adds some complexity. And the User Port just isn’t available. But even with programs that need that kind of stuff, I can do the bulk of the coding on my workstation and just do the debugging on the real BBC Master.

Bliss!

* Actually, I like floppy disks. I like the feel of slipping them into a drive (oo-er) and locking them in place (or that nice clunk when a 3.5in floppy latches into the drive) and I like the chunk-chunk whirr-whirr noise. But I don’t miss all that floppy swapping nonsense, or dead disks. The day I got my first PC with a hard drive was a blessed relief.

Never miss a post

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.