Skip to content

germangb/rust-gameboy2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-gameboy2

Build Status

Attempt to rewrite the old germangb/rust-gameboy emulator project.

Automated tests

cargo test --test cpu_instrs
cargo test --test instr_timing
cargo test --test mem_timing

Build

Boot ROMs

You must provide your own boot ROMs as they are not included in the repo.

  • /core/boot/boot.gb
  • /core/boot/boot.gbc (if building with --features cgb)

You may or may not find them here https://gbdev.gg8.se/files/roms/bootroms/

Native build

cargo run -p native --release [--features cgb] -- [ROM FILE]

Focus on the LCD window for game controls:

  • Left, Right, Up, Down maps to DPAD buttons.
  • Z maps to A button
  • X maps to B button
  • Enter maps to Start button
  • RightShift maps to Select button

Other keyboard controls (for primitive debugging):

  • C Change the ROM (Will open filesystem file selector).
  • P Pause/Resume emulation
  • R Reset emulation
  • S Step instruction (CPU Window)
  • B Set Instruction breakpoint (CPU Window)
  • L Set LCD line breakpoint (CPU Window)
  • RightShift + P Override PC register (CPU Window)

(The Memory window --features mem is not yet finished)

  • R Read byte from memory (MEM Window)
  • RightShift + P Write byte to memory (MEM Window)

WASM

cd wasm/
wasm-pack build [--features cgb] # build NPM package
cd www/
npm run start # start HTTP server

References