10 Commits

Author SHA1 Message Date
codemann8
781431f633 Fixes issue not able to screen transition if bumped by enemy in water 2026-01-19 15:21:03 -06:00
codemann8
e02f98e6c5 Fixed L/R map swap while in special world 2026-01-17 13:58:18 -06:00
codemann8
7898e2149f Fixed issue with Old Man follower infinite pit fall 2026-01-17 00:51:26 -06:00
codemann8
3c41d7ff39 Change key total display based on seen by player 2026-01-16 15:30:06 -06:00
codemann8
ab0f37b7ba Merge branch 'OWMain' of https://github.com/codemann8/z3randomizer into OWMain 2026-01-16 14:30:04 -06:00
codemann8
343d61a976 Fixing key totals marking MapCountDisplay flag 2026-01-16 14:30:01 -06:00
codemann8
804e72395b Fixing key totals marking MapCountDisplay flag 2026-01-16 14:19:48 -06:00
codemann8
e8e6120a9e Some added labeling 2026-01-13 23:51:42 -06:00
codemann8
b0dfcdcae6 Fixed screen drawing issue on Pyramid screen 2026-01-13 15:29:04 -06:00
codemann8
920212d1b8 Removed sprite pointer label since value can shift via generator 2026-01-13 11:26:28 -06:00
9 changed files with 63 additions and 32 deletions

View File

@@ -238,6 +238,18 @@ FixJingleGlitch:
.exit .exit
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
FixSwimBump:
LDA.b LinkIncapacitatedTimer : BEQ .normal
LDA.b LinkJumping : BNE .normal
INC.b LinkJumping
BRA .not_diving
.normal
LDA.b LinkJumping : BNE .continue ; what we wrote over
.not_diving
PLA : PLA : PEA.w $87964E ; skip ahead, not diving
.continue
RTL
;--------------------------------------------------------------------------------
; Fix spawning with more hearts than capacity when less than 3 heart containers ; Fix spawning with more hearts than capacity when less than 3 heart containers
pushpc pushpc
org $09F4AC ; <- module_death.asm:331 org $09F4AC ; <- module_death.asm:331

View File

@@ -158,10 +158,8 @@ DrHudDungeonItemsAdditions:
jsr ConvertToDisplay2 : sta.w $1644, y jsr ConvertToDisplay2 : sta.w $1644, y
+ iny #2 : lda.w #$24f5 : sta.w $1644, y + iny #2 : lda.w #$24f5 : sta.w $1644, y
phx : ldx.b Scrap00 phx : ldx.b Scrap00
LDA.l CompassMode : BIT.w #$0002 : BNE .skip_map_check LDA.l MapField : ORA.l MapCountDisplay : AND.l DungeonMask, x : BEQ .key_info_done ; must have map
LDA.l MapField : AND.l DungeonMask, x : BEQ .key_info_done ; must have map plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02
.skip_map_check
plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02
lda.l GenericKeys : bne +++ lda.l GenericKeys : bne +++
lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02 lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02
+++ lda.b Scrap02 +++ lda.b Scrap02

View File

@@ -23,7 +23,7 @@ JSL SpritePrep_OldManFollower : NOP #2 : db $F0 ; BEQ
org $9DFF18 org $9DFF18
JSL SpriteDraw_OldManFollower JSL SpriteDraw_OldManFollower
org $9EE9BC org $9EE9BC
JSL Follower_CheckMessageCollision JSL OldMan_WaitForCollision
org $9EE9CC org $9EE9CC
JSL OldMan_BecomeFollower : NOP #2 JSL OldMan_BecomeFollower : NOP #2
@@ -631,6 +631,15 @@ SpriteDraw_OldManFollower:
dw 0, 0 : db $AC, $00, $00, $02 dw 0, 0 : db $AC, $00, $00, $02
dw 0, 8 : db $AE, $00, $00, $02 dw 0, 8 : db $AE, $00, $00, $02
OldMan_WaitForCollision:
PHA
LDA.w LinkIFrames : BEQ +
PLA : CLC
RTL
+
PLA
JML Follower_CheckMessageCollision
OldMan_BecomeFollower: OldMan_BecomeFollower:
LDA.l FollowerTravelAllowed : CMP.b #$02 : BCC .set_follower_and_despawn LDA.l FollowerTravelAllowed : CMP.b #$02 : BCC .set_follower_and_despawn
PLA : PLA PLA : PLA

