git.y1.nz

gbdk-2020

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

commit ec77ec5c3e414c4600dd8d22daab9423ddff326d
parent f5773c91fb82c9f7e1f4d77a1be7ce1e3ba557c6
Author: bbbbbr <bbbbbr@users.noreply.github.com>
Date:   Mon,  6 May 2024 00:40:29 -0700

Merge pull request #656 from bbbbbr/docs_4_3

Docs: 4.3.0 updates
Diffstat:
MMakefile2+-
Mdocs/ChangeLog36++++++++++++++++++++++++++++++++++++
Mdocs/pages/06_toolchain.md10++++++++++
Mdocs/pages/09_migrating_new_versions.md9+++++++++
Mdocs/pages/10_release_notes.md104+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Mdocs/pages/20_toolchain_settings.md135++++++++++++++++++++++++++++++++++++++++++-------------------------------------
Mgbdk-lib/examples/cross-platform/joytest/src/joytest.c2+-
Mgbdk-lib/include/gb/gb.h2++
Mgbdk-lib/include/gbdk/version.h2+-
Mgbdk-lib/include/sms/hardware.h14+++++++-------
Mgbdk-support/png2asset/process_arguments.cpp2+-
11 files changed, 242 insertions(+), 76 deletions(-)

diff --git a/Makefile b/Makefile @@ -8,7 +8,7 @@ TOPDIR = $(shell pwd) # Package name, used for tarballs PKG = gbdk # Version, used for tarballs & docs -VER = 4.2.0 +VER = 4.3.0 PORTS=sm83 z80 mos6502 PLATFORMS=gb ap duck gg sms msxdos nes diff --git a/docs/ChangeLog b/docs/ChangeLog @@ -1,3 +1,39 @@ +gbdk-4.3.0 + - Library + - Added get_system() which indicates system speed + - Changed EMU_printf() to remove dependency on stdio.h added similar EMU_fmtbuf() + - Fixed emu_debug.h macros missing a trailing space + - NES + - Added PAL support + - Fixed _map_tile_offset for set_bkg_based_tiles(), VRAM transfer buffer bug + - Fixed support for 4-player controllers using fourscore + - SMS/GG + - Added SHOW_SPRITES, HIDE_SPRITES (no hiding mid-frame), DIV_REG emulation, 6 button controller support in joypad() + - Added bcd.h implementation + - Added Game Gear registers and definitions + - GG_STATE, GG_EXT_7BIT, GG_EXT_CTL, GG_SIO_SEND, GG_SIO_RECV, GG_SIO_CTL, GG_SOUND_PAN + - Changed VDP to reduce chances of dangerous ISR nesting (also for MSX) + - Fixed tilemap wrapping over the low bound of the VDP name table + - Fixed waitpad(), scroll_sprite(), __WRITE_VDP_REG_UNSAFE() VDP macro + - Fixed return result of "set_tile x, y" family functions (also for MSX) + - Game Boy + - Added HBlank copy routines: hblank_copy_vram(), hblank_cpy_vram(), hblank_copy() + - Fixed 8-bit signed modulus + - Toolchain / Utilities + - Added romusage utility for viewing free/used ROM and RAM in compiled programs + - lcc: Changed -debug to add the following flags: -Wa-l -Wl-u -Wl-w + - png2asset + - Added -sprite_no_optimize, -entity_tileset, -rel_paths + - Various crashes and output fixes + - makebin: Fixed crash when using -yS (-Wm-yS with lcc) + - bankpack: Added -banktype= to allow forcing a bank type to CODE or LIT before packing starts + - Examples + - Added HBlank copy, Read SNES joypads on NES, Game Boy Printer, Joypad test, Display System + - Wav sample: play waveforms on the SMS/GG PSG + - Fixes for SMS/GG: Fonts, Large Map, gbdecompress + - Removed Analogue Pocket examples that were just duplicates of Game Boy ones + - Updated documentation and fixed search + gbdk-4.2.0 - Library fixes/improvements - Added set_bkg_attributes(), set_bkg_submap_attributes(), set_bkg_attribute_xy() diff --git a/docs/pages/06_toolchain.md b/docs/pages/06_toolchain.md @@ -337,3 +337,13 @@ Historical credits and info: ### Additional Details For technical details about the conversion process and rendering, see: https://github.com/bbbbbr/png2hicolorgb + + +@anchor utility_romusage +## romusage +A utility for estimating usage of Game Boy and SMS/GG ROMs from .noi and .map files, binary ROMs and more. + +- For detailed settings see @ref romusage-settings + +Example: `romusage myprogram.noi -g` + diff --git a/docs/pages/09_migrating_new_versions.md b/docs/pages/09_migrating_new_versions.md @@ -4,6 +4,15 @@ This section contains information that may be useful to know or important when u # GBDK-2020 versions +## Porting to GBDK-2020 4.3.0 + - GBDK now requires ~SDCC 4.4 or higher with GBDK-2020 patches for the z80 and NES + - Changed calling convention for @ref printf() and @ref sprintf() to be `REENTRANT` + - Changed to new SDCC calling convention for @ref set_bkg_tile_xy(), @ref set_win_tile_xy() + - Recommend using: + - @ref CURRENT_BANK instead of `_current_bank` + - @ref BANKED macro instead of `__banked` + + ## Porting to GBDK-2020 4.2.0 - GBDK now requires ~SDCC 4.3 or higher with GBDK-2020 patches for the z80 and NES - The following new functions replace old ones: diff --git a/docs/pages/10_release_notes.md b/docs/pages/10_release_notes.md @@ -6,10 +6,110 @@ https://github.com/gbdk-2020/gbdk-2020/releases # GBDK-2020 Release Notes -## GBDK-2020 4.2 +## GBDK-2020 4.3.0 + ~2024/05 + - Includes SDCC version ~4.4 (~14635) with GBDK-2020 patches for Z80 and NES + - [Patched SDCC Builds](https://github.com/gbdk-2020/gbdk-2020-sdcc/releases) with support for Sega GG/SMS and the Nintendo NES are used. + - See the [github workflow](https://github.com/gbdk-2020/gbdk-2020-sdcc/tree/main/.github/workflows) for details. + - Added native GBDK build for Apple ARM cpus + - Known Issues + - SDCC may fail on Windows when @ref windows_sdcc_non_c_drive_path_spaces "run from folder names with spaces on non-C drives". + - Library + - Added @ref get_system() which indicates system speed + - @ref SYSTEM_60HZ, @ref SYSTEM_50HZ, @ref SYSTEM_BITS_DENDY, @ref SYSTEM_BITS_NTSC, @ref SYSTEM_BITS_PAL, @ref SYSTEM_NTSC + - Changed calling convention for @ref printf() and @ref sprintf() to be `REENTRANT` + - Changed @ref EMU_printf() to remove dependency on stdio.h added similar @ref EMU_fmtbuf() + - Fixed @ref emu_debug.h macros missing a trailing space + - NES + - Added PAL support + - Fixed `_map_tile_offset` not being applied for @ref set_bkg_based_tiles() + - Fixed VRAM transfer buffer bug (ensure stack page cleared on reset) + - Fixed support for 4-player controllers using fourscore + - Updated libc to latest from sdcc 4.4.0 + - SMS/GG + - Added @ref SHOW_SPRITES, @ref HIDE_SPRITES (no hiding mid-frame) + - Added @ref DIV_REG emulation for the Z80 systems, may be useful for seeding RNG (also for MSX) + - Added @ref S_BANK tile attribute + - Added 6 button controller support in @ref joypad() + - Added @ref bcd.h implementation + - Added ability to move VDP SAT and name table to other locations by writing to VDP R2 and VDP R5. + - Set name table to 0x1800 and SAT to 0x1F00 by default to free up some sprite tile space + - Added R5_SAT_0x1F00 definition for the R5 value controlling SAT position in VRAM + - Added @ref __WRITE_VDP_REG_UNSAFE() VDP macro while interrupts are disabled (such as in ISR handlers) + - Added Game Gear registers and definitions + - `GG_STATE`: @ref GGSTATE_STT, @ref GGSTATE_NJAP, @ref GGSTATE_NNTS + - `GG_EXT_7BIT` + - `GG_EXT_CTL`: @ref GGEXT_NINIT + - `GG_SIO_SEND` + - `GG_SIO_RECV` + - `GG_SIO_CTL`: @ref SIOCTL_TXFL, @ref SIOCTL_RXRD, @ref SIOCTL_FRER, @ref SIOCTL_INT, @ref SIOCTL_TON, @ref SIOCTL_RON, @ref SIOCTL_BS0, @ref SIOCTL_BS1 + - `GG_SOUND_PAN`: @ref SOUNDPAN_TN1R, @ref SOUNDPAN_TN2R, @ref SOUNDPAN_TN3R, @ref SOUNDPAN_NOSR, @ref SOUNDPAN_TN1L, @ref SOUNDPAN_TN2L, @ref SOUNDPAN_TN3L, @ref SOUNDPAN_NOSL + - Changed to allow nested locking of the shadow SAT copying on VBlank (also for MSX) + - Changed VDP to reduce chances of dangerous ISR nesting (see SDCC issue https://sourceforge.net/p/sdcc/bugs/3721/) (also for MSX) + - Optimized native tile data loading routines + - Fixed tilemap wrapping over the low bound of the VDP name table + - Fixed @ref waitpad() (also for MSX) + - Fixed @ref scroll_sprite() + - Fixed missing sms.h in sms/metasprites.h + - Fixed return result of "`set_tile x, y`" family functions (also for MSX) + - Game Boy + - Added HBlank copy routines: @ref hblank_copy_vram(), @ref hblank_cpy_vram(), @ref hblank_copy() + - Added @ref SCF_START, @ref SCF_SOURCE, @ref SCF_SPEED aliases for SIO (Serial/Link port) control register control constants + - Added clamping and changed to new SDCC calling convention for @ref set_bkg_tile_xy(), @ref set_win_tile_xy() + - Added @ref S_BANK tile attribute + - Fixed 8-bit signed modulus + - MegaDuck + - Fixed ROM bank switching on hardware when trying to enable or switch SRAM banks + - Toolchain / Utilities + - Added @ref utility_romusage "romusage" utility for viewing free/used ROM and RAM in compiled programs + - @ref lcc "lcc" + - Changed `-debug` to add the following flags: `-Wa-l -Wl-u -Wl-w` + - @ref utility_png2asset "png2asset" + - Added `-sprite_no_optimize`: sprite conversion will keep duplicate and empty sprite tiles + - Added `-entity_tileset`: mark entity locations on maps during conversion with an entity tileset + - Added `-rel_paths`: paths to tilesets are relative to the input file path + - Changed `-keep_palette_order` to round up to at least one palette + - Changed `-use_structs` + `-source_tileset` behavior + - Point tile data to external source tileset + - Add `extra_tiles` struct member pointing to map tiles not found in source tileset (null if none found) + - Changed `-use_structs` to use designated initializers + - Fixed garbage in unused colors of palettes (set unused colors to black) + - Fixed `-bin` mode not honoring `-tiles_only` and `-maps_only` + - Fixed segfault and wrong data size for `-pack_mode sgb` + `-bin` + - Fixed missing Palette ID in attributes for multi-palette SMS/GG backgrounds + - Fixed not taking `-bpp` into account when converting metasprites and emitting `<symbol>_tile_pals[]` + - Fixed crash when filename for -o and -c not specified + - Fixed some attributes missing for metasprite export + - @ref makebin + - Fixed crash when using `-yS` (`-Wm-yS` with lcc) + - @ref bankpack + - Added `-banktype=` to allow forcing a bank type to CODE or LIT before packing starts + - Changed minimum bank for auto packing from `1` to `0` (required for the NES) + - Examples + - Added HBlank copy example for GB/AP/Duck + - Added Reading SNES joypads on NES example + - Added Game Boy Printer example + - Added Joypad testing example + - Added Display System example to demonstrate @ref get_system() + - Added `GBDK_DEBUG` Makefile environment var for turning on/off debug flags + - Changed wav sample: play waveforms on the SMS/GG PSG + - Changed Random Number example: only call @ref initrand() once + - Changed Large Map: support modified initial camera position + - Changed all examples: use @ref BANKED macro instead of `__banked` + - Also change some to use @ref CURRENT_BANK instead of `_current_bank` + - Fixes for SMS/GG: Fonts, Large Map, gbdecompress + - Fixed Simple Physics: joypad input caching was wrong + - Removed Analogue Pocket examples that were just duplicates of Game Boy ones + - Docs: + - Fixed search where some exact matches didn't return a result + - Various updates and improvements + - Added more historical release notes + + +## GBDK-2020 4.2.0 2023/08 - Includes SDCC version ~4.3 with GBDK-2020 patches for Z80 and NES - - ([Patched SDCC Builds](https://github.com/gbdk-2020/gbdk-2020-sdcc/releases) with support for Sega GG/SMS and the Nintendo NES are used. See the [github workflow](https://github.com/gbdk-2020/gbdk-2020-sdcc/tree/main/.github/workflows) for details + - [Patched SDCC Builds](https://github.com/gbdk-2020/gbdk-2020-sdcc/releases) with support for Sega GG/SMS and the Nintendo NES are used. See the [github workflow](https://github.com/gbdk-2020/gbdk-2020-sdcc/tree/main/.github/workflows) for details - Known Issues - SDCC may fail on Windows when @ref windows_sdcc_non_c_drive_path_spaces "run from folder names with spaces on non-C drives". - Library diff --git a/docs/pages/20_toolchain_settings.md b/docs/pages/20_toolchain_settings.md @@ -3,47 +3,48 @@ # lcc settings ``` ./lcc [ option | file ]... - except for -l, options are processed left-to-right before files - unrecognized options are taken to be linker options --A warn about nonANSI usage; 2nd -A warns more --b emit expression-level profiling code; see bprint(1) --Bdir/ use the compiler named `dir/rcc' --c compile only --dn set switch statement density to `n' --debug Turns on --debug for compiler, -y (.cdb) and -j (.noi) for linker --Dname -Dname=def define the preprocessor symbol `name' --E only run preprocessor on named .c and .h files files -> stdout ---save-preproc Use with -E for output to *.i files instead of stdout --g produce symbol table information for debuggers --help or -? print this message --Idir add `dir' to the beginning of the list of #include directories --K don't run ihxcheck test on linker ihx output --lx search library `x' --m select port and platform: "-m[port]:[plat]" ports:sm83,z80,mos6502 plats:ap,duck,gb,sms,gg,nes --N do not search the standard directories for #include files --n emit code to check for dereferencing zero pointers --no-crt do not auto-include the gbdk crt0.o runtime in linker list --no-libs do not auto-include the gbdk libs in linker list --O is ignored --o file leave the output in `file' --P print ANSI-style declarations for globals --p -pg emit profiling code; see prof(1) and gprof(1) --S compile to assembly language --autobank auto-assign banks set to 255 (bankpack) --static specify static libraries (default is dynamic) --t -tname emit function tracing calls to printf or to `name' --target name is ignored --tempdir=dir place temporary files in `dir/'; default=/tmp --Uname undefine the preprocessor symbol `name' --v show commands as they are executed; 2nd -v suppresses execution --w suppress warnings --Woarg specify system-specific `arg' --W[pfablim]arg pass `arg' to the preprocessor, compiler, assembler, bankpack, linker, ihxcheck, or makebin + except for -l, options are processed left-to-right before files + unrecognized options are taken to be linker options +-A warn about nonANSI usage; 2nd -A warns more +-b emit expression-level profiling code; see bprint(1) +-Bdir/ use the compiler named `dir/rcc' +-c compile only +-dn set switch statement density to `n' +-debug Turns on --debug for compiler, -y (.cdb), -j (.noi), -w (wide .map format) for linker + -Wa-l (assembler .lst), -Wl-u (.lst -> .rst address update) +-Dname=def define the preprocessor symbol `name' +-E only run preprocessor on named .c and .h files files -> stdout +--save-preproc Use with -E for output to *.i files instead of stdout +-g produce symbol table information for debuggers +-help or -? print this message +-Idir add `dir' to the beginning of the list of #include directories +-K don't run ihxcheck test on linker ihx output +-lx search library `x' +-m select port and platform: "-m[port]:[plat]" ports:sm83,z80,mos6502 plats:ap,duck,gb,sms,gg,nes +-N do not search the standard directories for #include files +-n emit code to check for dereferencing zero pointers +-no-crt do not auto-include the gbdk crt0.o runtime in linker list +-no-libs do not auto-include the gbdk libs in linker list +-O is ignored +-o file leave the output in `file' +-P print ANSI-style declarations for globals +-p -pg emit profiling code; see prof(1) and gprof(1) +-S compile to assembly language +-autobank auto-assign banks set to 255 (bankpack) +-static specify static libraries (default is dynamic) +-t -tname emit function tracing calls to printf or to `name' +-target name is ignored +-tempdir=dir place temporary files in `dir/'; default=/tmp +-Uname undefine the preprocessor symbol `name' +-v show commands as they are executed; 2nd -v suppresses execution +-w suppress warnings +-Woarg specify system-specific `arg' +-W[pfablim]arg pass `arg' to the preprocessor, compiler, assembler, bankpack, linker, ihxcheck, or makebin ``` @anchor sdcc-settings # sdcc settings ``` -SDCC : z80/sm83/mos6502/mos65c02 TD- 4.3.2 #14228 (Linux) +SDCC : z80/sm83/mos6502/mos65c02 TD- 4.4.0 #14620 (Linux) published under GNU General Public License (GPL) Usage : sdcc [options] filename Options :- @@ -61,9 +62,10 @@ General options: -M Preprocessor option -W Pass through options to the pre-processor (p), assembler (a) or linker (l) --include Pre-include a file during pre-processing + -E --preprocessonly Preprocess only, do not compile + --syntax-only Parse and verify syntax only, do not compile -S Compile only; do not assemble or link -c --compile-only Compile and assemble, but do not link - -E --preprocessonly Preprocess only, do not compile --c1mode Act in c1 mode. The standard input is preprocessed code, the output is assembly code. -o Place the output into the given path resp. file -x Optional file type override (c, c-header or none), valid until the next -x @@ -77,7 +79,7 @@ General options: --Werror Treat the warnings as errors --debug Enable debugging symbol output --cyclomatic Display complexity of compiled functions - --std Determine the language standard (c89, c99, c11, c2x, sdcc89 etc.) + --std Determine the language standard (c89, c99, c11, c23, sdcc89 etc.) --fdollars-in-identifiers Permit '$' as an identifier character --fsigned-char Make "char" signed by default --use-non-free Search / include non-free licensed libraries and header files @@ -179,11 +181,13 @@ Special options for the sm83 port: Special options for the mos6502 port: --model-small 8-bit address space for data --model-large 16-bit address space for data (default) + --no-zp-spill place register spills in 16-bit address space --no-std-crt0 Do not link default crt0.rel Special options for the mos65c02 port: --model-small 8-bit address space for data --model-large 16-bit address space for data (default) + --no-zp-spill place register spills in 16-bit address space --no-std-crt0 Do not link default crt0.rel ``` @anchor sdasgb-settings @@ -235,7 +239,7 @@ Debugging: # sdasz80 settings ``` -sdas Assembler V02.00 + NoICE + SDCC mods (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80) +sdas Assembler V02.00 + NoICE + SDCC mods (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80 / R800) Copyright (C) 2012 Alan R. Baldwin @@ -329,27 +333,29 @@ 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) - ([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 - 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. - 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) --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 +-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 + 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 + 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) +-reserve=<b:n> : Reserve N bytes (hex) in bank B (decimal) + Ex: -reserve=105:30F reserves 0x30F bytes in bank 105 +-banktype=<b:t>: Set bank B (decimal) to use type T (CODE or LIT). For sms/gg + Ex: -banktype=2:LIT sets bank 2 to type LIT +-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. @@ -563,8 +569,8 @@ The rle compression is Amiga IFF style # png2asset settings ``` usage: png2asset <file>.png [options] --o ouput file (default: <png file>.c) --c deprecated, same as -o +-o <filename> ouput file (if not used then default is <png file>.c) +-c <filename> deprecated, same as -o -sw <width> metasprites width size (default: png width) -sh <height> metasprites height size (default: png height) -sp <props> change default for sprite OAM property bytes (in hex) (default: 0x00) @@ -575,6 +581,7 @@ usage: png2asset <file>.png [options] -spr8x8 use SPRITES_8x8 -spr8x16 use SPRITES_8x16 (this is the default) -spr16x16msx use SPRITES_16x16 +-sprite_no_optimize keep empty sprite tiles, do not remove duplicate tiles -b <bank> bank (default: fixed bank) -keep_palette_order use png palette -repair_indexed_pal try to repair indexed tile palettes (implies "-keep_palette_order") @@ -593,10 +600,12 @@ usage: png2asset <file>.png [options] -maps_only export map tilemap only -metasprites_only export metasprite descriptors only -source_tileset use source tileset (image with common tiles) +-entity_tileset (maps only) mark matching tiles counting from 255 down, entity patterns not exported -keep_duplicate_tiles do not remove duplicate tiles (default: not enabled) -no_palettes do not export palette data -bin export to binary format -transposed export transposed (column-by-column instead of row-by-row) +-rel_paths paths to tilesets are relative to the input file path decoder error empty input buffer given to decoder. Maybe caused by non-existing file? ``` @anchor png2hicolorgb-settings diff --git a/gbdk-lib/examples/cross-platform/joytest/src/joytest.c b/gbdk-lib/examples/cross-platform/joytest/src/joytest.c @@ -37,7 +37,7 @@ void reset_object_pos(void) { set_sprite_tile(i, i); move_sprite(i, DEVICE_SPRITE_PX_OFFSET_X + (i << 3) + ((DEVICE_SCREEN_PX_WIDTH - (4 * 8)) >> 1), - (DEVICE_SPRITE_PX_OFFSET_Y + 48u) + ((DEVICE_SCREEN_PX_HEIGHT - 8) >> 1) + (uint8_t)(DEVICE_SPRITE_PX_OFFSET_Y + 48u) + ((DEVICE_SCREEN_PX_HEIGHT - 8) >> 1) ); } } diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -415,6 +415,8 @@ uint8_t get_mode(void) PRESERVES_REGS(b, c, d, e, h, l); /** Returns the system gbdk is running on. + @see SYSTEM_50HZ, SYSTEM_60HZ, SYSTEM_BITS_DENDY, SYSTEM_BITS_NTSC, SYSTEM_BITS_PAL, SYSTEM_NTSC +SYSTEM_PAL */ inline uint8_t get_system(void) { return SYSTEM_60HZ; diff --git a/gbdk-lib/include/gbdk/version.h b/gbdk-lib/include/gbdk/version.h @@ -1,6 +1,6 @@ #ifndef __VERSION_H_INCLUDE__ #define __VERSION_H_INCLUDE__ -#define __GBDK_VERSION 420 +#define __GBDK_VERSION 430 #endif diff --git a/gbdk-lib/include/sms/hardware.h b/gbdk-lib/include/sms/hardware.h @@ -10,21 +10,21 @@ #define __BYTES extern UBYTE #define __BYTE_REG extern volatile UBYTE -static volatile SFR AT(0x00) GG_STATE; +static volatile SFR AT(0x00) GG_STATE; /**< Game Gear status register for Start/Pause, Japan vs Overseas mode (NJAP), NTSC/PAL mode */ #define GGSTATE_STT 0b10000000 #define GGSTATE_NJAP 0b01000000 #define GGSTATE_NNTS 0b00100000 -static volatile SFR AT(0x01) GG_EXT_7BIT; +static volatile SFR AT(0x01) GG_EXT_7BIT; /**< Game Gear Serial port register used to read/write data when the EXT connector used as 7-bit input/output port */ -static volatile SFR AT(0x02) GG_EXT_CTL; +static volatile SFR AT(0x02) GG_EXT_CTL; /**< Game Gear Serial port register for configuring external NMI */ #define GGEXT_NINIT 0b10000000 -static volatile SFR AT(0x03) GG_SIO_SEND; -static volatile SFR AT(0x04) GG_SIO_RECV; -static volatile SFR AT(0x05) GG_SIO_CTL; +static volatile SFR AT(0x03) GG_SIO_SEND; /**< Game Gear Serial Data Send register */ +static volatile SFR AT(0x04) GG_SIO_RECV; /**< Game Gear Serial Data Receive register */ +static volatile SFR AT(0x05) GG_SIO_CTL; /**< Game Gear Serial Port control register */ #define SIOCTL_TXFL 0b00000001 #define SIOCTL_RXRD 0b00000010 @@ -35,7 +35,7 @@ static volatile SFR AT(0x05) GG_SIO_CTL; #define SIOCTL_BS0 0b01000000 #define SIOCTL_BS1 0b10000000 -static volatile SFR AT(0x06) GG_SOUND_PAN; +static volatile SFR AT(0x06) GG_SOUND_PAN; /**< Game Gear Sound panning (left / right) register */ #define SOUNDPAN_TN1R 0b00000001 #define SOUNDPAN_TN2R 0b00000010 diff --git a/gbdk-support/png2asset/process_arguments.cpp b/gbdk-support/png2asset/process_arguments.cpp @@ -98,7 +98,7 @@ int processPNG2AssetArguments(int argc, char* argv[], PNG2AssetArguments* args) printf("-spr8x8 use SPRITES_8x8\n"); printf("-spr8x16 use SPRITES_8x16 (this is the default)\n"); printf("-spr16x16msx use SPRITES_16x16\n"); - printf("-sprite_no_optimize keep empty sprite tiles, do not remote duplicate tiles\n"); + printf("-sprite_no_optimize keep empty sprite tiles, do not remove duplicate tiles\n"); printf("-b <bank> bank (default: fixed bank)\n"); printf("-keep_palette_order use png palette\n"); printf("-repair_indexed_pal try to repair indexed tile palettes (implies \"-keep_palette_order\")\n");

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