Made CGB boot more accurate, added AGB boot
This commit is contained in:
parent
59d4cb4bc2
commit
2cd5c49935
2
BootROMs/agb_boot.asm
Normal file
2
BootROMs/agb_boot.asm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
AGB EQU 1
|
||||||
|
include "cgb_boot.asm"
|
@ -732,7 +732,28 @@ Preboot:
|
|||||||
ld a, [InputPalette]
|
ld a, [InputPalette]
|
||||||
and a
|
and a
|
||||||
jr nz, .emulateDMGForCGBGame
|
jr nz, .emulateDMGForCGBGame
|
||||||
ld a, $11
|
IF DEF(AGB)
|
||||||
|
; Set registers to match the original AGB-CGB boot
|
||||||
|
ld bc, $1100
|
||||||
|
push bc
|
||||||
|
pop af
|
||||||
|
ld h, c
|
||||||
|
ld b, 1
|
||||||
|
ld c, c
|
||||||
|
ld e, $08
|
||||||
|
ld l, $7c
|
||||||
|
ELSE
|
||||||
|
; Set registers to match the original CGB boot
|
||||||
|
ld bc, $1180
|
||||||
|
push bc
|
||||||
|
pop af
|
||||||
|
ld c, 0
|
||||||
|
ld h, c
|
||||||
|
ld b, c
|
||||||
|
ld c, c
|
||||||
|
ld e, $08
|
||||||
|
ld l, $7c
|
||||||
|
ENDC
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.emulateDMGForCGBGame
|
.emulateDMGForCGBGame
|
||||||
|
7
Makefile
7
Makefile
@ -90,9 +90,9 @@ endif
|
|||||||
|
|
||||||
cocoa: $(BIN)/SameBoy.app
|
cocoa: $(BIN)/SameBoy.app
|
||||||
quicklook: $(BIN)/SameBoy.qlgenerator
|
quicklook: $(BIN)/SameBoy.qlgenerator
|
||||||
sdl: $(SDL_TARGET) $(BIN)/SDL/dmg_boot.bin $(BIN)/SDL/cgb_boot.bin $(BIN)/SDL/LICENSE $(BIN)/SDL/registers.sym $(BIN)/SDL/background.bmp $(BIN)/SDL/Shaders
|
sdl: $(SDL_TARGET) $(BIN)/SDL/dmg_boot.bin $(BIN)/SDL/cgb_boot.bin $(BIN)/SDL/agb_boot.bin $(BIN)/SDL/LICENSE $(BIN)/SDL/registers.sym $(BIN)/SDL/background.bmp $(BIN)/SDL/Shaders
|
||||||
bootroms: $(BIN)/BootROMs/cgb_boot.bin $(BIN)/BootROMs/dmg_boot.bin
|
bootroms: $(BIN)/BootROMs/agb_boot.bin $(BIN)/BootROMs/cgb_boot.bin $(BIN)/BootROMs/dmg_boot.bin
|
||||||
tester: $(TESTER_TARGET) $(BIN)/tester/dmg_boot.bin $(BIN)/tester/cgb_boot.bin
|
tester: $(TESTER_TARGET) $(BIN)/tester/dmg_boot.bin $(BIN)/tester/cgb_boot.bin $(BIN)/tester/agb_boot.bin
|
||||||
all: cocoa sdl tester libretro
|
all: cocoa sdl tester libretro
|
||||||
|
|
||||||
# Get a list of our source files and their respective object file targets
|
# Get a list of our source files and their respective object file targets
|
||||||
@ -161,6 +161,7 @@ $(BIN)/SameBoy.app: $(BIN)/SameBoy.app/Contents/MacOS/SameBoy \
|
|||||||
Misc/registers.sym \
|
Misc/registers.sym \
|
||||||
$(BIN)/SameBoy.app/Contents/Resources/dmg_boot.bin \
|
$(BIN)/SameBoy.app/Contents/Resources/dmg_boot.bin \
|
||||||
$(BIN)/SameBoy.app/Contents/Resources/cgb_boot.bin \
|
$(BIN)/SameBoy.app/Contents/Resources/cgb_boot.bin \
|
||||||
|
$(BIN)/SameBoy.app/Contents/Resources/agb_boot.bin \
|
||||||
$(patsubst %.xib,%.nib,$(addprefix $(BIN)/SameBoy.app/Contents/Resources/Base.lproj/,$(shell cd Cocoa;ls *.xib))) \
|
$(patsubst %.xib,%.nib,$(addprefix $(BIN)/SameBoy.app/Contents/Resources/Base.lproj/,$(shell cd Cocoa;ls *.xib))) \
|
||||||
$(BIN)/SameBoy.qlgenerator \
|
$(BIN)/SameBoy.qlgenerator \
|
||||||
Shaders
|
Shaders
|
||||||
|
Loading…
Reference in New Issue
Block a user