View File

@@ -2107,6 +2107,11 @@ JSL FlipperScrollWarp
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;org $878F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM) ;org $878F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM)
;JSL OnEnterWater : NOP ;JSL OnEnterWater : NOP
;--------------------------------------------------------------------------------
; Fixes getting bumped while swimming, unable to screen transition
org $879632
LinkState_Swimming:
JSL FixSwimBump
;================================================================================ ;================================================================================
; Floodgate Softlock Fix ; Floodgate Softlock Fix
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -89,7 +89,8 @@ org $80FDEE
InitializeMirrorHDMA: InitializeMirrorHDMA:
org $89D62E org $89D62E
UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers ;commenting out since this address can move
;UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
org $89D87E org $89D87E
UWPotsPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers UWPotsPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers

View File

@@ -1188,7 +1188,7 @@ MaybeFlagCompassTotalPickup:
RTL RTL
MaybeFlagMapTotalPickup: MaybeFlagMapTotalPickup:
; LDA.l MapHUDMode : AND.b #$0F : BEQ .done LDA.l MapHUDMode : AND.b #$0F : BEQ .done
LDA.w DungeonID : BMI .done LDA.w DungeonID : BMI .done
LDA.w ItemReceiptID : CMP.b #$33 : BEQ .set_flag LDA.w ItemReceiptID : CMP.b #$33 : BEQ .set_flag
REP #$20 REP #$20
@@ -1210,7 +1210,7 @@ MaybeFlagDungeonTotalsEntrance:
LDA.l CompassMode : AND.w #$000F : BEQ .maps ; Skip if we're not showing compass counts LDA.l CompassMode : AND.w #$000F : BEQ .maps ; Skip if we're not showing compass counts
JSR FlagCompassCount JSR FlagCompassCount
.maps .maps
LDA.l MapHUDMode : AND.w #$000F LDA.l MapHUDMode : AND.w #$000F : BEQ .done
LDX.w DungeonID LDX.w DungeonID
JSR FlagMapCount JSR FlagMapCount
.done .done

View File

