git.y1.nz

gbdk-2020

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

commit 703f8ec5309954819e29024b77aabb0df9d86659
parent a99fdde06fc84fa7a44ce84c772c6ed71e635079
Author: Toxa <untoxa@mail.ru>
Date:   Mon,  8 Jun 2026 14:47:48 +0300

GB: resolve .IF assembly directive and game boy interrupt flag register .IF definition conflict by renaming the later to .IFL ; this is the breaking change.

Diffstat:
Mgbdk-lib/libc/targets/sm83/ap/crash_handler.s4++--
Mgbdk-lib/libc/targets/sm83/ap/crt0.s4++--
Mgbdk-lib/libc/targets/sm83/ap/global.s2+-
Mgbdk-lib/libc/targets/sm83/cgb.s2+-
Mgbdk-lib/libc/targets/sm83/drawing.s2+-
Mgbdk-lib/libc/targets/sm83/duck/crash_handler.s4++--
Mgbdk-lib/libc/targets/sm83/duck/crt0.s4++--
Mgbdk-lib/libc/targets/sm83/duck/global.s2+-
Mgbdk-lib/libc/targets/sm83/gb/crash_handler.s4++--
Mgbdk-lib/libc/targets/sm83/gb/crt0.s4++--
Mgbdk-lib/libc/targets/sm83/gb/global.s2+-
Mgbdk-lib/libc/targets/sm83/serial.s2+-
12 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/gbdk-lib/libc/targets/sm83/ap/crash_handler.s b/gbdk-lib/libc/targets/sm83/ap/crash_handler.s @@ -50,7 +50,7 @@ ___HandleCrash:: ld a, #IEF_VBLANK ; IEF_VBLANK ldh (.IE), a ld a, #0 ; `xor a` would overwrite flags - ldh (.IF), a ; No point in backing up that register, it's always changing + ldh (.IFL), a ; No point in backing up that register, it's always changing halt ; With interrupts disabled, this will exit when `IE & IF != 0` nop ; Handle hardware bug if it becomes true *before* starting to execute the instruction (1-cycle window) @@ -256,7 +256,7 @@ ___HandleCrash:: .loop: ; The code never lags, and IE is equal to IEF_VBLANK xor a - ldh (.IF), a + ldh (.IFL), a halt nop diff --git a/gbdk-lib/libc/targets/sm83/ap/crt0.s b/gbdk-lib/libc/targets/sm83/ap/crt0.s @@ -127,7 +127,7 @@ _set_interrupts:: LDH (.IE),A XOR A EI - LDH (.IF),A ; Clear pending interrupts + LDH (.IFL),A ; Clear pending interrupts RET ;; Copy OAM data to OAM RAM @@ -274,7 +274,7 @@ _reset:: LDH (.IE),A XOR A - LDH (.IF),A + LDH (.IFL),A LD HL,#.sys_time LD (HL+),A diff --git a/gbdk-lib/libc/targets/sm83/ap/global.s b/gbdk-lib/libc/targets/sm83/ap/global.s @@ -93,7 +93,7 @@ TACF_65KHZ = 0b00000010 TACF_262KHZ = 0b00000001 - .IF = 0x0F ; Interrupt flags: 0.0.0.JST.SIO.TIM.LCD.VBL + .IFL = 0x0F ; Interrupt flags: 0.0.0.JST.SIO.TIM.LCD.VBL rIF = 0xFF0F .NR10 = 0x10 ; Sound register diff --git a/gbdk-lib/libc/targets/sm83/cgb.s b/gbdk-lib/libc/targets/sm83/cgb.s @@ -15,7 +15,7 @@ _cpu_slow:: ; Banked XOR A ; A = 0 LDH (.IE),A ; Disable interrupts - LDH (.IF),A + LDH (.IFL),A LD A,#0x30 LDH (.P1),A diff --git a/gbdk-lib/libc/targets/sm83/drawing.s b/gbdk-lib/libc/targets/sm83/drawing.s @@ -136,7 +136,7 @@ POP DE ; restore DE XOR A - LDH (.IF), A + LDH (.IFL), A EI ; Enable interrupts diff --git a/gbdk-lib/libc/targets/sm83/duck/crash_handler.s b/gbdk-lib/libc/targets/sm83/duck/crash_handler.s @@ -45,7 +45,7 @@ ___HandleCrash:: ld a, #IEF_VBLANK ; IEF_VBLANK ldh (.IE), a ld a, #0 ; `xor a` would overwrite flags - ldh (.IF), a ; No point in backing up that register, it's always changing + ldh (.IFL), a ; No point in backing up that register, it's always changing halt ; With interrupts disabled, this will exit when `IE & IF != 0` nop ; Handle hardware bug if it becomes true *before* starting to execute the instruction (1-cycle window) @@ -251,7 +251,7 @@ ___HandleCrash:: .loop: ; The code never lags, and IE is equal to IEF_VBLANK xor a - ldh (.IF), a + ldh (.IFL), a halt nop diff --git a/gbdk-lib/libc/targets/sm83/duck/crt0.s b/gbdk-lib/libc/targets/sm83/duck/crt0.s @@ -128,7 +128,7 @@ _set_interrupts:: LDH (.IE),A XOR A EI - LDH (.IF),A ; Clear pending interrupts + LDH (.IFL),A ; Clear pending interrupts RET ;; Copy OAM data to OAM RAM @@ -216,7 +216,7 @@ _reset:: LDH (.IE),A XOR A - LDH (.IF),A + LDH (.IFL),A LD HL,#.sys_time LD (HL+),A diff --git a/gbdk-lib/libc/targets/sm83/duck/global.s b/gbdk-lib/libc/targets/sm83/duck/global.s @@ -93,7 +93,7 @@ TACF_65KHZ = 0b00000010 TACF_262KHZ = 0b00000001 - .IF = 0x0F ; Interrupt flags: 0.0.0.JST.SIO.TIM.LCD.VBL + .IFL = 0x0F ; Interrupt flags: 0.0.0.JST.SIO.TIM.LCD.VBL rIF = 0xFF0F .NR10 = 0x20 ; Sound register diff --git a/gbdk-lib/libc/targets/sm83/gb/crash_handler.s b/gbdk-lib/libc/targets/sm83/gb/crash_handler.s @@ -50,7 +50,7 @@ ___HandleCrash:: ld a, #IEF_VBLANK ; IEF_VBLANK ldh (.IE), a ld a, #0 ; `xor a` would overwrite flags - ldh (.IF), a ; No point in backing up that register, it's always changing + ldh (.IFL), a ; No point in backing up that register, it's always changing halt ; With interrupts disabled, this will exit when `IE & IF != 0` nop ; Handle hardware bug if it becomes true *before* starting to execute the instruction (1-cycle window) @@ -256,7 +256,7 @@ ___HandleCrash:: .loop: ; The code never lags, and IE is equal to IEF_VBLANK xor a - ldh (.IF), a + ldh (.IFL), a halt nop diff --git a/gbdk-lib/libc/targets/sm83/gb/crt0.s b/gbdk-lib/libc/targets/sm83/gb/crt0.s @@ -127,7 +127,7 @@ _set_interrupts:: LDH (.IE),A XOR A EI - LDH (.IF),A ; Clear pending interrupts + LDH (.IFL),A ; Clear pending interrupts RET ;; Copy OAM data to OAM RAM @@ -280,7 +280,7 @@ _reset:: LDH (.IE),A XOR A - LDH (.IF),A + LDH (.IFL),A LD HL,#.sys_time LD (HL+),A diff --git a/gbdk-lib/libc/targets/sm83/gb/global.s b/gbdk-lib/libc/targets/sm83/gb/global.s @@ -93,7 +93,7 @@ TACF_65KHZ = 0b00000010 TACF_262KHZ = 0b00000001 - .IF = 0x0F ; Interrupt flags: 0.0.0.JST.SIO.TIM.LCD.VBL + .IFL = 0x0F ; Interrupt flags: 0.0.0.JST.SIO.TIM.LCD.VBL rIF = 0xFF0F .NR10 = 0x10 ; Sound register diff --git a/gbdk-lib/libc/targets/sm83/serial.s b/gbdk-lib/libc/targets/sm83/serial.s @@ -13,7 +13,7 @@ CALL .add_SIO XOR A - LDH (.IF),A + LDH (.IFL),A LDH A,(.IE) OR A,#0b00001000 ; Serial I/O = On

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