Fix incorrect register values when changing the color palette via the boot ROM
This commit is contained in:
parent
5cda1f2f5f
commit
bb7fa95426
@ -758,13 +758,17 @@ ENDC
|
|||||||
ld a, [$143]
|
ld a, [$143]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
call z, EmulateDMG
|
call z, EmulateDMG
|
||||||
|
bit 7, a
|
||||||
|
|
||||||
ldh [$4C], a
|
ldh [$4C], a
|
||||||
ldh a, [TitleChecksum]
|
ldh a, [TitleChecksum]
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
||||||
|
jr z, .skipDMGForCGBCheck
|
||||||
ldh a, [InputPalette]
|
ldh a, [InputPalette]
|
||||||
and a
|
and a
|
||||||
jr nz, .emulateDMGForCGBGame
|
jr nz, .emulateDMGForCGBGame
|
||||||
|
.skipDMGForCGBCheck
|
||||||
IF DEF(AGB)
|
IF DEF(AGB)
|
||||||
; Set registers to match the original AGB-CGB boot
|
; Set registers to match the original AGB-CGB boot
|
||||||
; AF = $1100, C = 0
|
; AF = $1100, C = 0
|
||||||
|
4
Makefile
4
Makefile
@ -322,6 +322,10 @@ $(BIN)/SDL/Shaders: Shaders
|
|||||||
|
|
||||||
# Boot ROMs
|
# Boot ROMs
|
||||||
|
|
||||||
|
$(BIN)/BootROMs/agb_boot.bin: BootROMs/cgb_boot.asm
|
||||||
|
$(BIN)/BootROMs/cgb_boot_fast.bin: BootROMs/cgb_boot.asm
|
||||||
|
$(BIN)/BootROMs/sgb2_boot: BootROMs/sgb_boot.asm
|
||||||
|
|
||||||
$(BIN)/BootROMs/%.bin: BootROMs/%.asm
|
$(BIN)/BootROMs/%.bin: BootROMs/%.asm
|
||||||
-@$(MKDIR) -p $(dir $@)
|
-@$(MKDIR) -p $(dir $@)
|
||||||
cd BootROMs && rgbasm -o ../$@.tmp ../$<
|
cd BootROMs && rgbasm -o ../$@.tmp ../$<
|
||||||
|
Loading…
Reference in New Issue
Block a user