gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 420d5ad7d5a2ae93d2ae265e6a11d607e38d111f parent 8840ba5f4d4f16024cdb7020478087cd3a9110c8 Author: bbbbbr <reg+github@roughhousing.com> Date: Wed, 8 Sep 2021 23:31:00 -0700 Merge pull request #254 from bbbbbr/docs_4_0_5 Docs: Add DEVICE_* hardware constants to cross platform page Diffstat:
| M | docs/pages/06b_supported_consoles.md | 13 | ++++++++++++- |
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/docs/pages/06b_supported_consoles.md b/docs/pages/06b_supported_consoles.md @@ -39,9 +39,10 @@ When compiling directly with @ref sdcc use: `-m<port>`, `-D__PORT_<port>` and `- - port:`z80`, plat:`gg` -# Platform constants +# Cross-Platform Constants There are several constant \#defines that can be used to help select console specific code during compile time (with `#ifdef`, `#ifndef`) . +## Console Identifiers - When `<gb/gb.h>` is included (either directly or through `<gbdk/platform.h>`) - When building for Game Boy: - `NINTENDO` will be \#defined @@ -58,6 +59,16 @@ There are several constant \#defines that can be used to help select console spe - `SEGA` will be \#defined - `GAMEGEAR` will be \#defined +## Console Hardware Properties +Constants that describe properties of the console hardware are listed below. Their values will change to reflect the current console target that is being built. + + - @ref DEVICE_SCREEN_X_OFFSET, @ref DEVICE_SCREEN_Y_OFFSET + - @ref DEVICE_SCREEN_WIDTH, @ref DEVICE_SCREEN_HEIGHT + - @ref DEVICE_SCREEN_BUFFER_WIDTH, @ref DEVICE_SCREEN_BUFFER_HEIGHT + - @ref DEVICE_SCREEN_MAP_ENTRY_SIZE + - @ref DEVICE_SPRITE_PX_OFFSET_X, @ref DEVICE_SPRITE_PX_OFFSET_Y + - @ref DEVICE_SCREEN_PX_WIDTH, @ref DEVICE_SCREEN_PX_HEIGHT + # Using <gbdk/...> headers Some include files under `<gbdk/..>` are cross platform and others allow the build process to auto-select the correct include file for the current target port and platform (console).
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.