@@ -115,9 +115,10 @@ BEQ .vanilla_light
LDA.b OverworldIndex : AND.b #$40 LDA.b OverworldIndex : AND.b #$40
BEQ .vanilla_light BEQ .vanilla_light
.custom .custom
PHB : PHK : PLB STZ.b ScrapBuffer72 ; clear tile swap flag
JSL LoadMapDarkOrCustom JSL LoadMapDarkOrCustom_long
PLB NOP #2
warnpc $8ABAB5
.vanilla_light ; $0ABAB5 .vanilla_light ; $0ABAB5
org $8ABB32 org $8ABB32
@@ -240,6 +241,7 @@ OWMapWorldCheck16:
{ {
lda.b GameMode : cmp.w #$0014 : beq .return ; attract module, return with Z flag cleared lda.b GameMode : cmp.w #$0014 : beq .return ; attract module, return with Z flag cleared
jsl OWWorldCheck16 jsl OWWorldCheck16
eor.b ScrapBuffer72 ; apply tile swap flag
.return .return
rtl rtl
} }
@@ -409,6 +411,7 @@ LoadMapDarkOrCustom:
LDX.b OverworldIndex LDX.b OverworldIndex
LDA.l OWTileWorldAssoc,X LDA.l OWTileWorldAssoc,X
AND.w #$0040 AND.w #$0040
EOR.b ScrapBuffer72 ; apply tile swap flag
BEQ .draw_lw BEQ .draw_lw
LDA.w #OWMapGridDark LDA.w #OWMapGridDark
BRA .draw_dw BRA .draw_dw
@@ -425,14 +428,14 @@ LoadMapDarkOrCustom:
JSR GetOWMapTilemapOffsetToCopy JSR GetOWMapTilemapOffsetToCopy
.copy_cell ; more efficient to have X on the right side .copy_cell ; more efficient to have X on the right side
TAY TAY
LDA.w $C739+$00,Y : STA.b $00,X LDA.w WorldMap_LightWorldTilemap+$00,Y : STA.b $00,X
LDA.w $C739+$02,Y : STA.b $02,X LDA.w WorldMap_LightWorldTilemap+$02,Y : STA.b $02,X
LDA.w $C739+$20,Y : STA.b $20,X LDA.w WorldMap_LightWorldTilemap+$20,Y : STA.b $20,X
LDA.w $C739+$22,Y : STA.b $22,X LDA.w WorldMap_LightWorldTilemap+$22,Y : STA.b $22,X
LDA.w $C739+$40,Y : STA.b $40,X LDA.w WorldMap_LightWorldTilemap+$40,Y : STA.b $40,X
LDA.w $C739+$42,Y : STA.b $42,X LDA.w WorldMap_LightWorldTilemap+$42,Y : STA.b $42,X
LDA.w $C739+$60,Y : STA.b $60,X LDA.w WorldMap_LightWorldTilemap+$60,Y : STA.b $60,X
LDA.w $C739+$62,Y : STA.b $62,X LDA.w WorldMap_LightWorldTilemap+$62,Y : STA.b $62,X
PLY PLY
DEX : DEX : DEX : DEX ; move one screen left DEX : DEX : DEX : DEX ; move one screen left
TYA : AND.w #$0007 : BNE .same_row TYA : AND.w #$0007 : BNE .same_row
@@ -443,7 +446,7 @@ LoadMapDarkOrCustom:
.end .end
SEP #$30 SEP #$30
LDA.b #$15 : STA.b NMIINCR ; what we wrote over LDA.b #$15 : STA.b NMIINCR ; what we wrote over
RTL RTS
} }
GetOWMapTilemapOffsetToCopy: GetOWMapTilemapOffsetToCopy:
@@ -509,11 +512,11 @@ GetOWMapTilemapOffsetToCopy:
dw $0400+$0210 ; bottom right dw $0400+$0210 ; bottom right
} }
LoadMapSwapTiles: LoadMapDarkOrCustom_long:
{ {
PHB : LDA.b #WorldMap_DarkWorldTilemap>>16 : PHA : PLB PHB : LDA.b #WorldMap_DarkWorldTilemap>>16 : PHA : PLB
LDA.l OWFlags : AND.b #!FLAG_OW_CUSTOM_MAP LDA.l OWFlags : AND.b #!FLAG_OW_CUSTOM_MAP
JSL LoadMapDarkOrCustom JSR LoadMapDarkOrCustom
PLB PLB
RTL RTL
} }
@@ -522,17 +525,15 @@ LoadMapOppositeWorld:
LDA.l OWFlags : AND.b #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla LDA.l OWFlags : AND.b #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla
LDA.b ScrapBuffer72 : BEQ + LDA.b ScrapBuffer72 : BEQ +
LDA.b Joy1B_All : AND.b #$30 : BNE .vanilla LDA.b Joy1B_All : AND.b #$30 : BNE .vanilla
STZ.b ScrapBuffer72 STZ.b ScrapBuffer72 ; clear tile swap flag
BRA .new_tiles BRA .new_tiles
+ LDA.b Joy1B_New : AND.b #$30 : BEQ .vanilla + LDA.b Joy1B_New : AND.b #$30 : BEQ .vanilla
LDA.b #$40 : STA.b ScrapBuffer72 LDA.b #$40 : STA.b ScrapBuffer72 ; set tile swap flag
.new_tiles .new_tiles
EOR.b OverworldIndex : STA.b OverworldIndex JSL OverworldMap_InitGfx+$10 ; load palette
JSL OverworldMap_InitGfx+$10 ; load palette DEC.w SubModuleInterface
DEC.w SubModuleInterface LDA.b #$0F : STA.b INIDISPQ
LDA.b #$0F : STA.b INIDISPQ JSL LoadMapDarkOrCustom_long
JSL LoadMapSwapTiles
LDA.w OverworldIndexMirror : STA.b OverworldIndex
LDA.b #$24 : STA.w SFX3 LDA.b #$24 : STA.w SFX3
PLA : PLA : PEA.w $BBAF ; skip everything upon return PLA : PLA : PEA.w $BBAF ; skip everything upon return
.vanilla .vanilla
@@ -542,7 +543,7 @@ LoadMapOppositeWorld:
WorldMap_SkipHandleSprites: WorldMap_SkipHandleSprites:
{ {
LDA.l OWFlags : AND.b #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla LDA.l OWFlags : AND.b #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla
LDA.b ScrapBuffer72 : BEQ .vanilla LDA.b ScrapBuffer72 : BEQ .vanilla ; skip draw if no tile swap
PLA : PLA : PEA.w $C3AF ; exit without drawing sprites PLA : PLA : PEA.w $C3AF ; exit without drawing sprites
RTL RTL
.vanilla .vanilla
@@ -1688,7 +1689,7 @@ dw $0b28, $0b38, $0010, $0b30, $5555, $1018, $0001, $002e
dw $0b70, $0ba0, $0030, $0b88, $5555, $1020, $0000, $002f dw $0b70, $0ba0, $0030, $0b88, $5555, $1020, $0000, $002f
dw $0a40, $0b10, $00d0, $0aa8, $5d5d, $1006, $0000, $0030 dw $0a40, $0b10, $00d0, $0aa8, $5d5d, $1006, $0000, $0030
dw $0350, $0390, $0040, $0370, $5861, $2060, $0000, $0031 dw $0350, $0390, $0040, $0370, $5861, $2060, $0000, $0031
dw $0670, $06a8, $0038, $068c, $5b63, $2002, $0000, $0032 dw $0670, $06a8, $0038, $068c, $5b63, $2004, $0000, $0032
dw $0898, $09b0, $0118, $0924, $5b64, $2054, $0000, $0033 dw $0898, $09b0, $0118, $0924, $5b64, $2054, $0000, $0033
dw $0a40, $0ba0, $0160, $0af0, $6565, $100e, $0000, $0034 dw $0a40, $0ba0, $0160, $0af0, $6565, $100e, $0000, $0034
dw $0c70, $0c90, $0020, $0c80, $5e66, $2002, $0000, $0035 dw $0c70, $0c90, $0020, $0c80, $5e66, $2002, $0000, $0035

View File

@@ -231,6 +231,8 @@ CurrentYItem = $7E0303 ;
AButtonAct = $7E0308 ; Bitfield for A-actions. $80 = Carry/toss | $02 Prayer | $01 = Tree pull AButtonAct = $7E0308 ; Bitfield for A-actions. $80 = Carry/toss | $02 Prayer | $01 = Tree pull
CarryAct = $7E0309 ; Bitfield for carrying. $02 = Tossing | $01 = Lifting CarryAct = $7E0309 ; Bitfield for carrying. $02 = Tossing | $01 = Lifting
; ;
LinkIFrames = $7E031F ; Countdown for Link's invincibility frames after taking damage.
;
LinkSwimDirection = $7E0340 ; Bitfield for swim direction. (.... udlr) LinkSwimDirection = $7E0340 ; Bitfield for swim direction. (.... udlr)
; ;
LinkDeepWater = $7E0345 ; Set when Link is in deep water. LinkDeepWater = $7E0345 ; Set when Link is in deep water.
@@ -856,6 +858,8 @@ endmacro
%assertRAM(UseY1, $7E0301) %assertRAM(UseY1, $7E0301)
%assertRAM(CurrentYItem, $7E0303) %assertRAM(CurrentYItem, $7E0303)
%assertRAM(AButtonAct, $7E0308) %assertRAM(AButtonAct, $7E0308)
%assertRAM(CarryAct, $7E0309)
%assertRAM(LinkIFrames, $7E031F)
%assertRAM(LinkSwimDirection, $7E0340) %assertRAM(LinkSwimDirection, $7E0340)
%assertRAM(LinkDeepWater, $7E0345) %assertRAM(LinkDeepWater, $7E0345)
%assertRAM(TileActIce, $7E0348) %assertRAM(TileActIce, $7E0348)

View File

@@ -290,6 +290,7 @@ WorldMap_RedXChars = $8ABF70
WorldMap_CalculateOAMCoordinates = $8AC3B1 WorldMap_CalculateOAMCoordinates = $8AC3B1
WorldMap_HandleSpriteBlink = $8AC52E WorldMap_HandleSpriteBlink = $8AC52E
WorldMapIcon_AdjustCoordinate = $8AC59B WorldMapIcon_AdjustCoordinate = $8AC59B
WorldMap_LightWorldTilemap = $8AC739
WorldMap_DarkWorldTilemap = $8AD739 WorldMap_DarkWorldTilemap = $8AD739
DungeonMapBossRooms = $8AE817 DungeonMapBossRooms = $8AE817
DamageSubclassValue = $8DB8F1 DamageSubclassValue = $8DB8F1