Downgrade hardware.inc (rgbds is old in Ubuntu's repos, used by GitHub Actions), move definitions to hardware.inc's bottom

This commit is contained in:
Lior Halphon 2022-04-18 20:03:51 +03:00
parent 51cf4c638c
commit 18126994ff
4 changed files with 925 additions and 997 deletions

View File

@ -2,12 +2,6 @@
INCLUDE "hardware.inc" INCLUDE "hardware.inc"
; Registers used only by the boot ROM
DEF rKEY0 EQU $FF4C
DEF rBANK EQU $FF50
DEF rOPRI EQU $FF6C
SECTION "BootCode", ROM0[$0] SECTION "BootCode", ROM0[$0]
Start: Start:
; Init stack pointer ; Init stack pointer
@ -869,7 +863,7 @@ ENDC
xor a xor a
ldh [rSVBK], a ldh [rSVBK], a
cpl cpl
ldh [rP1], a ldh [rJOYP], a
; Final values for CGB mode ; Final values for CGB mode
ld d, a ld d, a
@ -1062,7 +1056,7 @@ LoadPalettesFromHRAM:
LoadBGPalettes: LoadBGPalettes:
ld e, 0 ld e, 0
ld c, $68 ld c, LOW(rBGPI)
LoadPalettes: LoadPalettes:
ld a, $80 ld a, $80
@ -1094,8 +1088,8 @@ _ClearVRAMViaHDMA:
; clobbers AF and HL ; clobbers AF and HL
GetInputPaletteIndex: GetInputPaletteIndex:
ld a, $20 ; Select directions ld a, $20 ; Select directions
ldh [rP1], a ldh [rJOYP], a
ldh a, [rP1] ldh a, [rJOYP]
cpl cpl
and $F and $F
ret z ; No direction keys pressed, no palette ret z ; No direction keys pressed, no palette
@ -1109,8 +1103,8 @@ GetInputPaletteIndex:
; c = 1: Right, 2: Left, 3: Up, 4: Down ; c = 1: Right, 2: Left, 3: Up, 4: Down
ld a, $10 ; Select buttons ld a, $10 ; Select buttons
ldh [rP1], a ldh [rJOYP], a
ldh a, [rP1] ldh a, [rJOYP]
cpl cpl
rla rla
rla rla

View File

@ -2,10 +2,6 @@
INCLUDE "hardware.inc" INCLUDE "hardware.inc"
; Registers used only by the boot ROM
DEF rBANK EQU $FF50
SECTION "BootCode", ROM0[$0] SECTION "BootCode", ROM0[$0]
Start: Start:
; Init stack pointer ; Init stack pointer

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,6 @@
INCLUDE "hardware.inc" INCLUDE "hardware.inc"
; Registers used only by the boot ROM
DEF rBANK EQU $FF50
SECTION "BootCode", ROM0[$0] SECTION "BootCode", ROM0[$0]
Start: Start:
; Init stack pointer ; Init stack pointer