bedrock-pc

bedrock-pc is an assembler and emulator for the Bedrock computer system that runs on Windows and Linux computers, written in Rust.

Installation

Source code can be found at code.benbridle.com/bedrock-pc.

The latest release is available as pre-built executables for Windows or Linux:

Build from source

To build bedrock-pc from source, first install the Rust compiler from www.rust-lang.org/tools/install, and then run cargo build --release inside the bedrock-pc source code directory.

The compiled binary will be created at ./target/release/br.

Usage

The following commands will assume that the bedrock-pc program is available under the name br. The program will act as a Bedrock emulator when invoked as br ..., and will act as a Bedrock assembler when invoked as br asm ..., with different help and version information printed when in either mode.

To assemble a source code file program.brc and save the result as the program program.br, run the command:

br asm program.brc program.br

To run an assembled program program.br, run the command:

br program.br

If no program path is passed to br, the program will be read from standard input, and if no destination path is passed to br asm, the assembled program will be written to standard output. This means that on Linux computers, a program can be assembled and run with the following command:

br asm program.brc | br

To change the zoom level of the program window, either pass the flag -z to the emulator or use the F5 and F6 keys when the program is running.

The file device is sandboxed by default to the C:\Users\<user>\AppData\Roaming\bedrock\<program> directory on Windows, or the /home/<user>/.config/bedrock/<program> directory on Linux.

To see the full list of available flags, run br asm --help or br --help.

Development

The assembler is fully implemented. The emulator implements the system, memory, math, clock, input, and screen devices, and partially implements the stream and file devices.

License

bedrock-pc is licensed under the MIT License. Feel free to use it, change it, and share it however you want.