diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 9f992e2..c3b5ace 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -20,11 +20,14 @@ org $00FFD7 ; <- 7FD7 - Bank00.asm : 9177 (db $0A ; rom size) db #$0B ; mark rom as 16mbit org $00FFD8 ; <- 7FD8 - Bank00.asm : 9178 (db $03 ; ram size (sram size)) -db #$07 ; mark sram as 128k +db #$05 ; mark sram as 32k org $3FFFFF ; <- 1FFFFF db #$00 ; expand file to 2mb +org $1FFFF8 ; timestamp rom +dl #$20170525 + ;================================================================================ !ADD = "CLC : ADC" @@ -89,6 +92,7 @@ incsrc rngfixes.asm incsrc medallions.asm incsrc inventory.asm incsrc ganonfixes.asm +incsrc zelda.asm incsrc maidencrystals.asm incsrc zoraking.asm incsrc catfish.asm @@ -320,6 +324,9 @@ Sprite_ShowMessageUnconditional: org $05FA8E Sprite_ShowMessageMinimal: +org $05EC96 +Sprite_ZeldaLong: + org $06DC5C Sprite_DrawShadowLong: diff --git a/darkworldspawn.asm b/darkworldspawn.asm index aa0be02..821ff39 100644 --- a/darkworldspawn.asm +++ b/darkworldspawn.asm @@ -28,6 +28,7 @@ DarkWorldFlagSet: .noMirror .aga1Alive LDA #$00 : STA $7EF3CA ; set flag to light world + LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; convert frog to dwarf ;LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$00 : STA $7EF3CC : + ; clear frog .done PLA @@ -41,7 +42,8 @@ SetDeathWorldChecked: LDA $7EF3C5 : CMP.b #$03 : !BGE .done; thing we originally did - skip if agahnim 1 is dead LDA $A0 : CMP.b #$00 : BEQ .done ; skip if we died in ganon's room LDA.b #$00 : STA $7EF3CA : STA $7E0FFF ; set the world to the light world if he's still alive - ;LDA $7EF3CC : CMP #$07 : BNE .done : LDA.b #$00 : STA $7EF3CC ; clear dwarf tagalong + LDA $7EF3CC : CMP #$07 : BNE .done : LDA.b #$08 : STA $7EF3CC ; convert frog to dwarf + ;LDA $7EF3CC : CMP #$07 : BNE .done : LDA.b #$00 : STA $7EF3CC ; clear frog .done PLA RTL @@ -49,7 +51,7 @@ RTL MasterSwordFollowerClear: LDA $7EF3CC CMP #$0E : BEQ .clear ; clear master sword follower - CMP #$07 : BEQ .clear ; clear frog + ;CMP #$07 : BEQ .clear ; clear frog ;CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications RTL .clear diff --git a/goalitem.asm b/goalitem.asm index 238ee7d..b0933ee 100644 --- a/goalitem.asm +++ b/goalitem.asm @@ -24,4 +24,11 @@ DrawGoalIndicator: LDA $7F5007 : AND.w #$00FF : ORA.w #$2400 : STA $7EC72C, X : INX #2 ; draw 1's and move the cursor PLX RTL +;-------------------------------------------------------------------------------- +GoalItemGanonCheck: + LDA $0E20, X : CMP.b #$D6 : BNE .normal ; skip if not ganon + LDA InvincibleGanon : CMP #$01 : BNE + : RTL : + + .normal + LDA $44 : CMP.b #$80 ; thing we wrote over +RTL ;-------------------------------------------------------------------------------- \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index d2d630f..5d919f5 100644 --- a/hooks.asm +++ b/hooks.asm @@ -43,6 +43,24 @@ org $1ED6EF ; <- F56EF - sprite_agahnim.asm : 636 (JSL GetRandomInt : AND.b #$01 NOP #18 ;-------------------------------------------------------------------------------- +;================================================================================ +; Zelda Sprite Fixes +;-------------------------------------------------------------------------------- +org $05EBCF ; <- 2EBCF - sprite_zelda.asm : 23 (LDA $7EF359 : CMP.b #$02 : BCS .hasMasterSword) +NOP #8 +;-------------------------------------------------------------------------------- +;org $06C06F ; <- 3406F - Bank06.asm : 1794 (JSL Sprite_ZeldaLong) +;JSL.l SpawnZelda +;-------------------------------------------------------------------------------- + +;================================================================================ +; Alternate Goal +;-------------------------------------------------------------------------------- +;Invincible Ganon +org $06F2C8 ; <- 372C8 - Bank06.asm : 5776 (LDA $44 : CMP.b #$80 : BEQ .no_collision) +JSL.l GoalItemGanonCheck +;-------------------------------------------------------------------------------- + ;================================================================================ ; Stat Hooks ;-------------------------------------------------------------------------------- diff --git a/tables.asm b/tables.asm index 890d072..9390d1b 100644 --- a/tables.asm +++ b/tables.asm @@ -137,6 +137,10 @@ org $30803D ; PC 0x18003D PersistentFloodgate: db #$00 ; #$00 = Off (default) - #$01 = On ;-------------------------------------------------------------------------------- +org $30803E ; PC 0x18003E +InvincibleGanon: +db #$00 ; #$00 = Off (default) - #$01 = On +;-------------------------------------------------------------------------------- org $308080 ; PC 0x180080 Upgrade5BombsRefill: db #$00 diff --git a/zelda.asm b/zelda.asm new file mode 100644 index 0000000..c73dd78 --- /dev/null +++ b/zelda.asm @@ -0,0 +1,9 @@ +;================================================================================ +; Spawn Zelda (or not) +;-------------------------------------------------------------------------------- +;SpawnZelda: +; LDA.l $7EF3CC : CMP #$08 : BEQ .skip +; JSL.l Sprite_ZeldaLong +; .skip +;RTL +;-------------------------------------------------------------------------------- \ No newline at end of file