diff options
author | Astatin <[email protected]> | 2025-06-18 17:59:16 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-06-18 17:59:16 +0200 |
commit | dbc9e0ae83d353dc3fdf7587cfa49da0363de582 (patch) | |
tree | 2297de650052d3871c298ad516c8b8ce5baf15ae | |
parent | 1796f5092361eec95fb7d7af2de90febc8132869 (diff) |
Update README and maybe fix github action
-rw-r--r-- | .github/workflows/rust.yml | 2 | ||||
-rw-r--r-- | README.md | 30 |
2 files changed, 22 insertions, 10 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 23df360..560b862 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,8 +15,8 @@ jobs: runs-on: ubuntu-latest steps: - - run: sudo apt-get install -yqq alsa - uses: actions/checkout@v4 + - run: sudo apt-get install -yqq alsa libasound2-dev libudev-dev - name: Download assembler run: wget https://github.com/AstatinChan/gameboy-asm/releases/download/latest/gbasm_linux-x86_64 - name: Make assembler executable @@ -4,11 +4,29 @@ Hii !! This is the emulator I use to make [BunnyLand (Temporary name)](https://g # Building the emulator -For reasons related to my Japanese visa, I will not distribute the boot roms in this repo, but I'm sure you know how to use the internet. +You need to put the bootrom you want the emulator to use in `assets/dmg_boot.bin`. There are a few bootroms you can find on the internet. -You need to put the dmg boot rom in the file `assets/dmg_boot.bin` and the cgb boot rom in the file `assets/cgb_boot.bin`. +If you want to use the Astatin logo bootrom the source is provided in `assets/Astatin-bootrom.gbasm`. -When you have both the boot roms ready, build the emulator with `cargo build --release`. It will give you a binary in `target/release/emulator`. +To assemble it yourself: +```bash +# Downloading directly the executable of the assembler (For linux x86_64) +# Alternatively you can follow the instructions here: +# https://github.com/AstatinChan/gameboy-asm/blob/latest/README.md +# to compile it yourself +wget https://github.com/AstatinChan/gameboy-asm/releases/download/latest/gbasm_linux-x86_64 +chmod +x gbasm_linux-x86-64 + +# Assembling the bootrom +./gbasm_linux-x86_64 assets/Astatin-bootrom.gbasm assets/dmg_boot.bin +``` + +After that you can build the emulator with +```bash +cargo build --release +``` + +The executable will be built in `target/release/emulator` # Usage @@ -25,8 +43,6 @@ If there is the message `No gamepad found` in the first messages, it means your (I don't know which gamepad exactly. The 8BitDo SF30 Pro in USB mode on Arch Linux works. That's all I know lol) -## CPU Usage - ## Speed You can adjust the speed with the `-s` argument @@ -53,10 +69,6 @@ This command will force the use of the keyboard: emulator <gameboy_rom> -k ``` -## Timing issues - -Timing used to be inaccurate using sleep syscalls. The problem should now be fixed but if the timing is inconsistant on your system you can try to use the `--loop-lock-timing` and see if it is better. Note that using this will set your CPU usage to 100%. - ## Serial communication Serial communication is currently work in progress and doesn't work with basic ROMs but the `--fifo-input` and `--fifo-output` can already be tested by passing files created with mkfifo. If the goal is to allow communication between two gameboy, one gameboy's input should be the other's output. |