Gbb
A retro Fantasy Console that generates ROMs compatible with the popular handheld game console.
Install / Use
/learn @paladin-t/GbbREADME

Home | Steam | Itch.io | Documents | About
Table of Content
About GB BASIC
GameBuilder BASIC (GB BASIC) is a retro Fantasy Console that generates ROMs compatible with the popular handheld game console. It has everything ready-to-use for writting code, making assets, compiling projects, running with the built-in emulator, exporting to runnable ROM, etc.
About This Repository
This repository contains the full source code of GB BASIC, including the kernel (runtime virtual machine), the compiler (for BASIC), and all the editors.
Why GB BASIC?
GB BASIC is programmable in a brand new BASIC dialect. The integrated assets editors are intuitive to use. You can generate real ROMs and play on any GB emulator or hardware.
Programming Paradigms
- Imperative paradigm
- Non-structured programming
- Concurrent processing approach
- Declarative paradigm
- Data driven approach
Features
- Programmable in BASIC, an easy to learn and fun to use programming language
- Easy to use API for graphics, input, audio, and other facilities
- Built-in libraries for scene, actor, controllers, GUI
- Built-in libraries for collision detection, persistence, RTC, etc.
- Extension feature including mouse & touch, shell command, debugging, etc.
- Handy tools for editing tiles, map, scene, actor, font, sound, etc.
- Project can be exported into real ROM
- Dozens of example projects
Specs
- CPU: 4.19MHz/8.38MHz for classic/colored respectively
- Threads: up to 16 concurrent execution contexts
- Display: 160x144px
- Code: BASIC, supports multiple source pages
- Gamepad: 8 buttons (D-Pad + A/B + Select/Start)
- Mouse and touch: supported by extension
- Tiles: up to 256 units per page
- Map: up to 255 tiles in one dimension per page; two layers (graphics, attributes)
- Sprite: supports 8x8 and 8x16 sprites
- Scene: up to 255 tiles in one dimension per page; four layers (map, attributes, properties, actors)
- Actor: up to 8x8 tiles per frame; up to 256 frames per page
- Font: supports TrueType (.ttf) and bitmap-based (.png .jpg .bmp .tga); up to 16px; 1bpp or 2bpp
- Audio: 4 channels; supports importing from JSON, VGM, WAV, FxHammer
- Palette: 2bit (4 colors) per tile, palette of map and actor is configurable for colored device
- GUI: supports label, progress bar, menu, etc.
- Persistence: supported
- RTC: supported
- Serial port: supported
Glance




















Installation
Using Prebuilt
Compiling from Source
A C++14 capable compiler is required, any compiler came after 2014 should be ok. You need to get this repository before build:
git clone https://github.com/paladin-t/gbb.git
cd gbb
Windows
Dependencies: Visual Studio (with C++ development tools installed).
<details> <summary>Steps</summary>- Build SDL2
- Compile from "lib/sdl/VisualC/SDL.sln"
- Execute
lib/sdl/copy_win.cmd
- Build GB BASIC
- Compile from "gbbasic.sln"
- Build GBBVM
- Execute
gbbvm.cmd
- Execute
Linux
Dependencies: CMake, GCC.
<details> <summary>Steps</summary>- Build SDL2
- Execute:
cd lib/sdl ./configure make sudo make install cd ../.. - Execute
lib/sdl/copy_linux.sh
- Execute:
- Build GB BASIC
- Execute:
cd gbbasic.linux cmake . && make cd ..
- Execute:
- Build GBBVM
- Execute
gbbvm.sh
- Execute
Note: If you want to link to the system libraries instead of the local libraries in this repo, refer to the instructions below.
cd gbbasic.linux
cmake . -DGBBASIC_LIB_SDL_USE_LOCAL=FALSE && make
cd ..
</details>
MacOS
Dependencies: Xcode.
<details> <summary>Steps</summary>- Build SDL2
- Compile dylib from "lib/sdl/Xcode/SDL/SDL.xcodeproj"
- Reveal "libSDL2.dylib" in Finder
- Copy "libSDL2.dylib" to "lib/sdl/lib/mac/"
- Build GB BASIC
- Compile from "gbbasic.xcodeproj"
- Build GBBVM
- Execute
gbbvm.sh
- Execute
Other platforms
<details> <summary>Details</summary>You can also setup your own build pipeline for other platforms. The "lib" and "src" directories are almost what you need.
The "platform_*" files contain most platform dependent code, you'll probably make a specific port.
</details>Learning
Documentation
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR
