ide: emulate the A4000 motherboard IDE#185
Merged
Merged
Conversation
[scsi] controller = "a3000" fits drives to the Super DMAC's WD33C93 instead of a Zorro board. It is the default on a machine that has one, and it takes no boot ROM: Kickstart's own scsi.device drives it and autoboots from an RDB disk. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
rom_odd is the odd half of a split EPROM dump, so it is meaningless alone and the config rejects it; clearing the even half left it behind. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds missing emulation for the Amiga A4000 motherboard IDE interface by factoring the existing Gayle IDE implementation into a shared ATA core and introducing an A4000-specific front-end + decode, while also extending config/UI support for onboard (A3000) SCSI vs Zorro SCSI boards.
Changes:
- Introduces a shared ATA task-file + command engine (
AtaBus) and moves IDE drive logic out ofgayle.rsintosrc/ata.rs. - Adds an A4000 motherboard IDE front-end (
src/ide_a4000.rs) and wires it into bus decode/INT2 behavior, config defaults, and machine construction. - Extends SCSI configuration and launcher UI to support the A3000 onboard SCSI controller option (no boot ROM) alongside Zorro SCSI boards.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/video/launcher.rs | Updates launcher UI logic for A3000 onboard SCSI selection and IDE availability on A4000. |
| src/lib.rs | Exposes new ata and ide_a4000 modules. |
| src/ide_a4000.rs | Implements A4000 IDE register decode, IRQ status behavior, and unit tests. |
| src/gayle.rs | Refactors Gayle IDE handling to delegate task-file operations to the shared ATA bus. |
| src/emulator.rs | Wires A4000 IDE and A3000 onboard SCSI drive attachment into machine build flow. |
| src/cpu.rs | Routes CPU external accesses to the A4000 IDE device when it decodes the address. |
| src/config.rs | Adds ide_a4000 flag/defaults and extends SCSI controller enum + validation for A3000 onboard SCSI. |
| src/bus.rs | Adds ide_a4000 device to the bus, reset path, LED activity, and INT2 level feeding. |
| src/ata.rs | New shared ATA (IDE) task file + drive model + command engine extracted from Gayle. |
| copperline.example.toml | Updates example configuration docs for A3000 onboard SCSI and A4000 IDE usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Registers $1A-$1E are not registers and float $FF; $1F is the auxiliary status, aliased into the file read-only. Both were plain RAM, so cdhooper's sdmac tool failed its WDC test and reported the chip as not detected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The front panel only offered an LED to a Gayle machine or an A2091, so an A3000 (motherboard SCSI) had none -- and neither did any machine whose only controller was an A4091. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The A4000 has the same ATA cable as Gayle behind a different decode, so the drives, task file, and command engine move to a shared AtaBus; Gayle keeps its ID, interrupt, and PCMCIA registers, and the A4000 interface is a second front-end. [ide] now fits drives to either machine. Task file at $DD2020 with Gayle stride, control block at $DD303A, and an interrupt status register at $DD3020 that follows INTRQ -- Kickstart polls it after every INT2 and spins there if nothing answers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The decode folds the two 16-bit halves of each 4-byte slot together; the old
wording ("either byte of the word") wrongly suggested byte-lane aliasing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LinuxJedi
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #184 - the first two commits are that PR; review only the last one
until it merges, after which this diff shrinks to it.
The A4000's IDE port was not emulated at all, so Kickstart spent several seconds
probing for it on every boot and the machine had nothing of its own to boot
from. It is the same ATA cable Gayle drives, so the drives, the task file, and
the command engine move out of
gayle.rsinto a sharedAtaBus(src/ata.rs).Gayle keeps its ID, interrupt-change, and PCMCIA registers and hands every IDE
register access to the bus;
src/ide_a4000.rsis the second front-end.[ide]now fits drives to an A4000 as well as an A600/A1200.
The decode came out of
[debug] log_unmappedrather than guesswork: the ROM'sprobe writes the drive/head register at $DD203A and polls status at $DD203E,
which is Gayle's 4-byte stride based at $DD2020. The control block sits one A12
page up at $DD303A.
The part that would not have been guessable: Kickstart's scsi.device polls an
interrupt status register at $DD3020 after every INT2, and with that address
undecoded it spun there - 2.8 million reads in a 45-second boot. It has no
latch; bit 7 just follows the drive's INTRQ, which a status read drops.
Tested by booting an A4000 with an RDB HDF as the IDE master and nothing else to
boot from: it autoboots to Workbench, and the unmapped-access log over the whole
$DD2000-$DD3FFF window is empty. New tests cover the decode, the empty-cable
status float, and the interrupt register.
🤖 Generated with Claude Code