Repository: mrombout/gbdk_playground
Branch: master
Commit: a4a21eb70cc8
Files: 103
Total size: 109.6 KB
Directory structure:
gitextract_gw1x939_/
├── .gitignore
├── README.md
├── background/
│ ├── Makefile
│ ├── README.md
│ ├── background.c
│ ├── bg_data.c
│ ├── bg_data.pcx
│ ├── bg_data_map.c
│ └── docs.sh
├── beep/
│ ├── Makefile
│ ├── README.md
│ └── beep.c
├── big_sprite/
│ ├── Makefile
│ ├── README.md
│ ├── big_sprite.c
│ ├── docs.sh
│ ├── sprite.c
│ └── sprite.h
├── big_sprite_animation/
│ ├── Makefile
│ ├── README.md
│ ├── big_sprite_animation.c
│ ├── cards.c
│ ├── cards.gbr
│ └── cards.h
├── blank/
│ ├── Makefile
│ ├── README.md
│ ├── blank.c
│ └── docs.sh
├── color/
│ ├── Makefile
│ ├── README.md
│ ├── bg_data.c
│ ├── bg_data_map.c
│ └── color.c
├── detect_gb/
│ ├── Makefile
│ ├── README.md
│ └── detect_gb.c
├── docs/
│ └── res/
│ └── readme_c.jst
├── drawing/
│ ├── Makefile
│ ├── README.md
│ └── drawing.c
├── font/
│ ├── Makefile
│ ├── README.md
│ └── font.c
├── hello_world/
│ ├── Makefile
│ ├── README.md
│ ├── docs.sh
│ └── hello_world.c
├── huge_sprite/
│ ├── Makefile
│ ├── README.md
│ ├── bg.h
│ ├── docs.sh
│ ├── huge_sprite.c
│ └── sprite.h
├── input_state/
│ ├── Makefile
│ ├── README.md
│ └── input_state.c
├── input_wait/
│ ├── Makefile
│ ├── README.md
│ └── input_wait.c
├── link/
│ ├── Makefile
│ ├── README.md
│ └── link.c
├── move_sprite/
│ ├── Makefile
│ ├── README.md
│ ├── move_sprite.c
│ ├── ufo.c
│ ├── ufo.gbr
│ └── ufo.h
├── save_ram/
│ ├── Makefile
│ ├── README.md
│ └── save_ram.c
├── simple_shmup/
│ ├── Makefile
│ ├── README.md
│ ├── backgrounds.gbr
│ ├── bank2.c
│ ├── bank3.c
│ ├── bg_tile.c
│ ├── bg_tile.h
│ ├── bg_title.c
│ ├── bg_title_map.c
│ ├── make.bat
│ ├── simple_shmup.c
│ ├── spr_tiles.c
│ ├── spr_tiles.h
│ └── sprites.gbr
├── small_sprite/
│ ├── Makefile
│ ├── README.md
│ ├── small_sprite.c
│ ├── sprite.c
│ ├── sprite.gbr
│ └── sprite.h
└── window/
├── Makefile
├── README.md
├── bg.c
├── bg.pcx
├── bg_map.c
├── border.c
├── border.gbr
├── border.h
├── main.c
├── window.c
├── window.gbm
└── window.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.c~
*.un~
*.lst
*.o
*.sym
*.asm
*.ihx
*.map
*.noi
# Binaries
*.gb
================================================
FILE: README.md
================================================
# GBDK Playground
It has 16 kB of RAM, man.
## Build Requirements
Make sure to set the `GBDKDIR` environment variable pointing to your GBDK installation directory. The Makefile relies on this variable to locate the GBDK compiler and tools.
## Samples
| [Blank](blank) | [Hello World](hello_world) | [Small Sprite](small_sprite) |
| :--------------------------------: | :--------------------------------------------: | :----------------------------------------------: |
| [](blank) | [](hello_world) | [](small_sprite) |
| Minimum required code | Print `Hello World!` | Render small 8x8 sprite |
| [Big Sprite](big_sprite) | [Big Sprite Animation](big_sprite_animation) | [Input State](input_state) |
| :------------------------------------------: | :--------------------------------------------------------------: | :--------------------------------------------: |
| [](big_sprite) | [](big_sprite_animation) | [](input_state) |
| Render big 16x16 sprite | Animate big 16x16 sprite | Read joypad state |
| [Input Wait](input_wait) | [Move Sprite](move_sprite) | [Background](background) |
| :------------------------------------------: | :--------------------------------------------: | :------------------------------------------: |
| [](input_wait) | [](move_sprite) | [](background) |
| Wait for button input | Move a sprite using joypad | Render a full-screen background |
| [Window](window) | [Beep](beep) | [Simple SHMUP](simple_shmup) |
| :----------------------------------: | :------------------------------: | :----------------------------------------------: |
| [](window) | [](beep) | [](simple_shmup) |
| Renders a window | Make a sound | Very simple SHMUP |
| [Huge Sprite](huge_sprite) | [Drawing](drawing) | [Detect GB Type](detect_gb) |
| :--------------------------------------------: | :------------------------------------: | :----------------------------------------: |
| [](huge_sprite) | [](drawing) | [](detect_gb) |
| Renders a huge 40x64 sprite | Built-in drawing functions | Detect which GB is being used |
| [Save RAM](save_ram) | [Font](font) | [Link](link) |
| :--------------------------------------: | :------------------------------: | :--------------------------------: |
| [](save_ram) | [](font) | [](link) |
| Save/load variables | Load a new font | Send/Receive data using link cable |
| [Color](color) | More coming soon... |
| :--------------------------------: | :----------------------------------------------------------------: |
| [](color) | [](https://gbdev.io/list.html#c) |
| Use palettes for Game Boy Color | Contributions are welcome! |
================================================
FILE: background/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wl-m
BIN = background.gb
OBJS = background.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: background/README.md
================================================
# Background
<div style="text-align: center"><img src="screenshot.png" alt="" /></div>
Renders a full-screen background image.
## Source
```c
#include <gb/gb.h>
#include "bg_data.c"
#include "bg_data.map"
void main() {
```
First load the tile patterns in the Background Tile Pattern table. This
means that we load all the 8x8 images that make up our picture (131 of them
to be exact).
```c
set_bkg_data(0, 131, tiledata);
VBK_REG = 1;
VBK_REG = 0;
```
Then we set the tile pattern in the background tile table. The variable
`tilemap` contains an array of tile numbers that reference to the the tiles
we loaded previously using `set_bkg_data`.
Our image is `20` tiles wide and `18` tiles high, thus having a total of 360
tiles. How is that possible when we only loaded `131` tiles?
Well, that is because some in the image are identical. So instead the tile
is only saved once in the `tiledata` variable and reused multiple times in
the `tilemap` variable.
```c
set_bkg_tiles(0, 0, 20, 18, tilemap);
```
In order for the background to actually show up we call `SHOW_BKG`.
```c
SHOW_BKG;
DISPLAY_ON;
}
```
================================================
FILE: background/background.c
================================================
// # Background
// <div style="text-align: center"><img src="screenshot.png" alt="" /></div>
//
// Renders a full-screen background image.
//
// ## Source
#include <gb/gb.h>
#include "bg_data.c"
#include "bg_data_map.c"
void main() {
// First load the tile patterns in the Background Tile Pattern table. This
// means that we load all the 8x8 images that make up our picture (131 of them
// to be exact).
set_bkg_data(0, 131, tiledata);
VBK_REG = 1;
VBK_REG = 0;
// Then we set the tile pattern in the background tile table. The variable
// `tilemap` contains an array of tile numbers that reference to the the tiles
// we loaded previously using `set_bkg_data`.
//
// Our image is `20` tiles wide and `18` tiles high, thus having a total of 360
// tiles. How is that possible when we only loaded `131` tiles?
//
// Well, that is because some in the image are identical. So instead the tile
// is only saved once in the `tiledata` variable and reused multiple times in
// the `tilemap` variable.
set_bkg_tiles(0, 0, 20, 18, tilemap);
// In order for the background to actually show up we call `SHOW_BKG`.
SHOW_BKG;
DISPLAY_ON;
}
================================================
FILE: background/bg_data.c
================================================
/*
Advanced PCX to GameBoy converter v2.15
Tiles data
Original PCX File : "BG_DATA.PCX"
Number of Tiles : 131
TileMap Size : 20x18
*/
unsigned const char tiledata[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xDF,0xDF,0xC1,0xC1,0xC0,0xC0,0xC0,0xC0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0x3F,0x0F,0x0F,0x01,0x01,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0x1F,0x1F,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFE,0xF8,0xF8,
0xFE,0xFE,0xFC,0xFC,0xF8,0xF8,0xF0,0xF0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00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xFC,0xFC,0xFE,0xFE,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0xC0,0xC0,0x80,0x80,
0xFF,0xFF,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x0C,0x0C,0x18,0x18,
0x01,0x01,0x03,0x03,0x07,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x1F,0x1F,0x1F,0x1F,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x02,0x02,0x06,0x06,0x0C,0x0C,0x08,0x08,0x18,0x18,0x30,0x30,0x20,0x20,0x20,0x20,
0x0C,0x0C,0x18,0x18,0x10,0x10,0x20,0x20,0x60,0x60,0x40,0x40,0xC0,0xC0,0x80,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x03,0x02,0x02,0x04,0x04,
0x30,0x30,0x20,0x20,0x60,0x60,0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x7F,0x7F,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,0x02,0x06,0x06,
0x40,0x40,0xC0,0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x01,0x02,0x02,0x06,0x06,0x08,0x08,0x18,0x18,0x30,0x30,0x60,0x60,0x40,0x40,
0x08,0x08,0x18,0x18,0x30,0x30,0x60,0x60,0x40,0x40,0xC0,0xC0,0x80,0x80,0x00,0x00,
0x00,0x00,0x01,0x01,0x01,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x07,0x07,0x07,0x07,
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
0x04,0x04,0x08,0x08,0x08,0x08,0x10,0x10,0x30,0x30,0x20,0x20,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0x01,0x03,0x03,0x02,0x02,0x06,0x06,0x04,0x04,0x08,0x08,0x18,0x18,
0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x02,0x02,0x02,0x06,0x06,0x04,0x04,0x0C,0x0C,0x18,0x18,0x10,0x10,0x20,0x20,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x20,0x20,0x18,0x18,
0x07,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,
0x10,0x10,0x20,0x20,0x20,0x20,0x40,0x40,0xC0,0xC0,0x80,0x80,0x80,0x80,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x02,0x02,
0x60,0x60,0x40,0x40,0x40,0x40,0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x0C,0x0C,0x02,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x60,0x60,0x18,0x18,0x04,0x04,0x03,0x03,
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
0x02,0x02,0x06,0x06,0x0C,0x0C,0x08,0x08,0x18,0x18,0x30,0x30,0x20,0x20,0x40,0x40,
0x02,0x02,0x06,0x06,0x0C,0x0C,0x08,0x08,0x18,0x18,0x10,0x10,0x10,0x10,0x20,0x20,
0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x80,0x60,0x60,0x30,0x30,0x18,0x18,0x0E,0x0E,0x01,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x60,0x60,
0x1F,0x1F,0x1F,0x1F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x04,0x04,
0x40,0x40,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x40,0x40,0x40,0x40,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x1C,0x1C,0x06,0x06,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xC0,0xC0,0x70,0x70,0x1C,0x1C,0x07,0x07,0x01,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x1F,0x1F,0x1F,0x1F,
0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x20,0x20,0x20,0x40,0x40,0x40,0x40,
0x0C,0x0C,0x08,0x08,0x10,0x10,0x10,0x10,0x30,0x30,0x60,0x60,0x40,0x40,0x40,0x40,
0x00,0x00,0x01,0x01,0x01,0x01,0x03,0x03,0x02,0x02,0x04,0x04,0x04,0x04,0x08,0x08,
0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x04,0x04,0x04,0x04,0x08,0x08,0x10,0x10,
0x00,0x00,0x00,0x00,0x0E,0x0E,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x40,0x40,0x30,0x30,0x08,0x08,
0x1F,0x1F,0x1F,0x1F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
0x08,0x08,0x10,0x10,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x02,0x02,
0x10,0x10,0x20,0x20,0x60,0x60,0x40,0x40,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,
0x0E,0x0E,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x80,0x80,0x60,0x60,0x38,0x38,0x0C,0x0C,0x07,0x07,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xE0,0xE0,0x30,0x30,
0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,
0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xE0,0xE0,0xE0,0xE0,
0x02,0x02,0x04,0x04,0x08,0x08,0x18,0x18,0x10,0x10,0x20,0x20,0x40,0x40,0x40,0x40,
0x18,0x18,0x06,0x06,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x20,0x20,0x1C,0x1C,0x06,0x06,0x03,0x03,
0x03,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,0x02,0x04,0x04,0x08,0x08,0x08,0x08,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x78,0x78,0x07,0x07,
0xC0,0xC0,0x60,0x60,0x30,0x30,0x08,0x08,0x0E,0x0E,0x03,0x03,0x01,0x01,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
0x10,0x10,0x20,0x20,0x20,0x20,0x40,0x40,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0xC0,0xC0,0x40,0x40,0x60,0x60,0x30,0x30,0x0C,0x0C,0x02,0x02,0x03,0x03,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xE0,0xE0,
0x18,0x18,0x0E,0x0E,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0xE0,0xE0,0x38,0x38,0x0E,0x0E,0x03,0x03,0x00,0x00,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x1F,0x1F,0x1F,0x1F,0x0F,0x0F,0x0F,0x0F,
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x80,
0x02,0x02,0x04,0x04,0x08,0x08,0x18,0x18,0x10,0x10,0x20,0x20,0x20,0x20,0x40,0x40,
0x38,0x38,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x38,0x38,0x06,0x06,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
0x07,0x07,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x01,0x01,0x01,0x00,0x00,
0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0x01,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x0F,0x0F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x0F,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x1F,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0xF0,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xFE,0xFE,
0xFF,0xFF,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x3F,0x3F,0x3F,0x3F,0x1F,0x1F,0x1F,0x1F,
0xFF,0xFF,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFC,0xFC,0xFD,0xFD,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x1F,0x1F,0x7F,0x7F,0xFF,0xFF,
0x00,0x00,0x03,0x03,0x0F,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x80,0x80,0xF8,0xF8,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xFC,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x07,0x03,0x03,0x01,0x01,0xE1,0xE1,0xF8,0xF8};
================================================
FILE: background/bg_data_map.c
================================================
/*
Advanced PCX to GameBoy converter v2.15
TileMap data
Original PCX File : "BG_DATA.PCX"
Number of Tiles : 131
TileMap Size : 20x18
*/
unsigned const char tilemap[] = {
0x01,0x02,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x05,0x06,0x07,
0x08,0x00,0x09,0x0A,0x0B,0x0C,0x0D,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x0E,0x0F,0x10,0x11,0x12,0x13,
0x14,0x00,0x00,0x12,0x15,0x00,0x00,0x16,0x17,0x17,0x18,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x1A,0x04,
0x1B,0x00,0x00,0x1C,0x00,0x00,0x00,0x1D,0x00,0x00,0x1E,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x04,
0x04,0x21,0x22,0x23,0x00,0x00,0x24,0x00,0x00,0x12,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x04,0x04,
0x04,0x27,0x28,0x00,0x00,0x29,0x2A,0x00,0x00,0x2B,0x2C,0x2D,0x00,0x00,0x00,0x00,0x00,0x2E,0x04,0x04,
0x04,0x2F,0x00,0x00,0x30,0x31,0x00,0x00,0x32,0x33,0x00,0x34,0x35,0x00,0x00,0x00,0x00,0x36,0x04,0x04,
0x04,0x37,0x00,0x00,0x38,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x3A,0x3B,0x3C,0x00,0x00,0x3D,0x04,0x04,
0x04,0x3E,0x00,0x3F,0x40,0x00,0x00,0x3F,0x41,0x00,0x00,0x00,0x00,0x00,0x42,0x43,0x44,0x45,0x04,0x04,
0x04,0x3E,0x00,0x46,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x04,0x04,
0x04,0x3E,0x48,0x49,0x00,0x00,0x4A,0x49,0x4B,0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4D,0x04,0x04,
0x04,0x3E,0x4E,0x00,0x00,0x4F,0x50,0x00,0x00,0x51,0x52,0x53,0x00,0x00,0x00,0x00,0x00,0x54,0x04,0x04,
0x04,0x55,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x00,0x00,0x57,0x58,0x00,0x00,0x00,0x00,0x59,0x04,0x04,
0x04,0x2F,0x00,0x00,0x5A,0x2A,0x5B,0x5C,0x00,0x00,0x00,0x00,0x00,0x5D,0x44,0x00,0x00,0x00,0x5E,0x04,
0x04,0x5F,0x00,0x32,0x60,0x00,0x00,0x3A,0x61,0x62,0x00,0x00,0x00,0x00,0x63,0x64,0x62,0x00,0x65,0x04,
0x04,0x66,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6A,0x6B,0x04,
0x04,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x00,0x00,0x7B,
0x7C,0x7D,0x7E,0x7F,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x80,0x81,0x82};
================================================
FILE: background/docs.sh
================================================
docco -t ../docs/res/readme_c.jst -o ./ background.c
mv background.html README.md
================================================
FILE: beep/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wl-m
BIN = beep.gb
OBJS = beep.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: beep/README.md
================================================
# Beep

Demonstrates how to play a simple SFX sound.
================================================
FILE: beep/beep.c
================================================
#include <gb/gb.h>
#include <gb/drawing.h>
void main() {
NR50_REG = 0xFF;
NR51_REG = 0xFF;
NR52_REG = 0x80;
gotogxy(1, 1);
gprintf("====== Beep ======");
gotogxy(2, 3);
gprintf("Press any button");
while(1) {
UBYTE joypad_state = joypad();
if(joypad_state) {
NR10_REG = 0x38U;
NR11_REG = 0x70U;
NR12_REG = 0xE0U;
NR13_REG = 0x0AU;
NR14_REG = 0xC6U;
NR51_REG |= 0x11;
delay(200);
}
}
}
================================================
FILE: big_sprite/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wl-m
BIN = big_sprite.gb
OBJS = big_sprite.o sprite.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: big_sprite/README.md
================================================
# Big Sprite
<div style="text-align: center"><img src="screenshot.png" alt="" /></div>
Renders a big sprite of 16x16. Since the Game Boy hardware does not directly
support sprites that large
## Source
Start by including `gb/gb.h` this file defines most important functions you
are going to need when develop Game Boy games.
```c
#include <gb/gb.h>
```
The `sprite.c` file defines the sprite data in the form of an unsigned char
array. Most of the time you want to generate this file using tools such as
GBTD.
```c
#include "sprite.c"
void main() {
```
Set the sprite size to 8x16 pixels, two tiles one above the other. Internally
sets bit 2 of the LCDC register to 1.
```c
SPRITES_8x16;
```
Loads the tile patterns stored in `sprite` into the Sprite Tile Pattern
table.
* first parameter `0` determines at which position we should start loading.
* second parameter `4` determines how many tiles we want to loading
* third parameter `sprite` sets the variable to load from
This means that we are loading 4 tiles starting at 0 from the variable
sprite.
```c
set_sprite_data(0, 4, sprite);
```
Tell sprite `0` to display sprite `0`. Since we are loading 8x16 tiles this
will make sprite 0 show tile `0` and tile `1`.
```c
set_sprite_tile(0, 0);
```
Finally move a sprite to a position that we can see.
```c
move_sprite(0, 75, 75);
```
We want to display a 16x16 sprite. Unfortunately the Game Boy hardware does
not directly support a sprite that large. So in order to have a sprite of
that size we are simply displaying two 8x16 tiles next to each other!
Since we've already loaded our entire sprite in line 16 we can now simply
tell sprite `1` to display our second sprite. Again, since we are displaying
8x16 tiles this statement will display tile `2` and tile `3`.
```c
set_sprite_tile(1, 2);
```
In order to form the illusion of a bigger sprite we display the second tile
directly next to the other simply by offsetting the position 8 pixels to the
right.
```c
move_sprite(1, 75 + 8, 75);
```
As always, in order for the sprites to display we need to call
`SHOW_SPRITES` once.
```c
SHOW_SPRITES;
}
```
================================================
FILE: big_sprite/big_sprite.c
================================================
// # Big Sprite
// <div style="text-align: center"><img src="screenshot.png" alt="" /></div>
//
// Renders a big sprite of 16x16. Since the Game Boy hardware does not directly
// support sprites that large
//
// ## Source
// Start by including `gb/gb.h` this file defines most important functions you
// are going to need when develop Game Boy games.
#include <gb/gb.h>
// The `sprite.c` file defines the sprite data in the form of an unsigned char
// array. Most of the time you want to generate this file using tools such as
// GBTD.
#include "sprite.h"
void main() {
// Set the sprite size to 8x16 pixels, two tiles one above the other. Internally
// sets bit 2 of the LCDC register to 1.
SPRITES_8x16;
// Loads the tile patterns stored in `sprite` into the Sprite Tile Pattern
// table.
//
// * first parameter `0` determines at which position we should start loading.
// * second parameter `4` determines how many tiles we want to loading
// * third parameter `sprite` sets the variable to load from
//
// This means that we are loading 4 tiles starting at 0 from the variable
// sprite.
set_sprite_data(0, 4, sprite);
// Tell sprite `0` to display sprite `0`. Since we are loading 8x16 tiles this
// will make sprite 0 show tile `0` and tile `1`.
set_sprite_tile(0, 0);
// Finally move a sprite to a position that we can see.
move_sprite(0, 75, 75);
// We want to display a 16x16 sprite. Unfortunately the Game Boy hardware does
// not directly support a sprite that large. So in order to have a sprite of
// that size we are simply displaying two 8x16 tiles next to each other!
//
// Since we've already loaded our entire sprite in line 16 we can now simply
// tell sprite `1` to display our second sprite. Again, since we are displaying
// 8x16 tiles this statement will display tile `2` and tile `3`.
set_sprite_tile(1, 2);
// In order to form the illusion of a bigger sprite we display the second tile
// directly next to the other simply by offsetting the position 8 pixels to the
// right.
move_sprite(1, 75 + 8, 75);
// As always, in order for the sprites to display we need to call
// `SHOW_SPRITES` once.
SHOW_SPRITES;
}
================================================
FILE: big_sprite/docs.sh
================================================
docco -t ../docs/res/readme_c.jst -o ./ big_sprite.c
mv big_sprite.html README.md
================================================
FILE: big_sprite/sprite.c
================================================
/*
SPRITE.C
Tile Source File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 16 x 16
Tiles : 0 to 0
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Start of tile array. */
unsigned char sprite[] =
{
0xFF,0xFF,0x80,0x80,0x80,0x80,0x81,0x81,
0x83,0x83,0x87,0x87,0x81,0x81,0x81,0x81,
0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
0x83,0x83,0x87,0x87,0x80,0x80,0xFF,0xFF,
0xFF,0xFF,0x01,0x01,0xC1,0xC1,0xC1,0xC1,
0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,
0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,
0xE1,0xE1,0xF1,0xF1,0x01,0x01,0xFF,0xFF
};
/* End of SPRITE.C */
================================================
FILE: big_sprite/sprite.h
================================================
/*
SPRITE.H
Include File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 16 x 16
Tiles : 0 to 0
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Bank of tiles. */
#define spriteBank 0
/* Start of tile array. */
extern unsigned char sprite[];
/* End of SPRITE.H */
================================================
FILE: big_sprite_animation/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wl-m
BIN = big_sprite_animation.gb
OBJS = big_sprite_animation.o cards.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: big_sprite_animation/README.md
================================================
# Big Sprite Animation

Renders a big 16x16 animated sprite of 2 frames using a delay of 500.
================================================
FILE: big_sprite_animation/big_sprite_animation.c
================================================
#include <gb/gb.h>
#include "cards.h"
void main() {
SPRITES_8x16;
set_sprite_data(0, 8, cards);
set_sprite_tile(0, 0);
move_sprite(0, 75, 75);
set_sprite_tile(1, 2);
move_sprite(1, 75 + 8, 75);
SHOW_SPRITES;
while(1) {
set_sprite_tile(0, 4);
set_sprite_tile(1, 6);
delay(500);
set_sprite_tile(0, 0);
set_sprite_tile(1, 2);
delay(500);
}
}
================================================
FILE: big_sprite_animation/cards.c
================================================
/*
CARDS.C
Tile Source File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 16 x 16
Tiles : 0 to 1
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Start of tile array. */
unsigned char cards[] =
{
0xFF,0xFF,0x80,0x80,0x80,0x80,0x81,0x81,
0x83,0x83,0x87,0x87,0x81,0x81,0x81,0x81,
0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
0x83,0x83,0x87,0x87,0x80,0x80,0xFF,0xFF,
0xFF,0xFF,0x01,0x01,0xC1,0xC1,0xC1,0xC1,
0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,
0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,
0xE1,0xE1,0xF1,0xF1,0x01,0x01,0xFF,0xFF,
0xFF,0xFF,0x80,0x80,0x83,0x83,0x87,0x87,
0x8E,0x8E,0x8C,0x8C,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x81,0x81,0x83,0x83,
0x87,0x87,0x8F,0x8F,0x80,0x80,0xFF,0xFF,
0xFF,0xFF,0x01,0x01,0xC1,0xC1,0xE1,0xE1,
0x71,0x71,0x31,0x31,0x31,0x31,0x31,0x31,
0x71,0x71,0xE1,0xE1,0xC1,0xC1,0x81,0x81,
0xF1,0xF1,0xF1,0xF1,0x01,0x01,0xFF,0xFF
};
/* End of CARDS.C */
================================================
FILE: big_sprite_animation/cards.h
================================================
/*
CARDS.H
Include File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 16 x 16
Tiles : 0 to 1
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Bank of tiles. */
#define cardsBank 0
/* Start of tile array. */
extern unsigned char cards[];
/* End of CARDS.H */
================================================
FILE: blank/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wl-m
BIN = blank.gb
OBJS = blank.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: blank/README.md
================================================
# Blank
<div style="text-align: center"><img src="screenshot.png" alt="" /></div>
This example contains the minimal amount of code needed to create a working
Game Boy game. Though not a very exciting one.
## Source
All a GBDK game needs to compile and run (any C-program, in fact) is a main
function. This is the entry point into your program.
```c
void main() {
}
```
================================================
FILE: blank/blank.c
================================================
// # Blank
// <div style="text-align: center"><img src="screenshot.png" alt="" /></div>
//
// This example contains the minimal amount of code needed to create a working
// Game Boy game. Though not a very exciting one.
//
// ## Source
// All a GBDK game needs to compile and run (any C-program, in fact) is a main
// function. This is the entry point into your program.
void main() {
}
================================================
FILE: blank/docs.sh
================================================
docco -t ../docs/res/readme_c.jst -o ./ blank.c
mv blank.html README.md
================================================
FILE: color/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wm-yC
BIN = color.gbc
OBJS = color.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: color/README.md
================================================
# Color

Demonstrates how to use palettes and create a Game Boy Color ROM.
================================================
FILE: color/bg_data.c
================================================
/*
Advanced PCX to GameBoy converter v2.15
Tiles data
Original PCX File : "BG_DATA.PCX"
Number of Tiles : 131
TileMap Size : 20x18
*/
unsigned const char tiledata[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xDF,0xDF,0xC1,0xC1,0xC0,0xC0,0xC0,0xC0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0x3F,0x0F,0x0F,0x01,0x01,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0x1F,0x1F,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xF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x1F,0x3F,0x3F,0x3F,0x3F,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xF8,0xF8,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFE,0xFE,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0xC0,0xC0,0x80,0x80,
0xFF,0xFF,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x0C,0x0C,0x18,0x18,
0x01,0x01,0x03,0x03,0x07,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x1F,0x1F,0x1F,0x1F,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x02,0x02,0x06,0x06,0x0C,0x0C,0x08,0x08,0x18,0x18,0x30,0x30,0x20,0x20,0x20,0x20,
0x0C,0x0C,0x18,0x18,0x10,0x10,0x20,0x20,0x60,0x60,0x40,0x40,0xC0,0xC0,0x80,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x03,0x02,0x02,0x04,0x04,
0x30,0x30,0x20,0x20,0x60,0x60,0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x7F,0x7F,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,0x02,0x06,0x06,
0x40,0x40,0xC0,0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x01,0x02,0x02,0x06,0x06,0x08,0x08,0x18,0x18,0x30,0x30,0x60,0x60,0x40,0x40,
0x08,0x08,0x18,0x18,0x30,0x30,0x60,0x60,0x40,0x40,0xC0,0xC0,0x80,0x80,0x00,0x00,
0x00,0x00,0x01,0x01,0x01,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x07,0x07,0x07,0x07,
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
0x04,0x04,0x08,0x08,0x08,0x08,0x10,0x10,0x30,0x30,0x20,0x20,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0x01,0x03,0x03,0x02,0x02,0x06,0x06,0x04,0x04,0x08,0x08,0x18,0x18,
0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x02,0x02,0x02,0x06,0x06,0x04,0x04,0x0C,0x0C,0x18,0x18,0x10,0x10,0x20,0x20,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x20,0x20,0x18,0x18,
0x07,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,
0x10,0x10,0x20,0x20,0x20,0x20,0x40,0x40,0xC0,0xC0,0x80,0x80,0x80,0x80,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x02,0x02,
0x60,0x60,0x40,0x40,0x40,0x40,0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x0C,0x0C,0x02,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x60,0x60,0x18,0x18,0x04,0x04,0x03,0x03,
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
0x02,0x02,0x06,0x06,0x0C,0x0C,0x08,0x08,0x18,0x18,0x30,0x30,0x20,0x20,0x40,0x40,
0x02,0x02,0x06,0x06,0x0C,0x0C,0x08,0x08,0x18,0x18,0x10,0x10,0x10,0x10,0x20,0x20,
0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x80,0x60,0x60,0x30,0x30,0x18,0x18,0x0E,0x0E,0x01,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x60,0x60,
0x1F,0x1F,0x1F,0x1F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x04,0x04,
0x40,0x40,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x40,0x40,0x40,0x40,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x1C,0x1C,0x06,0x06,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xC0,0xC0,0x70,0x70,0x1C,0x1C,0x07,0x07,0x01,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x1F,0x1F,0x1F,0x1F,
0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x20,0x20,0x20,0x40,0x40,0x40,0x40,
0x0C,0x0C,0x08,0x08,0x10,0x10,0x10,0x10,0x30,0x30,0x60,0x60,0x40,0x40,0x40,0x40,
0x00,0x00,0x01,0x01,0x01,0x01,0x03,0x03,0x02,0x02,0x04,0x04,0x04,0x04,0x08,0x08,
0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x04,0x04,0x04,0x04,0x08,0x08,0x10,0x10,
0x00,0x00,0x00,0x00,0x0E,0x0E,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x40,0x40,0x30,0x30,0x08,0x08,
0x1F,0x1F,0x1F,0x1F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
0x08,0x08,0x10,0x10,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x02,0x02,
0x10,0x10,0x20,0x20,0x60,0x60,0x40,0x40,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,
0x0E,0x0E,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x80,0x80,0x60,0x60,0x38,0x38,0x0C,0x0C,0x07,0x07,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xE0,0xE0,0x30,0x30,
0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,
0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xE0,0xE0,0xE0,0xE0,
0x02,0x02,0x04,0x04,0x08,0x08,0x18,0x18,0x10,0x10,0x20,0x20,0x40,0x40,0x40,0x40,
0x18,0x18,0x06,0x06,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x20,0x20,0x1C,0x1C,0x06,0x06,0x03,0x03,
0x03,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,0x02,0x04,0x04,0x08,0x08,0x08,0x08,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x78,0x78,0x07,0x07,
0xC0,0xC0,0x60,0x60,0x30,0x30,0x08,0x08,0x0E,0x0E,0x03,0x03,0x01,0x01,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
0x10,0x10,0x20,0x20,0x20,0x20,0x40,0x40,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0xC0,0xC0,0x40,0x40,0x60,0x60,0x30,0x30,0x0C,0x0C,0x02,0x02,0x03,0x03,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xE0,0xE0,
0x18,0x18,0x0E,0x0E,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0xE0,0xE0,0x38,0x38,0x0E,0x0E,0x03,0x03,0x00,0x00,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x1F,0x1F,0x1F,0x1F,0x0F,0x0F,0x0F,0x0F,
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x80,
0x02,0x02,0x04,0x04,0x08,0x08,0x18,0x18,0x10,0x10,0x20,0x20,0x20,0x20,0x40,0x40,
0x38,0x38,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x38,0x38,0x06,0x06,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
0x07,0x07,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x01,0x01,0x01,0x00,0x00,
0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0x01,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x0F,0x0F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x0F,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x1F,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0xF0,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xFE,0xFE,
0xFF,0xFF,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x3F,0x3F,0x3F,0x3F,0x1F,0x1F,0x1F,0x1F,
0xFF,0xFF,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFC,0xFC,0xFD,0xFD,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x1F,0x1F,0x7F,0x7F,0xFF,0xFF,
0x00,0x00,0x03,0x03,0x0F,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x80,0x80,0xF8,0xF8,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xFC,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x07,0x03,0x03,0x01,0x01,0xE1,0xE1,0xF8,0xF8};
================================================
FILE: color/bg_data_map.c
================================================
/*
Advanced PCX to GameBoy converter v2.15
TileMap data
Original PCX File : "BG_DATA.PCX"
Number of Tiles : 131
TileMap Size : 20x18
*/
unsigned const char tilemap[] = {
0x01,0x02,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x05,0x06,0x07,
0x08,0x00,0x09,0x0A,0x0B,0x0C,0x0D,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x0E,0x0F,0x10,0x11,0x12,0x13,
0x14,0x00,0x00,0x12,0x15,0x00,0x00,0x16,0x17,0x17,0x18,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x1A,0x04,
0x1B,0x00,0x00,0x1C,0x00,0x00,0x00,0x1D,0x00,0x00,0x1E,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x04,
0x04,0x21,0x22,0x23,0x00,0x00,0x24,0x00,0x00,0x12,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x04,0x04,
0x04,0x27,0x28,0x00,0x00,0x29,0x2A,0x00,0x00,0x2B,0x2C,0x2D,0x00,0x00,0x00,0x00,0x00,0x2E,0x04,0x04,
0x04,0x2F,0x00,0x00,0x30,0x31,0x00,0x00,0x32,0x33,0x00,0x34,0x35,0x00,0x00,0x00,0x00,0x36,0x04,0x04,
0x04,0x37,0x00,0x00,0x38,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x3A,0x3B,0x3C,0x00,0x00,0x3D,0x04,0x04,
0x04,0x3E,0x00,0x3F,0x40,0x00,0x00,0x3F,0x41,0x00,0x00,0x00,0x00,0x00,0x42,0x43,0x44,0x45,0x04,0x04,
0x04,0x3E,0x00,0x46,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x04,0x04,
0x04,0x3E,0x48,0x49,0x00,0x00,0x4A,0x49,0x4B,0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4D,0x04,0x04,
0x04,0x3E,0x4E,0x00,0x00,0x4F,0x50,0x00,0x00,0x51,0x52,0x53,0x00,0x00,0x00,0x00,0x00,0x54,0x04,0x04,
0x04,0x55,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x00,0x00,0x57,0x58,0x00,0x00,0x00,0x00,0x59,0x04,0x04,
0x04,0x2F,0x00,0x00,0x5A,0x2A,0x5B,0x5C,0x00,0x00,0x00,0x00,0x00,0x5D,0x44,0x00,0x00,0x00,0x5E,0x04,
0x04,0x5F,0x00,0x32,0x60,0x00,0x00,0x3A,0x61,0x62,0x00,0x00,0x00,0x00,0x63,0x64,0x62,0x00,0x65,0x04,
0x04,0x66,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6A,0x6B,0x04,
0x04,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x00,0x00,0x7B,
0x7C,0x7D,0x7E,0x7F,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x80,0x81,0x82};
================================================
FILE: color/color.c
================================================
#include <gb/gb.h>
#include <gb/cgb.h> // Include cgb functions
// Background taken from 'background' example
#include "bg_data.c"
#include "bg_data_map.c"
// Sprite taken from 'small_sprite' example
const unsigned char sprite[] =
{
0x7E,0x7E,0x99,0x99,0x81,0x81,0xA5,0xA5,
0x81,0x81,0xDB,0xDB,0xC3,0xC3,0x3C,0x3C
};
// These palettes replace the default palette with the appropriate colors. See cgb.h for more defined colors.
UWORD bkgPalette[] = {
RGB_PURPLE, RGB_BLACK, RGB_ORANGE, RGB_BROWN
};
UWORD sprPalette[] = {
RGB_GREEN, RGB_BLUE, RGB_RED, RGB_YELLOW
};
void main(void){
set_bkg_palette(0, 1, bkgPalette); // UBYTE first_palette, UBYTE nb_palettes, UWORD *rgb_data
set_bkg_data(0, 131, tiledata);
set_bkg_tiles(0, 0, 20, 18, tilemap);
SHOW_BKG;
set_sprite_palette(0, 1, sprPalette); // UBYTE first_palette, UBYTE nb_palettes, UWORD *rgb_data
set_sprite_data(0, 1, sprite);
set_sprite_tile(0, 0);
move_sprite(0, 50, 50);
SHOW_SPRITES;
DISPLAY_ON;
}
================================================
FILE: detect_gb/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wl-m
BIN = detect_gb.gb
OBJS = detect_gb.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: detect_gb/README.md
================================================
# Detect GB

Detect which GB is being used/emulated.
================================================
FILE: detect_gb/detect_gb.c
================================================
#include <gb/gb.h>
#include <stdio.h>
extern UBYTE _cpu;
void main() {
switch (_cpu) {
case 0x01:
printf("DMG or SGB");
break;
case 0xFF:
printf("POCKET or SGB2");
break;
case 0x11:
printf("COLOR");
break;
default:
printf("OTHER");
break;
}
}
================================================
FILE: docs/res/readme_c.jst
================================================
<% for (var i = 0, l = sections.length; i<l; i++) { %>
<% var section = sections[i]; %>
<%= section.docsText %>
<% if (!(/^\s*$/).test(section.codeText)) { %>
```c
<%= section.codeText %>
```
<% } %>
<% } %>
================================================
FILE: drawing/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wl-m
BIN = drawing.gb
OBJS = drawing.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: drawing/README.md
================================================
# Drawing

Demonstrates built-in GBDK drawing functions. Operate the D-Pad to use the plot function to draw on the screen. Press the A Button to change plot point colors (Black, White, Dark Gray, Light Gray). Press the B button to clear the screen.
================================================
FILE: drawing/drawing.c
================================================
#include <gb/gb.h>
#include <gb/drawing.h>
uint8_t x = 1, y = 1, i = 3, j, f;
void main() {
color(BLACK, WHITE, SOLID); // forecolor, backcolor, mode [Colors: WHITE (0), LTGREY (1), DKGREY(2), BLACK (3)]
circle(100, 60, 30, M_FILL); // x, y, radius, style (M_FILL or M_NOFILL)
line(40, 40, 50, 50); // x1, y1, x2, y2
box(120, 125, 125, 135, M_NOFILL); // x1, y1, x2, y2, style (M_FILL or M_NOFILL)
plot_point(3, 4); // Plot a single pixel on the screen
gotogxy(18, 15); // Places you at these coordinates
gprintf("Hi"); // When using the drawing library you must use gprintf instead of printf
while (1) {
if (joypad() == J_UP && y != 0)
y--;
if (joypad() == J_DOWN && y != 143)
y++;
if (joypad() == J_LEFT && x != 0)
x--;
if (joypad() == J_RIGHT && x != 159)
x++;
if (joypad() == J_A) { // Change colors
waitpadup();
i++;
if (i > 3)
i = 0;
}
if (joypad() == J_B) { // Function to 'clear' the screen
for (j = 0; j < 20; j++) { // GB screen is 20 columns wide and 18 columns tall
for (f = 0; f < 18; f++) {
gotogxy(j, f);
wrtchr(' '); // Use wrtchr to place a character when using the drawing library
}
}
}
plot(x, y, i, SOLID); // Draws a pixel on the screen (x, y, color, mode)
delay(10);
}
}
================================================
FILE: font/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m
BIN = font.gb
OBJS = font.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: font/README.md
================================================
# Font

Demonstrates how to switch from the default font. Be careful when using/loading fonts as they are loaded into VRAM and may overwrite tiles you're using. Built-in fonts include: font_spect, font_italic, font_ibm, font_min.
================================================
FILE: font/font.c
================================================
#include <stdio.h>
#include <gb/gb.h>
#include <gbdk/font.h>
void main(void) {
font_init(); // Initialize font
font_set(font_load(font_spect)); // Set and load the font
printf("New font!");
}
================================================
FILE: hello_world/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m
BIN = hello_world.gb
OBJS = hello_world.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: hello_world/README.md
================================================
# Hello World
<div style="text-align: center"><img src="screenshot.png" alt="" /></div>
Prints `Hello World!` to the screen using GBDK's `printf` function.
## Source
Includes `<gb/gb.h>`. This file contains all Gameboy specific functions.
It's the one you're going to use the most.
```c
#include <gb/gb.h>
```
Includes `<stdio.h>` it contains funtions for basic file/console input and
output.
```c
#include <stdio.h>
```
A C program always starts by calling the `main()` function. If you are
unfamiliar with this I suggest reading up on C first.
```c
void main() {
```
Prints the string `Hello World!` to the screen. Internally it uses the
background layer to do so as you can see in the VRAM of your favorite
emulator.
```c
printf("Hello World!");
```
Using `\n` you can create a new line. In this case it is used to create some
space between the previous sentence and the next.
```c
printf("\n\nPress Start");
}
```
================================================
FILE: hello_world/docs.sh
================================================
docco -t ../docs/res/readme_c.jst -o ./ hello_world.c
mv hello_world.html README.md
================================================
FILE: hello_world/hello_world.c
================================================
// # Hello World
// <div style="text-align: center"><img src="screenshot.png" alt="" /></div>
//
// Prints `Hello World!` to the screen using GBDK's `printf` function.
//
// ## Source
// Includes `<gb/gb.h>`. This file contains all Gameboy specific functions.
// It's the one you're going to use the most.
#include <gb/gb.h>
// Includes `<stdio.h>` it contains funtions for basic file/console input and
//output.
#include <stdio.h>
// A C program always starts by calling the `main()` function. If you are
// unfamiliar with this I suggest reading up on C first.
void main() {
// Prints the string `Hello World!` to the screen. Internally it uses the
// background layer to do so as you can see in the VRAM of your favorite
// emulator.
printf("Hello World!");
// Using `\n` you can create a new line. In this case it is used to create some
// space between the previous sentence and the next.
printf("\n\nPress Start");
}
================================================
FILE: huge_sprite/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m
BIN = huge_sprite.gb
OBJS = huge_sprite.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: huge_sprite/README.md
================================================
# Huge Sprite
<div style="text-align: center"><img src="screenshot.png" alt="" /></div>
Render a huge 40x64 sprite that can be moved around with the D-pad.
## Source
```c
#include <gb/gb.h>
#include <types.h>
#include "sprite.h"
#include "bg.h"
#define SPR_WIDTH 8
#define SPR_HEIGHT 5
#define TOTAL_SPR SPR_WIDTH * SPR_HEIGHT
uint8_t x = 64;
uint8_t y = 96;
void render_huge_sprite() {
uint8_t i, j;
uint8_t sprite_index;
set_sprite_tile(0, 1);
for(i = 0; i < SPR_WIDTH; ++i) {
for(j = 0; j < SPR_HEIGHT; ++j) {
sprite_index = i * SPR_HEIGHT + j;
set_sprite_tile(sprite_index, sprite_index);
move_sprite(sprite_index, x + (j * 8), y + (i * 8));
}
}
}
void load_background() {
set_bkg_data(0, 2, bg_tile_data);
set_bkg_tiles(0, 0, 20, 18, bg_map_data);
}
void move_huge_sprite(uint8_t nx, uint8_t ny) {
uint8_t i, lx, ly;
lx = 0;
ly = 0;
for(i = 0; i < 40; i++) {
if(lx == 40) {
lx = 0;
ly += 8;
}
move_sprite(i, nx + lx, ny + ly);
lx += 8;
}
}
void move_right() {
move_huge_sprite(++x, y);
}
void move_left() {
move_huge_sprite(--x, y);
}
void main() {
SPRITES_8x8;
set_sprite_data(0, 40, sprite_tile_data);
render_huge_sprite();
load_background();
SHOW_SPRITES;
SHOW_BKG;
while(1) {
if(joypad() & J_RIGHT) {
move_right();
}
if(joypad() & J_LEFT) {
move_left();
}
delay(10);
}
}
```
================================================
FILE: huge_sprite/bg.h
================================================
// ///////////////////////
// // //
// // File Attributes //
// // //
// ///////////////////////
// Filename: bg.png
// Pixel Width: 144px
// Pixel Height: 160px
// WARNING: Width of input image padded 3px to 144px
// /////////////////
// // //
// // Constants //
// // //
// /////////////////
const int bg_tile_map_size = 0x0168;
const int bg_tile_map_width = 0x12;
const int bg_tile_map_height = 0x14;
const int bg_tile_data_size = 0x20;
const int bg_tile_count = 0x0168;
// ////////////////
// // //
// // Map Data //
// // //
// ////////////////
const unsigned char bg_map_data[] ={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01
};
// /////////////////
// // //
// // Tile Data //
// // //
// /////////////////
const unsigned char bg_tile_data[] ={
0x80,0x80,0x40,0x40,0x20,0x20,0x10,0x10,0x08,0x08,0x04,0x04,0x02,0x02,0x01,0x01,
0x80,0x80,0x40,0x40,0x20,0x20,0x10,0x10,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00
};
================================================
FILE: huge_sprite/docs.sh
================================================
docco -t ../docs/res/readme_c.jst -o ./ huge_sprite.c -c ""
mv huge_sprite.html README.md
================================================
FILE: huge_sprite/huge_sprite.c
================================================
// # Huge Sprite
// <div style="text-align: center"><img src="screenshot.png" alt="" /></div>
//
// Render a huge 40x64 sprite that can be moved around with the D-pad.
//
// ## Source
#include <gb/gb.h>
#include <types.h>
#include "sprite.h"
#include "bg.h"
#define SPR_WIDTH 8
#define SPR_HEIGHT 5
#define TOTAL_SPR SPR_WIDTH * SPR_HEIGHT
uint8_t x = 64;
uint8_t y = 96;
void render_huge_sprite() {
uint8_t i, j;
uint8_t sprite_index;
set_sprite_tile(0, 1);
for(i = 0; i < SPR_WIDTH; ++i) {
for(j = 0; j < SPR_HEIGHT; ++j) {
sprite_index = i * SPR_HEIGHT + j;
set_sprite_tile(sprite_index, sprite_index);
move_sprite(sprite_index, x + (j * 8), y + (i * 8));
}
}
}
void load_background() {
set_bkg_data(0, 2, bg_tile_data);
set_bkg_tiles(0, 0, 20, 18, bg_map_data);
}
void move_huge_sprite(uint8_t nx, uint8_t ny) {
uint8_t i, lx, ly;
lx = 0;
ly = 0;
for(i = 0; i < 40; i++) {
if(lx == 40) {
lx = 0;
ly += 8;
}
move_sprite(i, nx + lx, ny + ly);
lx += 8;
}
}
void move_right() {
move_huge_sprite(++x, y);
}
void move_left() {
move_huge_sprite(--x, y);
}
void main() {
SPRITES_8x8;
set_sprite_data(0, 40, sprite_tile_data);
render_huge_sprite();
load_background();
SHOW_SPRITES;
SHOW_BKG;
while(1) {
wait_vbl_done();
if(joypad() & J_RIGHT) {
move_right();
}
if(joypad() & J_LEFT) {
move_left();
}
delay(10);
}
}
================================================
FILE: huge_sprite/sprite.h
================================================
// ///////////////////////
// // //
// // File Attributes //
// // //
// ///////////////////////
// Filename: sprite.png
// Pixel Width: 40px
// Pixel Height: 64px
// /////////////////
// // //
// // Constants //
// // //
// /////////////////
const int sprite_tile_map_size = 0x28;
const int sprite_tile_map_width = 0x05;
const int sprite_tile_map_height = 0x08;
const int sprite_tile_data_size = 0x0280;
const int sprite_tile_count = 0x28;
// ////////////////
// // //
// // Map Data //
// // //
// ////////////////
const unsigned char sprite_map_data[] ={
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27
};
// /////////////////
// // //
// // Tile Data //
// // //
// /////////////////
const unsigned char sprite_tile_data[] ={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x03,0x1F,0x1F,
0x00,0x00,0x01,0x01,0x0F,0x0F,0x1F,0x1F,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x3F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x80,0x80,0xE0,0xE0,0xF0,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF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xFE,0x01,0xFF,0x00,0x4F,0xB0,0xC3,0x7C,0x08,0xF7,0x9F,0xE0,0xBE,0xC1,
0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFC,0x03,0x33,0xCC,0x4F,0xB0,0xBF,0xC0,
0xB7,0x48,0xB7,0x48,0xFF,0x00,0x9F,0x78,0x77,0xF8,0x17,0xE8,0x9F,0x60,0x4F,0xB0,
0xFF,0x1F,0xFF,0x1F,0xFF,0x1F,0xEF,0x1F,0xFF,0x1F,0xEF,0x1F,0xFF,0x1F,0xFF,0x1F,
0x06,0x19,0x00,0x03,0x01,0x01,0x00,0x01,0x01,0x00,0x01,0x02,0x01,0x02,0x03,0x00,
0x3C,0xC3,0x3C,0xC3,0xBC,0xC3,0x1E,0xE1,0xA0,0x5F,0xFF,0x00,0xFF,0x00,0xFF,0x00,
0x7F,0x80,0xFF,0x00,0xFE,0x01,0xFF,0x00,0x04,0xFB,0xEF,0x10,0xFF,0x00,0xEF,0x10,
0xBF,0x40,0x3F,0xC0,0x9F,0x60,0x1F,0xE0,0x4F,0xB0,0x40,0xBF,0x5F,0xAF,0xDF,0x2F,
0xFF,0x1F,0xFF,0x1F,0xFF,0x1F,0xFF,0x1F,0xFF,0x1F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF};
================================================
FILE: input_state/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m
BIN = input_state.gb
OBJS = input_state.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: input_state/README.md
================================================
# Input State

Prints the pressed button every 100ms.
================================================
FILE: input_state/input_state.c
================================================
#include <stdio.h>
#include <gb/gb.h>
void main(void) {
while(1) {
switch(joypad()) {
case J_LEFT:
printf("Left!\n");
break;
case J_RIGHT:
printf("Right!\n");
break;
case J_UP:
printf("Up!\n");
break;
case J_DOWN:
printf("Down!\n");
break;
case J_START:
printf("Start!\n");
break;
case J_SELECT:
printf("Select!\n");
break;
case J_A:
printf("A!\n");
break;
case J_B:
printf("B!\n");
break;
}
delay(100);
}
}
================================================
FILE: input_wait/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m
BIN = input_wait.gb
OBJS = input_wait.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: input_wait/README.md
================================================
# Input Wait

Demonstrates how to wait for key pressed and releases.
================================================
FILE: input_wait/input_wait.c
================================================
#include <stdio.h>
#include <gb/gb.h>
void main() {
while(1) {
printf("Press Start\n\n");
waitpad(J_START);
printf("Please hold down A!\n\n");
waitpad(J_A);
printf("Holding down A!\n\n");
waitpadup();
printf("Tired already?\n\n\n");
}
}
================================================
FILE: link/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m
BIN = link.gb
OBJS = link.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: link/README.md
================================================
# Link

Demonstrates how to use the Link Cable to send and receive bytes.
================================================
FILE: link/link.c
================================================
#include <stdio.h>
#include <gb/gb.h>
void main(void) {
printf("A: Send\nB: Receive\n\n");
_io_out = 1;
while (1) {
if (joypad() == J_A) {
waitpadup();
send_byte(); // send _io_out
printf("Sending...\n");
while (_io_status == IO_SENDING); // Wait for Send
if (_io_status == IO_IDLE) // If IO status returns to Idle then success
printf("Sent %d\n", (int)_io_out);
else
printf("Error\n"); // Else print error code
_io_out++;
}
if (joypad() == J_B) {
waitpadup();
receive_byte(); // receive _io_in
printf("Receiving...\n");
while (_io_status == IO_RECEIVING); // Wait for Receive
if (_io_status == IO_IDLE) // If IO status returns to Idle then success
printf("Received %d\n", (int)_io_in);
else
printf("Error\n"); // Else print error
}
}
}
================================================
FILE: move_sprite/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m
BIN = move_sprite.gb
OBJS = move_sprite.o ufo.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: move_sprite/README.md
================================================
# Move Sprite

Demonstrates how to move a sprite using the d-pad.
================================================
FILE: move_sprite/move_sprite.c
================================================
#include <gb/gb.h>
#include "ufo.h"
void main() {
int x = 55;
int y = 75;
SPRITES_8x8;
set_sprite_data(0, 0, ufo);
set_sprite_tile(0, 0);
move_sprite(0, x, y);
SHOW_SPRITES;
while(1) {
if(joypad() & J_RIGHT) {
x++;
move_sprite(0, x, y);
delay(10);
}
if(joypad() & J_LEFT) {
x--;
move_sprite(0, x, y);
delay(10);
}
if(joypad() & J_UP) {
y--;
move_sprite(0, x, y);
delay(10);
}
if(joypad() & J_DOWN) {
y++;
move_sprite(0, x, y);
delay(10);
}
}
}
================================================
FILE: move_sprite/ufo.c
================================================
/*
UFO.C
Tile Source File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 0
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Start of tile array. */
unsigned char ufo[] =
{
0x5A,0x3C,0xE3,0x42,0x7C,0x99,0xEB,0xA5,
0xFB,0xA5,0x66,0x99,0xE7,0x42,0x5A,0x3C
};
/* End of UFO.C */
================================================
FILE: move_sprite/ufo.h
================================================
/*
UFO.H
Include File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 0
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Bank of tiles. */
#define ufoBank 0
/* Start of tile array. */
extern unsigned char ufo[];
/* End of UFO.H */
================================================
FILE: save_ram/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m -Wl-yt3 -Wl-yo4 -Wl-ya4
BIN = save_ram.gb
OBJS = save_ram.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: save_ram/README.md
================================================
# Save RAM

Demonstrates how to load and save variables. Using Save RAM requires additional compiler arguments.
================================================
FILE: save_ram/save_ram.c
================================================
#include <stdio.h>
#include <gb/gb.h>
char *saved = (char *)0xa000; // Pointer to memory address
int *num = (int *)0xa001;
void main()
{
ENABLE_RAM_MBC1; // Enable RAM
if (saved[0] != 's') { // Check to see if the variable's ever been saved before
num[0]=0; // Assign the variable an initial value
saved[0] = 's'; // Assign saved an 's' value so the if statement isn't executed on next load
}
printf("The value of num is: %d\n", num[0]);
num[0]++; // Increment so on next load there's a new number
DISABLE_RAM_MBC1; // Disable RAM
}
================================================
FILE: simple_shmup/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m -Wl-j
LDFLAGS= -Wl-yt0x01 -Wl-yo4
BIN = simple_shmup.gb
OBJS = simple_shmup.o bank2.o bank3.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
simple_shmup.o: simple_shmup.c
$(CC) $(CFLAGS) -c -o $@ $<
bank2.o: bank2.c
$(CC) $(CFLAGS) -Wf-bo2 -c -o $@ $<
bank3.o: bank3.c
$(CC) $(CFLAGS) -Wf-bo3 -c -o $@ $<
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: simple_shmup/README.md
================================================
# Simple SHMUP

A simple side-scrolling shoot 'em up game. This example uses several small
sprites, a scrolling background and a full-screen image.
Tutorial: [How to write a simple side scrolling game in GBDK](https://pastebin.com/F3tHLj68) by Jason
================================================
FILE: simple_shmup/bank2.c
================================================
#include <gb/gb.h>
#include <gb/drawing.h>
#include <rand.h>
const UBYTE badguy_ai[] = {
32, 32, 33, 34, 35, 35, 36, 37,
38, 38, 39, 40, 41, 41, 42, 43,
44, 44, 45, 46, 46, 47, 48, 48,
49, 50, 50, 51, 51, 52, 53, 53,
54, 54, 55, 55, 56, 56, 57, 57,
58, 58, 58, 59, 59, 60, 60, 60,
61, 61, 61, 61, 62, 62, 62, 62,
62, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63,
62, 62, 62, 62, 62, 61, 61, 61,
61, 60, 60, 60, 59, 59, 59, 58,
58, 57, 57, 56, 56, 55, 55, 54,
54, 53, 53, 52, 52, 51, 50, 50,
49, 49, 48, 47, 47, 46, 45, 44,
44, 43, 42, 42, 41, 40, 39, 39,
38, 37, 36, 36, 35, 34, 33, 33,
32, 31, 30, 29, 29, 28, 27, 26,
26, 25, 24, 23, 23, 22, 21, 20,
20, 19, 18, 18, 17, 16, 16, 15,
14, 14, 13, 12, 12, 11, 11, 10,
9, 9, 8, 8, 7, 7, 6, 6,
6, 5, 5, 4, 4, 4, 3, 3,
3, 2, 2, 2, 1, 1, 1, 1,
1, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 2, 2,
2, 3, 3, 3, 4, 4, 4, 5,
5, 5, 6, 6, 7, 7, 8, 8,
9, 9, 10, 11, 11, 12, 12, 13,
14, 14, 15, 16, 16, 17, 18, 18,
19, 20, 20, 21, 22, 23, 23, 24,
25, 26, 26, 27, 28, 29, 29, 30
};
UBYTE playing, joypad_state;
UBYTE player_x, player_y;
UBYTE badguy_x, badguy_y, badguy_z, badguy_offset;
UBYTE player_shot_x, player_shot_y, player_shot_z;
void update_graphics(void) {
disable_interrupts();
scroll_bkg(1, 0);
move_sprite(0, player_x, player_y);
move_sprite(1, badguy_x, badguy_y);
move_sprite(2, player_shot_x, player_shot_y);
enable_interrupts();
}
void update_joypad(void) {
joypad_state = joypad();
if(joypad_state & J_LEFT) {
if(player_x > 8)
player_x--;
}
if(joypad_state & J_RIGHT) {
if(player_x < 160)
player_x++;
}
if(joypad_state & J_UP) {
if(player_y > 16)
player_y--;
}
if(joypad_state & J_DOWN) {
if(player_y < 152)
player_y++;
}
if(joypad_state & J_A) {
if(player_shot_z == 0) {
player_shot_z = 1;
player_shot_x = player_x;
player_shot_y = player_y;
}
}
if(player_shot_z == 1) {
player_shot_x = player_shot_x + 2;
if(player_shot_x > 240) {
player_shot_x = 250;
player_shot_y = 250;
player_shot_z = 0;
}
}
}
void update_badguy(void) {
badguy_x = badguy_x - 1;
if(badguy_x > 240) {
badguy_offset = rand();
while(badguy_offset > 134) {
badguy_offset = rand();
}
badguy_x = 239;
}
badguy_y = badguy_offset + badguy_ai[badguy_z];
badguy_z++;
}
void collision_detection(void) {
if(player_shot_y > badguy_y - 4) {
if(player_shot_y < badguy_y + 4) {
if(player_shot_x > badguy_x - 4) {
if(player_shot_x < badguy_x + 4) {
player_shot_z = 0;
player_shot_x = 250;
player_shot_y = 250;
badguy_x = 255;
}
}
}
}
if(player_y > badguy_y - 4) {
if(player_y < badguy_y + 4) {
if(player_x > badguy_x - 4) {
if(player_x < badguy_x + 4) {
playing = 0;
delay(1000);
}
}
}
}
}
void do_gameplay(void) {
playing = 1;
player_x = GRAPHICS_WIDTH / 2;
player_y = GRAPHICS_HEIGHT / 2;
while(playing == 1) {
update_joypad();
update_badguy();
collision_detection();
delay(10);
}
}
================================================
FILE: simple_shmup/bank3.c
================================================
#include <gb/gb.h>
#include <gb/cgb.h>
#include "bg_title.c"
#include "bg_title_map.c"
#include "bg_tile.c"
#include "spr_tiles.c"
const UBYTE gamemap[] = {
0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,
};
const UWORD bgpal[] = {
RGB(0, 0, 0), RGB(10, 10, 10), RGB(20, 20, 20), RGB(30, 30, 30),
};
const UWORD spritepal[] = {
RGB(0, 0, 0), RGB(10, 10, 10), RGB(20, 20, 20), RGB(30, 30, 30),
};
void draw_title_screen(void) {
wait_vbl_done();
DISPLAY_OFF;
set_bkg_data(0, 255, bg_title_tiledata);
set_bkg_tiles(0, 0, 20, 18, bg_title_tilemap);
SHOW_BKG;
HIDE_WIN;
HIDE_SPRITES;
wait_vbl_done();
DISPLAY_ON;
waitpad(255);
}
void load_game_tiles(void) {
wait_vbl_done();
DISPLAY_OFF;
set_bkg_data(0, 1, BGTile);
set_bkg_tiles(0, 0, 32, 32, gamemap);
set_bkg_palette(0, 1, &bgpal[0]);
set_sprite_data(0, 3, SpriteTiles);
set_sprite_tile(0, 0);
set_sprite_tile(1, 1);
set_sprite_tile(2, 2);
SPRITES_8x8;
SHOW_SPRITES;
SHOW_BKG;
DISPLAY_ON;
}
================================================
FILE: simple_shmup/bg_tile.c
================================================
/*
BG_TILE.C
Tile Source File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 0
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Start of tile array. */
const unsigned char BGTile[] =
{
0xFF,0xFF,0xFB,0xFB,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0x7F,0x7F,0xF7,0xF7,0xFF,0xFF
};
/* End of BG_TILE.C */
================================================
FILE: simple_shmup/bg_tile.h
================================================
/*
BG_TILE.H
Include File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 0
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Bank of tiles. */
#define BGTileBank 0
/* Start of tile array. */
extern unsigned char BGTile[];
/* End of BG_TILE.H */
================================================
FILE: simple_shmup/bg_title.c
================================================
/*
Advanced PCX to GameBoy converter v2.15
Tiles data
Original PCX File : "BG.PCX"
Number of Tiles : 159
TileMap Size : 20x18
*/
const unsigned char bg_title_tiledata[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xDF,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x30,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,
0xFE,0xFF,0xFF,0xFC,0xF5,0xFB,0xFB,0xF7,0xE7,0xFF,0xFF,0xEF,0xDF,0xEF,0xDF,0xE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0x7C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xF8,0xF8,0x01,0x01,0x01,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x8F,0x8F,0x1F,0x1F,0x1F,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xE1,0xE1,0xF8,0xF8,0xF8,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFC,0xFC,0x3F,0x3F,0x3F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x78,0x78,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xF8,0xF8,0xFE,0xFE,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x7F,0x7F,0x0F,0x0F,0x0F,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
================================================
FILE: simple_shmup/bg_title_map.c
================================================
/*
Advanced PCX to GameBoy converter v2.15
TileMap data
Original PCX File : "BG.PCX"
Number of Tiles : 159
TileMap Size : 20x18
*/
const unsigned char bg_title_tilemap[] = {
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x02,0x01,0x01,0x01,0x01,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x04,0x05,0x06,0x05,0x05,0x05,0x07,0x05,0x08,0x07,0x05,0x05,0x09,0x01,0x01,0x01,
0x01,0x01,0x01,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x01,0x01,
0x01,0x01,0x01,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x01,0x01,
0x01,0x01,0x28,0x29,0x2A,0x2B,0x01,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x01,0x01,
0x01,0x01,0x37,0x38,0x39,0x3A,0x01,0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x01,0x01,
0x01,0x01,0x01,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x48,0x4E,0x4F,0x50,0x51,0x48,0x52,0x01,0x01,
0x01,0x01,0x01,0x53,0x54,0x48,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x3F,0x01,0x01,
0x01,0x01,0x01,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x62,0x69,0x6A,0x6B,0x6C,0x01,0x01,0x01,
0x01,0x6D,0x01,0x6E,0x6F,0x62,0x70,0x71,0x72,0x73,0x74,0x75,0x01,0x76,0x62,0x77,0x78,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x79,0x01,0x01,0x01,0x7A,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x7B,0x7C,0x01,0x01,0x01,0x01,0x01,0x7D,0x01,0x01,0x01,0x7E,0x7F,0x80,0x01,0x01,0x01,0x01,0x01,0x01,
0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x01,0x01,0x8A,0x8B,0x8C,0x8D,0x8E,0x83,0x84,0x8F,0x90,
0x91,0x92,0x93,0x01,0x94,0x95,0x96,0x97,0x98,0x01,0x01,0x94,0x99,0x9A,0x9B,0x9C,0x93,0x01,0x9D,0x9E};
================================================
FILE: simple_shmup/make.bat
================================================
echo off
lcc -Wa-l -Wl-m -Wl-j -c -o simple_shmup.o simple_shmup.c
lcc -Wa-l -Wl-m -Wl-j -Wf-bo2 -c -o bank2.o bank2.c
lcc -Wa-l -Wl-m -Wl-j -Wf-bo3 -c -o bank3.o bank3.c
lcc -Wa-l -Wl-m -Wl-j -Wl-yt0x01 -Wl-yo4 -o simple_shmup.gb simple_shmup.o bank2.o bank3.o
rem -Wl-yp0x143=0x80
================================================
FILE: simple_shmup/simple_shmup.c
================================================
#include <gb/gb.h>
#include <rand.h>
#include <stdio.h>
// bank 0
void vblint(void);
// bank 2
void update_graphics(void);
void do_gameplay(void);
void update_joypad(void);
void update_badguy(void);
void collision_detection(void);
// bank 3
void draw_title_screen(void);
void load_game_tiles(void);
fixed seed;
// main
void main(void) {
seed.b.l = DIV_REG;
SWITCH_ROM_MBC1(3);
draw_title_screen();
seed.b.h = DIV_REG;
initrand(seed.w);
load_game_tiles();
disable_interrupts();
add_VBL(vblint);
SWITCH_ROM_MBC1(2);
enable_interrupts();
do_gameplay();
reset();
}
void vblint(void) {
SWITCH_ROM_MBC1(2);
update_graphics();
}
================================================
FILE: simple_shmup/spr_tiles.c
================================================
/*
SPR_TILES.C
Tile Source File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 2
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Start of tile array. */
const unsigned char SpriteTiles[] =
{
0x40,0x40,0xE0,0xA0,0xFE,0x80,0xC8,0xB8,
0x8C,0xF4,0x96,0xEA,0xA9,0xD7,0xFF,0xFF,
0x02,0x40,0xC5,0xA3,0xE5,0xBB,0xF5,0xAB,
0xF5,0xAB,0xF5,0xAB,0xFD,0xBB,0x42,0x42,
0x00,0x00,0x00,0x18,0x18,0x3C,0x3C,0x66,
0x3C,0x66,0x18,0x3C,0x00,0x18,0x00,0x00
};
/* End of SPR_TILES.C */
================================================
FILE: simple_shmup/spr_tiles.h
================================================
/*
SPR_TILES.H
Include File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 2
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Bank of tiles. */
#define SpriteTilesBank 0
/* Start of tile array. */
extern unsigned char SpriteTiles[];
/* End of SPR_TILES.H */
================================================
FILE: small_sprite/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
AS = $(LCC) -c
CC = $(LCC) -Wa-l -Wl-m
BIN = small_sprite.gb
OBJS = small_sprite.o sprite.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: small_sprite/README.md
================================================
# Small Sprite

Renders a small 8x8 sprite to the screen.
================================================
FILE: small_sprite/small_sprite.c
================================================
#include <gb/gb.h>
#include "sprite.h"
void main() {
SPRITES_8x8;
set_sprite_data(0, 8, sprite);
set_sprite_tile(0, 0);
move_sprite(0, 50, 50);
SHOW_SPRITES;
}
================================================
FILE: small_sprite/sprite.c
================================================
/*
SPRITE.C
Tile Source File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 0
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Start of tile array. */
unsigned char sprite[] =
{
0x7E,0x7E,0x99,0x99,0x81,0x81,0xA5,0xA5,
0x81,0x81,0xDB,0xDB,0xC3,0xC3,0x3C,0x3C
};
/* End of SPRITE.C */
================================================
FILE: small_sprite/sprite.h
================================================
/*
SPRITE.H
Include File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 0
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Bank of tiles. */
#define spriteBank 0
/* Start of tile array. */
extern unsigned char sprite[];
/* End of SPRITE.H */
================================================
FILE: window/Makefile
================================================
LCC = $(GBDKDIR)bin/lcc
CC = $(LCC) -Wa-l -Wl-m
BIN = window.gb
OBJS = main.o
all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -f *.o *.lst *.sym *.asm *.gb *.ihx *.noi *.map
================================================
FILE: window/README.md
================================================
# Window

Demonstrates the use of the window layer along with the background layer. Both
use similar API.
================================================
FILE: window/bg.c
================================================
/*
Advanced PCX to GameBoy converter v2.15
Tiles data
Original PCX File : "BG.PCX"
Number of Tiles : 152
TileMap Size : 20x18
*/
const unsigned char bg_tiledata[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFC,0xFF,0xFE,0xFF,0xFC,0xFF,0xFE,0xFF,0xFC,0xFF,0xFE,0xFF,0xFC,0xFF,0xFE,0xFF,
0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,
0x3E,0xFF,0x3E,0xFF,0x3E,0xFF,0x3E,0xFF,0x3E,0xFF,0x3F,0xFF,0x1F,0xFF,0x3F,0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ILE: window/bg_map.c
================================================
/*
Advanced PCX to GameBoy converter v2.15
TileMap data
Original PCX File : "BG.PCX"
Number of Tiles : 152
TileMap Size : 20x18
*/
const unsigned char bg_tilemap[] = {
0x01,0x01,0x02,0x03,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x03,0x03,
0x01,0x01,0x11,0x03,0x03,0x12,0x13,0x03,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x0F,0x1C,0x1D,0x03,
0x1E,0x1F,0x20,0x03,0x03,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x0F,0x2C,0x2D,0x2E,
0x03,0x03,0x03,0x03,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x0F,0x3B,0x0F,0x3C,
0x3D,0x3E,0x3F,0x03,0x40,0x41,0x42,0x43,0x44,0x45,0x0F,0x46,0x47,0x48,0x49,0x4A,0x0F,0x4B,0x0F,0x4C,
0x4D,0x4E,0x4F,0x03,0x50,0x51,0x52,0x53,0x54,0x55,0x0F,0x0F,0x56,0x57,0x58,0x59,0x0F,0x5A,0x5B,0x5C,
0x5D,0x5E,0x5F,0x03,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x0F,0x0F,0x6B,0x03,0x03,
0x6C,0x6D,0x6E,0x03,0x6F,0x70,0x71,0x72,0x0F,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x03,0x7C,
0x7D,0x7E,0x7F,0x03,0x03,0x03,0x80,0x03,0x81,0x82,0x83,0x84,0x85,0x86,0x03,0x03,0x03,0x03,0x03,0x87,
0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x88,0x89,0x8A,0x01,0x8B,0x8C,0x01,0x01,0x01,0x01,0x01,0x01,
0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x8D,0x8E,0x01,0x01,0x8F,0x90,0x01,0x01,0x01,0x01,0x01,0x01,
0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x91,0x01,0x01,0x01,0x01,0x92,0x01,0x01,0x01,0x01,0x01,0x01,
0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x93,0x01,0x01,0x01,0x01,0x94,0x01,0x01,0x01,0x01,0x01,0x01,
0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x95,0x01,0x01,0x01,0x01,0x96,0x97,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01};
================================================
FILE: window/border.c
================================================
/*
BORDER.C
Tile Source File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 8
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Start of tile array. */
const unsigned char border[] =
{
0x00,0x00,0x1F,0x1F,0x20,0x20,0x4F,0x4F,
0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,
0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,
0x4F,0x4F,0x20,0x20,0x1F,0x1F,0x00,0x00,
0x00,0x00,0xF8,0xF8,0x04,0x04,0xF2,0xF2,
0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
0xF2,0xF2,0x04,0x04,0xF8,0xF8,0x00,0x00,
0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,
0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,
0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,
0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
/* End of BORDER.C */
================================================
FILE: window/border.h
================================================
/*
BORDER.H
Include File.
Info:
Form : All tiles as one unit.
Format : Gameboy 4 color.
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 8
Palette colors : None.
SGB Palette : None.
CGB Palette : None.
Convert to metatiles : No.
This file was generated by GBTD v2.2
*/
/* Bank of tiles. */
#define borderBank 0
/* Start of tile array. */
extern unsigned char border[];
/* End of BORDER.H */
================================================
FILE: window/main.c
================================================
#include <gb/gb.h>
#include "bg.c"
#include "bg_map.c"
#include "border.c"
#include "window.c"
void main() {
set_bkg_data(0, 152, bg_tiledata);
set_bkg_tiles(0, 0, 20, 18, bg_tilemap);
SHOW_BKG;
set_win_data(152, 9, border);
set_win_tiles(0, 0, 20, 4, window);
move_win(7, 112);
SHOW_WIN;
}
================================================
FILE: window/window.c
================================================
/*
WINDOW.C
Map Source File.
Info:
Section :
Bank : 0
Map size : 20 x 4
Tile set : P:\Homebrew\GB\gbdk_playground\window\border.gbr
Plane count : 1 plane (8 bits)
Plane order : Tiles are continues
Tile offset : 152
Split data : No
This file was generated by GBMB v1.8
*/
#define windowWidth 20
#define windowHeight 4
#define windowBank 0
const unsigned char window[] =
{
0x98,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,
0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9A,
0x9E,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0x9F,
0x9E,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0x9F,
0x99,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,
0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9B
};
/* End of WINDOW.C */
================================================
FILE: window/window.h
================================================
/*
WINDOW.H
Map Include File.
Info:
Section :
Bank : 0
Map size : 20 x 4
Tile set : P:\Homebrew\GB\gbdk_playground\window\border.gbr
Plane count : 1 plane (8 bits)
Plane order : Tiles are continues
Tile offset : 152
Split data : No
This file was generated by GBMB v1.8
*/
#define windowWidth 20
#define windowHeight 4
#define windowBank 0
extern unsigned char window[];
/* End of WINDOW.H */
gitextract_gw1x939_/
├── .gitignore
├── README.md
├── background/
│ ├── Makefile
│ ├── README.md
│ ├── background.c
│ ├── bg_data.c
│ ├── bg_data.pcx
│ ├── bg_data_map.c
│ └── docs.sh
├── beep/
│ ├── Makefile
│ ├── README.md
│ └── beep.c
├── big_sprite/
│ ├── Makefile
│ ├── README.md
│ ├── big_sprite.c
│ ├── docs.sh
│ ├── sprite.c
│ └── sprite.h
├── big_sprite_animation/
│ ├── Makefile
│ ├── README.md
│ ├── big_sprite_animation.c
│ ├── cards.c
│ ├── cards.gbr
│ └── cards.h
├── blank/
│ ├── Makefile
│ ├── README.md
│ ├── blank.c
│ └── docs.sh
├── color/
│ ├── Makefile
│ ├── README.md
│ ├── bg_data.c
│ ├── bg_data_map.c
│ └── color.c
├── detect_gb/
│ ├── Makefile
│ ├── README.md
│ └── detect_gb.c
├── docs/
│ └── res/
│ └── readme_c.jst
├── drawing/
│ ├── Makefile
│ ├── README.md
│ └── drawing.c
├── font/
│ ├── Makefile
│ ├── README.md
│ └── font.c
├── hello_world/
│ ├── Makefile
│ ├── README.md
│ ├── docs.sh
│ └── hello_world.c
├── huge_sprite/
│ ├── Makefile
│ ├── README.md
│ ├── bg.h
│ ├── docs.sh
│ ├── huge_sprite.c
│ └── sprite.h
├── input_state/
│ ├── Makefile
│ ├── README.md
│ └── input_state.c
├── input_wait/
│ ├── Makefile
│ ├── README.md
│ └── input_wait.c
├── link/
│ ├── Makefile
│ ├── README.md
│ └── link.c
├── move_sprite/
│ ├── Makefile
│ ├── README.md
│ ├── move_sprite.c
│ ├── ufo.c
│ ├── ufo.gbr
│ └── ufo.h
├── save_ram/
│ ├── Makefile
│ ├── README.md
│ └── save_ram.c
├── simple_shmup/
│ ├── Makefile
│ ├── README.md
│ ├── backgrounds.gbr
│ ├── bank2.c
│ ├── bank3.c
│ ├── bg_tile.c
│ ├── bg_tile.h
│ ├── bg_title.c
│ ├── bg_title_map.c
│ ├── make.bat
│ ├── simple_shmup.c
│ ├── spr_tiles.c
│ ├── spr_tiles.h
│ └── sprites.gbr
├── small_sprite/
│ ├── Makefile
│ ├── README.md
│ ├── small_sprite.c
│ ├── sprite.c
│ ├── sprite.gbr
│ └── sprite.h
└── window/
├── Makefile
├── README.md
├── bg.c
├── bg.pcx
├── bg_map.c
├── border.c
├── border.gbr
├── border.h
├── main.c
├── window.c
├── window.gbm
└── window.h
SYMBOL INDEX (32 symbols across 21 files)
FILE: background/background.c
function main (line 13) | void main() {
FILE: beep/beep.c
function main (line 4) | void main() {
FILE: big_sprite/big_sprite.c
function main (line 16) | void main() {
FILE: big_sprite_animation/big_sprite_animation.c
function main (line 4) | void main() {
FILE: blank/blank.c
function main (line 11) | void main() {
FILE: color/color.c
function main (line 25) | void main(void){
FILE: detect_gb/detect_gb.c
function main (line 6) | void main() {
FILE: drawing/drawing.c
function main (line 6) | void main() {
FILE: font/font.c
function main (line 5) | void main(void) {
FILE: hello_world/hello_world.c
function main (line 15) | void main() {
FILE: huge_sprite/huge_sprite.c
function render_huge_sprite (line 21) | void render_huge_sprite() {
function load_background (line 36) | void load_background() {
function move_huge_sprite (line 41) | void move_huge_sprite(uint8_t nx, uint8_t ny) {
function move_right (line 56) | void move_right() {
function move_left (line 60) | void move_left() {
function main (line 64) | void main() {
FILE: input_state/input_state.c
function main (line 4) | void main(void) {
FILE: input_wait/input_wait.c
function main (line 4) | void main() {
FILE: link/link.c
function main (line 4) | void main(void) {
FILE: move_sprite/move_sprite.c
function main (line 4) | void main() {
FILE: save_ram/save_ram.c
function main (line 7) | void main()
FILE: simple_shmup/bank2.c
function update_graphics (line 48) | void update_graphics(void) {
function update_joypad (line 62) | void update_joypad(void) {
function update_badguy (line 99) | void update_badguy(void) {
function collision_detection (line 116) | void collision_detection(void) {
function do_gameplay (line 142) | void do_gameplay(void) {
FILE: simple_shmup/bank3.c
function draw_title_screen (line 50) | void draw_title_screen(void) {
function load_game_tiles (line 71) | void load_game_tiles(void) {
FILE: simple_shmup/simple_shmup.c
function main (line 27) | void main(void) {
function vblint (line 53) | void vblint(void) {
FILE: small_sprite/small_sprite.c
function main (line 4) | void main() {
FILE: window/main.c
function main (line 8) | void main() {
Condensed preview — 103 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (121K chars).
[
{
"path": ".gitignore",
"chars": 70,
"preview": "*.c~\n*.un~\n*.lst\n*.o\n*.sym\n*.asm \n*.ihx \n*.map \n*.noi\n\n# Binaries\n*.gb"
},
{
"path": "README.md",
"chars": 4013,
"preview": "# GBDK Playground\n\nIt has 16 kB of RAM, man.\n\n## Build Requirements\n\nMake sure to set the `GBDKDIR` environment variable"
},
{
"path": "background/Makefile",
"chars": 205,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = background.gb\nOBJS = background.o\n\nall: $(BIN)\n\n$(BIN): $(OBJS)"
},
{
"path": "background/README.md",
"chars": 1194,
"preview": "\n\n\n\n# Background\n<div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n\nRenders a full-screen backgr"
},
{
"path": "background/background.c",
"chars": 1159,
"preview": "// # Background\n// <div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n//\n// Renders a full-screen"
},
{
"path": "background/bg_data.c",
"chars": 10798,
"preview": "/* \n Advanced PCX to GameBoy converter v2.15\n\n Tiles data\n Original PCX File : \"BG_DATA.PCX\"\n\n Number of Tiles : 131\n "
},
{
"path": "background/bg_data_map.c",
"chars": 2004,
"preview": "/*\n Advanced PCX to GameBoy converter v2.15\n\n TileMap data\n Original PCX File : \"BG_DATA.PCX\"\n\n Number of Tiles : 131\n"
},
{
"path": "background/docs.sh",
"chars": 82,
"preview": "docco -t ../docs/res/readme_c.jst -o ./ background.c\nmv background.html README.md\n"
},
{
"path": "beep/Makefile",
"chars": 193,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = beep.gb\nOBJS = beep.o\n\nall: $(BIN)\n\n$(BIN): $(OBJS)\n\t$(CC) -o $"
},
{
"path": "beep/README.md",
"chars": 75,
"preview": "# Beep\n\n\n\nDemonstrates how to play a simple SFX sound.\n\n"
},
{
"path": "beep/beep.c",
"chars": 577,
"preview": "#include <gb/gb.h>\n#include <gb/drawing.h>\n\nvoid main() {\n NR50_REG = 0xFF;\n NR51_REG = 0xFF;\n NR52_REG = 0x80;"
},
{
"path": "big_sprite/Makefile",
"chars": 215,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = big_sprite.gb\nOBJS = big_sprite.o sprite.o\n\nall: $(BIN)\n\n$(BIN):"
},
{
"path": "big_sprite/README.md",
"chars": 2266,
"preview": "\n\n\n\n# Big Sprite\n<div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n\nRenders a big sprite of 16x1"
},
{
"path": "big_sprite/big_sprite.c",
"chars": 2167,
"preview": "// # Big Sprite\n// <div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n//\n// Renders a big sprite "
},
{
"path": "big_sprite/docs.sh",
"chars": 82,
"preview": "docco -t ../docs/res/readme_c.jst -o ./ big_sprite.c\nmv big_sprite.html README.md\n"
},
{
"path": "big_sprite/sprite.c",
"chars": 850,
"preview": "/*\n\n SPRITE.C\n\n Tile Source File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameb"
},
{
"path": "big_sprite/sprite.h",
"chars": 547,
"preview": "/*\n\n SPRITE.H\n\n Include File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameboy 4"
},
{
"path": "big_sprite_animation/Makefile",
"chars": 232,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = big_sprite_animation.gb\nOBJS = big_sprite_animation.o cards.o\n\na"
},
{
"path": "big_sprite_animation/README.md",
"chars": 116,
"preview": "# Big Sprite Animation\n\n\n\nRenders a big 16x16 animated sprite of 2 frames using a delay of 500.\n\n"
},
{
"path": "big_sprite_animation/big_sprite_animation.c",
"chars": 425,
"preview": "#include <gb/gb.h>\n#include \"cards.h\"\n\nvoid main() {\n SPRITES_8x16;\n set_sprite_data(0, 8, cards);\n set_sprite_"
},
{
"path": "big_sprite_animation/cards.c",
"chars": 1191,
"preview": "/*\n\n CARDS.C\n\n Tile Source File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gamebo"
},
{
"path": "big_sprite_animation/cards.h",
"chars": 543,
"preview": "/*\n\n CARDS.H\n\n Include File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameboy 4 "
},
{
"path": "blank/Makefile",
"chars": 195,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = blank.gb\nOBJS = blank.o\n\nall: $(BIN)\n\n$(BIN): $(OBJS)\n\t$(CC) -o"
},
{
"path": "blank/README.md",
"chars": 395,
"preview": "\n\n\n\n# Blank\n<div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n\nThis example contains the minimal"
},
{
"path": "blank/blank.c",
"chars": 389,
"preview": "// # Blank\n// <div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n//\n// This example contains the "
},
{
"path": "blank/docs.sh",
"chars": 72,
"preview": "docco -t ../docs/res/readme_c.jst -o ./ blank.c\nmv blank.html README.md\n"
},
{
"path": "color/Makefile",
"chars": 196,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wm-yC\n\nBIN = color.gbc\nOBJS = color.o\n\nall: $(BIN)\n\n$(BIN): $(OBJS)\n\t$(CC) -"
},
{
"path": "color/README.md",
"chars": 97,
"preview": "# Color\n\n\n\nDemonstrates how to use palettes and create a Game Boy Color ROM.\n\n"
},
{
"path": "color/bg_data.c",
"chars": 10798,
"preview": "/* \n Advanced PCX to GameBoy converter v2.15\n\n Tiles data\n Original PCX File : \"BG_DATA.PCX\"\n\n Number of Tiles : 131\n "
},
{
"path": "color/bg_data_map.c",
"chars": 2005,
"preview": "/*\n Advanced PCX to GameBoy converter v2.15\n\n TileMap data\n Original PCX File : \"BG_DATA.PCX\"\n \n Number of Tiles : 131"
},
{
"path": "color/color.c",
"chars": 985,
"preview": "#include <gb/gb.h>\n#include <gb/cgb.h> // Include cgb functions\n\n// Background taken from 'background' example\n#include "
},
{
"path": "detect_gb/Makefile",
"chars": 202,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = detect_gb.gb\nOBJS = detect_gb.o\n\nall: $(BIN)\n\n$(BIN): $(OBJS)\n\t$"
},
{
"path": "detect_gb/README.md",
"chars": 73,
"preview": "# Detect GB\n\n\n\nDetect which GB is being used/emulated."
},
{
"path": "detect_gb/detect_gb.c",
"chars": 266,
"preview": "#include <gb/gb.h>\n#include <stdio.h>\n\nextern UBYTE _cpu;\n\nvoid main() {\n\tswitch (_cpu) {\n\tcase 0x01:\n\t\tprintf(\"DMG or S"
},
{
"path": "docs/res/readme_c.jst",
"chars": 215,
"preview": "<% for (var i = 0, l = sections.length; i<l; i++) { %>\n\n<% var section = sections[i]; %>\n\n<%= section.docsText %>\n\n<% if"
},
{
"path": "drawing/Makefile",
"chars": 198,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = drawing.gb\nOBJS = drawing.o\n\nall: $(BIN)\n\n$(BIN): $(OBJS)\n\t$(CC)"
},
{
"path": "drawing/README.md",
"chars": 269,
"preview": "# Drawing\n\n\n\nDemonstrates built-in GBDK drawing functions. Operate the D-Pad to use the plot function"
},
{
"path": "drawing/drawing.c",
"chars": 1275,
"preview": "#include <gb/gb.h>\n#include <gb/drawing.h>\n\nuint8_t x = 1, y = 1, i = 3, j, f;\n\nvoid main() {\n\tcolor(BLACK, WHITE, SOLID"
},
{
"path": "font/Makefile",
"chars": 208,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = font.gb\nOBJS = font.o\n\nall: $(BIN)\n\n$(BIN): $(OB"
},
{
"path": "font/README.md",
"chars": 250,
"preview": "# Font\n\n\n\nDemonstrates how to switch from the default font. Be careful when using/loading fonts as th"
},
{
"path": "font/font.c",
"chars": 197,
"preview": "#include <stdio.h> \n#include <gb/gb.h>\n#include <gbdk/font.h>\n\nvoid main(void) {\n\tfont_init(); // Initialize font\n\tfont_"
},
{
"path": "hello_world/Makefile",
"chars": 222,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = hello_world.gb\nOBJS = hello_world.o\n\nall: $(BIN)"
},
{
"path": "hello_world/README.md",
"chars": 1000,
"preview": "\n\n\n\n# Hello World\n<div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n\nPrints `Hello World!` to th"
},
{
"path": "hello_world/docs.sh",
"chars": 85,
"preview": "docco -t ../docs/res/readme_c.jst -o ./ hello_world.c\nmv hello_world.html README.md\n\n"
},
{
"path": "hello_world/hello_world.c",
"chars": 932,
"preview": "// # Hello World\n// <div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n//\n// Prints `Hello World!"
},
{
"path": "huge_sprite/Makefile",
"chars": 222,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = huge_sprite.gb\nOBJS = huge_sprite.o\n\nall: $(BIN)"
},
{
"path": "huge_sprite/README.md",
"chars": 1385,
"preview": "\n\n\n\n# Huge Sprite\n<div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n\nRender a huge 40x64 sprite "
},
{
"path": "huge_sprite/bg.h",
"chars": 2934,
"preview": "// ///////////////////////\r\n// // //\r\n// // File Attributes //\r\n// // //\r\n// /////"
},
{
"path": "huge_sprite/docs.sh",
"chars": 90,
"preview": "docco -t ../docs/res/readme_c.jst -o ./ huge_sprite.c -c \"\"\nmv huge_sprite.html README.md\n"
},
{
"path": "huge_sprite/huge_sprite.c",
"chars": 1395,
"preview": "// # Huge Sprite\n// <div style=\"text-align: center\"><img src=\"screenshot.png\" alt=\"\" /></div>\n//\n// Render a huge 40x64 "
},
{
"path": "huge_sprite/sprite.h",
"chars": 4415,
"preview": "// ///////////////////////\r\n// // //\r\n// // File Attributes //\r\n// // //\r\n// /////"
},
{
"path": "input_state/Makefile",
"chars": 222,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = input_state.gb\nOBJS = input_state.o\n\nall: $(BIN)"
},
{
"path": "input_state/README.md",
"chars": 76,
"preview": "# Input State\n\n\n\nPrints the pressed button every 100ms.\n\n"
},
{
"path": "input_state/input_state.c",
"chars": 793,
"preview": "#include <stdio.h>\n#include <gb/gb.h>\n\nvoid main(void) {\n while(1) {\n switch(joypad()) {\n case J_LE"
},
{
"path": "input_wait/Makefile",
"chars": 220,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = input_wait.gb\nOBJS = input_wait.o\n\nall: $(BIN)\n\n"
},
{
"path": "input_wait/README.md",
"chars": 91,
"preview": "# Input Wait\n\n\n\nDemonstrates how to wait for key pressed and releases.\n\n"
},
{
"path": "input_wait/input_wait.c",
"chars": 303,
"preview": "#include <stdio.h>\n#include <gb/gb.h>\n\nvoid main() {\n while(1) {\n printf(\"Press Start\\n\\n\");\n waitpad(J"
},
{
"path": "link/Makefile",
"chars": 208,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = link.gb\nOBJS = link.o\n\nall: $(BIN)\n\n$(BIN): $(OB"
},
{
"path": "link/README.md",
"chars": 96,
"preview": "# Link\n\n\n\nDemonstrates how to use the Link Cable to send and receive bytes.\n\n"
},
{
"path": "link/link.c",
"chars": 804,
"preview": "#include <stdio.h>\n#include <gb/gb.h>\n\nvoid main(void) {\n\tprintf(\"A: Send\\nB: Receive\\n\\n\");\n\t_io_out = 1;\n\twhile (1) {\n"
},
{
"path": "move_sprite/Makefile",
"chars": 228,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = move_sprite.gb\nOBJS = move_sprite.o ufo.o\n\nall: "
},
{
"path": "move_sprite/README.md",
"chars": 88,
"preview": "# Move Sprite\n\n\n\nDemonstrates how to move a sprite using the d-pad.\n\n"
},
{
"path": "move_sprite/move_sprite.c",
"chars": 692,
"preview": "#include <gb/gb.h>\n#include \"ufo.h\"\n\nvoid main() {\n int x = 55;\n int y = 75;\n\n SPRITES_8x8;\n set_sprite_data"
},
{
"path": "move_sprite/ufo.c",
"chars": 581,
"preview": "/*\n\n UFO.C\n\n Tile Source File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameboy "
},
{
"path": "move_sprite/ufo.h",
"chars": 533,
"preview": "/*\n\n UFO.H\n\n Include File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameboy 4 co"
},
{
"path": "save_ram/Makefile",
"chars": 240,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m -Wl-yt3 -Wl-yo4 -Wl-ya4\n\nBIN = save_ram.gb\nOBJS = save_"
},
{
"path": "save_ram/README.md",
"chars": 132,
"preview": "# Save RAM\n\n\n\nDemonstrates how to load and save variables. Using Save RAM requires additional compile"
},
{
"path": "save_ram/save_ram.c",
"chars": 550,
"preview": "#include <stdio.h>\n#include <gb/gb.h>\n\nchar *saved = (char *)0xa000; // Pointer to memory address\nint *num = (int *)0xa0"
},
{
"path": "simple_shmup/Makefile",
"chars": 457,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m -Wl-j\nLDFLAGS= -Wl-yt0x01 -Wl-yo4\n\nBIN = simple_shmup.g"
},
{
"path": "simple_shmup/README.md",
"chars": 272,
"preview": "# Simple SHMUP\n\n\n\nA simple side-scrolling shoot 'em up game. This example uses several small\nsprites,"
},
{
"path": "simple_shmup/bank2.c",
"chars": 3890,
"preview": "#include <gb/gb.h>\n#include <gb/drawing.h>\n#include <rand.h>\n\nconst UBYTE badguy_ai[] = {\n 32, 32, 33, 34, 35, 3"
},
{
"path": "simple_shmup/bank3.c",
"chars": 3217,
"preview": "#include <gb/gb.h>\n#include <gb/cgb.h>\n#include \"bg_title.c\"\n#include \"bg_title_map.c\"\n#include \"bg_tile.c\"\n#include \"sp"
},
{
"path": "simple_shmup/bg_tile.c",
"chars": 598,
"preview": "/*\n\n BG_TILE.C\n\n Tile Source File.\n\n Info:\n Form : All tiles as one unit.\n Format : Game"
},
{
"path": "simple_shmup/bg_tile.h",
"chars": 547,
"preview": "/*\n\n BG_TILE.H\n\n Include File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameboy "
},
{
"path": "simple_shmup/bg_title.c",
"chars": 13070,
"preview": "/* \n Advanced PCX to GameBoy converter v2.15\n\n Tiles data\n Original PCX File : \"BG.PCX\"\n\n Number of Tiles : 159\n TileM"
},
{
"path": "simple_shmup/bg_title_map.c",
"chars": 2008,
"preview": "/*\n Advanced PCX to GameBoy converter v2.15\n\n TileMap data\n Original PCX File : \"BG.PCX\"\n\n Number of Tiles : 159\n Tile"
},
{
"path": "simple_shmup/make.bat",
"chars": 285,
"preview": "echo off\n\nlcc -Wa-l -Wl-m -Wl-j -c -o simple_shmup.o simple_shmup.c\nlcc -Wa-l -Wl-m -Wl-j -Wf-bo2 -c -o bank2.o bank2.c\n"
},
{
"path": "simple_shmup/simple_shmup.c",
"chars": 710,
"preview": "#include <gb/gb.h>\n#include <rand.h>\n#include <stdio.h>\n\n// bank 0\nvoid vblint(void);\n\n// bank 2\nvoid update_graphics(vo"
},
{
"path": "simple_shmup/spr_tiles.c",
"chars": 779,
"preview": "/*\n\n SPR_TILES.C\n\n Tile Source File.\n\n Info:\n Form : All tiles as one unit.\n Format : Ga"
},
{
"path": "simple_shmup/spr_tiles.h",
"chars": 561,
"preview": "/*\n\n SPR_TILES.H\n\n Include File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gamebo"
},
{
"path": "small_sprite/Makefile",
"chars": 233,
"preview": "LCC = $(GBDKDIR)bin/lcc\nAS = $(LCC) -c\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = small_sprite.gb\nOBJS = small_sprite.o sprite.o\n\n"
},
{
"path": "small_sprite/README.md",
"chars": 80,
"preview": "# Small Sprite\n\n\n\nRenders a small 8x8 sprite to the screen.\n\n"
},
{
"path": "small_sprite/small_sprite.c",
"chars": 181,
"preview": "#include <gb/gb.h>\n#include \"sprite.h\"\n\nvoid main() {\n SPRITES_8x8;\n set_sprite_data(0, 8, sprite);\n set_sprite"
},
{
"path": "small_sprite/sprite.c",
"chars": 590,
"preview": "/*\n\n SPRITE.C\n\n Tile Source File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameb"
},
{
"path": "small_sprite/sprite.h",
"chars": 545,
"preview": "/*\n\n SPRITE.H\n\n Include File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameboy 4"
},
{
"path": "window/Makefile",
"chars": 194,
"preview": "LCC = $(GBDKDIR)bin/lcc\nCC = $(LCC) -Wa-l -Wl-m\n\nBIN = window.gb\nOBJS = main.o\n\nall: $(BIN)\n\n$(BIN): $(OBJS)\n\t$(CC) -o "
},
{
"path": "window/README.md",
"chars": 128,
"preview": "# Window\n\n\n\nDemonstrates the use of the window layer along with the background layer. Both\nuse simila"
},
{
"path": "window/bg.c",
"chars": 12497,
"preview": "/* \n Advanced PCX to GameBoy converter v2.15\n\n Tiles data\n Original PCX File : \"BG.PCX\"\n\n Number of Tiles : 152\n TileM"
},
{
"path": "window/bg_map.c",
"chars": 2002,
"preview": "/*\n Advanced PCX to GameBoy converter v2.15\n\n TileMap data\n Original PCX File : \"BG.PCX\"\n\n Number of Tiles : 152\n Tile"
},
{
"path": "window/border.c",
"chars": 1284,
"preview": "/*\n\n BORDER.C\n\n Tile Source File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameb"
},
{
"path": "window/border.h",
"chars": 545,
"preview": "/*\n\n BORDER.H\n\n Include File.\n\n Info:\n Form : All tiles as one unit.\n Format : Gameboy 4"
},
{
"path": "window/main.c",
"chars": 331,
"preview": "#include <gb/gb.h>\n\n#include \"bg.c\"\n#include \"bg_map.c\"\n#include \"border.c\"\n#include \"window.c\"\n\nvoid main() {\n set_b"
},
{
"path": "window/window.c",
"chars": 890,
"preview": "/*\n\n WINDOW.C\n\n Map Source File.\n\n Info:\n Section : \n Bank : 0\n Map size : 20 x 4\n Tile set "
},
{
"path": "window/window.h",
"chars": 463,
"preview": "/*\n\n WINDOW.H\n\n Map Include File.\n\n Info:\n Section : \n Bank : 0\n Map size : 20 x 4\n Tile set"
}
]
// ... and 9 more files (download for full content)
About this extraction
This page contains the full source code of the mrombout/gbdk_playground GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 103 files (109.6 KB), approximately 70.9k tokens, and a symbol index with 32 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.