diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 8c6feb1..8b54f58 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF db #$00 ; expand file to 2mb org $1FFFF8 ; <- FFFF8 timestamp rom -db #$20, #$17, #$10, #$22 ; year/month/day +db #$20, #$17, #$11, #$14 ; year/month/day ;================================================================================ @@ -216,10 +216,20 @@ Static_RNG: ; each line below is 512 bytes of rng incsrc staticrng.asm warnpc $AF8401 ;================================================================================ -;bank $2F reserved for tournament use -;bank $3A reserved for downstream use (Plandomizer) -;bank $3B reserved for downstream use (Plandomizer) -;bank $3F reserved for internal debugging +;Bank Map +;$20 Code Bank +;$21 Reserved (Frame Hook & Init) +;$22 Contrib Code +;$23 Stats & Credits +;$24 Code Bank +;$30 Main Configuration Table +;$31 Graphics Bank +;$32 Text Bank +;$33 Graphics Bank +;$2F reserved for tournament use +;$3A reserved for downstream use (Plandomizer) +;$3B reserved for downstream use (Plandomizer) +;$3F reserved for internal debugging ;$7F5700 - $7F57FF reserved for downstream use ;================================================================================ ;org $0080DC ; <- 0xDC - Bank00.asm:179 - Kill Music diff --git a/events.asm b/events.asm index 9962b6d..e824ad8 100644 --- a/events.asm +++ b/events.asm @@ -49,17 +49,25 @@ RTL ;-------------------------------------------------------------------------------- !RNG_ITEM_LOCK_IN = "$7F5090" OnNewFile: - REP #$20 ; set 16-bit accumulator - LDA.l LinkStartingRupees : STA $7EF362 : STA $7EF360 - LDA.l StartingTime : STA $7EF454 - LDA.l StartingTime+2 : STA $7EF454+2 - SEP #$20 ; set 8-bit accumulator - ;LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in - LDA.l PreopenCurtains : BEQ + - LDA.b #$80 : STA $7EF061 ; open aga tower curtain - LDA.b #$80 : STA $7EF093 ; open skull woods curtain - + - LDA StartingSword : STA $7EF359 ; set starting sword type + PHX : PHP + REP #$20 ; set 16-bit accumulator + LDA.l LinkStartingRupees : STA $7EF362 : STA $7EF360 + LDA.l StartingTime : STA $7EF454 + LDA.l StartingTime+2 : STA $7EF454+2 + + LDX.w #$00 : - ; copy over starting equipment + LDA StartingEquipment, X : STA $7EF340, X + INX : INX + CPX.w #$004B : !BLT - + + SEP #$20 ; set 8-bit accumulator + ;LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in + LDA.l PreopenCurtains : BEQ + + LDA.b #$80 : STA $7EF061 ; open aga tower curtain + LDA.b #$80 : STA $7EF093 ; open skull woods curtain + + + LDA StartingSword : STA $7EF359 ; set starting sword type + PLP : PLX RTL ;-------------------------------------------------------------------------------- OnLinkDamaged: diff --git a/hooks.asm b/hooks.asm index 6d9ad45..59c13b9 100644 --- a/hooks.asm +++ b/hooks.asm @@ -658,6 +658,9 @@ NOP org $0DE12D ; <- 6E12D - equipment.asm : 828 JSL.l CloseBottleMenu ;-------------------------------------------------------------------------------- +org $0DDF1E ; <- 6DF1E - equipment.asm : 462 - LDA $F4 : AND.b #$10 : BEQ .dontLeaveMenu +JSL.l CheckCloseItemMenu +;-------------------------------------------------------------------------------- org $0DEE70 ; <- 6EE70 - equipment.asm : 2137 JSL.l PrepItemScreenBigKey NOP diff --git a/inventory.asm b/inventory.asm index bbb5306..84ce870 100644 --- a/inventory.asm +++ b/inventory.asm @@ -235,7 +235,8 @@ AddInventory: + CPY.b #$3B : BNE + : BRL .dungeonCounts : + ; Silver Arrow Bow - Skip Shop/Fairy Check for Silver Arrow Bow - LDA $02E9 : CMP #$01 : BEQ ++ ; skip shop check for chests + LDA $1B : BEQ ++ ; skip shop check if outdoors + LDA $02E9 : CMP.b #$01 : BEQ ++ ; skip shop check for chests PHP : REP #$20 ; set 16-bit accumulator LDA $048E CMP.w #274 : BNE + : BRL .shop : + ; dark world death mountain shop, ornamental shield shop diff --git a/newitems.asm b/newitems.asm index 9be801b..069d360 100755 --- a/newitems.asm +++ b/newitems.asm @@ -723,7 +723,25 @@ AddReceivedItemExpanded: .item_masks ; these are dungeon correlations to $7EF364 - $7EF369 so it knows where to store compasses, etc dw $8000, $4000, $2000, $1000, $0800, $0400, $0200, $0100 - dw $0080, $0040, $0020, $0010, $0008, $0004 + dw $0080, $0040, $0020, $0010, $0008, $0004, $0000, $0000 + + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 + dw $0000, $0000, $0000, $0000, $0000, $0000, $0000 + db $00 + dw $0000 ; Caves } ;-------------------------------------------------------------------------------- BottleListExpanded: diff --git a/pendantcrystalhud.asm b/pendantcrystalhud.asm index 8e42e06..0970cc9 100644 --- a/pendantcrystalhud.asm +++ b/pendantcrystalhud.asm @@ -144,7 +144,7 @@ BringMenuDownEnhanced: EOR.w #$FFFF : !ADD.w #$0001 ; negate menu speed - !ADD.w $EA : CMP.w #$FF18 : !BGE .noOvershoot + !ADD $EA : CMP.w #$FF18 : !BGE .noOvershoot LDA.w #$FF18 ; if we went past the limit, go to the limit .noOvershoot STA $EA : CMP.w #$FF18 @@ -162,12 +162,19 @@ RaiseHudMenu: LDA.l MenuSpeed : AND.w #$00FF ++ - !ADD.w $EA : BMI .noOvershoot + !ADD $EA : BMI .noOvershoot LDA.w #$0000 ; if we went past the limit, go to the limit .noOvershoot STA $EA RTL ;================================================================================ +CheckCloseItemMenu: + LDA.l MenuCollapse : BNE + + LDA $F4 : AND.b #$10 : RTL + + + LDA $F0 : AND.b #$10 : EOR.b #$10 +RTL +;================================================================================ ShowDungeonItems: LDA $040C : AND.w #$00FF : CMP.w #$00FF : BNE + : RTL : + ; return normal result if outdoors or in a cave ;LDA $F0 : AND.w #$0020 ; check for select diff --git a/stats.asm b/stats.asm index 1e5343d..6428600 100644 --- a/stats.asm +++ b/stats.asm @@ -379,6 +379,8 @@ StatsFinalPrep: .done PLP : PLX : PLA LDA.b #$19 : STA $10 ; thing we wrote over, load triforce room + STZ $11 + STZ $B0 RTL ;-------------------------------------------------------------------------------- ; Notes: diff --git a/tables.asm b/tables.asm index 6a5bb0d..c9f221b 100644 --- a/tables.asm +++ b/tables.asm @@ -131,7 +131,7 @@ org $30803B ; PC 0x18003B MapMode: db #$00 ; #$00 = Always On (default) - #$01 = Require Map Item CompassMode: -db #$00 ; #$00 = Off (default) - #$01 = Display Dungeon Count +db #$02 ; #$00 = Off (default) - #$01 = Display Dungeon Count w/Compass - #$02 = Display Dungeon Count Always ;-------------------------------------------------------------------------------- org $30803D ; PC 0x18003D PersistentFloodgate: @@ -189,6 +189,10 @@ db #$12 ; #$12 = Vwoop Up (Default) - #$20 = Menu Chime org $0DE0E9 ; PC 0x6E0E9 (equipment.asm:780) ; Menu Up Chime db #$12 ; #$12 = Vwoop Up (Default) - #$20 = Menu Chime ;-------------------------------------------------------------------------------- +org $308049 ; PC 0x180049 +MenuCollapse: +db #$00 ; #$00 = Press Start (default) - #$10 = Release Start +;-------------------------------------------------------------------------------- org $308080 ; PC 0x180080 Upgrade5BombsRefill: db #$00 @@ -1317,3 +1321,11 @@ dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 dw $0000, $0AA8, $07AA, $0000, $0000, $0000, $0000, $0000 dw $0000, $0000, $0000, $0000, $0000, $0000 ;=============================================================================== +org $30B000 ; PC 0x183000 +StartingEquipment: +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $1818, $0000 +dw $0000, $0000, $0000, $0000, $F800, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +;===============================================================================