Coder Social home page Coder Social logo

gba's Introduction

Gameboy Advanced Emulator

This codebase contains code for a GBA emulator. It is written in modern C++ and uses the C++ module system -- compiler support is quite poor for the module system currently AFAIK. Clang 18.1.7 has worked for me so far, but GCC 14.1.0 has not.

The goal of this project is largely to create a well documented, comprehensible, and tested emulator to serve as an example. There is a strong focus on readability at the expense of performance -- there is no doubt that this will not be the fastest possible GBA emulator, but that really shouldn't be a problem given the fact that the ARM7TDMI is a very old chip.

Features will be developed in roughly the following order:

  • CPU:
    • ARM instructions (behavior)
    • ARM instructions (tests)
    • THUMB instructions (behavior)
    • Execution pipeline
    • THUMB instructions (tests) (partial)
    • Cycle accurate memory accesses
    • Cycle accurate instruction execution
  • Graphics:
    • Create list of graphics features
  • Sound
    • Create list of sound features
  • Extras:
    • Peripheral support (e.g. Camera)
    • Link support
    • Assembler / Disassembler
    • Debugger
    • Reimplemented BIOS

Build

Requires a relatively recent version of CMake:

mkdir build && cd build
cmake -G Ninja ..
ninja

On Mac, xcode clang doesn't work. Install clang with homebrew and use:

CXX=/opt/homebrew/opt/llvm/bin/clang++ cmake -G Ninja ..

Testing

Right now the CPU instructions have some limited "unit" tests, where the unit is individual CPU instructions. They can be ran with:

build/test/arm7tdmi_tests

gba's People

Contributors

jkarns275 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.