From 10c78696bd84ddc7db3f4d609d861b8fffd00784 Mon Sep 17 00:00:00 2001 From: Simon Dick Date: Fri, 23 Oct 2026 16:23:24 +0100 Subject: [PATCH] Bump version to 0.13.0 Fills in the 0.13 changelog: ixemul.library's full path-based file I/O (GetDeviceProc's dvp_Port, the path packet actions, and Info()) from #197/#198, Supervisor()'s real exception frame unblocking nested library calls from #199, the dl_TimeReq clock() fix from #194, the remaining AllocDosObject types (DOS_STDPKT/DOS_CLI) from #187, and #200's new_lock leak fix. Also documents these in Supported-Libraries.md (expanded packet-action list, Supervisor's RTE-anywhere support, dl_TimeReq). Co-Authored-By: Claude Sonnet 5 --- Cargo.lock | 4 +-- crates/volamos-core/Cargo.toml | 2 +- crates/volamos/Cargo.toml | 2 +- userdocs/Changelog.md | 60 +++++++++++++++++++++++++++++++++ userdocs/Supported-Libraries.md | 25 +++++++++++--- 5 files changed, 84 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a44ca0..c88e2a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -564,7 +564,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "volamos" -version = "0.12.0" +version = "0.13.0" dependencies = [ "clap", "volamos-core", @@ -572,7 +572,7 @@ dependencies = [ [[package]] name = "volamos-core" -version = "0.12.0" +version = "0.13.0" dependencies = [ "libc", "m68k", diff --git a/crates/volamos-core/Cargo.toml b/crates/volamos-core/Cargo.toml index 1c6e243..e727aaa 100644 --- a/crates/volamos-core/Cargo.toml +++ b/crates/volamos-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "volamos-core" -version = "0.12.0" +version = "0.13.0" edition.workspace = true license.workspace = true repository.workspace = true diff --git a/crates/volamos/Cargo.toml b/crates/volamos/Cargo.toml index 9589c62..26239fb 100644 --- a/crates/volamos/Cargo.toml +++ b/crates/volamos/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "volamos" -version = "0.12.0" +version = "0.13.0" edition.workspace = true license.workspace = true repository.workspace = true diff --git a/userdocs/Changelog.md b/userdocs/Changelog.md index 876ecc8..a247428 100644 --- a/userdocs/Changelog.md +++ b/userdocs/Changelog.md @@ -3,6 +3,66 @@ This page tracks major milestones during development, following the version scheme in `Cargo.toml`. +## 0.13 + +- **`ixemul.library`-linked programs run a full round of path-based + file I/O** (issues #186, #196) — `ixemul`'s `__plock()` resolves + every path itself via `GetDeviceProc()` then raw `DosPacket`s sent + straight to `dvp_Port`, which this runtime left `NULL`, so every + path-based call (`open()`, `mkdir()`, `stat()`, `rename()`, + `unlink()`, `opendir()`) failed with `ENOENT` before any packet was + even sent. `GetDeviceProc` now returns the same synthetic filesystem + packet port every lock's `fl_Task`/handle's `fh_Type` already does. + With a real destination, `handle_fs_packet` now answers the rest of + the path actions ixemul sends — `ACTION_CREATE_DIR`, + `ACTION_DELETE_OBJECT`, `ACTION_RENAME_OBJECT`, `ACTION_MAKE_LINK` + (hard and soft), `ACTION_SET_PROTECT`, `ACTION_SET_DATE`, + `ACTION_SET_OWNER`, `ACTION_SET_FILE_SIZE`, `ACTION_WAIT_CHAR`, and + `ACTION_DISK_INFO` — plus `dos.library`'s `Info()` call ixemul makes + when resolving a path through `/`. An unknown packet action's + `Res1` is now `DOSFALSE` rather than `-1`, which a caller reading it + as a boolean (ixemul's `mkdir()`) previously misread as success. + Verified against the real `ixemul.library` 80.1 SDK: a test program + covering mkdir, open/create, read/write/lseek, fstat, ftruncate, + `O_APPEND`, `O_EXCL`, `ENOENT`, rename, opendir/readdir, unlink, and + rmdir now passes all 21 checks on `--cpu 68000` and `68020`, with and + without `--sanitize`. + +- **`exec.library`'s `Supervisor()` enters its routine through a real + exception frame** (issue #192) — it used to push a 6-byte 68000 + frame regardless of the emulated CPU, so a 68010+'s `RTE` (which + reads a format word after the PC) ran off the end of guest memory on + `--cpu 68020`/`68040`. `Supervisor()` now switches to supervisor mode + and the supervisor stack and pushes the frame the model's `RTE` + actually pops — SR, PC, and on a 68010+ a format-0 vector word — + the same way a real hardware exception does. This also fixes a + second, independent gap: the routine may now make its own library + calls and `RTE` anywhere, not just back to its caller, which + unblocks `ixemul.library`'s `expunge()` cleanup (`sigreturn()`'s + `Supervisor()`-based `longjmp()`) on normal program exit. gcc's + `setjmp`/`longjmp` execute-testsuite cases now pass against both + `ixemul` 47.3 and 80.1 at every optimization level. + +- **libnix's `clock()` no longer crashes** — it reads + `DOSBase->dl_TimeReq->io_Device` directly and calls through it at + `ReadEClock`'s LVO instead of going through `OpenDevice`/`DoIO`, a + documented RKRM idiom real `dos.library` relies on internally. + `dl_TimeReq` previously held whatever the sentinel prefill left + there; it's now a real `timerequest` pointing at `timer.device`, + exactly as an explicit `OpenDevice("timer.device")` already + produces. + +- **`AllocDosObject`/`FreeDosObject`** gain the two remaining + `` types: `DOS_STDPKT` (a `StandardPacket` linked the + documented way for `SendPkt`/`WaitPkt`) and `DOS_CLI` (a + `CommandLineInterface` with its four `BSTR` buffers sized per + ``'s `ADO_*Len` tags). Every object type the header + defines is now implemented. + +- Fixed a guest-heap leak in `Lock`'s `new_lock`: if allocating the + synthetic filesystem port failed right after the `FileLock` struct + itself was allocated, the `FileLock` block was never freed. + ## 0.12 - **`ixemul.library`-linked programs run file I/O** (issue #186) — diff --git a/userdocs/Supported-Libraries.md b/userdocs/Supported-Libraries.md index 50f99d9..fa9e11d 100644 --- a/userdocs/Supported-Libraries.md +++ b/userdocs/Supported-Libraries.md @@ -54,9 +54,18 @@ Changelog. `ACTION_READ`/`ACTION_WRITE`/`ACTION_SEEK`/`ACTION_END`, `ACTION_LOCATE_OBJECT` (`Lock`), `ACTION_FINDINPUT`/ `ACTION_FINDOUTPUT`/`ACTION_FINDUPDATE` (`Open`), `ACTION_EXAMINE_FH`, - `ACTION_READ_LINK`, and `ACTION_DISK_INFO`/`ACTION_INFO`/ - `ACTION_IS_FILESYSTEM` sent to a volume's own task. Any other packet - type fails cleanly with `ERROR_ACTION_NOT_KNOWN`. + `ACTION_READ_LINK`, `ACTION_CREATE_DIR`/`ACTION_DELETE_OBJECT`/ + `ACTION_RENAME_OBJECT`/`ACTION_MAKE_LINK` (hard and soft), + `ACTION_SET_PROTECT`/`ACTION_SET_DATE`/`ACTION_SET_OWNER`/ + `ACTION_SET_FILE_SIZE`, `ACTION_WAIT_CHAR`, and + `ACTION_DISK_INFO`/`ACTION_INFO`/`ACTION_IS_FILESYSTEM` sent to a + volume's own task. Every lock's `fl_Task` and `GetDeviceProc`'s + `dvp_Port` point at this same synthetic handler port, so a caller + that resolves it itself (as `ixemul.library`'s `__plock()` does) + reaches it too. Any other packet type fails cleanly with + `ERROR_ACTION_NOT_KNOWN`; an unknown action's `Res1` is `DOSFALSE`, + not `-1`, matching real `dos.library` for callers that read it as a + boolean. - Path strings: `SplitName` (alongside `AddPart`/`FilePart`/`PathPart`). - The `DosList`: `LockDosList`/`UnLockDosList`/`FindDosEntry`/`Info`. - `LoadSeg`/`UnLoadSeg` (real `BPTR` seglists), `RunCommand`, and @@ -138,7 +147,10 @@ Changelog. ignores the chip/fast flags, so an allocation's answer depends only on where the heap placed it. - CPU-detection plumbing: `AttnFlags` (a real, guest-readable - `ExecBase` field, not a call), `CacheControl`, `Supervisor`. + `ExecBase` field, not a call), `CacheControl`, `Supervisor` (enters + the routine through a real exception frame — a 68010+ format-0 + vector word included — so it may make further library calls and + `RTE` anywhere, not just back to the caller). ## utility.library @@ -182,7 +194,10 @@ bug in volamos. Real time-arithmetic (`AddTime`/`SubTime`/`CmpTime`/`ReadEClock`/ `GetSysTime`) via the documented `io_Device`-as-library-base idiom -real AmigaOS code uses to call these functions. +real AmigaOS code uses to call these functions. `dos.library`'s +`DOSBase->dl_TimeReq` is a real `timerequest` with its `io_Device` +pointing here too, for callers (e.g. libnix's `clock()`) that read it +directly instead of going through `OpenDevice`. ## Deliberately out of scope