git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 9a559a426a209ae93ed786ea021bb517caf0987f
parent 813c57f7c68802c4fa7a524566baa6fabed5aff3
Author: bbbbbr <bbbbbr@users.noreply.github.com>
Date:   Tue, 23 Aug 2022 23:55:46 -0700

Merge pull request #402 from bbbbbr/docs_4_1_0

Docs 4.1.0: Bankpack -reserve, set_sgb_border needs Display ON
Diffstat:
Mdocs/pages/10_release_notes.md3++-
Mdocs/pages/20_toolchain_settings.md30++++++++++++++++--------------
Mgbdk-lib/examples/gb/sgb_border/border.c1+
Mgbdk-lib/examples/gb/sgb_border/sgb_border.c2++
Mgbdk-lib/examples/gb/sgb_border/sgb_border.h3+++
5 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/docs/pages/10_release_notes.md b/docs/pages/10_release_notes.md @@ -55,12 +55,13 @@ https://github.com/gbdk-2020/gbdk-2020/releases - https://sourceforge.net/p/sdcc/code/12975/ - @ref bankpack - Added support for the Game Boy Camera MBC + - Added `-reserve=<bank>:<size>` option - @ref ihxcheck - Check and warn for bank overflows under specific conditions - A multiple write to the same address must occur. The address where the overlap ends is used as BANK. - There must also be a write which spans multiple banks, the ending address of that must match BANK. The starting addresses is the OVERFLOW-FROM BANK. - Examples - - Changed Logo example to use new GBDK logo art from Digit + - Changed Logo example to use new GBDK logo art from user "Digit" - Added example for APA image mode with more than 256 tiles - Added SGB Sound Effects example - Changed to new WAV sound example diff --git a/docs/pages/20_toolchain_settings.md b/docs/pages/20_toolchain_settings.md @@ -285,25 +285,27 @@ Use: Read .o files and auto-assign areas with bank=255. Typically called by Lcc compiler driver before linker. Options --h : Show this help --lkin=<file> : Load object files specified in linker file <file> --lkout=<file>: Write list of object files out to linker file <file> --yt<mbctype> : Set MBC type per ROM byte 149 in Decimal or Hex (0xNN) +-h : Show this help +-lkin=<file> : Load object files specified in linker file <file> +-lkout=<file> : Write list of object files out to linker file <file> +-yt<mbctype> : Set MBC type per ROM byte 149 in Decimal or Hex (0xNN) ([see pandocs](https://gbdev.io/pandocs/The_Cartridge_Header.html#0147---cartridge-type)) --mbc=N : Similar to -yt, but sets MBC type directly to N instead +-mbc=N : Similar to -yt, but sets MBC type directly to N instead of by intepreting ROM byte 149 mbc1 will exclude banks {0x20,0x40,0x60} max=127, mbc2 max=15, mbc3 max=127, mbc5 max=255 (not 511!) --min=N : Min assigned ROM bank is N (default 1) --max=N : Max assigned ROM bank is N, error if exceeded --ext=<.ext> : Write files out with <.ext> instead of source extension --path=<path> : Write files out to <path> (<path> *MUST* already exist) --sym=<prefix>: Add symbols starting with <prefix> to match + update list. +-min=N : Min assigned ROM bank is N (default 1) +-max=N : Max assigned ROM bank is N, error if exceeded +-ext=<.ext> : Write files out with <.ext> instead of source extension +-path=<path> : Write files out to <path> (<path> *MUST* already exist) +-sym=<prefix> : Add symbols starting with <prefix> to match + update list. Default entry is "___bank_" (see below) --cartsize : Print min required cart size as "autocartsize:<NNN>" --plat=<plat> : Select platform specific behavior (default:gb) (gb,sms) --random : Distribute banks randomly for testing (honors -min/-max) --v : Verbose output, show assignments +-cartsize : Print min required cart size as "autocartsize:<NNN>" +-plat=<plat> : Select platform specific behavior (default:gb) (gb,sms) +-random : Distribute banks randomly for testing (honors -min/-max) +-reserve=<b:n>: Reserve N bytes (hex) in bank B (decimal) + Ex: -reserve=105:30F reserves 0x30F bytes in bank 105 +-v : Verbose output, show assignments Example: "bankpack -ext=.rel -path=some/newpath/ file1.o file2.o" Unless -ext or -path specify otherwise, input files are overwritten. diff --git a/gbdk-lib/examples/gb/sgb_border/border.c b/gbdk-lib/examples/gb/sgb_border/border.c @@ -25,6 +25,7 @@ void main(void) { // For SGB on PAL SNES this delay is required on startup, otherwise borders don't show up for (uint8_t i = 4; i != 0; i--) wait_vbl_done(); + // The display must be ON before calling set_sgb_border() DISPLAY_ON; set_sgb_border(border_data_tiles, sizeof(border_data_tiles), border_data_map, sizeof(border_data_map), border_data_palettes, sizeof(border_data_palettes)); while(1) { diff --git a/gbdk-lib/examples/gb/sgb_border/sgb_border.c b/gbdk-lib/examples/gb/sgb_border/sgb_border.c @@ -13,6 +13,8 @@ #define SGB_TRANSFER(A,B) map_buf[0]=(A),map_buf[1]=(B),sgb_transfer(map_buf) +// The display must be turned on before calling this function +// (with @ref DISPLAY_ON). void set_sgb_border(unsigned char * tiledata, size_t tiledata_size, unsigned char * tilemap, size_t tilemap_size, unsigned char * palette, size_t palette_size) { diff --git a/gbdk-lib/examples/gb/sgb_border/sgb_border.h b/gbdk-lib/examples/gb/sgb_border/sgb_border.h @@ -8,6 +8,9 @@ /** sets SGB border + The display must be turned on before calling this function + (with @ref DISPLAY_ON). + When using the SGB with a PAL SNES, a delay should be added just after program startup such as:

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.