Merged DR v1.2.0.0

This commit is contained in:
codemann8
2022-12-01 14:10:35 -06:00
10 changed files with 116 additions and 16 deletions

View File

@@ -529,6 +529,9 @@ Dungeon_SaveRoomQuadrantData:
org $02C176
Overworld_FinalizeEntryOntoScreen_Data:
org $02D9B9
Underworld_LoadSpawnEntrance:
org $02E99D
FluteMenu_LoadTransport:

View File

@@ -37,3 +37,41 @@ WalkDownIntoTavern:
CMP #$43
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; TurnAroundOnUnderworld
;--------------------------------------------------------------------------------
TurnAroundOnUnderworld:
LDA $26 : BEQ .done
; turn around if ($010E == #$43) != ($7F5099 == #$43)
LDX #$00
LDA #$43 : CMP $010E : BEQ +
INX
+
CMP $7F5099 : BEQ +
DEX
+
CPX #$00 : BEQ .done
LDA $26 : EOR #$0C : STA $26
.done
JML $0FFD65 ; what we overwrote
;--------------------------------------------------------------------------------
; TurnUpOnOverworld
;--------------------------------------------------------------------------------
TurnUpOnOverworld:
LDA.l EntranceTavernBack : CMP #$43 : BEQ .done
LDA #$08 : STA $26 ; only fix this glitch if exit not vanilla
.done
JML $07E68F ; what we overwrote
;--------------------------------------------------------------------------------
; WalkUpOnOverworld
;--------------------------------------------------------------------------------
WalkUpOnOverworld:
LDA $20 : CMP #$091B : BNE .normal ; hardcoded Y coordinate
STZ $2F
RTL
.normal
LDA #$0002 : STA $2F ; what we overwrote
RTL

View File

@@ -21,6 +21,20 @@ org $278000 ;138000
db $44, $52 ;DR
DRMode:
dw 0
; xxpg rmse
; xxxx xBDM
; x - unused
; p - use the original palette for the dungeon rooms instead of the DR table
; g - fix the EG glitch in more places (should be off for no logic)
; r - The collection rate flag
; m - Whether to display keys Map Info
; s - Start with Mirror Scroll
; e - GT minibosses marked as defeated instead of spawning heart container in all dungeons
; B - Big Key doors can displayed and be opened on the "south" side in addition
; D - Enabled spawning as a bunny in the Dark World underworld
; M - hides the total number in the collection rate
DRFlags:
dw 0
DRScroll:

View File

@@ -198,20 +198,15 @@ Underworld_DoorDown_Call:
org $02C3F3
dw $8AD9 ; address of Bank02.asm:2085
; These two, if enabled together, have implications for vanilla BK doors in IP/Hera/Mire
; IPBJ is common enough to consider not doing this. Mire is not a concern for vanilla - maybe glitched modes
; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds
org $01AA90
JSL BigKeyDoorCheck : NOP
;Kill big key (1e) check for south doors
;org $1aa90
;DontCheck:
;bra .done
;nop #3
;.done
org $01AAA2
RoomDraw_OneSidedShutters_South_onesided_shutter_or_big_key_door:
;Enable south facing bk graphic
;org $00CE24
;dw $2ac8
org $00CE24
dw $2ac8
org $01b714 ; PC: b714
OpenableDoors:

View File

@@ -160,3 +160,9 @@ BlindZeldaDespawnFix:
+ PLA : PLA : PEA.w SpritePrep_BlindMaiden_kill_the_girl-1 : RTL
BigKeyDoorCheck:
CPY.w #$001E : BNE + ; skip if it isn't a BK door
LDA.l DRFlags : AND #$0400 : BNE + ; skip if the flag is set - bk doors can be double-sided
PLA : PEA.w RoomDraw_OneSidedShutters_South_onesided_shutter_or_big_key_door-1
+ LDA.w #$0000 : RTL

View File

@@ -2452,6 +2452,9 @@ NOP #6 ; remove check
org $068841 ; <- 30841 - sprite_prep.asm:269 (LDA $0D00, X : ADD.b #$03 : STA $0D00, X)
JSL.l Mantle_CorrectPosition : NOP #2
;--------------------------------------------------------------------------------
org $0297FD ; <- bank02 : Module07_19_MirrorFade (STZ.b $11 : STZ.b $14)
JSL MirrorScrollSpawnZelda
;--------------------------------------------------------------------------------
org $0DFA53 ; <- 6FA53 - hud check for lantern
JSL.l LampCheck
;--------------------------------------------------------------------------------
@@ -2912,3 +2915,18 @@ if !FEATURE_NEW_TEXT
org $0EF285
JSL RenderCharSetColorExtended_close : NOP
endif
;--------------------------------------------------------------------------------
; Back of tavern fixes
;--------------------------------------------------------------------------------
org $028177 ; JSL Underworld_LoadCustomTileAttributes
JSL TurnAroundOnUnderworld
org $02ABC1 ; JSL Link_HandleMovingAnimation_FullLongEntry
JSL TurnUpOnOverworld
org $02E297 ; LDA.w #$0002 : STA.b $2F
JSL WalkUpOnOverworld
NOP
org $02D7D2 ; BEQ .face_up
NOP #2 ; this fixes Link's direction after mirroring and falling after entering through back of tavern

View File

@@ -1188,12 +1188,12 @@ RTL
;--------------------------------------------------------------------------------
; A = item id being collected
ItemGetAlternateSFX:
PEA $C567 ; SNES to RTS to in bank 08
LDA.w $0C5E,X : CMP #$4A : BNE +
PEA.w $C567 ; SNES to RTS to in bank 08
LDA.w $0C5E,X : CMP.b #$4A : BNE +
; collecting pre-activated flute
LDA #$13 : JML $088007
LDA.b #$13 : JML $088007
+ ; normal itemget sfx
LDA #$0F : JML $08800E ; what we wrote over
LDA.b #$0F : JML $08800E ; what we wrote over
; A = item id being collected
ItemGetOverworldAlternateSFX:

View File

@@ -3,6 +3,9 @@ org $01E6B0
JSL RevealPotItem
RTS
org $029C25
JSL SetTheSceneFix
org $09C2BB
JSL ClearSpriteData
@@ -76,6 +79,10 @@ org $0db818
Sprite_LoadProperties:
org $06D038
KeyRoomFlagMasks:
org $00FDEE
InitializeMirrorHDMA:
org $00E3C4
LoadCommonSprites_long:
; defines
; Ram usage
@@ -591,6 +598,10 @@ CheckIfPotIsSpecial:
.specialpot ; zero flag already set, so gtg
RTL
SetTheSceneFix:
JSL InitializeMirrorHDMA
JSL LoadCommonSprites_long
RTL
incsrc dynamic_si_vram.asm

View File

@@ -2,7 +2,9 @@
; Mantle Object Changes
;--------------------------------------------------------------------------------
Mantle_CorrectPosition:
LDA ProgressFlags : AND.b #$04 : BEQ +
LDA.l ProgressFlags : AND.b #$04 : BNE .spawnOpen
LDA.l StartingEntrance : CMP.b #$04 : BNE +
.spawnOpen
LDA.b #$0A : STA $0D10, X ; just spawn it off to the side where we know it should be
LDA.b #$03 : STA $0D30, X
LDA.b #$90 : STA $0ED0, X
@@ -10,3 +12,11 @@ Mantle_CorrectPosition:
LDA $0D00, X : !ADD.b #$03 ; thing we did originally
RTL
;--------------------------------------------------------------------------------
MirrorScrollSpawnZelda:
LDA.l MirrorEquipment : CMP.b #$01 : BNE + ;mirror scroll
LDA.l StartingEntrance : CMP.b #$02 : BEQ ++ ; zelda's cell
CMP.b #$04 : BNE +
++ INC $04AA
; what we replaced
+ STZ.b $11 : STZ.b $14
RTL

View File

@@ -964,6 +964,11 @@ dw #$0000, #$0000
org $09E3BB ; PC 0x4E3BB
db $E4 ; Hera Basement Key (Set to programmable HP $EB) (set to $E4 for original hookable/boomable key behavior)
;================================================================================
org $02D7D0 ; PC 0x157D0
EntranceTavernBack:
dw $0043 ; Overworld door that leads to back of tavern (update this when this entrance is shuffled)
; Note: If shuffled, the overworld door on the north side of the tavern is expected to have a Y coordinate of $091B in the exit data (table at $02DDB5)
;================================================================================
org $308210 ; PC 0x180210
RandomizerSeedType:
db #$00 ; #$00 = Casual (default) - #$01 = Glitched - #$02 = Speedrunner - #$A0 = Super Metroid Combo - #$FF = Not Randomizer