git.y1.nz

gbdk-2020

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

commit 34053c6bbee961cce3ee070befccca49098362b6
parent c82b0732a147c6226ffdb7116ca1a83ab93f665a
Author: Toxa <untoxa@mail.ru>
Date:   Wed, 27 Mar 2024 00:32:01 +0300

SMS/GG working S_PAL() macro; synchronize MSX header with the SMS header

Diffstat:
Mgbdk-lib/include/msx/msx.h7+++++--
Mgbdk-lib/include/sms/sms.h2+-
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gbdk-lib/include/msx/msx.h b/gbdk-lib/include/msx/msx.h @@ -70,6 +70,9 @@ */ #define M_NO_INTERP 0x08U +/** The nineth bit of the tile id +*/ +#define S_BANK 0x01U /** If set the background tile will be flipped horizontally. */ #define S_FLIPX 0x02U @@ -85,7 +88,7 @@ /** Defines how palette number is encoded in OAM. Required for the png2asset tool's metasprite output. */ -#define S_PAL(n) n +#define S_PAL(n) (((n) & 0x01U) << 3) // VDP helper macros #define __WRITE_VDP_REG(REG, v) shadow_##REG=(v);__critical{VDP_CMD=(shadow_##REG),VDP_CMD=REG;} @@ -315,7 +318,7 @@ void refresh_OAM(void); */ extern volatile uint16_t sys_time; -/** Return R register for the DIV_REG emulation +/** Return R register for the DIV_REG emulation Increments once per CPU instruction (fetches the Z80 CPU R register) diff --git a/gbdk-lib/include/sms/sms.h b/gbdk-lib/include/sms/sms.h @@ -95,7 +95,7 @@ /** Dummy function used by other platforms. Required for the png2asset tool's metasprite output. */ -#define S_PAL(n) 0 +#define S_PAL(n) (((n) & 0x01U) << 3) // VDP helper macros #define __WRITE_VDP_REG(REG, v) shadow_##REG=(v);__critical{VDP_CMD=(shadow_##REG),VDP_CMD=REG;}

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