SGB2 boot ROM
This commit is contained in:
parent
cbbe3fe207
commit
a1c39173dd
2
BootROMs/sgb2_boot.asm
Normal file
2
BootROMs/sgb2_boot.asm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SGB2 EQU 1
|
||||||
|
include "sgb_boot.asm"
|
@ -138,7 +138,11 @@ Start:
|
|||||||
ldh [$47], a
|
ldh [$47], a
|
||||||
|
|
||||||
; Set registers to match the original SGB boot
|
; Set registers to match the original SGB boot
|
||||||
|
IF DEF(SGB2)
|
||||||
|
ld a, $FF
|
||||||
|
ELSE
|
||||||
ld a, 1
|
ld a, 1
|
||||||
|
ENDC
|
||||||
ld hl, $c060
|
ld hl, $c060
|
||||||
|
|
||||||
; Boot the game
|
; Boot the game
|
||||||
|
@ -257,7 +257,12 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
|||||||
- (void) loadBootROM
|
- (void) loadBootROM
|
||||||
{
|
{
|
||||||
static NSString * const boot_names[] = {@"dmg_boot", @"cgb_boot", @"agb_boot", @"sgb_boot"};
|
static NSString * const boot_names[] = {@"dmg_boot", @"cgb_boot", @"agb_boot", @"sgb_boot"};
|
||||||
|
if ([self internalModel] == GB_MODEL_SGB2) {
|
||||||
|
GB_load_boot_rom(&gb, [[self bootROMPathForName:@"sgb2_boot"] UTF8String]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
GB_load_boot_rom(&gb, [[self bootROMPathForName:boot_names[current_model - 1]] UTF8String]);
|
GB_load_boot_rom(&gb, [[self bootROMPathForName:boot_names[current_model - 1]] UTF8String]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)reset:(id)sender
|
- (IBAction)reset:(id)sender
|
||||||
|
7
Makefile
7
Makefile
@ -106,9 +106,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/agb_boot.bin $(BIN)/SDL/sgb_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/sgb_boot.bin $(BIN)/SDL/sgb_boot2.bin $(BIN)/SDL/LICENSE $(BIN)/SDL/registers.sym $(BIN)/SDL/background.bmp $(BIN)/SDL/Shaders
|
||||||
bootroms: $(BIN)/BootROMs/agb_boot.bin $(BIN)/BootROMs/cgb_boot.bin $(BIN)/BootROMs/dmg_boot.bin $(BIN)/BootROMs/sgb_boot.bin
|
bootroms: $(BIN)/BootROMs/agb_boot.bin $(BIN)/BootROMs/cgb_boot.bin $(BIN)/BootROMs/dmg_boot.bin $(BIN)/BootROMs/sgb_boot.bin $(BIN)/BootROMs/sgb_boot2.bin
|
||||||
tester: $(TESTER_TARGET) $(BIN)/tester/dmg_boot.bin $(BIN)/tester/cgb_boot.bin $(BIN)/tester/agb_boot.bin $(BIN)/tester/sgb_boot.bin
|
tester: $(TESTER_TARGET) $(BIN)/tester/dmg_boot.bin $(BIN)/tester/cgb_boot.bin $(BIN)/tester/agb_boot.bin $(BIN)/tester/sgb_boot.bin $(BIN)/tester/sgb2_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
|
||||||
@ -181,6 +181,7 @@ $(BIN)/SameBoy.app: $(BIN)/SameBoy.app/Contents/MacOS/SameBoy \
|
|||||||
$(BIN)/SameBoy.app/Contents/Resources/cgb_boot.bin \
|
$(BIN)/SameBoy.app/Contents/Resources/cgb_boot.bin \
|
||||||
$(BIN)/SameBoy.app/Contents/Resources/agb_boot.bin \
|
$(BIN)/SameBoy.app/Contents/Resources/agb_boot.bin \
|
||||||
$(BIN)/SameBoy.app/Contents/Resources/sgb_boot.bin \
|
$(BIN)/SameBoy.app/Contents/Resources/sgb_boot.bin \
|
||||||
|
$(BIN)/SameBoy.app/Contents/Resources/sgb2_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