Merge branch 'Synthesis' into DRUnstable

This commit is contained in:
aerinon
2022-12-01 10:01:57 -07:00
10 changed files with 126 additions and 13 deletions

View File

@@ -519,6 +519,9 @@ Dungeon_SaveRoomData_justKeys:
org $02B861
Dungeon_SaveRoomQuadrantData:
org $02D9B9
Underworld_LoadSpawnEntrance:
org $02FD8A ; 17D8A - Bank0E.asm: 3732 Note: Different bank
LoadGearPalettes_bunny:

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

@@ -159,3 +159,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

@@ -1036,6 +1036,11 @@ NOP
org $07B57D ; 3B57D - Bank07.asm:8527 (LDA Link_ReceiveItemAlternates, Y : STA $03)
JSL.l Link_ReceiveItemAlternatesExpanded_loadAlternate
NOP
org $08C563
JML ItemGetAlternateSFX : NOP
org $0988A5
JSL ItemGetOverworldAlternateSFX : NOP #5
;--------------------------------------------------------------------------------
org $09892E ; 4892E - ancilla_init.asm:1307 (LDA BottleList, X)
LDA.w BottleListExpanded, X
@@ -2439,6 +2444,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
;--------------------------------------------------------------------------------
@@ -2893,4 +2901,19 @@ if !FEATURE_NEW_TEXT
JSL RenderCharSetColorExtended_init
org $0EF285
JSL RenderCharSetColorExtended_close : NOP
endif
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

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

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

@@ -17,5 +17,6 @@
%AddStat(FaerieRevivalCounter, 0, 0, 08, 3, !FAERIE_REVIVALS_X, !FAERIE_REVIVALS_Y)
%AddStat(MenuFrames, 1, 8, 32, 4, !TOTAL_MENU_TIME_X, !TOTAL_MENU_TIME_Y)
%AddStat($7F5038, 1, 0, 32, 4, !TOTAL_LAG_TIME_X, !TOTAL_LAG_TIME_Y)
print "Colletion Rate config: ", pc
%AddStat(TotalItemCounter, 0, 0, 16, 3, !COLLECTION_RATE_X, !COLLECTION_RATE_Y)
%AddStat(NMIFrames, 1, 0, 32, 4, !TOTAL_TIME_X, !TOTAL_TIME_Y)

View File

@@ -956,6 +956,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