Skip to content
Open
14 changes: 9 additions & 5 deletions copperline.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,22 @@ video = "PAL"


# Host directories mounted directly as AmigaDOS volumes (HOSTFS0:,
# HOSTFS1:, ...), served live with no disk image in between. Read-only for
# now: write operations fail with "disk is write-protected". Up to 16
# mounts. volume defaults to the directory name. bootpri (-128..127,
# default -128 = never boot) enters the boot-device vote: hard-disk boot
# partitions typically sit at 0 and DF0: at 5.
# HOSTFS1:, ...), served live with no disk image in between: the guest reads
# and writes the host's files directly, and changes land in the directory as
# you would expect. Up to 16 mounts. volume defaults to the directory name.
# bootpri (-128..127, default -128 = never boot) enters the boot-device vote:
# hard-disk boot partitions typically sit at 0 and DF0: at 5. readonly exports
# the directory write-protected: the guest sees a read-only disk and every
# write fails, which is worth setting on anything you would rather the Amiga
# could not damage.
# [[filesys]]
# path = "/data/amiga/Workbench"
# volume = "Workbench"
# bootpri = 6
#
# [[filesys]]
# path = "/data/amiga/downloads"
# readonly = true


# Presentation options. overscan: "tv" (default; mask deep horizontal
Expand Down
8 changes: 8 additions & 0 deletions src/amigaos/dos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,20 @@ pub const ACTION_EXAMINE_FH: i32 = 1034; // ExamineFH()
pub const DOSTRUE: u32 = 0xFFFF_FFFF;
pub const DOSFALSE: u32 = 0;
pub const ERROR_OBJECT_IN_USE: u32 = 202;
pub const ERROR_OBJECT_EXISTS: u32 = 203;
pub const ERROR_DIRECTORY_NOT_FOUND: u32 = 204;
pub const ERROR_OBJECT_NOT_FOUND: u32 = 205;
pub const ERROR_INVALID_COMPONENT_NAME: u32 = 206;
pub const ERROR_ACTION_NOT_KNOWN: u32 = 209;
pub const ERROR_INVALID_LOCK: u32 = 211;
pub const ERROR_OBJECT_WRONG_TYPE: u32 = 212;
pub const ERROR_DISK_WRITE_PROTECTED: u32 = 214;
pub const ERROR_RENAME_ACROSS_DEVICES: u32 = 215;
pub const ERROR_DIRECTORY_NOT_EMPTY: u32 = 216;
pub const ERROR_SEEK_ERROR: u32 = 219;
pub const ERROR_DISK_FULL: u32 = 221;
pub const ERROR_DELETE_PROTECTED: u32 = 222;
pub const ERROR_WRITE_PROTECTED: u32 = 223;
pub const ERROR_NO_MORE_ENTRIES: u32 = 232;
/// ACTION_SEEK Arg3 modes (dos/dos.h OFFSET_*).
pub const OFFSET_BEGINNING: i32 = -1;
Expand Down
6 changes: 6 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,10 @@ pub(crate) struct RawFilesysMount {
/// volume but never offers it as a boot candidate.
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) bootpri: Option<i8>,
/// Export the directory write-protected: the guest sees the volume as a
/// read-only disk and every write fails. Defaults to false.
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) readonly: Option<bool>,
}

/// `[input]` host-input preferences. Currently just the initial joystick input
Expand Down Expand Up @@ -2155,6 +2159,7 @@ impl TryFrom<RawConfig> for Config {
.unwrap_or_else(|| "HostFS".into())
}),
boot_pri: m.bootpri.unwrap_or(-128),
readonly: m.readonly.unwrap_or(false),
})
.collect(),
chipset,
Expand Down Expand Up @@ -2940,6 +2945,7 @@ mod tests {
path: std::path::PathBuf::from("."),
volume: volume.to_string(),
boot_pri: -128,
readonly: false,
}],
..Config::default()
};
Expand Down
Loading
Loading