GitXplorerGitXplorer
n

rusty-boy-advance

public
14 stars
0 forks
8 issues

Commits

List of commits on branch master.
Unverified
5c1600198e0d902f1081f02e77c6c9be15e80357

Update Cargo.lock

nnico-abram committed 3 months ago
Unverified
7067c36d60b6b39cd77a74732491ebb3fdcdec7c

Update README

nnico-abram committed 3 months ago
Unverified
3c034d17d77d790fe8f29cbe63aba6c38ec26045

Update Cargo.toml

nnico-abram committed 3 months ago
Unverified
5ebe9c963dd3e4eb5a00bbf1ace95d598cecd818

Fix most warnings

nnico-abram committed 3 months ago
Unverified
c782dae1e9372f7b7de8446b17b14a2268bf09df

Disable vsync in imgui frontend (uncap FPS)

nnico-abram committed 3 months ago
Unverified
2914f540f9aa485ed3f5f37dbf19d1698026664f

Ignore BIOS writes

nnico-abram committed 3 months ago

README

The README file for this repository.

Rusty Boy Advance

Build Status

docs

An attempt at a Game Boy Advance emulator in rust (Very much a WIP).

Progress

It can currently run some simple games, like Kirby Nightmare in Dreamland and Pokemon Mystery Dungeon, most of the tonc demos (With varying levels of correctness) and passes all of the armwrestler tests. It recently became able to boot Pokemon Ruby with lots of visual artifacts.

The CPU interpreter should have all the necessary instructions implemented.

Basic functionality that is missing:

  • BG mode 1 and 2 are not implemented at all (These have rotated backgrounds)
  • Affine sprites are not implemented at all
  • DMA's are very incomplete (Immediate DMAs should work, but triggering DMAs on hblank/vblank is not implemented)
  • Timing has not been tested at all, and is missing a lot of functionality (wait states, and the ROM prefetcher)
  • Timers are no implemented
  • Open bus behaviour is not implemented
  • Game pak SRAM is not implemented
  • Saves and save states are not implemented
  • Sound is not implemented
  • The disassembly is incomplete, mostly for the 32bit instructions. 16bit thumb disassembly is close to complete
  • Performance has not been optimized much at all

Possible future directions:

  • Implement a cached interpreter
  • Detect spin loops and don't execute them instruction by instruction
  • Improve memory accesses. Currently it uses a u8 byte array and most accesses go through a single read_byte function. Using a properly aligned array, we should be able to perform a single 32bit read for 32bit reads instead of 4 8bit reads. Maybe use a macro to avoid duplicating the address space match statement?
  • Make a better wasm frontend (Prettier webpage, possibly add debug tooling/output)

Screenshots

Useful references and tools

  • GBATEK
  • The arm7TDMI manual and the technical manual
  • The emulation development discord
  • This online disassembler that supports armv4t
  • This other online disassembler, which works better (The other one doesnt correctly respect the thumb setting all the time) and also has an assembler, but gets some opcodes wrong (Possibly because it's not specifically armv4)
  • This online hex editor
  • This cpu test rom called armwrestler.
  • The MGBA blog posts.
  • Tonc. This is intended for GBA programmers, but contains useful reading material and examples, which have been useful as small and simple ROMs for tests.
  • gbadoc
  • dearimgui
  • mesen2 is an awesome emulator which has a very complete debugger that can step backwards and has conditional breakpoints. It also has a debug view of tiles, backgrounds and sprites.