Repository navigation
SoftIEC follow-up: final compatibility pass and E2E fixes - #931
Merged
chrisgleissner merged 138 commits intoSep 28, 2026
Merged
Conversation
…nd headers SI-120 T-W, SI-101 S-8/S-9/S-D, SI-051 R-P, SI-064 R-H.
SI-077 EL/EU/EH/A/XH/D, SI-134 hidden entries left out of a listing.
SI-102 W-1 and W-0, enforced at every gate from the bus to a medium.
SI-090 ##n answers 70 beyond one buffer, SI-092 B-P takes a high byte.
SI-071a, through the file system that holds it open.
The reader moves to software/filetypes/x00_wrapper.cc, shared with the drive.
…d the write protect
V, the raw directory, x00 creation and EL:$.
Also refuse an attribute command that carries no name.
SI-144b: the row shows the header name, and Run, Load and DMA act on the program inside rather than refusing a file whose header is absent.
The REST runners and the browser both reach C64_DMA_LOAD, so both show the name the C64 sees.
…e that serves input
…writing testdrive.cc is over the hook's 256 KiB limit; it is ASCII C++ source, not build output.
…t other clients' sessions
…ocket cap can hold one
Repository owner
deleted a comment from
UltimateC64Ultimate64fan
Sep 24, 2026
testdrive.cc is over the hook's 256 KiB limit; it is ASCII C++ source, not build output.
… frame the file holds
chrisgleissner
marked this pull request as draft
September 25, 2026 08:12
…rename order testdrive.cc is over the hook's 256 KiB limit; it is ASCII C++ source, not build output.
chrisgleissner
marked this pull request as ready for review
September 25, 2026 14:56
Collaborator
Author
|
Hi @GideonZ , this SoftIEC follow-up PR is ready for review and merge after having spent countless hours on testing it against my Ultimate 64 Elite I and UII+L. For full details, please have a look at the PR description which explains each change and is up-to-date. Thank you. |
This was referenced Nov 7, 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.
Software IEC work that landed on the #881 branch after #881 was squash-merged, rebased onto
master. It completes the drive's CBM DOS compatibility, fixes the defects that running every E2E suite on two devices found, and fixes the Software IEC reports on #917, #918, #933 and #934.Fixes #820, #918, #933, #934. Refs #877, #881, #917.
Review the diff against
master, not the commit history. Some commits undo earlier ones.Size of the change
software/io/iec)itu.c, REST drives route, UCI targetroms/c64rom)x00_wrapper.ccsoftware/test, parser test and stubs)doc/)tests/,run-tests,tools/)Firmware without tests and docs: 37 files, +2212 / -405.
Firmware changes
Every defect fix below was shown failing before the fix and passing after it: on the host (
target/pc/linux/iecdrive,parse) and, where the device is needed to show it, on an Ultimate 64 Elite and an Ultimate II+L. "Host" and "device" in the Test column say where.Commands the drive did not implement
T-WA,T-WB,T-WD,T-WIS-8,S-9,S-DM-Wto$0077M-Wstill answers30.R-P,R-HEL,EU,EH,A,XH,D=Hlists hidden entries.EL:$,EU:$W-1,W-0##n, 3-byteB-PNinside a mounted image,Mopen suffixM-E98,UNKNOWN DRIVE CODEinstead of30.Defects in the drive
iec_code.iec.IecChannel::pop_more()also completed a file one pass early.iec-listen-timing, 27 checks, red on the old microcodePUT /v1/drives/softiec:reset,:on,:offdid nothing (also onmaster).reset()restarts the processor; the route maps to the drive's own commands.master).wr_pointeris cleared.30before,00afterPon a channel opened for writing beforeW-1wrote its buffered bytes and grew the file.Pon such a channel answers26.64but left a partial target.Pcould set a negative buffer pointer, and the next byte was written outside the buffer.30.W-1deleted an x00 file first.R-Hskipped the name checksRapplies.XL/XUlocked files. A case-only x00 rename answered63.R;XL/XUanswer30; the host file keeps its name.RDdeleting files and images,MD:A*, a 253-byte cut of UCI commands, scratch and copy dropping names after the eighth, relative files read past their end, and names over 16 characters.The 23 specification findings
RDdeleted whatever the name reached, including a plain host file or a whole disk image, andRD:with no name deleted the directory the drive stood inRDdeletes a directory only; an empty name answers34Suite11-SI063-RdOnlyDirectoriesMD:answered63,MD:A*created a directory with an escaped wildcard, andMD:NAME.created a directory FAT then renamed, which could not be entered again34for no name,33for a wildcard or a trailing dot or spacetest_md_rd_grammar,Suite11-SI063-RdOnlyDirectoriesS:VICTIM,...scratchedVICTIM32Suite11-SI022-UciTooLongFOOas SEQ and as PRG); a REL file opened as another type answered6263without@,64with@; a REL file opened as another type answers64Suite11-SI035-TypeOfExistingNameR-Hat a partition root kept a name longer than 16 characters, and the root header then showed the last 16 whileG-Pshowed the first 16;R-Hwithout a colon renamed the current directory with the partition digits in the name34)Suite11-SI064-RootHeaderLengthC:ALL=F0,...,F9answered OK and copied eightSuite11-SI150-NameListsSuite11-SI150-CreatedNameLength00, OK, and a following write landed several records beyond the end;Ppast the end grew the file even when nothing was written; a file with a partial last record was padded by the wrong count; a record length byte of 44 (,) or 58 (:) could not be used$FFand50; the file grows only when a record is written, completing a partial last record first; the byte after,L,is the record length whatever it isSuite11-SI080-PastTheLastRecord,Suite11-SI080-RecordLengthBytes, parser64before the target is createdSuite11-SI075-CopyRelative7771Suite11-SI074-MoveChecksPon a plain file after it was read to its end answered61Suite11-SI082-PositionAfterEndPanswered31, an unopened channel6170, as the ROM and sd2iecSuite11-SI081-PositionChannelU0>restarted the IEC processor and put the drive back on its configured numberSuite11-SI103b-SettingAfterU0M-RorG-Preply that was not read became the status of the next command that succeededSuite11-SI105-UnreadReplyOPEN 1,8,0,"X,S,W"created a fileSD file_open()stateSuite11-SI070-SecondaryForcesModeW-1answered6226Suite11-SI102a-NewRelative$A0listed with the padding and a scratch by name missed it; an x00 file also opened under its host name$A0dropped; the header name is the only nameSuite11-SI144-HeaderNameOnlyG-Ppadded the partition name with$00$A0, as a CMD partition directory and sd2iecSuite11-SI041-NamePaddingX.D64lost its typeSD fat_open()Suite11-SI072-RawNamesU0>+CHR$(13)without a terminator answered30, because the terminator strip removed the device byteU0>is exempt from the strip, as the binaryCPis (SI-017)BLOCK-READand the other long spellings the 1541 manual prints answered30PMtyped shifted left the clock 12 hours wrong; the$=Tfilter accepted any marker and out-of-range fields30otherwiseCD4294967337//selected partition 41)Suite11-PartitionNumberBoundShared code changed, and why there
AGENTS.md rule 20 asks where a fix belongs. Each of these fixes the shared code, because the callers were written against the behaviour it is supposed to have.
FileManager::delete_file,renameFR_LOCKEDfor a file open for writing, or for a disk image with a file open inside it.550, the drive60, the browser shows the error.FF_FS_LOCK 0, closing the file writes its entry into the slot it had. A directory created in that slot became the volume root (found by the soak, present onmaster). Any client can be the writer.FF_FS_LOCKwould also refuse a second open and cap open files everywhere.FileManager::rename_implFileSystemCBMdir_set_label; name and id cut to 16 and 2 inset_volume_name.set_volume_nameoverwrote the DOS type with a long name.x00_wrapper.cc(new)$3643, and the browser could not run a P00 file.BrowsableDirEntry,S_renameFileTypeexists for S00, U00 or R00, so no type hook reaches those rows.Keyboard_C64(U2 family only)getch().Sampler::reset()IecChannel::log_line()+itu.citu.cgainsconsole_outbyte()printfatomic needs a lock in code that also runs in interrupts, which the RTOS ports cannot detect.Behaviour a user can notice
$unless=Hasks for it.file_open().B-Puses the third number as the high byte.fat_file_seek(); SI-080.G-Pand the partition list.550).Rejected alternatives
FF_FS_LOCKinstead of theFR_LOCKEDcheckprintfatomicSuite8).Testing
Host
makeintarget/pc/linux/{parse,parse_unsigned,iecdrive,iecdrive_unsigned,iecdrive_asan}: all pass, AddressSanitizer included. Every defect has a namedSuite11or parser case, run against the code before its fix (fails) and after (passes).All firmware targets build:
u64,u64ii,u2,u2pl(./build-tool -s), andu2plus.Devices
Ultimate 64 Elite (firmware over JTAG) and Ultimate II+L in a C64 Ultimate (flashed from the CI artifact of this branch). The C64 Ultimate runs its own 1.2RC firmware. All runs are on the final firmware
05046e0d, both devices at once, no retries. The Ultimate II+L runs the CI build of the PR merge commitb04f577c, whose tree is identical to05046e0d(masterhas not moved).rel-copy,iec-dos-commands,uci-targets,softiec-soak) under JiffyDOSThe device checks for the four fixes of the last review failed on
39413642, the firmware before them, and pass on05046e0d, on both devices:iec-dos-commands3941364205046e0dPon a channel opened beforeW-100, OK, and the file grew to 256 bytes26, the file is empty64, andRBOTH.relwas left behind64, no targetDELEof a D64 with a file open for writing inside550Rof an x00 file open for writing60, but the header already namedRENAMEDOPEN60, the header is unchangedThe one failure in run K was the "enter a TAP index" row of
browser-filesystem-refresh, run insidebrowser-refresh-leakon the Ultimate II+L. The Telnet browser kept showingimenu1.idxat 20 bytes for the 3 s allowance, while the menu, FTP and REST all showed 31. The same suite passed on its own in the same run, and the same kind of failure was recorded on this cartridge on 21 September, before these changes. The code involved is not changed by this PR. Each browser's event queue holds 8 events, andsendEventToObservers()drops an event without logging when the queue stays full for 5 ticks. A dropped final refresh would leave the Telnet view stale in this way; that has not been proven on the device.Earlier on this branch: the four-hour
softiec-soakpassed on both devices; the exhaustive profile ran all three UI modes;network-connectionpassed on every machine and link.Test harness changes (each fixes a cause of a failed or misleading run)
iec-dos-commandsT-W,S-9/S-D,M-W $0077(KERNAL and CMD timing),W-1(includingPand an open channel),EL:$/EU:$against the drive and FTP, LOAD lengths around 254/512 bytes, x00 renames, relative copy, delete of an open file or image, reset of a half-received command.iec-dos-commandsiec-listen-timing(new)iec_talker.asmsends LISTEN transactions at CMD or KERNAL bit pace with chosen UNLISTEN pauses; 20 swaps; 60 random files. Fails if device 11 or 12 is taken.iec-partition-file(new)softiec-log-lines(new)rel-copy62an earlier suite left as its first status.UI.uci-targets$DF1Band with IDENTIFY.softiec-soakrun-tests,tests/lib/kernal.py--kernal,--command-interface, checked against$E000; every restore step runs.run-testssyslog collectorinputav-stream,streams.py/v1/infounique id matches the target's.ultimax-cartridgeprg-context-menu,prg-load-path-trimtape-playbacknetwork-connectionheap-leak,mount-cache-leakhealth.pyident-leak,usb-keyboard-repeattelnet-sustained-inputtelnet-stale-session, Telnet backendprintertools/softiec_traceability.pyNot changed, with the reason
EL/EU/Aanswers62instead of the error.UJandIanswer00/73after a write refused underW-1.unfreeze()when the clock is lost, and instart_cartridge(); the deferral counter is not atomic.Nin a mounted image does not hold the file manager lock.masterthat this PR does not touch; the one run K failure above is consistent with it but not proven.The UCI KERNAL fix reaches users only when they build
roms/c64romor install an image built from it; the firmware image does not contain it. The KERNAL's jump table, vectors and checksum ($E0) are unchanged and 496 bytes of its segment stay free.Verified on hardware: Ultimate 64 Elite, Ultimate II+L. Built but not run on hardware: Ultimate 64 II, Ultimate II+ (the keyboard scan change applies to both U2 variants).
Build size