diff --git a/Docs/Digging treasure HEX.TXT b/Docs/Digging treasure HEX.TXT new file mode 100644 index 0000000..94d2b4e --- /dev/null +++ b/Docs/Digging treasure HEX.TXT @@ -0,0 +1,53 @@ +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 new file mode 100644 index 0000000..1bd3891 --- /dev/null +++ b/Docs/PW shovel HEX.txt @@ -0,0 +1,144 @@ +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) + +