### Install and Build SDL with vcpkg Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Installs cargo-vcpkg, builds SDL using vcpkg, and then builds the project. Ensure you have a local vcpkg installation. ```bash cargo install cargo-vcpkg cargo vcpkg build cargo build ``` -------------------------------- ### Install Dependencies and Build Web Frontend Source: https://github.com/joamag/boytacean/blob/master/CLAUDE.md Installs Node.js dependencies and builds the web frontend using yarn. ```bash cd frontends/web && yarn install && yarn build ``` -------------------------------- ### Develop Python Bindings with setup.py Source: https://github.com/joamag/boytacean/blob/master/CLAUDE.md Installs the Python bindings in development mode using setup.py. ```bash python setup.py develop ``` -------------------------------- ### Install Boytacean Python Library Source: https://github.com/joamag/boytacean/blob/master/README.md Install the Python package for Boytacean using pip or setup.py. ```bash pip install . ``` ```bash python setup.py install ``` -------------------------------- ### Build SDL on Windows with vcpkg Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Installs cargo-vcpkg and builds the project on Windows. Assumes vcpkg is set up. ```bash cargo install cargo-vcpkg cargo build ``` -------------------------------- ### Install Python Bindings in Develop Mode Source: https://github.com/joamag/boytacean/blob/master/CLAUDE.md Installs the Python bindings in development mode using pip. ```bash pip install -e . ``` -------------------------------- ### Install SDL Dependencies on Linux (Ubuntu) Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Installs necessary SDL development libraries for Linux (Ubuntu) before building. Run this before 'cargo vcpkg build'. ```bash sudo apt install libsdl2-dev libasound2-dev libpulse-dev ``` -------------------------------- ### Install and Use Cargo Watch Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Installs the cargo-watch tool and uses it to automatically recompile and run the project on code changes. ```bash cargo install cargo-watch cargo watch -x run ``` -------------------------------- ### Install Python Packages and Rust Toolchain Source: https://github.com/joamag/boytacean/blob/master/AGENTS.md Installs necessary Python dependencies and configures the Rust toolchain to the nightly version, including essential components like rustfmt and clippy. ```bash pip install -r requirements.txt rustup default nightly rustup component add rustfmt rustup component add clippy cargo install cargo-vcpkg ``` -------------------------------- ### Add Android Rust Targets Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Installs the necessary Rust targets for Android compilation. ```bash rustup target add aarch64-linux-android rustup target add armv7-linux-androideabi rustup target add i686-linux-android ``` -------------------------------- ### Loading a Playlist via URL Parameter Source: https://github.com/joamag/boytacean/blob/master/doc/playlists.md To load a playlist, append its URL to the emulator's base URL using the `playlist_url` or `playlist` GET parameter. ```text https://boytacean.joao.me?playlist_url=https://example.com/playlist.json ``` -------------------------------- ### Add Arm64 Linux Rust Target Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Installs the necessary Rust target for Arm64 Linux compilation. ```bash rustup target add aarch64-unknown-linux-gnu ``` -------------------------------- ### Convert PNG to 2BPP using rgbgfx Source: https://github.com/joamag/boytacean/blob/master/src/boot/README.md Use this command to convert a PNG image into the 2BPP format required for Boytacean graphics. Ensure you have rgbds installed. ```bash rgbgfx -Z -c embedded -t logo.tilemap -o logo.2bpp logo.png ``` -------------------------------- ### Force Rebuild SDL on Mac OS Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md A more aggressive troubleshooting step for SDL build issues on Mac OS, involving removing the 'installed' directory within vcpkg. ```bash rm -rf ~/vcpkg/installed ``` -------------------------------- ### Build SDL Frontend Source: https://github.com/joamag/boytacean/blob/master/AGENTS.md Navigates to the SDL frontend directory and builds the frontend using Cargo. ```bash cd frontends/sdl && cargo build ``` -------------------------------- ### Build and Run Boytacean SDL Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Compiles the project and then runs the emulator. Use this for standard execution. ```bash cargo build cargo run ``` -------------------------------- ### Build SDL Frontend with Cargo Source: https://github.com/joamag/boytacean/blob/master/CLAUDE.md Builds the SDL frontend executable for the release version using Cargo. ```bash cargo build --release --bin boytacean-sdl ``` -------------------------------- ### Complete 2BPP Conversion with Compression Source: https://github.com/joamag/boytacean/blob/master/src/boot/README.md This sequence of commands demonstrates the full process of converting a PNG to 2BPP, compressing it using pb12.py, decompressing it, and then converting it back to PNG. This is useful for testing the entire pipeline. ```bash rgbgfx -Z -c embedded -t logo.tilemap -o logo.2bpp logo.png python pb12.py compress logo.2bpp logo.pb12 python pb12.py decompress logo.pb12 logo.decompress.2bpp rgbgfx -Z -r 16 -o logo.decompress.2bpp -t logo.tilemap logo.reverse.png ``` -------------------------------- ### Create Android Standalone Toolchains Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Creates standalone toolchains for Android development for various architectures. Ensure the NDK_HOME environment variable is set. ```bash mkdir -p ndk ${NDK_HOME}/build/tools/make_standalone_toolchain.py --api 26 --arch arm64 --install-dir ndk/arm64 ${NDK_HOME}/build/tools/make_standalone_toolchain.py --api 26 --arch arm --install-dir ndk/arm ${NDK_HOME}/build/tools/make_standalone_toolchain.py --api 26 --arch x86 --install-dir ndk/x86 ``` -------------------------------- ### Build Boytacean Console Source: https://github.com/joamag/boytacean/blob/master/frontends/console/README.md Standard command to build the project locally using Cargo. ```bash cargo build ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/joamag/boytacean/blob/master/AGENTS.md Executes all project tests, including those requiring SIMD acceleration, debug features, and Python bindings. ```bash cargo test --all-targets --features simd,debug,python ``` -------------------------------- ### Build WASM for Web Source: https://github.com/joamag/boytacean/blob/master/README.md Compile the project to WebAssembly for web browsers using wasm-pack, then build the web front-end. ```bash cargo install wasm-pack wasm-pack build --release --target=web --out-dir=frontends/web/lib -- --features wasm cd frontends/web npm install && npm run build cd dist && python3 -m http.server ``` -------------------------------- ### Run Emulator in Headless Mode Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Executes the emulator without a graphical interface, outputting to stdout. Requires specifying ROM path, cycles, and other parameters. ```bash cargo run -- --rom-path ../../res/roms/test/blargg/cpu/cpu_instrs.gb --cycles 100000000 --headless --device stdout --unlimited ``` -------------------------------- ### Create Arm64 Windows Toolchain Symlink Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Creates a symbolic link for the Arm64 Windows toolchain using mklink. Ensure the ARM64_TOOLCHAIN environment variable is set. ```bash mklink /D aarch64-linux-gnu %ARM64_TOOLCHAIN% ``` -------------------------------- ### Set Different Palette and Run Frames Source: https://github.com/joamag/boytacean/blob/master/examples/ipython/pocket.ipynb Applies a different color palette ('christmas') and continues emulation. This demonstrates switching between visual themes during runtime. ```python gb.set_palette("christmas") for _ in range(400): gb.next_frame() gb.image() ``` -------------------------------- ### Create Arm64 Linux Toolchain Symlink Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Creates a symbolic link for the Arm64 Linux toolchain in the project's root directory. Ensure the ARM64_TOOLCHAIN environment variable is set. ```bash ln -s $ARM64_TOOLCHAIN aarch64-linux-gnu ``` -------------------------------- ### Run Emulator with CRT Shader Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Executes the emulator and applies a CRT effect using a specified shader. Requires a ROM path. ```bash cargo run -- --rom-path path/to/game.gb --shader crt ``` -------------------------------- ### Build and Run Libretro Core with Debugging on macOS Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Builds the libretro core with debug features enabled and copies it to the RetroArch directory. Enables RUST_BACKTRACE for debugging. ```bash export RUST_BACKTRACE=1 cargo build --features debug cp -p ../../target/debug/libboytacean_libretro.dylib ~/Library/Application\ Support/RetroArch/cores/boytacean_libretro.dylib ``` -------------------------------- ### Troubleshoot arm64 SDL Build on Mac OS Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Advanced troubleshooting for SDL builds on arm64 Mac OS, including clearing vcpkg caches and potentially removing Cargo.lock. ```bash rm -rf ~/.vcpkg-root rm -rf ~/.cache/vcpkg cargo vcpkg -v build ``` -------------------------------- ### Run Benchmarks with Cargo Source: https://github.com/joamag/boytacean/blob/master/CLAUDE.md Executes the performance benchmarks for the Rust project using Cargo. ```bash cargo bench ``` -------------------------------- ### Build Boytacean Libretro for Arm64 Linux Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Builds the Boytacean libretro core for the Arm64 Linux target in release mode. ```bash cargo build --target=aarch64-unknown-linux-gnu --release ``` -------------------------------- ### Build WASM for Node.js Source: https://github.com/joamag/boytacean/blob/master/README.md Compile the project to WebAssembly for Node.js environments using wasm-pack. ```bash cargo install wasm-pack wasm-pack build --release --target=nodejs -- --features wasm ``` -------------------------------- ### Copy Libretro Core and Info for macOS Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Copies the compiled libretro core and its info file to the RetroArch directory on macOS. ```bash cargo build --release cp -p ../../target/release/libboytacean_libretro.dylib ~/Library/Application\ Support/RetroArch/cores/boytacean_libretro.dylib cp -p res/boytacean_libretro.info ~/Library/Application\ Support/RetroArch/info/boytacean_libretro.info ``` -------------------------------- ### Create Arm64 Windows Toolchain Symlink (PowerShell) Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Creates a symbolic link for the Arm64 Windows toolchain using New-Item in PowerShell. Ensure the ARM64_TOOLCHAIN environment variable is set. ```powershell New-Item -ItemType SymbolicLink -Path aarch64-linux-gnu -Target $env:ARM64_TOOLCHAIN ``` -------------------------------- ### Build Release Version with Cargo Source: https://github.com/joamag/boytacean/blob/master/CLAUDE.md Builds the release version of the Rust project using Cargo. ```bash cargo build --release ``` -------------------------------- ### Build Boytacean Libretro for Android Source: https://github.com/joamag/boytacean/blob/master/frontends/libretro/README.md Builds the Boytacean libretro core for different Android architectures in release mode. ```bash cargo build --target=aarch64-linux-android --release cargo build --target=armv7-linux-androideabi --release cargo build --target=i686-linux-android --release ``` -------------------------------- ### Build with Debug Features Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Compiles the project with the 'debug' feature flag enabled for increased verbosity and debugging information. ```bash cargo build --features debug ``` -------------------------------- ### Troubleshoot vcpkg Build Issues Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Steps to resolve issues with `cargo vcpkg build`, including removing cache and rebuilding packages. It's recommended to delete the 'target' directory as well. ```bash rm -rf ~/.vcpkg-root rm -rf target cargo vcpkg build ``` -------------------------------- ### Format and Lint Code Source: https://github.com/joamag/boytacean/blob/master/AGENTS.md Applies code formatting using `cargo fmt` and runs `cargo clippy` for linting and fixing potential issues across all features and targets. ```bash cargo fmt --all cargo clippy --fix --allow-dirty --allow-staged --all-features --all-targets black . ``` -------------------------------- ### Reverse 2BPP to PNG using rgbgfx Source: https://github.com/joamag/boytacean/blob/master/src/boot/README.md This command reverses the 2BPP file format back to a PNG image. It's useful for previewing or editing graphics. ```bash rgbgfx -Z -r 16 -o logo.2bpp -t logo.tilemap logo.reverse.png ``` -------------------------------- ### Load ROM and Run Frames Source: https://github.com/joamag/boytacean/blob/master/examples/ipython/pocket.ipynb Loads a GameBoy ROM and advances the emulation by a specified number of frames. Requires the GameBoy class and a ROM file path. ```python from boytacean import GameBoy ROM_PATH = "../../res/roms/demo/pocket.gb" gb = GameBoy(apu_enabled=False, serial_enabled=False) gb.load_rom(ROM_PATH) for _ in range(220): gb.next_frame() gb.image() ``` -------------------------------- ### Video Capture with Specific Format and FPS Source: https://github.com/joamag/boytacean/blob/master/examples/ipython/pocket.ipynb Records the GameBoy emulation output as a video file using a context manager. Allows specifying video codec, file extension, and frame rate. ```python with gb.video_capture(video_format="avc1", video_extension="mp4", fps=60): for _ in range(400): gb.next_frame() ``` -------------------------------- ### Run Rust Tests with Cargo Source: https://github.com/joamag/boytacean/blob/master/CLAUDE.md Executes all tests for the Rust project using Cargo. ```bash cargo test ``` -------------------------------- ### Complete vcpkg Reset Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md The 'atomic bomb' approach to resolving persistent vcpkg issues by removing the entire ~/.vcpkg directory. ```bash rm -rf ~/.vcpkg ``` -------------------------------- ### Create a New Branch Source: https://github.com/joamag/boytacean/blob/master/CONTRIBUTING.md Branching strategy for new features. Ensure your branch name is descriptive. ```git git checkout -b feature-xyz ``` -------------------------------- ### Set Palette and Run Frames Source: https://github.com/joamag/boytacean/blob/master/examples/ipython/pocket.ipynb Sets a specific color palette for the GameBoy display and advances the emulation. Use this to change the visual theme of the emulation. ```python gb.set_palette("hogwards") for _ in range(400): gb.next_frame() gb.image() ``` -------------------------------- ### Set Rust Toolchain to MSVC Source: https://github.com/joamag/boytacean/blob/master/frontends/sdl/README.md Ensures the active Rust toolchain is MSVC-based, which is often required for Windows builds. ```bash rustup default stable-msvc ``` -------------------------------- ### Cross-Compile Boytacean Console for WASM-WASI Source: https://github.com/joamag/boytacean/blob/master/frontends/console/README.md Command to cross-compile the project for the WASM-WASI target. ```bash cargo build --target wasm32-wasip1 ``` -------------------------------- ### Run Python Tests with Pytest Source: https://github.com/joamag/boytacean/blob/master/CLAUDE.md Executes the Python test suite using pytest. ```bash pytest ``` -------------------------------- ### Playlist JSON - Array Form Source: https://github.com/joamag/boytacean/blob/master/doc/playlists.md The simplest playlist format is a raw JSON array of entry objects. Each entry must at least contain a 'name' and 'url'. ```json [ { "name": "My Homebrew Game", "url": "https://example.com/roms/game.gb" }, { "name": "Another Demo", "url": "https://example.com/roms/demo.gbc", "description": "A colourful CGB demo." } ] ``` -------------------------------- ### Decompress BOSC Files Source: https://github.com/joamag/boytacean/blob/master/README.md Use the BOSC decompressor utility to convert BOSC files to BOS format. ```bash cargo run --release --bin bosc-decompress -- ``` -------------------------------- ### Commit Changes Source: https://github.com/joamag/boytacean/blob/master/CONTRIBUTING.md Commit your code changes with a clear and concise message. ```git git commit -am "Add some feature" ``` -------------------------------- ### Playlist JSON - Object Form Source: https://github.com/joamag/boytacean/blob/master/doc/playlists.md A richer playlist format uses a JSON object that includes playlist-level metadata and an 'entries' array. This form allows for playlist name, author, version, and a default ROM. ```json { "name": "My Playlist", "description": "A collection of homebrew games.", "version": "1.0.0", "author": "Jane Doe", "authorEmail": "jane@example.com", "releaseDate": "2026-05-31", "defaultUrl": "https://example.com/roms/game.gb", "useThumbnail": true, "entries": [ { "name": "My Homebrew Game", "url": "https://example.com/roms/game.gb", "description": "The flagship game of this collection.", "thumbnail": "https://example.com/thumbs/game.png", "thumbnailSmall": "https://example.com/thumbs/game-small.png", "igdbId": 12345 } ] } ``` -------------------------------- ### Push Changes to Branch Source: https://github.com/joamag/boytacean/blob/master/CONTRIBUTING.md Push your local branch with committed changes to the remote repository. ```git git push origin feature-xyz ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.