Scope
Acorn Electron only, with DFS enabled (has_dfs → 1770 DFS ROM + Electron::Plus3 WD1770 controller).
This report is based on:
- observed behaviour in CLK 26.06.06 (macOS, bundle id
TH.Clock-Signal), and
- source review at commit
f0d7068 (2026-06-06 release line).
Problem
The Electron disk controller exposes two emulated drives, but insert_media always attaches the first (or only) disk image to drive index 0. Drive index 1 is never populated by insertion, so MOS commands targeting drive 1 fail with Disc fault 18 when no disc is present there.
The MOS command *DRIVE 1 selects the default drive for subsequent DFS operations; it does not influence where CLK attaches an inserted image. Insertion is handled entirely inside CLK and is hard-coded to drive index 0.
Steps to reproduce
-
Open/create an Acorn Electron machine with With Disk Filing System (DFS) enabled.
-
Insert a DFS .ssd (drag-and-drop onto the window, or Insert Media…).
-
At the > prompt:
The inserted catalogue is shown.
-
Then:
Result: Disc fault 18 at :1 00/00.
-
With *DRIVE 1 still selected, insert a second .ssd via drag-and-drop or Insert Media…, then:
Drive 1 still reports disc fault 18. The newly inserted image is attached to drive index 0, not drive 1 (verify with *DRIVE 0 → *CAT).
Expected behaviour
Software that uses two physical/logical drives (master + data disc) expects a disc image in both drive index 0 and drive index 1. After inserting two .ssd images, *DRIVE 0 / *DRIVE 1 followed by *CAT should show a catalogue on each drive that has media inserted.
Alternatively, runtime insertion could target a user-selected drive; today there is no drive parameter on the insert path.
Root cause (source)
When DFS/ADFS/Pres ADFS is enabled, Electron constructs a Plus3 controller with two drives:
// Machines/Acorn/Electron/Plus3.cpp
Plus3::Plus3() : WD1770(P1770) {
emplace_drives(2, 8000000, 300, 2);
}
Activity observers name them "Drive 1" and "Drive 2" (index + 1 in Plus3::set_activity_observer).
However, Electron::ConcreteMachine::insert_media only ever calls set_disk for index 0:
// Machines/Acorn/Electron/Electron.cpp
if(!media.disks.empty() && plus3_) {
plus3_->set_disk(media.disks.front(), 0);
}
This runs:
- at machine construction (
insert_media(target.media)), and
- on runtime insertion (macOS:
MachineDocument.insertFile → CSMachine.applyMedia → insert_media; each inserted file is a single-disk Media).
Plus3::set_disk already accepts a drive index:
void Plus3::set_disk(std::shared_ptr<Storage::Disk::Disk> disk, const size_t drive);
So the hardware model supports two drives; only the Electron insert_media implementation uses index 0.
Note: On SDL startup, multiple file arguments are merged into one Media object (OSBindings/SDL/main.cpp), but Electron still reads only media.disks.front() for drive 0. Any additional entries in media.disks are ignored for drive 1.
Workaround
Use a single drive only (*DRIVE 0), keep one .ssd mounted, or swap the image on drive 0 when prompted. Dual-drive setups are not supported by current insertion logic.
Environment
| Item |
Value |
| CLK |
26.06.06 (macOS) |
| Machine |
Acorn Electron + DFS |
| Media tested |
DFS .ssd (80-track) |
| Source tree |
TomHarte/CLK @ f0d7068 |
Happy to re-test on a fixed build.
Scope
Acorn Electron only, with DFS enabled (
has_dfs→ 1770 DFS ROM +Electron::Plus3WD1770 controller).This report is based on:
TH.Clock-Signal), andf0d7068(2026-06-06 release line).Problem
The Electron disk controller exposes two emulated drives, but
insert_mediaalways attaches the first (or only) disk image to drive index0. Drive index1is never populated by insertion, so MOS commands targeting drive 1 fail with Disc fault 18 when no disc is present there.The MOS command
*DRIVE 1selects the default drive for subsequent DFS operations; it does not influence where CLK attaches an inserted image. Insertion is handled entirely inside CLK and is hard-coded to drive index0.Steps to reproduce
Open/create an Acorn Electron machine with With Disk Filing System (DFS) enabled.
Insert a DFS
.ssd(drag-and-drop onto the window, or Insert Media…).At the
>prompt:The inserted catalogue is shown.
Then:
Result:
Disc fault 18 at :1 00/00.With
*DRIVE 1still selected, insert a second.ssdvia drag-and-drop or Insert Media…, then:Drive 1 still reports disc fault 18. The newly inserted image is attached to drive index 0, not drive 1 (verify with
*DRIVE 0→*CAT).Expected behaviour
Software that uses two physical/logical drives (master + data disc) expects a disc image in both drive index
0and drive index1. After inserting two.ssdimages,*DRIVE 0/*DRIVE 1followed by*CATshould show a catalogue on each drive that has media inserted.Alternatively, runtime insertion could target a user-selected drive; today there is no drive parameter on the insert path.
Root cause (source)
When DFS/ADFS/Pres ADFS is enabled, Electron constructs a
Plus3controller with two drives:Activity observers name them "Drive 1" and "Drive 2" (
index + 1inPlus3::set_activity_observer).However,
Electron::ConcreteMachine::insert_mediaonly ever callsset_diskfor index0:This runs:
insert_media(target.media)), andMachineDocument.insertFile→CSMachine.applyMedia→insert_media; each inserted file is a single-diskMedia).Plus3::set_diskalready accepts a drive index:So the hardware model supports two drives; only the Electron
insert_mediaimplementation uses index0.Note: On SDL startup, multiple file arguments are merged into one
Mediaobject (OSBindings/SDL/main.cpp), but Electron still reads onlymedia.disks.front()for drive0. Any additional entries inmedia.disksare ignored for drive1.Workaround
Use a single drive only (
*DRIVE 0), keep one.ssdmounted, or swap the image on drive0when prompted. Dual-drive setups are not supported by current insertion logic.Environment
.ssd(80-track)TomHarte/CLK@f0d7068Happy to re-test on a fixed build.