Save 4 more bytes in the CGB boot ROM

This commit is contained in:
Jakub Kądziołka 2020-05-03 23:07:53 +02:00
parent cb738190be
commit b057e0d10a
No known key found for this signature in database
GPG Key ID: E315A75846131564

View File

@ -753,29 +753,6 @@ ReadTrademarkSymbol:
jr nz, .loadTrademarkSymbolLoop jr nz, .loadTrademarkSymbolLoop
ret ret
LoadObjPalettes:
ld c, $6A
jr LoadPalettes
LoadBGPalettes64:
ld d, 64
LoadBGPalettes:
ld e, 0
ld c, $68
LoadPalettes:
ld a, $80
or e
ld [c], a
inc c
.loop
ld a, [hli]
ld [c], a
dec d
jr nz, .loop
ret
DoIntroAnimation: DoIntroAnimation:
; Animate the intro ; Animate the intro
ld a, 1 ld a, 1
@ -902,8 +879,7 @@ EmulateDMG:
call LoadPalettesFromIndex call LoadPalettesFromIndex
ld a, 4 ld a, 4
; Set the final values for DMG mode ; Set the final values for DMG mode
ld d, 0 ld de, 8
ld e, $8
ld l, $7c ld l, $7c
ret ret
@ -997,7 +973,8 @@ LoadPalettesFromIndex: ; a = index of combination
ld c, a ld c, a
add hl, bc add hl, bc
ld d, 8 ld d, 8
call LoadObjPalettes ld c, $6A
call LoadPalettes
pop hl pop hl
bit 3, e bit 3, e
jr nz, .loadBGPalette jr nz, .loadBGPalette
@ -1011,7 +988,26 @@ LoadPalettesFromIndex: ; a = index of combination
ld c, a ld c, a
add hl, bc add hl, bc
ld d, 8 ld d, 8
jp LoadBGPalettes jr LoadBGPalettes
LoadBGPalettes64:
ld d, 64
LoadBGPalettes:
ld e, 0
ld c, $68
LoadPalettes:
ld a, $80
or e
ld [c], a
inc c
.loop
ld a, [hli]
ld [c], a
dec d
jr nz, .loop
ret
BrightenColor: BrightenColor:
ld a, [hli] ld a, [hli]