diff --git a/Docs/Digging treasure HEX.TXT b/Docs/Digging treasure HEX.TXT deleted file mode 100644 index 94d2b4e..0000000 --- a/Docs/Digging treasure HEX.TXT +++ /dev/null @@ -1,53 +0,0 @@ -Random treasure dig-up by shovel by Conn - -Apply on any hacked or native ALTTP (US). - - - -(1) nop out restriction to only collect treasures in field: -03/A3B2: ad fc 03 f0 04 -> ea ea ea ea ea (check if treasure hunt game is on) -0e/fd65: b0 28 -> ea ea (check if you are in field coordinates) - -(2) disable random HC-piece dig-up: -0E/FD7A: 90 FD -> 8F FD -** you need to place this HC via HM to another location, since it isn't available anymore - -(3) explanation how to alter the dig-up treasures; not part of hack... -every time you dig there is calculated a randomized Y-value which determines whether you find treasure or not. -There are 8 possibilities. -Note: Only 4 treasures are alterable with the table, the rest is nothing - -pointer table: -0E/FD72: 8A FD - get treasure -0E/FD74: 8A FD - get treasure -0E/FD76: 8A FD - get treasure -0E/FD78: 8A FD - get treasure -0E/FD7A: 8F FD - nothing - Before it was 90 FD: get Heart Piece; if 90 FD code will check if you already collected, if yes, you get nothing -0E/FD7C: 8F FD - nothing -0E/FD7E: 8F FD - nothing -0E/FD80: 8F FD - nothing - -if you get pointed to a treasure (8A FD), the Y determines which one you get. - -Treasure table: -0e/fd86: DB - 20 ruppees -0e/fd87: DA - 5 ruppees -0e/fd88: D9 - 1 ruppee -0e/fd89: DF - small magic - -Treasure Key: -D8: heart -D9: 1 ruppee -DA: 5 ruppees -DB: 20 ruppees -DC: 1 bomb -DD: 4 bombs -DE: 8 bombs -DF: small magic -E0: large magic -E1: 5 arrows -E2: 10 arrows -E3: fairy -E4... small dungeon, key, big key, sprites, other nonsense... - - diff --git a/Docs/PW shovel HEX.txt b/Docs/PW shovel HEX.txt deleted file mode 100644 index 1bd3891..0000000 --- a/Docs/PW shovel HEX.txt +++ /dev/null @@ -1,144 +0,0 @@ -Parallel Worlds add-on patch by Conn - -Get shovel in menu instead of empty space (patch changes empty space used for bottle content to get shovel there) - -Bottle content is saved to unused 7E/D100, and 7E/D101 is used to check whether bottle is equipped - -Apply on Parallel Worlds-prepatched ALTTP. - - -Still needs to be done: -- The current version (1.1) does not have a shovel, you must place it in a chest via Hyrule Magic -- Hide some treasures to dig up ;) - - -ips for rom without header (Parallel_Worlds_shovel.ips) -or for rom with header (Parallel_Worlds_shovel_header.ips) - - - -(1) shovel gfx in menu - -06/e46f: 51 -> 11 -06/e517: a9 5c 2c 8d 58 14 8d 5a 14 8d 98 14 8d 9a 14 -> ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea -06/ebb0: ad 02 02 -> 20 a0 ea (hijack code show letters "shovel" in menu) -06/eaa0: -ad 02 02 -29 ff 00 -c9 10 00 ; check if position 10 (bottle) -d0 04 -a9 18 00 -aa ; transfer pointer 18 for shovel to X -ad 02 02 -60 - -06/fb60: ea 85 02 -> 20 c0 ea set pointers to show shovel as Y item in box when playing -06/eac0: -85 02 -e2 30 -af 01 d1 7e ;check if bottle is equipped -c9 00 -d0 06 ; if not branch -e0 10 -d0 02 -a2 0d -c2 30 -60 - - -(2)load/store bottle content to 7E/d100 - -06/de0c: af f4 f3 7e -> af 00 d1 7e -06/E59f: 8f 4f f3 7e -> 8f 00 d1 7e -06/ebbb: af 4f f3 7e -> af 00 d1 7e -06/fae3: af 4f f3 7e -> af 00 d1 7e - - - -(3) make bottle selectable item - -06/de3d: d0 -> 80 -06/de9d: d0 -> 80 -06/E588: d0 -> 80 - - -(4) check if 7e/0202 is bottle or shovel, save 01 to unused 7e/d101 if bottle, 00 if shovel - -06/faeb: a9 10 00 -> 20 20 ea (hijack code to unused 06/ea20, executed from menu to game if $0202 > 15 -> bottle) -06/ea20: -a9 01 00 -8f 01 d1 7e ; store 01 to 7e/d101 to keep saved that bottle and not shovel is chosen -a9 10 00 ; store 10 to $0202 -60 - -06/e5db: af 4f f3 7e 18 69 14-> 20 50 ea ea ea ea ea (hijack code to 06/ea50, executed from game to menu only when $0202 is 10) -06/ea50: -af 01 d1 7e -c9 01 ;check if bottle is in Y button-box (equipped) -f0 03 -a9 10 -60 ;if not, return -a9 00 -8f 01 d1 7e ; reset 7e/d101 -af 00 d1 7e ; load bottle number -18 -69 14 ; add 14 to get to correct bottle in menu -60 - -06/fada: 9b aa 80 14 -> 4c 70 ea ea (hijack code to 06/ea70; executed from menu to game to put correct Y item to use) -06/ea70: -9b -aa -af 01 d1 7e ; check if bottle is chosen -c9 01 00 -f0 0b ; if yes branch -af 4f f3 7e ; if not load shovel -29 ff 00 -bb -4c fa fa -af 00 d1 7e ; load bottle number -29 ff 00 -aa -bf 5b f3 7e ; load bottle content -29 ff 00 -bb -4c fa fa - - -(5) use of items: - -04/850E: 4c -> 4f (to store shovel at 7e/f34f) when you get it - -03/A166: AF 4F F3 7E -> af 00 d1 7e (enable bottle use (remap)) - -pointer: 03/9afa 5b a1 -> 13 a3 - -03/A313: AF 4C F3 7E -> 5c e0 ea 0d (hijack code to distinguish between bottle, flute and shovel) -06/eae0: -af 01 d1 7e ; check if bottle is in Y -c9 00 -F0 04 ; branch if not -5c 5b a1 07; jump to bottle pointer (overwritten at pointer above) -ad 02 02 -c9 0d ; check if flute -d0 08 ; if not branch -af 4c f3 7e; load flute -5c 1d a3 07; return to fluteload -af 4f f3 7e; check status of 7e/f34e -c9 00 -d0 04 -5c 12 a3 07; if no value return -c9 01 -d0 04 -5c 2c a3 07; if shovel run execution -5c 1d a3 07; if any other value return to flute load - - - - -(6) further changes -(don't know when these are executed, but safe is safe, otherwise you may get a shovel with a bottle!) -06/de29: 8f 4f f3 7E -> 8f 00 d1 7e -06/e168: 8f 4f f3 7E -> 8f 00 d1 7e (think this is run when you receive a bottle) - - diff --git a/Oracle_main.asm b/Oracle_main.asm index a2dc779..367e086 100644 --- a/Oracle_main.asm +++ b/Oracle_main.asm @@ -18,29 +18,29 @@ ; 24 - N/A ; 25 - N/A ; 26 - N/A -; 27 - Mask Routines(?) -; 28 - None -; 29 - Custom Sprite Jump Table +; 27 - N/A +; 28 - New Sprite Jump Table +; 29 - Custom Sprites and New Functions ; 2A - Jump Feather ; 2B - Book of Secrets -; 2C - Bottle Net +; 2C - N/A ; 2D - Menu ; 2E - HUD ; 2F - House Tag -; 30 - Custom Sprite Functions +; 30 - N/A ; 31 - Deku Link Code -; 32 - Farore Sprite Code +; 32 - None ; 33 - None ; 34 - Zora Link Code ; 35 - Deku Link GFX ; 36 - Zora Link GFX ; 37 - Bunny Link GFX ; 38 - Wolf Link GFX -; 39 - Palette_ArmorAndGloves -; 3A - None -; 3B - None -; 3C - None -; 3D - None +; 39 - Minish Link GFX +; 3A - StartupMasks, Palette_ArmorAndGloves, CgramAuxToMain +; 3B - N/A +; 3C - N/A +; 3D - N/A ; 3F - Boat GFX ; ; Used Free RAM: @@ -76,15 +76,20 @@ namespace Oracle incsrc "Music/dungeon_theme.asm" print "End of Music/dungeon_theme.asm ", pc + ; incsrc "Music/boss_theme.asm" + ; print "End of Music/boss_theme.asm ", pc + + print "" + ; --------------------------------------------------------- ; Sprites - ; org $02ECF8 - ; dw $0029 + print " -- Sprites -- " + print "" incsrc "Sprites/farore.asm" - print "End of farore.asm ", pc + print "End of farore.asm ", pc incsrc "Sprites/Kydrog/kydrog.asm" print "End of kydrog.asm ", pc @@ -98,6 +103,12 @@ namespace Oracle incsrc "Sprites/mask_salesman.asm" print "End of mask_salesman.asm ", pc + incsrc "Sprites/deku_scrub.asm" + print "End of deku_scrub.asm ", pc + + incsrc "Sprites/anti_kirby.asm" + print "End of anti_kirby.asm ", pc + print "" ; --------------------------------------------------------- @@ -151,6 +162,9 @@ namespace Oracle ; --------------------------------------------------------- ; Events + print " -- Events -- " + print "" + incsrc "Events/house_tag.asm" print "End of Events/house_tag.asm ", pc @@ -160,33 +174,50 @@ namespace Oracle incsrc "Events/snow_overlay.asm" print "End of Events/snow_overlay.asm ", pc + print "" + ; --------------------------------------------------------- ; Graphics + print " -- Graphics -- " + print "" + incsrc "Graphics/boat_gfx.asm" print "End of Graphics/boat_gfx.asm ", pc incsrc "Events/maku_tree.asm" print "End of Events/maku_tree.asm ", pc + print "" ; --------------------------------------------------------- ; Dungeon + print " -- Dungeon -- " + print "" + incsrc "Dungeons/keyblock.asm" print "End of Dungeons/keyblock.asm ", pc incsrc "Dungeons/entrances.asm" print "End of Dungeons/entrances.asm ", pc + print "" + ; --------------------------------------------------------- ; Custom Menu and HUD + print " -- Menu -- " + print "" + incsrc "Menu/menu.asm" print "End of Menu/menu.asm ", pc + ; incsrc "Menu/rings/bestiary_hooks.asm" + ; incsrc "Menu/rings/bestiary.asm" + ; --------------------------------------------------------- incsrc "Debug/debug.asm" diff --git a/Sprites/farore.asm b/Sprites/farore.asm index a2cfce6..9b53db6 100644 --- a/Sprites/farore.asm +++ b/Sprites/farore.asm @@ -8,12 +8,12 @@ incsrc sprite_functions_hooks.asm ;============================================================================== -org $298000 +org $288000 incsrc sprite_new_table.asm ;============================================================================== -org $308000 +org $298000 incsrc sprite_new_functions.asm ;============================================================================== @@ -106,7 +106,6 @@ Sprite_Farore_Main: dw FaroreFollowPlayer dw MakuArea_FaroreFollowPlayer dw MakuArea_FaroreWaitForKydrog - ; dw MakuArea_FaroreWalkToPosition ; 00 @@ -248,14 +247,6 @@ Sprite_Farore_Main: RTS } - - ; ; 09 - ; MakuArea_FaroreWalkToPosition: - ; { - ; %PlayAnimation(3, 4, 8) - ; RTS - ; } - } ;============================================================================== diff --git a/Sprites/sprite_macros.asm b/Sprites/sprite_macros.asm index 37335de..a5b7691 100644 --- a/Sprites/sprite_macros.asm +++ b/Sprites/sprite_macros.asm @@ -59,6 +59,12 @@ macro PlayAnimation(frame_start, frame_end, frame_wait) + endmacro +macro StartOnFrame(frame) + LDA.w SprFrame, x : CMP.b # : BCS + + LDA.b # : STA.w SprFrame, x + + +endmacro + ; Show message if the player is facing toward sprite and pressing A ; Return Carry Set if message is displayed @@ -195,4 +201,8 @@ endmacro ; Will set the timer F to wait (length) amount of frames macro SetTimerF(length) LDA.b # : STA.w SprTimerF, X +endmacro + +macro NextAction() +INC $0D80, X endmacro \ No newline at end of file diff --git a/Sprites/sprite_new_functions.asm b/Sprites/sprite_new_functions.asm index 765ed0e..960d547 100644 --- a/Sprites/sprite_new_functions.asm +++ b/Sprites/sprite_new_functions.asm @@ -102,7 +102,7 @@ Sprite_MoveAltitude: ; Movement, Collision are handled by this function (height:20 = vitreous) ; $09 = speed, $08 = max height ;=================================================================================================== -Sprite_Bouncetowardplayer: +Sprite_BounceTowardPlayer: JSL Sprite_MoveAltitude DEC.w $0F80,X : DEC.w $0F80,X @@ -113,7 +113,8 @@ Sprite_Bouncetowardplayer: LDA.b $08 : STA.w $0F80,X ; set height from 08 - LDA.b $09 + ;LDA.b $09 + LDA.b #$20 JSL Sprite_ApplySpeedTowardsPlayer @@ -136,4 +137,95 @@ Sprite_BounceFromTileCollision: LDA.w $0D40,X : EOR.b #$FF : INC : STA.w $0D40,X INC.w $0ED0,X -++ RTL \ No newline at end of file +++ RTL + +; ============================================================================== + +MovieEffectTimer = $7EF500 ;0x01 + +;these need to be the same as the next set +;used to do the HDMA +MovieEffectArray = $F900 ;0x0F +MovieEffectBank = $7E + +;used to set the actual values +MovieEffect0 = $7EF900 ;0x01 +MovieEffect1 = $7EF901 ;0x01 +MovieEffect2 = $7EF902 ;0x01 +MovieEffect3 = $7EF903 ;0x01 +MovieEffect4 = $7EF904 ;0x01 +MovieEffect5 = $7EF905 ;0x01 +MovieEffect6 = $7EF906 ;0x01 +MovieEffect7 = $7EF907 ;0x01 +MovieEffect8 = $7EF908 ;0x01 +MovieEffect9 = $7EF909 ;0x01 +MovieEffectA = $7EF90A ;0x01 +MovieEffectB = $7EF90B ;0x01 +MovieEffectC = $7EF90C ;0x01 +MovieEffectD = $7EF90D ;0x01 +MovieEffectE = $7EF90E ;0x01 + +SetupMovieEffect: +{ + ;setup HDMA RAM + ;Top Dark Row + LDA.b #$01 : STA.l MovieEffect0 + LDA.b #$00 : STA.l MovieEffect1 + + ;Top Dark Row Buffer + LDA.b #$1F : STA.l MovieEffect2 + LDA.b #$0F : STA.l MovieEffect3 + + ;Middle Unaffected Area + LDA.b #$50 : STA.l MovieEffect4 + LDA.b #$0F : STA.l MovieEffect5 + LDA.b #$50 : STA.l MovieEffect6 + LDA.b #$0F : STA.l MovieEffect7 + + ;Bottom Drak Row Buffer + LDA.b #$1F : STA.l MovieEffect8 + LDA.b #$0F : STA.l MovieEffect9 + + ;Bottom Dark Row + LDA.b #$01 : STA.l MovieEffectA + LDA.b #$00 : STA.l MovieEffectB + + ;Below screen + LDA.b #$20 : STA.l MovieEffectC + LDA.b #$0F : STA.l MovieEffectD + + ;End + LDA.b #$00 : STA.l MovieEffectE + + ;start timer + LDA.b #$01 : STA.l MovieEffectTimer + + RTS +} + +; ; ============================================================================== + +MovieEffect: +{ + REP #$20 + LDX #$00 : STX $4350 ;Set the transfer mode into 1 byte to 1 register + LDX #$00 : STX $4351 ;Set register to 00 ($21 00) + + LDA.w #MovieEffectArray : STA $4352 ;set address of the hdma table + LDX.b #MovieEffectBank : STX $4354 ;set the bank of HDMA table + + SEP #$20 + LDA.b #$20 : STA $9B ;Do the HDMA instead of $420C + + ; LDA $9B : ORA #$20 : STA $9B + ; LDA.b #$02 : STA $13 ;controls the brightness of the screen + + RTS + + HDMATable: ;values cannot go above 80 or it will read as continuous mode + db $20, $00 ;for $20 line set screen brightness to 0 + db $50, $0F ;for $A0 line set screen brightness to 15 full + db $50, $0F ;for $A0 line set screen brightness to 15 full + db $3F, $00 ;for $20 line set screen brightness to 0 + db $00 ;end the HDMA +} \ No newline at end of file