From cd76b9f2f1583161ecc533f8809cb97a2e909a22 Mon Sep 17 00:00:00 2001 From: Lyle Mantooth Date: Mon, 23 May 2022 09:47:51 -0400 Subject: [PATCH] Copy ASM files, etc. from parent project. --- assembly/src/DMA.asm | 72 ++ assembly/src/NMI.asm | 53 + assembly/src/NMI_hook.asm | 9 + assembly/src/agahnim.asm | 24 + assembly/src/agahnim_hooks.asm | 8 + assembly/src/bee_hooks.asm | 8 + assembly/src/bees.asm | 16 + assembly/src/blindboss.asm | 14 + assembly/src/blindboss_hooks.asm | 11 + assembly/src/blinddoor_hooks.asm | 11 + assembly/src/bolder_hooks.asm | 8 + assembly/src/bossdrop.asm | 22 + assembly/src/bossdrop_hooks.asm | 6 + assembly/src/bosses_hooks.asm | 208 ++++ assembly/src/bosses_moved.asm | 304 ++++++ assembly/src/bushes.asm | 68 ++ assembly/src/bushes_hooks.asm | 8 + assembly/src/bushes_table.asm | 13 + assembly/src/damage.asm | 11 + assembly/src/damage_hooks.asm | 12 + assembly/src/enemizer_info_table.asm | 3 + assembly/src/enemizerflags.asm | 42 + assembly/src/export_symbols.asm | 32 + assembly/src/externalhooks.asm | 37 + assembly/src/hooks.asm | 46 + assembly/src/init.asm | 11 + assembly/src/kodongo_fixes.asm | 9 + assembly/src/kodongo_hooks.asm | 3 + assembly/src/load_file.asm | 5 + assembly/src/load_file_hooks.asm | 5 + assembly/src/location_menu.asm | 5 + assembly/src/location_select_hook.asm | 6 + assembly/src/main.asm | 88 ++ assembly/src/main.rs | 3 + assembly/src/mimic_fixes.asm | 68 ++ assembly/src/mimic_hooks.asm | 39 + assembly/src/moldorm.asm | 14 + assembly/src/moldorm_hooks.asm | 20 + assembly/src/msu1.asm | 124 +++ assembly/src/msu1_hooks.asm | 80 ++ assembly/src/new sprite template.asm | 359 +++++++ assembly/src/on_file_load.asm | 4 + assembly/src/overworld_sprite_hooks.asm | 54 + assembly/src/overworld_sprites.asm | 8 + assembly/src/randomize_bushes.bin | Bin 0 -> 2097715 bytes assembly/src/rocks.gfx | Bin 0 -> 2048 bytes assembly/src/rocks2.gfx | Bin 0 -> 192 bytes assembly/src/room_header_table.asm | 6 + assembly/src/room_object_table.asm | 3 + assembly/src/shell.gfx | Bin 0 -> 4096 bytes assembly/src/shell_gfx.asm | 12 + assembly/src/shields.gfx | Bin 0 -> 3072 bytes assembly/src/soundfx_changes.asm | 45 + assembly/src/soundfx_hooks.asm | 59 + assembly/src/special_action.asm | 12 + assembly/src/sprite_damage.asm | 13 + assembly/src/sprite_damage_hooks.asm | 4 + assembly/src/sprite_randomizer.asm | 76 ++ assembly/src/sprite_randomizer_hooks.asm | 20 + assembly/src/sword_and_shield.asm | 46 + assembly/src/sword_and_shield_hooks.asm | 12 + assembly/src/swords.gfx | Bin 0 -> 4096 bytes assembly/src/temp.bin | Bin 0 -> 3145728 bytes assembly/src/terrorpin.asm | 19 + assembly/src/terrorpin_hooks.asm | 7 + assembly/src/test.bin | Bin 0 -> 1196032 bytes assembly/src/testing.asm | 1245 ++++++++++++++++++++++ assembly/src/vitreous_fixes.asm | 4 + assembly/src/vitreous_hooks.asm | 2 + assembly/src/wallmasternotes.asm | 635 +++++++++++ assembly/src/what4.brr | Bin 0 -> 1908 bytes assembly/src/whatsmall.brr | Bin 0 -> 1908 bytes 72 files changed, 4171 insertions(+) create mode 100644 assembly/src/DMA.asm create mode 100644 assembly/src/NMI.asm create mode 100644 assembly/src/NMI_hook.asm create mode 100644 assembly/src/agahnim.asm create mode 100644 assembly/src/agahnim_hooks.asm create mode 100644 assembly/src/bee_hooks.asm create mode 100644 assembly/src/bees.asm create mode 100644 assembly/src/blindboss.asm create mode 100644 assembly/src/blindboss_hooks.asm create mode 100644 assembly/src/blinddoor_hooks.asm create mode 100644 assembly/src/bolder_hooks.asm create mode 100644 assembly/src/bossdrop.asm create mode 100644 assembly/src/bossdrop_hooks.asm create mode 100644 assembly/src/bosses_hooks.asm create mode 100644 assembly/src/bosses_moved.asm create mode 100644 assembly/src/bushes.asm create mode 100644 assembly/src/bushes_hooks.asm create mode 100644 assembly/src/bushes_table.asm create mode 100644 assembly/src/damage.asm create mode 100644 assembly/src/damage_hooks.asm create mode 100644 assembly/src/enemizer_info_table.asm create mode 100644 assembly/src/enemizerflags.asm create mode 100644 assembly/src/export_symbols.asm create mode 100644 assembly/src/externalhooks.asm create mode 100644 assembly/src/hooks.asm create mode 100644 assembly/src/init.asm create mode 100644 assembly/src/kodongo_fixes.asm create mode 100644 assembly/src/kodongo_hooks.asm create mode 100644 assembly/src/load_file.asm create mode 100644 assembly/src/load_file_hooks.asm create mode 100644 assembly/src/location_menu.asm create mode 100644 assembly/src/location_select_hook.asm create mode 100644 assembly/src/main.asm create mode 100644 assembly/src/main.rs create mode 100644 assembly/src/mimic_fixes.asm create mode 100644 assembly/src/mimic_hooks.asm create mode 100644 assembly/src/moldorm.asm create mode 100644 assembly/src/moldorm_hooks.asm create mode 100644 assembly/src/msu1.asm create mode 100644 assembly/src/msu1_hooks.asm create mode 100644 assembly/src/new sprite template.asm create mode 100644 assembly/src/on_file_load.asm create mode 100644 assembly/src/overworld_sprite_hooks.asm create mode 100644 assembly/src/overworld_sprites.asm create mode 100644 assembly/src/randomize_bushes.bin create mode 100644 assembly/src/rocks.gfx create mode 100644 assembly/src/rocks2.gfx create mode 100644 assembly/src/room_header_table.asm create mode 100644 assembly/src/room_object_table.asm create mode 100644 assembly/src/shell.gfx create mode 100644 assembly/src/shell_gfx.asm create mode 100644 assembly/src/shields.gfx create mode 100644 assembly/src/soundfx_changes.asm create mode 100644 assembly/src/soundfx_hooks.asm create mode 100644 assembly/src/special_action.asm create mode 100644 assembly/src/sprite_damage.asm create mode 100644 assembly/src/sprite_damage_hooks.asm create mode 100644 assembly/src/sprite_randomizer.asm create mode 100644 assembly/src/sprite_randomizer_hooks.asm create mode 100644 assembly/src/sword_and_shield.asm create mode 100644 assembly/src/sword_and_shield_hooks.asm create mode 100644 assembly/src/swords.gfx create mode 100644 assembly/src/temp.bin create mode 100644 assembly/src/terrorpin.asm create mode 100644 assembly/src/terrorpin_hooks.asm create mode 100644 assembly/src/test.bin create mode 100644 assembly/src/testing.asm create mode 100644 assembly/src/vitreous_fixes.asm create mode 100644 assembly/src/vitreous_hooks.asm create mode 100644 assembly/src/wallmasternotes.asm create mode 100644 assembly/src/what4.brr create mode 100644 assembly/src/whatsmall.brr diff --git a/assembly/src/DMA.asm b/assembly/src/DMA.asm new file mode 100644 index 0000000..2b8df35 --- /dev/null +++ b/assembly/src/DMA.asm @@ -0,0 +1,72 @@ +!DISP_REG = $2100 ; Screen Display Register +!VMAIN_REG = $2115 ; Video Port Control Register +!VRAM_LOW_REG = $2116 ; VRAM Address Registers (Low) +!VRAM_HIGH_REG = $2117 ; VRAM Address Registers (High) +!VRAM_WRITE_REG = #$18 ; VRAM Data Write Registers (Low) (you always store it to the dest register so no need for the actual address) + +!DMA0_REG = $4300 ; DMA Control Register - channel 0 +!DMA0_DEST_REG = $4301 ; DMA Destination Register +!DMA0_SRC_LOW_REG = $4302 ; DMA Source Address Register (Low) +!DMA0_SRC_HIGH_REG = $4303 ; DMA Source Address Register (High) +!DMA0_SRC_BANK_REG = $4304 ; DMA Source Address Register (Bank) +!DMA0_SIZE_LOW_REG = $4305 ; DMA Size Registers (Low) +!DMA0_SIZE_HIGH_REG = $4306 ; DMA Size Registers (Low) + +!DMA_ENABLE_REG = $420B ; DMA Enable Register + +macro DMA_VRAM(VRAM_HIGH,VRAM_LOW,SRC_BANK,SRC_HIGH,SRC_LOW,LENGTH_HIGH,LENGTH_LOW) + PHA + ; --- preserve DMA registers ---------------------------------------------------- + LDA !DMA0_REG : PHA + LDA !DMA0_DEST_REG : PHA + LDA !DMA0_SRC_LOW_REG : PHA + LDA !DMA0_SRC_HIGH_REG : PHA + LDA !DMA0_SRC_BANK_REG : PHA + LDA !DMA0_SIZE_LOW_REG : PHA + LDA !DMA0_SIZE_HIGH_REG : PHA + ; ------------------------------------------------------------------------------- + + ;LDA.b #$80 : STA !DISP_REG ; force vblank + LDA #$80 : STA !VMAIN_REG + + ; write to vram at $ + LDA : STA !VRAM_LOW_REG ; Set VRAM destination address low byte + LDA : STA !VRAM_HIGH_REG ; Set VRAM destination address high byte + + ; Set DMA0 to write a word at a time. + LDA #$01 + STA !DMA0_REG + + ; Write to $2118 & $2119 - VRAM Data Write Registers (Low) & VRAM Data Write Registers (High) + ; setting word write mode on DMA0_REG causes a write to $2118 and then $2119 + ; $21xx is assumed + LDA #$18 + STA !DMA0_DEST_REG + + ; Read from $:. + LDA.b + STA !DMA0_SRC_LOW_REG ; set src address low byte + LDA.b + STA !DMA0_SRC_HIGH_REG ; set src address high byte + LDA.b + STA !DMA0_SRC_BANK_REG ; set src address bank byte + + ; total bytes to copy: #$1000 bytes. + LDA : STA $4305 ; length low byte + LDA : STA $4306 ; length high byte + + ; start DMA on channel 0 + LDA #$01 ; channel select bitmask + STA !DMA_ENABLE_REG + + ; --- restore DMA registers ----------------------------------------------------- + PLA : STA !DMA0_SIZE_HIGH_REG + PLA : STA !DMA0_SIZE_LOW_REG + PLA : STA !DMA0_SRC_BANK_REG + PLA : STA !DMA0_SRC_HIGH_REG + PLA : STA !DMA0_SRC_LOW_REG + PLA : STA !DMA0_DEST_REG + PLA : STA !DMA0_REG + ; ------------------------------------------------------------------------------- + PLA +endmacro diff --git a/assembly/src/NMI.asm b/assembly/src/NMI.asm new file mode 100644 index 0000000..607a508 --- /dev/null +++ b/assembly/src/NMI.asm @@ -0,0 +1,53 @@ +;------------- +NMIHookAction: +{ + ;----------------------------------------- + ; do our shell stuff + PHA + PHP + + SEP #$20 ; get into 8-bit mode + + LDA !SHELL_DMA_FLAG : BEQ .return ; check our draw flag + AND #$01 : BNE .loadKholdstare + LDA !SHELL_DMA_FLAG : AND #$02 : BNE .loadTrinexx + BRA .return ; just in case + ;BIT #$01 : BEQ .loadKholdstare + ;BIT #$02 : BEQ .loadTrinexx + +.loadKholdstare + JSL DMAKholdstare + LDA #$00 : STA !SHELL_DMA_FLAG ; clear our draw flag + BRA .return + +.loadTrinexx + JSL DMATrinexx + LDA #$00 : STA !SHELL_DMA_FLAG ; clear our draw flag + +.return + PLP + PLA + ;----------------------------------------- + ; restore code Bank00.asm (164-167) + PHB + ; Sets DP to $0000 + LDA.w #$0000 : TCD + +JML.l NMIHookReturn +} + +DMAKholdstare: +{ + ;#GFX_Kholdstare_Shell>>16 + %DMA_VRAM(#$34,#$00,#GFX_Kholdstare_Shell>>16&$FF,#GFX_Kholdstare_Shell>>8&$FF,#GFX_Kholdstare_Shell&$FF,#$10,#$00) + RTL +} + +DMATrinexx: +{ + ; TODO: change this to trinexx gfx + %DMA_VRAM(#$34,#$00,#GFX_Trinexx_Shell>>16,#GFX_Trinexx_Shell>>8&$FF,#GFX_Trinexx_Shell&$FF,#$08,#$00) + %DMA_VRAM(#$3A,#$A0,#GFX_Trinexx_Shell2>>16,#GFX_Trinexx_Shell2>>8&$FF,#GFX_Trinexx_Shell2&$FF,#$00,#$C0) + + RTL +} diff --git a/assembly/src/NMI_hook.asm b/assembly/src/NMI_hook.asm new file mode 100644 index 0000000..b17aa8c --- /dev/null +++ b/assembly/src/NMI_hook.asm @@ -0,0 +1,9 @@ +;================================================================================ +; NMI Hook +;-------------------------------------------------------------------------------- +; rando already hooks the Bank00.asm : 164 (PHA : PHX : PHY : PHD : PHB) so we have to hook after that +org $0080D0 ; <- D0 - Bank00.asm : 164-167 (PHB, LDA.w #$0000) +JML.l NMIHookAction +org $0080D5 ; <- D5 - Bank00.asm : 164-167 (PHB, LDA.w #$0000) +NMIHookReturn: +;-------------------------------------------------------------------------------- diff --git a/assembly/src/agahnim.asm b/assembly/src/agahnim.asm new file mode 100644 index 0000000..06e4f55 --- /dev/null +++ b/assembly/src/agahnim.asm @@ -0,0 +1,24 @@ +newAgahBall: +{ + +;IF DAMAGE + CLC ;Clear carry + STZ $0D90, X ;not sent by the player anymore prevent agahnim from taking damage from the ball + LDA #$60 : STA $0DF0 + LDA !AGAHNIM_FUN_BALLS : BEQ .damage + JSL GetRandomInt : BMI .no_damage + .damage + PHX ;keep the current sprite id? not sure why + LDA.b #$A0 : STA $00;? + INC $0D90, X ;sent by the player anymore + LDA.b #$10 ;? + LDX.b #$00 ;Damage class used by the next jump + JSL $06EDCB ;Jump to damage part stuff + PLX ;restore the current sprite id? not sure why again + STZ $0DD0, X ;Set sprite state of energy ball to "Dead" + LDA $0D50, X : STA $0F40 ;Load x velocity of energy ball and store it in agahnim recoiling x + LDA $0D40, X : STA $0F30 ;Load y velocity of energy ball and store it in agahnim recoiling y + SEC;Set carry if we did damage + .no_damage + RTL +} \ No newline at end of file diff --git a/assembly/src/agahnim_hooks.asm b/assembly/src/agahnim_hooks.asm new file mode 100644 index 0000000..e3d58b7 --- /dev/null +++ b/assembly/src/agahnim_hooks.asm @@ -0,0 +1,8 @@ +; 0xF5ABA +org $1EDABA ; Agahnim Ball - Code replaced above + JSL newAgahBall + BCS .hasbeendamaged ;IF Carry set + JMP $DA46 ; 1EDA46 - routine for agahnim ball where it set speed and direction toward link + + .hasbeendamaged + NOP #$13 ;Remove unused code that is in our new function diff --git a/assembly/src/bee_hooks.asm b/assembly/src/bee_hooks.asm new file mode 100644 index 0000000..49e6174 --- /dev/null +++ b/assembly/src/bee_hooks.asm @@ -0,0 +1,8 @@ +org $1DF65D +Sprite_SpawnDynamically: + +; patch this in c# side so we can turn it off if need bee +; ; from rando +; org $308060 ; PC 0x180060 +; ProgrammableItemLogicJump_1: +; JSL.l $000000 : RTL diff --git a/assembly/src/bees.asm b/assembly/src/bees.asm new file mode 100644 index 0000000..942e82d --- /dev/null +++ b/assembly/src/bees.asm @@ -0,0 +1,16 @@ +Spawn_Bees: +{ + LDA #$79 + JSL Sprite_SpawnDynamically + BMI .done + LDA $22 + STA $0D10, Y + LDA $23 + STA $0D30, Y + LDA $20 + STA $0D00, Y + LDA $21 + STA $0D20, Y +.done + RTL +} \ No newline at end of file diff --git a/assembly/src/blindboss.asm b/assembly/src/blindboss.asm new file mode 100644 index 0000000..e98e7cb --- /dev/null +++ b/assembly/src/blindboss.asm @@ -0,0 +1,14 @@ +;================================================================================ +; Blind Boss fight +;-------------------------------------------------------------------------------- + + +check_blind_boss_room: + LDA $A0 ; load room index (low byte) + CMP #172 : BNE + ; Is is Thieve Town Boss Room + LDA $09DE81 : BEQ + ; Blind maiden does not need rescuing + + LDA $7EF3CC : JML Check_for_Blind_Fight + + + JML Initialize_Blind_Fight + \ No newline at end of file diff --git a/assembly/src/blindboss_hooks.asm b/assembly/src/blindboss_hooks.asm new file mode 100644 index 0000000..20b9e71 --- /dev/null +++ b/assembly/src/blindboss_hooks.asm @@ -0,0 +1,11 @@ +;================================================================================ +; Blind Boss fight +;-------------------------------------------------------------------------------- + +org $1DA081 ; Original Code + JML check_blind_boss_room +Check_for_Blind_Fight: + + +org $1DA090 +Initialize_Blind_Fight: \ No newline at end of file diff --git a/assembly/src/blinddoor_hooks.asm b/assembly/src/blinddoor_hooks.asm new file mode 100644 index 0000000..2d7eb45 --- /dev/null +++ b/assembly/src/blinddoor_hooks.asm @@ -0,0 +1,11 @@ +;================================================================================ +; Blind door close +;-------------------------------------------------------------------------------- +; +org $028849 ; Bank02.asm(1588) - original code : JSL $078000 //Hook on player main when transition are over execute player code +JSL check_special_action ;using the variable 7E0CF3 if it not 00 then trap the player in that room +;could be changed easily to support more than only 1 function +;-------------------------------------------------------------------------------- + +org $078000 +Player_Main: diff --git a/assembly/src/bolder_hooks.asm b/assembly/src/bolder_hooks.asm new file mode 100644 index 0000000..6e29022 --- /dev/null +++ b/assembly/src/bolder_hooks.asm @@ -0,0 +1,8 @@ +;================================================================================ +; Remove bolder check for top quadrant so they work everywhere +;-------------------------------------------------------------------------------- +; maybe this should be done in c# side? +;remove the Y scrolling check for boulders +org $09B72E +NOP #$0A +;-------------------------------------------------------------------------------- diff --git a/assembly/src/bossdrop.asm b/assembly/src/bossdrop.asm new file mode 100644 index 0000000..54855e5 --- /dev/null +++ b/assembly/src/bossdrop.asm @@ -0,0 +1,22 @@ +;================================================================================ +; Fix boss item drop position to 'center' of screen +;================================================================================ +change_heartcontainer_position: +{ + PHA + LDA.b #$78 : STA $0D10, X + STA $0D00, X + + LDA $23 : STA $0D30, X + LDA $21 : STA $0D20, X + + LDA $A0 : CMP #$07 : BNE .not_moldorm_room + LDA $22 : STA $0D10, X + LDA $20 : STA $0D00, X + + .not_moldorm_room + + PLA + JSL $0684BD + RTL +} \ No newline at end of file diff --git a/assembly/src/bossdrop_hooks.asm b/assembly/src/bossdrop_hooks.asm new file mode 100644 index 0000000..145f3df --- /dev/null +++ b/assembly/src/bossdrop_hooks.asm @@ -0,0 +1,6 @@ +;================================================================================ +; Change heart container drop location +;-------------------------------------------------------------------------------- +org $05EF62 +JSL change_heartcontainer_position +;-------------------------------------------------------------------------------- diff --git a/assembly/src/bosses_hooks.asm b/assembly/src/bosses_hooks.asm new file mode 100644 index 0000000..d9444d0 --- /dev/null +++ b/assembly/src/bosses_hooks.asm @@ -0,0 +1,208 @@ +; ;================================================================================ +; ; insert kholdstare & trinexx shell gfx file +; ;-------------------------------------------------------------------------------- +; ; pc file address = 0x123000 +; org $24B000 +; GFX_Kholdstare_Shell: +; incbin shell.gfx +; warnpc $24C001 ; should have written 0x1000 bytes and apparently we need to go 1 past that or it'll yell at us + +; org $24C000 +; GFX_Trinexx_Shell: +; incbin rocks.gfx +; warnpc $24C801 + +; GFX_Trinexx_Shell2: +; incbin rocks2.gfx +; warnpc $24C8C1 +; ;-------------------------------------------------------------------------------- + + ; ; *$4C290-$4C2D4 LOCAL + ; Dungeon_LoadSprites: + +; *$4C114-$4C174 LONG +org $9C114 +Dungeon_ResetSprites: ; Bank09.asm(822) + +; *$4C44E-$4C498 LONG +org $9C44E +Sprite_ResetAll: ; Bank09.asm(1344) + +;================================================================================ +; fix skull woods gibdo key drop +;-------------------------------------------------------------------------------- +;Gibdo key drop hardcoded in skullwoods to fix problems +;some bosses are dropping a key when there's a key drop avaiable in +;the previous room + +; org $09DD74 ; Gibdo draw code (JSL Sprite_DrawShadowLong) +; db #$00, #$00 ; Remove key drop in skull woods + +; org $1EBB37 ; Gibdo draw code (JSL Sprite_DrawShadowLong) +; JSL gibdo_drop_key +;-------------------------------------------------------------------------------- + +;================================================================================ +; Move All Bosses Sprites in Top Left Quadrant +;-------------------------------------------------------------------------------- +; sprite values for rooms, with coordinates changed +;Trinexx +org $09E5BA ; 0x4E5BA ; [0xB] +db $00 ; "Sort Spr" in Hyrule Magic +db $05, $07, $CB ; trinexx body? ; 15 07 CB +db $05, $07, $CC ; trinexx ice head? ; 15 07 CC +db $05, $07, $CD ; trinexx fire head? ; 15 07 CD +db $FF ; terminator + +;Armos - Eastern +org $09E887 ; 0x4E887 ; [0x17] +db $00 ; "Sort Spr" in Hyrule Magic +db $05, $04, $53 ; armos ;15 14 53 +db $05, $07, $53 ; armos ;15 17 53 +db $05, $0A, $53 ; armos ;15 1A 53 +db $08, $0A, $53 ; armos ;18 1A 53 +db $08, $07, $53 ; armos ;18 17 53 +db $08, $04, $53 ; armos ;18 14 53 +db $08, $E7, $19 ; armos overlord ;18 F7 19 +db $FF ; terminator + +;Kholdstare +org $09EA01 ; 0x4EA01 ; [0xB] +db $00 ; "Sort Spr" in Hyrule Magic +db $05, $07, $A3 ; kholdstare shell ;05 17 A3 +db $05, $07, $A4 ; fallling ice ;05 17 A4 +db $05, $07, $A2 ; kholdstare ;05 17 A2 +db $FF ; terminator + +;Arrghus +org $09D997 ; 0x4D997 ; [0x2C] +db $00 ; "Sort Spr" in Hyrule Magic +db $07, $07, $8C ; arrghus ;17 07 8C +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $07, $07, $8D ; spawn ;17 07 8D +db $FF ; terminator + +;Moldorm - ToH +org $09D9C3 ; 0x4D9C3 ; [0x5] +db $00 ; "Sort Spr" in Hyrule Magic +db $09, $09, $09 ; moldorm ;0E 12 09 +db $FF ; terminator + +;Mothula +org $09DC31 ; 0x4DC31 ; [0x5] (really [0x8]) +db $00 ; "Sort Spr" in Hyrule Magic +db $06, $08, $88 ; mothula ;16 18 88 +; truncated moving floor overlord ;16 E7 07 +db $FF ; terminator + +;Lanmolas - Desert +org $09DCCB ; 0x4DCCB ; [0xB] +db $00 ; "Sort Spr" in Hyrule Magic +db $07, $06, $54 ; lanmolas ;17 06 54 +db $07, $09, $54 ; lanmolas ;17 09 54 +db $09, $07, $54 ; lanmolas ;19 07 54 +db $FF ; terminator + +;Helmasaure +org $09E049 ; 0x4E049 ; [0x5] +db $00 ; "Sort Spr" in Hyrule Magic +db $06, $07, $92 ; helmasaur ;16 17 92 +db $FF ; terminator + +;Vitreous +org $09E457 ; 0x4E457 ; [0x5] +db $00 ; "Sort Spr" in Hyrule Magic +db $05, $07, $BD ; vitreous ;15 07 BD +db $FF ; terminator + +;Blind +org $09E654 ; 0x4E654 ; [0x5] +db $00 ; "Sort Spr" in Hyrule Magic +db $05, $09, $CE ; blind ;15 19 CE +db $FF ; terminator + +; Armos - GT ; this shouldn't get used unless boss randomization is turned off +org $09DB23 ; 0x4DB23 ; [0x23] // need 0x38 to fit arrghus+spawn and fairies (use 0x4D87E-) +db $00 +db $05, $04, $53 ; armos ;15 14 53 +db $05, $07, $53 ; armos ;15 17 53 +db $05, $0A, $53 ; armos ;15 1A 53 +db $08, $0A, $53 ; armos ;18 1A 53 +db $08, $07, $53 ; armos ;18 17 53 +db $08, $04, $53 ; armos ;18 14 53 +db $08, $E7, $19 ; armos overlord ;18 F7 19 +db $07, $07, $E3 ; fairy ;07 07 E3 +db $07, $08, $E3 ; fairy ;07 08 E3 +db $08, $07, $E3 ; fairy ;08 07 E3 +db $08, $08, $E3 ; fairy ;08 08 E3 +db $FF + +; Lanmola - GT ; this shouldn't get used unless boss randomization is turned off +org $09E1BE ; 0x4E1BE ; [0x11] // need 0x32 to fit arrghus+spawn and bunny beam+medusa (use 0x4D8B6-) +db $00 +db $07, $06, $54 ; lanmolas ;17 06 54 +db $07, $09, $54 ; lanmolas ;17 09 54 +db $09, $07, $54 ; lanmolas ;19 07 54 +db $18, $17, $D1 ; bunny beam ;18 17 D1 +db $1C, $03, $C5 ; medusa ;1C 03 C5 +db $FF + +; Moldorm - GT ; this shouldn't get used unless boss randomization is turned off +org $09DF1E ; 0x4DF1E ; [0x5] +db $00 ; "Sort Spr" in Hyrule Magic +db $09, $09, $09 ; moldorm ;0E 12 09 +db $FF ; terminator + +;-------------------------------------------------------------------------------- + +;================================================================================ +; On Room Transition -> Move Sprite depending on the room loaded +;-------------------------------------------------------------------------------- +org $028979 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114 +JSL boss_move +org $028C16 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114 +JSL boss_move +org $029338 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114 +JSL boss_move +org $028256 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114 +JSL boss_move +;-------------------------------------------------------------------------------- + +;================================================================================ +; water tiles removed in arrghus room +;-------------------------------------------------------------------------------- +org $1FA15C +db $FF, $FF, $FF, $FF, $F0, $FF, $61, $18, $FF, $FF + +; Arrghus can stand on ground +org $0DB6BE +db $00 +;-------------------------------------------------------------------------------- + +;================================================================================ +; Draw kholdstare shell +;-------------------------------------------------------------------------------- +org $0DD97F ; jump point +Kholdstare_Draw: + +org $1E9518 ; sprite_kholdstare.asm (154) : JSL Kholdstare_Draw +JSL new_kholdstare_code ; Write new gfx in the vram +;-------------------------------------------------------------------------------- + +;================================================================================ +; Draw trinexx shell +;-------------------------------------------------------------------------------- +org $1DAD67 ; sprite_trinexx.asm (62) : LDA.b #$03 : STA $0DC0, X +JSL new_trinexx_code +;-------------------------------------------------------------------------------- diff --git a/assembly/src/bosses_moved.asm b/assembly/src/bosses_moved.asm new file mode 100644 index 0000000..6ad6a1c --- /dev/null +++ b/assembly/src/bosses_moved.asm @@ -0,0 +1,304 @@ +;================================================================================ +; Move the bosses to the right screen location depending on the room +;-------------------------------------------------------------------------------- +boss_move: +{ + ; TODO: should probably double check that we don't need to preserve registers (A,X)... + + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + LDA $A0 ; load room index (low byte) + LDX $A1 ; (high byte) + + CMP #7 : BNE + ; Is is Hera Tower Boss Room + CPX #$00 : BNE + + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_middle + + + + CMP #200 : BNE + ; Is is Eastern Palace Boss Room + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_bottom_right + + + + CMP #41 : BNE + ; Is is Skull Woods Boss Room + ; TODO: Add moving floor sprite + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + LDA #$07 : STA $0B00;Spawn the moving floor sprite + STZ $0B28 + INC $0B08 + BRL .move_to_bottom_right + + + + CMP #51 : BNE + ; Is is Desert Palace Boss Room + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_bottom_left + + + + CMP #90 : BNE + ; Is is Palace of darkness Boss Room + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_bottom_right + + + + CMP #144 : BNE + ; Is is Misery Mire Boss Room + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_bottom_left + + + + CMP #172 : BNE + ; Is is Thieve Town Boss Room + ; IF MAIDEN IS NOT RESCUED -> DO NOTHING + ; IF MAIDEN IS ALREADY RESCUED -> spawn sprites normally + JSL Sprite_ResetAll ; removes sprites in thieve town boss room + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + ;Close the door if !BLIND_DOOR_FLAG == 1 + LDA !BLIND_DOOR_FLAG : BEQ .no_blind_door + INC $0468 ; $0468[0x02] - Flag that is set when trap doors are down. + STZ $068E ; $068E[0x02] - (Dungeon) ???? related to trap doors and if they are open ; possibly bomb doors too? Update: module 0x07.0x4 probably uses this to know whether it's a key door or big key door to open. + STZ $0690 ; $0690[0x02] - (Overworld) Generally is used as an animation step indicator, only for doors that animate when they open, such as the Santuary and Hyrule Castle doors. This variable is incremented up to a value of 3, at which point a logic check kicks in and stops animating the opening of a door. + INC $0CF3 ; $0CF3[0x01] - free ram + ; ;That must be called after the room load! + .no_blind_door + BRL .move_to_bottom_right + + + + CMP #6 : BNE + ; Is is Swamp Palace Boss Room + CPX #$00 : BNE + + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_bottom_left + + + + CMP #222 : BNE + ; Is is Ice Palace Boss Room + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_top_right + + + + CMP #164 : BNE + ; Is is Turtle Rock Boss Room + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_bottom_left + + + + CMP #28 : BNE + ; Is is Gtower (Armos2) Boss Room + CPX #$00 : BNE + + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_bottom_right + + + + CMP #108 : BNE + ; Is is Gtower (Lanmo2) Boss Room + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_bottom_left + + + + CMP #77 : BNE + ; Is is Gtower (Moldorm2) Boss Room + JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare) + JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites + BRL .move_to_middle + + + + BRL .return + +; $0D00[0x10] - The lower byte of a sprite's Y - coordinate. +; $0D10[0x10] - The lower byte of a sprite's X - coordinate. + +; $0D20[0x10] - The high byte of a sprite's Y - coordinate. +; $0D30[0x10] - The high byte of a sprite's X - coordinate. + +; $0B08[0x08] - (Overlord) X coordinate low byte. +; $0B18[0x08] - (Overlord) Y coordinate low byte. + +; $0B10[0x08] - (Overlord) X coordinate high byte. +; $0B20[0x08] - (Overlord) Y coordinate high byte. + + .move_to_middle + ;load all sprite of that room and overlord + LDX #$00 + + .loop_middle ; move sprites + LDA $0E20, X + CMP #$E3 : BNE + ;is it a fairy?? if not check next + BRA .no_change + + + CMP #$D1 : BNE + ;is it a bunny changer + BRA .no_change + + + CMP #$C5 : BNE + ;is it a medusa head + BRA .no_change + + + LDA $0D10, X : !ADD #$68 : STA $0D10, X + LDA $0D00, X : !ADD #$68 : STA $0D00, X + + .no_change + INX : CPX #$10 : BNE .loop_middle + LDX #$00 + + .loop_middle2 ; move overlords + LDA $0B00, X + CMP #$E3 : BNE + ;is it moving floor? + BRA .no_change_ov + + + LDA $0B08, X : !ADD #$68 : STA $0B08, X + LDA $0B18, X : !ADD #$68 : STA $0B18, X + + .no_change_ov + INX : CPX #$08 : BNE .loop_middle2 + BRL .return + + + .move_to_top_right + LDX #$00 + + .loop_top_right ; move sprites + LDA $0E20, X + CMP #$E3 : BNE + ;is it a fairy?? if not check next + BRA .no_change2 + + + CMP #$D1 : BNE + ;is it a bunny changer + BRA .no_change2 + + + CMP #$C5 : BNE + ;is it a medusa head + BRA .no_change2 + + + LDA $0D20, X : !ADD #$00 : STA $0D20, X + LDA $0D30, X : !ADD #$01 : STA $0D30, X + + .no_change2 + INX : CPX #$10 : BNE .loop_top_right + LDX #$00 + + .loop_top_right2 ; move overlords + LDA $0B00, X + CMP #$E3 : BNE + ;is it moving floor? + BRA .no_change_ov2 + + + LDA $0B10, X : !ADD #$01 : STA $0B10, X + LDA $0B20, X : !ADD #$00 : STA $0B20, X + + .no_change_ov2 + INX : CPX #$08 : BNE .loop_top_right2 + BRL .return + + + .move_to_bottom_right + LDX #$00 + + .loop_bottom_right ; move sprites + LDA $0E20, X + CMP #$E3 : BNE + ;is it a fairy?? if not check next + BRA .no_change3 + + + CMP #$D1 : BNE + ;is it a bunny changer + BRA .no_change3 + + + CMP #$C5 : BNE + ;is it a medusa head + BRA .no_change3 + + + LDA $0D20, X : !ADD #$01 : STA $0D20, X + LDA $0D30, X : !ADD #$01 : STA $0D30, X + + .no_change3 + INX : CPX #$10 : BNE .loop_bottom_right + LDX #$00 + + .loop_bottom_right2 ; move overlords + LDA $0B00, X + CMP #$E3 : BNE + ;is it moving floor? + BRA .no_change_ov3 + + + LDA $0B10, X : !ADD #$01 : STA $0B10, X + LDA $0B20, X : !ADD #$01 : STA $0B20, X + + .no_change_ov3 + INX : CPX #$08 : BNE .loop_bottom_right2 + BRL .return + + + .move_to_bottom_left + LDX #$00 + + .loop_bottom_left ; move sprites + LDA $0E20, X + CMP #$E3 : BNE + ;is it a fairy?? if not check next + BRA .no_change4 + + + CMP #$D1 : BNE + ;is it a bunny changer + BRA .no_change4 + + + CMP #$C5 : BNE + ;is it a medusa head + BRA .no_change4 + + + LDA $0D20, X : !ADD #$01 : STA $0D20, X + LDA $0D30, X : !ADD #$00 : STA $0D30, X + + .no_change4 + INX : CPX #$10 : BNE .loop_bottom_left + LDX #$00 + + .loop_bottom_left2 ; move overlords + LDA $0B00, X + CMP #$E3 : BNE + ;is it moving floor? + BRA .no_change_ov4 + + + LDA $0B10, X : !ADD #$00 : STA $0B10, X + LDA $0B20, X : !ADD #$01 : STA $0B20, X + + .no_change_ov4 + INX : CPX #$08 : BNE .loop_bottom_left2 + BRL .return + + +.return + RTL +} + +;================================================================================ +; Fix the gibdo key drop in skull woods before the boss room - USELESS CODE +;-------------------------------------------------------------------------------- +;gibdo_drop_key: +; LDA $A0 : CMP #$39 : BNE .no_key_drop ; Check if the room id is skullwoods before boss +; LDA $0DD0, X : CMP #$09 : BNE .no_key_drop ; Check if the sprite is alive +; LDA #$01 : STA $0CBA, X;set key +; +;.no_key_drop +; JSL $06DC5C ;Restore draw shadow +; RTL +;-------------------------------------------------------------------------------- + +;================================================================================ +; Set a flag to draw kholdstare shell on next NMI +;-------------------------------------------------------------------------------- +new_kholdstare_code: + LDA $0CBA : BNE .already_iced + LDA #$01 : STA $0CBA + + LDA #$01 : STA !SHELL_DMA_FLAG ; tell our NMI to draw the shell + +.already_iced + ; restore code + JSL Kholdstare_Draw ; sprite_kholdstare.asm (154) : JSL Kholdstare_Draw + RTL +;-------------------------------------------------------------------------------- + +;================================================================================ +; Set a flag to draw trinexx shell on next NMI +;-------------------------------------------------------------------------------- +new_trinexx_code: + LDA $0CBA : BNE .already_rocked + LDA #$01 : STA $0CBA + + LDA #$02 : STA !SHELL_DMA_FLAG ; tell our NMI to draw the shell + +.already_rocked + ; restore code + LDA.b #$03 : STA $0DC0, X ; sprite_trinexx.asm (62) : LDA.b #$03 : STA $0DC0, X + + RTL +;-------------------------------------------------------------------------------- diff --git a/assembly/src/bushes.asm b/assembly/src/bushes.asm new file mode 100644 index 0000000..8de86d3 --- /dev/null +++ b/assembly/src/bushes.asm @@ -0,0 +1,68 @@ +; this is set inside randomizer application +; org $1AFBBB ;Increases chance of getting enemies under random bush +; db $01, $0F, $0F, $0F, $0F, $0F, $0F, $12 +; db $0F, $01, $0F, $0F, $11, $0F, $0F, $03 + +; sprite_bush_spawn_table: +; { +; ; SPRITE DATA TABLE GENERATED BY ENEMIZER +; .overworld +; ; Skip 0x80(overworld) + 0x128 (dungeons) +; skip #$80 +; .dungeons +; skip #$128 + +; ;Old sprite table - Could be changed as well (for the item id 04) +; .random_sprites ; if item == 04 +; db #$00, #$D8, #$E3, #$D8 +; } + +sprite_bush_spawn: +{ + STY $0D ; restored code + LDA !BUSHES_FLAG ; That byte is the flag to activate random enemies under bush + BNE .continue + CPY.b #$04 : BNE .not_random_old + JSL GetRandomInt : AND.b #$03 : !ADD.b #$13 : TAY + + .not_random_old + LDA $81F3, Y;restored code + RTL + + .continue + PHX : PHY ; save x,y just to be safe + PHB : PHK : PLB ; setbank to 40 + + CPY.b #$04 : BNE .not_random + JSL GetRandomInt : AND.b #$03 : TAY + LDA.w sprite_bush_spawn_table_random_sprites, Y + BRL .return + + .item_table + db #$00, #$D9, #$3E, #$79, #$D9, #$DC, #$D8, #$DA, #$E4, #$E1, #$DC + db #$D8, #$DF, #$E0, #$0B, #$42, #$D3, #$41, #$D4, #$D9, #$E3, #$D8 + + .not_random + + CPY.b #$0F : BEQ .newSpriteSpawn + CPY.b #$11 : BEQ .newSpriteSpawn + CPY.b #$10 : BEQ .newSpriteSpawn + ;CPY.b #$0E : BEQ .newSpriteSpawn + + LDA .item_table, Y + BRA .return + + .newSpriteSpawn + LDA $7E040A : TAY ; load the area ID + LDA $7EF3C5 : CMP.b #$03 : !BLT .dontGoPhase2 ; check if agahnim 1 is alive + ; aga1 is dead + LDA $7E040A : CMP.b #$40 : !BGE .dontGoPhase2 ; check if we are in DW, if so we can skip shifting table index + !ADD #$90 : TAY ; agahnim 1 is dead, so we need to go to the 2nd phase table for LW + .dontGoPhase2 + LDA sprite_bush_spawn_table_overworld, Y ;LDA 408000 + area id + + .return + PLB ; restore bank to where it was + PLY : PLX ; restore x,y + RTL +} \ No newline at end of file diff --git a/assembly/src/bushes_hooks.asm b/assembly/src/bushes_hooks.asm new file mode 100644 index 0000000..42f937d --- /dev/null +++ b/assembly/src/bushes_hooks.asm @@ -0,0 +1,8 @@ +;================================================================================ +; New bush mob randomization +;-------------------------------------------------------------------------------- +org $068279 +NOP #$0A +JSL sprite_bush_spawn +NOP ; we keep the branch +;-------------------------------------------------------------------------------- diff --git a/assembly/src/bushes_table.asm b/assembly/src/bushes_table.asm new file mode 100644 index 0000000..a05da38 --- /dev/null +++ b/assembly/src/bushes_table.asm @@ -0,0 +1,13 @@ +sprite_bush_spawn_table: +{ + ; SPRITE DATA TABLE GENERATED BY ENEMIZER + .overworld + ; Skip 0x128(overworld [way overkill]) + 0x128 (dungeons) + skip $128 + .dungeons + skip $128 + + ;Old sprite table - Could be changed as well (for the item id 04) + .random_sprites ; if item == 04 + db #$00, #$D8, #$E3, #$D8 +} diff --git a/assembly/src/damage.asm b/assembly/src/damage.asm new file mode 100644 index 0000000..b93e625 --- /dev/null +++ b/assembly/src/damage.asm @@ -0,0 +1,11 @@ +CheckIfLinkShouldDie: + ; before this we should have: + ; LDA $7EF36D - this gets hooked, but we should have LDA at the end of it + + CMP $00 : BCC .dead + SEC : SBC $00 + BRA .done + .dead + LDA #$00 +.done +RTL diff --git a/assembly/src/damage_hooks.asm b/assembly/src/damage_hooks.asm new file mode 100644 index 0000000..95b8176 --- /dev/null +++ b/assembly/src/damage_hooks.asm @@ -0,0 +1,12 @@ +org $780CA ; Bank07.asm(179) +JSL CheckIfLinkShouldDie : NOP : NOP : NOP +;SEC : SBC.b $00 : CMP #$00 : BEQ .linkIsDead ; Bank07.asm(179) - + +org $780D1 +BNE linkNotDead : NOP : NOP ; Bank07.asm(183) - CMP.b #$A8 : BCC .linkNotDead + +org $780D5 +linkIsDead: + +org $780F7 +linkNotDead: diff --git a/assembly/src/enemizer_info_table.asm b/assembly/src/enemizer_info_table.asm new file mode 100644 index 0000000..c74d285 --- /dev/null +++ b/assembly/src/enemizer_info_table.asm @@ -0,0 +1,3 @@ +enemizer_info_table: +skip $100 +; contains information about settings and enemizer version used to generate rom \ No newline at end of file diff --git a/assembly/src/enemizerflags.asm b/assembly/src/enemizerflags.asm new file mode 100644 index 0000000..4497ce7 --- /dev/null +++ b/assembly/src/enemizerflags.asm @@ -0,0 +1,42 @@ +; ;Enemizer Flags +EnemizerFlags: +.randomize_bushes +db #$00 ;408100 : 200100 ; Enable random enemy under bushes +.close_blind_door +db #$00 ;408101 : 200101 ; Enable blind's door closing for other bosses +.moldorm_eye_count +db #$01 ;408102 : 200102 ; Moldorm eye count, default to 2 eyes (1) +.randomize_sprites +db #$00 ;408103 : 200103 ; Randomize Sprites. +.agahnim_fun_balls +db #$00 ;408104 : 200104 ; make Agahnim balls deflect back +.enable_mimic_override +db #$00 ;408105 : 200105 ; toggle mimic code between new and old +.enable_terrorpin_ai_fix +db #$00 ;408106 : 200106 ; toggle to turn on terrorpin ai "fix" + +db #$00 ;408107 : 200107 +db #$00 ;408108 : 200108 +db #$00 ;408109 : 200109 +db #$00 ;40810A : 20010A +db #$00 ;40810B : 20010B +db #$00 ;40810C : 20010C +db #$00 ;40810D : 20010D +db #$00 ;40810E : 20010E +db #$00 ;40810F : 20010F +db #$00 ;408110 : 200110 +db #$00 ;408111 : 200111 +db #$00 ;408112 : 200112 +db #$00 ;408113 : 200113 +db #$00 ;408114 : 200114 +db #$00 ;408115 : 200115 +db #$00 ;408116 : 200116 +db #$00 ;408117 : 200117 +db #$00 ;408118 : 200118 +db #$00 ;408119 : 200119 +db #$00 ;40811A : 20011A +db #$00 ;40811B : 20011B +db #$00 ;40811C : 20011C +db #$00 ;40811D : 20011D +db #$00 ;40811E : 20011E +db #$00 ;40811F : 20011F diff --git a/assembly/src/export_symbols.asm b/assembly/src/export_symbols.asm new file mode 100644 index 0000000..18be8db --- /dev/null +++ b/assembly/src/export_symbols.asm @@ -0,0 +1,32 @@ +;export.open exported_symbols.txt +;export.label EnemizerTablesStart +;export.label EnemizerCodeStart +;export.label sprite_bush_spawn_table_overworld +;export.label sprite_bush_spawn_table_dungeons +;export.label sprite_bush_spawn_table_random_sprites +;export.label EnemizerFlags +;export.label EnemizerFlags_randomize_bushes +;export.label EnemizerFlags_close_blind_door +;export.label EnemizerFlags_moldorm_eye_count +;export.label EnemizerFlags_randomize_sprites +;export.label EnemizerFlags_agahnim_fun_balls +;export.label EnemizerFlags_enable_mimic_override +;export.label EnemizerFlags_enable_terrorpin_ai_fix +;export.label room_header_table +;export.label enemizer_info_table +;export.label moved_room_header_bank_value_address +;export.label modified_room_object_table +;export.label DMAKholdstare +;export.label swordgfx +;export.label shieldgfx +;export.label Spawn_Bees +;export.label notItemSprite_Mimic +;export.label sprite_bush_spawn_item_table +;export.label +;export.label +;export.label +;export.label +;export.label +;export.label +;export.label +;export.close diff --git a/assembly/src/externalhooks.asm b/assembly/src/externalhooks.asm new file mode 100644 index 0000000..f86853a --- /dev/null +++ b/assembly/src/externalhooks.asm @@ -0,0 +1,37 @@ +; this isn't hooked up in z3rando yet so we can't use it +org $298000 ; 0x148000 +Ext_OnFileCreate: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnFileLoad: ;x immediately after load +;JSL.l OnFileLoad : RTL +RTL : RTL : RTL : RTL : RTL +Ext_OnFileSave: ;x immediately before save +RTL : RTL : RTL : RTL : RTL +Ext_OnPlayerDeath: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnMapUse: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnFairyRevive: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnYItemUse: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnIemMenuOpen: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnItemMenuClose: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnItemChange: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnPlayerDamaged: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnPlayerAttack: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnBossDeath: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnDungeonEnter: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnDungeonExit: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnDungeonCompleted: ;x +RTL : RTL : RTL : RTL : RTL +Ext_OnZeldaRescued: ;x +RTL : RTL : RTL : RTL : RTL diff --git a/assembly/src/hooks.asm b/assembly/src/hooks.asm new file mode 100644 index 0000000..bebaf26 --- /dev/null +++ b/assembly/src/hooks.asm @@ -0,0 +1,46 @@ +incsrc NMI_hook.asm + +incsrc terrorpin_hooks.asm + +incsrc bushes_hooks.asm + +incsrc bossdrop_hooks.asm + +;;incsrc bolder_hooks.asm ; remove this for now because it needs to be rewritten + +incsrc blinddoor_hooks.asm + +incsrc bosses_hooks.asm + +incsrc moldorm_hooks.asm + +;incsrc sprite_randomizer_hooks.asm + +incsrc kodongo_hooks.asm + +incsrc mimic_hooks.asm + +incsrc soundfx_hooks.asm + +; don't need this unless testing +;;incsrc location_select_hook.asm + +incsrc load_file_hooks.asm + +; needs to be fixed +;;incsrc sprite_damage_hooks.asm + +incsrc damage_hooks.asm + +; leave this out until we make it toggle +;incsrc sword_and_shield_hooks.asm + +incsrc overworld_sprite_hooks.asm + +incsrc bee_hooks.asm + +incsrc vitreous_hooks.asm + +;incsrc agahnim_hooks.asm + +incsrc blindboss_hooks.asm diff --git a/assembly/src/init.asm b/assembly/src/init.asm new file mode 100644 index 0000000..b79669a --- /dev/null +++ b/assembly/src/init.asm @@ -0,0 +1,11 @@ +OnInitFileSelect: +{ + LDA.b #$10 : STA $BC + LDA !RANDOM_SPRITE_FLAG : BEQ .continue + JSL GetRandomInt : AND #$1F : !ADD #$60 : STA $BC +.continue + LDA #$00 : STA !SOUNDFX_LOADED + + JSL $00893D;Restore the previous code + RTL +} diff --git a/assembly/src/kodongo_fixes.asm b/assembly/src/kodongo_fixes.asm new file mode 100644 index 0000000..5f8fd48 --- /dev/null +++ b/assembly/src/kodongo_fixes.asm @@ -0,0 +1,9 @@ +newKodongoCollision: +{ + LDA $0DE0, X : INC A : AND.b #$03 : STA $0DE0, X + ;If they collide more than 32time then kill them ! + LDA $0DA0, X : INC A : STA $0DA0, X : CMP #$20 : BCC .continue + STZ $0DD0, X +.continue +RTL +} \ No newline at end of file diff --git a/assembly/src/kodongo_hooks.asm b/assembly/src/kodongo_hooks.asm new file mode 100644 index 0000000..8888027 --- /dev/null +++ b/assembly/src/kodongo_hooks.asm @@ -0,0 +1,3 @@ +org $1EC147 +JSL newKodongoCollision +NOP #$05 diff --git a/assembly/src/load_file.asm b/assembly/src/load_file.asm new file mode 100644 index 0000000..479b533 --- /dev/null +++ b/assembly/src/load_file.asm @@ -0,0 +1,5 @@ +LoadFile: + JSL LoadNewSoundFx + + LDA.b #$00 : STA $7EC011 ; restore what we overwrote +RTL \ No newline at end of file diff --git a/assembly/src/load_file_hooks.asm b/assembly/src/load_file_hooks.asm new file mode 100644 index 0000000..c969b1b --- /dev/null +++ b/assembly/src/load_file_hooks.asm @@ -0,0 +1,5 @@ +org $028118 ; Bank02.asm(342) : LDA.b #$00 : STA $7EC011 +Module_LoadFile_indoors: +;aka Module_LoadGame.indoors + ; LDA.b #$00 : STA $7EC011 + JSL.l LoadFile : NOP : NOP diff --git a/assembly/src/location_menu.asm b/assembly/src/location_menu.asm new file mode 100644 index 0000000..406f969 --- /dev/null +++ b/assembly/src/location_menu.asm @@ -0,0 +1,5 @@ +LocationMenuHook: + ; JSL LoadNewSoundFx + + JSL Messaging_Text ; restore what we overwrote +RTL \ No newline at end of file diff --git a/assembly/src/location_select_hook.asm b/assembly/src/location_select_hook.asm new file mode 100644 index 0000000..fcbf6c9 --- /dev/null +++ b/assembly/src/location_select_hook.asm @@ -0,0 +1,6 @@ +org $0EEE10 +Messaging_Text: + +org $28484 ; Bank02.asm(946) : Module_LocationMenu +Module_LocationMenu: + JSL LocationMenuHook \ No newline at end of file diff --git a/assembly/src/main.asm b/assembly/src/main.asm new file mode 100644 index 0000000..b8d6ea0 --- /dev/null +++ b/assembly/src/main.asm @@ -0,0 +1,88 @@ +lorom + +;================================================================================ + +!ADD = "CLC : ADC" +!SUB = "SEC : SBC" +!BLT = "BCC" +!BGE = "BCS" + +; org $00FFD7 ; Set rom on 2mb +; db #$0C + +; org $3FFFFF ; write at the last position to expand on 2mb +; db #$00 + +;=Constants====================================================================== + +!BUSHES_FLAG = "$368100" +!BLIND_DOOR_FLAG = "$368101" +!MOLDORM_EYES_FLAG = "$368102" +!RANDOM_SPRITE_FLAG = "$368103" +!AGAHNIM_FUN_BALLS = "$368104" +!ENABLE_MIMIC_OVERRIDE = "$368105" +!ENABLE_TERRORPIN_AI_FIX = "$368106" + +; Enemizer reserved memory +; $7F50B0 - $7F50BF - Downstream Reserved (Enemizer) +!SHELL_DMA_FLAG = "$7F50B0" +!SOUNDFX_LOADED = "$7F50B1" +;================================================================================ + +incsrc hooks.asm +incsrc DMA.asm +;incsrc testing.asm ; make sure to comment this out for release!!! +incsrc externalhooks.asm ; this is from z3randomizer source. be sure to check for updates + +;================================================================================ +org $368000 +EnemizerTablesStart: +incsrc enemizer_info_table.asm +incsrc enemizerflags.asm +incsrc bushes_table.asm +incsrc room_header_table.asm + +; code +EnemizerCodeStart: +incsrc bushes.asm +incsrc NMI.asm +incsrc init.asm +incsrc terrorpin.asm +incsrc special_action.asm +incsrc bosses_moved.asm +;incsrc sprite_damage.asm +incsrc damage.asm +incsrc bossdrop.asm +incsrc moldorm.asm +;incsrc sprite_randomizer.asm +incsrc kodongo_fixes.asm +incsrc mimic_fixes.asm +;incsrc location_menu.asm +incsrc load_file.asm +incsrc soundfx_changes.asm +incsrc sword_and_shield.asm +incsrc overworld_sprites.asm +incsrc bees.asm +incsrc vitreous_fixes.asm +;incsrc agahnim.asm +incsrc blindboss.asm + +; data +incsrc room_object_table.asm +incsrc shell_gfx.asm +warnpc $36FFFF ;if we hit this we need to split stuff by bank +;================================================================================ + +incsrc export_symbols.asm + +org $0DBA71 +GetRandomInt: + +org $0DBB67 +Sound_SetSfxPanWithPlayerCoords: + +org $0DBB8A +Sound_SetSfx3PanLong: + +org $1EC6FA ;F46FA +SpritePrep_Eyegore: \ No newline at end of file diff --git a/assembly/src/main.rs b/assembly/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/assembly/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/assembly/src/mimic_fixes.asm b/assembly/src/mimic_fixes.asm new file mode 100644 index 0000000..91c081e --- /dev/null +++ b/assembly/src/mimic_fixes.asm @@ -0,0 +1,68 @@ +; replace SpritePrep_Eyegore if flag is on +SpritePrep_EyegoreNew: +{ + LDA !ENABLE_MIMIC_OVERRIDE : BNE .new + ; old + JSL SpritePrep_Eyegore + RTL + + .new + LDA $0E20, X : CMP.b #$B8 : BEQ .mimic ;If sprite id == debugger sprite + JSL $1EC71A ; 0xF471A set eyegore to be only eyegore (.not_goriya?) + RTL + .mimic + LDA #$83 : STA $0E20, X : JSL $0DB818 ; 0x6B818 Sprite_LoadProperties of green eyegore + LDA #$B8 : STA $0E20, X ; set the sprite back to mimic + LDA $0CAA, X : AND #$FB : ORA #$80 : STA $0CAA, X ; STZ $0CAA, X + ;INC $0DA0, X + JSL $1EC70D ;0xF470D set eyegore to be mimic (.is_goriya?) +RTL +} + +resetSprite_Mimic: +{ + LDA !ENABLE_MIMIC_OVERRIDE : BEQ .notMimic ; skip to what it would have done normally + + LDA $0E20, X + CMP.b #$B8 : BNE .notMimic + LDA #$83 : STA $0E20, X ; overwrite the sprite id with green eyegore id + +.notMimic + ; restore code + LDA $0E20, X + + CMP.b #$7A + +RTL +} + +notItemSprite_Mimic: +{ ; don't change this unless you go update SetKillableThief in c# side since it assumes +4 bytes to update the value on the CMP from B8 to C4 + ; if we set killable thief we want to update the sprite id so it can be killed + LDA $0E20, X + CMP.b #$B8 : BEQ .changeSpriteId ; thief #$C4 + + ; if we don't have mimic code turned on we want to skip, but we also need to reload the sprite id because we just smoked it with this LDA + LDA !ENABLE_MIMIC_OVERRIDE : BEQ .reloadSpriteIdAndSkipMimic ; skip to what it would have done normally + + LDA $0E20, X ; I hate assembly + CMP.b #$B8 : BNE .continue ; "mimic" (dialogue test sprite we hijacked). skip to vanilla behavior if it's not a "mimic" + +.changeSpriteId + LDA #$83 ; load green eyegore sprite id so we can kill the thing + JMP .continue + +.reloadSpriteIdAndSkipMimic + LDA $0E20, X + +.continue + + ; restore code + REP #$20 : ASL #2 + ;REP #$20 : ASL #4 : ORA $0CF2 : PHX : REP #$10 : TAX + ;SEP #$20 + ;LDA $7F6000, X : STA $02 + ;SEP #$10 + +RTL +} \ No newline at end of file diff --git a/assembly/src/mimic_hooks.asm b/assembly/src/mimic_hooks.asm new file mode 100644 index 0000000..7ecd89e --- /dev/null +++ b/assembly/src/mimic_hooks.asm @@ -0,0 +1,39 @@ +;Hooks +; sprite_prep.asm (2466) -> SpritePrep_EyegoreTrampoline: +org $0691B6 ; 0311B6 1E:C6FA? ; SpriteActive3_Transfer? + JSL SpritePrep_EyegoreNew ;set eyegore to be only eyegore + + +; sprite_prep.asm (203) -> dw SpritePrep_DoNothing ; 0xB8 - Dialogue Testing Sprite +org $0687CB ; 0307CB replace debugged sprite create by eyegore + dw #$91B6 ; SpritePrep_Eyegore jump table + + +; Bank1E.asm (140) -> dw Sprite_DialogueTester ; 0xB8 - debug artifact, dialogue tester +org $1E8BB1 + dw #$C795 ;Sprite_Eyegore jump table + +; table starts at 6B8F1 +org $0DB9A9 +db $00 ; sprite B8 needs a damage type + +org $06EC08 ; Bank06.asm (4593) - damage calcs +{ + JSL resetSprite_Mimic + NOP +} + +org $06EDA6 ; Bank06.asm (4876) - .notItemSprite +{ + ; original + ; REP #$20 : ASL #4 : ORA $0CF2 : PHX : REP #$10 : TAX ;C2 20 : 0A 0A 0A 0A : 0D F2 0C : DA : C2 10 : AA + ; SEP #$20 ;E2 20 + ; LDA $7F6000, X : STA $02 ;BF 00 60 7F : 85 02 + ; SEP #$10 + + JSL notItemSprite_Mimic ; C2 20 : 0A 0A + ;NOP : NOP : NOP : NOP : NOP : NOP : NOP : NOP : NOP ; 0A 0A : 0D F2 0C : DA : C2 10 : AA + ;NOP : NOP ; E2 20 + ;NOP : NOP : NOP : NOP : NOP : NOP ; BF 00 60 7F : 85 02 + ;NOP ; +} diff --git a/assembly/src/moldorm.asm b/assembly/src/moldorm.asm new file mode 100644 index 0000000..125cf4b --- /dev/null +++ b/assembly/src/moldorm.asm @@ -0,0 +1,14 @@ +Moldorm_UpdateOamPosition: +{ + PHX + + LDA !MOLDORM_EYES_FLAG : TAX + .more_eyes + LDA $90 : CLC : ADC.w #$0004 : STA $90 + LDA $92 : CLC : ADC.w #$0001 : STA $92 + DEX : BPL .more_eyes ; X >= 0 + + PLX + + RTL +} diff --git a/assembly/src/moldorm_hooks.asm b/assembly/src/moldorm_hooks.asm new file mode 100644 index 0000000..a443913 --- /dev/null +++ b/assembly/src/moldorm_hooks.asm @@ -0,0 +1,20 @@ +; adjust oam position after drawing eyes +;ED88E +org $1DD88E +{ + ; original: GiantMoldorm_Draw+5lines (sprite_giant_moldorm.asm) + ; lda $90 : add.w #$0008 : sta $90 + ; INC $92 : INC $92 + + JSL Moldorm_UpdateOamPosition + NOP #08 +} + +; set number of eyes +org $1DDBB2 ;$0EDBB2 +{ + ; LDX.b #$01 + ; number of eyes (-1) + ;0EDBB2 0EDBB3 + LDX.b #$07 +} diff --git a/assembly/src/msu1.asm b/assembly/src/msu1.asm new file mode 100644 index 0000000..d36dfc7 --- /dev/null +++ b/assembly/src/msu1.asm @@ -0,0 +1,124 @@ +;======================================= +; +; MSU-1 Enhanced Audio Patch +; ZeLDA no Densetsu - Kamigami no Triforce +; Modified for VT Randomizer +; +; Author: qwertymodo +; +; Modified for use with Enemizer +;======================================= + +track_list: + DB $00,$01,$03,$03,$03,$03,$03,$03 + DB $01,$03,$01,$03,$03,$03,$03,$03 + DB $03,$03,$03,$01,$03,$03,$03,$03 + DB $03,$03,$03,$03,$03,$01,$03,$03 + DB $03,$01,$01 + +msu_main: + LDA $4210 + LDA !REG_MSU_ID_01 + CMP !VAL_MSU_ID_01 + BEQ .continue +.nomsu + SEP #$30 + JML spc_continue +.continue + LDA !REG_MSU_ID_23 + CMP !VAL_MSU_ID_23 + BNE .nomsu + LDA !REG_MSU_ID_45 + CMP !VAL_MSU_ID_45 + BNE .nomsu + SEP #$30 + LDX !REG_MUSIC_CONTROL + BNE command_ff + +do_fade: + LDA !REG_CURRENT_VOLUME + CMP !REG_TARGET_VOLUME + BNE .continue + JML spc_continue +.continue + BCC .increment +.decrement + SBC !VAL_VOLUME_DECREMENT + BCS .set +.mute + STZ !REG_CURRENT_VOLUME + STZ !REG_MSU_CONTROL + STZ !REG_CURRENT_MSU_TRACK + BRA .set +.increment + ADC !VAL_VOLUME_INCREMENT + BCC .set + LDA !VAL_VOLUME_FULL +.set + STA !REG_CURRENT_VOLUME + STA !REG_MSU_VOLUME + JML spc_continue + +command_ff: + CPX !VAL_COMMAND_LOAD_NEW_BANK + BNE command_f3 + JML spc_continue + +command_f3: + CPX !VAL_COMMAND_FULL_VOLUME + BNE command_f2 + STX !REG_SPC_CONTROL + LDA !VAL_VOLUME_FULL + STA !REG_TARGET_VOLUME + JML spc_continue + +command_f2: + CPX !VAL_COMMAND_FADE_HALF + BNE command_f1 + STX !REG_SPC_CONTROL + LDA !VAL_VOLUME_HALF + STA !REG_TARGET_VOLUME + JML spc_continue + +command_f1: + CPX !VAL_COMMAND_FADE_OUT + BNE load_track + STX !REG_SPC_CONTROL + STZ !REG_TARGET_VOLUME + JML spc_continue + +load_track: + CPX !REG_CURRENT_MSU_TRACK + BNE .continue + CPX #$1B + BEQ .continue + JML spc_continue +.continue + STX !REG_MSU_TRACK_LO + STZ !REG_MSU_TRACK_HI + STZ !REG_MSU_CONTROL + LDA !VAL_VOLUME_FULL + STA !REG_TARGET_VOLUME + STA !REG_CURRENT_VOLUME + STA !REG_MSU_VOLUME + +msu_check_busy: + LDA !REG_MSU_STATUS + BIT !FLAG_MSU_STATUS_AUDIO_BUSY + BNE msu_check_busy + BIT !FLAG_MSU_STATUS_TRACK_MISSING + BEQ msu_play + +spc_fallback: + STZ !REG_MSU_CONTROL + STZ !REG_CURRENT_MSU_TRACK + STZ !REG_TARGET_VOLUME + STZ !REG_CURRENT_VOLUME + STZ !REG_MSU_VOLUME + JML spc_continue + +msu_play: + LDA track_list,x + STA !REG_MSU_CONTROL + STX !REG_CURRENT_MSU_TRACK + JML spc_continue diff --git a/assembly/src/msu1_hooks.asm b/assembly/src/msu1_hooks.asm new file mode 100644 index 0000000..acf7e27 --- /dev/null +++ b/assembly/src/msu1_hooks.asm @@ -0,0 +1,80 @@ +;======================================= +; +; MSU-1 Enhanced Audio Patch +; ZeLDA no Densetsu - Kamigami no Triforce +; Modified for VT Randomizer +; +; Author: qwertymodo +; +; Modified for use with Enemizer +;======================================= + +!REG_MSU_STATUS = $2000 + +!REG_MSU_ID_0 = $2002 +!REG_MSU_ID_1 = $2003 +!REG_MSU_ID_2 = $2004 +!REG_MSU_ID_3 = $2005 +!REG_MSU_ID_4 = $2006 +!REG_MSU_ID_5 = $2007 + +!REG_MSU_ID_01 = $2002 +!REG_MSU_ID_23 = $2004 +!REG_MSU_ID_45 = $2006 + + +!VAL_MSU_ID_0 = #$53 ; 'S' +!VAL_MSU_ID_1 = #$2D ; '-' +!VAL_MSU_ID_2 = #$4D ; 'M' +!VAL_MSU_ID_3 = #$53 ; 'S' +!VAL_MSU_ID_4 = #$55 ; 'U' +!VAL_MSU_ID_5 = #$31 ; '1' + +!VAL_MSU_ID_01 = #$2D53 ; 'S-' +!VAL_MSU_ID_23 = #$534D ; 'MS' +!VAL_MSU_ID_45 = #$3155 ; 'U1' + + +!REG_MSU_TRACK = $2004 +!REG_MSU_TRACK_LO = $2004 +!REG_MSU_TRACK_HI = $2005 +!REG_MSU_VOLUME = $2006 +!REG_MSU_CONTROL = $2007 + + +!FLAG_MSU_PLAY = #$01 +!FLAG_MSU_REPEAT = #$02 +!FLAG_MSU_STATUS_TRACK_MISSING = #$08 +!FLAG_MSU_STATUS_AUDIO_PLAYING = #$10 +!FLAG_MSU_STATUS_AUDIO_REPEATING = #$20 +!FLAG_MSU_STATUS_AUDIO_BUSY = #$40 +!FLAG_MSU_STATUS_DATA_BUSY = #$80 + + +!REG_CURRENT_VOLUME = $0127 +!REG_TARGET_VOLUME = $0129 +!REG_CURRENT_MSU_TRACK = $012B +!REG_MUSIC_CONTROL = $012C +!REG_CURRENT_TRACK = $0130 +!REG_CURRENT_COMMAND = $0133 + +!REG_SPC_CONTROL = $2140 +!REG_NMI_FLAGS = $4210 + + +!VAL_COMMAND_FADE_OUT = #$F1 +!VAL_COMMAND_FADE_HALF = #$F2 +!VAL_COMMAND_FULL_VOLUME = #$F3 +!VAL_COMMAND_LOAD_NEW_BANK = #$FF + +!VAL_VOLUME_INCREMENT = #$10 +!VAL_VOLUME_DECREMENT = #$02 +!VAL_VOLUME_HALF = #$80 +!VAL_VOLUME_FULL = #$FF + + +ORG $0080D7 +spc_nmi: + JML msu_main + NOP +spc_continue: diff --git a/assembly/src/new sprite template.asm b/assembly/src/new sprite template.asm new file mode 100644 index 0000000..e7d6337 --- /dev/null +++ b/assembly/src/new sprite template.asm @@ -0,0 +1,359 @@ +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprites Variables, X is the sprite ID - All informations come from the Zelda_3_Ram.log file +;---------------------------------------------------------------------------------------------------------------------------------- +;$0B58, X ; Timers for stunned enemies. Counts down from 0xFF. + +;$0B6B, X ; Multiples Bits Data [ttttacbp] +;t - 'Tile Interaction Hit Box', a, c, b - 'Dies like a boss', p - Sprite ignores falling into a pit when frozen? + +;$0B89, X ; Object priority stuff for sprites? + +;$0BA0, X ; Seems to indicate that it ignores all projectile interactions if set. + +;$0BB0, X ; For sprites that interact with speical objects, the special object will identify its type to the sprite via this location. + +;$0BE0, X ; [iwbspppp] +;i - If set, disable tile interactions for the sprite, such as falling into holes, moving floors, and conveyor belts +;w - set if in water whether that's deep water or shallow water +;b - If set, the sprite can be blocked by a shield +;s - If set, play the 'enemy taking damage' sound effect. Otherwise, play the basic 'sprite getting hit' sound effect +;p - Prize pack to grant + +;$0C9A, X ; Room or Area number that the sprite has been loaded to. (If in a dungeon, only contains the lower byte) + +;$0CAA, X ; Multiples Bits Data [abcdefgh] +;a - If set... creates some condition where it may or may not die +;b - Same as bit 'a' in some contexts (Zora in particular) +;c - While this is set and unset in a lot of places for various sprites, its +; status doesn't appear to ever be queried. Based on the pattern of its +; usage, however, the best deduction I can make is that this was a flag +; intended to signal that a sprite is an interactive object that Link can +; push against, pull on, or otherwise exerts a physical presence. +; In general, it might have indicated some kind of A button (action +; button) affinity for the sprite, but I think this is merely informative +; rather than something relevant to gameplay. +;d - If hit from front, deflect Ice Rod, Somarian missile, +; boomerang, hookshot, and sword beam, and arrows stick in +; it harmlessly. If bit 1 is also set, frontal arrows will +; instead disappear harmlessly. No monsters have bit 4 set +; in the ROM data, but it was functional and interesting +; enough to include. +;e - If set, makes the sprite collide with less tiles than usual +;f - If set, makes sprite impervious to sword and hammer type attacks +;g - ???? Seems to make sprite impervious to arrows, but may have other additional meanings. +;h - disabled??? + +;$0CBA, X ; Sprite drop when he die: +;0x00: nothing happens. / 0x01: leaves a normal key. / 0x03: single green rupee. / anything else: Big Key + +;$0CD2, X ; Bump damage the sprite can inflict on the player. + +;$0CE2, X ; When the sprite is hit, this is written to with the amount of damage to subtract from the sprite's HP. + +;$0CF2, X ; Damage type determiner + +;$0D00, X ; The lower byte of a sprite's Y - coordinate. + +;$0D10, X ; The lower byte of a sprite's X - coordinate. + +;$0D20, X ; The high byte of a sprite's Y - coordinate. + +;$0D30, X ; The high byte of a sprite's X - coordinate. + +;$0D40, X ; Y velocity + +;$0D50, X ; X velocity + +;$0D60, X ; Y "second derivative" to give a path a more rounded shape when needed. + +;$0D70, X ; X "second derivative" to give a path a more rounded shape when needed. + +;$0D80, X ; Controls whether the sprite has been spawned yet. 0 - no. Not 0 - yes. Also used as an AI pointer + +;$0D90, X ; In some creatures, used as an index for determining $0DC0 *Unused by sprite Test can be used for anything* + +;$0DA0, X ; usage varies considerably for each sprite type **USED by the sprite Test to intialize the sprite** + +;$0DB0, X ; Various usages *Unused by sprite Test can be used for anything* + +;$0DC0, X ; Designate which graphic to use. + +;$0DD0, X ; Sprite State: +;0x00 - Sprite is dead, totally inactive +;0x01 - Sprite falling into a pit with generic animation. +;0x02 - Sprite transforms into a puff of smoke, often producing an item +;0x03 - Sprite falling into deep water (optionally making a fish jump up?) +;0x04 - Death Mode for Bosses (lots of explosions). +;0x05 - Sprite falling into a pit that has a special animation (e.g. Soldier) +;0x06 - Death Mode for normal creatures. +;0x08 - Sprite is being spawned at load time. An initialization routine will +; be run for one frame, and then move on to the active state (0x09) the very next frame. +;0x09 - Sprite is in the normal, active mode. +;0x0A - Sprite is being carried by the player. +;0x0B - Sprite is frozen and / or stunned. + +;$0DE0, X ; Sprite Directions *Unused by sprite Test can be used for anything* + +;$0DF0, X ; Main delay timer [decreased every frames from sprites routine until it reach 0] + +;$0E00, X ; Main Delay Timer 1 [decreased every frames from sprites routine until it reach 0] + +;$0E10, X ; Main Delay Timer 2 [decreased every frames from sprites routine until it reach 0] + +;$0E20, X ; ID of the sprite that control which sprite type the sprite is + +;$0E30, X ; Subtype designation 1? + +;$0E40, X ; Bits 0-4: If zero, the sprite is invisible. Otherwise, visible. + +;$0E50, X ; Health of the sprite + +;$0E60, X ; [niospppu] +;n - If set, don't draw extra death animation sprites over the sprite as it is expiring. +;i - if set, sprite is impervious to all attacks (also collisions?) +;o - If set, adjust coordinates of sprites spawned off of this one, such as water splashes. In general this would roughly approximate the +; concept of 'width' of the sprite, and for this reason usually absorbable items like arrows, rupees, and heart refills utilize this. +;s - If set, draw a shadow for the sprite when doing OAM handling +;p - (Note: 3-bit) Palette into that actually is not used by this variable, but ends up getting copied to the array $0F50 (bitwise and with 0x0F). +;u - unused? + +;$0E70, X ; Bit set When a sprite is moving and has hit a wall: ----udlr + +;$0E80, X ; Subtype Designation 2? + +;$0E90, X ; When a Pikit grabs something from you it gets stored here. *Unused by sprite Test can be used for anything* + +;$0EA0, X ; When sprite is taking damage. palette cycling index 0x80 - Signal that the recoil process has finished and will terminate + +;$0EB0, X ; For sprites that have a head set the direction of the head *Unused by sprite Test can be used for anything* + +;$0EC0, X ; Animation Clock? *Unused by sprite Test can be used for anything* + +;$0ED0, X ; ??? *Unused by sprite Test can be used for anything* + +;$0EE0, X ; Auxiliary Delay Timer 3 [decreased every frames from sprites routine until it reach 0] + +;$0EF0, X ; Death Timer [abbbbbbb] +;a - start death timer? +;b - death timer? + +;$0F00, X ; Pause button for sprites apparently. If nonzero they don't do anything. + +;$0F10, X ; Auxiliary Delay Timer 4 [decreased every frames from sprites routine until it reach 0] + +;$0F20, X ; Floor the sprite stand on + +;$0F30, X ; Recoiling Y Velocity when sprite being hit + +;$0F40, X ; Recoiling X Velocity when sprite being hit + +;$0F50, X ; OAM Related - [vhoopppN] +;v - vflip +;h - hflip +;o - priority +;p - palette +;N - name table + +;$0F60, X ; [isphhhhh] +;i - Ignore collision settings and always check tile interaction on the same layer that the sprite is on. +;s - 'Statis'. If set, indicates that the sprite should not be considered as "alive" in routines that try +; to check that property. Functionally, the sprites might not actually be considered to be in statis though. +; Example: Bubbles (aka Fire Faeries) are not considered alive for the purposes of puzzles, because it's +; not expected that you always have the resources to kill them. Thus, they always have this bit set. +;p - 'Persist' If set, keeps the sprite from being deactivated from being too far offscreen from the camera. +; The sprite will continue to move and interact with the game map and other sprites that are also active. +;h - 5-bit value selecting the sprite's hit box dimensions and perhaps other related parameters. + +;$0F70, X ; Height value (how far the enemy is from its shadow) + +;$0F80, X ; Height Velocity for jump/fall if sprite_move_z is used else can be used for anything + +;$0F90, X ; Subpixel portion of altitude. + +;$0FC7, X ; Affects something to do with prizes...? + +;================================================================================================================================== +;Sprite_Main +;---------------------------------------------------------------------------------------------------------------------------------- +;The core of the sprite that is executing all the subfunctions OnCreate, OnInit, OnUpdate, OnDeath, OnTimer1-3, OnDamage, Draw +;================================================================================================================================== +Sprite_Test_Main: +{ + ;Call Create once + LDA $0DA0, X : BNE .already_created + INC : STA $0DA0, X ; set 0DA0 to 1 to prevent coming back here + JSR Sprite_Test_OnCreate ; Call OnCreate + .already_created + + JSR Sprite_Test_Draw ; Call Draw every frames + JSL Sprite_CheckIfActive ; Prevent the sprite from moving when we are in menu/transitioning + + LDA $0DA0, X : CMP #$01 : BNE .already_init + INC : STA $0DA0, X ; set 0DA0 to 2 to prevent coming back here + JSR Sprite_Test_OnInit ; Call OnInit + .already_init + .not_defeated_yet + + ;Call Update every frames + JSR Sprite_Test_OnUpdate + + ;Timer 1 + LDA $0E00, X : BNE .timer1_not_over + JSR Sprite_Test_OnTimer1 + .timer1_not_over + + ;Timer 2 + LDA $0E10, X : BNE .timer2_not_over + JSR Sprite_Test_OnTimer2 + .timer2_not_over + + ;Timer 3 + LDA $0EE0, X : BNE .timer3_not_over + JSR Sprite_Test_OnTimer3 + .timer3_not_over + + ;Timer 4 + LDA $0DF0, X : BNE .timer4_not_over + JSR Sprite_Test_OnTimer4 + .timer4_not_over + + ;Timer 5 (special timer?) + LDA $0F10, X : BNE .timer5_not_over + JSR Sprite_Test_OnTimer5 + .timer5_not_over + + + ;If the sprite has received damage + LDA $0CE2, X : BEQ .not_damaged + JSR Sprite_Test_OnDamageFromPlayer + .not_damaged + + ;Check if the sprite is still active + LDA $0DD0, X : BEQ .not_active + LDA $0E50, X : DEC : BMI .not_dead_yet ;health is lower than 0 so the sprite is dying + JSR Sprite_Test_OnDeath + .not_dead_yet + .not_active + + RTL + +} +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnCreate +;Executed once when the sprite is created +;Executed during screen transitions +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnCreate: +{ + + RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnInit +;Executed once when the sprite is initialized +;Executed when the screen transition is completed +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnInit: +{ + + + RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnUpdate +;Executed once every frames after the intializations +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnUpdate: +{ + +RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnDamageFromPlayer +;Executed once when the sprite receive damage +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnDamageFromPlayer: +{ + +RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnTimer1 +;Executed once when the timer1[$0E00, X] reach 0 +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnTimer1: +{ + + + RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnTimer2 +;Executed once when the timer2[$0E10, X] reach 0 +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnTimer2: +{ + + RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnTimer3 +;Executed once when the timer3[$0EE0, X] reach 0 +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnTimer3: +{ + + RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnTimer4 +;Executed once when the timer3[$0DF0, X] reach 0 +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnTimer4: +{ + + RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnTimer4 +;Executed once when the timer3[$0F10, X] reach 0 +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnTimer5: +{ + + RTS +} + +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_OnDeath +;Executed once when the sprite is about to turn into a death cloud +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_OnDeath: +{ + + RTS +} + +;16x16 Draw Test +;---------------------------------------------------------------------------------------------------------------------------------- +;Sprite_Test_Draw +;Executed every frames to draw the sprite +;---------------------------------------------------------------------------------------------------------------------------------- +Sprite_Test_Draw: +{ + + JSL Sprite_OAM_AllocateDeferToPlayer ; Mostly used for NPC (draw the sprite under link depending on the positions) + LDA #$EA : STA $06 : STZ $07 ; Save tile index in $06, load the gfx part used 00-01 saved in $07 + JSL Sprite_PrepOamCoord ; Set the oam coordinate + JSL Sprite_DrawSingle16 ; Draw one 16x16 sprite $0DC0, X = frame index + + RTS +} diff --git a/assembly/src/on_file_load.asm b/assembly/src/on_file_load.asm new file mode 100644 index 0000000..581220f --- /dev/null +++ b/assembly/src/on_file_load.asm @@ -0,0 +1,4 @@ +OnFileLoad: +{ + RTL +} \ No newline at end of file diff --git a/assembly/src/overworld_sprite_hooks.asm b/assembly/src/overworld_sprite_hooks.asm new file mode 100644 index 0000000..7de8890 --- /dev/null +++ b/assembly/src/overworld_sprite_hooks.asm @@ -0,0 +1,54 @@ +org $9C50B ; 0x4C50B +{ + ; .loadData + ; ; $4C50B- + ; STA $01 ; 85 01 + ; ; $4C50D- + ; LDY.w #$0000 ; A0 00 00 + JSL LoadOverworldSprites + NOP +} + +org $9C510 ; 0x4C510 +LDA [$00], Y ; replace LDA ($00), Y +; CMP.b #$FF : BEQ .stopLoading +; INY #2 +org $9C518 ; 0x4C518 +LDA [$00], Y ; replace LDA ($00), Y +; DEY #2 : CMP.b #$F4 : BNE .notFallingRocks +; INC $0FFD +; INY #3 +; BRA .nextSprite +; .notFallingRocks ; Anything other than falling rocks. +org $9C528 ; 0x4C528 +LDA [$00], Y ; replace LDA ($00), Y +; PHA : LSR #4 : ASL #2 : +org $9C531 ; 0x4C531 +STA $0A ; STA $02 +; INY +org $9C534 ; 0x4C534 +LDA [$00], Y ; replace LDA ($00), Y +; LSR #4 : CLC +org $9C53B ; 0x4C53B +ADC $0A ; ADC $02 +; STA $06 +; PLA : ASL #4 : STA $07 +org $9C546 ; 0x4C546 +LDA [$00], Y ; replace LDA ($00), Y +; AND.b #$0F : ORA $07 : STA $05 +; INY +org $9C54F ; 0x4C54F +LDA [$00], Y ; replace LDA ($00), Y +; LDX $05 : INC A : STA $7FDF80, X + + ; ; $4C558- + ; ; Move on to the next sprite / overlord. + ; INY ; C8 + ; ; $4C559- + ; BRA .nextSprite ; 80 B5 + + ; .stopLoading + ; ; $4C55B- + ; SEP #$10 ; E2 10 + ; ; $4C55D- + ; RTS ; 60 diff --git a/assembly/src/overworld_sprites.asm b/assembly/src/overworld_sprites.asm new file mode 100644 index 0000000..38d4f68 --- /dev/null +++ b/assembly/src/overworld_sprites.asm @@ -0,0 +1,8 @@ +LoadOverworldSprites: + ; restore code + STA $01 ; 85 01 + LDY.w #$0000 ; A0 00 00 + + ; set bank + LDA #$09 : STA $02 ; default is bank 9 +RTL \ No newline at end of file diff --git a/assembly/src/randomize_bushes.bin b/assembly/src/randomize_bushes.bin new file mode 100644 index 0000000000000000000000000000000000000000..ddf740e811acb6b1428528cbe2cb9d7e3bb04485 GIT binary patch literal 2097715 zcmeIuAxi^s9LM1UC+g&!(_)mF%yyYp-+}KymW(sVo!ERM2Mfz*`bUFdpy7XGpfb~? z1CwG<5UqB7zVY)*zo)Lh*SpR8brR?CG94#bf6@u9$x`q1I^A6;%9ngFJ-#{`eYTzN zc9UQ1B}uhEtY&fg{4|RXkE@4w2lv%HhECHB-6jp|%}Q8n7R%Q>TOPMt=S8`ljn3W% zzuglfK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!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K!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72>dO9IFFaLQ6gX!_r(daYpeC49N$uIVjq}m@= vvp9Wzn#G65)x*1k`)VFTr|E`nlZN$XC9E}z<$InjkK3*DqTJ3#XK#ZKt~rj8 literal 0 HcmV?d00001 diff --git a/assembly/src/rocks.gfx b/assembly/src/rocks.gfx new file mode 100644 index 0000000000000000000000000000000000000000..dfb0454c7b1b6a123db4532534681b9a7470f553 GIT binary patch literal 2048 zcmY*adr(wm6hC)&j$2qI{}T@@*7G!sW5R(5rElgbBwsHkPEN|8V|tVvDBN@!eg4SY@H6KTqeBCccLF0Qf*cXz+ecNYx5-`vOdo%@}0zVkch zTmS$$gvgYN(P634DGHq8VCWhsAzqp_fI&M&RkPz#R-Q^)01Mz6OhLICl7~Qz;`ku| za3tGjTdj1L)oP#ZNTxeXKoBN;qxu=N6vl8Y$MRefN9Qa=LMS2%ag$ea51f5OBmv^b z%L_gj17Q$>-welV#vh}c+0Ny6g!YTQm5(aC8qk0lK`lsN-JFXHFi+=$>jTeyrrpNx zi!Y{M*L3qI7sNXI;1P7fU2vftif}fZ9VS;GWDJAeatKy}96bf9#Y_sEivvrY^E&5v zasX`?z-yp|Y*+$WC~p`3Ru{V3+Z!6r*sr$&Mox}8c=S^ZFTl>yk%|o5(*cbbRSRqa z@fi26W`m|!D+{;ul6{wX(zlzcG0D{2&J@ejhDBQAB zOoHUO0geHUA(c_2C{m+Ghba{yGP$Hb9$61T59!(H$WvX)s@X9`WzaTA^LS+4fM>8s zv*3+@6+woqn2_Dzuq&*u?j6??(xG&O5}?CEZQ?auWtc(TAd=k8ls$hj6_kf4PtH{701&jZoo(>K?ZbswH6Wwrt%oCZ2P>5;n~ zYdTh6)_o-t;3$7+RSd+!D9FG(FrbzMsB6+2>(g)S?A8(8BE4SEU>-EVTFinv30LiH zjVGl20P-%ZNacTISF{nsD&!d%>c1^14DaF`9h z`Hh>3OS~n96&Z}}_UCtGPzvRUFL8eoBo45M{eTIPD_L5fbTA;3qLYO0ER?{b^+%m? zB$;5D;oJn3$YO9X(9DSJN8I5r&bO}V-P+5bbu}D-xAC5cr&J;5uS7-2~ zLF-q8mU#(@plK}H@7Z|K6XB_Jm-kh8F^7;@T7@==g?41Uft(MN`ZtTAp35%}^6NpC zDAa<aPc*sFP>5i|w01+}Ry2Ug{N z6RbSiVQD1H*Z?gU|7+wNKCJ<+he37(lnh4LWObOTO+T4FHSIFlO(y&k(B3cz?5EiG zlei>SE!RM7WHd*arQFjjptX)Q@8a9jn%#V#W}o>pGeO-HZs>!Xa39>9hx;~nk}z3# zD0B($*9KYlBa4*hjo|Tm2_d)0DIybbFxCMJLPiYJpt{YH zg`k~-q!C$9^%15&u{$%%W_v1gLJIwxD-ftlL8DzrhFrJZQ~$zOD5W zkH~s^6(a4C4WN=rqX(;#{y%1Pzu8uOLY1d|or#g9P*F10=zjPax}Xi^ft*0jVj}y& za(LoeW0SNMZwp~D?1Xd(?+txCvg^ga=AS;3c~x^Elb%V0CvY3#!WjAFM^+ron{{E! XzUt#+?;U&ySea2U4f4=NJih%0N8j7P literal 0 HcmV?d00001 diff --git a/assembly/src/rocks2.gfx b/assembly/src/rocks2.gfx new file mode 100644 index 0000000000000000000000000000000000000000..9ce92b6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3Pg|``iP7hxL#9>DOEPX#21<&zx_!%v@Dj3XBJ{csv-yZ#!L|i-$R%&t(rq zfpSr-%Ee-JpWkRh^PI`KoXzYV^e-LYSpWQf=A6Ch08adFXgdHM=h-&FC**0NuA}Q- zkrchj7ozsDW1h=N3S5`MLWgd9Q}_?~nB>Oo8SeD!YEM)_`o%9ds9((;e b?s ARAM $3188 +db $74, $07, $88, $31 +incbin what4.brr +db $00, $00, $00, $08 diff --git a/assembly/src/special_action.asm b/assembly/src/special_action.asm new file mode 100644 index 0000000..dcc3004 --- /dev/null +++ b/assembly/src/special_action.asm @@ -0,0 +1,12 @@ +;================================================================================ +; Special action +;================================================================================ +check_special_action: +{ + LDA $7E0CF3 : BEQ .no_special_action + LDA.b #$05 : STA $11 ; $11[0x01] - (Main) Submodule Index (See $B0) + STZ $0CF3 ; $0CF3[0x01] - free ram + .no_special_action + JSL Player_Main +RTL +} \ No newline at end of file diff --git a/assembly/src/sprite_damage.asm b/assembly/src/sprite_damage.asm new file mode 100644 index 0000000..70a33ec --- /dev/null +++ b/assembly/src/sprite_damage.asm @@ -0,0 +1,13 @@ +new_sprites_damage: +{ + LDA $7EF35B : STA $00 ; set armor value in $00 + LDA $0CD2, X : AND.b #$7F ;load damage the sprite is doing + CPY $00 : BEQ .no_mail + .have_mail + LSR : DEY ;decrease A by half + CPY $00 : BNE .have_mail ;while $00 > 0 then loop back and decrease damage by half + .no_mail + TAY + STA $00 : STA $0373 + RTL +} diff --git a/assembly/src/sprite_damage_hooks.asm b/assembly/src/sprite_damage_hooks.asm new file mode 100644 index 0000000..94ce9ed --- /dev/null +++ b/assembly/src/sprite_damage_hooks.asm @@ -0,0 +1,4 @@ +;org $06F3F6 ;change sprites damage to go up to 128 instead of using 8 damage classes +;original code : LDA $0CD2, X : AND.b #$0F : STA $00 : ASL A : ADC $00 : ADD $7EF35B : TAY +JSL new_sprites_damage +;NOP #$12 ; Remove the 12 bytes remainings diff --git a/assembly/src/sprite_randomizer.asm b/assembly/src/sprite_randomizer.asm new file mode 100644 index 0000000..0575b2c --- /dev/null +++ b/assembly/src/sprite_randomizer.asm @@ -0,0 +1,76 @@ +Palette_ArmorAndGloves: +{ + ;DEDF9 + LDA !RANDOM_SPRITE_FLAG : BNE .continue + LDA.b #$10 : STA $BC ; Load Original Sprite Location + REP #$21 + LDA $7EF35B + JSL $1BEDFF;Read Original Palette Code + RTL + .part_two + SEP #$30 + LDA !RANDOM_SPRITE_FLAG : BNE .continue + REP #$30 + LDA $7EF354 + JSL $1BEE21;Read Original Palette Code + RTL + + .continue + + PHX : PHY : PHA + ; Load armor palette + PHB : PHK : PLB + REP #$20 + + ; Check what Link's armor value is. + LDA $7EF35B : AND.w #$00FF : TAX + + ; (DEC06, X) + + LDA $1BEC06, X : AND.w #$00FF : ASL A : ADC.w #$F000 : STA $00 + ;replace D308 by 7000 and search + REP #$10 + + LDA.w #$01E2 ; Target SP-7 (sprite palette 6) + LDX.w #$000E ; Palette has 15 colors + + TXY : TAX + + ;LDA $7EC178 : AND #$00FF : STA $02 + LDA.b $BC : AND #$00FF : STA $02 + +.loop + + LDA [$00] : STA $7EC300, X : STA $7EC500, X + + INC $00 : INC $00 + + INX #2 + + DEY : BPL .loop + + SEP #$30 + + + PLB + INC $15 + PLA : PLY : PLX + RTL +} + +change_sprite: +{ + ;JSL $09C114 ; Restore the dungeon_resetsprites + + LDA !RANDOM_SPRITE_FLAG : BEQ .continue + JSL GetRandomInt : AND #$1F : !ADD #$60 : STA $BC + STA $7EC178 + JSL Palette_ArmorAndGloves + STZ $0710 + + .continue + LDA $0E20, X : CMP.b #$61 ; Restored Code Bank06.asm(5967) ; LDA $0E20, X : CMP.b #$61 : BNE .not_beamos_laser + + RTL +} + diff --git a/assembly/src/sprite_randomizer_hooks.asm b/assembly/src/sprite_randomizer_hooks.asm new file mode 100644 index 0000000..17f76c2 --- /dev/null +++ b/assembly/src/sprite_randomizer_hooks.asm @@ -0,0 +1,20 @@ +org $008A01 +LDA $BC + +org $1BEDF9 +JSL Palette_ArmorAndGloves ;4bytes +RTL ;1byte +NOP #$01 + + +org $1BEE1B +JSL Palette_ArmorAndGloves_part_two +RTL + +org $06F40C +JSL change_sprite : NOP #$01 ;LDA $0E20, X : CMP.b #$61 + +; TODO: move this to main hooks +org $0CCD9D +JSL OnInitFileSelect + diff --git a/assembly/src/sword_and_shield.asm b/assembly/src/sword_and_shield.asm new file mode 100644 index 0000000..66a90cd --- /dev/null +++ b/assembly/src/sword_and_shield.asm @@ -0,0 +1,46 @@ +swordgfx: +;incbin swords.gfx +skip $1000 +shieldgfx: +;incbin shields.gfx +skip $C00 + +CopySword: +{ + PHB : PHK : PLB + PHP ;push processor byte + REP #$30 ; set everything to 16-bit + LDY #$0000 + LDA $7EF359 : AND.w #$00FF : ASL : TAX ;Load Sword Value + LDA.w .sword_positon_gfx, X : TAX + .loop_copy + LDA.l swordgfx, X : PHX : TYX : STA $7E9000, X : PLX + LDA.l swordgfx+$200, X : PHX : TYX : STA $7E9180, X : PLX + INX : INX : INY : INY + CPY #$0180 : BCC .loop_copy + PLP ;pull processor byte + PLB + RTL + .sword_positon_gfx + dw #$0000, #$0000, #$0400, #$0800, #$0C00 ; swords position in gfx file +} + +CopyShield: +{ + PHB : PHK : PLB + PHP ;push processor byte + REP #$30 ; set everything to 16-bit + LDY #$0300 + LDA $7EF35A : AND.w #$00FF : ASL : TAX ;Load Shield value + LDA.w .shield_positon_gfx, X : TAX + .loop_copy + LDA.l shieldgfx, X : PHX : TYX : STA $7E9000, X : PLX + LDA.l shieldgfx+$200, X : PHX : TYX : STA $7E90C0, X : PLX + INX : INX : INY : INY + CPY #$03C0 : BCC .loop_copy + PLP ;pull processor byte + PLB + RTL + .shield_positon_gfx + dw #$0000,#$0000, #$0400, #$0800 +} diff --git a/assembly/src/sword_and_shield_hooks.asm b/assembly/src/sword_and_shield_hooks.asm new file mode 100644 index 0000000..1c4b72e --- /dev/null +++ b/assembly/src/sword_and_shield_hooks.asm @@ -0,0 +1,12 @@ +org $00D348 + PHB : PHK : PLB + JSL CopyShield + PLB + RTL + +org $00D308 + PHB : PHK : PLB + JSL CopySword + PLB + RTL + diff --git a/assembly/src/swords.gfx b/assembly/src/swords.gfx new file mode 100644 index 0000000000000000000000000000000000000000..4844bea791a765107ef0597322a83eddfa964b43 GIT binary patch literal 4096 zcmeHIzi-n(6#i@<$*D>c4^?HUR^nEb$Y@bSGgyfW9Xg?o9gW1$fgxjt&|C!rBO_z} z3txFA)^N?@b1n|9H$7eP(ZmS-R1jU-u-y@zB3@3GdBfG1as2tseQ(3$DqE1hkWQH{r-ICY;fFp zRlwTOqAOZz1%kunv)ZiYa$P(eTii^|bW34*iB0sjyRNGz=rG50cbj_|u2Sj^GRrWu zUl9h(411V*WYHv!mEXhZ*q+!EFT)MLO3{VZqhc)(j;>8-;Op9RplkCa!w4x>6yi%b z!T>{_p3QRn&(E9!Oqjo50&?pFa%Zj5EmHXGd|)4 zF7vI*ay}RDPI4^kn@?Dh;IV&Dt65g=NGQ5TYMB#&)PHc5E^@5&&k~tqIqx_ehu7Yz zcW$?BMNCLYQ+f~vr11vrXL{6@nq-5qti zaxdB4@3}`B3$;Pr%StcdFYS{46Sh*@BgDOtnkMT;_)Zn18bh7UYRzx6TAeXs7&e$x zznN|*e4lUgmRZn$V7f+gq5n;@V#pU@uKxzwm5Pe^meS1&~em^kc1mnU0^gwf@)NfBDh;Prm=T@X literal 0 HcmV?d00001 diff --git a/assembly/src/temp.bin b/assembly/src/temp.bin new file mode 100644 index 0000000000000000000000000000000000000000..459088b076cd16035c0570d1dcef90fa6d542797 GIT binary patch literal 3145728 zcmeIuu?fOZ5C-5Q$g2!kT8dM+l4OZA>615tVBrw%Vx7hbB*_Blo&>`8m&fsQ_eBT+ z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N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V7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ kfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+0D=Ds%rlJ>i~s-t literal 0 HcmV?d00001 diff --git a/assembly/src/terrorpin.asm b/assembly/src/terrorpin.asm new file mode 100644 index 0000000..4f20198 --- /dev/null +++ b/assembly/src/terrorpin.asm @@ -0,0 +1,19 @@ +;================================================================================ +; Terrorpin AI Fixes +;================================================================================ +FixTerrorpin: +{ + PHA ;save A so that checking the option doesn't smoke A + LDA !ENABLE_TERRORPIN_AI_FIX : BNE .new ; check if option is on + PLA ;restore A + ; do the old code that smokes A + AND.b #$03 : STA $0DE0, X + RTL + + .new + PLA ; Restore A + PHA ; save A so the orignal code doesn't kill it + AND.b #$03 : STA $0DE0, X ; restore what we overwrote + PLA ; restore A so the AND/BNE in the original code actually does something + RTL +} diff --git a/assembly/src/terrorpin_hooks.asm b/assembly/src/terrorpin_hooks.asm new file mode 100644 index 0000000..85954f4 --- /dev/null +++ b/assembly/src/terrorpin_hooks.asm @@ -0,0 +1,7 @@ +;================================================================================ +; Terrorpin AI fix +;-------------------------------------------------------------------------------- +org $1EB2B1 ; sprite_terrorpin.asm(57) : AND.b #$03 : STA $0DE0, X ; 5 bytes +JSL FixTerrorpin ; 4 bytes +NOP ; 1 byte +;-------------------------------------------------------------------------------- diff --git a/assembly/src/test.bin b/assembly/src/test.bin new file mode 100644 index 0000000000000000000000000000000000000000..d3389837fe4d3e71a4621a088822d964bf0bc7ab GIT binary patch literal 1196032 zcmeI*3z%F*ohb0?dG#cj$xK2Z6B5WwcqGy9YIq1i0tp6{brD>H7njEpg*910k`+G_ z7f1$>hr2|h_$jU+sOux565I!@5@>-dW=b55ta>YO^K{=ceI-NScUQ?d{sK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkL{_bPDU@Ac{~PJjRb0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0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kC((%PzWi_Pw(ooVBrUQ*YzC zjr6N?ufE{w3$9%>``*8P@3xNZ?TzwAy1Cj>?XI>xb;H6&$;h;&`u1JBpPIV!fQ>hv z_4CeOt-oJ&d3EDagOjT5+uN62wd|^qwIdhH?&_V@vDH;8?whl{XP{{Nu%oI&)gM={ zt ARAM $3188 +db $74, $07, $88, $31 +incbin what4.brr +db $00, $00, $00, $08 + + + +; turn off the music (vol = 0) +org $1AB73B +db $00 +org $1AB75B +db $00 +org $1B90F8 +db $00 +org $1BA710 +db $00 +org $1BA7A4 +db $00 +org $1BA7BB +db $00 +org $1BA7D2 +db $00 +org $1AD954 +db $00 +org $1AE53B +db $00 +org $1BA736 +db $00 +org $1BA752 +db $00 +org $1BA772 +db $00 +org $1BA792 +db $00 +org $1ADB47 +db $00 +org $1ADB5E +db $00 +org $1AC306 +db $00 +org $1AE878 +db $00 +org $1AE883 +db $00 +org $1AEE48 +db $00 +org $1AEE76 +db $00 +org $1AEEFB +db $00 +org $1AEF2D +db $00 +org $1BA211 +db $00 +org $1BA35B +db $00 +org $1BA37B +db $00 +org $1BA38E +db $00 +org $1BA39F +db $00 +org $1BA5C3 +db $00 +org $1BA691 +db $00 +org $1BA6A8 +db $00 +org $1BA6DF +db $00 +org $1AA349 +db $00 +org $1ABF45 +db $00 +org $1AC2EB +db $00 +org $1AC8B9 +db $00 +org $1AC8FF +db $00 +org $1AD43F +db $00 +org $1AD817 +db $00 +org $1AD957 +db $00 +org $1ADACB +db $00 +org $1ADAE8 +db $00 +org $1ADB4A +db $00 +org $1BA5DE +db $00 +org $1BA608 +db $00 +org $1BA635 +db $00 +org $1BA662 +db $00 +org $1BA71F +db $00 +org $1BA7AF +db $00 +org $1BA7C6 +db $00 +org $1BA7DD +db $00 +org $1AAF00 +db $00 +org $1BA3D5 +db $00 +org $1AA49C +db $00 +org $1AA4CD +db $00 +org $1AAC09 +db $00 +org $1AAC53 +db $00 +org $1AACAF +db $00 +org $1AACEB +db $00 +org $1AAD91 +db $00 +org $1AAEE6 +db $00 +org $1AB8ED +db $00 +org $1ABC91 +db $00 +org $1ABCD3 +db $00 +org $1ABCE8 +db $00 +org $1ABF0C +db $00 +org $1ABF82 +db $00 +org $1AC05F +db $00 +org $1AC139 +db $00 +org $1AC198 +db $00 +org $1AC1D5 +db $00 +org $1AC1F6 +db $00 +org $1AC22B +db $00 +org $1AC270 +db $00 +org $1AC2B1 +db $00 +org $1AC334 +db $00 +org $1AC371 +db $00 +org $1AC3A6 +db $00 +org $1AC3DB +db $00 +org $1AC41E +db $00 +org $1AC597 +db $00 +org $1ACB3C +db $00 +org $1ACBAB +db $00 +org $1ACC03 +db $00 +org $1ACC53 +db $00 +org $1ACC7F +db $00 +org $1ACD9C +db $00 +org $1AD424 +db $00 +org $1AE5D2 +db $00 +org $1AE64F +db $00 +org $1AE698 +db $00 +org $1AE6FF +db $00 +org $1AE985 +db $00 +org $1AEC5C +db $00 +org $1AEC6F +db $00 +org $1AEC8E +db $00 +org $1AECB4 +db $00 +org $1AED7D +db $00 +org $1B827D +db $00 +org $1B960C +db $00 +org $1B9828 +db $00 +org $1BA233 +db $00 +org $1BA3A2 +db $00 +org $1BA49E +db $00 +org $1BA72B +db $00 +org $1BA745 +db $00 +org $1BA765 +db $00 +org $1BA785 +db $00 +org $1BABF6 +db $00 +org $1BAC0D +db $00 +org $1BAEBE +db $00 +org $1BAFAC +db $00 +org $1B9A02 +db $00 +org $1B9BD6 +db $00 +org $1AA1CD +db $00 +org $1AA279 +db $00 +org $1AAE66 +db $00 +org $1AAE70 +db $00 +org $1AAEAB +db $00 +org $1ABB97 +db $00 +org $1ABBAC +db $00 +org $1ABBE8 +db $00 +org $1ABC0D +db $00 +org $1ABC39 +db $00 +org $1ABC68 +db $00 +org $1ABC9F +db $00 +org $1ABCBC +db $00 +org $1AC01E +db $00 +org $1AC290 +db $00 +org $1AC43E +db $00 +org $1AC56F +db $00 +org $1AC7D3 +db $00 +org $1ACD43 +db $00 +org $1ACDCC +db $00 +org $1ACEBA +db $00 +org $1ACF0B +db $00 +org $1ACFE5 +db $00 +org $1AD012 +db $00 +org $1AD4BC +db $00 +org $1AD4D5 +db $00 +org $1AD4F0 +db $00 +org $1AD509 +db $00 +org $1AD7D8 +db $00 +org $1AD9B9 +db $00 +org $1ADA2F +db $00 +org $1ADAEB +db $00 +org $1ADE5E +db $00 +org $1ADFE9 +db $00 +org $1AE58F +db $00 +org $1AE74A +db $00 +org $1AE827 +db $00 +org $1AE9D6 +db $00 +org $1AE9F5 +db $00 +org $1AEA05 +db $00 +org $1AEAE9 +db $00 +org $1AEDCF +db $00 +org $1AEE20 +db $00 +org $1AEECB +db $00 +org $1AF1D4 +db $00 +org $1AF1E6 +db $00 +org $1AF203 +db $00 +org $1AF21E +db $00 +org $1B8724 +db $00 +org $1B8732 +db $00 +org $1B9652 +db $00 +org $1B9698 +db $00 +org $1B9CBC +db $00 +org $1B9DC0 +db $00 +org $1B9E49 +db $00 +org $1BAA68 +db $00 +org $1BAA77 +db $00 +org $1BAA88 +db $00 +org $1BAA99 +db $00 +org $1BAF04 +db $00 +org $1A9D28 +db $00 +org $1A9D41 +db $00 +org $1A9D5C +db $00 +org $1A9D77 +db $00 +org $1A9EEE +db $00 +org $1AB11D +db $00 +org $1AB1D1 +db $00 +org $1AC148 +db $00 +org $1AD543 +db $00 +org $1ADB6F +db $00 +org $1AE5B3 +db $00 +org $1AE760 +db $00 +org $1AEB6B +db $00 +org $1AEDF6 +db $00 +org $1AEE0D +db $00 +org $1AF3A1 +db $00 +org $1B814C +db $00 +org $1B825D +db $00 +org $1B82BE +db $00 +org $1B8340 +db $00 +org $1B8394 +db $00 +org $1B842C +db $00 +org $1B8796 +db $00 +org $1B8903 +db $00 +org $1B892A +db $00 +org $1B91E8 +db $00 +org $1B922B +db $00 +org $1B92E0 +db $00 +org $1B937E +db $00 +org $1B93C1 +db $00 +org $1BA958 +db $00 +org $1BA971 +db $00 +org $1BA98C +db $00 +org $1BA9A7 +db $00 +org $1A9D92 +db $00 +org $1A9DBD +db $00 +org $1A9DEB +db $00 +org $1A9F5D +db $00 +org $1A9F9F +db $00 +org $1A9FBD +db $00 +org $1A9FDC +db $00 +org $1A9FEA +db $00 +org $1AA0CA +db $00 +org $1AA1BB +db $00 +org $1AA2C9 +db $00 +org $1AA754 +db $00 +org $1AA84C +db $00 +org $1AA866 +db $00 +org $1AA887 +db $00 +org $1AA8A0 +db $00 +org $1AA8BA +db $00 +org $1AA8DB +db $00 +org $1AA8F4 +db $00 +org $1AA93E +db $00 +org $1AABF3 +db $00 +org $1AAC1F +db $00 +org $1AAC69 +db $00 +org $1AACA1 +db $00 +org $1AACC5 +db $00 +org $1AAD05 +db $00 +org $1AAD73 +db $00 +org $1AADAF +db $00 +org $1AAE3D +db $00 +org $1AAF36 +db $00 +org $1AAF46 +db $00 +org $1AAF6F +db $00 +org $1AAFCF +db $00 +org $1AAFDF +db $00 +org $1AB02B +db $00 +org $1AB086 +db $00 +org $1AB099 +db $00 +org $1AB0A5 +db $00 +org $1AB0CD +db $00 +org $1AB0F6 +db $00 +org $1AB154 +db $00 +org $1AB184 +db $00 +org $1AB33A +db $00 +org $1AB3D9 +db $00 +org $1AB49F +db $00 +org $1AB54A +db $00 +org $1AB5E5 +db $00 +org $1AB624 +db $00 +org $1AB63C +db $00 +org $1AB672 +db $00 +org $1AB691 +db $00 +org $1AB6B4 +db $00 +org $1AB6C6 +db $00 +org $1AB724 +db $00 +org $1AB767 +db $00 +org $1AB8CB +db $00 +org $1ABB1D +db $00 +org $1ABB2F +db $00 +org $1ABB55 +db $00 +org $1ABB70 +db $00 +org $1ABB81 +db $00 +org $1ABBBF +db $00 +org $1ABD34 +db $00 +org $1ABD55 +db $00 +org $1ABD6E +db $00 +org $1ABDC6 +db $00 +org $1ABE04 +db $00 +org $1ABE38 +db $00 +org $1ABF65 +db $00 +org $1ABFA6 +db $00 +org $1AC04F +db $00 +org $1AC087 +db $00 +org $1AC17A +db $00 +org $1AC1A0 +db $00 +org $1AC25C +db $00 +org $1AC319 +db $00 +org $1AC33C +db $00 +org $1AC3EF +db $00 +org $1AC40C +db $00 +org $1AC452 +db $00 +org $1AC494 +db $00 +org $1AC4B5 +db $00 +org $1AC512 +db $00 +org $1AC5D1 +db $00 +org $1AC5EF +db $00 +org $1AC682 +db $00 +org $1AC6C3 +db $00 +org $1AC83C +db $00 +org $1AC848 +db $00 +org $1AC855 +db $00 +org $1AC862 +db $00 +org $1AC86F +db $00 +org $1AC87C +db $00 +org $1ACA1C +db $00 +org $1ACA3B +db $00 +org $1ACA60 +db $00 +org $1ACB27 +db $00 +org $1ACC7A +db $00 +org $1ACD12 +db $00 +org $1ACD81 +db $00 +org $1ACE90 +db $00 +org $1ACED6 +db $00 +org $1ACEE2 +db $00 +org $1AD005 +db $00 +org $1AD02E +db $00 +org $1AD03C +db $00 +org $1AD081 +db $00 +org $1AD1B1 +db $00 +org $1AD1C7 +db $00 +org $1AD1CF +db $00 +org $1AD1EF +db $00 +org $1AD20C +db $00 +org $1AD214 +db $00 +org $1AD231 +db $00 +org $1AD257 +db $00 +org $1AD26D +db $00 +org $1AD275 +db $00 +org $1AD2AF +db $00 +org $1AD2BD +db $00 +org $1AD2CD +db $00 +org $1AD2DB +db $00 +org $1AD49C +db $00 +org $1AD801 +db $00 +org $1AD8A4 +db $00 +org $1ADA68 +db $00 +org $1ADA7F +db $00 +org $1ADC12 +db $00 +org $1ADD71 +db $00 +org $1ADE10 +db $00 +org $1ADE9A +db $00 +org $1ADF8B +db $00 +org $1ADFA4 +db $00 +org $1AE51A +db $00 +org $1AE542 +db $00 +org $1AE5ED +db $00 +org $1AE61D +db $00 +org $1AE6D7 +db $00 +org $1AE776 +db $00 +org $1AE8BD +db $00 +org $1AE8E5 +db $00 +org $1AE956 +db $00 +org $1AE973 +db $00 +org $1AE9A8 +db $00 +org $1AEA51 +db $00 +org $1AEA86 +db $00 +org $1AEB96 +db $00 +org $1AEC3E +db $00 +org $1AED4A +db $00 +org $1AEE9C +db $00 +org $1AEF80 +db $00 +org $1AF17E +db $00 +org $1AF190 +db $00 +org $1AF1B9 +db $00 +org $1B811D +db $00 +org $1B8139 +db $00 +org $1B816B +db $00 +org $1B818A +db $00 +org $1B819E +db $00 +org $1B81BE +db $00 +org $1B829C +db $00 +org $1B82E1 +db $00 +org $1B8306 +db $00 +org $1B830E +db $00 +org $1B835E +db $00 +org $1B83AB +db $00 +org $1B83CA +db $00 +org $1B83F0 +db $00 +org $1B83F8 +db $00 +org $1B844B +db $00 +org $1B8479 +db $00 +org $1B849E +db $00 +org $1B84CB +db $00 +org $1B84EB +db $00 +org $1B84F3 +db $00 +org $1B854A +db $00 +org $1B8573 +db $00 +org $1B859D +db $00 +org $1B85B4 +db $00 +org $1B85CE +db $00 +org $1B862A +db $00 +org $1B8681 +db $00 +org $1B87E3 +db $00 +org $1B87FF +db $00 +org $1B887B +db $00 +org $1B88C6 +db $00 +org $1B88E3 +db $00 +org $1B8944 +db $00 +org $1B897B +db $00 +org $1B8C97 +db $00 +org $1B8CA4 +db $00 +org $1B8CB3 +db $00 +org $1B8CC2 +db $00 +org $1B8CD1 +db $00 +org $1B8D01 +db $00 +org $1B917B +db $00 +org $1B918C +db $00 +org $1B919A +db $00 +org $1B91B5 +db $00 +org $1B91D0 +db $00 +org $1B91DD +db $00 +org $1B9220 +db $00 +org $1B9273 +db $00 +org $1B9284 +db $00 +org $1B9292 +db $00 +org $1B92AD +db $00 +org $1B92C8 +db $00 +org $1B92D5 +db $00 +org $1B9311 +db $00 +org $1B9322 +db $00 +org $1B9330 +db $00 +org $1B934B +db $00 +org $1B9366 +db $00 +org $1B9373 +db $00 +org $1B93B6 +db $00 +org $1B97A6 +db $00 +org $1B97C2 +db $00 +org $1B97DC +db $00 +org $1B97FB +db $00 +org $1B9811 +db $00 +org $1B98FF +db $00 +org $1B996F +db $00 +org $1B99A8 +db $00 +org $1B99D5 +db $00 +org $1B9A30 +db $00 +org $1B9A4E +db $00 +org $1B9A6B +db $00 +org $1B9A88 +db $00 +org $1B9AF7 +db $00 +org $1B9B1D +db $00 +org $1B9B43 +db $00 +org $1B9B7C +db $00 +org $1B9BA9 +db $00 +org $1B9C84 +db $00 +org $1B9C8D +db $00 +org $1B9CAC +db $00 +org $1B9CE8 +db $00 +org $1B9CF3 +db $00 +org $1B9CFD +db $00 +org $1B9D46 +db $00 +org $1BA35E +db $00 +org $1BA37E +db $00 +org $1BA391 +db $00 +org $1BA478 +db $00 +org $1BA4C3 +db $00 +org $1BA4D7 +db $00 +org $1BA4F6 +db $00 +org $1BA515 +db $00 +org $1BA6E2 +db $00 +org $1BA9C2 +db $00 +org $1BA9ED +db $00 +org $1BAA1B +db $00 +org $1BAA57 +db $00 +org $1BABAF +db $00 +org $1BABC9 +db $00 +org $1BABE2 +db $00 +org $1BAC28 +db $00 +org $1BAC46 +db $00 +org $1BAC63 +db $00 +org $1BACB8 +db $00 +org $1BACEC +db $00 +org $1BAD08 +db $00 +org $1BAD25 +db $00 +org $1BAD42 +db $00 +org $1BAD5F +db $00 +org $1BAE17 +db $00 +org $1BAE34 +db $00 +org $1BAE51 +db $00 +org $1BAF2E +db $00 +org $1BAF55 +db $00 +org $1BAF6B +db $00 +org $1BAF81 +db $00 +org $1BB14F +db $00 +org $1BB16B +db $00 +org $1BB180 +db $00 +org $1BB195 +db $00 +org $1BB1AA +db $00 +org $1AAB88 +db $00 +org $1AB64A +db $00 +org $1AB69F +db $00 +org $1AB747 +db $00 +org $1AA13F +db $00 +org $1AA174 +db $00 +org $1AA29E +db $00 +org $1AA426 +db $00 +org $1AC731 +db $00 +org $1AC753 +db $00 +org $1AC774 +db $00 +org $1AC795 +db $00 +org $1AC7B6 +db $00 +org $1ACAA5 +db $00 +org $1ACAE4 +db $00 +org $1ACB96 +db $00 +org $1ACCA5 +db $00 +org $1AD477 +db $00 +org $1ADA3D +db $00 +org $1AE566 +db $00 +org $1AE72C +db $00 +org $1AE7C0 +db $00 +org $1AE9B8 +db $00 +org $1AEAB1 +db $00 +org $1AEC05 +db $00 +org $1AEDB3 +db $00 +org $1AF1AB +db $00 +org $1B8E2D +db $00 +org $1B8F0D +db $00 +org $1B94E0 +db $00 +org $1B9544 +db $00 +org $1B95A8 +db $00 +org $1B9982 +db $00 +org $1B9B56 +db $00 +org $1BA694 +db $00 +org $1BA6AB +db $00 +org $1BAE88 +db $00 +org $1BAEC8 +db $00 +org $1BAEE6 +db $00 +org $1BB1BF +db $00 +org $1AA10A +db $00 +org $1AA2DC +db $00 +org $1AA447 +db $00 +org $1ADA4D +db $00 +org $1ADDDC +db $00 +org $1BA251 +db $00 +org $1BA26C +db $00 +org $1B945E +db $00 +org $1B967D +db $00 +org $1B96C2 +db $00 +org $1B9C95 +db $00 +org $1B9EE6 +db $00 +org $1BA5C6 +db $00 +org $1AA047 +db $00 +org $1AA4C2 +db $00 +org $1AA4EC +db $00 +org $1AA5A4 +db $00 +org $1ABDAA +db $00 +org $1AD1A8 +db $00 +org $1AD1E6 +db $00 +org $1AD24E +db $00 +org $1AD29E +db $00 +org $1AE045 +db $00 +org $1B81DE +db $00 +org $1B821E +db $00 +org $1B94AA +db $00 +org $1B9A9E +db $00 +org $1B9AE4 +db $00 +org $1BA289 +db $00 +org $1AA085 +db $00 +org $1AA1C5 +db $00 +org $1ADF28 +db $00 diff --git a/assembly/src/vitreous_fixes.asm b/assembly/src/vitreous_fixes.asm new file mode 100644 index 0000000..ce1fdc4 --- /dev/null +++ b/assembly/src/vitreous_fixes.asm @@ -0,0 +1,4 @@ +VitreousKeyReset: + STZ $0CBA, X + JSL $0DB818 ;restore old code +RTL diff --git a/assembly/src/vitreous_hooks.asm b/assembly/src/vitreous_hooks.asm new file mode 100644 index 0000000..6306252 --- /dev/null +++ b/assembly/src/vitreous_hooks.asm @@ -0,0 +1,2 @@ +org $1DDEEA +JSL VitreousKeyReset diff --git a/assembly/src/wallmasternotes.asm b/assembly/src/wallmasternotes.asm new file mode 100644 index 0000000..feb9b07 --- /dev/null +++ b/assembly/src/wallmasternotes.asm @@ -0,0 +1,635 @@ + ; *$5FFA8-$5FFF5 LONG + WallMaster_SendPlayerToLastEntrance: + { + JSL Dungeon_SaveRoomData.justKeys + JSL Dungeon_SaveRoomQuadrantData + JSL Sprite_ResetAll + + ; Don't use a starting point entrance. + STZ $04AA ; 9C AA 04 +;$04AA[0x02] - +; Flag, that if nonzero, tells us to load using a starting point entrance +; value rather than a normal entrance value. +;$04AA[0x01] - This is used when you die and choose to save & continue +; It is the dungeon entrance to put Link into. +; This variable is only used if you die in a dungeon, and is set to the +; last dungeon entrance you went into. + + ; Falling into an overworld hole mode. + LDA.b #$11 : STA $10 +;$10[0x01] - (Main) +; Main Module index. This controls which top level subprogram we're currently +; in. +; 0x11 - Happens when you fall into a hole from the OW. + + STZ $11 +;$11[0x01] - (Main) +; Submodule Index (See $B0) +;$B0[0x01] - Sub-submodule index. (Submodules of the $11 submodule index.) + + STZ $14 +;$14[0x01] - (NMI) +; Value based flag, that if nonzero, causes the tilemap to update from one of +; several source addresses. Some are in ram, but most are in rom. However, +; the ram address $001000 is most commonly used as the source address buffer. +; The others are used for highly specific parts of the game code, such as +; the intro. + + ; *$5FFBF ALTERNATE ENTRY POINT + + STZ $0345 +;$0345[0x01] - (Player) +; Set to 1 when we are in deep water. 0 otherwise. + + ; \wtf 0x11? Written here? I thought these were all even. + STA $005E +;$5E[0x01] - (Player) +; Speed setting for Link. The different values this can be set to index into +; a table that sets his real speed. Some common values: +; 0x00 - Normal walking speed +; 0x02 - Walking (or dashing) on stairs +; 0x10 - Dashing + + STZ $03F3 +;$03F3[0x01] - ???? + + STZ $0322 +;$0322[0x01] - ???? + + STZ $02E4 +;$02E4[0x01] - (Player) +; Flag that, if nonzero, will not allow Link to move. +; Requires further research as to its generalized usage. +; Also... Link cannot bring down the menu if this is nonzero. +; Additionally. + + STZ $0ABD +;$0ABD[0x01] - (Palette) +; Used in order to swap palettes under certain special circumstances. +; Apparently related almost entirely to the flute boy ghost and the ponds of wishing. +; When zero, doesn't induce any behavior change, but when nonzero, it will cause +; SP-0 and SP-7 (full) to swap and SP-5 and SP-3 (second halves) to swap. + + STZ $036B +;$036B[0x01] - ???? + + STZ $0373 +;$0373[0x01] - (Player) +; Putting a non zero value here indicates how much life to subtract from Link. +; (quick reference: 0x08 = one heart) + + + STZ $27 +;$27[0x01] - (Player) +; Link's Recoil for vertical collisions + + STZ $28 +;$28[0x01] - (Player) +; Link's Recoil for horizontal collisions + + + STZ $29 +;$29[0x01] - (Player) +; Vertical resistance + + STZ $24 +;$24[0x02] - (Dungeon, Overworld) +; 0xFFFF usually, but if Link is elevated off the ground it is considered to +; be his Z coordinate. That is, it's his height off of the ground. + + + STZ $0351 +;$0351[0x01] - (PlayerOam) +; Value that, if set to 1, draws the water ripples around the player sprite +; while standing in water. The drawing, of course, uses sprites. +; If the value is 2, then a patch of tall grass is instead. Any value other +; than 2 (besides 0) produces the water effect. + + STZ $0316 +;$0316[0x02] - ???? bunny stuffs? + + STZ $031F +;$031F[0x01] - +; Countdown timer that, when it's set, causes Link's sprite to +; blink, i.e. flash on and off + + + LDA.b #$00 : STA $5D +;$5D[0x01] - Player Handler or "State" +; 0x00 - ground state + + STZ $4B +;$4B[0x01] - +; Link's visibility status. If set to 0x0C, Link will disappear. + + ; *$5FFEE ALTERNATE ENTRY POINT + + JSL Ancilla_TerminateSelectInteractives + JML Player_ResetState + } + + + ; *$121B1-$121E4 LONG (Bank02.asm) + Dungeon_SaveRoomData: + { + LDA $040C : CMP.b #$FF : BEQ .notInPalace + + LDA.b #$19 : STA $11 + + STZ $B0 + + LDA.b #$33 : STA $012E + + JSL Dungeon_SaveRoomQuadrantData + + ; *$121C7 ALTERNATE ENTRY POINT (Bank02.asm) + .justKeys + + ; branch if in a non palace interior. + LDA $040C : CMP.b #$FF : BEQ .return +;$040C[0x02] - (Dungeon) +; Map index for dungeons. If it's equal to 0xFF, that means there is no map +; for that area. +; 0x00 - 0x1A (multiple of 2) + + ; Is it the Sewer? + CMP.b #$02 : BNE .notSewer +; 0x02 - Hyrule Castle + + ; If it's the sewer, put them in the same slot as Hyrule Castles's. annoying :p + LDA.b #$00 + + .notSewer + + LSR A : TAX + + ; Load our current count of keys for this dungeon. + ; Save it to an appropriate slot. + LDA $7EF36F : STA $7EF37C, X +;$7EF36F = current key count +;$7EF37C,X = dungeon key count + + .return + + RTL + + .notInPalace ; we never get here from wallmaster + + ; Play the error sound effect + LDA.b #$3C : STA $012E + + RTL + } + + + ....... + ; *$13929 ALTERNATE ENTRY POINT (Bank02.asm) + shared Dungeon_SaveRoomQuadrantData: + + ; figures out which Quadrants Link has visited in a room. + + ; Mapped to bit 3. + LDA $A7 : ASL #2 : STA $00 + + ; Mapped to bit 2. + LDA $A6 : ASL A : ORA $00 +;$A6[0x01] - Set to 0 or 2, but it depends upon the dungeon room's layout +; and the quadrant it was entered from. Further investigation seems +; to indicate that its purpose is to control the camera / scrolling +; boundaries in dungeons. +;$A7[0x01] - Same as $A6, but for vertical camera scrolling. + + + ; Mapped to bit 1. + ORA $AA +;$AA[0x01] - 2 if you are the lower half of the room. 0 if you are on the upper half. + + ; Mapped to bit 0. + ORA $A9 +;$A9[0x01] - 0 if you are on the left half of the room. 1 if you are on the right half. + + ; X ranges from 0x00 to 0x0F + TAX + + ; These determine the quadrants Link has seen in this room. + LDA $02B5CC, X : ORA $0408 : STA $0408 +; ; $135CC-$135DB ($02B5CC) +; { +; db $08, $04, $02, $01, $0C, $0C, $03, $03 +; db $0A, $05, $0A, $05, $0F, $0F, $0F, $0F +; } +;$0408[0x02] - Only lowest 4 bits are used. Record of the quadrants that Link +; has visited in the current room. + + JSR $B947 ; $13947 IN ROM ; Save the room data and exit. + + RTL + } + + ; *$13947-$13967 LOCAL + { + ; Saves data for the current room + + REP #$30 + + ; What room are we in... use it as an index. + LDA $A0 : ASL A : TAX +;$A0[0x02] - The index used for loading a dungeon room. There are 296 rooms all in all. (mirrored in other variables). + + ; Store other data, like chests opened, bosses killed, etc. + LDA $0402 : LSR #4 : STA $06 +;$0402[0x01] - Certainly related to $0403, but contains other information I haven�t looked at yet. +;$00[0x10] - (Main) +; Mainly used as work registers. Storage of addresses and values. + + ; Store information about this room when it changes. + LDA $0400 : AND.w #$F000 : ORA $0408 : ORA $06 : STA $7EF000, X +;$0400[0x02] - Tops four bits: In a given room, each bit corresponds to a +; door being opened. If set, it has been opened by some means +; (bomb, key, etc.) +;$0408[0x02] - Only lowest 4 bits are used. Record of the quadrants that Link +; has visited in the current room. +;$7EF000[0x500] - Save Game Memory, which gets mapped to a slot in SRAM when +; you save your game. SRAM slots are at $70:0000, $70:0500, +; and $70:0A00. They are also mirrored in the next three +; slots. See the sram documentation for more details. + + SEP #$30 + + RTS + } + + + ; *$4C44E-$4C498 LONG (Bank09.asm) + Sprite_ResetAll: + { + JSL Sprite_DisableAll ; $4C22F IN ROM + + ; *$4C452 ALTERNATE ENTRY POINT + .justBuffers + + STZ $0FDD : STZ $0FDC : STZ $0FFD + STZ $02F0 : STZ $0FC6 : STZ $0B6A + STZ $0FB3 + + LDA $7EF3CC : CMP.b #$0D + + ; branch if Link has the super bomb tagalong following him + BEQ .superBomb + + LDA.b #$FE : STA $04B4 + + .superBomb + + REP #$10 + + LDX.w #$0FFF + LDA.b #$00 + + .clearLocationBuffer + + STA $7FDF80, X : DEX + + BPL .clearLocationBuffer + + LDX.w #$01FF + + .clearDeathBuffer + + STA $7FEF80, X : DEX + + BPL .clearDeathBuffer + + SEP #$10 + + LDY.b #$07 + LDA.b #$FF + + .clearRecentRoomsList + + STA $0B80, Y : DEY + + BPL .clearRecentRoomsList + + RTL + } + + + ; *$4AC6B-$4ACF2 LONG (Bank09.asm) + Ancilla_TerminateSelectInteractives: + { + PHB : PHK : PLB + + LDX.b #$05 + + .nextObject + + ; check for 3D crystal + LDA $0C4A, X : CMP.b #$3E : BNE .not3DCrystal + + TXY + + BRA .checkIfCarryingObject + + .not3DCrystal + + ; checks if any cane of somaria blocks are in play? + LDA $0C4A, X : CMP.b #$2C : BNE .checkIfCarryingObject + + STZ $0646 + + LDA $48 : AND.b #$80 : BEQ .checkIfCarryingObject + + ; reset Link's grabby status + STZ $48 : STZ $5E + + .checkIfCarryingObject + + LDA $0308 : BPL .notCarryingAnything + + TXA : INC A : CMP $02EC : BEQ .spareObject + + BRA .terminateObject + + .notCarryingAnything + + TXA : INC A : CMP $02EC : BNE .terminateObject + + STZ $02EC + + .terminateObject + + STZ $0C4A, X + + .spareObject + + DEX : BPL .nextObject + + LDA $037A : AND.b #$10 : BEQ .theta + + STZ $46 + STZ $037A + + .theta + + ; Reset flute playing interval timer. + STZ $03F0 + + ; Reset tagalong detatchment timer. + STZ $02F2 + + ; Only place this is written to. Never read. + STZ $02F3 + STZ $035F + STZ $03FC + + STZ $037B + STZ $03FD + STZ $0360 + + LDA $5D : CMP.b #$13 : BNE .notUsingHookshot + + LDA.b #$00 : STA $5D + + LDA $3A : AND.b #$BF : STA $3A + LDA $50 : AND.b #$FE : STA $50 + LDA $037A : AND.b #$FB : STA $037A + + STZ $037E + + .notUsingHookshot + + PLB + + RTL + } + + ; *$3F1A3-$3F259 LONG + Player_ResetState: + { + STZ $26 ;$26[0x01] - (Player) The direction(s) that Link is pushing against. + + STZ $67 ;$67[0x01] - (Player) Indicates which direction Link is walking (even if not going anywhere). + STZ $031F ;$031F[0x01] - Countdown timer that, when it's set, causes Link's sprite to blink, i.e. flash on and off + STZ $034A ;$034A[0x01] - (Player) Flag indicating whether Link is moving or not. (I think) + + JSL Player_ResetSwimState + + STZ $02E1 ;$02E1[0x01] - (Player) Link is transforming? (Poofing in a cloud to transform into something else.) + STZ $031F ;$031F[0x01] - Countdown timer that, when it's set, causes Link's sprite to blink, i.e. flash on and off + STZ $03DB ;$03DB[0x06] - (Ancilla) Special Object ram. + STZ $02E0 ;$02E0[0x01] - (Player) Flag for Link's graphics set. 0 - Normal Link + STZ $56 ;$56[0x01] - (PlayerOam) Link's graphic status. 1 - bunny link, 0 - real link. + STZ $03F5 ;$03F5[0x02] - (Player) The timer for Link's tempbunny state. + STZ $03F7 ;$03F7[0x01] - (Player) Flag indicating whether the "poof" needs to occur for Link to transform into the tempbunny. + STZ $03FC ;$03FC[0x01] - ???? + STZ $03F8 ;$03F8[0x01] - Flag set if you are near a PullForRupees sprite + STZ $03FA ;$03FA[0x02] - Relates to Link's OAM routine in Bank 0D somehow. Appears to be the 9th bit of the X coordinate of some sprite(s). + STZ $03E9 ;$03E9[0x01] - Flag that seems to set when moving gravestones are in play and puzzle sound is playing. + STZ $0373 ;$0373[0x01] - (Player) Putting a non zero value here indicates how much life to subtract from Link. (quick reference: 0x08 = one heart) + STZ $031E ;$031E[0x01] - used as an offset for a table to retrieve values for $031C. The offset comes in increments of four, depending on which direction Link is facing when he begins to spin. This makes sense, given that he always spins the same direction, and allows for reusability between the different directions, each one being a sub set of the full sequence. + STZ $02F2 ;$02F2[0x01] - (Tagalong) Used as a bitfield of event flags of a temporary nature relating to Tagalongs. + STZ $02F8 ;$02F8[0x01] - Flag used to make Link make a noise when he gets done bouncing after a wall he's dashed into. Thus, it only has any use in relation to dashing. + STZ $02FA ;$02FA[0x01] - Flag that is set if you are near a moveable statue (close enough to grab it) + STZ $02E9 ;$02E9[0x01] - Item Receipt Method. 0 - Receiving item from an NPC or message + STZ $02DB ;$02DB[0x01] - (Player) Triggered by the Whirlpool sprite (but only when touched in Area 0x1B). The Whirlpool sprite used is not visible to the player, and is placed in the open perimeter gate to Hyrule Castle after beating Agahnim. I guess they needed some mechanism to make that happen, and that sprite was specialized in order to do so. Apparently this is set when warping to the Dark World? + + ; *$3F1E6 ALTERNATE ENTRY POINT + ; called by mirror warping. + + STZ $02F5 ;$02F5[0x01] - (Player) 0 - Not on a Somaria Platform. + STZ $0079 ;$79[0x01] - (Player) Controls whether to do a spin attack or not? Update: Actually looks more like a step counter for the spin attack... + STZ $0302 ;$0302[0x01] - (Player) ???? + STZ $02F4 ;$02F4[0x01] - Only use is for caching the current value of $0314 in some instances + STZ $48 ;$48[0x01] - (PlayerOam) If set, when the A button is pressed, the player sprite will enter the "grabbing at something" state. + STZ $5A ;$5A[0x01] - (Player) ???? + STZ $5B ;$5B[0x01] - (Player) 0 - indicates nothing, 1 - Player is dangerously near the edge of a pit, 2 - Player is falling + + ; \wtf Why zeroed twice? probably a typo on the programmer's end. + ; Or maybe it was aliased to two different names... + STZ $5B ; " + + ; *$3F1FA ALTERNATE ENTRY POINT + ; called by some odd balls. + + STZ $036C ;$036C[0x01] - Action index when interacting with tiles, like pots, rocks, or chests. 0 - ???, 1 - Picks up a pot or bush. + STZ $031C ;$031C[0x01] - (Player) tells us the actual graphic/state to use on the given step of a spin attack + STZ $031D ;$031D[0x01] - (Player) step counter for the spin attack + STZ $0315 ;$0315[0x01] - Seems to be a flag that is set to 0 if Link is not moving, and 1 if he is moving. However it doesn't seem to get reset to zero. + STZ $03EF ;$03EF[0x01] - (Player, PlayerOam) Normally zero. If set to nonzero, it forces Link to the pose where he is holding his sword up. One example of where this is used is right after Ganon is defeated. + STZ $02E3 ;$02E3[0x01] - (Player) (Slightly uncertain about this) Delay timer between attacks involving the sword. In essence, the repeat rate at which you are able to swing your sword. May have an impact on other types of sword attacks like stabbing and dash attacks. + STZ $02F6 ;$02F6[0x02] - (Player) Bitfield for interaction with Blue Rupee, Grabbable, and Key Door tiles + STZ $0301 ;$0301[0x01] - (Player) [bmuaethr] When non zero, Link has something in his hand, poised to strike. It's intended that only one bit in this flag be set at any time, though. + STZ $037A ;$037A[0x01] - (Player) Puts Link in various positions, 1 - shovel, 2 - praying, etc... cane of somaria. May also have something to do with bombs? + STZ $020B ;$020B[0x01] - Seems to be a debug value for Module 0x0E.0x01 + STZ $0350 ;$0350[0x01] - (WriteOnly) free ram, though it would need to be reclaimed from the game engine as it's currently used in several places as an apparent debug variable. Specifically, it always written to, but never read. + STZ $030D ;$030D[0x01] - ???? + STZ $030E ;$030E[0x01] - Always seems to be set to 0, and only read during OAM handling of the player sprite. + STZ $030A ;$030A[0x01] - (PlayerOam) Step counter used with $030B. Also, $030A-B seem to be used for the opening of the desert palace + STZ $3B ;$3B[0x01] - (Player) Bitfield for the A button + STZ $3A ;$3A[0x01] - Bitfield for the B and Y buttons + STZ $3C ;$3C[0x01] - (Player) Lower Nibble: How many frames the B button has been held, approximately. Upper nibble: set to 9 on spin attack release. + STZ $0308 ;$0308[0x01] - Bit 7 - is set when Link is carrying something. Bit 1 - set when Link is praying? + STZ $0309 ;$0309[0x01] - 0 - nothing. 1 - picking up something. 2 - throwing something or halfway done picking up something. + STZ $0376 ;$0376[0x01] - bit 0: Link is grabbing a wall. + STZ $50 ;$50[0x01] - (Player) A flag indicating whether a change of the direction Link is facing is possible. For example, when the B button is held down with a sword. 0 - Can change + STZ $4D ;$4D[0x01] - An Auxiliary Link handler. As far as I know, 0x00 - ground state (normal) + STZ $46 ;$46[0x01] - (Player) A countdown timer that incapacitates Link when damaged or in recoil state. If nonzero, no movement input is recorded for Link. + STZ $0360 ;$0360[0x01] - A flag that, when nonzero, causes Link to be electrocuted when touching an enemy. This seems counterintuitive to me, but whatever. + STZ $02DA ;$02DA[0x01] - (Player) Flag indicating whether Link is in the pose used to hold an item or not. 0 - no extra pose. + STZ $55 ;$55[0x01] - Cape flag, when set, makes you invisible and invincible. You can also go through objects, such as bungies. + + JSR $9D84 ; $39D84 IN ROM (BRANCH_EPSILON) + + STZ $037B ;$037B[0x01] - (Player) If nonzero, disables Link's ability to receive hits from sprites. (But not pits) + STZ $0300 ;$0300[0x01] - Link's state changes? Happens when using boomerang. Also related to electrocution maybe? + STZ $037E ;$037E[0x01] - (Player), (Hookshot) Bit 0 - Hookshot is dragging Link somewhere. Bit 1 - ???? seems like it gets toggled every 3 frames, or something like that. + STZ $02EC ;$02EC[0x01] - seems to be a flag for (Link's) collision with bombs. Maybe other uses + STZ $0314 ;$0314[0x01] - (Player) The index (the X in $0DD0 for example) of the sprite that Link is "touching" + STZ $03F8 ;$03F8[0x01] - Flag set if you are near a PullForRupees sprite + STZ $02FA ;$02FA[0x01] - Flag that is set if you are near a moveable statue (close enough to grab it) + + RTL + } + +; *$39D84-$39E62 LOCAL +{ + +BRANCH_EPSILON: + + ; Bring Link to stop + STZ $5E + + LDA $48 : AND.b #$F6 : STA $48 + + ; Stop any animations Link is doing + STZ $3D + STZ $3C + + ; Nullify button input on the B button + LDA $3A : AND.b #$7E : STA $3A + + ; Make it so Link can change direction if need be + LDA $50 : AND.b #$FE : STA $50 + + BRL BRANCH_ALPHA + +; *$39D9F ALTERNATE ENTRY POINT + + BIT $48 : BNE BRANCH_BETA + + LDA $48 : AND.b #$09 : BNE BRANCH_GAMMA + +BRANCH_BETA: + + LDA $47 : BEQ BRANCH_DELTA + CMP.b #$01 : BEQ BRANCH_EPSILON + +BRANCH_GAMMA: + + LDA $3C : CMP.b #$09 : BNE BRANCH_ZETA + + LDX.b #$0A : STX $3C + + LDA $9CBF, X : STA $3D + +BRANCH_ZETA: + + DEC $3D : BPL BRANCH_THETA + + LDA $3C : INC A : CMP.b #$0D : BNE BRANCH_KAPPA + + LDA $7EF359 : INC A : AND.b #$FE : BEQ BRANCH_LAMBDA + + LDA $48 : AND.b #$09 : BEQ BRANCH_LAMBDA + + LDY.b #$01 + LDA.b #$1B + + JSL AddWallTapSpark ; $49395 IN ROM + + LDA $48 : AND.b #$08 : BNE BRANCH_MUNU + + LDA $05 : JSR Player_DoSfx2 + + BRA BRANCH_XI + +BRANCH_MUNU: + + LDA.b #$06 : JSR Player_DoSfx2 + +BRANCH_XI: + + ; Do sword interaction with tiles + LDY.b #$01 + + JSR $D077 ; $3D077 IN ROM + +BRANCH_LAMBDA: + + LDA.b #$0A + +BRANCH_KAPPA: + + STA $3C : TAX + + LDA $9CBF, X : STA $3D + +BRANCH_THETA: + + BRA BRANCH_RHO + +BRANCH_DELTA: + + LDA.b #$09 : STA $3C + + LDA.b #$01 : TSB $50 + + STZ $3D + + LDA $5E + + CMP.b #$04 : BEQ BRANCH_RHO + CMP.b #$10 : BEQ BRANCH_RHO + + LDA.b #$0C : STA $5E + + LDA $7EF359 : INC A : AND.b #$FE : BEQ BRANCH_ALPHA + + LDX.b #$04 + +BRANCH_PHI: + + LDA $0C4A, X + + CMP.b #$30 : BEQ BRANCH_ALPHA + CMP.b #$31 : BEQ BRANCH_ALPHA + + DEX : BPL BRANCH_PHI + + LDA $79 : CMP.b #$06 : BCC BRANCH_CHI + + LDA $1A : AND.b #$03 : BNE BRANCH_CHI + + JSL AncillaSpawn_SwordChargeSparkle + +BRANCH_CHI: + + LDA $79 : CMP.b #$40 : BCS BRANCH_ALPHA + + INC $79 : LDA $79 : CMP.b #$30 : BNE BRANCH_ALPHA + + LDA.b #$37 : JSR Player_DoSfx2 + + JSL AddChargedSpinAttackSparkle + + BRA BRANCH_ALPHA + +BRANCH_RHO: + + JSR $9E63 ; $39E63 IN ROM + +BRANCH_ALPHA: + + RTS +} diff --git a/assembly/src/what4.brr b/assembly/src/what4.brr new file mode 100644 index 0000000000000000000000000000000000000000..5f82bf9bdf50471388c222919f91a9aefdda0da4 GIT binary patch literal 1908 zcmXZNYgAMB0RZqM1eHf_UQkrXi-6WbxFiuhYC;~Mo+*$BT0K=kLED{9bf~L##p>DG zj#;!&Xb--&09Qw6>iHM`YK~qbFKulF@&KI*d0}iCSXP*$sb5&JD*ru9r3|3R)v&&~|57 z%MI)iL(=+0(Mi)e$O;&xCn#E1dl*E{eTDQMg|{XnC*e@_6~Fow~)V!Cx)Q^sD6P zD4g?jqS;AeJ5)THkG5CEWx(S8-Gg(%YkIgKeR=P$`-_r6L-hOF_&s$4;GnsU+FuqT z9_EcDNjpA@n}b=_ErU;l<^!-GBKNrHub9wsVs=h8n&Sn^*g14m8RrMpX=Sc9bTA!O z^p`B03Jll5dx;eu$*wtX2#RN}Mgl$lLa+*DHn zXJDs2RPrr2-%=IqD<@pw*wllYdZfD?4|#XAtC!sl)zI=1H^(W<>Y%@#Xn9`7)&+Pdlp~KRFqmzaJmKSZ?0;Ks4r~kpJLdZ$~3T2DwEcl^|6o zks=}AEQ+3KofV&zM#D{3W4_1BoKTaXbx24E=JutVFcOKb)WukOER&?FdA)7B+RPfu#TI=bL!#6>+Q@o- zs5UW7ZO!0a3n-@2^09fBi|X$=Sr3EaP~Os$3<>toV__04@ifdDITDg=5mH*)Q+yr6 zJmyZL5K?FZ9;DDnsUibZwkz7@;r8(ryMlSGvzA9}d5zX}@v%SXqB11fwj2j5)0G=U zTjk>I1*BLNZRqTlF}Y?WyKz(OK6{cT^*0IxwF6BwH@#8ty5Fus8R7b@?B$hzjz83O z9BF51sOXuv2JJJ#tqT+U`d#m+mEa3>=9416>Ec~lG+JMfxxOayC<{4$Hp!zCQTziR MrXohBN6IDs3$&G{f&c&j literal 0 HcmV?d00001 diff --git a/assembly/src/whatsmall.brr b/assembly/src/whatsmall.brr new file mode 100644 index 0000000000000000000000000000000000000000..380f09fe31c2655525e43275773859fbd7909edc GIT binary patch literal 1908 zcmXZNX;4#l0s!#5glLPrBrhSl#gJ2}O74KIO2QG3_23e^LtRX4J=Phu0gNp>gF@?b zhwY^Fulu@Y^mP=p9jg^l)a_aXB&gdh1PI4&IdXy3QF6SO1Y0-B+x@V=FFzXX|C;_c z+v(x%0jUy>I85h2HTdUIl3aDbUsID=RCn_&2OWdrCGeJiLd9T9VEtidh^w^oLn3lf zlX|?#tmdu{cFp)u#?yhJ)7gt>(a<58qAmp)MXxG;BPuu)gKVVB@YmH3Cj{tv-J1j= zG6tLVcZK8J2i3c*N%WInIG^g~aUs8dNbL`CQ0FK$RM^O=M4xnVe(=*2<+e4;f^Rqe z@iK`jTDC2V)W(lt>}iE?m>Vuf$*}kkw*19yJIkjiYAu=T!$Y^l(O#W*4*$vnbrN*N zg6&q%%g`@}%D%=#1fPIwB?9!?myY&h{QW5yP41j$QyUGKh4hDoXS^`DIZg`~rSr<{ z-#9c<%F)_OS-!*_!@0ej))3~fl# zwga80%ehf^VaJ>J_2c70?u^A{&s4v*=W#{>jII!EBcHwcVy_K}TRIfKho$y0CDQYO zSGWQw+;}2I#Y@NMv#yssUQ-yribj>QFF2=7c+p_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