A Game Boy Advance homebrew application for reading the Second London Baptist Confession of Faith (1689). This project provides a complete text reader with scrolling, chapter navigation, and a custom font rendering system optimized for the GBA's 240x160 screen.
- Full text display of the 1689 Baptist Confession with all 32 chapters
- Smooth scrolling with proper VSync timing to prevent flicker
- Chapter navigation using A/B buttons to jump between chapters
| Button | Action |
|---|---|
| UP | Scroll up one line |
| DOWN | Scroll down one line |
| A | Jump to next chapter |
| B | Jump to previous chapter |
Download confession.gba and load it in your favorite GBA emulator.
- devkitPro toolchain with GBA development tools
- Python 3 (for optional JSON conversion)
- GBA emulator (mGBA, VisualBoyAdvance-M, etc.)
-
Install devkitPro:
- Windows: Download installer from devkitPro releases
- Linux:
sudo apt install devkitpro-pacman && sudo dkp-pacman -S gba-dev - macOS:
brew install devkitpro/devkitpro/devkitarm
-
Set environment variables:
export DEVKITPRO=/opt/devkitpro export DEVKITARM=$DEVKITPRO/devkitARM export PATH=$DEVKITARM/bin:$PATH
-
Clone and build:
git clone <repository-url> cd gba-confession make clean make
-
Fix ROM header:
python3 fix_header.py confession.gba
-
Test in emulator: Load
confession.gbain mGBA or your preferred emulator.
gba-confession/
├── confession.c # Main application code
├── crt0.s # GBA startup assembly code
├── linker.ld # Memory layout linker script
├── Makefile # Build configuration
├── fix_header.py # ROM header fixer script
├── convert_json.py # JSON to C array converter
└── README.md # This file
The confession text is stored as a C string array in confession.c. To use different text:
-
Prepare your JSON in the format:
{ "title": "Your Document Title", "chapters": { "1": { "title": "Chapter Title", "paragraphs": { "1": "Paragraph text...", "2": "More text..." } } } } -
Convert to GBA format:
python3 convert_json.py your_document.json
-
Rebuild:
make clean make python3 fix_header.py confession.gba
Edit the confession_text[] array in confession.c directly, ensuring:
- Each line is ≤27 characters for proper display
- Update
total_linesvariable - Maintain empty strings
""for spacing
- ROM: Code and data starting at
0x08000000 - IWRAM: Fast work RAM at
0x03000000(32KB) - EWRAM: External work RAM at
0x02000000(256KB) - VRAM: Video memory at
0x06000000(in Mode 3)
- Mode 3: 15-bit color, 240x160 resolution
- Direct pixel access to framebuffer
- VSync synchronization to prevent tearing
- Custom font rendering with 8x8 character cells
- 27 characters per line to accommodate scrollbar
- 12 lines visible on screen simultaneously
- 12-pixel line spacing for readability
- Color coding: Blue for chapter headers, white for text
"arm-none-eabi-gcc not found":
- Install devkitPro toolchain
- Check environment variables are set correctly
- Restart terminal after installation
"gbafix not found":
- Install gba-tools:
sudo dkp-pacman -S gba-tools - Or use the Python header fixer:
python3 fix_header.py confession.gba
"Could not load game" in emulator:
- Run header fixer:
python3 fix_header.py confession.gba - Try different emulator (mGBA, VBA-M, No$GBA)
- Check ROM file size (should be several KB, not 0 bytes)
Black screen:
- Verify ROM header is correct with
hexdump -C confession.gba | head -5 - Should start with
ea 00 00 xx 24 ff ae 51...
Text flickering/overlapping:
- Ensure you're using the latest version with VSync fixes
- Check that
wait_vblank()function is being called
Slow compilation:
- Use
make -j4for parallel compilation - Consider using Docker if native installation is problematic
The codebase is structured for easy modification:
- Font changes: Edit
font_dataarray inconfession.c - Screen layout: Modify
draw_text_screen()function - Input handling: Update the main game loop
- Colors: Change the color constants at the top of the file
Test on multiple emulators for compatibility:
- mGBA: Most accurate, recommended for development
- VisualBoyAdvance-M: Good compatibility, cross-platform
- No$GBA: Windows only, good for debugging
For real hardware testing, use flash carts like:
- EZ-Flash Omega DE
- Everdrive GBA X5
- Fork the repository
- Create a feature branch
- Test on multiple emulators
- Ensure ROM works on real hardware (if possible)
- Submit a pull request
This project is released into the public domain. The Second London Baptist Confession of Faith (1689) is a historical document in the public domain.
- Second London Baptist Confession (1689)
- GBA Development Resources
- devkitPro Documentation
- Tonc GBA Programming Tutorial
- devkitPro team for the excellent GBA toolchain
- Baptist churches for preserving this historic confession
- GBA homebrew community for documentation and tools
For support or questions, please open an issue on the project repository.
