Add flag to make the baserom work

This commit is contained in:
2025-12-12 21:33:08 -06:00
parent 4f0703ea62
commit 18a73e3b88
5 changed files with 39 additions and 31 deletions

View File

@@ -50,6 +50,7 @@ dw !ROM_VERSION_HIGH
function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<0)) function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<0))
; Feature flags, run asar with -DFEATURE_X=1 to enable ; Feature flags, run asar with -DFEATURE_X=1 to enable
!FEATURE_FIX_BASEROM ?= 0
;================================================================================ ;================================================================================

View File

@@ -61,7 +61,3 @@ LDA.b [Scrap00],Y
org $89C416 org $89C416
LDA.b [Scrap00],Y LDA.b [Scrap00],Y

View File

@@ -1,6 +1,11 @@
LoadUnderworldSprites: LoadUnderworldSprites:
STA.b Scrap00 ; part one of what we replaced STA.b Scrap00 ; part one of what we replaced
LDA.w #UWSpritesData>>16 : STA.b Scrap02 ; set the bank to 28 for now if !FEATURE_FIX_BASEROM
LDA.w #$89
else
LDA.w #UWSpritesData>>16 ; set the bank to 28 for now
endif
STA.b Scrap02
LDA.w $048E LDA.w $048E
RTL RTL

View File

@@ -2729,8 +2729,10 @@ NOP #2 ; this fixes Link's direction after mirroring and falling after entering
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
; Enable new room header table ; Enable new room header table
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
if not(!FEATURE_FIX_BASEROM)
org $81B5E6 org $81B5E6
LDA.b #$30 LDA.b #$30
endif
;================================================================================ ;================================================================================
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -91,7 +91,11 @@ InitializeMirrorHDMA:
org $89D62E org $89D62E
UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
if !FEATURE_FIX_BASEROM
org $81DB67
else
org $89D87E org $89D87E
endif
UWPotsPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers UWPotsPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
org $89DACE org $89DACE