Close

Creating a Flex disk image

A project log for 6809 SBC

A 6809-based SBC with DES encryption hardware.

philmacphailPhil.macphail 09/10/2024 at 14:380 Comments

This turned-out to be more involved than expected as the USB serial interface seems to introduce extra characters that need to be 'flushed' with each command sent when using Octave serial control. I don't know if this is an Octave feature, USB interface feature, or an interaction between them, so anyone replicating this may get different results.

I have a set of CF Card commands in the EEPROM that let me download a sector image and write a block of memory to a specified part of the CF Card, so it should have been a small step to do this from Octave rather than the terminal. Using a modification of the Flex Octave utilities discussed previously I read a disk image and wrote it to a CF Card, where the sector number was used to set the LBA0 value and the track number set the LBA1 value. With this I can replicate any disk image on the CF Card. This gives me an image that can be used to write the disk drivers for Flex. Should anything go wrong then a new image can be created easily enough.

The program to do this is called FlexSectorWriter.m and is available on GitHub here https://github.com/valgamaa/6809-SBC

The process of creating a disk image is slow but doesn't need to be done often, and the resulting image appears to be a true image of the original file. This lets me now work on the disk drivers, when time permits.

Discussions