diff --git a/README.md b/README.md index e93fa9d..3cf9743 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ After that, just run `cargo build --release`. The resulting binary will be saved **fox32** attempts to read its ROM from a file called `fox32.rom` in the current directory. If this file isn't found then it falls back to `../fox32rom/fox32.rom`, and if this file isn't found then it exits. -Passing a file as an argument will mount that file as Disk 0. +Passing files as arguments will mount those files as disks, in the order that the arguments were passed. See [encoding.md](encoding.md) for information about the instruction set. diff --git a/src/main.rs b/src/main.rs index a496526..0ba18ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -102,7 +102,11 @@ fn main() { }; if args.len() > 1 { - bus.disk_controller.insert(File::open(&args[1]).expect("failed to load provided disk image"), 0); + let mut args_iter = args.iter(); + args_iter.next(); + for (i, arg) in args_iter.enumerate() { + bus.disk_controller.insert(File::open(&arg).expect("failed to load provided disk image"), i as u8); + } } let (mut runtime, memory): (Box, MemoryWrapped) = {