gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/examples/gb/sgb_border/Readme.md
1 # Super Game Boy Border Example
2 This example shows how to convert and display an SGB border when the game is running on a Super Game Boy.
3
4 png2asset is used for converting the border.
5
6
7 ### Image Properties
8 * The entire image should be 256 x 224 pixels
9 * The game area in the center should be:
10 * 160 x 144 pixels, from (48,40) to (207,183)
11 * The pixels in the game area at the center of the image should be set to 100% Alpha Transparency (as in the example image). If this is not done then the game area may share a palette color with other parts of the border leading to tile pattern flashing while the border loads.
12 * The palette will be sorted from lightest to darkest. There may be up to 4 SGB palettes. For Each SGB 16 color palette the first color (zero) is reserved as transparent.
13 * If the image is indexed and you want the palette order preserved, use `-keep_palette_order` with png2asset (but make sure color zero is used for transparent areas)
14 * See the pandocs for additional details
15 * https://gbdev.io/pandocs/SGB_Functions.html
16 * https://gbdev.io/pandocs/SGB_Color_Palettes.html
17
18 When using the SGB with a PAL SNES, a delay should be added just after program startup such as:
19
20 ```
21 // Wait 4 frames
22 // For PAL SNES this delay is required on startup
23 for (uint8_t i = 4; i != 0; i--) wait_vbl_done();
24 ```
25
26
27
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.