Merge branch 'overworld_kara' of github.com:ardnaxelarak/z3randomizer into overworld_kara
This commit is contained in:
15
bugfixes.asm
15
bugfixes.asm
@@ -199,3 +199,18 @@ LDA $1B : BNE +
|
||||
LDA $8C : CMP.b #$97
|
||||
+
|
||||
RTL
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
FixJingleGlitch:
|
||||
LDA.b $11
|
||||
BEQ .set_doors
|
||||
|
||||
LDA.l AllowAccidentalMajorGlitch
|
||||
BEQ .exit
|
||||
|
||||
.set_doors
|
||||
LDA.b #$05
|
||||
STA.b $11
|
||||
|
||||
.exit
|
||||
RTL
|
||||
|
||||
@@ -53,8 +53,9 @@ DoWorldFix_Inverted:
|
||||
.aga1Alive
|
||||
LDA #$40 : STA $7EF3CA ; set flag to dark world
|
||||
LDA $7EF3CC
|
||||
CMP #$07 : BNE .done ; clear frog
|
||||
CMP #$08 : BNE .done ; clear dwarf - consider flute implications
|
||||
CMP #$07 : BEQ .clear ; clear frog
|
||||
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications
|
||||
BRA .done
|
||||
.clear
|
||||
LDA.b #$00 : STA $7EF3CC ; clear follower
|
||||
.done
|
||||
|
||||
@@ -217,11 +217,11 @@ AnimatedEntranceFix: ;when an entrance animation tries to start
|
||||
PHA : PHX
|
||||
LDA.l InvertedMode : BEQ + ;If we are in inverted mode
|
||||
LDA.l OWMode+1 : AND.b #!FLAG_OW_MIXED : BNE + ;If we are in Mixed OW shuffle mode
|
||||
LDA $8A : AND #$40 : BNE + ;and in the light world
|
||||
PLX : PLA
|
||||
STZ $04C6 ; skip it.
|
||||
LDA #$00
|
||||
RTL
|
||||
LDA $8A : AND #$40 : BNE + ;and in the light world
|
||||
PLX : PLA
|
||||
STZ $04C6 ; skip it.
|
||||
LDA #$00
|
||||
RTL
|
||||
+
|
||||
PLX : PLA
|
||||
STA $02E4 ;what we wrote over
|
||||
|
||||
22
hooks.asm
22
hooks.asm
@@ -1526,6 +1526,9 @@ org $1DBAB1 ; <- EBAB1 - sprite_sidenexx.asm : 314 (JSL GetRandomInt : AND.b #$0
|
||||
JSL.l RNG_Trinexx
|
||||
org $1DBAC3 ; <- EBAC3 - sprite_sidenexx.asm : 323 (JSL GetRandomInt : AND.b #$0F : ADD.b #$0C : STA $02 : STZ $03)
|
||||
JSL.l RNG_Trinexx
|
||||
;--------------------------------------------------------------------------------
|
||||
org $6F9B8 ; <- 379B8 - bank06.asm : 6693 (JSL GetRandomInt : PLY : AND $FA5C, Y : BNE BRANCH_MU)
|
||||
JSL.l RNG_Enemy_Drops
|
||||
;================================================================================
|
||||
; HUD Changes
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -2868,3 +2871,22 @@ JSL Ganon_CheckBeeVulnerability
|
||||
;--------------------------------------------------------------------------------
|
||||
org $06ED70 ; Bank06.asm@4842 (LDA $06ED39, X : STA $0CF2)
|
||||
JSL StoreSwordDamage
|
||||
;================================================================================
|
||||
; Fix quadrant glitch
|
||||
org $07A879
|
||||
JSR SwordSpinQuadrantFix
|
||||
|
||||
org $07F877 ; free rom
|
||||
SwordSpinQuadrantFix:
|
||||
LDA.l AllowAccidentalMajorGlitch
|
||||
BEQ ++
|
||||
JMP.w $07E8D9 ; HandleIndoorCameraAndDoors
|
||||
|
||||
++ RTS
|
||||
|
||||
;================================================================================
|
||||
|
||||
org $01C4B8 : JSL FixJingleGlitch
|
||||
org $01C536 : JSL FixJingleGlitch
|
||||
org $01C592 : JSL FixJingleGlitch
|
||||
org $01C65F : JSL FixJingleGlitch
|
||||
|
||||
6
msu.asm
6
msu.asm
@@ -324,10 +324,8 @@ CheckMusicLoadRequest:
|
||||
.load
|
||||
REP #$10
|
||||
STZ $4200
|
||||
STA !REG_SPC_CONTROL
|
||||
- : CMP !REG_SPC_CONTROL : BNE - ; Wait until mute/unmute command is ACK'ed
|
||||
STZ !REG_SPC_CONTROL
|
||||
- : LDA !REG_SPC_CONTROL : BNE - ; Wait until mute/unmute command is completed
|
||||
- : STA !REG_SPC_CONTROL : CMP !REG_SPC_CONTROL : BNE - ; Wait until mute/unmute command is ACK'ed
|
||||
- : STZ !REG_SPC_CONTROL : LDA !REG_SPC_CONTROL : BNE - ; Wait until mute/unmute command is completed
|
||||
LDA.b #$81 : STA $4200
|
||||
|
||||
LDA !REG_MUSIC_CONTROL_REQUEST : CMP.b #08 : BEQ .done+3 ; No SFX during warp track
|
||||
|
||||
16
rngfixes.asm
16
rngfixes.asm
@@ -4,8 +4,7 @@
|
||||
RigDigRNG:
|
||||
LDA $7FFE01 : CMP.l DiggingGameRNG : !BGE .forceHeart
|
||||
.normalItem
|
||||
JSL $0DBA71 ; GetRandomInt
|
||||
RTL
|
||||
JML GetRandomInt
|
||||
.forceHeart
|
||||
LDA $7FFE00 : BNE .normalItem
|
||||
LDA #$04
|
||||
@@ -15,7 +14,7 @@ RigChestRNG:
|
||||
JSL.l DecrementChestCounter
|
||||
LDA $04C4 : CMP.l ChestGameRNG : BEQ .forceHeart
|
||||
.normalItem
|
||||
JSL $0DBA71 ; GetRandomInt
|
||||
JSL GetRandomInt
|
||||
AND.b #$07 ; restrict values to 0-7
|
||||
CMP #$07 : BEQ .notHeart
|
||||
JSL.l DecrementItemCounter
|
||||
@@ -30,7 +29,7 @@ RTL
|
||||
JSL.l DecrementItemCounter
|
||||
;LDA #$00 ; bullshit rupee farming in chest game
|
||||
|
||||
JSL $0DBA71 ; GetRandomInt ; spam RNG until we stop getting the prize item
|
||||
JSL GetRandomInt ; spam RNG until we stop getting the prize item
|
||||
AND.b #$07 ; restrict values to 0-7
|
||||
CMP #$07 : BNE + ; player got prize item AGAIN
|
||||
LDA.b #$00 ; give them money instead
|
||||
@@ -98,6 +97,11 @@ RNG_Ganon_Extra_Warp:
|
||||
+
|
||||
PLA
|
||||
RTL
|
||||
RNG_Enemy_Drops:
|
||||
LDA.l $7EF3C5 : CMP #$01 : BEQ + ; drops are static after uncle pickup & before rescuing zelda
|
||||
JML GetRandomInt
|
||||
+
|
||||
LDA.b #$0F
|
||||
_rng_done:
|
||||
JSL.l GetStaticRNG
|
||||
RTL
|
||||
@@ -143,5 +147,5 @@ dw #$02C0 ; 11 = Agahnim 2
|
||||
dw #$0300 ; 12 = Agahnim 2 Phantoms
|
||||
dw #$0340 ; 13 = Ganon
|
||||
dw #$0380 ; 14 = Ganon Extra Warp
|
||||
dw #$03C0 ; 15 = Unused
|
||||
;--------------------------------------------------------------------------------
|
||||
dw #$03C0 ; 15 = Standard Escape Enemy Drops
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -546,6 +546,15 @@ CreditsLineBlank:
|
||||
%blankline()
|
||||
%blankline()
|
||||
|
||||
%smallcredits("WEBSITE LOGO", "green")
|
||||
|
||||
%blankline()
|
||||
|
||||
%bigcredits("PLEASURE")
|
||||
|
||||
%blankline()
|
||||
%blankline()
|
||||
|
||||
%smallcredits("SPECIAL THANKS", "red")
|
||||
|
||||
%blankline()
|
||||
@@ -609,12 +618,6 @@ CreditsLineBlank:
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
|
||||
@@ -1093,8 +1093,15 @@ db $00, $00, $00, $00, $00, $00, $00, $00
|
||||
org $308350 ; PC 0x180350
|
||||
ShouldStartatExit:
|
||||
db $00, $00, $00
|
||||
;--------------------------------------------------------------------------------
|
||||
; $308358 (0x180358) fixes major glitches
|
||||
; 0x00 - fix
|
||||
; otherwise dont fix various major glitches
|
||||
org $308358
|
||||
AllowAccidentalMajorGlitch:
|
||||
db $00
|
||||
;================================================================================
|
||||
; 0x180350 - 0x1814FF (unused)
|
||||
; 0x180359 - 0x1814FF (unused)
|
||||
;================================================================================
|
||||
; $309500 (0x181500) - $309FFF (0x181FFF) original 0x39C bytes
|
||||
; Replacement Ending Sequence Text Data
|
||||
|
||||
@@ -24,8 +24,7 @@ GetSpriteID:
|
||||
PHA : JSR.w CountBottles : CMP.l BottleLimit : !BLT +
|
||||
LDA !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE +
|
||||
PLA : LDA.l BottleLimitReplacement
|
||||
JSL.l GetSpriteID
|
||||
RTL
|
||||
JMP GetSpriteID
|
||||
+
|
||||
PLA : BRA .normal
|
||||
.server_F0
|
||||
@@ -59,8 +58,7 @@ RTL
|
||||
LDA !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE +
|
||||
LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit
|
||||
LDA.l ProgressiveArmorReplacement
|
||||
JSL.l GetSpriteID
|
||||
RTL
|
||||
JMP GetSpriteID
|
||||
+
|
||||
LDA.b #$04 : RTL
|
||||
++ CMP.b #$FE : BNE ++ ; Progressive Sword
|
||||
@@ -68,8 +66,7 @@ RTL
|
||||
LDA $7EF359
|
||||
CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit
|
||||
LDA.l ProgressiveSwordReplacement
|
||||
JSL.l GetSpriteID
|
||||
RTL
|
||||
JMP GetSpriteID
|
||||
.skipswordlimit : LDA $7EF359
|
||||
+ : CMP.b #$FF : BNE + ; Swordless
|
||||
LDA.b #$43 : RTL
|
||||
@@ -87,8 +84,7 @@ RTL
|
||||
LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6
|
||||
CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
|
||||
LDA.l ProgressiveShieldReplacement
|
||||
JSL.l GetSpriteID
|
||||
RTL
|
||||
JMP GetSpriteID
|
||||
.skipshieldlimit : LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6
|
||||
+ : CMP.b #$00 : BNE + ; No Shield
|
||||
LDA.b #$2D : RTL
|
||||
@@ -101,8 +97,7 @@ RTL
|
||||
LDA $7EF340 : INC : LSR
|
||||
CMP.l ProgressiveBowLimit : !BLT +
|
||||
LDA.l ProgressiveBowReplacement
|
||||
JSL.l GetSpriteID
|
||||
RTL
|
||||
JMP GetSpriteID
|
||||
.skipbowlimit : LDA $7EF340 : INC : LSR
|
||||
+ : CMP.b #$00 : BNE + ; No Bow
|
||||
LDA.b #$29 : RTL
|
||||
@@ -190,8 +185,7 @@ GetSpritePalette:
|
||||
.bottle
|
||||
PHA : JSR.w CountBottles : CMP.l BottleLimit : !BLT +
|
||||
PLA : LDA.l BottleLimitReplacement
|
||||
JSL.l GetSpritePalette
|
||||
RTL
|
||||
JMP GetSpritePalette
|
||||
+
|
||||
PLA : .notBottle
|
||||
PHX
|
||||
@@ -206,8 +200,7 @@ RTL
|
||||
LDA $7EF359
|
||||
CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit
|
||||
LDA.l ProgressiveSwordReplacement
|
||||
JSL.l GetSpritePalette
|
||||
RTL
|
||||
JMP GetSpritePalette
|
||||
+ : CMP.b #$00 : BNE + ; No Sword
|
||||
LDA.b #$04 : RTL
|
||||
+ : CMP.b #$01 : BNE + ; Fighter Sword
|
||||
@@ -220,8 +213,7 @@ RTL
|
||||
LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6
|
||||
CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
|
||||
LDA.l ProgressiveShieldReplacement
|
||||
JSL.l GetSpritePalette
|
||||
RTL
|
||||
JMP GetSpritePalette
|
||||
+ : CMP.b #$00 : BNE + ; No Shield
|
||||
LDA.b #$04 : RTL
|
||||
+ : CMP.b #$01 : BNE + ; Fighter Shield
|
||||
@@ -231,8 +223,7 @@ RTL
|
||||
++ : CMP.b #$FF : BNE ++ ; Progressive Armor
|
||||
LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit
|
||||
LDA.l ProgressiveArmorReplacement
|
||||
JSL.l GetSpritePalette
|
||||
RTL
|
||||
JMP GetSpritePalette
|
||||
+ : CMP.b #$00 : BNE + ; Green Tunic
|
||||
LDA.b #$04 : RTL
|
||||
+ ; Everything Else
|
||||
@@ -246,8 +237,7 @@ RTL
|
||||
LDA $7EF340 : INC : LSR
|
||||
CMP.l ProgressiveBowLimit : !BLT +
|
||||
LDA.l ProgressiveBowReplacement
|
||||
JSL.l GetSpritePalette
|
||||
RTL
|
||||
JMP GetSpritePalette
|
||||
+ : CMP.b #$00 : BNE + ; No Bow
|
||||
LDA.b #$08 : RTL
|
||||
+ ; Any Bow
|
||||
@@ -330,35 +320,37 @@ IsNarrowSprite:
|
||||
LDA.l BottleLimitReplacement
|
||||
JSL.l IsNarrowSprite
|
||||
JMP .done
|
||||
+ : BRA .continue
|
||||
+ : JMP .continue
|
||||
.notBottle
|
||||
CMP.b #$5E : BNE ++ ; Progressive Sword
|
||||
LDA $7EF359 : CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit
|
||||
LDA.l ProgressiveSwordReplacement
|
||||
JSL.l IsNarrowSprite
|
||||
BRA .done
|
||||
+ : BRA .continue
|
||||
++ : CMP.b #$5F : BNE ++ ; Progressive Shield
|
||||
LDA !PROGRESSIVE_SHIELD : AND #$C0 : BNE + : SEC : BRA .done ; No Shield
|
||||
LSR #6 : CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
|
||||
JMP .done
|
||||
+ : JMP .continue
|
||||
++ CMP.b #$5F : BNE ++ ; Progressive Shield
|
||||
LDA !PROGRESSIVE_SHIELD : AND #$C0 : BNE + : SEC : JMP .done ; No Shield
|
||||
+ : LSR #6 : CMP.l ProgressiveShieldLimit : !BLT .continue
|
||||
LDA.l ProgressiveShieldReplacement
|
||||
JSL.l IsNarrowSprite
|
||||
BRA .done
|
||||
+
|
||||
;LDA $7EF35A : BNE + : SEC : BRA .done : +; No Shield
|
||||
BRA .false ; Everything Else
|
||||
JMP .done
|
||||
++ CMP.b #$60 : BNE ++ ; Progressive Armor
|
||||
LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit
|
||||
LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT .continue
|
||||
LDA.l ProgressiveArmorReplacement
|
||||
JSL.l IsNarrowSprite
|
||||
BRA .done
|
||||
JMP .done
|
||||
+
|
||||
++ CMP.b #$62 : BNE ++ ; RNG Item (Single)
|
||||
JSL.l GetRNGItemSingle : BRA .continue
|
||||
JSL.l GetRNGItemSingle : JMP .continue
|
||||
++ CMP.b #$63 : BNE ++ ; RNG Item (Multi)
|
||||
JSL.l GetRNGItemMulti
|
||||
++
|
||||
|
||||
++ CMP.b #$64 : BEQ + ; Progressive Bow
|
||||
CMP.b #$65 : BNE .continue ; Progressive Bow (alt)
|
||||
+ : LDA $7EF340 : INC : LSR
|
||||
CMP.l ProgressiveBowLimit : !BLT +
|
||||
LDA.l ProgressiveBowReplacement
|
||||
JSL.l IsNarrowSprite
|
||||
JMP .done
|
||||
.continue
|
||||
;--------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user