diff --git a/.github/workflows/fox32-unstable-linux.yml b/.github/workflows/fox32-unstable-linux.yml index 22cbd91..5a4a43a 100644 --- a/.github/workflows/fox32-unstable-linux.yml +++ b/.github/workflows/fox32-unstable-linux.yml @@ -13,6 +13,13 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Download latest fox32rom artifact + uses: dawidd6/action-download-artifact@v2 + with: + repo: fox32-arch/fox32rom + workflow: fox32rom-unstable.yml + workflow_conclusion: success + - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/fox32-unstable-windows.yml b/.github/workflows/fox32-unstable-windows.yml index 09e671c..230987c 100644 --- a/.github/workflows/fox32-unstable-windows.yml +++ b/.github/workflows/fox32-unstable-windows.yml @@ -13,6 +13,13 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Download latest fox32rom artifact + uses: dawidd6/action-download-artifact@v2 + with: + repo: fox32-arch/fox32rom + workflow: fox32rom-unstable.yml + workflow_conclusion: success + - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: diff --git a/README.md b/README.md index a921f8b..7e4f611 100644 --- a/README.md +++ b/README.md @@ -10,17 +10,17 @@ **Note: This software is still very much in an early stage, and is currently more focused towards developers rather than end-users.** -Prebuilt binaries are available on the [GitHub Actions page](https://github.com/fox32-arch/fox32/actions). +Stable releases are available on the [Releases page](https://github.com/fox32-arch/fox32/releases). + +Prebuilt binaries of the latest commit are also available on the [GitHub Actions page](https://github.com/fox32-arch/fox32/actions). ### Building -Simply run `cargo build --release`. The resulting binary will be saved as `target/release/fox32`. You can also run `cargo run --release` if you want to run it directly. +Download the latest release of [**fox32rom**](https://github.com/fox32-arch/fox32rom/releases). Create a folder in the root of this repo called `fox32.rom`, and place the downloaded `fox32.rom` file into that directory. Then simply run `cargo build --release`. The resulting binary will be saved as `target/release/fox32`. You can also run `cargo run --release` if you want to run it directly. ### Usage -**fox32** attempts to read its ROM (called **fox32rom**) 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. **fox32rom** can be found [here](https://github.com/fox32-arch/fox32rom). - -Passing files as arguments will mount those files as disks, in the order that the arguments were passed. +Passing files as arguments will mount those files as disks, in the order that the arguments were passed. The most common use case is passing the [**fox32os**](https://github.com/fox32-arch/fox32os) disk image as the first argument: `fox32 fox32os.img` See [encoding.md](docs/encoding.md) for information about the instruction set. diff --git a/src/main.rs b/src/main.rs index f8ef2c1..c3b47fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,9 +58,9 @@ pub struct Overlay { fn read_rom() -> Vec { read("fox32.rom").unwrap_or_else(|_| { - println!("fox32.rom not found, attempting to open ../fox32rom/fox32.rom instead"); read("../fox32rom/fox32.rom").unwrap_or_else(|_| { - error("fox32.rom not found!"); + println!("fox32.rom file not found, using embedded ROM"); + include_bytes!("../fox32.rom/fox32.rom").to_vec() }) }) } @@ -79,10 +79,6 @@ fn main() { println!("{}", version_string); let args: Vec = env::args().collect(); - /*if args.len() != 2 { - println!("fox32\nUsage: {} ", &args[0]); - exit(1); - }*/ let mut display = Display::new(); let keyboard = Arc::new(Mutex::new(Keyboard::new()));