ULTIMATEEXPERIMENTSCommodore 64 · Work in progress

Bounded asynchronous Ultimate transport

Development note: see current status, build instructions and installation for present qualification. Historical measurements below apply to their stated slice, not every current build.

Updated 2026-10-15. src/uci.s is the linked generic Ultimate Command Interface streaming transport. It is not yet an image-file command layer or native runtime loader. No real Ultimate file command or persistence result is implied by functional transport tests.

The public calls are dos64_uci_init/start/poll/accept/abort. They preserve A/X/Y and native P except carry; carry rejects an invalid call, while asynchronous result/state/error fields describe an accepted transaction. Initialization is startup-only and must not reset an active transfer. Supported register bases are DF1C, DE1C and DFFC. Start validates the base/device/descriptor, synchronizes stale state and uploads at most 16 command bytes per poll before PUSH. No second command can start while active.

The state machine advances through SYNC, UPLOAD, WAIT, DRAIN, BLOCK, ACK and FINAL to DONE; timeout/cancel/protocol errors enter RECOVER then FAILED. BLOCK publishes a fully drained response for the consumer to copy before calling accept. MORE streaming retains each block until accepted and does not require observing a transient BUSY. Both data/status queues are drained even after consumer-capacity truncation; bounded counters distinguish retained and seen bytes. Target status bytes are opaque: transport DONE does not mean a successful Ultimate DOS operation.

The command buffer and data buffer reserve 896 bytes each, status 256, in linked UCIBUFFER C100–C8FF (2,048 bytes total). Actual command length is limited to 895 because the pinned FPGA command pointer saturates at 895; a 896-read response with DATA_AV still asserted fails as a nonterminating queue. Firmware status publication is an 8-bit length, so 255 is its effective maximum and 256 wraps to zero. Conservative capacities, 24-bit aggregate counts and overflow diagnostics prevent silent wrap. No-reply target-bit commands are rejected by this reply-oriented API.

The caller supplies a monotonic 16-bit now before each operation. Timeout/recovery durations must be 1–7FFFh and polling must occur within 8000h ticks, including while BLOCK awaits acceptance. Deadlines use modular elapsed time, never CPU poll count or a fixed delay. Timeout/error/cancel sends ABORT once, then drains/checks recovery under a separate deadline. FAILED with recovery_failed=0 after an accepted start establishes quiet idle; recovery_failed=1 requires caller reset/recovery. Rejected input/ID starts issue no command and do not establish remote quiet ownership.

Configuration/command bytes are immutable during a transaction except now and response-consumption calls. Code is in DEVICECODE, state in DEVICESTATE and buffers in visible unbanked RAM. Calls temporarily expose I/O and preserve observable DDR/banking output state. Ownership is exclusive/non-reentrant. No IRQ generation, DMA, TRIGGER or no-reply mode is implemented.

Actual assembly tests use a separate functional UCI model for bounded uploads, missed BUSY/MORE/backpressure, complete queue drain with truncation, base/count/time rejection, exact/wrapping deadlines, stale responses, cancellation/abort/recovery, capacity saturation/status-wrap, 24-bit totals/overflow, banking and guards. This is model conformance, not installed firmware or physical file-system acceptance. The linked module occupies 1,265 DEVICECODE bytes and 43 DEVICESTATE bytes; verify final maps before expanding it.

The native file-command layer is separate future work. It must validate operation-specific status and exact transferred counts, implement image open/seek/read/write/close semantics, then connect to REU media ownership and verified persistence. A privately prepared file layer, renderer or overlay manager is not linked or accepted here. Storage design retains the Ultimate/IEC and 2 MiB→20 MiB HD requirements.