Find a file
2021-03-12 00:34:05 -08:00
.github/workflows Add CI using GitHub Actions (#1) -- Thanks oprypin! 2021-01-27 19:43:23 -08:00
README long overdue readme update 2021-02-04 01:11:51 -08:00
spec initial commit: load cartridge, parse instr types 2020-08-22 00:15:30 -07:00
src clean up affine screen entry logic 2021-03-12 00:34:05 -08:00
.editorconfig initial commit: load cartridge, parse instr types 2020-08-22 00:15:30 -07:00
.gitignore move cpsr onto new bitfield implementation 2020-09-23 08:21:56 -07:00
LICENSE initial commit: load cartridge, parse instr types 2020-08-22 00:15:30 -07:00
README.md long overdue readme update 2021-02-04 01:11:51 -08:00
shard.yml Add CI using GitHub Actions (#1) -- Thanks oprypin! 2021-01-27 19:43:23 -08:00

Crab is a Game Boy Advance emulator written in Crystal. Currently, this project is still clearly a work-in-progress, although some games are currently playable.

This would not be possible without GBATEK, Tonc, mGBA, or the wonderful emudev community.

Building

SDL2 is the only library you should need to install. It is available on every major package manager. Of course, the assumption is also that you have the Crystal compiler installed.

After cloning the repository, all you'll need to do is run shards build --release to build the emulator in release mode. This will place the binary at bin/crab.

Usage

Running the emulator simply consists of bin/crab /path/to/bios /path/to/rom.

At the moment, the BIOS is a required argument, although I may ship with an open-source replacement BIOS at some point in the future. If you cannot dump the official BIOS from your own console, you can pick up Normatt's replacement BIOS or the one created by DenSinH and fleroviux. Both of these BIOSes should be compatible in 99% of use-cases.

Features and Remaining Work

Features

  • Accurate sound emulation (both Direct Sound and PSGs)
  • GLSL shaders for color reproduction
  • PPU features
    • Modes 0-5 are mostly implemented
    • Affine backgrounds and sprites
    • Alpha blending
    • Windowing
  • CPU core
  • Storage
    • Flash and SRAM implemented (although Golden Sun refuses to save..)

Remaining Work

  • Timers need improvement
  • PPU
    • Mosaic
    • Blending code needs cleanup
  • Storage
    • EEPROM
    • Fix Flash for Golden Sun
    • Game database to support odd cases like Classic NES
  • Timing
    • Cycle counting
    • DMA timing
    • Prefetch
    • Etc, etc, etc.

Special Thanks

A special thanks goes out to those in the emudev community who are always helpful, both with insightful feedback and targeted test ROMs.

Contributing

  1. Fork it (https://github.com/mattrberry/crab/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors