A JavaScript-based assembler for Gameboy z80 assembly code, compatible with rgbds and offering extended meta-instructions.
gbasm is a JavaScript-based assembler that compiles Gameboy z80 assembly code into playable ROM files. It solves the problem of needing a modern, scriptable toolchain for Gameboy development, offering features like meta-instructions and macro support to make assembly programming more expressive. It is designed to be mostly compatible with the widely-used rgbds assembler.
Gameboy homebrew developers and retro gaming enthusiasts who write z80 assembly and want a JavaScript-native tool with enhanced syntax features. It is particularly suited for those already familiar with rgbds looking for additional conveniences.
Developers choose gbasm for its extended meta-instructions that improve code readability, its flexible macro system, and its compatibility with existing rgbds projects. Being written in JavaScript allows for easy integration into Node.js-based build pipelines and web tooling.
A JavaScript based Gameboy Assembler
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Parses all source files and definitions before resolving names or sizes, ensuring accurate symbol resolution as highlighted in the compatibility notes.
Adds higher-level instructions like addw and ldxa that compile to multiple native ops, improving source code readability as demonstrated in the instructions section.
Supports both expression macros for single values and expansion macros for code blocks, allowing for advanced code reuse and abstraction, detailed in the macros section.
Includes custom msg opcodes for debugger logging and generates symbol maps for tools like bgb, facilitated by the --debug and --symfile options.
Deviates from RGBDS standards, such as memory operands only supporting [ and ] brackets, and local label handling, which may break existing code.
Requires Node.js for installation and use, limiting its applicability in non-JavaScript environments or for developers preferring native assemblers.
Primarily developed and tested with the Tuff project, so it may have untested edge cases or lack robustness for diverse Gameboy assembly codebases.