SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 3f799f21ffb5a7e055d3890b50819d9f3709aa5f parent a80a19b418f246fbfcbec0b33c03e3f20f501eeb Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 5 Apr 2024 18:44:22 +0300 Make the SGB boot ROMs closer in timing to the original ones, fixed #602 Diffstat:
| M | BootROMs/sgb_boot.asm | 23 | +++++++++++++---------- |
| M | Makefile | 2 | +- |
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/BootROMs/sgb_boot.asm b/BootROMs/sgb_boot.asm @@ -119,6 +119,19 @@ Start: ld a, $30 ld [c], a + ; Wait 4 frames + ld e, 4 + ld a, 1 + ldh [rIE], a + xor a +.waitLoop + ldh [rIF], a + halt + nop + dec e + jr nz, .waitLoop + ldh [rIE], a + ; Update command ldh a, [_HRAM] add 2 @@ -198,16 +211,6 @@ DoubleBitsAndWriteRow: inc hl ret -WaitFrame: - push hl - ld hl, $FF0F - res 0, [hl] -.wait - bit 0, [hl] - jr z, .wait - pop hl - ret - TrademarkSymbol: db $3c,$42,$b9,$a5,$b9,$a5,$42,$3c diff --git a/Makefile b/Makefile @@ -629,7 +629,7 @@ $(BIN)/BootROMs/sgb2_boot: BootROMs/sgb_boot.asm $(BIN)/BootROMs/%.bin: BootROMs/%.asm $(OBJ)/BootROMs/SameBoyLogo.pb12 -@$(MKDIR) -p $(dir $@) - $(RGBASM) -i $(OBJ)/BootROMs/ -i BootROMs/ -o $@.tmp $< + $(RGBASM) -H -i $(OBJ)/BootROMs/ -i BootROMs/ -o $@.tmp $< $(RGBLINK) -o $@.tmp2 $@.tmp dd if=$@.tmp2 of=$@ count=1 bs=$(if $(findstring cgb,$@)$(findstring agb,$@),2304,256) 2> $(NULL) @rm $@.tmp $@.tmp2
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.