more bug fixes

This commit is contained in:
May Evans 2022-08-31 15:28:36 +01:00
parent 648289d4a9
commit a216a0f2e7
7 changed files with 30 additions and 6 deletions

View file

@ -2,5 +2,9 @@ UpdateSprites::
ld a, [wUpdateSpritesEnabled]
dec a
ret nz
ld hl, hSkipOAMUpdates
set 0, [hl]
homecall _UpdateSprites
ld hl, hSkipOAMUpdates
res 0, [hl] ; this prevents v-blank interference - PvK
ret

View file

@ -26,11 +26,15 @@ VBlank::
call VBlankCopy
call VBlankCopyDouble
call UpdateMovingBgTiles
call hDMARoutine
ld a, [hSkipOAMUpdates]
bit 0, a
jr nz, .skipOAM
call hDMARoutine ; this prevents v-blank interference - PvK
ld a, BANK(PrepareOAMData)
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
call PrepareOAMData
.skipOAM
; VBlank-sensitive operations end.