630 Commits

Author SHA1 Message Date
95edc6802d Update Hyrule Castle basement supertile to show platform 2026-01-23 03:58:08 -06:00
35bb076412 Fix kakariko music transition not happening 2026-01-21 18:23:47 -06:00
cc88f285f9 Add goal for total bosses including aga 2026-01-21 08:51:51 -06:00
03dc7b9d6d Show boss kills if hud bit set in door rando 2026-01-20 22:05:20 -06:00
30319ce476 Dark rooms don't show up on map with only visitation 2026-01-19 13:36:33 -06:00
ccc3e38b97 Fix hera staircase and desert triple connector tile 2026-01-18 18:20:09 -06:00
973bf35666 Fix multi pot loot icons, replace ugly slanted 10/11 2026-01-18 16:56:17 -06:00
ad1860147a More GK refactors 2026-01-18 11:18:56 -06:00
0b27d0f477 Big rename of gk files 2026-01-18 10:48:02 -06:00
798ee3fdd0 Remove mappable doors stuff 2026-01-18 07:57:41 -06:00
a3bc7dea0e Print label of end of bank B9 2026-01-18 06:59:46 -06:00
94ccbb70dc Fix pot junk not showing as uncollected 2026-01-17 13:56:20 -06:00
e2614b6f75 Fix check for overlord (which fixes boomerang chest guard) 2026-01-17 13:30:37 -06:00
9e2b148a57 Fix light cone not showing after torches extinguish 2026-01-16 18:27:32 -06:00
f8cc7d2ef8 Fix a chest in incorrect section 2026-01-16 15:44:05 -06:00
d504e33d52 Show button help on map screen 2026-01-16 14:36:43 -06:00
043a2d83b2 Add tier of item value for maps 2026-01-15 19:03:13 -06:00
8f75b8ec71 Merge branch 'GKNew' into FancyDoorsMap 2026-01-15 04:07:27 -06:00
420f2477fc Invert bitfield for pseudoflute 2026-01-15 04:05:30 -06:00
727c265811 Fix/update (de)compress utils 2026-01-15 03:37:02 -06:00
32e7fe5454 Small bugfixes 2026-01-15 03:28:46 -06:00
2c601d2fc7 More split rooms, hide boss icon in HC, fix loot bug 2026-01-14 13:10:12 -06:00
902e14b3f4 Bugfixes! 2026-01-13 18:57:55 -06:00
a011bc9f4a Allow switching dungeons in doors mode 2026-01-13 11:00:31 -06:00
633453f386 Press Select for next entrance 2026-01-13 09:34:04 -06:00
831e6cc27f SW Pot Prison 2026-01-13 00:38:34 -06:00
8e45ef1bd2 Section off drops and warps, add more sections 2026-01-13 00:28:25 -06:00
9c5f0dd5f5 More separate-section implementation 2026-01-12 22:28:54 -06:00
17939339bc Start tracking separated sections 2026-01-12 20:30:08 -06:00
91fab07e5c Clean up CanSeeConnector 2026-01-12 16:39:32 -06:00
cacc640a4f Draw entrances 2026-01-12 16:24:22 -06:00
c38b3b6d0a Conditionally draw staircase labels 2026-01-12 15:49:09 -06:00
fcf17a6dff Fix ordering of several edges and spiral staircases 2026-01-12 14:37:42 -06:00
06aa3cb10f Fix some UI infinite loops 2026-01-11 22:25:03 -06:00
970d1f5db0 Show stairs, warps, and drops in doors map 2026-01-11 21:42:48 -06:00
e56b8a55fe Do not show unknown connectors 2026-01-11 06:05:46 -06:00
78eb8916fc Show boss icon 2026-01-11 05:04:39 -06:00
60c852bfa9 Rearrange gfx slightly 2026-01-11 04:12:07 -06:00
36a8eaee89 Handle In-Room staircases 2026-01-11 04:03:52 -06:00
527041b81b Show loot in doors map 2026-01-10 21:21:19 -06:00
5e7c4a65b8 Allow moving through doors map 2026-01-10 20:17:29 -06:00
1776daa43d Draw triple connections correctly 2026-01-10 14:44:15 -06:00
610607ece4 Refactor and open edges 2026-01-10 00:48:22 -06:00
278e428658 First steps 2026-01-09 13:45:00 -06:00
63065e34b7 Update supertile shapes 2026-01-07 20:56:14 -06:00
ba9f0c7555 Fix incorrect dungeon reminder appearing briefly out of map 2026-01-07 20:21:20 -06:00
aae220fb46 Update supertiles, fix incorrect linkpoint 2026-01-07 20:09:35 -06:00
a7c7fc4394 Map tile updates 2026-01-07 13:34:28 -06:00
b2b23b047f Remove custom sheet d4 2026-01-07 12:04:19 -06:00
3964c34658 Move loot icons to sheet with connectors 2026-01-07 12:00:16 -06:00
8cf0059f84 compress util takes offset and length parameters 2026-01-07 11:44:26 -06:00
0a98db7025 Clear unseen connections in custom map mode 2026-01-07 06:12:43 -06:00
bdb1272cb2 Clean up macros somewhat 2026-01-07 05:30:49 -06:00
d5917afb64 Read map data from bank $B9 in custom map mode 2026-01-07 05:12:07 -06:00
72e126a1b6 Separate sheet for door connections beginning 2026-01-06 18:16:20 -06:00
7764682f95 square connector? idk 2026-01-06 10:33:17 -06:00
b3f35f274b Draw door connections? prototype??? 2026-01-05 23:25:51 -06:00
5574eea4c7 WIP 2026-01-05 20:06:50 -06:00
d918e571ab Rearrange some tiles 2026-01-05 06:06:02 -06:00
23edb9a3e6 Supertile shapes, small fixes 2026-01-04 23:02:21 -06:00
21c6d0acfd Many more supertile tweaks 2026-01-04 12:23:56 -06:00
f75db2cac8 AlwaysShowCompass setting 2026-01-04 09:15:10 -06:00
fd8852d866 Lots of bugs fixes and supertile updates 2026-01-04 09:03:23 -06:00
7fc7c8fe0b Full words in supertile shapes file 2026-01-03 17:12:39 -06:00
7a12032067 More supertile shape updates 2026-01-03 13:19:29 -06:00
3489af82fa Add dungeon indicator lettering to maps 2026-01-03 09:58:23 -06:00
fecf9547a5 Sprites for entrances and update supertile shapes 2026-01-03 09:20:51 -06:00
688300d21a Tile warps on map 2026-01-02 17:29:57 -06:00
9b4d79247f Update supertile shapes 2026-01-02 15:01:12 -06:00
1b43799e6e Fix pot shuffle, implement map settings 2026-01-02 03:37:02 -06:00
58db28f8bf Check dungeon prizes, tweak gfx 2025-12-31 12:17:43 -06:00
443080c482 ShowItems settings 2025-12-31 00:21:40 -06:00
10ced3c9c6 Big pass at dungeon item indicators 2025-12-30 21:56:48 -06:00
9a40f28a86 Rename dungeonmap.asm -> bossicons.asm 2025-12-30 16:36:55 -06:00
8de358d99f (de)compression src fixes and windows binaries 2025-12-30 16:35:43 -06:00
1ba813f068 Add src and linux binaries for (de)compression code 2025-12-28 14:30:49 -06:00
13372307c2 Include bosses in option to make baserom playable 2025-12-28 14:29:18 -06:00
63e8d5687b Fix timer and add drop-to-ganon mode 2025-12-14 11:10:23 -06:00
a6ad4c082b Finish pseudoflute 2025-12-13 22:48:03 -06:00
74d9c72cc8 Pseudoflute 2025-12-13 19:06:11 -06:00
18a73e3b88 Add flag to make the baserom work 2025-12-12 21:33:08 -06:00
4f0703ea62 Merge remote-tracking branch 'codemann/OWMain' into GKNew 2025-12-12 18:16:07 -06:00
codemann8
a97f8fbb48 Merged in DR v1.5.2 2025-12-09 16:44:50 -06:00
aerinon
ac7f50fc62 fix: revert to old way 2025-12-09 14:43:47 -07:00
codemann8
dd9ea4d38e Merge branch 'DRUnstable' into OWMain 2025-12-09 09:23:48 -06:00
codemann8
5b7a4c11ed Fixed issue with bonk drops not showing sparkles in DW 2025-12-08 20:40:39 -06:00
aerinon
4437194cfe fix: key counts again 2025-12-08 16:37:51 -07:00
codemann8
0d827eadd2 Merge branch 'DRUnstable' into OWMain 2025-12-04 19:12:35 -06:00
aerinon
fca7f214bc fix: key counts for pot keys and normal absorbed keys 2025-12-04 15:37:02 -07:00
codemann8
a277fb12ac Completed Rain State fixes for Bonk Drops 2025-12-04 12:39:19 -06:00
codemann8
1242198bea Merged in DR v1.5.0 2025-12-03 10:53:43 -06:00
codemann8
96333b22a2 Fixed cucco storm to actually work on first trigger 2025-12-03 10:11:47 -06:00
codemann8
4f4f483647 Completed Rain State fixes for Bonk Drops 2025-12-03 10:10:14 -06:00
codemann8
dfe49a11c4 Merged in DR v1.5.0 2025-12-03 10:09:50 -06:00
codemann8
581e45a63c Merge branch 'DRUnstable' into OWMain 2025-12-03 09:37:31 -06:00
aerinon
b583cc58ff fix: not sure what I was thinking - fix branches and width 2025-12-02 11:09:37 -07:00
KrisDavie
761365927f Prevent prizes dropping in dungeons where they shouldn't (including cave state) and fix rain state items/tablets. 2025-12-02 08:28:08 -07:00
aerinon
68c511d6be fix: skip map check based on "compass" mode 2025-12-02 08:26:33 -07:00
codemann8
94efc26bf3 Merge branch 'limited' into OWMain 2025-12-02 08:57:32 -06:00
codemann8
029f687470 Merge branch 'limited' of https://github.com/codemann8/z3randomizer into limited 2025-12-02 08:57:16 -06:00
codemann8
4dd7bac4d6 Fixed cucco storm to actually work on first trigger 2025-12-02 08:56:53 -06:00
codemann8
1368e15872 Merge branch 'limited' into OWMain 2025-12-01 23:45:56 -06:00
codemann8
2fa0bfc4ef Fixed cucco storm to actually work on first trigger 2025-12-01 23:45:31 -06:00
codemann8
2418c1b322 Fix for post-mirror follower sprite gfx 2025-11-22 06:52:45 -06:00
codemann8
00fb9e6c5d Adding compress/decompress script for use with gfx 2025-11-21 09:20:59 -06:00
aerinon
5936b08497 fix: skip map check only when maps aren't shuffled 2025-11-20 10:04:53 -07:00
aerinon
70a23191ba fix: bunch of fixes for key counting system 2025-11-19 16:29:40 -07:00
codemann8
d21daccf4c changed TF item to use its own gfx id 2025-11-19 08:56:12 -06:00
codemann8
7b93b4b4eb Added new gfx for 10/11 keys rather than A/B keys 2025-11-18 23:54:10 -06:00
aerinon
fee689e583 feat: hud shows all keys, instead of chest keys. Dropped Map requirement for key info. 2025-11-18 15:19:28 -07:00
aerinon
08ecc9b673 feat: pot lose coloring upon collection
fix: normal lamp cone
2025-11-18 10:43:16 -07:00
codemann8
d451b531e7 Added default VRAM values for OWR edge data 2025-11-18 06:09:33 -06:00
aerinon
7f7ffeb5fb feat: lamp cone bitmask settings 2025-11-14 14:37:15 -07:00
aerinon
b27d7c996b feat: enemy "spies" during enemy drop 2025-11-14 09:06:07 -07:00
codemann8
57b8b04f0b Merged in DR v1.4.11 2025-11-13 19:21:33 -06:00
codemann8
7334dd02db Fix to allow VRAM corruption in Blind fight 2025-11-12 10:04:21 +01:00
codemann8
0fdec905d6 Fix to allow VRAM corruption in Blind fight 2025-11-12 02:29:01 -06:00
codemann8
f91e2eb1a2 Re-fixed purple chest follower dupe 2025-11-08 11:12:09 -06:00
codemann8
5a802eda70 Fixed issue with GT Cutscene freezing 2025-11-08 10:29:41 -06:00
codemann8
4d3c2bd7dc Added custom gfx for Ped and Murahdahla 2025-11-03 10:59:08 -06:00
codemann8
fa72adb53d Restore Kodongo AI when in vanilla rooms 2025-10-31 10:37:09 -06:00
codemann8
b24e440597 Fix issue with music silence in DR when straight stairs lead to pre-Aga room 2025-10-31 10:36:23 -06:00
aerinon
44b014fc65 fix: fix for pot drops at sprite limit 2025-10-31 10:29:29 -06:00
codemann8
78fa8b7dd9 Fixed Bosses goal condition check 2025-10-31 01:00:56 -05:00
codemann8
db62d4c660 Fixed issue with Locksmith despawning after purple chest turn-in when a follower is stored 2025-10-29 15:01:47 -05:00
codemann8
2ffcb1c3bd Implemented Custom Goal Framework 2025-10-29 00:08:16 -05:00
codemann8
a9ef09e2d0 Fixed Ganon silvers hint for free-standing items 2025-10-18 02:26:42 -05:00
codemann8
dfc182a2d5 New fix for pot drops when at sprite limit 2025-10-14 11:35:07 -05:00
codemann8
a8b1fc989e Fixed pogdor (frogdor at PoD entrance) with Kiki following while exiting at PoD 2025-09-21 13:40:51 -05:00
codemann8
c3616f2d65 Fixed issue with Duck overwriting GT cutscene gfx 2025-09-21 13:38:02 -05:00
codemann8
912df0be14 Re-fixed old man spawn on pyramid issue 2025-09-07 10:47:23 -05:00
codemann8
2ed9de827b Some follower fixes to support Zelda in TT Prison 2025-09-07 10:47:23 -05:00
9b7e5646b3 Improve junk item configuration 2025-09-05 20:47:36 -05:00
e4f9c4cffc Add variable ganon vulnerability mode 2025-09-03 19:53:10 -05:00
cef41b1674 Merge branch 'OWMain' into GKNew 2025-09-01 10:56:43 -05:00
codemann8
060554a5fb Implemented ability to change GT cutscene gfx 2025-08-25 15:20:36 -05:00
codemann8
e236543180 New gfx for chicken item 2025-08-19 10:17:04 -05:00
codemann8
ea4f39e116 Corrected some music fade-outs during mosaic transitions 2025-08-19 10:16:16 -05:00
codemann8
8ac480947d Fix for music so it doesn't change when going into special OW screens 2025-08-19 10:12:05 -05:00
codemann8
11ff5825ae Fix music change after dig game ends 2025-08-19 10:10:51 -05:00
codemann8
34fa1cd98e Fix issue with music silence in DR when straight stairs lead to pre-Aga room 2025-08-19 10:10:08 -05:00
codemann8
4c5adfbee2 Fix issue with LH/BS half volume issue when exiting to Kakariko 2025-08-19 10:08:36 -05:00
02b07528bb Merge branch 'OWmain' into GKNew 2025-07-22 11:33:34 -05:00
codemann8
6566aa6d48 Restore Kodongo AI when in vanilla rooms 2025-07-13 00:27:22 -05:00
codemann8
7164c3159d Fix crash when Old Man exits out of his House entrance 2025-07-11 04:54:28 -05:00
codemann8
d75d912c7d Added some compass icons to DR pause menu 2025-07-10 22:59:51 -05:00
codemann8
953c115719 Fix HUD to show prize, key count, and compass count if seen by player 2025-07-07 15:03:14 -05:00
9256f48f5e Merge branch 'OWMain' into GKNew 2025-07-01 14:08:48 -05:00
codemann8
1995d8747c Fixed issue with Quake scaring Kiki 2025-06-13 23:39:32 -05:00
codemann8
d8341c650d Fixed issue with Kiki running away at maze if Link spawns from Sanc 2025-06-12 10:28:38 -05:00
codemann8
021ba9d8a6 Actual fix for issue with no music in LH after S+Q from Kakariko 2025-06-12 01:50:21 -05:00
codemann8
4088698af9 Undo MSU Kak Music Fix 2025-06-12 00:54:23 -05:00
codemann8
d19e22cc7d Fix issue with Boots not showing in menu until S+Q 2025-06-10 02:47:08 -05:00
codemann8
e266d351cd Fix issue with despawning follower sprite after purple chest item get 2025-06-08 14:34:16 -05:00
codemann8
baec6954a3 Reset MSU Resume on S+Q 2025-06-05 20:52:13 -05:00
codemann8
faadd1d7f1 Fixing boss behavior in Swamp Palace Arrghus' room 2025-06-05 19:50:49 -05:00
2344f9490e copy skulls manually instead of DMA 2025-05-18 02:56:13 -05:00
642aec9112 Fix gloom heart icons to be loaded via DMA 2025-05-18 02:32:39 -05:00
bc0f396275 Challenge modes: OHKO and Gloom 2025-05-18 00:59:34 -05:00
codemann8
936ff5a882 Locksmith follower now behaves closer to vanilla 2025-05-16 22:20:48 -05:00
a3f892975f Merge branch 'OWMain' into GKNew 2025-05-04 15:18:54 -05:00
codemann8
86efa74185 Various bug fixes for Follower Shuffle post-launch
- Fix issue with infinite purple chest item get
- Fix issue with Kiki running away on iframe ledge hops
- Fix issue with bad follower gfx on screens with followers
- Fix issue with Zelda appearing in conditional follower locations
2025-05-04 09:24:33 -05:00
codemann8
7b4470ddae Merge branch 'DRUnstable' into OWMain 2025-04-30 06:58:20 -05:00
codemann8
2d84f7431e Minor consistency 2025-04-30 06:48:54 -05:00
codemann8
ed7fb312d5 Fixed some incorrect bunny music behavior 2025-04-30 06:26:33 -05:00
codemann8
aabb649578 Initial Follower Shuffle Implementation 2025-04-30 06:18:08 -05:00
aerinon
e86cccad52 fix: fix conveyor bug, unless Helmasaur is present 2025-04-28 14:15:31 -06:00
e92aa018e3 Multiworld junk item shortening 2025-03-17 19:02:02 -05:00
66e4e91beb Dashing mimics and crystal books 2025-03-09 16:42:54 -05:00
bc966c0f99 Dark room modes 2025-03-09 13:25:22 -05:00
codemann8
0bb4d6579e Fix issue with cavestate not showing collected items in dark rooms 2025-02-18 21:49:01 -06:00
codemann8
f50b347aed Fixed VRAM crash on map check 2025-02-16 12:11:07 -06:00
codemann8
160a6c3550 Fixed incorrect ganon silvers hint 2025-01-19 01:29:26 -06:00
codemann8
b06ae7e054 Merge branch 'DRUnstable' into OWMain 2025-01-15 21:41:34 -06:00
codemann8
d42417657b Allow flute use in rain state if weathervane is activated 2025-01-08 08:37:22 -07:00
codemann8
9cbcd33d70 Fixed issue with MapCountDisplay flags not getting set when entering a dungeon and maps aren't wild 2025-01-05 05:33:39 -06:00
codemann8
72b7dea6fd Allow flute use in rain state if weathervane is activated 2025-01-02 04:52:03 -06:00
codemann8
94f8bec8ae Revert "Fixed issue with vanilla HCBK acting like a small key"
This reverts commit d3eb4c229f.
2025-01-02 03:28:31 -06:00
codemann8
51ee4f94c2 Added ability to suppress dungeon item textboxes when items appear in their respective dungeons 2024-12-25 22:56:05 -06:00
codemann8
2e0eb97a4b Fixed rare crash during music transition 2024-12-14 14:11:11 -06:00
codemann8
274ef3f39d Improved Psuedoboots 2024-12-13 16:52:20 -06:00
codemann8
3b41876887 Yet another fix for Hera boss music 2024-11-10 11:24:31 -06:00
codemann8
d3eb4c229f Fixed issue with vanilla HCBK acting like a small key 2024-10-30 10:20:51 -05:00
codemann8
4b98d44820 Merge branch 'DRUnstable' into OWMain 2024-10-15 18:45:40 -05:00
aerinon
a1044baf41 fix: sanc & quit fix 2024-10-10 08:27:18 -06:00
codemann8
c0ba9ee79f Fixed issue with items not showing in dark rooms 2024-09-18 11:36:18 -05:00
codemann8
9e84707f13 Fixed crash on pedestal pull 2024-09-03 10:02:10 -05:00
codemann8
a7af829159 Fix issue with Potion Shop prices drawing on top of Link 2024-08-29 01:06:36 -05:00
codemann8
bee67e66fb Fix weird palette issue during item collection inside Potion Shop 2024-08-29 01:06:09 -05:00
codemann8
d3c2a27ca5 Fix bad screen scroll issue when failing water entry in Zora's Domain 2024-08-28 22:12:25 -05:00
codemann8
cf6268fd1e Fix GFX for small magic drop 2024-08-28 22:11:50 -05:00
codemann8
5a78fa8420 Fix red crystal gfx in dark rooms 2024-08-27 10:05:48 -05:00
codemann8
d664587220 Fix Hera Cage enemy drops being off center 2024-08-27 09:02:20 -05:00
codemann8
46bf02f7ca Fix for post-Aga GFX, bandaid fix for decompression on boot 2024-08-27 07:19:33 -05:00
codemann8
8630b36ef1 Fix black custom palette GFX on item collection 2024-08-27 07:18:18 -05:00
codemann8
a686a718c7 Show shadow on hidden enemies if enemy drops enabled 2024-08-27 07:16:11 -05:00
codemann8
b3979affc9 Don't delete follower on crystal cutscene if prize shuffle 2024-08-27 07:15:18 -05:00
codemann8
8b827c3745 Attempt to fix issue with no music in LH after S+Q from Kakariko 2024-08-27 07:14:19 -05:00
codemann8
23943f2234 Fix some music issues 2024-08-27 07:12:57 -05:00
codemann8
a5dfd97687 Merged in DR v1.4.5 2024-08-16 23:00:45 -05:00
codemann8
f750b7cb06 Hera basement key double counting fix 2024-08-16 21:46:18 -05:00
codemann8
c7c97196fb Fixed issue with drawing A items on HUD with DR menu 2024-08-16 21:41:43 -05:00
aerinon
cbfd77d812 change: warn when certain address change for the credits (they break the generator) 2024-07-02 08:47:49 -06:00
aerinon
86c970dc3a fix: some bytes designations on moved variables 2024-06-21 11:37:56 -06:00
aerinon
8e306f1379 fix: updatehudflag refs 2024-06-18 11:53:18 -06:00
aerinon
024746d78f Merge remote-tracking branch 'upstream/master' into DRUnstable 2024-06-18 11:50:26 -06:00
aerinon
aa3c8a232b fix: hera basement cage counting multiple times, again 2024-06-17 17:17:07 -06:00
aerinon
6e327c951f feat: couple nice to haves for mirror scroll & fake boots 2024-06-14 17:04:30 -06:00
aerinon
bc7cd584e3 feat: pseudoboots indicator 2024-06-14 15:09:22 -06:00
Lexi Rose
86f641b710 Merge pull request #217 from hiimcody1/pseudoboots-visibility
Add indicator for pseudoboots to File Select screen
2024-06-13 13:36:07 -07:00
Lexi Rose
cc309ecb48 Merge pull request #215 from ardnaxelarak/use_text_table
Replace long sequences of dbs with strings using a text table
2024-06-10 08:07:46 -07:00
hiimcody1
474cfba250 Add indicator for pseudoboots to File Select screen 2024-06-08 21:29:20 -04:00
codemann8
016ccfd687 Adding collected prizes to map check in prize shuffle 2024-05-30 22:52:19 -05:00
codemann8
d87a88fefd Fixed incorrect red crystal gfx from item receipt 2024-05-30 16:42:02 -05:00
codemann8
9de69d0313 Added flute cancel X gfx to flute map 2024-05-30 16:41:13 -05:00
codemann8
2b38f847bb Changing LW dungeon icons to letters 2024-05-29 19:22:00 -05:00
codemann8
6be3f57977 Adding crystal numbers to prizes in map check 2024-05-29 19:21:24 -05:00
codemann8
879b02387e Fixed issue with HP refill canceling out of post-boss cutscene 2024-05-29 16:16:05 -05:00
codemann8
07b0333d51 Hiding dungeon icons on OW map check if Prizes are wild 2024-05-29 03:38:23 -05:00
codemann8
3deca59f2e Adding colorblind friendly red crystal gfx 2024-05-29 03:36:56 -05:00
codemann8
f933849fbf Last Prize Shuffle changes 2024-05-25 03:13:26 -05:00
codemann8
c9f6971cee Merge branch 'DRUnstable' into OWMain 2024-05-23 20:30:24 -05:00
codemann8
f9da730caf Initial Prize Shuffle Implementation 2024-05-23 18:23:26 -05:00
aerinon
0157c5d05b fix: hera basement can now use AddInventory's chest key counter 2024-05-09 14:34:48 -06:00
codemann8
b76d440958 Reimplemented part of the TF Cutscene for new item code 2024-04-30 07:50:38 -05:00
codemann8
ad5eafec61 Fix issue with GT Inverted Map not correctly opening GT 2024-04-21 09:30:47 -05:00
codemann8
50895c1ac2 Potential fix for weird bonk item dupe onto other standing items 2024-04-21 00:50:38 -05:00
codemann8
0d84af814a Merged in DR v1.4.1.10 2024-04-18 09:47:17 -05:00
codemann8
c465ff61dc Fixed issue with Aga transition not restoring vanilla gfx 2024-04-18 09:13:27 -05:00
codemann8
a45f92123a Changed bee refill gfx to be non-animating 2024-04-13 10:16:29 -05:00
codemann8
e71c7641b5 Swap some table variables to match upstream 2024-04-13 10:15:49 -05:00
codemann8
b22d618323 Fixed issue with Flute Cancel in OW Layout Shuffle 2024-04-13 03:18:26 -05:00
aerinon
e12af76559 Fix ChestTurnCounter not incrementing if item belongs to another world 2024-04-12 16:15:33 -06:00
codemann8
d75c72f85d Some byte designation corrections + formatting 2024-04-12 15:58:09 -06:00
codemann8
2367f16179 Formatting and notation 2024-04-10 04:26:17 -05:00
codemann8
279a0ad030 Various GFX fixes 2024-04-10 03:17:03 -05:00
codemann8
d34cb70444 Bee traps for other MW players in shops will not disguise 2024-04-10 03:16:38 -05:00
codemann8
f58277eb55 Fixed issue with MW items awarding player with item 2024-04-10 03:13:23 -05:00
codemann8
bbbc3b1420 Fixed fake world handling for glitched modes 2024-04-10 03:12:49 -05:00
codemann8
27685ac77d More merge labeling 2024-04-09 13:24:54 -05:00
codemann8
0339e09b5d Formatting 2024-04-09 09:26:27 -06:00
codemann8
a70251d2b2 Applied labels and byte designators 2024-04-09 09:26:27 -06:00
codemann8
2e2b493240 Removing FastROM duplicates 2024-04-09 09:26:27 -06:00
codemann8
9cfeb18fef Merged in DR v1.4.1.9 2024-03-30 04:30:56 -05:00
codemann8
9178309286 Minor consistency 2024-03-30 04:20:31 -05:00
aerinon
f25c9dd4c4 fix: dungeon indicator changes 2024-03-28 13:14:15 -06:00
codemann8
e15585c184 Slight correction for old OWR initial implementation 2024-03-25 21:46:52 -05:00
codemann8
8cfa94b49e Changed bee refill gfx to be just a bee 2024-03-25 21:45:44 -05:00
codemann8
b71b48b4b1 Restructured GFX drawing routine to a more generic approach 2024-03-25 14:29:00 -05:00
codemann8
6e4b109058 Bee Trap to not be disguised if for another player 2024-03-24 17:49:37 -05:00
codemann8
c9144cd707 Bonk sparkles to not accumulate during medallion animation 2024-03-24 17:48:27 -05:00
codemann8
4b332c35a4 Removed unneeded MiniGameTimer setting 2024-03-24 17:47:39 -05:00
codemann8
495a8c93f7 Removed unused superbunny mirror bonk freeze code 2024-03-24 17:42:34 -05:00
codemann8
e82006e030 Fix gfx issue with Catfish item spawning off screen 2024-03-21 07:11:46 -05:00
codemann8
a97705ccd9 Added better item animation structure 2024-03-21 05:38:24 -05:00
codemann8
26d9ea5522 Fixed issue with item gfx not transferring to VRAM 2024-03-21 05:32:40 -05:00
codemann8
36f930d42c Various cleanup 2024-03-20 17:47:16 -05:00
codemann8
c0e7343e9b Fix issue with bonk items not updating HUD on location clear 2024-03-20 17:46:59 -05:00
codemann8
6606835eb9 Fix issue with animated items not animating 2024-03-20 17:46:30 -05:00
codemann8
56e6319c45 Various GFX fixes 2024-03-20 17:45:48 -05:00
codemann8
859cfcc275 Fix for Hera Basement key for this dungeon not displaying correctly 2024-03-20 17:44:29 -05:00
codemann8
e34466e214 Fix issue with GFX not clearing out of dynamic drop gfx slots 2024-03-20 17:44:01 -05:00
codemann8
460cccbddd Fix issues with item shadows 2024-03-20 17:43:20 -05:00
codemann8
0392503049 Fix issue with palette not loading in GT Torch/Hera Basement 2024-03-20 17:41:58 -05:00
codemann8
12a825a0fe New GFX for bee traps and others 2024-03-20 17:41:11 -05:00
codemann8
b9da56c8ad Added flag to skip bee trap disguises in various scenarios 2024-03-20 17:38:57 -05:00
codemann8
56def59f58 Fix invisible powder item 2024-03-20 17:34:12 -05:00
codemann8
7f223a872c Fix incorrect GitHub merge 2024-03-16 00:30:08 -05:00
codemann8
ba44924d11 Merged in DR v1.4.1.8 2024-03-16 00:18:53 -05:00
codemann8
068d97f99b Fixed issue with Flute Cancel code using RAM claimed from upstream 2024-03-15 21:09:10 -05:00
aerinon
364fd81a93 fix: minor drops shouldn't drop if outside of proper dungeon 2024-03-14 13:28:54 -06:00
aerinon
0d18000070 feat: new tiles for dungeon indicators 2024-03-11 16:57:19 -06:00
codemann8
2e541a8778 GitHub sucks, so heres a merge commit 2024-03-01 14:03:23 -06:00
codemann8
a008406fde Implmented New Item GFX System 2024-03-01 14:00:10 -06:00
codemann8
59eb254116 Merged in DR v1.4.1.6 2024-03-01 13:55:23 -06:00
codemann8
8135e9085f Merged in DR v1.4.1.6 2024-02-23 11:42:02 -06:00
codemann8
75fd81ab57 Merged in DR v1.4.1.6 2024-02-23 11:11:59 -06:00
29d241bcbe Replace long strings of dbs with using a text table 2024-02-20 23:04:25 -06:00
Lexi Rose
dcb0a2b42d Merge pull request #214 from crossedstaves/master
Bomb count fix
2024-02-18 08:41:39 -08:00
crossedstaves
de8703e13f Update retro.asm
Fix to erroneous infinite bomb count
2024-02-17 16:27:42 -06:00
sporchia
2daa8daaae some register issues 2024-02-17 14:24:25 -06:00
aerinon
16d249859f fix: issues around item substitution for harder difficulties 2024-02-07 15:15:22 -07:00
aerinon
ed8cefe0c6 fix: bad branch, bad org, dead code, bad args flags 2024-02-07 12:36:54 -07:00
codemann8
de5e83c172 Moving credits files to new location 2024-01-28 04:57:42 -06:00
aerinon
23f839cced fix: swamola issue with cached sprites
refactor: move some hooks
2024-01-26 11:33:32 -07:00
aerinon
50dec603e2 fix: duplicate code 2024-01-25 11:04:16 -07:00
aerinon
fc08fa33c8 Merge branch 'DRVolatile' into DRUnstable 2024-01-22 11:00:36 -07:00
aerinon
8d87e70e18 fix: shifted enemizer flag table defaults correctly 2024-01-17 13:11:01 -07:00
Randall Rupper
8654719572 feat: text speed up
refactor: code clean up

typo
2024-01-16 16:20:33 -07:00
Lexi Rose
ce8497e3d2 Merge pull request #213 from spannerisms/fixes
MSU, etc fix
2024-01-15 21:29:34 -06:00
spannerisms
014b3a719a fix things 2024-01-04 06:45:57 -05:00
Randall Rupper
8c080c81a6 refactor: clarify StandardAgaDmg code paths 2024-01-03 11:06:00 -07:00
KrisDavie
660674c051 Add toggle to override aga1 invulnerability in standard 2024-01-03 10:53:22 -07:00
Randall Rupper
553fb272a0 fix: remove terrorpin ai code 2024-01-03 10:32:47 -07:00
Randall Rupper
97f3c527b0 fix: shopsanity repeatable item fix 2024-01-02 17:57:33 -07:00
Lexi Rose
85581b6813 Merge pull request #212 from cassidoxa/bonkkey
Update HUD when picking up bonk key
2024-01-02 11:33:56 -06:00
cassidoxa
cec4e0430b Fix narrow heart piece sprite shadow flickering 2024-01-02 00:26:12 -05:00
cassidoxa
d81a19c367 Update HUD when picking up bonk key 2024-01-01 22:29:14 -05:00
codemann8
3b3a153ebe Adding sparkles to Bonk Drop locations 2023-12-31 03:11:25 -06:00
codemann8
81f0270ca4 Consolidated Bonk Drop to use shared codebase 2023-12-31 03:07:33 -06:00
Lexi Rose
88ef1f385d Merge pull request #211 from cassidoxa/prize_ancilla
Fix dungeon prize ancilla spawn regression
2023-12-28 03:36:58 -06:00
cassidoxa
7001767c9b Fix dungeon prize ancilla spawn regression 2023-12-27 11:39:00 -05:00
Randall Rupper
55f18eb108 fix: potential fix for Trinexx 2023-12-14 10:13:07 -07:00
Lexi Rose
7116cb6557 Merge pull request #210 from cassidoxa/bonkkey
Fix bonk key double count
2023-11-30 02:29:03 -06:00
cassidoxa
85e338ad67 Fix bonk key double count 2023-11-30 00:42:55 -05:00
Randall Rupper
9ac2156945 fix: MW item substitution 2023-11-22 13:13:44 -07:00
codemann8
00352cc52a Merge branch 'DRUnstable' into OWMain 2023-11-18 14:44:10 -06:00
Randall Rupper
687f6b25bd Build script update 2023-11-15 15:10:25 -07:00
Randall Rupper
81cbc5d2ed Ignore 2023-11-15 15:10:25 -07:00
Randall Rupper
52325979a7 fix: YA Hera Boss music fix 2023-11-15 15:10:19 -07:00
Randall Rupper
79bdace3b3 fix: disable flute in rain state (except glitched modes)
fix(msu): GTBK music in DR
2023-11-15 14:49:29 -07:00
Randall Rupper
62356f0159 fix: disable flute in rain state (except glitched modes)
fix(msu): GTBK music in DR
2023-11-15 14:30:44 -07:00
codemann8
3cbc1ab42e Marking OW screens as visited 2023-11-08 13:50:03 -06:00
codemann8
3dfae76275 Play GT2 track in DR if GTBK is collected 2023-11-05 08:44:19 -06:00
codemann8
6de8dc606c Fix issue with incorrect track playing on DDM 2023-11-05 08:39:54 -06:00
codemann8
84992d010f Fix for playing correct track after Agas and GT cutscene 2023-11-05 08:39:13 -06:00
codemann8
43552d1a64 Fix Hera music to play correct dungeon track following a floor change 2023-10-24 07:38:06 -05:00
codemann8
a6507eea6d Fix for Hera boss music fadeout when falling 2023-10-22 16:23:43 -05:00
aerinon
f7f558cd59 Don't double count torch item. (AddInventory/Link_ReceiveItem now count properly.) Update the hud when a key is absorbed off the torch. Link_ReceiveItem already does this. 2023-10-11 12:21:06 -06:00
codemann8
68af5f735e Minor formatting and bug prevention 2023-10-10 01:29:50 -05:00
codemann8
766cc67dcd Fix heart piece dupe respawn issue 2023-10-10 01:28:20 -05:00
codemann8
70badade72 Fix for Hera boss music fadeout when falling 2023-10-10 01:26:30 -05:00
aerinon
8c384ff123 Be more proactive about which sprites to move 2023-10-06 10:40:05 -06:00
codemann8
edad66a5a8 New solution for mirror portal disabling in Crossed OWR 2023-10-01 06:12:18 -05:00
codemann8
47ce48a31a Fixed mirror sprite shown on map check in Crossed OWR 2023-10-01 06:11:27 -05:00
codemann8
f3b2719a5b Merge branch 'DRUnstable' into OWMain 2023-09-29 15:00:36 -05:00
codemann8
fdd8fedaef New solution for mirror portal disabling in Crossed OWR 2023-09-28 22:01:18 -05:00
Catobat
4c1433464e Fix issue with rooms $0124-$0127 at Tavern Back 2023-09-27 16:15:20 -05:00
codemann8
8e9b4c234b Fix Old Man death putting you on Pyramid 2023-09-27 16:09:45 -05:00
aerinon
f3768ea0ad Fix problems with mystery hidden item total
Upgrade blue enemy drop indicator to work with caves
2023-09-26 13:31:34 -06:00
Lexi Rose
032d15fba6 Merge pull request #209 from tcprescott/patreon
Names for Patreon Supporters
2023-09-22 23:43:22 -05:00
Thomas Prescott
f133ce7159 add some extra space 2023-09-22 23:09:35 -05:00
Thomas Prescott
c5d8c69396 fix PC addresses for patrons 2023-09-22 22:49:57 -05:00
Thomas Prescott
f71759754e patreon fields 2023-09-22 21:49:50 -05:00
aerinon
3f0082a771 Fix merge error on hera boss music 2023-09-20 13:39:19 -06:00
aerinon
4eaa214626 Merge branch 'DRUnstable' into DRVolatile
# Conflicts:
#	hooks.asm
#	music.asm
#	newhud.asm
2023-09-20 13:34:52 -06:00
aerinon
1290751307 Merge branch 'Catobat-TavernFix' into DRUnstable 2023-09-20 13:31:03 -06:00
aerinon
a8a1eaa1b9 Fix for counter rolling over
Fix for Lamp for another player being substituted with standing items
Fix for received keys not being counted correctly
Fix for pendants counting as items
2023-09-20 12:54:44 -06:00
Lexi Rose
507ba379cf Merge pull request #208 from cassidoxa/v31.2.0-fixes
Don't increment highest mail on final stats prep
2023-09-17 13:30:02 -05:00
cassidoxa
334f721a29 Don't increment highest mail on final stats prep 2023-09-17 12:02:54 -04:00
aerinon
c0dff8e7c9 Bugfixes for duping/disappearing item and mutliworld crash 2023-09-13 14:28:18 -06:00
aerinon
b831dd29a5 Turn off enemy drop indicator based on flag 2023-09-12 10:10:42 -06:00
aerinon
5ad0e7781e Pikit override fix
Minor drops from enemies persist
2023-09-12 08:38:18 -06:00
Lexi Rose
0fdb6ed133 Merge pull request #207 from cassidoxa/v31.2.0-fixes
Add time stamp for tossed fighter sword item
2023-09-10 01:31:32 -05:00
cassidoxa
cc36ccc0b1 Add time stamp for tossed fighter sword item 2023-09-10 00:55:03 -04:00
aerinon
23ef62522b Fix potion refills counting in shops
Bee traps - graphics upgrade
2023-09-09 16:41:44 -06:00
aerinon
b67e5c8433 Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts:
#	npcitems.asm
2023-09-09 13:13:18 -06:00
aerinon
a723fe2865 VRAM standing items 2023-09-09 13:12:05 -06:00
Lexi Rose
fcbde59a1e Merge pull request #206 from cassidoxa/v31.2.0-fixes
Fix HUD rebuild when releasing fairy
2023-09-09 04:21:01 -05:00
aerinon
f916346747 Stumpy bugfix 2023-09-08 14:55:25 -06:00
aerinon
2561737236 Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts:
#	inventory.asm
#	newhud.asm
2023-09-08 13:49:16 -06:00
cassidoxa
70758bf5c0 Set silvers bit with silvers restriction 2023-09-08 15:43:31 -04:00
aerinon
e772b4a931 Progressive Shields fix
Fix for collection rate overflow
Fix for progressive shield standing item (narrow version)
Fix for double key counts
Multiworld item substitution
Made map key coutner not depend on new flag for now
2023-09-08 13:42:22 -06:00
cassidoxa
f6842204d0 Fix BowTracking docs 2023-09-08 15:30:37 -04:00
cassidoxa
8af9c17cfe Fix stumpy double item 2023-09-08 13:57:26 -04:00
cassidoxa
57e537f12d Fix HUD rebuild when releasing fairy 2023-09-08 08:56:23 -04:00
Lexi Rose
bc3dd5c186 Merge pull request #205 from cassidoxa/v31.2.0-fixes
Fix HUD item icon not refreshing after last bomb spent
2023-09-08 02:30:29 -05:00
cassidoxa
71e86f7c1a Set our hud update flag on quickswap 2023-09-08 00:35:06 -04:00
cassidoxa
0f72e6fcec Better solution 2023-09-08 00:21:24 -04:00
cassidoxa
790f3f0ba3 Fix HUD item icon not refreshing after last bomb spent
Rename UpdateHUD to UpdateHUDFlag, replace with UpdateHUD vanilla JSR
label
2023-09-07 16:29:45 -04:00
aerinon
134651e4fb Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts:
#	LTTP_RND_GeneralBugfixes.asm
#	inventory.asm
#	itemdatatables.asm
#	newitems.asm
2023-09-07 12:21:22 -06:00
Lexi Rose
6a55fc2b12 Merge pull request #204 from cassidoxa/v31.2.0-fixes
Fix some stats counting
2023-09-07 11:50:36 -05:00
cassidoxa
7dc71cf1ac Fix some stats counting 2023-09-07 11:53:24 -04:00
Lexi Rose
5a0bd6dbe0 Merge pull request #203 from cassidoxa/v31.2.0-fixes
Rework bow tracking to assign tracking bits to non-chest sprites
2023-09-05 03:23:35 -05:00
cassidoxa
f778674b83 Rework bow tracking to assign tracking bits to non-chest sprites
Fix small key palettes to be consistent with vanilla colors
2023-09-04 22:29:50 -04:00
Lexi Rose
2e433732f8 Merge pull request #202 from cassidoxa/v31.2.0-fixes
Fix HUD heart colors on credits end screen
2023-09-04 15:15:37 -05:00
cassidoxa
4ec523c8b3 Fix HUD heart colors on credits end screen
Small fix for counting menu HUD keys for "this dungeon"
2023-09-04 13:28:51 -04:00
Lexi Rose
23b6e1ae6b Merge pull request #201 from cassidoxa/v31.2.0-fixes
Palette fix for GT Torch/Hera cage items that load new palette
2023-09-03 16:11:15 -05:00
cassidoxa
9800a86189 Palette fix for GT Torch/Hera cage items that load new palette 2023-09-03 15:39:53 -04:00
Lexi Rose
74a31f5f11 Merge pull request #200 from cassidoxa/v31.2.0-fixes
Fix active flute standing item gfx
2023-09-02 23:23:42 -05:00
cassidoxa
73b2a180ba Fix AddInventory/stats tracking with 16 bit item properties 2023-09-02 22:57:50 -04:00
cassidoxa
2cead7ae92 Fix Active flute standing item gfx
Move setting dungeon completed to prize pickup (or after aga1/aga2)
Fix some inverted tiles
Remove text-related conditional assembly
Make InventoryTable_properties 16 bits wide
Fix expanded save slot writing to cart SRAM
Fix HUD resetting with red potion
2023-09-02 15:55:37 -04:00
aerinon
9fc85218ae Fixed ExtendedSRAM not saving
Fix enemy drops and pots with Fairies/Chickens/Big Magic
Fixed Big Magic refill when in chests/standing items
Changed shop code to respect ShopEnableCount flag
2023-09-01 14:13:01 -06:00
aerinon
aecc65595e Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts:
#	bookofmudora.asm
2023-09-01 11:37:46 -06:00
Lexi Rose
6fbce240b8 Merge pull request #199 from cassidoxa/decompressed
Fix for item receipt after GT boss heart container collected
2023-08-31 17:39:17 -05:00
cassidoxa
3a5974b456 Only check if we're getting a chest item if boss heart flag is set 2023-08-31 16:38:53 -04:00
aerinon
5ccdebe09d Fixing crashes 2023-08-31 14:22:46 -06:00
cassidoxa
71e6d54276 Fix for item receipt after GT boss heart container collected 2023-08-31 15:17:07 -04:00
Lexi Rose
139c963e6a Merge pull request #198 from spannerisms/decompressed
Absorb torch keys if they belong to the dungeon they're in.
2023-08-31 03:07:31 -05:00
cassidoxa
29176fa194 Absorb torch keys if they belong to the dungeon they're in. 2023-08-30 20:47:06 -04:00
aerinon
b635126e81 Copmass count fix for 2 bytes 2023-08-30 16:16:05 -06:00
aerinon
150adec969 Sewers count fix 2023-08-30 15:25:29 -06:00
aerinon
e21067f0a2 Initial work on new items 2023-08-30 14:35:30 -06:00
aerinon
d09aea3ff9 2 byte compass counts 2023-08-30 12:33:27 -06:00
Lexi Rose
d6ac9feae4 Merge pull request #197 from spannerisms/decompressed
Glitch fixes
2023-08-30 11:45:05 -05:00
aerinon
cd67d27798 Hud update flag added for standing items
Ram addresses updated
Minor multiworld fix
2023-08-30 10:25:20 -06:00
cassidoxa
90c8e95f9b Fix overworld item duping
Fix setting dungeon completed when Aga 1 and 2 are defeated (prize drops)
2023-08-30 01:25:43 -04:00
S
c6e586fbb8 Merge pull request #196 from spannerisms/decompressed
Even more v31.2.0
2023-08-29 16:40:31 -04:00
cassidoxa
4c98268d81 Various fixes 2023-08-29 16:03:22 -04:00
aerinon
51011dcada Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts:
#	events.asm
#	newitems.asm
#	shopkeeper.asm
#	tables.asm

Plus attempt to update standing items
2023-08-28 12:01:57 -06:00
aerinon
b688149dfa Fix for shops and powder
Fix for dungeon indicator
2023-08-28 11:32:46 -06:00
Lexi Rose
e3a35ef5fc Merge pull request #195 from spannerisms/decompressed
More v31.2.0
2023-08-26 23:39:21 -05:00
cassidoxa
52d2616537 RomSpeed option 2023-08-26 23:24:34 -04:00
cassidoxa
05a79ad2d9 Fix Ped/GT open modes
Fix key colors
2023-08-26 20:29:38 -04:00
cassidoxa
7e513c4696 More sprite fixes 2023-08-26 14:30:39 -04:00
cassidoxa
77e269ff31 Ridiculous game 2023-08-26 01:42:31 -04:00
cassidoxa
90ffa8bd23 Fix cave state item cutscene flag with boss hearts
Add item substitutions
2023-08-25 21:11:48 -04:00
Catobat
6980d36d27 Fix issue with rooms $0124-$0127 at Tavern Back 2023-08-26 00:52:13 +02:00
cassidoxa
5ac2f8c537 Fix GFX transfer, use stack
Fix HUD arrow icon after buying shop arrow
2023-08-25 12:29:52 -04:00
cassidoxa
3f5455b647 Fix key palettes
Fix HUD item counter when releasing bee
2023-08-25 09:48:29 -04:00
cassidoxa
1cbcd1d5ff Sprite fixes 2023-08-25 01:38:32 -04:00
aerinon
09702e659d Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts:
#	goalitem.asm
#	inventory.asm
#	invertedmaps.asm
#	newhud.asm
#	pendantcrystalhud.asm

Also some bugfixes here and there
2023-08-24 16:16:31 -06:00
Lexi Rose
188c965fbc Merge pull request #194 from spannerisms/decompressed
More v31.2.0 fixes
2023-08-23 21:10:13 -05:00
aerinon
f1dda4a8c0 Attempt to re-write standing items using the new decompressed gfx.
Fix a few bus left over from merge
2023-08-23 16:06:31 -06:00
aerinon
2a789b04e4 Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts:
#	LTTP_RND_GeneralBugfixes.asm
#	bookofmudora.asm
#	build.bat
#	catfish.asm
#	compasses.asm
#	contrib.asm
#	darkworldspawn.asm
#	entrances.asm
#	events.asm
#	floodgatesoftlock.asm
#	flute.asm
#	framehook.asm
#	goalitem.asm
#	halfmagicbat.asm
#	heartpieces.asm
#	hooks.asm
#	inventory.asm
#	invertedmaps.asm
#	itemtext_lower.asm
#	lampmantlecone.asm
#	mantle.asm
#	msu.asm
#	music.asm
#	newhud.asm
#	newitems.asm
#	pendantcrystalhud.asm
#	ram.asm
#	rngfixes.asm
#	roomloading.asm
#	shopkeeper.asm
#	stats.asm
#	stats/credits.asm
#	stats/creditsnew.asm
#	stats/statConfig.asm
#	tables.asm
#	tablets.asm
#	utilities.asm
#	zoraking.asm
2023-08-23 13:02:39 -06:00
cassidoxa
247128b9f6 Move setting DungeonsCompleted bitfield to post-boss/prize transition 2023-08-23 13:24:46 -04:00
cassidoxa
9bde734ca3 Fix current dungeon items in menu 2023-08-22 16:22:39 -04:00
cassidoxa
80f94824f4 Small fixes 2023-08-22 10:18:02 -04:00
cassidoxa
e2525ebdb1 Rework menu dungeon item + select behavior
Fix colored heart animations
2023-08-22 01:40:53 -04:00
cassidoxa
66540f2819 Replace GT, Ganon vuln crystal checks, ped check with new system
InvincibleGanon 0x18003E -> GanonVulnerableMode 0x1801A8-0x1801A9
NumberOfCrystalsRequiredForTower 0x18005E -> GanonsTowerOpenTarget 0x18019A-0x18019B
NumberOfCrystalsRequiredForGanon 0x18005F -> GanonVulnerableTarget 0x1801A6-0x1801A7
Various fixes
Moved CrystalCounter to word length space $7EF471 -> $7EF476
2023-08-21 20:43:27 -04:00
spannerisms
59b16eeb05 optimize/fix inverted maps 2023-08-21 07:10:26 -04:00
cassidoxa
63ba27e93d Update item gfx/receipt documentation in itemdatatables.asm 2023-08-20 19:59:55 -04:00
cassidoxa
ca917404e5 Inverted maps 2023-08-20 11:51:12 -04:00
cassidoxa
ba080ef556 Fix HC/Sewers keys and inverted castle hole 2023-08-19 21:41:58 -04:00
cassidoxa
8a63b7ca91 v31.2.0 fixes 2023-08-19 14:33:24 -04:00
aerinon
78b5695e30 Prevent cross dungeon drops
Enemy drop indicator prototype
2023-08-17 13:39:18 -06:00
Lexi Rose
71d3f6cefe Merge pull request #193 from spannerisms/decompressed
Decompressed
2023-08-16 01:56:09 -05:00
cassidoxa
e206d6f368 Small fixes 2023-08-15 23:55:53 -04:00
cassidoxa
1b115ebb50 Fix pyramid map 2023-08-14 12:49:30 -04:00
cassidoxa
491e033ff0 Fix heart piece item resolution when mirroring
Fix HC big key incrementing total item count
Fix key tracking
Fix misc stat incrementing
2023-08-14 00:25:59 -04:00
cassidoxa
a3bc24c383 Quick fixes for shop fighter shield and retro shop arrow 2023-08-13 19:51:29 -04:00
cassidoxa
cc83fef9b0 Shops VRAM transfer 2023-08-13 18:55:52 -04:00
cassidoxa
aaf970b837 Heart colors 2023-08-13 13:46:21 -04:00
cassidoxa
ad17c8e88d More small fixes 2023-08-12 15:34:33 -04:00
cassidoxa
ed1a8f1bdb Update ROM version
Breaking changes:
Dungeon prize table at $81C6FC uses receipt id instead of vanilla index
Removed Gfx pointers from tables.asm
2023-08-12 10:21:34 -04:00
cassidoxa
858057d9c0 Lower case item text 2023-08-12 01:58:50 -04:00
cassidoxa
a2671e7ed5 A few font fixes 2023-08-11 20:11:50 -04:00
cassidoxa
103f072cf3 Add back some JP characters and re-arrange player name screen
Re-arrange a bunch of text-related stuff
Fix post-credits game counter
Fix bows
2023-08-11 02:10:54 -04:00
aerinon
459dacd582 Sewer fix
Multiworld absorbable fix
Thoughts on design for cross dungeon issues
2023-08-09 15:16:13 -06:00
cassidoxa
56cb17a0a3 Small fixes 2023-08-08 01:00:49 -04:00
codemann8
173b474b9d Merge branch 'DRUnstable' into OWMain 2023-08-07 15:10:13 -05:00
codemann8
8d0585ec33 Fixed Hera boss music playing after boss defeated
# Conflicts:
#	music.asm
2023-08-07 12:11:12 -06:00
cassidoxa
39ac6c301a Fix mushroom gfx loading 2023-08-07 13:50:33 -04:00
aerinon
1c0b7b5320 Merge branch 'DRMain' into DRUnstable 2023-08-07 10:41:12 -06:00
aerinon
bdf8c7bd6e Ignore more of the bitfield nibble of the CompassMode 2023-08-07 10:26:47 -06:00
cassidoxa
87e665965c Free crystals and ability to shuffle dungeon prizes
Overworld map code via Aerinon
2023-08-06 23:07:39 -04:00
aerinon
2c9161927e Fix incorrect address 2023-08-04 16:41:13 -06:00
aerinon
6a22218727 Merge branch 'DRUnstable' into DRVolatile
# Conflicts:
#	doorrando/bugfix/kholdstare_shell_collision.asm
2023-08-04 11:32:19 -06:00
aerinon
75545cf568 Mimic rework 2023-08-04 11:30:29 -06:00
cassidoxa
cb16ffc20b Merge branch 'master' into decompressed
Also some pendant receipt and palette fixes
2023-08-02 17:40:38 -04:00
cassidoxa
d446bd3c1b More fixes 2023-08-02 15:39:03 -04:00
cassidoxa
ddfb8eed0f Small fixes 2023-08-01 20:30:15 -04:00
cassidoxa
8ed4cbda1d Palette handling & sprite props data tables
Statically assign item data tables
Fix some save-related bugs
Fix dungeon item notice in "this dungeon" with free dungeon items
2023-08-01 17:13:47 -04:00
cassidoxa
d3ed95d639 Refactor inventory.asm
Refactor extended save data to use MVN
Free small keys can be place in their own dungeon
2023-07-29 00:48:34 -04:00
codemann8
2f8daa3903 Merge branch 'DRUnstable' into OWMain 2023-07-19 14:28:55 -05:00
codemann8
ffe7985139 Adjusting bottle vendor fish prizes to be centered and display key GFX correctly 2023-07-11 12:44:50 -05:00
codemann8
653f66e57a Fix for Hera music silence 2023-07-10 10:28:17 -06:00
codemann8
c424cf4311 Symmetrical GTCutscene Crystals 2023-07-10 10:25:50 -06:00
aerinon
05409f1875 Multiworld support for enemy drops. More logic for hera basement counting. 2023-07-10 10:25:37 -06:00
codemann8
f51df3e6eb Fixed issue with Kakariko music playing when killing Aggro Guards in enemizer 2023-07-03 15:54:59 -05:00
cassidoxa
0a073df728 Item receipt refactor
Inverted maps
Fix shops
2023-06-30 21:21:59 -04:00
codemann8
144817fe90 Fixed issue where Aga Door flag prevented TF Cutscene 2023-06-29 19:28:49 -05:00
codemann8
cac3ecf4ef Using new overflow GFX slot and redraw after item get 2023-06-29 19:26:36 -05:00
codemann8
e8a0697829 Fixed issue where items spawning off screen might not redraw 2023-06-16 20:40:01 -05:00
codemann8
1235357531 Using new overflow GFX slot and redraw after item get 2023-06-15 11:12:40 -05:00
codemann8
6dab19d38f Reversed earlier change and targeting Good Bee bonk item instead
Change reversed: Fixed issue where bonk drops were drawing narrow sprites 4 pixels to the
2023-06-14 00:28:25 -05:00
spannerisms
83377b6bea fast hearts 2023-06-13 07:28:25 -04:00
Lexi Rose
421740cdae Merge pull request #192 from cassidoxa/hundo_mode
Add "completionist" goals and HUD item counter
2023-06-10 22:26:37 -05:00
cassidoxa
389e436b52 More HUD fixes 2023-06-10 22:05:55 -04:00
cassidoxa
bbd25c2543 Fix Bow icon
Set dungeon ID to $FF after Aga 2 kill for proper HUD draw
2023-06-10 12:26:01 -04:00
cassidoxa
d5b5a20862 OHKO HUD 2023-06-09 18:45:57 -04:00
cassidoxa
fed357141b Bump version 2023-06-09 16:16:02 -04:00
cassidoxa
c3c7078969 Fix HUD arrow icon 2023-06-08 23:59:55 -04:00
cassidoxa
aec3370f48 More HUD stuff 2023-06-08 19:26:31 -04:00
cassidoxa
815c2ab81f More fast hud
Added update hud flag
2023-06-08 11:21:42 -04:00
cassidoxa
3a90df5bd4 Fast HUD via kan 2023-06-07 19:44:52 -04:00
cassidoxa
878536903e Initial total item count HUD
Initial 100% item collection Ganon vulnerability
2023-06-05 15:05:31 -04:00
aerinon
15236c9aee Fix 2023-05-19 08:51:53 -06:00
codemann8
c5d7f3291a Minor change to Inverted map terrain of Mimic Cave Ledge 2023-05-16 04:31:44 -05:00
codemann8
b170620285 Fixed issue where bonk drops were drawing narrow sprites 4 pixels to the right 2023-05-14 17:55:14 -05:00
codemann8
9c08588d92 Added a TF Cutscene when getting the TF item 2023-05-13 02:07:40 -05:00
codemann8
3497bd6514 Fixed issue with enemy key drops using wrong palette/GFX sheet 2023-05-12 23:57:13 -05:00
codemann8
71916fb320 Fixed Hera boss music playing after boss defeated 2023-05-12 20:37:33 -05:00
codemann8
81a3fcf773 Fixed 99 bonk limit in stats counters 2023-05-12 20:14:36 -05:00
codemann8
0933392e6d Rearranged new rotating slotted GFX code to allow drawing to specific slots 2023-05-12 20:14:02 -05:00
codemann8
0803e6e290 Allow Murahdahla to act like Murah at Pyramid in rainstate 2023-05-12 20:08:15 -05:00
codemann8
38fa9c3902 Fix for avoiding Arrghus/Zora splash GFX issues 2023-05-10 23:12:42 -05:00
codemann8
1b564d99fc Fixed Apple GFX by using other VRAM slots in the rotation 2023-05-09 21:27:00 -05:00
codemann8
06d22255ef Added Chicken GFX to GFX tables 2023-05-09 16:41:17 -05:00
codemann8
8e48df8c12 Good Bees now spawn automatically under pots 2023-05-09 02:53:08 -05:00
codemann8
5c640a05f1 Fixed issue with menu not allowing DPad input during menus if standing item is visible 2023-05-09 00:10:07 -05:00
codemann8
c002b974f9 Fixed issue with key gfx not drawing correctly during tablet animation 2023-05-09 00:09:16 -05:00
codemann8
9651f9fb1d Added better GFX for fairy and good bee 2023-05-08 07:48:48 -05:00
codemann8
09d93ae5f2 Apples and Bee Traps now spawn automatically under pots 2023-05-08 05:01:44 -05:00
codemann8
bae7457961 Fix bonk dupe and bonk despawn issues 2023-05-05 22:13:38 -05:00
codemann8
9500800c3c Minor formatting and small optimization 2023-05-05 22:11:19 -05:00
codemann8
48b2238109 Animate rupee items in shops 2023-05-05 22:09:37 -05:00
codemann8
20f8ef457e Converting item GFX drawing to use pottery draw method 2023-05-05 20:54:36 -05:00
codemann8
90396136d3 Fixed issue with Bonk Drops not spawning due to OW flags 2023-04-24 00:08:54 -05:00
codemann8
40d301b3e0 Animate standing rupees instead of drawing new OAM slot 2023-04-20 20:32:18 -05:00
codemann8
3d9b76eda0 Fix pottery to retain gfx during map check 2023-04-16 04:34:55 -05:00
codemann8
bd2ebd7827 Animate standing rupees for enemy drops 2023-04-15 05:17:22 -05:00
codemann8
8a9b138d55 Animate standing rupees instead of drawing new OAM slot 2023-04-15 01:09:38 -05:00
codemann8
480372f7a5 Merged in DR v1.2.0.16 2023-04-14 15:30:35 -05:00
aerinon
08c178a974 Fix Kholdstare shell collision at Lanmo 2 or other tiles where the shell could limit movement. 2023-04-14 14:13:27 -06:00
aerinon
5cac501cc7 Falling death flag 2023-04-14 14:03:40 -06:00
codemann8
7da838d1fc Changed bonk drops to not set flag if sprite is off screen 2023-04-13 15:00:57 -05:00
aerinon
ef057638c5 Comment edits 2023-04-10 12:20:15 -06:00
aerinon
568708afd3 Fix Kholdstare shell collision at Lanmo 2 or other tiles where the shell could limit movement. 2023-04-10 12:18:52 -06:00
codemann8
12691a0c4a Fixed issue with bonk drops causing other duplicate spawns 2023-04-09 11:07:39 -05:00
codemann8
511cc1af51 Fix for Hera music silence 2023-04-07 15:42:34 -05:00
aerinon
4f09d30fe5 Merge branch 'DRUnstable' into Enemizer
# Conflicts:
#	keydrop/standing_items.asm
2023-04-05 16:03:17 -06:00
codemann8
f89802a74e Symmetrical GTCutscene Crystals 2023-04-05 08:31:30 -05:00
codemann8
dd29578c0a Temporary fix for avoiding VRAM issues in non-layout OWR modes 2023-04-03 08:21:16 -05:00
codemann8
25dc4217c6 Fixed Old Man Death causing fake world in glitched 2023-04-02 07:39:02 -05:00
codemann8
bd2432d2ce Moving some hijacked DR code to new location 2023-03-30 16:42:05 -06:00
aerinon
67f22ab602 Fix kodongo ai slightly better.
Introduce a flag for the FixPrizeOnTheEyes bug
2023-03-30 15:00:39 -06:00
spannerisms
21522f29d1 credits 2023-03-30 01:51:12 -04:00
codemann8
d97f5fd23e Set up code structure for future OW palette changes and return to safer changes 2023-03-22 16:06:47 -05:00
codemann8
1bdcbf5b62 Fixed issue with no Woods mosiac on exit in vanilla OW 2023-03-19 12:21:22 -05:00
codemann8
d4e792a71f Fixed issue with MW Player ID on Bonk Locations 2023-03-19 11:00:22 -05:00
codemann8
cb1a4cbb69 Update owrando.asm 2023-03-18 19:14:10 -05:00
codemann8
84b3c1ad50 Correcting OW screen palette on transition 2023-03-18 19:13:04 -05:00
codemann8
8522968c1b Correcting OW screen palette on transition 2023-03-18 05:46:34 -05:00
codemann8
ee4fce4010 Moving some hijacked DR code to new location 2023-03-17 20:06:56 -05:00
codemann8
8d3e084c1d Load correct Link/Bunny palette on transition 2023-03-16 22:21:39 -05:00
Lexi Rose
23ecf41b33 Merge pull request #191 from cassidoxa/keys_hud
Properly mask HUD item flags
2023-03-15 11:50:57 -05:00
cassidoxa
0505cc28e1 Properly mask HUD item flags 2023-03-15 12:42:45 -04:00
codemann8
92e04bde55 Adjusting Bonk Sprite landing position and water ripple 2023-03-15 05:43:39 -05:00
codemann8
1316477771 Reserving space for OWR Version 2023-03-14 17:34:42 -05:00
aerinon
b10dff8a30 Minor clean up 2023-03-14 16:33:02 -06:00
codemann8
49c486a2cc Merged in DR v.1.2.0.13 2023-03-14 17:25:37 -05:00
codemann8
726b9441b7 Merge branch 'DRUnstable' into OWMain 2023-03-14 17:18:06 -05:00
aerinon
69a6e7f918 Version area reservation 2023-03-14 16:06:32 -06:00
codemann8
11e815bd96 Fixed item duping issue on OW 2023-03-14 06:20:04 -05:00
codemann8
fb1f7ad907 Fixed Desert Pass WS edge coordinates 2023-03-13 21:53:36 -05:00
Lexi Rose
c7c5ac23a8 Merge pull request #190 from cassidoxa/keys_hud
Fix file select HUD I broke
2023-03-13 20:49:11 -05:00
aerinon
04aabc8bd8 Clear standing item data on transition to overworld
Standard+retro no arrow filler unless you have the bow
2023-03-13 15:54:19 -06:00
cassidoxa
5ef08d934c Fix file select HUD I broke 2023-03-13 17:49:00 -04:00
Lexi Rose
5a0990638c Merge pull request #189 from cassidoxa/keys_hud
Fix small key stats tracker
2023-03-13 12:28:15 -05:00
cassidoxa
1f8389c446 Fix small key stats tracker 2023-03-13 13:15:30 -04:00
codemann8
eeebe58819 Fixing issue with forced HP on Good Bee Bonk Location 2023-03-12 21:45:16 -05:00
Lexi Rose
95f0e9eed2 Merge pull request #188 from cassidoxa/keys_hud
Compass and map HUD display modes properly skip or draw
2023-03-12 20:42:04 -05:00
codemann8
8e8c195fa9 Minor label reference change for Good Bee Bonk Location 2023-03-12 20:21:16 -05:00
cassidoxa
efa5d288a8 Fix typo 2023-03-12 19:14:14 -04:00
cassidoxa
df60b3641b Draw flute, shovel, powder, mushroom correctly on file select 2023-03-12 18:30:02 -04:00
cassidoxa
7968ddf020 Compass and map HUD display modes properly skip or draw
Minor key count refactor, count HC and Sewers as both in all cases
2023-03-12 17:20:54 -04:00
aerinon
0f541ad069 Assemble fix 2023-03-10 14:13:03 -07:00
aerinon
7e96db4ba6 Merge branch 'DRUnstable' into Enemizer
# Conflicts:
#	enemizer/hooks/blindboss_hooks.asm
2023-03-10 14:10:07 -07:00
codemann8
8102b75b0c Added Cold Fairy Statue to bonkable locations 2023-03-09 20:28:18 -06:00
codemann8
a1fb6ea1af Add new Good Bee item 2023-03-08 21:26:25 -06:00
codemann8
f8602a74cb Remove 5 Arrow Item 2023-03-08 20:38:34 -06:00
codemann8
f703dcaba7 Merged in DR v1.2.0.12 2023-03-08 16:12:42 -06:00
aerinon
380f917e60 Fix for mirror portal in inverted
Yet another fix for blocked doors in Standard ER, minor alteration for the swamp entrance fix to work when blocked as well.
2023-03-08 08:26:34 -07:00
Thomas Prescott
c0986d6bbc Remove file select screen border 2023-03-08 08:20:07 -06:00
codemann8
67f2164caf Merge branch 'DRUnstable' into OWMain 2023-03-07 18:46:25 -06:00
Lexi Rose
d0f9bf6b32 Merge pull request #186 from cassidoxa/init_save
Delete save backup when header name doesn't match SRAM
2023-03-07 02:11:58 -06:00
aerinon
5c213477bc Cave state fixes 2023-03-06 16:10:41 -07:00
codemann8
1453dd12a7 Merged in DR v1.2.0.10 2023-03-02 18:57:26 -06:00
aerinon
72e8d73277 Fix for lower layer blocked doors in standard 2023-03-02 16:21:02 -07:00
aerinon
13879317fe Mirror Portal + Entrance Fix 2023-03-01 15:41:54 -07:00
aerinon
b9c8984d6d Fix for door overruns
Minor graphical fix for sanc door
2023-03-01 15:41:36 -07:00
cassidoxa
af1df7cc6c Delete save backup when header name doesn't match SRAM
Ram init refactor
2023-02-28 11:19:20 -05:00
Lexi Rose
5e3fce17be Merge pull request #185 from cassidoxa/map_counts
Fix dungeon indexing for compass/map hud coutns
2023-02-24 16:56:53 -06:00
cassidoxa
af05d2df44 Merge branch 'master' into map_counts 2023-02-24 17:48:08 -05:00
cassidoxa
5546827c48 Fix dungeon indexing for compass/map hud 2023-02-24 17:47:28 -05:00
Lexi Rose
23427497b4 Merge pull request #184 from cassidoxa/map_counts
Add HUD map mode flag, "chest key" totals table, and seen-counter flags for tracking
2023-02-24 16:08:37 -06:00
cassidoxa
d76d4b4254 Skip HUD count drawing routine if nothing enabled 2023-02-24 16:09:07 -05:00
cassidoxa
068d4c2449 Port map key counter on HUD from DR 2023-02-23 21:46:27 -05:00
cassidoxa
a2020c9c76 Add HUD map mode flag, "chest key" totals table, and seen-counter flags
for tracking
2023-02-23 20:46:40 -05:00
Lexi Rose
66fd23fc61 Merge pull request #183 from cassidoxa/sram_checksum
Compute and write save checksum on new file creation
2023-02-21 15:13:49 -06:00
cassidoxa
af59265712 Don't lock inventory stats; temp fix for post-game progressive items 2023-02-21 15:39:55 -05:00
cassidoxa
02786974ad Compute and write save checksum on new file creation 2023-02-21 14:58:24 -05:00
Lexi Rose
aed9166f48 Merge pull request #182 from cassidoxa/fontstuff
Lower case stuff
2023-02-20 18:31:14 -06:00
cassidoxa
d5c8de0436 Fix inverted castle hole typo 2023-02-20 17:25:59 -05:00
cassidoxa
3b848f0586 Lower case stuff 2023-02-20 13:41:24 -05:00
spannerisms
aae1e2a1f3 fastrom 2023-02-14 01:24:43 -05:00
Thomas Prescott
d7887b2305 Merge pull request #181 from spannerisms/v31.1
file select
2023-02-13 17:17:42 -06:00
spannerisms
c0b7605c12 fix hearts 2023-02-13 13:53:23 -05:00
spannerisms
663ba966a1 file select 2023-02-13 13:14:35 -05:00
spannerisms
caac2877fc tiny fixes 2023-02-13 13:00:04 -05:00
spannerisms
830e86f199 inverted maps
untested, unfinished
2023-02-11 05:22:27 -05:00
Lexi Rose
c2ea144bfb Merge pull request #180 from cassidoxa/filename_numbers
Add numbers to file name screen
2023-01-25 09:21:53 -06:00
cassidoxa
7151093664 Add numbers to file name screen 2023-01-17 17:01:21 -05:00
Lexi Rose
35e1b3a659 updated name for contributor MATRETHEWEY 2023-01-09 01:15:27 -06:00
Lexi Rose
85b433fcd4 delete garbage empty file 2023-01-09 00:36:50 -06:00
spannerisms
4802107516 bug fixes 2023-01-02 06:21:15 -05:00
spannerisms
ff88437f8e fixes
turn a bunch of addresses into fast rom
bunch of consistency clean ups in hooks
move zsnes to failures
2022-12-30 03:07:15 -05:00
Thomas Prescott
05fdeaccb0 Pyramid sign fix from Zarby 2022-12-29 11:57:12 -06:00
Lexi Rose
c23facd617 Merge pull request #179 from cassidoxa/tablets
Fix tablet flags
2022-12-29 11:29:59 -06:00
cassidoxa
36ca193b75 Newitems
Fix magic bar & file select HUD
2022-12-29 12:09:50 -05:00
cassidoxa
5ab91e7137 Fix tablet check 2022-12-19 12:37:51 -05:00
Lexi Rose
186cbba855 Merge pull request #177 from cassidoxa/newfont
New font changes
2022-12-09 10:09:22 -06:00
Lexi Rose
1d64ee7926 Merge pull request #176 from cassidoxa/menu_dungeonhud
Allow menu free dungeon item toggle with no menu items
2022-12-09 10:07:46 -06:00
cassidoxa
6797e84696 Linux asar link against older glibc 2022-12-08 23:33:06 -05:00
cassidoxa
6e876b2d1f Update build scripts 2022-12-08 23:16:20 -05:00
cassidoxa
4437982063 Merge branch 'binaries' into newfont 2022-12-08 23:08:18 -05:00
cassidoxa
3c7399eb12 Add bin/ directory with asar executables
Removed execute permissions on a bunch of text and gfx files
2022-12-08 22:49:59 -05:00
spannerisms
89f2f555e5 fix rupees 2022-12-08 00:27:58 -05:00
spannerisms
03601d5df5 dumb thing i have to push before i stop 2022-12-06 03:07:19 -05:00
spannerisms
194e745f22 bees 2022-12-05 11:32:14 -05:00
spannerisms
918173523f faster HUD 2022-12-05 02:01:46 -05:00
spannerisms
0397623340 cassidy
item properties tabulated with a macro
new item graphics
better hex to dec code
some item code readability improvements
2022-12-05 00:18:27 -05:00
cassidoxa
dac500627c Update build scripts for new font 2022-12-01 18:48:53 -05:00
cassidoxa
d7431b6550 Allow menu free dungeon item toggle with no menu items 2022-11-27 23:35:59 -05:00
cassidoxa
aa65adbec5 New font changes
Added lower case text for free dungeon items (via Aerinon)
Changed credits gfx to properly include symbols on player name screen
2022-11-26 22:13:12 -05:00
Lexi Rose
b2fdeb6b84 Merge pull request #175 from cassidoxa/quickswap
RAM labels, Length Annotations, and Quickswap Fix
2022-11-25 18:58:17 -06:00
cassidoxa
69fd6015e6 Some more annotations 2022-11-25 01:08:07 -05:00
cassidoxa
8d0315e4c1 Reserve private, 3rd party WRAM block
Reserve large decompression buffer
2022-11-24 23:07:16 -05:00
cassidoxa
823166c4cd Re-organize vanillalabels.asm 2022-11-24 22:24:38 -05:00
cassidoxa
9425b1c3b1 Move zoraking.asm and catfish.asm into npcitems.asm 2022-11-24 22:02:55 -05:00
cassidoxa
d3cd3a86ca Move tree kid stuff into hooks.asm 2022-11-24 21:53:18 -05:00
cassidoxa
524a27d680 Merge branch 'master' into quickswap 2022-11-24 19:05:24 -05:00
cassidoxa
7426ce5945 More RAM labels
Fixed tablets checking for item collected, uses NpcFlags+1
Deleted mantle.asm, moved to lampmantlecone.asm
2022-11-24 18:34:35 -05:00
cassidoxa
da8576546d Move binary data to new data directory 2022-11-22 01:02:16 -05:00
cassidoxa
09d15f3294 Another WRAM label pass
Deleted compression.asm
2022-11-22 00:36:39 -05:00
cassidoxa
788cceaab9 Continue labeling and documentation in ram.asm, main rando block
Deleted several unused modules and some commented code
Reorganized some routines to clean up modules
Moved some memory into mirrored WRAM
Refactored NMI hook aux routine
Removed old fake flipper fix
2022-11-16 21:38:28 -05:00
cassidoxa
43f753b517 ram.asm initial commit. Replaced all address defines with labels
Value defines styled without quotes, # moved to load/store/cmp site
Added registers.asm (copied from spannerisms JP disassembly)
Added a bunch of length annotations
Deleted old or trivial commented out code
Deleted: ganonfixes.asm, map.asm, seedtag.asm
Replaced obsolete credits.asm with creditsnew.asm
Moved scratch space at $7F5020-3F to mirrored WRAM (7E1E70-8F)
Moved clock RAM to mirrored WRAM (7E1E90-9F)
dialog.asm: FreeDungeonItemNotice preserves callee-preserved scratch RAM
Toast buffer moved to mirrored WRAM (7E1E0E-0F)
servicerequest.asm: long store to $012E converted to word length store
2022-11-05 00:50:25 -04:00
Lexi Rose
9cf3cb0601 Merge pull request #174 from cassidoxa/hera_music
Fix check for Tower of Hera boss defeated
2022-10-25 21:47:11 -05:00
cassidoxa
6b2e7a5c34 Fix check for Tower of Hera boss defeated
Improve room data documentation
2022-10-25 22:38:19 -04:00
aerinon
44a648e3be Killable thieves flag 2022-10-25 09:15:15 -06:00
cassidoxa
cafb0908a0 Introduce bound to QS loop to prevent infinite loop on last bomb loss
Move !INFINITE_BOMB define to ram.asm, replace with labels
2022-10-23 22:02:36 -04:00
Lexi Rose
0e87fb3bc4 Merge pull request #172 from cassidoxa/shields
newitems: Progressive shields, swords, and mail use highest item level to determine upgrade
2022-10-22 16:32:16 -05:00
Lexi Rose
177452c853 Merge pull request #173 from cassidoxa/oldman_entrance
darkworldspawn: Add check for old man to fix post-aga spawn bug
2022-10-22 16:32:03 -05:00
cassidoxa
dbf674c9fd darkworldspawn: Add check for old man to fix post-aga spawn bug 2022-10-20 14:47:04 -04:00
cassidoxa
651d00d320 Progressive shields, swords, and mail use highest item level to
determine upgrade
2022-10-09 17:09:43 -04:00
aerinon
8e20d6280c Enemizer Cleanup 2022-10-06 14:16:47 -06:00
Lexi Rose
48ccf03ac8 Merge pull request #170 from cassidoxa/ammo_capacity
Combine starting max ammo and capacity upgrade in SRAM into single, flat ammo capacity values
2022-10-01 08:08:26 -05:00
aerinon
d6f50525a1 Big key door fix 2022-09-30 15:28:45 -06:00
aerinon
895074a4cb Support for new items
Support for static enemy drops
Bug fix for wrong sprites dead
2022-09-30 15:28:38 -06:00
aerinon
3fdf95a364 UW Sprites new home
Enemizer asm refinement
2022-09-27 14:38:28 -06:00
aerinon
5e93e59727 Enemizer migration 2022-09-20 16:38:20 -06:00
cassidoxa
f8d9be201a tables.asm: Add GFX pointer to table in utilities.asm 2022-09-09 19:30:16 -04:00
cassidoxa
031e3965b2 Requires frontend changes
Change SRAM ammo capacity upgrades to flatly represent max capacity
2022-08-08 13:42:19 -04:00
Lexi Rose
aba3ec930d Merge pull request #169 from cassidoxa/validate_sram
Compute checksum for extended SRAM
2022-08-01 08:40:19 -05:00
cassidoxa
95ee31f7c9 Remove some hard coded addresses for MVN instructions 2022-07-29 22:04:13 -04:00
cassidoxa
d8846a4ba9 Add backup save that gets checked and loaded if main save is corrupt
Add suffixes to instructions in save.asm
Disable HDMA, NMI, and joypad during extended save DMA
2022-07-29 20:57:54 -04:00
cassidoxa
10079a539b Compute checksum for extended SRAM
Validate SRAM on file screen load and delete if checksum incorrect
2022-07-25 22:19:06 -04:00
Lexi Rose
0e6e5d5b45 Merge pull request #167 from cassidoxa/elder_submodule
Check submodule during goal NPC interaction to prevent it from firing when menu is open
2022-07-14 22:40:37 -05:00
cassidoxa
9e5e9a17ed Check submodule during goal NPC interaction to prevent it from firing
when menu is open (via kan)
2022-07-05 12:49:00 -04:00
309 changed files with 43520 additions and 21454 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ tournament.asm
/.idea
/__pycache__
/.vscode
build.sh

View File

@@ -3,78 +3,54 @@
;================================================================================
lorom
;===================================================================================================
; THIS NEEDS TO BE THE FIRST INCLUDE BECAUSE IT CHANGES THINGS EVERYWHERE
; If this were to be included later, it would almost certainly overwrite other changes
incsrc "fastrom.asm"
;================================================================================
;org $00FFC0 ; <- 7FC0 - Bank00.asm : 9173 (db "THE LEGEND OF ZELDA " ; 21 bytes)
;db #$23, $4E
;org $80FFC0 ; <- 7FC0 - Bank00.asm : 9173 (db "THE LEGEND OF ZELDA " ; 21 bytes)
;db $23, $4E
org $00FFD5 ; <- 7FD5 - Bank00.asm : 9175 (db $20 ; rom layout)
db #$30 ; set fast lorom
org $80FFD5 ; <- 7FD5 - Bank00.asm : 9175 (db $20 ; rom layout)
db $30 ; set fast lorom
;org $00FFD6 ; <- 7FD6 - Bank00.asm : 9176 (db $02 ; cartridge type)
;db #$55 ; enable S-RTC
;org $80FFD6 ; <- 7FD6 - Bank00.asm : 9176 (db $02 ; cartridge type)
;db $55 ; enable S-RTC
org $00FFD7 ; <- 7FD7 - Bank00.asm : 9177 (db $0A ; rom size)
db #$0B ; mark rom as 16mbit
org $80FFD7 ; <- 7FD7 - Bank00.asm : 9177 (db $0A ; rom size)
db $0B ; mark rom as 16mbit
org $00FFD8 ; <- 7FD8 - Bank00.asm : 9178 (db $03 ; ram size (sram size))
db #$05 ; mark sram as 32k
org $80FFD8 ; <- 7FD8 - Bank00.asm : 9178 (db $03 ; ram size (sram size))
db $05 ; mark sram as 32k
org $3FFFFF ; <- 1FFFFF
db #$00 ; expand file to 2mb
org $BFFFFF ; <- 1FFFFF
db $00 ; expand file to 2mb
org $1FFFF8 ; <- FFFF8 timestamp rom
db #$20, #$19, #$08, #$31 ; year/month/day
org $9FFFF8 ; <- FFFF8 timestamp rom
db $20, $19, $08, $31 ; year/month/day
;================================================================================
!ROM_VERSION_LOW ?= 1 ; ROM version (two 16-bit integers)
!ROM_VERSION_HIGH ?= 2 ;
!ROM_VERSION_HIGH ?= 5 ;
org $00FFE0 ; Unused hardware vector
org $80FFE0 ; Unused hardware vector
RomVersion:
dw !ROM_VERSION_LOW
dw !ROM_VERSION_HIGH
;================================================================================
!ADD = "CLC : ADC"
!SUB = "SEC : SBC"
!BLT = "BCC"
!BGE = "BCS"
!MS_GOT = "$7F5031"
!REDRAW = "$7F5000"
!GANON_WARP_CHAIN = "$7F5032";
!TILE_UPLOAD_BUFFER = "$7EA180";
!FORCE_HEART_SPAWN = "$7F5033";
!SKIP_HEART_SAVE = "$7F5034";
; MSU-1
!REG_MSU_FALLBACK_TABLE = $7F50A0 ; 8 bytes
!REG_MSU_DELAYED_COMMAND = $7F50A9
!REG_MSU_PACK_COUNT = $7F50AA
!REG_MSU_PACK_CURRENT = $7F50AB
!REG_MSU_PACK_REQUEST = $7F50AC
!REG_MSU_LOADED_TRACK = $7F50AD ; 2 bytes
!REG_SPC_LOADING = $7F50AF
!MSU_LOADED_TRACK = $7F5400
!MSU_RESUME_TRACK = $7F5401
!MSU_RESUME_TIME = $7F5402 ; 4 bytes
!MSU_RESUME_CONTROL = $7F5406
!REG_MUSIC_CONTROL = $012B
;!REG_MUSIC_CONTROL = $012C
!REG_MUSIC_CONTROL_REQUEST = $012C
!ONEMIND_ID = $7F5072
!ONEMIND_TIMER = $7F5073
function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<0))
; Feature flags, run asar with -DFEATURE_X=1 to enable
!FEATURE_NEW_TEXT ?= 0
!FEATURE_FIX_BASEROM ?= 0
;================================================================================
@@ -97,18 +73,18 @@ function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<
!FLAG_OW_MIXED = $04
!FLAG_OW_CROSSED = $02
!FLAG_OW_BONKDROP = $02
incsrc hooks.asm
incsrc treekid.asm
incsrc spriteswap.asm
incsrc hashalphabethooks.asm
incsrc sharedplayerpalettefix.asm
incsrc ram.asm
incsrc sram.asm
incsrc registers.asm
incsrc vanillalabels.asm
;org $208000 ; bank #$20
org $A08000 ; bank #$A0
incsrc newitems.asm ; LEAVE THIS AS FIRST
org $A08000 ; bank $20
incsrc itemdowngrade.asm
incsrc bugfixes.asm
incsrc darkworldspawn.asm
@@ -116,7 +92,6 @@ incsrc lampmantlecone.asm
incsrc floodgatesoftlock.asm
incsrc heartpieces.asm
incsrc npcitems.asm
incsrc utilities.asm
incsrc flipperkill.asm
incsrc pendantcrystalhud.asm
incsrc potions.asm
@@ -127,30 +102,29 @@ incsrc tablets.asm
incsrc fairyfixes.asm
incsrc rngfixes.asm
incsrc medallions.asm
incsrc inventory.asm
incsrc ganonfixes.asm
incsrc zelda.asm
incsrc maidencrystals.asm
incsrc zoraking.asm
incsrc catfish.asm
incsrc flute.asm
incsrc dungeondrops.asm
incsrc halfmagicbat.asm
incsrc mantle.asm
incsrc swordswap.asm
incsrc scratchpad.asm
incsrc map.asm
incsrc stats.asm
incsrc dialog.asm
incsrc entrances.asm
incsrc clock.asm
incsrc accessibility.asm
incsrc heartbeep.asm
incsrc capacityupgrades.asm
incsrc timer.asm
incsrc doorframefixes.asm
incsrc music.asm
incsrc roomloading.asm
incsrc icepalacegraphics.asm
incsrc follower.asm
warnpc $A18000
org $1C8000 ; text tables for translation
incbin i18n_en.bin
warnpc $1CF356
org $9C8000 ; text tables for translation
incbin "data/i18n_en.bin"
warnpc $9CF356
org $A18000 ; static mapping area
incsrc framehook.asm
@@ -161,7 +135,7 @@ incsrc hud.asm
warnpc $A18800
org $A18800 ; static mapping area
incsrc zsnes.asm
warnpc $A19000
org $A1A000 ; static mapping area. Referenced by front end. Do not move.
@@ -177,19 +151,11 @@ org $A1FF00 ; static mapping area
incsrc init.asm
org $A48000 ; code bank - PUT NEW CODE HERE
incsrc timer.asm
incsrc doorframefixes.asm
incsrc music.asm
incsrc roomloading.asm
incsrc icepalacegraphics.asm
incsrc firebarlayer.asm
incsrc glitched.asm
incsrc hardmode.asm
incsrc goalitem.asm
incsrc quickswap.asm
incsrc endingsequence.asm
incsrc cuccostorm.asm
incsrc compression.asm
incsrc retro.asm
incsrc controllerjank.asm
incsrc boots.asm
@@ -200,166 +166,199 @@ incsrc decryption.asm
incsrc hashalphabet.asm
incsrc inverted.asm
incsrc invertedmaps.asm
incsrc invertedmaps2.asm
incsrc bonktreemaps.asm
incsrc newhud.asm
incsrc compasses.asm
incsrc save.asm
incsrc password.asm
incsrc enemy_adjustments.asm
incsrc stats.asm
;incsrc hudtext.asm
incsrc servicerequest.asm
incsrc elder.asm
incsrc toast.asm
incsrc darkroomitems.asm
incsrc fastcredits.asm
incsrc msu.asm
incsrc dungeonmap.asm
incsrc menu/overworldmap.asm ; Overwrites some code in bank $8A
incsrc bossicons.asm
incsrc hextodec.asm
incsrc multiworld.asm
incsrc terrorpin.asm
if !FEATURE_NEW_TEXT
incsrc textrenderer.asm
endif
incsrc textrenderer.asm
warnpc $A58000
;org $228000 ; contrib area
org $A28000 ; contrib area
incsrc contrib.asm
incsrc special_weapons.asm
incsrc variable_ganon_vulnerability.asm
incsrc trolls.asm
org $A28000
ItemReceiptGraphicsROM:
; we need some empty space here so that 0000 can mean nothing
fillbyte $00 : fill 32
incbin "data/customitems.4bpp"
PreloadedGraphicsROM:
incbin "data/preloadedgfx.4bpp"
warnpc $A2B000
org $A2B000
incsrc itemdatatables.asm ; Statically mapped
incsrc decompresseditemgraphics.asm
incsrc newitems.asm
incsrc utilities.asm
incsrc inventory.asm
incsrc menu/hudalpha.asm
warnpc $A38000
org $B98000
incsrc gk/crystalswitchbook.asm
incsrc gk/mimicdash.asm
incsrc gk/gloom.asm
incsrc gk/special_weapons.asm
incsrc gk/variable_ganon_vulnerability.asm
incsrc gk/pseudoflute.asm
incsrc gk/fast_junk.asm
incsrc gk/dungeon_maps.asm
print "End of B9: ", pc
warnpc $B9EE00
org $B9EE00
incsrc gk_meta.asm
org $B9F000
incsrc gk/settings.asm
org $A38000
incsrc stats/credits.asm ; Statically mapped
incsrc stats/main.asm
incsrc stats/statConfig.asm
FontTable:
incsrc stats/fonttable.asm
incsrc menu/overworldmap.asm ; overwrites some code in bank 0A
incsrc doorrando/doorrando.asm ; bank 27 likely A7 in the future
incsrc doorrando/doorrando.asm ; bank 27/A7
;bank 28/A8 for keydropshuffle / standing items
incsrc keydrop/standing_items.asm
incsrc owrando.asm ; bank AA
incsrc enemizer/main.asm ; this is originally in bank 36, but is currently in migratory status in bank 37
incsrc keydrop/standing_items.asm ; bank 28/A8
incsrc owrando.asm ; bank 2A/AA
incsrc enemizer/main.asm ; bank 36/B6
org $308000 ; bank #$30
org $B08000 ; bank #$30
incsrc tables.asm
warnpc $318000
warnpc $B18000
org $348000
org $B48000
incsrc spc.asm
; uncomment for inverted adjustments
;incsrc sandbox.asm
org $318000 ; bank #$31
org $B18000 ; bank $31
GFX_Mire_Bombos:
incbin 99ff1_bombos.gfx
warnpc $318800
incbin "data/99ff1_bombos.gfx"
warnpc $B18800
org $318800
org $B18800
GFX_Mire_Quake:
incbin 99ff1_quake.gfx
warnpc $319000
incbin "data/99ff1_quake.gfx"
warnpc $B19000
org $319000
org $B19000
GFX_TRock_Bombos:
incbin a6fc4_bombos.gfx
warnpc $319800
incbin "data/a6fc4_bombos.gfx"
warnpc $B19800
org $319800
org $B19800
GFX_TRock_Ether:
incbin a6fc4_ether.gfx
warnpc $31A000
incbin "data/a6fc4_ether.gfx"
warnpc $B1A000
org $31A000
org $B1A000
GFX_HUD_Items:
incbin c2807_v4.gfx
warnpc $31A800
incbin "menu/dr_sheet_dc.2bppc"
warnpc $B1A800
org $31A800
GFX_New_Items:
incbin newitems.gfx
;incbin eventitems.gfx ; *EVENT*
warnpc $31B000
org $B1A800
org $31B000
warnpc $B1B000
org $B1B000
GFX_HUD_Main:
incbin c2e3e.gfx
warnpc $31B800
incbin "data/c2e3e.gfx"
warnpc $B1B800
org $31C000
org $B1C000
IcePalaceFloorGfx:
incbin ice_palace_floor.bin
warnpc $31C801
incbin "data/ice_palace_floor.bin"
warnpc $B1C801
org $31C800
org $B1C800
Damage_Table:
incbin damage_table.bin
warnpc $31D001
incbin "data/damage_table.bin"
warnpc $B1D001
org $31D000
org $B1D000
FileSelectNewGraphics:
incbin fileselect.chr.gfx
warnpc $31E001
incbin "data/fileselectgfx.2bpp"
warnpc $B1E001
org $31E000
org $B1E000
InvertedCastleHole: ;address used by front end. DO NOT MOVE!
incbin sheet73.gfx
warnpc $31E501
incbin "data/sheet73.gfx"
warnpc $B1E501
org $31E800
Damage_Table_Bombs:
incbin damage_table_sword_bombs.bin
warnpc $31F000
org $31F000
Damage_Table_Pseudo:
incbin damage_table_pseudo_sword.bin
warnpc $31F800
org $338000
org $B38000
GFX_HUD_Palette:
incbin hudpalette.pal
warnpc $338041
incbin "data/hudpalette.pal"
warnpc $B38041
org $339000
incbin sheet178.gfx
warnpc $339600
org $B39000
ExpandedTrinexx:
incbin "data/sheet178.gfx"
warnpc $B39600
org $339600
org $B39600
BossMapIconGFX:
incbin bossicons.4bpp
incbin "data/bossicons.4bpp"
if !FEATURE_NEW_TEXT
org $339C00
NewFont:
incbin newfont.bin
NewFontInverted:
incbin newfont_inverted.bin
org $B39C00
NewFont:
incbin "data/newfont.bin"
NewFontInverted:
incbin "data/newfont_inverted.bin"
SmallCharacters:
incbin "data/smallchars.2bpp"
org $0CD7DF
incbin text_unscramble1.bin
org $0CE4D5
incbin text_unscramble2.bin
endif
DungeonMapIcons1:
incbin "menu/map_icons_1.3bppc"
DungeonMapIcons2:
incbin "menu/map_icons_2.3bppc"
DungeonMapIcons3:
incbin "menu/map_icons_3.3bppc"
DungeonMapIcons4:
incbin "menu/map_icons_4.3bppc"
DungeonMapIcons5:
incbin "menu/map_icons_5.3bppc"
DungeonMapIcons6:
incbin "menu/map_icons_6.3bppc"
DungeonMapDoorConnectors:
incbin "menu/door_connectors.3bppc"
MapSheetD4:
incbin "menu/map_sheet_d4.3bppc"
org $328000
org $8CD7DF
incsrc data/playernamecharmap.asm
org $8CE73D
incbin data/playernamestripes_1.bin
org $8CE911
incbin data/playernamestripes_2.bin
incsrc data/kanjireplacements.asm ; Overwrites text gfx data and masks in bank $8E
org $B28000
Extra_Text_Table:
if !FEATURE_NEW_TEXT
incsrc itemtext_lower.asm
else
incsrc itemtext.asm
endif
warnpc $32E000
incsrc itemtext.asm
warnpc $B2E000
org $32DFD0 ; PC 0x195FD0
org $B2DFD0 ; PC 0x195FD0
incsrc multiworldplayernames.asm
warnpc $330000
warnpc $B30000
incsrc externalhooks.asm
;================================================================================
org $119100 ; PC 0x89100
incbin map_icons.gfx
warnpc $119401
org $919100 ; PC 0x89100
incbin "data/map_icons.gfx"
warnpc $919401
;================================================================================
org $9BB1E0
incsrc custompalettes.asm
warnpc $9BB880
;================================================================================
org $AF8000 ; PC 0x178000
Static_RNG: ; each line below is 512 bytes of rng
@@ -374,14 +373,15 @@ warnpc $B08000
;Bank Map
;$20 Code Bank
;$21 Reserved (Frame Hook & Init)
;$22 Contrib Code
;$22 Unused
;$23 Stats & Credits
;$24 Code Bank
;$26 Multiworld data
;$27 DR Code Bank
;$28 Keydrop / Standing Items Code bank
;$29 External hooks (rest of bank not used)
;$2A Reserved for OWR
;$2B Room Data migration
;$2B Reserved for "outlet data" ~5.8k
;$2E Reserved for Tournament Use
;$2F Static RNG (rest is reserved for tournament use)
;$30 Main Configuration Table
@@ -389,23 +389,25 @@ warnpc $B08000
;$32 Text Bank
;$33 Graphics Bank
;$36 reserved for Enemizer
;$37 Room data if needed for DR/Pottery/Enemizer
;$39 GwaaKiwi Code Bank
;$3A reserved for downstream use
;$3B reserved for downstream use
;$3F reserved for internal debugging
;================================================================================
;RAM
;$7E021B[0x1]: Used by race game instead of $0ABF to avoid witch item conflict
;$7EC900[0x1F00]: BIGRAM buffer
;See ram.asm for label assignments
;$7EC900[0x1F00]: BigRAM buffer
;$7EF000[0x500]: SRAM mirror First 0x500 bytes of SRAM
; See sram.asm for labels and assignments
;$7F5000[0x800]: Rando's main free ram region
; See tables.asm for specific assignments
; See ram.asm for specific assignments
;$7F6000[0x1000]: SRAM buffer mapped to vanilla save slots 1 and 2
; See sram.asm for labels and assignments
;$7F7667[0x6719] - free ram
;================================================================================
;SRAM Map
;See sram.asm for rando-specific assignments
;See sram.asm for label assignments and documentation
;$70:0000 (5K) Game state
; 0000-04FF Vanilla Slot 1 (mirrored at $7EF000)
; 0500-14FF Ext Slot 1 (mirrored at $7F6000)
@@ -413,423 +415,19 @@ warnpc $B08000
;$70:3000 (0x16) Password
;$70:6000 (8K) Scratch buffers
;================================================================================
;org $0080DC ; <- 0xDC - Bank00.asm:179 - Kill Music
;db #$A9, #$00, #$EA
;LDA.b #$00 : NOP
;================================================================================
;org $0AC53E ; <- 5453E - Bank0A.asm:1103 - (LDA $0AC51F, X) - i have no idea what this is for anymore
;LDA.b #$7F
;NOP #2
;================================================================================
;org $05DF8B ; <- 2DF8B - Bank05.asm : 2483
;AND.w #$0100 ; allow Sprite_DrawMultiple to access lower half of sprite tiles
;================================================================================
;org $0DF8F1 ; this is required for the X-indicator in the HUD except not anymore obviously
;
;;red pendant
;db $2B, $31, $2C, $31, $3D, $31, $2E, $31
;db $2B, $25, $2C, $25, $2D, $25, $2E, $25
;
;;blue pendant
;db $2B, $31, $2C, $31, $3D, $31, $2E, $31
;db $2B, $2D, $2C, $2D, $2D, $2D, $2E, $2D
;
;;green pendant
;db $2B, $31, $2C, $31, $3D, $31, $2E, $31
;db $2B, $3D, $2C, $3D, $2D, $3D, $2E, $3D
;================================================================================
;org $00CFF2 ; 0x4FF2 - Mire H
;db GFX_Mire_Bombos>>16
;org $00D0D1 ; 0x50D1 - Mire M
;db GFX_Mire_Bombos>>8
;org $00D1B0 ; 0x51B0 - Mire L
;db GFX_Mire_Bombos
;org $00D020 ; 0x5020 - Trock H
;db GFX_TRock_Bombos>>16
;org $00D0FF ; 0x50FF - Trock M
;db GFX_TRock_Bombos>>8
;org $00D1DE ; 0x51DE - Trock L
;db GFX_TRock_Bombos
org $00D09C ; 0x509C - HUD Items H
org $80D09C ; 0x509C - HUD Items H
db GFX_HUD_Items>>16
org $00D17B ; 0x517B - HUD Items M
org $80D17B ; 0x517B - HUD Items M
db GFX_HUD_Items>>8
org $00D25A ; 0x525A - HUD Items L
org $80D25A ; 0x525A - HUD Items L
db GFX_HUD_Items
; this used to be a pointer to a dummy file
org $00D065 ; 005065 - New Items H
db GFX_New_Items>>16
org $00D144 ; 005114 - New Items M
db GFX_New_Items>>8
org $00D223 ; 005223 - New Items L
db GFX_New_Items
org $00D09D ; 0x509D - HUD Main H
org $80D09D ; 0x509D - HUD Main H
db GFX_HUD_Main>>16
org $00D17C ; 0x517C - HUD Main M
org $80D17C ; 0x517C - HUD Main M
db GFX_HUD_Main>>8
org $00D25B ; 0x525B - HUD Main L
org $80D25B ; 0x525B - HUD Main L
db GFX_HUD_Main
;================================================================================
org $008781
UseImplicitRegIndexedLocalJumpTable:
org $00879c
UseImplicitRegIndexedLongJumpTable:
org $008333
Vram_EraseTilemaps_triforce:
org $008913
Sound_LoadLightWorldSongBank:
org $00891D
.do_load
org $00893D
EnableForceBlank:
DungeonMask = $0098C0
org $00D308
DecompSwordGfx:
org $00D348
DecompShieldGfx:
org $00D463
Tagalong_LoadGfx:
org $00D51B
GetAnimatedSpriteTile:
org $00D52D
GetAnimatedSpriteTile_variable:
org $00D84E
Attract_DecompressStoryGfx:
org $00E529
LoadSelectScreenGfx:
org $00F945
PrepDungeonExit:
org $00FDEE
Mirror_InitHdmaSettings:
org $01873A
Dungeon_LoadRoom:
org $02821E
Module_PreDungeon:
org $028296
.setAmbientSfx
org $02A0A8
Dungeon_SaveRoomData:
org $02A0BE
Dungeon_SaveRoomData_justKeys:
org $02A4E3
Overworld_ActualScreenID:
org $02B861
Dungeon_SaveRoomQuadrantData:
org $02C11D
CalculateTransitionLanding:
org $02C176
Overworld_FinalizeEntryOntoScreen_Data:
org $02D9B9
Underworld_LoadSpawnEntrance:
org $02E99D
FluteMenu_LoadTransport:
org $02FD8A ; 17D8A - Bank0E.asm: 3732 Note: Different bank
LoadGearPalettes_bunny:
org $02FD95 ; 17D95 - Bank0E.asm: 3742 Note: Different bank
LoadGearPalettes_variable:
org $02FEAB
Filter_Majorly_Whiten_Color:
org $04E780
Overworld_MemorizeMap16Change:
org $04E879
Overworld_CheckForSpecialOverworldTrigger_Direction:
org $05A51D
Sprite_SpawnFallingItem:
org $05AFF1
Sprite_6C_MirrorPortal_dont_do_warp:
org $05DF6C ; 02DF6C - Bank05.asm : 2445
Sprite_DrawMultiple:
org $05DF70 ; 02DF70 - Bank05.asm : 2454
Sprite_DrawMultiple_quantity_preset:
org $05DF75 ; 02DF75 - Bank05.asm : 2461
Sprite_DrawMultiple_player_deferred:
org $05E1A7 ; 02E1A7 - Bank05.asm : 2592
Sprite_ShowSolicitedMessageIfPlayerFacing:
org $05E1F0
Sprite_ShowMessageFromPlayerContact:
org $05E219
Sprite_ShowMessageUnconditional:
org $05EC96
Sprite_ZeldaLong:
org $0680FA
Player_ApplyRumbleToSprites:
org $0683E6
Utility_CheckIfHitBoxesOverlapLong:
org $06A7DB
Chicken_SpawnAvengerChicken: ; returns short
org $06AD58
Sprite_TransmuteToBomb:
org $06DC5C
Sprite_DrawShadowLong:
org $06DD40
DashKey_Draw:
org $06DBF8
Sprite_PrepAndDrawSingleLargeLong:
org $06DC00
Sprite_PrepAndDrawSingleSmallLong:
org $06EA18
Sprite_ApplySpeedTowardsPlayerLong:
org $06EAA6
Sprite_DirectionToFacePlayerLong:
org $06F12F
Sprite_CheckDamageToPlayerSameLayerLong:
org $06F86A
OAM_AllocateDeferToPlayerLong:
org $0791B3
Player_HaltDashAttackLong:
org $07999D
Link_ReceiveItem:
org $079F82
Link_UseHammer:
org $07A985
SetGameModeLikeMirror:
org $07E68F
Unknown_Method_0: ; In US version disassembly simply called "$3E6A6 IN ROM"
org $07F413
Link_CheckForEdgeScreenTransition:
org $07F4AA
Sprite_CheckIfPlayerPreoccupied:
org $08C3AE
Ancilla_ReceiveItem:
org $08C505
Ancilla_ReceiveItem_objectFinished:
org $08CE93
Ancilla_BreakTowerSeal_draw_single_crystal:
org $08CEC3
Ancilla_BreakTowerSeal_stop_spawning_sparkles:
org $08CF59
BreakTowerSeal_ExecuteSparkles:
org $08F710
Ancilla_SetOam_XY_Long:
org $0985E2 ; (break on $0985E4)
AddReceivedItem:
org $098605
AddReceivedItem_notCrystal:
org $098766
AddReceivedItem_gfxHandling:
org $098BAD
AddPendantOrCrystal:
org $098CFD
AddWeathervaneExplosion:
org $0993DF
AddDashTremor:
org $099D04
AddAncillaLong:
org $099D1A
Ancilla_CheckIfAlreadyExistsLong:
org $09AC57
Ancilla_TerminateSelectInteractives:
org $09AE64
Sprite_SetSpawnedCoords:
org $09AD58
GiveRupeeGift:
org $0AB7BD
FluteMenu_HandleSelection_NoSelection:
org $0ABA4F
OverworldMap_InitGfx:
org $0ABA99
OverworldMap_DarkWorldTilemap:
org $0ABAB9
OverworldMap_LoadSprGfx:
org $8AE817
DungeonMapBossRooms:
org $0CD7D1
NameFile_MakeScreenVisible:
org $0CDB3E
InitializeSaveFile:
org $0CDBC0
InitializeSaveFile_build_checksum:
org $0DBA71
GetRandomInt:
org $0DBA80
OAM_AllocateFromRegionA:
org $0DBA84
OAM_AllocateFromRegionB:
org $0DBA88
OAM_AllocateFromRegionC:
org $0DBA8C
OAM_AllocateFromRegionD:
org $0DBA90
OAM_AllocateFromRegionE:
org $0DBA94
OAM_AllocateFromRegionF:
org $0DBB67
Sound_SetSfxPanWithPlayerCoords:
org $0DBB6E
Sound_SetSfx1PanLong:
org $0DBB7C
Sound_SetSfx2PanLong:
org $0DBB8A
Sound_SetSfx3PanLong:
org $0DDB7F
HUD_RefreshIconLong:
org $0DDD32
Equipment_UpdateEquippedItemLong:
org $0DE01E ; 6E10E - equipment.asm : 787
BottleMenu_movingOn:
org $0DE346
RestoreNormalMenu:
org $0DE395
Equipment_SearchForEquippedItemLong:
org $0DE9C8
DrawProgressIcons: ; this returns short
org $0DED29
DrawEquipment: ; this returns short
org $0DFA78
HUD_RebuildLong:
org $0DFA88
HUD_RebuildIndoor_Palace:
org $0DFA88
HUD_RebuildLong2:
org $0EEE10
Messaging_Text:
org $0FFD94
Overworld_TileAttr:
org $1BC97C
Overworld_DrawPersistentMap16:
org $1BED03
Palette_Sword:
org $1BED29
Palette_Shield:
org $1BEDF9
Palette_ArmorAndGloves:
org $1BEE52
Palette_Hud:
org $1BEF96
Palette_SelectScreen:
org $1CFAAA
ShopKeeper_RapidTerminateReceiveItem:
org $1CF500
Sprite_NullifyHookshotDrag:
org $1CF537
Ancilla_CheckForAvailableSlot:
org $1DE9B6
Filter_MajorWhitenMain:
org $1DF65D
Sprite_SpawnDynamically:
org $1DF65F
Sprite_SpawnDynamically_arbitrary:
org $1DFD4B
DiggingGameGuy_AttemptPrizeSpawn:
org $1EDE28
Sprite_GetEmptyBottleIndex: ; this is totally in sprite_bees.asm
org $1EF4E7
Sprite_PlayerCantPassThrough:
;================================================================================

View File

@@ -1,127 +1,118 @@
;================================================================================
; Accessibility Fixes
;================================================================================
FlipGreenPendant:
LDA $0C : CMP #$38 : BNE + ; check if we have green pendant
ORA #$40 : STA $0C ; flip it
+
LDA $0D : STA $0802, X ; stuff we wrote over "Set CHR, palette, and priority of the sprite"
LDA $0C : STA $0803, X
RTL
;================================================================================
ConditionalLightning:
CMP.b #$05 : BEQ ++
CMP.b #$2C : BEQ ++
CMP.b #$5A : BEQ ++
LDA.l DisableFlashing : BNE ++
LDA.b #$32 : STA.w $9A
LDA.b #$32 : STA.w CGADSUBQ
RTL
++
LDA.b #$72
STA $9A
STA.b CGADSUBQ
RTL
;================================================================================
ConditionalWhitenBg:
LDX.b #$00
LDA.l DisableFlashing : REP #$20 : BNE +
LDA $00,X
LDA.b Scrap00,X
JSR WhitenLoopReal
RTL
+
LDA $00
LDA.b Scrap00
JSR WhitenLoopDummy
RTL
;================================================================================
WhitenLoopReal:
-
LDA $7EC340, X : JSL Filter_Majorly_Whiten_Color : STA $7EC540, X
LDA $7EC350, X : JSL Filter_Majorly_Whiten_Color : STA $7EC550, X
LDA $7EC360, X : JSL Filter_Majorly_Whiten_Color : STA $7EC560, X
LDA $7EC370, X : JSL Filter_Majorly_Whiten_Color : STA $7EC570, X
LDA $7EC380, X : JSL Filter_Majorly_Whiten_Color : STA $7EC580, X
LDA $7EC390, X : JSL Filter_Majorly_Whiten_Color : STA $7EC590, X
LDA $7EC3A0, X : JSL Filter_Majorly_Whiten_Color : STA $7EC5A0, X
LDA $7EC3B0, X : JSL Filter_Majorly_Whiten_Color : STA $7EC5B0, X
LDA $7EC3C0, X : JSL Filter_Majorly_Whiten_Color : STA $7EC5C0, X
LDA $7EC3D0, X : JSL Filter_Majorly_Whiten_Color : STA $7EC5D0, X
LDA $7EC3E0, X : JSL Filter_Majorly_Whiten_Color : STA $7EC5E0, X
LDA.l PaletteBufferAux+$40, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$40, X
LDA.l PaletteBufferAux+$50, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$50, X
LDA.l PaletteBufferAux+$60, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$60, X
LDA.l PaletteBufferAux+$70, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$70, X
LDA.l PaletteBufferAux+$80, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$80, X
LDA.l PaletteBufferAux+$90, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$90, X
LDA.l PaletteBufferAux+$A0, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$A0, X
LDA.l PaletteBufferAux+$B0, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$B0, X
LDA.l PaletteBufferAux+$C0, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$C0, X
LDA.l PaletteBufferAux+$D0, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$D0, X
LDA.l PaletteBufferAux+$E0, X : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$E0, X
INX #2 : CPX.b #$10 : BEQ +
JMP -
+
LDA $7EC3F0 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F0
LDA $7EC3F2 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F2
LDA $7EC3F4 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F4
LDA $10 : CMP.w #$07 : BNE +
LDA $048E
CMP.w #$3C : BEQ ++
CMP.w #$9D : BEQ ++
CMP.w #$9C : BEQ ++
CMP.w #$A5 : BEQ ++
LDA.l PaletteBufferAux+$F0 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F0
LDA.l PaletteBufferAux+$F2 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F2
LDA.l PaletteBufferAux+$F4 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F4
LDA.b GameMode : CMP.w #$0007 : BNE +
LDA.b RoomIndex
CMP.w #$003C : BEQ ++
CMP.w #$009D : BEQ ++
CMP.w #$009C : BEQ ++
CMP.w #$00A5 : BEQ ++
+
LDA $7EC3F6 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F6
LDA $7EC3F8 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F8
LDA.l PaletteBufferAux+$F6 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F6
LDA.l PaletteBufferAux+$F8 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F8
BRA +++
++
LDA $7EC3F6 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F6
LDA $7EC3F8 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F8
LDA.l PaletteBuffer+$F6 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F6
LDA.l PaletteBuffer+$F8 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F8
BRA +++
+++
LDA $7EC3FA : JSL Filter_Majorly_Whiten_Color : STA $7EC5FA
LDA $7EC3FC : JSL Filter_Majorly_Whiten_Color : STA $7EC5FC
LDA $7EC3FE : JSL Filter_Majorly_Whiten_Color : STA $7EC5FE
LDA.l PaletteBufferAux+$FA : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$FA
LDA.l PaletteBufferAux+$FC : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$FC
LDA.l PaletteBufferAux+$FE : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$FE
REP #$10
LDA $7EC540 : TAY
LDA $7EC300 : BNE +
LDA.l PaletteBuffer+$40 : TAY
LDA.l PaletteBufferAux : BNE +
TAY
+
TYA : STA $7EC500
TYA : STA.l PaletteBuffer
SEP #$30
RTS
;================================================================================
WhitenLoopDummy:
-
LDA $7EC340, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC540, X
LDA $7EC350, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC550, X
LDA $7EC360, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC560, X
LDA $7EC370, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC570, X
LDA $7EC380, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC580, X
LDA $7EC390, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC590, X
LDA $7EC3A0, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC5A0, X
LDA $7EC3B0, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC5B0, X
LDA $7EC3C0, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC5C0, X
LDA $7EC3D0, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC5D0, X
LDA $7EC3E0, X : JSL Filter_Majorly_Whiten_Color : LDA $7EC5E0, X
LDA.l PaletteBufferAux+$40, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$40, X
LDA.l PaletteBufferAux+$50, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$50, X
LDA.l PaletteBufferAux+$60, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$60, X
LDA.l PaletteBufferAux+$70, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$70, X
LDA.l PaletteBufferAux+$80, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$80, X
LDA.l PaletteBufferAux+$90, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$90, X
LDA.l PaletteBufferAux+$A0, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$A0, X
LDA.l PaletteBufferAux+$B0, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$B0, X
LDA.l PaletteBufferAux+$C0, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$C0, X
LDA.l PaletteBufferAux+$D0, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$D0, X
LDA.l PaletteBufferAux+$E0, X : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$E0, X
INX #2 : CPX.b #$10 : BEQ +
JMP -
+
LDA $7EC3F0 : JSL Filter_Majorly_Whiten_Color : LDA $7EC5F0
LDA $7EC3F2 : JSL Filter_Majorly_Whiten_Color : LDA $7EC5F2
LDA $7EC3F4 : JSL Filter_Majorly_Whiten_Color : LDA $7EC5F4
LDA $10 : CMP.w #$07 : BNE + ; only light invisifloor if we're in dungeon submodule
LDA $048E
CMP.w #$3C : BEQ ++ ; hookshot cave
CMP.w #$9D : BEQ ++ ; gt right
CMP.w #$9C : BEQ ++ ; gt big room
CMP.w #$A5 : BEQ ++ ; wizzrobes 1
LDA.l PaletteBufferAux+$F0 : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$F0
LDA.l PaletteBufferAux+$F2 : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$F2
LDA.l PaletteBufferAux+$F4 : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$F4
LDA.b GameMode : CMP.w #$0007 : BNE + ; only light invisifloor if we're in dungeon submodule
LDA.b RoomIndex
CMP.w #$003C : BEQ ++ ; hookshot cave
CMP.w #$009D : BEQ ++ ; gt right
CMP.w #$009C : BEQ ++ ; gt big room
CMP.w #$00A5 : BEQ ++ ; wizzrobes 1
+
LDA $7EC3F6 : JSL Filter_Majorly_Whiten_Color : LDA $7EC5F6
LDA $7EC3F8 : JSL Filter_Majorly_Whiten_Color : LDA $7EC5F8
LDA.l PaletteBufferAux+$F6 : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$F6
LDA.l PaletteBufferAux+$F8 : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$F8
BRA +++
++
LDA $7EC3F6 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F6
LDA $7EC3F8 : JSL Filter_Majorly_Whiten_Color : STA $7EC5F8
LDA.l PaletteBufferAux+$F6 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F6
LDA.l PaletteBufferAux+$F8 : JSL Filter_Majorly_Whiten_Color : STA.l PaletteBuffer+$F8
BRA +++
+++
LDA $7EC3FA : JSL Filter_Majorly_Whiten_Color : LDA $7EC5FA
LDA $7EC3FC : JSL Filter_Majorly_Whiten_Color : LDA $7EC5FC
LDA $7EC3FE : JSL Filter_Majorly_Whiten_Color : LDA $7EC5FE
LDA.l PaletteBufferAux+$FA : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$FA
LDA.l PaletteBufferAux+$FC : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$FC
LDA.l PaletteBufferAux+$FE : JSL Filter_Majorly_Whiten_Color : LDA.l PaletteBuffer+$FE
REP #$10
LDA $7EC540 : TAY
LDA $7EC300 : BNE +
LDA.l PaletteBuffer+$40 : TAY
LDA.l PaletteBufferAux : BNE +
TAY
+
TYA : STA $7EC500
TYA : STA.l PaletteBuffer
SEP #$30
RTS
;================================================================================
@@ -129,144 +120,144 @@ RestoreBgEther:
LDX.b #$00
LDA.l DisableFlashing : REP #$20 : BNE +
-
LDA $00,X
LDA $7EC340, X : STA $7EC540, X
LDA $7EC350, X : STA $7EC550, X
LDA $7EC360, X : STA $7EC560, X
LDA $7EC370, X : STA $7EC570, X
LDA $7EC380, X : STA $7EC580, X
LDA $7EC390, X : STA $7EC590, X
LDA $7EC3A0, X : STA $7EC5A0, X
LDA $7EC3B0, X : STA $7EC5B0, X
LDA $7EC3C0, X : STA $7EC5C0, X
LDA $7EC3D0, X : STA $7EC5D0, X
LDA $7EC3E0, X : STA $7EC5E0, X
LDA $7EC3F0, X : STA $7EC5F0, X
LDA.b Scrap00,X
LDA.l PaletteBufferAux+$40, X : STA.l PaletteBuffer+$40, X
LDA.l PaletteBufferAux+$50, X : STA.l PaletteBuffer+$50, X
LDA.l PaletteBufferAux+$60, X : STA.l PaletteBuffer+$60, X
LDA.l PaletteBufferAux+$70, X : STA.l PaletteBuffer+$70, X
LDA.l PaletteBufferAux+$80, X : STA.l PaletteBuffer+$80, X
LDA.l PaletteBufferAux+$90, X : STA.l PaletteBuffer+$90, X
LDA.l PaletteBufferAux+$A0, X : STA.l PaletteBuffer+$A0, X
LDA.l PaletteBufferAux+$B0, X : STA.l PaletteBuffer+$B0, X
LDA.l PaletteBufferAux+$C0, X : STA.l PaletteBuffer+$C0, X
LDA.l PaletteBufferAux+$D0, X : STA.l PaletteBuffer+$D0, X
LDA.l PaletteBufferAux+$E0, X : STA.l PaletteBuffer+$E0, X
LDA.l PaletteBufferAux+$F0, X : STA.l PaletteBuffer+$F0, X
INX #2 : CPX.b #$10 : BNE -
BRA ++
+
-
LDA $00
LDA $7EC340, X : LDA $7EC540, X
LDA $7EC350, X : LDA $7EC550, X
LDA $7EC360, X : LDA $7EC560, X
LDA $7EC370, X : LDA $7EC570, X
LDA $7EC380, X : LDA $7EC580, X
LDA $7EC390, X : LDA $7EC590, X
LDA $7EC3A0, X : LDA $7EC5A0, X
LDA $7EC3B0, X : LDA $7EC5B0, X
LDA $7EC3C0, X : LDA $7EC5C0, X
LDA $7EC3D0, X : LDA $7EC5D0, X
LDA $7EC3E0, X : LDA $7EC5E0, X
LDA $7EC3F0, X : LDA $7EC5F0, X
LDA.b Scrap00
LDA.l PaletteBufferAux+$40, X : LDA.l PaletteBuffer+$40, X
LDA.l PaletteBufferAux+$50, X : LDA.l PaletteBuffer+$50, X
LDA.l PaletteBufferAux+$60, X : LDA.l PaletteBuffer+$60, X
LDA.l PaletteBufferAux+$70, X : LDA.l PaletteBuffer+$70, X
LDA.l PaletteBufferAux+$80, X : LDA.l PaletteBuffer+$80, X
LDA.l PaletteBufferAux+$90, X : LDA.l PaletteBuffer+$90, X
LDA.l PaletteBufferAux+$A0, X : LDA.l PaletteBuffer+$A0, X
LDA.l PaletteBufferAux+$B0, X : LDA.l PaletteBuffer+$B0, X
LDA.l PaletteBufferAux+$C0, X : LDA.l PaletteBuffer+$C0, X
LDA.l PaletteBufferAux+$D0, X : LDA.l PaletteBuffer+$D0, X
LDA.l PaletteBufferAux+$E0, X : LDA.l PaletteBuffer+$E0, X
LDA.l PaletteBufferAux+$F0, X : LDA.l PaletteBuffer+$F0, X
INX #2 : CPX.b #$10 : BNE -
BRA ++
++
JML $02FF51 ; Bank0E.asm : 3936 vanilla restore routine after loop which RTLs
JML Palette_RestoreFixedColor-7 ; Bank0E.asm : 3936 vanilla restore routine after loop which RTLs
;================================================================================
DDMConditionalLightning:
LDA.l DisableFlashing
REP #$20
BNE +
LDA.w $0000
LDA.w Scrap
LDX.b #$02
JML $07FA7F ; Bank0E.asm : 4738 vanilla loop equivalent to below beginning at LDY #$00
JML FlashGanonTowerPalette_next_thunder-2 ; Bank0E.asm : 4738 vanilla loop equivalent to below beginning at LDY #$00
+
LDA.b $00 : LDX.b #$02 : LDY #$00
LDA.b Scrap00 : LDX.b #$02 : LDY.b #$00
-
LDA $F4EB, Y : LDA $7EC560, X
LDA $F4F9, Y : LDA $7EC570, X
LDA $F507, Y : LDA $7EC590, X
LDA $F515, Y : LDA $7EC5E0, X
LDA $F523, Y : LDA $7EC5F0, X
LDA.w $F4EB, Y : LDA.l PaletteBuffer+$60, X
LDA.w $F4F9, Y : LDA.l PaletteBuffer+$70, X
LDA.w $F507, Y : LDA.l PaletteBuffer+$90, X
LDA.w $F515, Y : LDA.l PaletteBuffer+$E0, X
LDA.w $F523, Y : LDA.l PaletteBuffer+$F0, X
INY #2
INX #2 : CPX.b #$10 : BNE -
JML $07FAAC ; Bank0E.asm : 4754 both branches converge here
JML FlashGanonTowerPalette_bright_white ; Bank0E.asm : 4754 both branches converge here
;================================================================================
ConditionalGTFlash:
LDA.l DisableFlashing : REP #$20 : BNE +
LDA $0000
LDA.w Scrap
-
LDA $F9C1, Y : STA $7EC5D0, X
LDA.w $F9C1, Y : STA.l PaletteBuffer+$D0, X
INY #2
INX #2 : CPX.b #$10 : BNE -
RTL
+
LDA $00
LDA.b Scrap00
-
LDA $F9C1, Y : LDA $7EC5D0, X
LDA.w $F9C1, Y : LDA.l PaletteBuffer+$D0, X
INY #2
INX #2 : CPX.b #$10 : BNE -
RTL
;================================================================================
ConditionalRedFlash:
LDA.l DisableFlashing : REP #$20 : BNE +
LDA $00,X
LDA.w #$1D59 : STA $7EC5DA
LDA.w #$25FF : STA $7EC5DC
LDA.b Scrap,X
LDA.w #$1D59 : STA.l PaletteBuffer+$DA
LDA.w #$25FF : STA.l PaletteBuffer+$DC
LDA.w #$001A
RTL
+
LDA $00
LDA.w #$1D59 : LDA $7EC5DA
LDA.w #$25FF : LDA $7EC5DC
LDA.b Scrap00
LDA.w #$1D59 : LDA.l PaletteBuffer+$DA
LDA.w #$25FF : LDA.l PaletteBuffer+$DC
LDA.w #$0000
RTL
;================================================================================
ConditionalPedAncilla:
LDA.l DisableFlashing : REP #$20 : BNE +
LDA $00,X
LDA $00 : STA $04
LDA $02 : STA $06
LDA.b Scrap,X
LDA.b Scrap00 : STA.b Scrap04
LDA.b Scrap02 : STA.b Scrap06
RTL
+
LDA $00
LDA $00 : LDA $04
LDA $02 : LDA $06
LDA.b Scrap
LDA.b Scrap00 : LDA.b Scrap04
LDA.b Scrap02 : LDA.b Scrap06
RTL
;================================================================================
LoadElectroPalette:
REP #$20
LDA.w #$0202 : STA $0C
LDA.w #$0404 : STA $0E
LDA.w #$001B : STA $02
LDA.w #$0202 : STA.b Scrap0C
LDA.w #$0404 : STA.b Scrap0E
LDA.w #$001B : STA.b Scrap02
SEP #$10
LDX $0C : LDA $1BEBB4, X : AND.w #$00FF : ADC #$D630
LDX.b Scrap0C : LDA.l SwordPaletteOffsets, X : AND.w #$00FF : ADC.w #$D630
REP #$10 : LDX.w #$01B2 : LDY.w #$0002
JSR ConditionalLoadGearPalette
SEP #$10
LDX $0D
LDA $1BEBC1, X : AND.w #$00FF : ADC #$D648
LDX.b Scrap0D
LDA.l ShieldPaletteOffsets, X : AND.w #$00FF : ADC.w #$D648
REP #$10 : LDX.w #$01B8 : LDY.w #$0003
JSR ConditionalLoadGearPalette
SEP #$10
LDX $0E
LDA $1BEC06, X : AND.w #$00FF : ASL A : ADC #$D308
LDX.b Scrap0E
LDA.l LinkMailPalettesOffsets, X : AND.w #$00FF : ASL A : ADC.w #$D308
REP #$10 : LDX.w #$01E2 : LDY.w #$000E
JSR ConditionalLoadGearPalette
SEP #$30
INC $15
INC.b NMICGRAM
RTL
;================================================================================
ConditionalLoadGearPalette:
STA $00
STA.b Scrap00
SEP #$20
LDA.l DisableFlashing : REP #$20 : BNE +
LDA $00,X
LDA.b Scrap,X
-
LDA [$00]
STA $7EC500, X
INC $00 : INC $00
LDA.b [Scrap00]
STA.l PaletteBuffer, X
INC.b Scrap00 : INC.b Scrap00
INX #2
DEY
BPL -
RTS
+
LDA $00
LDA.b Scrap
-
LDA [$00]
LDA $7EC500, X
INC $00 : INC $00
LDA.b [Scrap00]
LDA.l PaletteBuffer, X
INC.b Scrap00 : INC.b Scrap00
INX #2
DEY
BPL -
@@ -281,13 +272,13 @@ RestoreElectroPalette:
LDX.w #$01E2 : LDY.w #$000E
JSR FillPaletteBufferFromAux
SEP #$30
INC $15
INC.b NMICGRAM
RTL
;================================================================================
FillPaletteBufferFromAux:
-
LDA $7EC300, X
STA $7EC500, X
LDA.l PaletteBufferAux, X
STA.l PaletteBuffer, X
INX #2
DEY
BPL -

BIN
asar

Binary file not shown.

BIN
bin/linux/asar Normal file

Binary file not shown.

BIN
bin/linux/compress Normal file

Binary file not shown.

BIN
bin/linux/decompress Normal file

Binary file not shown.

BIN
bin/macos/asar Normal file

Binary file not shown.

249
bin/src/compress.c Normal file
View File

@@ -0,0 +1,249 @@
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <sys/stat.h>
const int MAXLENGTH = 0x300;
struct section {
int mode;
int length;
unsigned char data[2];
int datalength;
};
int find_duplicate(off_t loc, off_t size, unsigned char buf[], struct section *out) {
int i, j;
struct section result;
result.mode = 4;
result.length = 0;
for (i = 0; i < loc && i < 0x10000; i++) {
if (buf[i] != buf[loc]) {
continue;
}
for (j = 0; j < MAXLENGTH; j++) {
if (buf[i + j] != buf[loc + j]) {
break;
}
}
if (j > result.length) {
result.length = j;
result.data[0] = i & 0xFF;
result.data[1] = (i >> 8) & 0xFF;
result.datalength = 2;
}
}
if (result.length < 4) {
return -1;
}
*out = result;
return 0;
}
int find_repeat_byte(off_t loc, off_t size, unsigned char buf[], struct section *out) {
int i;
for (i = 0; i < MAXLENGTH && loc + i < size; i++) {
if (buf[loc + i] != buf[loc]) {
break;
}
}
if (i > 2) {
struct section result;
result.mode = 1;
result.length = i;
result.data[0] = buf[loc];
result.datalength = 1;
*out = result;
return 0;
}
return -1;
}
int find_repeat_word(off_t loc, off_t size, unsigned char buf[], struct section *out) {
int i;
for (i = 0; i < MAXLENGTH && loc + i + 1 < size; i += 1) {
if (buf[loc + i] != buf[loc + (i & 1)]) {
break;
}
}
if (i > 3) {
struct section result;
result.mode = 2;
result.length = i;
result.data[0] = buf[loc];
result.data[1] = buf[loc + 1];
result.datalength = 2;
*out = result;
return 0;
}
return -1;
}
int find_incrementing_byte(off_t loc, off_t size, unsigned char buf[], struct section *out) {
int i;
for (i = 0; i < MAXLENGTH && loc + i < size; i++) {
if (buf[loc] + i < i) {
break;
}
if (buf[loc + i] != buf[loc] + i) {
break;
}
}
if (i > 2) {
struct section result;
result.mode = 3;
result.length = i;
result.data[0] = buf[loc];
result.datalength = 1;
*out = result;
return 0;
}
return -1;
}
int get_section(off_t loc, off_t size, unsigned char buf[], struct section *out) {
struct section best, current;
best.length = 0;
if (!find_repeat_byte(loc, size, buf, &current)) {
if (current.length > best.length) {
best = current;
}
}
if (!find_repeat_word(loc, size, buf, &current)) {
if (current.length > best.length) {
best = current;
}
}
if (!find_incrementing_byte(loc, size, buf, &current)) {
if (current.length > best.length) {
best = current;
}
}
if (!find_duplicate(loc, size, buf, &current)) {
if (current.length > best.length) {
best = current;
}
}
if (best.length > 0) {
// printf("byte %06X: mode %d length %02X\n", loc, best.mode, best.length);
*out = best;
return 0;
} else {
return -1;
}
}
int write_section(struct section section, unsigned char data[], unsigned char buf[], int loc) {
int nloc = loc;
int len = section.length - 1;
if (len > 0x1F) {
buf[nloc++] = 0xE0 | (section.mode << 2) | (len >> 8);
buf[nloc++] = len & 0xFF;
} else {
buf[nloc++] = (section.mode << 5) | len;
}
for (int i = 0; i < section.datalength; i++) {
buf[nloc++] = data[i];
}
return nloc;
}
int main(int argc, char *argv[]) {
if (argc < 3) {
printf("Usage: %s infile outfile [start [length]]\n", argv[0]);
return 1;
}
off_t seek = 0;
if (argc > 3) {
seek = strtol(argv[3], NULL, 0);
}
FILE *inptr;
if ((inptr = fopen(argv[1], "rb")) == NULL) {
printf("%s does not exist.\n", argv[1]);
return 1;
}
int fd = fileno(inptr);
if (fd < 0) {
printf("Error stating file: %s\n", argv[1]);
return 1;
}
struct stat buf;
if (fstat(fd, &buf) != 0) {
printf("Error stating file: %s\n", argv[1]);
return 1;
}
off_t size = buf.st_size - seek;
if (argc > 4) {
size = strtol(argv[4], NULL, 0);
}
unsigned char inbuf[size];
fseek(inptr, seek, SEEK_SET);
if (fread(inbuf, 1, size, inptr) < size) {
printf("Error reading file: %s\n", argv[1]);
return 1;
}
fclose(inptr);
unsigned char outbuf[size * 2];
unsigned char m0data[MAXLENGTH];
int oloc = 0;
struct section m0;
m0.mode = 0;
m0.length = 0;
int i;
off_t loc = 0;
while (loc < size) {
struct section section;
if (!get_section(loc, size, inbuf, &section)) {
if (m0.length > 0) {
m0.datalength = m0.length;
oloc = write_section(m0, m0data, outbuf, oloc);
m0.length = 0;
}
oloc = write_section(section, section.data, outbuf, oloc);
loc += section.length;
} else {
if (m0.length == MAXLENGTH) {
m0.datalength = m0.length;
oloc = write_section(m0, m0data, outbuf, oloc);
m0.length = 0;
}
m0data[m0.length++] = inbuf[loc];
loc += 1;
}
}
if (m0.length > 0) {
m0.datalength = m0.length;
oloc = write_section(m0, m0data, outbuf, oloc);
m0.length = 0;
}
outbuf[oloc++] = 0xFF;
FILE *outptr;
if ((outptr = fopen(argv[2], "wb")) == NULL) {
printf("Error opening file: %s\n", argv[2]);
return 1;
}
if (fwrite(outbuf, 1, oloc, outptr) < oloc) {
printf("Error writing to file: %s\n", argv[2]);
return 1;
}
fclose(outptr);
printf("Input file: %lX bytes. Compressed: %X bytes.\n", size, oloc);
return 0;
}

155
bin/src/decompress.c Normal file
View File

@@ -0,0 +1,155 @@
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <sys/stat.h>
struct section {
int mode;
int length;
unsigned char data[2];
int datalength;
};
int read_section(unsigned char buf[], int loc, struct section *out) {
int nloc = loc;
unsigned char header = buf[nloc++];
if (header == 0xFF) {
return -1;
}
struct section result;
result.data[0] = buf[loc];
result.datalength = 1;
if ((header & 0xE0) == 0xE0) {
result.mode = (header & 0x1C) >> 2;
result.length = (((header & 0x03) << 8) | buf[nloc++]) + 1;
} else {
result.mode = (header & 0xE0) >> 5;
result.length = (header & 0x1F) + 1;
}
switch (result.mode) {
case 0:
result.datalength = 0;
break;
case 1:
result.datalength = 1;
break;
case 2:
result.datalength = 2;
break;
case 3:
result.datalength = 1;
break;
case 4:
result.datalength = 2;
break;
}
for (int i = 0; i < result.datalength; i++) {
result.data[i] = buf[nloc++];
}
*out = result;
return nloc;
}
int main(int argc, char *argv[]) {
if (argc < 3) {
printf("Usage: %s infile outfile [start [length]]\n", argv[0]);
return 1;
}
off_t seek = 0;
if (argc > 3) {
seek = strtol(argv[3], NULL, 0);
}
FILE *inptr;
if ((inptr = fopen(argv[1], "rb")) == NULL) {
printf("%s does not exist.\n", argv[1]);
return 1;
}
int fd = fileno(inptr);
if (fd < 0) {
printf("Error stating file: %s\n", argv[1]);
return 1;
}
struct stat buf;
if (fstat(fd, &buf) != 0) {
printf("Error stating file: %s\n", argv[1]);
return 1;
}
off_t size = buf.st_size - seek;
if (argc > 4) {
size = strtol(argv[4], NULL, 0);
}
fseek(inptr, seek, SEEK_SET);
unsigned char inbuf[size];
if (fread(inbuf, 1, size, inptr) < size) {
printf("Error reading file: %s\n", argv[1]);
return 1;
}
fclose(inptr);
unsigned char outbuf[size * 256];
int oloc = 0;
struct section section;
int i;
off_t loc = 0;
while ((loc = read_section(inbuf, loc, &section)) >= 0) {
if (section.mode == 0) {
for (i = 0; i < section.length; i++) {
outbuf[oloc++] = inbuf[loc++];
}
} else if (section.mode == 1) {
for (i = 0; i < section.length; i++) {
outbuf[oloc++] = section.data[0];
}
} else if (section.mode == 2) {
for (i = 0; i < section.length; i++) {
outbuf[oloc++] = section.data[0];
if (++i < section.length) {
outbuf[oloc++] = section.data[1];
}
}
} else if (section.mode == 3) {
for (i = 0; i < section.length; i++) {
outbuf[oloc++] = (section.data[0] + i) & 0xff;
}
} else if (section.mode == 4) {
int offset = section.data[0] | (section.data[1] << 8);
for (i = 0; i < section.length; i++) {
outbuf[oloc++] = outbuf[offset + i];
}
}
}
FILE *outptr;
if ((outptr = fopen(argv[2], "wb")) == NULL) {
printf("Error opening file: %s\n", argv[2]);
return 1;
}
if (fwrite(outbuf, 1, oloc, outptr) < oloc) {
printf("Error writing to file: %s\n", argv[2]);
return 1;
}
fclose(outptr);
printf("Input file: %lX bytes. Decompressed: %X bytes.\n", size, oloc);
return 0;
}

BIN
bin/windows/asar.exe Normal file

Binary file not shown.

BIN
bin/windows/compress.exe Normal file

Binary file not shown.

BIN
bin/windows/decompress.exe Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -2,22 +2,22 @@
; Randomize Book of Mudora
;--------------------------------------------------------------------------------
LoadLibraryItemGFX:
LDA.l LibraryItem_Player : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
STA $0E80, X ; Store item type
JSL.l PrepDynamicTile
RTL
INC.w SkipBeeTrapDisguise
LDA.l LibraryItem_Player : STA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
STA.w SprSourceItemId, X
JML RequestStandingItemVRAMSlot
;--------------------------------------------------------------------------------
DrawLibraryItemGFX:
PHA
LDA $0E80, X ; Retrieve stored item type
JSL.l DrawDynamicTile
PLA
PHA
LDA.w SprItemReceipt, X
JSL DrawPotItem
PLA
RTL
;--------------------------------------------------------------------------------
SetLibraryItem:
LDY $0E80, X ; Retrieve stored item type
JSL.l ItemSet_Library ; contains thing we wrote over
LDY.w SprSourceItemId, X
JSL ItemSet_Library ; contains thing we wrote over
RTL
;--------------------------------------------------------------------------------
@@ -25,69 +25,82 @@ RTL
;================================================================================
; Randomize Bonk Keys
;--------------------------------------------------------------------------------
!REDRAW = "$7F5000"
;--------------------------------------------------------------------------------
LoadBonkItemGFX:
LDA.b #$08 : STA $0F50, X ; thing we wrote over
LDA.b #$08 : STA.w SpriteOAMProp, X ; thing we wrote over
LoadBonkItemGFX_inner:
LDA.b #$00 : STA !REDRAW
JSR LoadBonkItem_Player : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
JSR LoadBonkItem
JSL.l PrepDynamicTile
INC.w SkipBeeTrapDisguise
JSR LoadBonkItem_Player : STA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
JSR LoadBonkItem
STA.w SprSourceItemId, X
JSL RequestStandingItemVRAMSlot
RTL
;--------------------------------------------------------------------------------
DrawBonkItemGFX:
PHA
LDA !REDRAW : BEQ .skipInit ; skip init if already ready
JSL.l LoadBonkItemGFX_inner
BRA .done ; don't draw on the init frame
.skipInit
JSR LoadBonkItem
JSL.l DrawDynamicTileNoShadow
.done
PLA
PHA
LDA.w SprRedrawFlag, X : BEQ .skipInit
JSL LoadBonkItemGFX_inner
LDA.w SprRedrawFlag, X : CMP.b #$02 : BEQ .skipInit
BRA .done ; don't draw on the init frame
.skipInit
LDA.w SprItemReceipt,X
JSL DrawPotItem
.done
PLA
RTL
;--------------------------------------------------------------------------------
GiveBonkItem:
JSR LoadBonkItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID
JSR LoadBonkItem
CMP #$24 : BNE .notKey
.key
PHY : LDY.b #$24 : JSL.l AddInventory : PLY ; do inventory processing for a small key
LDA CurrentSmallKeys : INC A : STA CurrentSmallKeys
LDA.b #$2F : JSL.l Sound_SetSfx3PanLong
JSL CountBonkItem
RTL
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
LDA.w SprSourceItemId, X
JSR AbsorbKeyCheck : BCC .notKey
PHY : LDY.b #$24 : JSL AddInventory : PLY ; do inventory processing for a small key
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys
LDA.b #$2F : JSL Sound_SetSfx3PanLong
LDA.b #$01 : STA.l UpdateHUDFlag
RTL
.notKey
PHY : TAY : JSL.l Link_ReceiveItem : PLY
JSL CountBonkItem
PHY : TAY : JSL Link_ReceiveItem : PLY
RTL
;--------------------------------------------------------------------------------
LoadBonkItem:
LDA $A0 ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
CMP #115 : BNE + ; Desert Bonk Key
LDA.l BonkKey_Desert
BRA ++
+ : CMP #140 : BNE + ; GTower Bonk Key
LDA.l BonkKey_GTower
BRA ++
+
LDA.b #$24 ; default to small key
++
LDA.b RoomIndex ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
CMP.b #$73 : BNE + ; Desert Bonk Key
LDA.l BonkKey_Desert
BRA ++
+ : CMP.b #$8C : BNE + ; GTower Bonk Key
LDA.l BonkKey_GTower
BRA ++
+
LDA.b #$24 ; default to small key
++
RTS
;--------------------------------------------------------------------------------
LoadBonkItem_Player:
LDA $A0 ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
CMP #115 : BNE + ; Desert Bonk Key
LDA.l BonkKey_Desert_Player
BRA ++
+ : CMP #140 : BNE + ; GTower Bonk Key
LDA.l BonkKey_GTower_Player
BRA ++
+
LDA.b #$00
++
LDA.b RoomIndex ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
CMP.b #$73 : BNE + ; Desert Bonk Key
LDA.l BonkKey_Desert_Player
BRA ++
+ : CMP.b #$8C : BNE + ; GTower Bonk Key
LDA.l BonkKey_GTower_Player
BRA ++
+
LDA.b #$00
++
RTS
;--------------------------------------------------------------------------------
AbsorbKeyCheck:
PHA
CMP.b #$24 : BEQ .key
CMP.b #$A0 : BCC .not_key
CMP.b #$B0 : BCS .not_key
AND.b #$0F : ASL
CMP.w DungeonID : BNE .not_key
.key
PLA
SEC
RTS
.not_key
PLA
CLC
RTS

View File

@@ -1,81 +1,95 @@
;================================================================================
; Boots State Modifier
;--------------------------------------------------------------------------------
!BOOTS_MODIFIER = "$7F50CE"
ModifyBoots:
PHA
LDA.b $A0 : CMP.b #$06 : BNE +
LDA.b $A1 : CMP.b #$00 : BEQ .no_boots
+
LDA !BOOTS_MODIFIER : CMP.b #$01 : BNE +
PLA : AND AbilityFlags : ORA.b #$04 : RTL ; yes boots
LDA.l BootsModifier : CMP.b #$01 : BNE +
PLA : AND.l AbilityFlags : ORA.b #$04 : RTL ; yes boots
+ : CMP.b #$02 : BNE +
.no_boots
PLA : AND AbilityFlags : AND.b #$FB : RTL ; no boots
+ : LDA FakeBoots : CMP.b #$01 : BNE +
LDA $5B : BEQ ++ : LDA $59 : BNE + ; hover check
++ : PLA : AND AbilityFlags : ORA.b #$04 : RTL ; yes boots, not hovering
PLA : AND.l AbilityFlags : AND.b #$FB : RTL ; no boots
+ : LDA.l FakeBoots : CMP.b #$01 : BNE +
LDA.b LinkSlipping : BEQ ++ : LDA.b PitTileActField : BNE + ; hover check
++ : PLA : AND.l AbilityFlags : ORA.b #$04 : RTL ; yes boots, not hovering
+
PLA
AND AbilityFlags ; regular boots
AND.l AbilityFlags ; regular boots
RTL
;--------------------------------------------------------------------------------
AddBonkTremors:
PHA
LDA $46 : BNE + ; Check for incapacitated Link
JSL.l IncrementBonkCounter
LDA.b LinkIncapacitatedTimer : BNE + ; Check for incapacitated Link
JSL IncrementBonkCounter
+
LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ +
LDA BootsEquipment : BNE + ; Check for Boots
LDA.l BootsModifier : CMP.b #$01 : BEQ +
LDA.l BootsEquipment : BNE + ; Check for Boots
PLA : RTL
+
PLA
JSL.l AddDashTremor : JSL.l Player_ApplyRumbleToSprites ; things we wrote over
JSL AddDashTremor : JSL Player_ApplyRumbleToSprites ; things we wrote over
RTL
;--------------------------------------------------------------------------------
BonkBreakableWall:
PHX : PHP
SEP #$30 ; set 8-bit accumulator and index registers
LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ +
LDA BootsEquipment : BNE + ; Check for Boots
LDA.l BootsModifier : CMP.b #$01 : BEQ +
LDA.l BootsEquipment : BNE + ; Check for Boots
PLP : PLX : LDA.w #$0000 : RTL
+
PLP : PLX
LDA $0372 : AND.w #$00FF ; things we wrote over
LDA.w LinkDashing : AND.w #$00FF ; things we wrote over
RTL
;--------------------------------------------------------------------------------
BonkRockPile:
LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ +
LDA BootsEquipment : BNE + ; Check for Boots
LDA.l BootsModifier : CMP.b #$01 : BEQ +
LDA.l BootsEquipment : BNE + ; Check for Boots
LDA.b #$00 : RTL
+
LDA $02EF : AND.b #$70 ; things we wrote over
LDA.w TileActBE : AND.b #$70 ; things we wrote over
RTL
;--------------------------------------------------------------------------------
GravestoneHook:
LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ +
LDA BootsEquipment : BEQ .done ; Check for Boots
LDA.l BootsModifier : CMP.b #$01 : BEQ +
LDA.l BootsEquipment : BEQ .done ; Check for Boots
+
LDA $0372 : BEQ .done ; things we wrote over
JML.l moveGravestone
LDA.w LinkDashing : BEQ .done ; things we wrote over
JML moveGravestone
.done
JML.l GravestoneHook_continue
JML GravestoneHook_continue
;--------------------------------------------------------------------------------
JumpDownLedge:
LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ +
LDA BootsEquipment : BNE + ; Check for Boots
LDA.l BootsModifier : CMP.b #$01 : BEQ +
LDA.l BootsEquipment : BNE + ; Check for Boots
; Disarm Waterwalk
LDA $5B : CMP.b #$01 : BNE +
STZ $5B
LDA.b LinkSlipping : CMP.b #$01 : BNE +
STZ.b LinkSlipping
+
LDA $1B : BNE .done : LDA.b #$02 : STA $EE ; things we wrote over
LDA.b IndoorsFlag : BNE .done : LDA.b #$02 : STA.b LinkLayer ; things we wrote over
.done
RTL
;--------------------------------------------------------------------------------
BonkRecoil:
LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ +
LDA BootsEquipment : BNE + ; Check for Boots
LDA.b #$16 : STA $29 : RTL
LDA.l BootsModifier : CMP.b #$01 : BEQ +
LDA.l BootsEquipment : BNE + ; Check for Boots
LDA.b #$16 : STA.b LinkRecoilZ : RTL
+
LDA.b #$24 : STA $29 ; things we wrote over
LDA.b #$24 : STA.b LinkRecoilZ ; things we wrote over
RTL
;--------------------------------------------------------------------------------
BonkRecoilStop:
LDA.l BootsModifier : CMP.b #$01 : BEQ .return
LDA.l BootsEquipment : BNE .return
LDA.b LinkState : CMP.b #$02 : BNE .return
LDA.b LinkPosZ : BMI .return : CMP.b #$09 : BCC .return
LDA.b FrameCounter : AND.b #$01 : BNE .return
REP #$20
LDA.w $0114 : CMP.w #$0020 : SEP #$20 : BNE .return
LDA.b LinkRecoilY : BEQ ++ : BMI +
DEC : BRA ++
+ INC
++ STA.b LinkRecoilY
LDA.b LinkRecoilX : BEQ ++ : BMI +
DEC : BRA ++
+ INC
++ STA.b LinkRecoilX
.return
JML LinkHop_FindArbitraryLandingSpot

View File

@@ -1,24 +1,16 @@
DoDungeonMapBossIcon:
LDA.b $14
LDA.b NMISTRIPES
CMP.b #$09
BEQ .dungeonmap
.cave
CMP.b #$01
RTL
.dungeonmap
LDX.w $040C
LDX.w DungeonID
BMI .cave
; LDA.l DungeonMapIcons
; AND.b #$01
; BNE ++
;
; INC ; so it's not equal to $01
; BRA .cave
; get dungeon boss room
++ REP #$30
LDA.l DungeonMapBossRooms, X
@@ -26,13 +18,19 @@ DoDungeonMapBossIcon:
TAX
; get sprite pointer for room
LDA.l $89D62E,X
INC ; to skip the "sort"
TAX
LDA.l UWSpritesPointers,X
STA.b Scrap00 ; pointer in $00
if !FEATURE_FIX_BASEROM
LDA.w #$0089
else
LDA.w #$0028 ; set the bank to 28 for now
endif
STA.b Scrap02
LDY.w #$0001 ; to skip the "sort"
; get first byte to make sure it isn't an empty room
SEP #$20
LDA.l $890000,X
LDA.b [Scrap00], Y
CMP.b #$FF
BNE ++
@@ -40,7 +38,8 @@ DoDungeonMapBossIcon:
BRA .cave
; check first sprite
++ LDA.l $890002,X
++ INY #2
LDA.b [Scrap00], Y
SEP #$10
; match boss id
@@ -57,7 +56,7 @@ DoDungeonMapBossIcon:
.match
LDA.b #$80
STA.w $2121
STA.w CGADD
REP #$30
@@ -74,14 +73,14 @@ DoDungeonMapBossIcon:
ASL ; x128 for graphics
ASL
ADC.w #BossMapIconGFX
STA.w $4312
STA.w A1T1L
PHY
LDY.w #32
SEP #$20
-- LDA.l .boss_palettes,X
STA.w $2122
STA.w CGDATA
INX
DEY
BNE --
@@ -94,24 +93,24 @@ DoDungeonMapBossIcon:
SEP #$10
LDA.w #$1801
STA.w $4310
STA.w DMAP1
LDX.b #BossMapIconGFX>>16
STX.w $4314
STX.w A1B1
LDA.w #$A060>>1
STA.w $2116
STA.w VMADDL
LDA.w #$0040
STA.w $4315
STA.w DAS1L
LDX.b #$02
STX.w $420B
STX.w DMAENABLE
STA.w $4315
STA.w DAS1L
LDA.w #$A260>>1
STA.w $2116
STA.w VMADDL
STX.w $420B
STX.w DMAENABLE
; done
SEP #$30

View File

@@ -1,20 +1,12 @@
;================================================================================
;--------------------------------------------------------------------------------
AssignKiki:
LDA.b #$00 : STA FollowerDropped ; defuse bomb
LDA.b #$0A : STA FollowerIndicator ; assign kiki as follower
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; Name: AllowSQ
; Returns: Accumulator = 0 if S&Q is disallowed, 1 if allowed
;--------------------------------------------------------------------------------
!ITEM_BUSY = "$7F5091"
AllowSQ:
LDA ProgressIndicator : BEQ .done ; thing we overwrote - check if link is in his bed
LDA !ITEM_BUSY : EOR #$01
LDA.l ProgressIndicator : BEQ .done ; thing we overwrote - check if link is in his bed
LDA.l BusyItem : EOR.b #$01
.done
RTL
;--------------------------------------------------------------------------------
@@ -23,8 +15,8 @@ RTL
;0 = Reset Music
;1 = Don't Reset Music
MSMusicReset:
LDA $8A : CMP.b #$80 : BNE +
LDA $23
LDA.b OverworldIndex : CMP.b #$80 : BNE +
LDA.b LinkPosX+1
+
RTL
;--------------------------------------------------------------------------------
@@ -32,11 +24,11 @@ RTL
;--------------------------------------------------------------------------------
;0 = Become (Perma)bunny
DecideIfBunny:
LDA MoonPearlEquipment : BNE .done
LDA CurrentWorld : AND.b #$40
LDA.l MoonPearlEquipment : BNE .done
LDA.l CurrentWorld : AND.b #$40
PHA : LDA.l InvertedMode : BNE .inverted
.normal
PLA : EOR #$40
PLA : EOR.b #$40
BRA .done
.inverted
PLA
@@ -47,34 +39,25 @@ RTL
DecideIfBunnyByScreenIndex:
; If indoors we don't have a screen index. Return non-bunny to make mirror-based
; superbunny work
LDA $1B : BNE .done
LDA MoonPearlEquipment : BNE .done
PHX : LDX $8A : LDA.l OWTileWorldAssoc, X : PLX : PHA
LDA.b IndoorsFlag : BNE .done
LDA.l MoonPearlEquipment : BNE .done
PHX : LDX.b OverworldIndex : LDA.l OWTileWorldAssoc, X : PLX : PHA
LDA.l InvertedMode : BNE .inverted
.normal
PLA : EOR #$40
PLA : EOR.b #$40
BRA .done
.inverted
PLA
.done
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
;ReadInventoryPond:
; CPX.b #$1B : BNE + : LDA.b #$01 : RTL : +
; LDA EquipmentWRAM, X
;RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
FixBunnyOnExitToLightWorld:
LDA.w $02E0 : BEQ +
JSL.l DecideIfBunny : BEQ +
STZ $5D ; set player mode to Normal
STZ $02E0 : STZ $56 ; return player graphics to normal
LDA.w BunnyFlag : BEQ +
JSL DecideIfBunny : BEQ +
STZ.b LinkState ; set player mode to Normal
STZ.w BunnyFlag : STZ.b BunnyFlagDP ; return player graphics to normal
+
RTS
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
@@ -83,26 +66,23 @@ RTS
FixAga2Bunny:
LDA.l FixFakeWorld : BEQ + ; Only use this fix is fakeworld fix is in use
LDA.l InvertedMode : BEQ +++
LDA.b #$00 : STA CurrentWorld ; Switch to light world
LDA.b #$00 : STA.l CurrentWorld ; Switch to light world
BRA ++
+++
LDA.b #$40 : STA CurrentWorld ; Switch to dark world
LDA.b #$40 : STA.l CurrentWorld ; Switch to dark world
++
JSL DecideIfBunny : BNE +
JSR MakeBunny
LDA.b #$04 : STA.w $012C ; play bunny music
BRA .done
+
LDA.b #$09 : STA.w $012C ; what we wrote over
.done
RTL
.done
JML Overworld_DetermineAndSetMusic
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
MakeBunny:
PHX : PHY
LDA.b #$17 : STA $5D ; set player mode to permabunny
LDA.b #$01 : STA $02E0 : STA $56 ; make player look like bunny
LDA.b #$17 : STA.b LinkState ; set player mode to permabunny
LDA.b #$01 : STA.w BunnyFlag : STA.b BunnyFlagDP ; make player look like bunny
JSL LoadGearPalettes_bunny
PLY : PLX
RTS
@@ -130,27 +110,27 @@ RTL
; Fix for SQ jumping causing accidental Exploration Glitch
SQEGFix:
LDA.l Bugfix_PodEG : BEQ ++
STZ.w $047A ; disarm exploration glitch
STZ.w LayerAdjustment ; disarm exploration glitch
++ RTL
;--------------------------------------------------------------------------------
; Fix crystal not spawning when using somaria vs boss
TryToSpawnCrystalUntilSuccess:
STX $02D8 ; what we overwrote
STX.w ItemReceiptID ; what we overwrote
JSL AddAncillaLong : BCS .failed ; a clear carry flag indicates success
.spawned
STZ $AE ; the "trying to spawn crystal" flag
STZ $AF ; the "trying to spawn pendant" flag
STZ.b RoomTag ; the "trying to spawn crystal" flag
STZ.b RoomTag+1 ; the "trying to spawn pendant" flag
.failed
RTL
;--------------------------------------------------------------------------------
; Fix crystal not spawning when using somaria vs boss
WallmasterCameraFix:
STZ $A7 ; disable vertical camera scrolling for current room
STZ.b CameraBoundV ; disable vertical camera scrolling for current room
REP #$20
STZ $0618 ; something about scrolling, setting these to 0 tricks the game
STZ $061A ; into thinking we're at the edge of the room so it doesn't scroll.
STZ.w CameraScrollN ; something about scrolling, setting these to 0 tricks the game
STZ.w CameraScrollS ; into thinking we're at the edge of the room so it doesn't scroll.
SEP #$20
JML Sound_SetSfx3PanLong ; what we wrote over, also this will RTL
@@ -158,8 +138,8 @@ WallmasterCameraFix:
; Fix losing glove colors
LoadActualGearPalettesWithGloves:
REP #$20
LDA SwordEquipment : STA $0C
LDA ArmorEquipment : AND.w #$00FF
LDA.l SwordEquipment : STA.b Scrap0C
LDA.l ArmorEquipment : AND.w #$00FF
JSL LoadGearPalettes_variable
JSL SpriteSwap_Palette_ArmorAndGloves_part_two
RTL
@@ -167,24 +147,24 @@ RTL
;--------------------------------------------------------------------------------
; Fix Bunny Palette Map Bug
LoadGearPalette_safe_for_bunny:
LDA $10
LDA.b GameMode
CMP.w #$030E : BEQ .new ; opening dungeon map
CMP.w #$070E : BEQ .new ; opening overworld map
.original
-
LDA [$00]
STA $7EC300, X
STA $7EC500, X
INC $00 : INC $00
LDA.b [Scrap00]
STA.l PaletteBufferAux, X
STA.l PaletteBuffer, X
INC.b Scrap00 : INC.b Scrap00
INX #2
DEY
BPL -
RTL
.new
-
LDA [$00]
STA $7EC500, X
INC $00 : INC $00
LDA.b [Scrap00]
STA.l PaletteBuffer, X
INC.b Scrap00 : INC.b Scrap00
INX #2
DEY
BPL -
@@ -193,16 +173,59 @@ RTL
;--------------------------------------------------------------------------------
; Fix pedestal pull overlay
PedestalPullOverlayFix:
LDA.b #$09 : STA $039F, X ; the thing we wrote over
LDA $1B : BNE +
LDA $8A : CMP.b #$80 : BNE +
LDA $8C : CMP.b #$97
LDA.b #$09 : STA.w AncillaGeneralF, X ; the thing we wrote over
LDA.b IndoorsFlag : BNE +
LDA.b OverworldIndex : CMP.b #$80 : BNE +
LDA.b OverlayID : CMP.b #$97
+
RTL
PostFixMirrorGfxPrep:
LDA.b #$01 : STA.w OWTransitionFlag
JML HandleFollowersAfterMirroring ; what we wrote over
; warning, this is called on frames after PostFixMirrorGfxPrep but for
; several frames after, so we use OWTransitionFlag to run something once
PostFixMirrorGfx:
STA.w SubModuleInterface ; what we wrote over
LDA.w OWTransitionFlag : CMP.b #$01 : BNE .done
LDA.b #$08 : STA.w OWTransitionFlag
JML FollowerGfxRedraw
.done
RTL
PostFixOAMGfx:
JSL FollowerGfxRedraw
REP #$30 : LDA.w #$2000 ; what we wrote over
RTL
;--------------------------------------------------------------------------------
; Fix losing VRAM gfx when using quake
PostNMIUpdateBGCharHalf:
STA.w DMAENABLE : SEP #$10 ; what we wrote over
LDA.w VRAMTileMapIndex : CMP.b #$46 : BNE .return ; checks to see if this is the last VRAM write
LDA.b LinkState : CMP.b #$08 : BCC + : CMP.b #$0A+1 : BCS + ; skip if we're mid-medallion
RTL
+ JSL DynamicDropGFXClear
JSL HeartPieceSetRedraw ; set redraw flag for items
.return
RTL
; Force redraws of items following map checks
PostOverworldGfxLoad:
INC.b GameSubMode : STZ.b INIDISPQ ; what we wrote over
JSL DynamicDropGFXClear
JSL HeartPieceSetRedraw
RTL
PostUnderworldMap:
JSL DynamicDropGFXClear
JSL HeartPieceSetRedraw
LDA.l $7EC229 ; what we wrote over
RTL
;--------------------------------------------------------------------------------
FixJingleGlitch:
LDA.b $11
LDA.b GameSubMode
BEQ .set_doors
LDA.l AllowAccidentalMajorGlitch
@@ -210,7 +233,7 @@ FixJingleGlitch:
.set_doors
LDA.b #$05
STA.b $11
STA.b GameSubMode
.exit
RTL
@@ -222,7 +245,36 @@ pushpc
pullpc
;--------------------------------------------------------------------------------
SetOverworldTransitionFlags:
LDA #$01
STA $0ABF ; used by witch
STA $021B ; used by race game
LDA.b #$01
STA.w OWTransitionFlag
STA.w RaceGameFlag
RTL
;--------------------------------------------------------------------------------
ParadoxCaveGfxFix:
; Always upload line unless you're moving into paradox cave (0x0FF) from above (0x0EF)
LDA.b IndoorsFlag : BEQ .uploadLine
LDX.b RoomIndex : CPX.w #$00FF : BNE .uploadLine
LDX.b PreviousRoom : CPX.w #$00EF : BNE .uploadLine
;Ignore uploading four specific lines of tiles to VRAM
LDX.w VRAMUploadAddress
; Line 1
CPX.w #$1800 : BEQ .skipMostOfLine
; Line 2
CPX.w #$1A00 : BEQ .skipMostOfLine
; Line 3
CPX.w #$1C00 : BEQ .uploadLine
; Line 4
CPX.w #$1E00 : BEQ .uploadLine
.uploadLine
LDA.b #$01 : STA.w DMAENABLE
.skipLine
JML FollowerGfxRedraw
.skipMostOfLine
; Set line length to 192 bytes (the first 6 8x8 tiles in the line)
LDX.w #$00C0 : STX.w DAS0L
BRA .uploadLine
;--------------------------------------------------------------------------------

View File

@@ -1,2 +1,4 @@
py -3 build.py
@echo %cmdcmdline%|find /i """%~f0""">nul && cmd /k
del ..\working.sfc
copy ..\alttp.sfc ..\working.sfc
%~dp0bin\windows\asar.exe LTTP_RND_GeneralBugfixes.asm ..\working.sfc
cmd /k

View File

@@ -1,5 +1,8 @@
#!/bin/bash
rm ../working.sfc
cp ../alttp.sfc ../working.sfc
./asar LTTP_RND_GeneralBugfixes.asm ../working.sfc
rm ../alttp.sfc
cp ~/dev/kwyn/orig/z3.sfc ../alttp.sfc
asar --symbols=wla LTTP_RND_GeneralBugfixes.asm ../alttp.sfc
flips ~/dev/kwyn/orig/z3.sfc ../alttp.sfc ../base2current.bps
md5sum ../alttp.sfc | tee /dev/tty | cut -d ' ' -f 1 | xargs -I '{}' sed -i "s/RANDOMIZERBASEHASH = '.\+'/RANDOMIZERBASEHASH = '{}'/g" ~/dev/kwyn/doors/Rom.py
cp ../base2current.bps ~/dev/kwyn/doors/data

View File

@@ -2,4 +2,4 @@
rm ../working.sfc
cp ../alttp.sfc ../working.sfc
asar LTTP_RND_GeneralBugfixes.asm ../working.sfc
./bin/linux/asar -DFEATURE_PATREON_SUPPORTERS=1 LTTP_RND_GeneralBugfixes.asm ../working.sfc

BIN
c2e3e.gfx

Binary file not shown.

View File

@@ -2,36 +2,26 @@
; Capacity Logic
;================================================================================
IncrementBombs:
LDA BombCapacityUpgrades ; get bomb upgrades
!ADD.l StartingMaxBombs : BEQ + ; Skip if we can't have bombs
DEC
CMP BombsEquipment
!BLT +
LDA BombsEquipment
CMP.b #99 : !BGE +
INC : STA BombsEquipment
+
LDA.l BombCapacity : BEQ + ; Skip if we can't have bombs
DEC
CMP.l BombsEquipment : !BLT +
LDA.l BombsEquipment
CMP.b #99 : !BGE +
INC : STA.l BombsEquipment
+
RTL
;--------------------------------------------------------------------------------
IncrementArrows:
LDA ArrowCapacityUpgrades ; get arrow upgrades
!ADD.l StartingMaxArrows : DEC
CMP CurrentArrows
!BLT +
LDA CurrentArrows
CMP.b #99 : !BGE +
INC : STA CurrentArrows
+
LDA.l ArrowCapacity : DEC
CMP.l CurrentArrows : !BLT +
LDA.l CurrentArrows
CMP.b #99 : !BGE +
INC : STA.l CurrentArrows
+
RTL
;--------------------------------------------------------------------------------
CompareBombsToMax:
LDA BombCapacityUpgrades ; get bomb upgrades
!ADD.l StartingMaxBombs
CMP BombsEquipment
LDA.l BombCapacity
CMP.l BombsEquipment
RTL
;--------------------------------------------------------------------------------

View File

@@ -1,42 +0,0 @@
;================================================================================
; Randomize Catfish
;--------------------------------------------------------------------------------
!HEART_REDRAW = "$7F5000"
LoadCatfishItemGFX:
LDA.l CatfishItem_Player : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDA.l $1DE185 ; location randomizer writes catfish item to
JML PrepDynamicTile
;--------------------------------------------------------------------------------
DrawThrownItem:
LDA $8A : CMP.b #$81 : BNE .catfish
.zora
LDA.b #$01 : STA !HEART_REDRAW
LDA.l $1DE1C3 ; location randomizer writes zora item to
BRA .draw
.catfish
LDA.l $1DE185 ; location randomizer writes catfish item to
.draw
JML DrawDynamicTile
;--------------------------------------------------------------------------------
MarkThrownItem:
PHA
LDA $8A : CMP.b #$81 : BNE .catfish
.zora
JSL.l ItemSet_ZoraKing
LDA ZoraItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID
BRA .done
.catfish
JSL.l ItemSet_Catfish
LDA CatfishItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID
.done
PLA
JSL Link_ReceiveItem ; thing we wrote over
RTL
;--------------------------------------------------------------------------------

248
clock.asm
View File

@@ -1,248 +0,0 @@
;--------------------------------------------------------------------------------
; http://problemkaputt.de/fullsnes.htm
; 2800h-2801h S-RTC Real Time Clock I/O Ports
; cartridge type change from #$02 to #$55 to enable S-RTC
; SNES Cart S-RTC (Realtime Clock) (1 game)
;
; PCB "SHVC-LJ3R-01" with 24pin "Sharp S-RTC" chip. Used only by one japanese game:
; Dai Kaiju Monogatari 2 (1996) Birthday/Hudson Soft (JP)
;
; S-RTC I/O Ports
; 002800h S-RTC Read (R)
; 002801h S-RTC Write (W)
; Both registers are 4bits wide. When writing: Upper 4bit should be zero. When reading: Upper 4bit should be masked-off (they do possibly contain garbage, eg. open-bus).
;
; S-RTC Communication
; The sequence for setting, and then reading the time is:
; Send <0Eh,04h,0Dh,0Eh,00h,Timestamp(12 digits),0Dh> to [002801h]
; If ([002800h] AND 0F)=0Fh then read <Timestamp(13 digits)>
; If ([002800h] AND 0F)=0Fh then read <Timestamp(13 digits)>
; If ([002800h] AND 0F)=0Fh then read <Timestamp(13 digits)>
; If ([002800h] AND 0F)=0Fh then read <Timestamp(13 digits)>
; etc.
; The exact meaning of the bytes is unknown. 0Eh/0Dh seems to invoke/terminate commands, 04h might be some configuration stuff (like setting 24-hour mode). 00h is apparently the set-time command. There might be further commands (such like setting interrupts, alarm, 12-hour mode, reading battery low & error flags, etc.). When reading, 0Fh seems to indicate sth like "time available".
; The 12/13-digit "SSMMHHDDMYYY(D)" Timestamps are having the following format:
; Seconds.lo (BCD, 0..9)
; Seconds.hi (BCD, 0..5)
; Minutes.lo (BCD, 0..9)
; Minutes.hi (BCD, 0..5)
; Hours.lo (BCD, 0..9)
; Hours.hi (BCD, 0..2)
; Day.lo (BCD, 0..9)
; Day.hi (BCD, 0..3)
; Month (HEX, 01h..0Ch)
; Year.lo (BCD, 0..9)
; Year.hi (BCD, 0..9)
; Century (HEX, 09h..0Ah for 19xx..20xx)
; When READING the time, there is one final extra digit (the existing software doesn't transmit that extra digit on WRITING, though maybe it's possible to do writing, too):
; Day of Week? (0..6) (unknown if RTC assigns sth like 0=Sunday or 0=Monday)
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
macro A_x10()
ASL #1 : PHA
ASL #2 : !ADD 1,s
STA 1,s : PLA
endmacro
;--------------------------------------------------------------------------------
macro A_x24()
ASL #3 : PHA
ASL #1 : !ADD 1,s
STA 1,s : PLA
endmacro
;--------------------------------------------------------------------------------
macro A_x60()
ASL #2 : PHA
ASL #4 : !SUB 1,s
STA 1,s : PLA
endmacro
;--------------------------------------------------------------------------------
macro Clock_ReadBCD()
LDA $002800 : PHA
LDA $002800 : %A_x10() : !ADD 1,s
STA 1,s : PLA
endmacro
;--------------------------------------------------------------------------------
Clock_Test:
JSL.l Clock_Init
JML.l Clock_IsSupported
;--------------------------------------------------------------------------------
; Clock_Init
;--------------------------------------------------------------------------------
Clock_Init:
LDA.b #$0E : STA $002801
LDA.b #$04 : STA $002801
LDA.b #$0D : STA $002801
LDA.b #$0E : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$01 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$01 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$00 : STA $002801
LDA.b #$0A : STA $002801
LDA.b #$0D : STA $002801
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; Clock_IsSupported
;--------------------------------------------------------------------------------
; Input: None (8-bit accumulator)
;--------------------------------------------------------------------------------
; Output:
; Carry - unset if unsupported, set if supported
; Zero - Undefined
;--------------------------------------------------------------------------------
; Side Effects:
; S-RTC is ready for reading upon exit if supported
;--------------------------------------------------------------------------------
Clock_IsSupported:
PHA : PHX
LDX #$00;
-
LDA $002800 : AND.b #$0F : CMP #$0F : BEQ .done ; check for clock chip ready signal
CPX.b #$0E : BCC ++ : CLC : BRA .done ; if we've read 14 bytes with no success, unset carry and exit
++ INX
BRA -
.done
PLX : PLA
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; Clock_QuickStamp
;--------------------------------------------------------------------------------
; Input: None
;--------------------------------------------------------------------------------
; Output:
; $00.b - 24-bit timestamp (low)
; $01.b - 24-bit timestamp (mid)
; $02.b - 24-bit timestamp (high)
; $03.b - zero
; Carry - Unset if error, Set if success
; Zero - Undefined
;--------------------------------------------------------------------------------
; Side Effects:
; Requires Mode-7 Matrix Registers
;--------------------------------------------------------------------------------
Clock_QuickStamp:
PHA : PHX : PHP
SEP #$30 ; set 8-bit accumulator and index registers
LDX #$00;
-
LDA $002800 : AND.b #$0F : CMP #$0F : BEQ .ready ; check for clock chip ready signal
CPX.b #$0E : !BLT ++ : CLC : JMP .done : ++ ; if we've read 14 bytes with no success, unset carry and exit
INX
BRA -
SEC ; indicate success
.ready
%Clock_ReadBCD() : STA $00 ; seconds
%Clock_ReadBCD() : STA $01 ; minutes
%Clock_ReadBCD() : STA $02 ; hours
%Clock_ReadBCD() : STA $03 ; days
REP $20 ; set 16-bit accumulator
LDA $01 : AND #$00FF : %A_x60() ; convert minutes to seconds
STZ $01 : !ADD $00 : STA $00 ; store running total seconds to $00
LDA $03 : AND #$00FF : %A_x24() ; convert days to hours
STZ $03 : !ADD $02 ; get total hours
%A_x60() ; get total minutes
LDY #$60
JSL.l Multiply_A16Y8
STY $02 : STZ $03
!ADD $00 : BCC + : INC $02 : +
.done
PLP : PLX : PLA
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; Multiply_A16Y8:
;--------------------------------------------------------------------------------
; Expects:
; Accumulator - 16-bit
; Index Registers - 8-bit
;--------------------------------------------------------------------------------
; Notes:
; Found a (wrong) version of this on wikibooks. This is cleaned up and fixed.
;--------------------------------------------------------------------------------
Multiply_A16Y8:
SEP #$20 ; set 8-bit accumulator
STY $4202
STA $4203
NOP #4
LDA $4216
LDY $4217
XBA
STA $4203
NOP #2
TYA
CLC
ADC $4216
LDY $4217
BCC .carry_bit
INY
.carry_bit:
XBA
REP #$20 ; set 16-bit accumulator
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; Clock_GetTime
;--------------------------------------------------------------------------------
; Input: None
;--------------------------------------------------------------------------------
; Output:
; $00.b - Seconds
; $01.b - Minutes
; $02.b - Hours
; $03.b - Days
; $04.b - Months
; $05.w - Years
; Carry - Unset if error, Set if success
; Zero - Undefined
;--------------------------------------------------------------------------------
Clock_GetTime:
PHA : PHX : PHY : PHP
SEP #$30 ; set 8-bit accumulator and index registers
LDX #$00;
-
LDA $002800 : AND.b #$0F : CMP #$0F : BEQ .ready ; check for clock chip ready signal
CPX.b #$0E : !BLT ++ : CLC : JMP .done : ++ ; if we've read 14 bytes with no success, unset carry and exit
INX
BRA -
SEC ; indicate success
.ready
%Clock_ReadBCD() : STA $00 ; seconds
%Clock_ReadBCD() : STA $01 ; minutes
%Clock_ReadBCD() : STA $02 ; hours
%Clock_ReadBCD() : STA $03 ; days
LDA $002800 : STA $04 ; months
%Clock_ReadBCD() : STA $05 ; years
LDA $002800 : STA $06 ; century
REP $20 ; set 16-bit accumulator
STA $06 : AND #$00FF : %A_x10() : %A_x10() : !ADD #1000 ; multiply century digit by 100 and add 1000
STZ $06 : !ADD $05 : STA $05 ; add lower 2 digits of the year and store
.done
PLP : PLY : PLX : PLA
RTL
;--------------------------------------------------------------------------------

View File

@@ -1,72 +0,0 @@
;--------------------------------------------------------------------------------
; $7F5010 - Scratch Space
;--------------------------------------------------------------------------------
DrawDungeonCompassCounts:
SEP #$10
LDX $1B : BNE + : RTL : + ; Skip if outdoors
; extra hard safeties for getting dungeon ID to prevent crashes
PHA
LDA.w $040C : AND.w #$00FE : TAX ; force dungeon ID to be multiple of 2
PLA
CPX.b #$1B : BCC + ; Skip if not in a valid dungeon ID
JMP .done
+
BIT.w #$0002 : BNE ++ ; if CompassMode==2, we don't check for the compass
TXY : TXA : LSR : TAX : LDA.l ExistsTransfer, X : TAX : LDA CompassExists, X : BEQ ++
TYX : LDA CompassField : AND.l DungeonItemMasks, X ; Load compass values to A, mask with dungeon item masks
BNE ++
JMP .done ; skip if we don't have compass
++
LDA $040C : LSR
BNE +
INC
+ TAX : LDA.l CompassTotalsWRAM, X : AND #$00FF
PHX
PHA
JSL HexToDec_fast
PLA : CMP.w #100 : !BLT .two_digit
LDX.b $05 : TXA : ORA #$2490 : STA $7EC79A
LDX.b $06 : TXA : ORA #$2490 : STA $7EC79C
LDX.b $07 : TXA : ORA #$2490 : STA $7EC79E
BRA .end_total
.two_digit
LDX.b $06 : TXA : ORA #$2490 : STA $7EC79A
LDX.b $07 : TXA : ORA #$2490 : STA $7EC79C
.end_total
PLX
LDA DungeonLocationsChecked, X : AND #$00FF
PHA
JSL HexToDec_fast
PLA : CMP.w #100 : !BLT +
LDX.b $05 : TXA : ORA #$2490 : STA $7EC792 ; Draw the 100's digit
+
LDX.b $06 : TXA : ORA #$2490 : STA $7EC794 ; Draw the item count
LDX.b $07 : TXA : ORA #$2490 : STA $7EC796
LDA.w #$2830 : STA $7EC798 ; draw the slash
.done
RTL
DungeonItemMasks: ; these are dungeon correlations to $7EF364 - $7EF369 so it knows where to store compasses, etc
dw $8000, $4000, $2000, $1000, $0800, $0400, $0200, $0100
dw $0080, $0040, $0020, $0010, $0008, $0004
; maps from $040C to the odd order used in overworld map
ExistsTransfer:
db $0C, $0C, $00, $02, $0B, $09, $03, $07, $04, $08, $01, $06, $05, $0A
;--------------------------------------------------------------------------------
; $7EF4C0-7EF4CF - item locations checked indexed by $040C >> 1
;--------------------------------------------------------------------------------
InitCompassTotalsRAM:
LDX #$00
-
LDA CompassTotalsROM, X : STA CompassTotalsWRAM, X
INX
CPX #$0F : !BLT -
RTL

View File

@@ -1,29 +0,0 @@
;--------------------------------------------------------------------------------
ParadoxCaveGfxFix:
; Always upload line unless you're moving into paradox cave (0x0FF) from above (0x0EF)
LDA $1B : BEQ .uploadLine
LDX $A0 : CPX #$00FF : BNE .uploadLine
LDX $A2 : CPX #$00EF : BNE .uploadLine
;Ignore uploading four specific lines of tiles to VRAM
LDX $0118
; Line 1
CPX #$1800 : BEQ .skipMostOfLine
; Line 2
CPX #$1A00 : BEQ .skipMostOfLine
; Line 3
CPX #$1C00 : BEQ .uploadLine
; Line 4
CPX #$1E00 : BEQ .uploadLine
.uploadLine
LDA.b #$01 : STA $420B
.skipLine
RTL
.skipMostOfLine
; Set line length to 192 bytes (the first 6 8x8 tiles in the line)
LDX.w #$00C0 : STX $4305
BRA .uploadLine
;--------------------------------------------------------------------------------

View File

@@ -1,185 +0,0 @@
;================================================================
; Contributor: Myramong
;================================================================
;Sprite_ShowMessageFromPlayerContact_Edit:
;{
; STZ $1CE8
; JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC .dont_show
;
; LDA $4D : CMP.b #$02 : BEQ .dont_show
;
; JSL.l Sprite_DirectionToFacePlayerLong : TYA : EOR.b #$03
; SEC
;RTL
;.dont_show
; LDA $0DE0, X
; CLC
;RTL
;}
;================================================================
;Sprite_ShowSolicitedMessageIfPlayerFacing_Edit:
;{
; JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha
; JSL.l Sprite_CheckIfPlayerPreoccupied : BCS .alpha
; LDA $F6 : BPL .alpha
; LDA $0F10, X : BNE .alpha
;
; LDA $4D : CMP.b #$02 : BEQ .alpha
;
; STZ $1CE8 ; set text choice to 1st option (usually yes/confirm/etc)
; JSL.l Sprite_DirectionToFacePlayerLong : PHX : TYX
;
; ; Make sure that the sprite is facing towards the player, otherwise
; ; talking can't happen. (What sprites actually use this???)
; LDA $05E1A3, X : PLX : CMP $2F : BNE .not_facing_each_other
; PHY
; LDA.b #$40 : STA $0F10, X
; PLA : EOR.b #$03
; SEC
;RTL
;.not_facing_each_other
;.alpha
; LDA $0DE0, X
; CLC
;RTL
;}
;================================================================
;OldMountainMan_TransitionFromTagalong_Edit:
;{
; PHA
;
; LDA.b #$AD : JSL Sprite_SpawnDynamically
;
; PLA : PHX : TAX
;
; LDA $1A64, X : AND.b #$03 : STA $0EB0, Y
; STA $0DE0, Y
;
; LDA $1A00, X : CLC : ADC.b #$02 : STA $0D00, Y
; LDA $1A14, X : ADC.b #$00 : STA $0D20, Y
;
; LDA $1A28, X : CLC : ADC.b #$02 : STA $0D10, Y
; LDA $1A3C, X : ADC.b #$00 : STA $0D30, Y
;
; LDA $EE : STA $0F20, Y
;
; LDA.b #$01 : STA $0BA0, Y
; STA $0E80, Y
;
; LDA.b #$01 : STA $02E4 ; OldMountainMan_FreezePlayer
; STA $037B ; ^
;
; PLX
;
; LDA.b #$00 : STA FollowerIndicator
;
; STZ $5E
;
; JML $09A6B6 ; <- 4A6B6 tagalong.asm:1194 (SEP #$30 : RTS)
;}
;================================================================
Sprite_ShowSolicitedMessageIfPlayerFacing_Alt:
{
STA $1CF0
STY $1CF1
JSL Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha
JSL Sprite_CheckIfPlayerPreoccupied : BCS .alpha
LDA $F6 : BPL .alpha
LDA $0F10, X : BNE .alpha
LDA $4D : CMP.b #$02 : BEQ .alpha
JSL Sprite_DirectionToFacePlayerLong : PHX : TYX
; Make sure that the sprite is facing towards the player, otherwise
; talking can't happen. (What sprites actually use this???)
LDA $05E1A3, X : PLX : CMP $2F : BNE .not_facing_each_other
PHY
LDA $1CF0
LDY $1CF1
; Check what room we're in so we know which npc we're talking to
LDA.b $A0 : CMP #$05 : BEQ .SahasrahlaDialogs
CMP #$1C : BEQ .BombShopGuyDialog
BRA .SayNothing
.SahasrahlaDialogs
REP #$20 : LDA.l MapReveal_Sahasrahla : ORA MapOverlay : STA MapOverlay : SEP #$20
JSL DialogSahasrahla : BRA .SayNothing
.BombShopGuyDialog
REP #$20 : LDA.l MapReveal_BombShop : ORA MapOverlay : STA MapOverlay : SEP #$20
JSL DialogBombShopGuy
.SayNothing
LDA.b #$40 : STA $0F10, X
PLA : EOR.b #$03
SEC
RTL
.not_facing_each_other
.alpha
LDA $0DE0, X
CLC
RTL
}
;================================================================
Sprite_ShowSolicitedMessageIfPlayerFacing_PreserveMessage:
{
PHY
PHA
JSL Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha
JSL Sprite_CheckIfPlayerPreoccupied : BCS .alpha
LDA $F6 : BPL .alpha
LDA $0F10, X : BNE .alpha
LDA $4D : CMP.b #$02 : BEQ .alpha
JSL Sprite_DirectionToFacePlayerLong : PHX : TYX
; Make sure that the sprite is facing towards the player, otherwise
; talking can't happen. (What sprites actually use this???)
LDA $05E1A3, X : PLX : CMP $2F : BNE .not_facing_each_other
PLA : XBA : PLA
PHY
TAY : XBA
JSL Sprite_ShowMessageUnconditional
LDA.b #$40 : STA $0F10, X
PLA : EOR.b #$03
SEC
RTL
.not_facing_each_other
.alpha
PLY
PLA
LDA $0DE0, X
CLC
RTL
}
;================================================================
incsrc menu/hudalpha.asm
incsrc util/utils.asm

View File

@@ -4,109 +4,104 @@
;--------------------------------------------------------------------------------
; Filtered Joypad 1 Register: [AXLR | ????]
; Filtered Joypad 1 Register: [BYST | udlr] [AXLR | ????]
!INVERT_DPAD = "$7F50CB"
InvertDPad_DPadOnly:
LDA $4218 : STA $00
LDA $4219
LDA.w JOY1L : STA.b Scrap00
LDA.w JOY1H
BIT.b #$0C : BEQ + : EOR.b #$0C : + ; swap up/down
BIT.b #$03 : BEQ + : EOR.b #$03 : + ; swap left/right
STA $01
JML.l InvertDPadReturn
STA.b Scrap01
JML InvertDPadReturn
InvertDPad_ButtonsOnly:
REP #$20 ; set 16-bit accumulator
LDA $4218
LDA.w JOY1L
BIT.w #$8040 : BEQ + : EOR.w #$8040 : + ; swap X/B
BIT.w #$4080 : BEQ + : EOR.w #$4080 : + ; swap Y/A
STA $00
STA.b Scrap00
SEP #$20 ; set 8-bit accumulator
JML.l InvertDPadReturn
JML InvertDPadReturn
InvertDPad_Both:
REP #$20 ; set 16-bit accumulator
LDA $4218
LDA.w JOY1L
BIT.w #$8040 : BEQ + : EOR.w #$8040 : + ; swap X/B
BIT.w #$4080 : BEQ + : EOR.w #$4080 : + ; swap Y/A
BIT.w #$0C00 : BEQ + : EOR.w #$0C00 : + ; swap up/down
BIT.w #$0300 : BEQ + : EOR.w #$0300 : + ; swap left/right
STA $00
STA.b Scrap00
SEP #$20 ; set 8-bit accumulator
JML.l InvertDPadReturn
JML InvertDPadReturn
InvertDPad_SwapSides:
REP #$20 ; set 16-bit accumulator
LDA $4218
LDA.w JOY1L
BIT.w #$0840 : BEQ + : EOR.w #$0840 : + ; swap X/up
BIT.w #$0180 : BEQ + : EOR.w #$0180 : + ; swap A/right
BIT.w #$4200 : BEQ + : EOR.w #$4200 : + ; swap Y/left
BIT.w #$8400 : BEQ + : EOR.w #$8400 : + ; swap B/down
STA $00
STA.b Scrap00
SEP #$20 ; set 8-bit accumulator
JML.l InvertDPadReturn
JML InvertDPadReturn
InvertDPad_DPadLROnly:
LDA $4218 : STA $00
LDA $4219
LDA.w JOY1L : STA.b Scrap00
LDA.w JOY1H
BIT.b #$03 : BEQ + : EOR.b #$03 : + ; swap left/right
STA $01
JML.l InvertDPadReturn
STA.b Scrap00
JML InvertDPadReturn
InvertDPad_DPadUDOnly:
LDA $4218 : STA $00
LDA $4219
LDA.w JOY1L : STA.b Scrap00
LDA.w JOY1H
BIT.b #$0C : BEQ + : EOR.b #$0C : + ; swap up/down
STA $01
JML.l InvertDPadReturn
STA.b Scrap00
JML InvertDPadReturn
InvertDPad:
LDA.l OneMindPlayerCount : BEQ .crowd_control
LDA.l !ONEMIND_ID
LDA.l OneMindId
AND.b #$03
TAX
LDA.l .onemind_controller_offset, X
TAX
LDA.w $4218,X : STA.w $00
LDA.w $4219,X : STA.w $01
LDA.w JOY1L,X : STA.w Scrap00
LDA.w JOY1H,X : STA.w Scrap01
LDA #$80 : STA $4201 ; reset this so latch can read it, otherwise RNG breaks
LDA.b #$80 : STA.w WRIO ; reset this so latch can read it, otherwise RNG breaks
JML.l InvertDPadReturn
JML InvertDPadReturn
.crowd_control
LDA !INVERT_DPAD : BNE +
LDA.b $A0 : CMP.b #$DE : BNE .off
LDA.b #$01 : BRA +
LDA.l ControllerInverter : BNE +
.off
LDA $4218 : STA $00
LDA $4219 : STA $01
JML.l InvertDPadReturn
LDA.w JOY1L : STA.b Scrap00
LDA.w JOY1H : STA.b Scrap01
JML InvertDPadReturn
+ DEC : BNE +
JMP.w InvertDPad_DPadOnly
JMP InvertDPad_DPadOnly
+ DEC : BNE +
JMP.w InvertDPad_ButtonsOnly
JMP InvertDPad_ButtonsOnly
+ DEC : BNE +
JMP.w InvertDPad_Both
JMP InvertDPad_Both
+ DEC : BNE +
JMP.w InvertDPad_SwapSides
JMP InvertDPad_SwapSides
+ DEC : BNE +
JMP.w InvertDPad_DPadLROnly
+ JMP.w InvertDPad_DPadUDOnly
JMP InvertDPad_DPadLROnly
+ JMP InvertDPad_DPadUDOnly
.onemind_controller_offset
db 0 ; player 0 - $4218 - joy1d1
db 0 ; player 1 - $4218 - joy1d1
db 2 ; player 2 - $421A - joy2d1
db 6 ; player 3 - $421E - joy2d2
db 2 ; player 4 - $421A - joy2d1
db 6 ; player 5 - $421E - joy2d2
db 0 ; player 0 - JOY1L - joy1d1
db 0 ; player 1 - JOY1L - joy1d1
db 2 ; player 2 - JOY2L - joy2d1
db 6 ; player 3 - JOY4L - joy2d2
db 2 ; player 4 - JOY2L - joy2d1
db 6 ; player 5 - JOY4L - joy2d2
;--------------------------------------------------------------------------------
@@ -116,12 +111,12 @@ HandleOneMindController:
REP #$20
LDA.l !ONEMIND_TIMER
LDA.l OneMindTimerRAM
DEC
BPL .no_switch
SEP #$20
LDA.l !ONEMIND_ID
LDA.l OneMindId
INC
CMP.l OneMindPlayerCount
BCC .no_wrap
@@ -129,29 +124,26 @@ HandleOneMindController:
LDA.b #$01 ; reset to player 1
.no_wrap
STA.l !ONEMIND_ID
STA.l OneMindId
REP #$20
LDA.l OneMindTimer
LDA.l OneMindTimerInit
.no_switch
STA.l !ONEMIND_TIMER
STA.l OneMindTimerRAM
SEP #$20
LDA.l !ONEMIND_ID
LDA.l OneMindId
CMP.b #$04 ; is it player 4 or 5?
BCC .no_multitap_switch
STZ.w $4201
STZ.w WRIO
.no_multitap_switch
.no_onemind
STZ.b $12
JML $008034 ; reset frame loop
STZ.b NMIDoneFlag
JML MainGameLoop ; reset frame loop

View File

@@ -1,42 +0,0 @@
=9F
0=53
1=54
2=55
3=56
4=57
5=58
6=59
7=5A
8=5B
9=5C
A=5D
B=5E
C=5F
D=60
E=61
F=62
G=63
H=64
I=65
J=66
K=67
L=68
M=69
N=6A
O=6B
P=6C
Q=6D
R=6E
S=6F
T=70
U=71
V=72
W=73
X=74
Y=75
Z=76
'=77
.=A0
/=A2
:=A3
_=A6

View File

@@ -1,42 +0,0 @@
=9F
0=79
1=7A
2=7B
3=7C
4=7D
5=7E
6=7F
7=80
8=81
9=82
A=83
B=84
C=85
D=86
E=87
F=88
G=89
H=8A
I=8B
J=8C
K=8D
L=8E
M=8F
N=90
O=91
P=92
Q=93
R=94
S=95
T=96
U=97
V=98
W=99
X=9A
Y=9B
Z=9C
'=9d
.=C0
/=C2
:=C3
_=C6

View File

@@ -1,21 +1,6 @@
; $7F50D0 - $7F50FF - Block Cypher Parameters
; $7F5100 - $7F51FF - Block Cypher Buffer
!v = "$7F5100"
!n = "$04"
!MXResult = "$08" ; an alternate name for the lower 32 bits of dpScratch
!dpScratch = "$08"
!keyBase = "$7F50D0"
!y = "$7F50E0"
!z = "$7F50E4"
!sum = "$7F50E8"
!p = "$7F50EC"
!rounds = "$06"
!e = "$7F50F0"
!upperScratch = "$7F50F2"
; Scrap04 used for n
; Scrap06 used for rounds
; Scrap08 use for dpScratch/MXResult (lower 32 of dpScratch)
CryptoDelta:
dd #$9e3779b9
@@ -35,164 +20,144 @@ macro ASL32Single(value)
; ROL handles the carry from the lower byte for us
endmacro
;macro LSR32(value,k)
; LDX.b <k>
; ?loop:
; %LSR32Single(<value>,<k>)
; DEX : CPX.b #$00 : BNE ?loop
;endmacro
;macro ASL32(value,k)
; LDX.b <k>
; ?loop:
; %LSR32Single(<value>,<k>)
; DEX : CPX.b #$00 : BNE ?loop
;endmacro
CryptoMX:
PHX
; upperScratch = (z>>5 ^ y <<2)
LDA.w !z : STA.b !dpScratch
LDA.w !z+2 : STA.b !dpScratch+2
%LSR32Single(!dpScratch)
%LSR32Single(!dpScratch)
%LSR32Single(!dpScratch)
%LSR32Single(!dpScratch)
%LSR32Single(!dpScratch)
;%LSR32(!dpScratch,#$05)
LDA.w z : STA.b Scrap08
LDA.w z+2 : STA.b Scrap08+2
%LSR32Single(Scrap08)
%LSR32Single(Scrap08)
%LSR32Single(Scrap08)
%LSR32Single(Scrap08)
%LSR32Single(Scrap08)
;%LSR32(Scrap08,#$05)
LDA.w !y : STA.b !dpScratch+4
LDA.w !y+2 : STA.b !dpScratch+6
%ASL32Single(!dpScratch+4)
%ASL32Single(!dpScratch+4)
;%ASL32(!dpScratch+4,#$02)
LDA.w y : STA.b Scrap08+4
LDA.w y+2 : STA.b Scrap08+6
%ASL32Single(Scrap08+4)
%ASL32Single(Scrap08+4)
;%ASL32(Scrap08+4,#$02)
LDA.b !dpScratch : EOR.b !dpScratch+4 : STA.w !upperScratch
LDA.b !dpScratch+2 : EOR.b !dpScratch+6 : STA.w !upperScratch+2
LDA.b Scrap08 : EOR.b Scrap08+4 : STA.w CryptoScratch
LDA.b Scrap08+2 : EOR.b Scrap08+6 : STA.w CryptoScratch+2
;================================
; upperscratch2 = (y>>3^z<<4)
LDA.w !z : STA.b !dpScratch
LDA.w !z+2 : STA.b !dpScratch+2
%ASL32Single(!dpScratch)
%ASL32Single(!dpScratch)
%ASL32Single(!dpScratch)
%ASL32Single(!dpScratch)
;%ASL32(!dpScratch,#$04)
LDA.w z : STA.b Scrap08
LDA.w z+2 : STA.b Scrap08+2
%ASL32Single(Scrap08)
%ASL32Single(Scrap08)
%ASL32Single(Scrap08)
%ASL32Single(Scrap08)
;%ASL32(Scrap08,#$04)
LDA.w !y : STA.b !dpScratch+4
LDA.w !y+2 : STA.b !dpScratch+6
%LSR32Single(!dpScratch+4)
%LSR32Single(!dpScratch+4)
%LSR32Single(!dpScratch+4)
;%LSR32(!dpScratch+4,#$03)
LDA.w y : STA.b Scrap08+4
LDA.w y+2 : STA.b Scrap08+6
%LSR32Single(Scrap08+4)
%LSR32Single(Scrap08+4)
%LSR32Single(Scrap08+4)
;%LSR32(Scrap08+4,#$03)
LDA.b !dpScratch : EOR.b !dpScratch+4 : STA.w !upperScratch+4
LDA.b !dpScratch+2 : EOR.b !dpScratch+6 : STA.w !upperScratch+6
LDA.b Scrap08 : EOR.b Scrap08+4 : STA.w CryptoScratch+4
LDA.b Scrap08+2 : EOR.b Scrap08+6 : STA.w CryptoScratch+6
;================================
; upperscratch = upperscratch + upperscratch2 ( == (z>>5^y<<2) + (y>>3^z<<4) )
LDA.w !upperScratch : !ADD.w !upperScratch+4 : STA.w !upperScratch
LDA.w !upperScratch+2 : ADC.w !upperScratch+6 : STA.w !upperScratch+2
LDA.w CryptoScratch : !ADD.w CryptoScratch+4 : STA.w CryptoScratch
LDA.w CryptoScratch+2 : ADC.w CryptoScratch+6 : STA.w CryptoScratch+2
;================================
; dpscratch = sum^y
LDA.w !sum : EOR.w !y : STA.b !dpScratch
LDA.w !sum+2 : EOR.w !y+2 : STA.b !dpScratch+2
LDA.w Sum : EOR.w y : STA.b Scrap08
LDA.w Sum+2 : EOR.w y+2 : STA.b Scrap08+2
;================================
; dpscratch2 = (k[p&3^e]^z)
LDA.w !p : AND.w #$0003 : EOR.w !e : ASL #2 : TAX ; put (p&3)^e into X
LDA.w !keyBase, X : EOR.w !z : STA.b !dpScratch+4
LDA.w !keyBase+2, X : EOR.w !z+2 : STA.b !dpScratch+6
LDA.w p : AND.w #$0003 : EOR.w e : ASL #2 : TAX ; put (p&3)^e into X
LDA.w KeyBase, X : EOR.w z : STA.b Scrap08+4
LDA.w KeyBase+2, X : EOR.w z+2 : STA.b Scrap08+6
;================================
; upperscratch2 = dpscratch + dpscratch2 (== (sum^y) + (k[p&3^e]^z))
LDA.b !dpScratch : !ADD.b !dpScratch+4 : STA.w !upperScratch+4
LDA.b !dpScratch+2 : ADC.b !dpScratch+6 : STA.w !upperScratch+6
LDA.b Scrap08 : !ADD.b Scrap08+4 : STA.w CryptoScratch+4
LDA.b Scrap08+2 : ADC.b Scrap08+6 : STA.w CryptoScratch+6
;================================
; MXResult = uppserscratch ^ upperscratch2
LDA.w !upperScratch : EOR.w !upperScratch+4 : STA.b !MXResult
LDA.w !upperScratch+2 : EOR.w !upperScratch+6 : STA.b !MXResult+2
LDA.w CryptoScratch : EOR.w CryptoScratch+4 : STA.b Scrap08
LDA.w CryptoScratch+2 : EOR.w CryptoScratch+6 : STA.b Scrap08+2
PLX
RTS
;!DIVIDEND_LOW = $4204
;!DIVIDEND_HIGH = $4205
;!DIVISOR = $4206
;!QUOTIENT_LOW = $4214
;!QUOTIENT_HIGH = $4215
XXTEA_Decode:
PHP : PHB
SEP #$30 ; set 8-bit accumulator and index
LDA.b #$7F : PHA : PLB
STZ.b !n+1 ; set upper byte of n to be zero, so it can safely be accessed in 16-bit mode
STZ.b Scrap04+1 ; set upper byte of n to be zero, so it can safely be accessed in 16-bit mode
; search for lookup table index to avoid division and multiplication
LDX.b #0
-
LDA.l .n_lookup, X
CMP.b !n : !BLT +
CMP.b Scrap04 : !BLT +
INX
BRA -
+
; rounds = 6 + 52/n;
LDA.l .round_counts, X : STA.b !rounds : STZ.b !rounds+1
LDA.l .round_counts, X : STA.b Scrap06 : STZ.b Scrap06+1
REP #$20 ; set 16-bit accumulator
; sum = rounds*DELTA;
TXA : ASL #2 : TAX
LDA.l .initial_sums, X : STA.w !sum
LDA.l .initial_sums+2, X : STA.w !sum+2
LDA.l .initial_sums, X : STA.w Sum
LDA.l .initial_sums+2, X : STA.w Sum+2
; y = v[0];
LDA.w !v : STA.w !y
LDA.w !v+2 : STA.w !y+2
LDA.w v : STA.w y
LDA.w v+2 : STA.w y+2
---
LDA.w !sum : LSR #2 : AND.w #$0003 : STA.w !e ; e = (sum >> 2) & 3;
LDA.w Sum : LSR #2 : AND.w #$0003 : STA.w e ; e = (sum >> 2) & 3;
LDA.b !n : DEC : STA.w !p
LDA.b Scrap04 : DEC : STA.w p
-- BEQ + ; for (p=n-1; p>0; p--) {
; z = v[p-1];
ASL #2 : TAX
LDA.w !v-4, X : STA.w !z
LDA.w !v-4+2, X : STA.w !z+2
LDA.w v-4, X : STA.w z
LDA.w v-4+2, X : STA.w z+2
; y = v[p] -= MX;
JSR CryptoMX
LDA.w !p : ASL #2 : TAX
LDA.w !v, X : !SUB.b !MXResult : STA.w !v, X : STA.w !y
LDA.w !v+2, X : SBC.b !MXResult+2 : STA.w !v+2, X : STA.w !y+2
LDA.w p : ASL #2 : TAX
LDA.w v, X : !SUB.b Scrap08 : STA.w v, X : STA.w y
LDA.w v+2, X : SBC.b Scrap08+2 : STA.w v+2, X : STA.w y+2
LDA.w !p : DEC : STA.w !p : BRA -- ; }
LDA.w p : DEC : STA.w p : BRA -- ; }
+
; z = v[n-1];
LDA.b !n : DEC : ASL #2 : TAX
LDA.w !v, X : STA.w !z
LDA.w !v+2, X : STA.w !z+2
LDA.b Scrap04 : DEC : ASL #2 : TAX
LDA.w v, X : STA.w z
LDA.w v+2, X : STA.w z+2
; y = v[0] -= MX;
JSR CryptoMX
LDA.w !v : !SUB.b !MXResult : STA.w !v : STA.w !y
LDA.w !v+2 : SBC.b !MXResult+2 : STA.w !v+2 : STA.w !y+2
LDA.w v : !SUB.b Scrap08 : STA.w v : STA.w y
LDA.w v+2 : SBC.b Scrap08+2 : STA.w v+2 : STA.w y+2
; sum -= DELTA;
LDA.w !sum : !SUB.l CryptoDelta : STA.w !sum
LDA.w !sum+2 : SBC.l CryptoDelta+2 : STA.w !sum+2
LDA.w Sum : !SUB.l CryptoDelta : STA.w Sum
LDA.w Sum+2 : SBC.l CryptoDelta+2 : STA.w Sum+2
DEC !rounds : BEQ + : JMP --- : + ; } while (--rounds);
DEC.b Scrap06 : BEQ + : JMP --- : + ; } while (--rounds);
PLB : PLP
RTL
@@ -243,69 +208,3 @@ db 32 ; n is 2
;dd (23*$9e3779b9)&$ffffffff ; n is 3
dd (32*$9e3779b9)&$ffffffff ; n is 2
;void btea(uint32_t *v, int n, uint32_t const key[4]) {
; uint32_t y, z, sum;
; unsigned p, rounds, e;
; } else if (n < -1) { /* Decoding Part */
; n = -n;
; rounds = 6 + 52/n;
; sum = rounds*DELTA;
; y = v[0];
; do {
; e = (sum >> 2) & 3;
; for (p=n-1; p>0; p--) {
; z = v[p-1];
; y = v[p] -= MX;
; }
; z = v[n-1];
; y = v[0] -= MX;
; sum -= DELTA;
; } while (--rounds);
; }
;BTEA will encode or decode n words as a single block where n > 1
;
;v is the n word data vector
;k is the 4 word key
;n is negative for decoding
;if n is zero result is 1 and no coding or decoding takes place, otherwise the result is zero
;assumes 32 bit 'long' and same endian coding and decoding
;#include <stdint.h>
;#define DELTA 0x9e3779b9
;#define MX ((((z>>5)^(y<<2)) + ((y>>3)^(z<<4))) ^ ((sum^y) + (key[(p&3)^e] ^ z)))
;
;void btea(uint32_t *v, int n, uint32_t const key[4]) {
; uint32_t y, z, sum;
; unsigned p, rounds, e;
; if (n > 1) { /* Coding Part */
; rounds = 6 + 52/n;
; sum = 0;
; z = v[n-1];
; do {
; sum += DELTA;
; e = (sum >> 2) & 3;
; for (p=0; p<n-1; p++) {
; y = v[p+1];
; z = v[p] += MX;
; }
; y = v[0];
; z = v[n-1] += MX;
; } while (--rounds);
; } else if (n < -1) { /* Decoding Part */
; n = -n;
; rounds = 6 + 52/n;
; sum = rounds*DELTA;
; y = v[0];
; do {
; e = (sum >> 2) & 3;
; for (p=n-1; p>0; p--) {
; z = v[p-1];
; y = v[p] -= MX;
; }
; z = v[n-1];
; y = v[0] -= MX;
; sum -= DELTA;
; } while (--rounds);
; }
;}

View File

@@ -1,53 +1,37 @@
;================================================================================
!CUCCO_STORM = "$7F50C5"
!IS_INDOORS = "$7E001B"
!ENEMY_STATE_TABLE = "$7E0DD0"
!ENEMY_TYPE_TABLE = "$7E0E20"
!ENEMY_AUX1_TABLE = "$7E0DA0"
!ENEMY_AUX2_TABLE = "$7E0DB0"
!ENEMY_DIRECTION_TABLE = "$7E0EB0"
!CUCCO = "#$0B"
!INERT = "#$00"
!INIT = "#$08"
!ALIVE = "#$09"
!CUCCO_ENRAGED = "#$23"
!LINK_POS_Y_LOW = "$20"
!LINK_POS_Y_HIGH = "$21"
!LINK_POS_X_LOW = "$22"
!LINK_POS_X_HIGH = "$23"
!ENEMY_POS_Y_LOW = "$7E0D00"
!ENEMY_POS_X_LOW = "$7E0D10"
!ENEMY_POS_Y_HIGH = "$7E0D20"
!ENEMY_POS_X_HIGH = "$7E0D30"
!CUCCO = $0B
!INERT = $00
!INIT = $08
!ALIVE = $09
!OAMPROPS = $09
!CUCCO_ENRAGED = $23
CuccoStorm:
SEP #$30 ; set 8-bit accumulator index registers
LDA.l !CUCCO_STORM : BEQ + ; only if storm is on
LDA.b $10 : CMP.b #$09 : BEQ .check ; only if outdoors
.indoors
LDA.b #$00 : STA.l !CUCCO_STORM
BRA +
.check
LDA.l CuccoStormer : BEQ + ; only if storm is on
LDA.b GameMode : CMP.b #$09 : BNE + ; only if outdoors
LDA.l LoopFrames : AND.b #$7F : BNE + ; check every 128 frames
.activate
-
;==== Find a Cucco
LDY.b #$FF : PHY ; push "cucco not found"
LDX.b #$00 : -- : CPX.b #$10 : !BGE .ldone
LDA.w !ENEMY_STATE_TABLE, X : CMP.b !ALIVE : BEQ +++
LDA.w SpriteAITable, X : CMP.b #!ALIVE : BEQ +++
; enemy not found
CMP.b !INERT : BNE ++
CMP.b #!INERT : BNE ++
; log inert enemy slot
PLA : PHX
BRA ++
+++
; found an enemy
LDA.l !ENEMY_TYPE_TABLE, X : CMP.b !CUCCO : BNE ++
LDA.l SpriteTypeTable, X : CMP.b #!CUCCO : BNE ++
; it's a cucco
TXY ; record where we found the living cucco in case we don't find any angry ones
LDA.w !ENEMY_AUX1_TABLE, X : CMP.b !CUCCO_ENRAGED : !BLT ++
LDA.w SpriteAuxTable, X : CMP.b #!CUCCO_ENRAGED : !BLT ++
PLA : BRA + ; we found an angry cucco, done
++ : INX : BRA -- : .ldone
@@ -57,22 +41,26 @@ CuccoStorm:
; we didn't find a cucco, so try to create one
PLY
CPY.b #$FF : BEQ + ; fail if no slots found
LDA.b !CUCCO : STA.w !ENEMY_TYPE_TABLE, Y
LDA.b !INIT : STA.w !ENEMY_STATE_TABLE, Y
LDA.b !LINK_POS_Y_LOW : STA.w !ENEMY_POS_Y_LOW, Y
LDA.b !LINK_POS_Y_HIGH : STA.w !ENEMY_POS_Y_HIGH, Y
LDA.b !LINK_POS_X_LOW : STA.w !ENEMY_POS_X_LOW, Y
LDA.b !LINK_POS_X_HIGH : STA.w !ENEMY_POS_X_HIGH, Y
LDA.b #!CUCCO : STA.w SpriteTypeTable, Y
LDA.b #!ALIVE : STA.w SpriteAITable, Y
PHX
TYX : JSL ResetSpriteProperties
PLX
LDA.b #!OAMPROPS : STA.w SpriteOAMProp, Y
LDA.b LinkPosY : STA.w SpritePosYLow, Y
LDA.b LinkPosY+1 : STA.w SpritePosYHigh, Y
LDA.b LinkPosX : STA.w SpritePosXLow, Y
LDA.b LinkPosX+1 : STA.w SpritePosXHigh, Y
BRA +++
++
PLA
+++
;==== Enrage a Cucco
LDA.b !CUCCO_ENRAGED : STA.w !ENEMY_AUX1_TABLE, Y ; enrage the cucco
LDA.b #$00 : STA.w !ENEMY_AUX2_TABLE, Y : STA.w !ENEMY_DIRECTION_TABLE, Y
LDA.b #!CUCCO_ENRAGED : STA.w SpriteAuxTable, Y ; enrage the cucco
LDA.b #$00 : STA.w SpriteAuxTable+$10, Y : STA.w SpriteDirectionTable, Y
;====
+
RTL

17
custompalettes.asm Normal file
View File

@@ -0,0 +1,17 @@
PalettesCustom:
.master_sword
dw $0000, $7E4E, $6FF4, $1CF5, $7FFF, $1CE7, $7A10, $64A5
.tempered_sword
dw $7FFF, $093B, $169F, $7E8D, $7FFF, $1CE7, $7A10, $64A5
.golden_sword
dw $0000, $033F, $7FFF, $2640, $7FFF, $1CE7, $7A10, $64A5
.fighter_shield
dw $0000, $7FFF, $27FF, $5E2D, $7FFF, $1CE7, $7A10, $64A5
.red_shield
dw $0000, $7FFF, $27FF, $5E2D, $4F5F, $1CE7, $2E9C, $14B6
.mirror_shield
dw $0000, $7E4E, $6F44, $1CF5, $7399, $1CE7, $02F9, $0233
.crystal
dw $7FFF, $7FFF, $0000, $5907, $6E0E, $0000, $7FBB, $7672
.off_black
dw $0000, $14A5, $14A5, $14A5, $14A5, $14A5, $14A5, $14A5

Binary file not shown.

Binary file not shown.

View File

@@ -1,27 +0,0 @@
CheckReceivedItemPropertiesBeforeLoad:
LDA $A0 : BEQ .normalCode
LDA $7EC005 : BNE .lightOff
.normalCode
JSL LoadReceivedItemExpandedProperties ; get palette
RTL
.lightOff
PHX : PHY : PHB
JSL LoadReceivedItemExpandedProperties ; get palette
REP #$30
AND #$0007 ; mask out palette
ASL #5 ; multiply by 32
ADC #$C610 ; offset to latter half
TAX ; give to destination
LDY #$C610 ; target palette SP0 colors 8-F
LDA #$000F ; 16 bytes
MVN $7E, $7E ; move palette
SEP #$30
PLB : PLY : PLX
INC $15
LDA #$00
RTL

View File

@@ -2,94 +2,105 @@
; Dark World Spawn Location Fix & Master Sword Grove Fix
;--------------------------------------------------------------------------------
DarkWorldSaveFix:
LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change
JSL.l MasterSwordFollowerClear
JML.l StatSaveCounter
JSL MasterSwordFollowerClear
JML StatSaveCounter
;--------------------------------------------------------------------------------
DoWorldFix:
LDA InvertedMode : BEQ +
LDA.l InvertedMode : BEQ +
JMP DoWorldFix_Inverted
+
LDA FollowerIndicator : CMP #$04 : BEQ .aga1Alive ; if old man following, skip mirror/aga check
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
LDA MirrorEquipment : AND #$02 : BEQ .noMirror ; check if we have the mirror
LDA.l FollowerIndicator : CMP.b #$04 : BNE + ; if old man following, skip mirror/aga check
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ +
LDA.l OldManRetrievalWorld
BRA .noMirror
+ LDA.l MirrorEquipment : AND.b #$02 : BEQ .noMirror ; check if we have the mirror
.skip_mirror_check ; alt entrance point
LDA ProgressIndicator : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive
.aga1Alive
LDA #$00
LDA.l ProgressIndicator : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive
.setLightWorld
LDA.b #$00
.noMirror
STA CurrentWorld ; set flag to light world
STA.l CurrentWorld ; set flag to light world
LDA.l SmithDeleteOnSave : BEQ .transform
LDA FollowerIndicator
CMP #$07 : BEQ .clear ; clear frog
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications
LDA.l FollowerIndicator
CMP.b #$07 : BEQ .clear ; clear frog
CMP.b #$08 : BEQ .clear ; clear dwarf - consider flute implications
BRA .done
.clear
LDA.b #$00 : STA FollowerIndicator : BRA .done ; clear follower
LDA.b #$00 : STA.l FollowerIndicator : BRA .done ; clear follower
.transform
LDA FollowerIndicator : CMP #$07 : BNE .done : INC : STA FollowerIndicator ; convert frog to dwarf
LDA.l FollowerIndicator : CMP.b #$07 : BNE .done : INC : STA.l FollowerIndicator ; convert frog to dwarf
.done
RTL
;--------------------------------------------------------------------------------
SetDeathWorldChecked:
LDA InvertedMode : BEQ +
LDA.l InvertedMode : BEQ +
JMP SetDeathWorldChecked_Inverted
+
LDA $1B : BEQ .outdoors
LDA $040C : CMP #$FF : BNE .dungeon
LDA $A0 : ORA $A1 : BNE ++
LDA GanonPyramidRespawn : BNE .pyramid ; if flag is set, force respawn at pyramid on death to ganon
++
LDA.b IndoorsFlag : BEQ .outdoors
LDA.w DungeonID : CMP.b #$FF : BNE .dungeon
LDA.b RoomIndex : ORA.b RoomIndex+1 : BNE ++
LDA.l GanonPyramidRespawn : BNE .pyramid ; if flag is set, force respawn at pyramid on death to ganon
++
.outdoors
JMP DoWorldFix
.dungeon
LDA Bugfix_PreAgaDWDungeonDeathToFakeDW : BNE .done ; if the bugfix is enabled, we do nothing on death in dungeon
JMP DoWorldFix_skip_mirror_check
LDA.l MosaicLevel : BNE .dontfix ; this is a sanc & quit
LDA.l Bugfix_PreAgaDWDungeonDeathToFakeDW : BNE .done ; if the bugfix is enabled, we do nothing on death in dungeon
.dontfix
JMP DoWorldFix_skip_mirror_check
.pyramid
LDA #$40 : STA CurrentWorld ; set flag to dark world
LDA FollowerIndicator : CMP #$08 : BNE .done : DEC : STA FollowerIndicator : + ; convert dwarf to frog
LDA.b #$40 : STA.l CurrentWorld ; set flag to dark world
LDA.l FollowerIndicator : CMP.b #$08 : BNE .done : DEC : STA.l FollowerIndicator : + ; convert dwarf to frog
.done
RTL
;================================================================================
DoWorldFix_Inverted:
LDA FollowerIndicator : CMP #$04 : BEQ .aga1Alive ; if old man following, skip mirror/aga check
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
LDA.l MirrorEquipment : AND #$02 : BEQ .noMirror ; check if we have the mirror
LDA.l FollowerIndicator : CMP.b #$04 : BNE + ; if old man following, skip mirror/aga check
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ +
LDA.l OldManRetrievalWorld
BRA .setWorld
+ LDA.l MirrorEquipment : AND.b #$02 : BEQ .noMirror ; check if we have the mirror
.skip_mirror_check ; alt entrance point
LDA ProgressIndicator : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive
LDA.l ProgressIndicator : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive
.noMirror
.aga1Alive
LDA #$40 : STA CurrentWorld ; set flag to dark world
.setDarkWorld
LDA.b #$40
.setWorld
STA.l CurrentWorld ; set flag to dark world
LDA.l SmithDeleteOnSave : BEQ .transform
LDA FollowerIndicator
CMP #$07 : BEQ .clear ; clear frog
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications
LDA.l FollowerIndicator
CMP.b #$07 : BEQ .clear ; clear frog
CMP.b #$08 : BEQ .clear ; clear dwarf - consider flute implications
BRA .done
.clear
LDA.b #$00 : STA FollowerIndicator : BRA .done ; clear follower
LDA.b #$00 : STA.l FollowerIndicator : BRA .done ; clear follower
.transform
LDA FollowerIndicator : CMP #$07 : BNE .done : INC : STA FollowerIndicator ; convert frog to dwarf
LDA.l FollowerIndicator : CMP.b #$07 : BNE .done : INC : STA.l FollowerIndicator ; convert frog to dwarf
.done
RTL
;--------------------------------------------------------------------------------
SetDeathWorldChecked_Inverted:
LDA $1B : BEQ .outdoors
LDA $040C : CMP #$FF : BNE .dungeon
LDA $A0 : ORA $A1 : BNE ++
LDA GanonPyramidRespawn : BNE .castle ; if flag is set, force respawn at pyramid on death to ganon
LDA.b IndoorsFlag : BEQ .outdoors
LDA.w DungeonID : CMP.b #$FF : BNE .dungeon
LDA.b RoomIndex : ORA.b RoomIndex+1 : BNE ++
LDA.l GanonPyramidRespawn : BNE .castle ; if flag is set, force respawn at pyramid on death to ganon
++
.outdoors
JMP DoWorldFix_Inverted
.dungeon
LDA Bugfix_PreAgaDWDungeonDeathToFakeDW : BNE .done ; if the bugfix is enabled, we do nothing on death in dungeon
JMP DoWorldFix_Inverted_skip_mirror_check
LDA.l MosaicLevel : BNE .dontfix ; this is a sanc & quit
LDA.l Bugfix_PreAgaDWDungeonDeathToFakeDW : BNE .done ; if the bugfix is enabled, we do nothing on death in dungeon
.dontfix
JMP DoWorldFix_Inverted_skip_mirror_check
.castle
LDA #$00 : STA CurrentWorld ; set flag to dark world
LDA FollowerIndicator : CMP #$07 : BNE + : LDA.b #$08 : STA FollowerIndicator : + ; convert frog to dwarf
LDA.b #$00 : STA.l CurrentWorld ; set flag to dark world
LDA.l FollowerIndicator : CMP.b #$07 : BNE + : LDA.b #$08 : STA.l FollowerIndicator : + ; convert frog to dwarf
.done
RTL
;================================================================================
@@ -97,22 +108,34 @@ RTL
;--------------------------------------------------------------------------------
FakeWorldFix:
LDA FixFakeWorld : BEQ +
LDA.l FixFakeWorld : BEQ +
PHX
LDX $8A : LDA.l OWTileWorldAssoc, X : STA CurrentWorld
LDX.b OverworldIndex : LDA.l OWTileWorldAssoc, X : STA.l CurrentWorld
PLX
+
RTL
;--------------------------------------------------------------------------------
GetCurrentWorldForLoad:
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ .default
LDA.l FollowerIndicator : CMP.b #$04 : BNE .default
LDA.l InvertedMode : BEQ +
LDA.b #$40
+ RTL
.default
LDA.l CurrentWorld
RTL
;--------------------------------------------------------------------------------
MasterSwordFollowerClear:
LDA FollowerIndicator
CMP #$0E : BNE .exit ; clear master sword follower
LDA.b #$00 : STA FollowerIndicator ; clear follower
LDA.l FollowerIndicator
CMP.b #$0E : BNE .exit ; clear master sword follower
LDA.b #$00 : STA.l FollowerIndicator ; clear follower
.exit
RTL
;--------------------------------------------------------------------------------
FixAgahnimFollowers:
LDA.b #$00 : STA FollowerIndicator ; clear follower
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ +
LDA.b #$00 : STA.l FollowerIndicator ; clear follower
+
JML PrepDungeonExit ; thing we wrote over
;--------------------------------------------------------------------------------
@@ -122,53 +145,53 @@ macro SetMinimum(base,filler,compare)
?done:
endmacro
RefreshRainAmmo:
LDA ProgressIndicator : CMP.b #$01 : BEQ .rain ; check if we're in rain state
LDA.l ProgressIndicator : CMP.b #$01 : BEQ .rain ; check if we're in rain state
RTL
.rain
LDA StartingEntrance
LDA.l StartingEntrance
+ CMP.b #$03 : BNE + ; Uncle
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Uncle)
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Uncle)
%SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Uncle)
BRA .done
LDA.l ArrowMode : BEQ ++
LDA.l BowEquipment : BEQ +++
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Uncle)
+++ BRA .done
+ CMP.b #$02 : BNE + ; Cell
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Cell)
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Cell)
%SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Cell)
LDA.l ArrowMode : BEQ ++
LDA.l BowEquipment : BEQ .done
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Cell)
BRA .done
+ CMP.b #$04 : BNE + ; Mantle
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Mantle)
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Mantle)
%SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Mantle)
LDA.l ArrowMode : BEQ ++
LDA.l BowEquipment : BEQ .done
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Mantle)
+
.done
RTL
;--------------------------------------------------------------------------------
SetEscapeAssist:
LDA ProgressIndicator : CMP.b #$01 : BNE .no_train ; check if we're in rain state
LDA.l ProgressIndicator : CMP.b #$01 : BNE .no_train ; check if we're in rain state
.rain
LDA.l EscapeAssist
BIT.b #$04 : BEQ + : STA InfiniteMagicModifier : +
BIT.b #$02 : BEQ + : STA InfiniteBombsModifier : +
BIT.b #$01 : BEQ + : STA InfiniteArrowsModifier : +
BIT.b #$04 : BEQ + : STA.l InfiniteArrows : +
BIT.b #$02 : BEQ + : STA.l InfiniteBombs : +
BIT.b #$01 : BEQ + : STA.l InfiniteArrows : +
BRA ++
.no_train ; choo choo
LDA.l EscapeAssist
BIT.b #$40 : BEQ + : STA InfiniteMagicModifier : +
BIT.b #$20 : BEQ + : STA InfiniteBombsModifier : +
BIT.b #$10 : BEQ + : STA InfiniteArrowsModifier : +
LDA.l EscapeAssist : BIT.b #$04 : BEQ + : LDA.b #$00 : STA.l InfiniteMagic : +
LDA.l EscapeAssist : BIT.b #$02 : BEQ + : LDA.b #$00 : STA.l InfiniteBombs : +
LDA.l EscapeAssist : BIT.b #$01 : BEQ + : LDA.b #$00 : STA.l InfiniteArrows : +
++
LDA.l SpecialWeapons : CMP #$01 : BNE +
LDA.l SpecialWeaponLevel : BEQ +
LDA #$01 : STA InfiniteBombsModifier
+
RTL
;--------------------------------------------------------------------------------
SetSilverBowMode:
LDA SilverArrowsUseRestriction : BEQ + ; fix bow type for restricted arrow mode
LDA BowEquipment : CMP.b #$3 : BCC +
SBC.b #$02 : STA BowEquipment
LDA.l SilverArrowsUseRestriction : BEQ + ; fix bow type for restricted arrow mode
LDA.l BowEquipment : CMP.b #$3 : BCC +
SBC.b #$02 : STA.l BowEquipment
+
RTL
;================================================================================

0
99ff1_bombos.gfx → data/99ff1_bombos.gfx Executable file → Normal file
View File

0
99ff1_quake.gfx → data/99ff1_quake.gfx Executable file → Normal file
View File

0
a6fc4_bombos.gfx → data/a6fc4_bombos.gfx Executable file → Normal file
View File

0
a6fc4_ether.gfx → data/a6fc4_ether.gfx Executable file → Normal file
View File

0
c2807_v3.gfx → data/c2807_v3.gfx Executable file → Normal file
View File

Binary file not shown.

BIN
data/c2e3e.gfx Normal file

Binary file not shown.

View File

@@ -0,0 +1,79 @@
=9F
0=53
1=54
2=55
3=56
4=57
5=58
6=59
7=5A
8=5B
9=5C
A=5D
B=5E
C=5F
D=60
E=61
F=62
G=63
H=64
I=65
J=66
K=67
L=68
M=69
N=6A
O=6B
P=6C
Q=6D
R=6E
S=6F
T=70
U=71
V=72
W=73
X=74
Y=75
Z=76
a=A0
b=A1
c=A2
d=A3
e=A4
f=A5
g=A6
h=A7
i=A8
j=A9
k=AA
l=AB
m=AC
n=AD
o=AE
p=AF
q=B0
r=B1
s=B2
t=B3
u=B4
v=B5
w=B6
x=B7
y=B8
z=B9
'=D9
"=DA
/=DB
.=DC
:=DD
_=DE
^=DF
&=E0
#=E1
@=E2
>=E3
?=E4
!=E5
~=E6
,=E7
-=E8

View File

@@ -0,0 +1,79 @@
=9F
0=79
1=7A
2=7B
3=7C
4=7D
5=7E
6=7F
7=80
8=81
9=82
A=83
B=84
C=85
D=86
E=87
F=88
G=89
H=8A
I=8B
J=8C
K=8D
L=8E
M=8F
N=90
O=91
P=92
Q=93
R=94
S=95
T=96
U=97
V=98
W=99
X=9A
Y=9B
Z=9C
a=BB
b=BC
c=BD
d=BE
e=BF
f=C0
g=C1
h=C2
i=C3
j=C4
k=C5
l=C6
m=C7
n=C8
o=C9
p=CA
q=CB
r=CC
s=CD
t=CE
u=CF
v=D0
w=D1
x=D2
y=D3
z=D4
'=EC
"=ED
/=EE
.=EF
:=F0
_=F1
^=F2
&=F3
#=F4
@=F5
>=F6
?=F7
!=F8
~=F9
,=FA
-=FB

View File

@@ -24,4 +24,5 @@ V=4D
W=4E
X=4F
Y=50
Z=51
Z=51
.=52

View File

@@ -24,4 +24,8 @@ V=2F
W=30
X=31
Y=32
Z=33
Z=33
,=34
'=35
-=36
.=37

BIN
data/customitems.4bpp Normal file

Binary file not shown.

BIN
data/customitems.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
fileselect.chr.gfx → data/fileselectgfx.2bpp Executable file → Normal file

Binary file not shown.

BIN
data/fileselectgfx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

View File

@@ -0,0 +1,55 @@
; Kanji replacement characters
org $8E9AC9
;.charDD ; 𓄿
db $FB, $8C, $73, $CB, $30, $4B, $30, $54
db $2B, $5B, $24, $2D, $12, $13, $61, $1E
db $36, $09, $1B, $04, $14, $0B, $15, $0A
db $15, $0A, $21, $1E, $1E, $48, $30, $38
;.charDE ; ☥
db $1E, $33, $0C, $2D, $12, $2D, $12, $2D
db $12, $F3, $0C, $01, $01, $BF, $40, $C0
db $3F, $BF, $40, $F2, $0C, $12, $0C, $12
db $0C, $12, $0C, $1E, $50, $A0, $F0
;.charDF ; ≈
db $01, $3B, $6E, $11, $C4, $3B, $91, $6E
db $BB, $44, $26, $18, $3C, $E7, $3B, $6E
db $11, $C4, $3B, $91, $6E, $BB, $44, $EE
db $98, $60, $F0
;.charE0 ; 🡅
db $0C, $12, $0C, $21, $1E, $40, $3F, $80
db $7F, $02, $01, $01, $E1, $1E, $21, $1E
db $21, $1E, $21, $1E, $21, $1E, $21, $1E
db $21, $1E, $3F, $80, $80
;.charE1 ; 🡇
db $3F, $21, $1E, $21, $1E, $21, $1E, $21
db $1E, $21, $1E, $21, $1E, $E1, $1E, $80
db $7F, $40, $3F, $21, $1E, $12, $0C, $0C
db $28, $10, $30
;.charE2 ; 🡆
db $18, $14, $08, $12, $0C, $F1, $0E, $80
db $7F, $01, $80, $7F, $80, $7F, $80, $7F
db $F1, $0E, $12, $0C, $14, $08, $18, $20
db $C0, $C0
;.charE3 ; 🡄
db $06, $0A, $04, $12, $0C, $23, $1C, $40
db $3F, $02, $01, $03, $80, $7F, $80, $7F
db $40, $3F, $23, $1C, $12, $0C, $0A, $04
db $06, $10, $E0, $F0
org $8EBD94
;.charDD ; 𓄿
db $BF, $FE, $3F, $FF, $B8 ; 10111111 11111110 00111111 11111111 10111000
;.charDE ; ☥
db $BF, $FA, $3F, $FF, $B8 ; 10111111 11111010 00111111 11111111 10111000
;.charDF ; ≈
db $AF, $FE, $2B, $FE, $38 ; 10101111 11111110 00101011 11111110 00111000
;.charE0 ; 🡅
db $2F, $FE, $3F, $FF, $A8 ; 00101111 11111110 00111111 11111111 10101000
;.charE1 ; 🡇
db $2F, $F0, $3F, $FF, $B8 ; 00101111 11110000 00111111 11111111 10111000
;.charE2 ; 🡆
db $2F, $F8, $3F, $FE, $38 ; 00101111 11111000 00111111 11111110 00111000
;.charE3 ; 🡄
db $2F, $FE, $3F, $FE, $38 ; 00101111 11111110 00111111 11111110 00111000

Binary file not shown.

0
newitems.gfx → data/newitems.gfx Executable file → Normal file
View File

View File

@@ -0,0 +1,59 @@
db $00, $01, $02, $03, $04, $CC, $CC ; あ い う え お ⎵ ⎵
db $15, $16, $17, $1D, $1E, $CC ; が ぎ ぐ げ ご ⎵
db $50, $51, $52, $53, $54, $CC, $CC ; ア イ ウ エ オ ⎵ ⎵
db $D0, $D1, $D2, $D3, $D4, $CC ; a b c d e ⎵
db $AA, $AB, $AC, $AD, $CC, $CC ; A B C D ⎵ ⎵
db $08, $09, $0A, $0B, $0C, $CC, $CC ; か き く け こ ⎵ ⎵
db $1F, $25, $26, $27, $2D, $CC ; ざ じ ず ぜ ぞ ⎵
db $58, $59, $5A, $5B, $5C, $CC, $CC ; カ キ ク ケ コ ⎵ ⎵
db $D5, $D6, $D7, $D8, $D9, $CC ; ザ ジ ズ ゼ ゾ ⎵
db $AE, $AF, $B0, $B1, $CC, $CC ; E F G H ⎵ ⎵
db $10, $11, $12, $13, $14, $CC, $CC ; さ し す せ そ ⎵ ⎵
db $2E, $2F, $35, $36, $37, $CC ; だ ぢ づ で ど ⎵
db $60, $61, $62, $63, $64, $CC, $CC ; サ シ ス セ ソ ⎵ ⎵
db $DA, $DB, $DC, $DD, $DE, $CC ; ダ ヂ ヅ デ ド ⎵
db $B2, $B3, $B4, $B5, $CC, $CC ; I J K L ⎵ ⎵
db $18, $19, $1A, $1B, $1C, $CC, $CC ; た ち つ て と ⎵ ⎵
db $3D, $3E, $3F, $40, $41, $CC ; ば び ぶ べ ぼ ⎵
db $68, $69, $6A, $6B, $6C, $CC, $CC ; タ チ ツ テ ト ⎵ ⎵
db $DF, $E0, $E1, $E2, $E3, $CC ; バ ビ ブ ベ ボ ⎵
db $B6, $B7, $B8, $B9, $CC, $CC ; M N O P ⎵ ⎵
db $20, $21, $22, $23, $24, $CC, $CC ; な に ぬ ね の ⎵ ⎵
db $42, $43, $44, $45, $46, $CC ; ぱ ぴ ぷ ぺ ぽ ⎵
db $70, $71, $72, $73, $74, $CC, $CC ; ナ ニ ヌ ネ ⎵ ⎵
db $E4, $E5, $E6, $E7, $E8, $CC ; パ ピ プ ペ ポ ⎵
db $BA, $BB, $BC, $BD, $CC, $CC ; Q R S T ⎵ ⎵
db $28, $29, $2A, $2B, $2C, $CC, $CC ; は ひ ふ へ ほ ⎵ ⎵
db $65, $66, $67, $6D, $6E, $CC
db $78, $79, $7A, $7B, $7C, $CC, $CC ; ハ ヒ フ ヘ ホ ⎵ ⎵
db $E9, $EA, $EB, $EC, $C6, $CC ; ァ ィ ゥ ェ ォ ⎵
db $BE, $BF, $C0, $C1, $CC, $CC ; U V W X ⎵ ⎵
db $30, $31, $32, $33, $34, $CC, $CC ; ま み む め も ⎵ ⎵
db $6F, $75, $76, $77, $7D, $CC ; ザ ジ ズ ゼ ゾ ⎵
db $80, $81, $82, $83, $84, $CC, $CC ; マ ミ ム メ モ ⎵ ⎵
db $CC, $CC, $CC, $CC, $9A, $CC ; ャ ュ ョ ⎵ ッ ⎵
db $C2, $C3, $C9, $CE, $CC, $CC ; Y Z 〜 ⎵ ⎵
db $05, $CC, $06, $CC, $07, $CC, $CC ; や ⎵ ゆ ⎵ よ ⎵ ⎵
db $7E, $7F, $85, $86, $87, $CC ; ダ ヂ ヅ デ ド ⎵
db $55, $CC, $56, $CC, $57, $CC, $CC ; ヤ ⎵ ユ ⎵ ヨ ⎵ ⎵
db $A0, $A1, $A2, $A3, $A4, $CC ; ⎵ ⎵ ⎵ ⎵ ⎵ ⎵
db $CC, $CC, $CC, $CC, $CC, $CC ; ⎵ ⎵ ⎵ ⎵ ⎵ ⎵
db $38, $39, $3A, $3B, $3C, $CC, $CC ; ら り る れ ろ ⎵ ⎵
db $8D, $8E, $8F, $90, $91, $CC ; バ ビ ブ ベ ボ ⎵
db $88, $89, $8A, $8B, $8C, $CC, $CC ; ラ リ ル レ ロ ⎵ ⎵
db $A5, $A6, $A7, $A8, $A9, $CC ; ⎵ ⎵ ⎵ ⎵ ⎵ ⎵
db $CA, $CB, $CD, $CD, $CC, $CC ; 🡄 🡆 END ⎵ ⎵
db $0D, $0E, $0F, $CC, $C9, $CC, $CC ; わ を ん ⎵ ⎵ ⎵
db $92, $93, $94, $95, $96, $CC ; パ ピ プ ペ ポ ⎵
db $5D, $5E, $5F, $CC, $C9, $CC, $CC ; ワ ヲ ン ⎵ ⎵ ⎵
db $CC, $CC, $CC, $CC, $CC, $CC ; ⎵ ⎵ ⎵ ⎵ ⎵ ⎵
db $CC, $CC, $CC, $CC, $CC, $CC ; ⎵ ⎵ ⎵ ⎵ ⎵ ⎵

BIN
data/playernamecharmap.bin Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,72 @@
dw $E164, $3900 ; VRAM $C9C2 | 58 bytes | Horizontal
dw $1CA2, $0188, $1CA3, $0188, $1CA4, $0188, $0188, $0188
dw $0188, $0188, $1DA0, $0188, $1DA1, $0188, $1DA2, $0188
dw $1DA3, $0188, $1DA4, $0188, $0188, $0188, $1D4A, $0188
dw $1D4B, $0188, $1D4C, $0188, $1D4D
dw $0165, $3900 ; VRAM $CA02 | 58 bytes | Horizontal
dw $1CB2, $0188, $1CB3, $0188, $1CB4, $0188, $0188, $0188
dw $0188, $0188, $1DB0, $0188, $1DB1, $0188, $1DB2, $0188
dw $1DB3, $0188, $1DB4, $0188, $0188, $0188, $1D5A, $0188
dw $1D5B, $0188, $1D5C, $0188, $1D5D
dw $2165, $3900 ; VRAM $CA42 | 58 bytes | Horizontal
dw $1CAA, $0188, $1CAB, $0188, $1CAC, $0188, $0188, $0188
dw $0188, $0188, $1DA5, $0188, $1DA6, $0188, $1DA7, $0188
dw $1DA8, $0188, $1DA9, $0188, $0188, $0188, $1D4E, $0188
dw $1D4F, $0188, $1D60, $0188, $1D61
dw $4165, $3900 ; VRAM $CA82 | 58 bytes | Horizontal
dw $1CBA, $0188, $1CBB, $0188, $1CBC, $0188, $0188, $0188
dw $0188, $0188, $1DB5, $0188, $1DB6, $0188, $1DB7, $0188
dw $1DB8, $0188, $1DB9, $0188, $0188, $0188, $1D5E, $0188
dw $1D5F, $0188, $1D70, $0188, $1D71
dw $6165, $3900 ; VRAM $CAC2 | 58 bytes | Horizontal
dw $1CC2, $0188, $1CC3, $0188, $1CC4, $0188, $0188, $0188
dw $0188, $0188, $1DAA, $0188, $1DAB, $0188, $1DAC, $0188
dw $1DAD, $0188, $1DAE, $0188, $0188, $0188, $1D62, $0188
dw $1D63, $0188, $1D64, $0188, $1D65
dw $8165, $3900 ; VRAM $CB02 | 58 bytes | Horizontal
dw $1CD2, $0188, $1CD3, $0188, $1CD4, $0188, $0188, $0188
dw $0188, $0188, $1DBA, $0188, $1DBB, $0188, $1DBC, $0188
dw $1DBD, $0188, $1DBE, $0188, $0188, $0188, $1D72, $0188
dw $1D73, $0188, $1D74, $0188, $1D75
dw $A165, $3900 ; VRAM $CB42 | 58 bytes | Horizontal
dw $1CCA, $0188, $1CCB, $0188, $1CCC, $0188, $0188, $0188
dw $0188, $0188, $1DAF, $0188, $1DC0, $0188, $1DC1, $0188
dw $1DC2, $0188, $1DC3, $0188, $0188, $0188, $1D66, $0188
dw $1D67, $0188, $1D68, $0188, $1D69
dw $C165, $3900 ; VRAM $CB82 | 58 bytes | Horizontal
dw $1CDA, $0188, $1CDB, $0188, $1CDC, $0188, $0188, $0188
dw $0188, $0188, $1DBF, $0188, $1DD0, $0188, $1DD1, $0188
dw $1DD2, $0188, $1DD3, $0188, $0188, $0188, $1D76, $0188
dw $1D77, $0188, $1D78, $0188, $1D79
dw $E165, $3900 ; VRAM $CBC2 | 58 bytes | Horizontal
dw $1CE2, $0188, $1CE3, $0188, $1CE4, $0188, $0188, $0188
dw $0188, $0188, $1DC4, $0188, $1DC5, $0188, $1DC6, $0188
dw $1DC7, $0188, $1DC8, $0188, $0188, $0188, $1D6A, $0188
dw $1D6B, $0188, $1D6C, $0188, $1D6D
dw $0166, $3900 ; VRAM $CC02 | 58 bytes | Horizontal
dw $1CF2, $0188, $1CF3, $0188, $1CF4, $0188, $0188, $0188
dw $0188, $0188, $1DD4, $0188, $1DD5, $0188, $1DD6, $0188
dw $1DD7, $0188, $1DD8, $0188, $0188, $0188, $1D7A, $0188
dw $1D7B, $0188, $1D7C, $0188, $1D7D
; dw $2166, $3900 ; VRAM $CC42 | 58 bytes | Horizontal
; dw $1CEA, $0188, $1CEB, $0188, $1CEC, $0188, $0188, $0188
; dw $0188, $0188, $1DC9, $0188, $1DCA, $0188, $1DCB, $0188
; dw $1DCC, $0188, $1D86, $0188, $0188, $0188, $1D6E, $0188
; dw $1D6F, $0188, $1D80, $0188, $1D81
;
; dw $4166, $3900 ; VRAM $CC82 | 58 bytes | Horizontal
; dw $1CFA, $0188, $1CFB, $0188, $1CFC, $0188, $0188, $0188
; dw $0188, $0188, $1DD9, $0188, $1DDA, $0188, $1DDB, $0188
; dw $1DDC, $0188, $1D96, $0188, $0188, $0188, $1D7E, $0188
; dw $1D7F, $0188, $1D90, $0188, $1D91

Binary file not shown.

View File

@@ -0,0 +1,72 @@
dw $E164, $3900 ; VRAM $C9C2 | 58 bytes | Horizontal
dw $1CA2, $0188, $1CA3, $0188, $1CA4, $0188, $0188, $0188
dw $0188, $0188, $1DA0, $0188, $1DA1, $0188, $1DA2, $0188
dw $1DA3, $0188, $1DA4, $0188, $0188, $0188, $1D4A, $0188
dw $1D4B, $0188, $1D4C, $0188, $1D4D
dw $0165, $3900 ; VRAM $CA02 | 58 bytes | Horizontal
dw $1CB2, $0188, $1CB3, $0188, $1CB4, $0188, $0188, $0188
dw $0188, $0188, $1DB0, $0188, $1DB1, $0188, $1DB2, $0188
dw $1DB3, $0188, $1DB4, $0188, $0188, $0188, $1D5A, $0188
dw $1D5B, $0188, $1D5C, $0188, $1D5D
dw $2165, $3900 ; VRAM $CA42 | 58 bytes | Horizontal
dw $1CAA, $0188, $1CAB, $0188, $1CAC, $0188, $0188, $0188
dw $0188, $0188, $1DA5, $0188, $1DA6, $0188, $1DA7, $0188
dw $1DA8, $0188, $1DA9, $0188, $0188, $0188, $1D4E, $0188
dw $1D4F, $0188, $1D60, $0188, $1D61
dw $4165, $3900 ; VRAM $CA82 | 58 bytes | Horizontal
dw $1CBA, $0188, $1CBB, $0188, $1CBC, $0188, $0188, $0188
dw $0188, $0188, $1DB5, $0188, $1DB6, $0188, $1DB7, $0188
dw $1DB8, $0188, $1DB9, $0188, $0188, $0188, $1D5E, $0188
dw $1D5F, $0188, $1D70, $0188, $1D71
dw $6165, $3900 ; VRAM $CAC2 | 58 bytes | Horizontal
dw $1CC2, $0188, $1CC3, $0188, $1CC4, $0188, $0188, $0188
dw $0188, $0188, $1DAA, $0188, $1DAB, $0188, $1DAC, $0188
dw $1DAD, $0188, $1DAE, $0188, $0188, $0188, $1D62, $0188
dw $1D63, $0188, $1D64, $0188, $1D65
dw $8165, $3900 ; VRAM $CB02 | 58 bytes | Horizontal
dw $1CD2, $0188, $1CD3, $0188, $1CD4, $0188, $0188, $0188
dw $0188, $0188, $1DBA, $0188, $1DBB, $0188, $1DBC, $0188
dw $1DBD, $0188, $1DBE, $0188, $0188, $0188, $1D72, $0188
dw $1D73, $0188, $1D74, $0188, $1D75
dw $A165, $3900 ; VRAM $CB42 | 58 bytes | Horizontal
dw $1CCA, $0188, $1CCB, $0188, $1CCC, $0188, $0188, $0188
dw $0188, $0188, $1DAF, $0188, $1DC0, $0188, $1DC1, $0188
dw $1DC2, $0188, $1DC3, $0188, $0188, $0188, $1D66, $0188
dw $1D67, $0188, $1D68, $0188, $1D69
dw $C165, $3900 ; VRAM $CB82 | 58 bytes | Horizontal
dw $1CDA, $0188, $1CDB, $0188, $1CDC, $0188, $0188, $0188
dw $0188, $0188, $1DBF, $0188, $1DD0, $0188, $1DD1, $0188
dw $1DD2, $0188, $1DD3, $0188, $0188, $0188, $1D76, $0188
dw $1D77, $0188, $1D78, $0188, $1D79
dw $E165, $3900 ; VRAM $CBC2 | 58 bytes | Horizontal
dw $1CE2, $0188, $1CE3, $0188, $1CE4, $0188, $0188, $0188
dw $0188, $0188, $1DC4, $0188, $1DC5, $0188, $1DC6, $0188
dw $1DC7, $0188, $1DC8, $0188, $0188, $0188, $1D6A, $0188
dw $1D6B, $0188, $1D6C, $0188, $1D6D
dw $0166, $3900 ; VRAM $CC02 | 58 bytes | Horizontal
dw $1CF2, $0188, $1CF3, $0188, $1CF4, $0188, $0188, $0188
dw $0188, $0188, $1DD4, $0188, $1DD5, $0188, $1DD6, $0188
dw $1DD7, $0188, $1DD8, $0188, $0188, $0188, $1D7A, $0188
dw $1D7B, $0188, $1D7C, $0188, $1D7D
dw $2166, $3900 ; VRAM $CC42 | 58 bytes | Horizontal
dw $1CEA, $0188, $1CEB, $0188, $1CEC, $0188, $0188, $0188
dw $0188, $0188, $1DC9, $0188, $1DCA, $0188, $1DCB, $0188
dw $1DCC, $0188, $1D86, $0188, $0188, $0188, $1D6E, $0188
dw $1D6F, $0188, $1D80, $0188, $1D81
dw $4166, $3900 ; VRAM $CC82 | 58 bytes | Horizontal
dw $1CFA, $0188, $1CFB, $0188, $1CFC, $0188, $0188, $0188
dw $0188, $0188, $1DD9, $0188, $1DDA, $0188, $1DDB, $0188
dw $1DDC, $0188, $1D96, $0188, $0188, $0188, $1D7E, $0188
dw $1D7F, $0188, $1D90, $0188, $1D91

View File

@@ -0,0 +1,25 @@
dw $2362, $3900 ; VRAM $C446 | 58 bytes | Horizontal
dw $1C48, $0188, $1C49, $0188, $1C4A, $0188, $1C4B, $0188
dw $1C4C, $0188, $0188, $0188, $0188, $0188, $1CC5, $0188
dw $1CC6, $0188, $1CC7, $0188, $1CCD, $0188, $1CCE, $0188
dw $0188, $0188, $1CE8, $0188, $1CE9
dw $4362, $3900 ; VRAM $C486 | 58 bytes | Horizontal
dw $1C58, $0188, $1C59, $0188, $1C5A, $0188, $1C5B, $0188
dw $1C5C, $0188, $0188, $0188, $0188, $0188, $1CD5, $0188
dw $1CD6, $0188, $1CD7, $0188, $1CDD, $0188, $1CDE, $0188
dw $0188, $0188, $1CF8, $0188, $1CF9
dw $6362, $3900 ; VRAM $C4C6 | 58 bytes | Horizontal
dw $1C60, $0188, $1C61, $0188, $1C62, $0188, $1C63, $0188
dw $1C64, $0188, $0188, $0188, $0188, $0188, $1CCF, $0188
dw $1CE5, $0188, $1CE6, $0188, $1CE7, $0188, $1CED, $0188
dw $0188, $0188, $1D00, $0188, $1D01
dw $8362, $3900 ; VRAM $C506 | 58 bytes | Horizontal
dw $1C70, $0188, $1C71, $0188, $1C72, $0188, $1C73, $0188
dw $1C74, $0188, $0188, $0188, $0188, $0188, $1CDF, $0188
dw $1CF5, $0188, $1CF6, $0188, $1CF7, $0188, $1CFD, $0188
dw $0188, $0188, $1D10, $0188, $1D11

BIN
data/preloadedgfx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
data/skull.bin Normal file

Binary file not shown.

BIN
data/smallchars.2bpp Normal file

Binary file not shown.

61
data/textbytecharmap.txt Normal file
View File

@@ -0,0 +1,61 @@
'=9D
A=AA
B=AB
C=AC
D=AD
E=AE
F=AF
G=B0
H=B1
I=B2
J=B3
K=B4
L=B5
M=B6
N=B7
O=B8
P=B9
Q=BA
R=BB
S=BC
T=BD
U=BE
V=BF
W=C0
X=C1
Y=C2
Z=C3
?=C6
!=C7
,=C8
-=C9
.=CD
~=CE
a=D0
b=D1
c=D2
d=D3
e=D4
f=D5
g=D6
h=D7
i=D8
j=D9
k=DA
l=DB
m=DC
n=DD
o=DE
p=DF
q=E0
r=E1
s=E2
t=E3
u=E4
v=E5
w=E6
x=E7
y=E8
z=E9
:=EA
=FF

61
data/textwordcharmap.txt Normal file
View File

@@ -0,0 +1,61 @@
'=9D00
A=AA00
B=AB00
C=AC00
D=AD00
E=AE00
F=AF00
G=B000
H=B100
I=B200
J=B300
K=B400
L=B500
M=B600
N=B700
O=B800
P=B900
Q=BA00
R=BB00
S=BC00
T=BD00
U=BE00
V=BF00
W=C000
X=C100
Y=C200
Z=C300
?=C600
!=C700
,=C800
-=C900
.=CD00
~=CE00
a=D000
b=D100
c=D200
d=D300
e=D400
f=D500
g=D600
h=D700
i=D800
j=D900
k=DA00
l=DB00
m=DC00
n=DD00
o=DE00
p=DF00
q=E000
r=E100
s=E200
t=E300
u=E400
v=E500
w=E600
x=E700
y=E800
z=E900
:=EA00
=FF00

View File

@@ -0,0 +1,679 @@
;===================================================================================================
; Get the item's graphic from WRAM/ROM
; Bit 7 set indicates an explicit WRAM address
; Bit 7 reset indicates an offset into the ROM buffer
;===================================================================================================
;---------------------------------------------------------------------------------------------------
; Enters with A for parameter
;---------------------------------------------------------------------------------------------------
TransferItemReceiptToBuffer_using_GraphicsID:
PHP
PHB
REP #$30
PHX
PHY
SEP #$30
LDX.b #$00
.find_reverse
CMP.l ItemReceipts_graphics,X
BEQ .found
INX
BNE .find_reverse
.found
TXA
REP #$30
BRA ++
;===================================================================================================
TransferRupeesProperly:
PHP
PHB
REP #$31
PHX
PHY
AND.w #$00FF
SBC.w #$0023
XBA
LSR
LSR
LSR
ADC.w #BigDecompressionBuffer+$800
BRA TransferItemReceiptToBuffer_using_ExplicitBufferAddress
;===================================================================================================
TransferItemReceiptToBuffer_using_ReceiptID:
PHP : PHB
REP #$30
PHX : PHY
++ AND.w #$00FF
ASL : TAX
LDA.l BusyItem : BNE +
LDA.l StandingItemGraphicsOffsets,X
BRA .have_address
+
LDA.l ItemReceiptGraphicsOffsets,X
.have_address
BMI TransferItemReceiptToBuffer_using_ExplicitBufferAddress
.rom_address
ADC.w #ItemReceiptGraphicsROM
PHK
BRA .continue
#TransferItemReceiptToBuffer_using_ExplicitBufferAddress:
PEA.w $7F7F
PLB
.continue
PLB
TAY
LDX.w #62
.next_write
LDA.w $003E,Y
STA.l ItemGetGFX+$00,X
LDA.w $023E,Y
STA.l ItemGetGFX+$40,X
DEY
DEY
DEX
DEX
BPL .next_write
REP #$30
PLY
PLX
PLB
PLP
RTL
;===================================================================================================
TransferItemToVRAM:
REP #$21
SEP #$10
LDA.w ItemGFXPtr
BEQ .exit
BMI .wram_address
.rom_address
ADC.w #ItemReceiptGraphicsROM
LDX.b #ItemReceiptGraphicsROM>>16
.set_address
STA.w $4302
ADC.w #$0200
STA.w $4312
STX.w $4304
STX.w $4314
LDX.b #$80
STX.w $2115
LDA.w #$1801
STA.w $4300
STA.w $4310
LDA.w #$0040
STA.w $4305
STA.w $4315
LDA.w ItemGFXTarget
STA.w $2116
LDX.b #$01
STX.w DMAENABLE
ADC.w #$0100
STA.w $2116
INX
STX.w DMAENABLE
STZ.w ItemGFXPtr
STZ.w ItemGFXTarget
.exit
RTL
.wram_address
LDX.b #$7F
BRA .set_address
;===================================================================================================
; Decompress everything at the start of the game
;===================================================================================================
DecompBufferOffset = $18
DecompTestByte = $04
DecompCommand = $02
DecompSize = $00
DecompTileCount = $1A
DecompSaveY = $1A
Decomp3BPPScratch = $20
;===================================================================================================
DecompressAllItemGraphics:
PHP
PHB
PHD
REP #$38
; Stack change for safety
TSX
LDA.w #$1400
TCS
PHX
; direct page change for speed
LDA.w #$1200
TCD
STZ.b DecompBufferOffset
SEP #$34
STA.l $4200 ; already 0 from the LDA above
LDX.b #$5D+$73 : JSR AddGfxSheetToBigBuffer
LDX.b #$5C+$73 : JSR AddGfxSheetToBigBuffer
LDX.b #$5B+$73 : JSR AddGfxSheetToBigBuffer
LDX.b #$5A+$73 : JSR AddGfxSheetToBigBuffer
JSR AddCherryPickGfxToBigBuffer
LDX.b #$01 : STX.w $06FA
LDX.b #$06+$73 : JSR AddGfxSheetToBigBuffer
LDX.b #$07+$73 : JSR AddGfxSheetToBigBuffer
REP #$30
PLX
TXS
SEP #$20
LDA.b #$81
STA.l $4200
PLD
PLB
PLP
RTL
;===================================================================================================
AddGfxSheetToBigBuffer:
SEP #$30
LDA.l GFXSheetPointers_background_bank,X : PHA : PLB
LDA.l GFXSheetPointers_background_high,X : XBA
LDA.l GFXSheetPointers_background_low,X
CPX.b #$73 : !BLT FastSpriteDecomp
CPX.b #$73+$0C : !BGE FastSpriteDecomp
.uncompressed
JMP Direct3BPPConvert
;===================================================================================================
; I normally hate macros like this... but I don't feel like constantly rewriting this
;===================================================================================================
macro GetNextByte()
LDA.w $0000,Y
INY
BNE ?++
; Y pulls more than it needs, but that's fine
; the high byte should only be affected if we somehow have FF as our bank
; and if that happens, we have other problems
PHB
PLY
INY
PHY
PLB
LDY.w #$8000
?++
endmacro
;===================================================================================================
; There's no long vanilla routine, and we're going to make heavy use of this
; so might as well rewrite it to be fast
;===================================================================================================
FastSpriteDecomp:
REP #$10
TAY
LDX.w #$0000
.next_command
%GetNextByte()
CMP.b #$FF
BNE .continue
;---------------------------------------------------------------------------------------------------
JMP Unrolled3BPPConvert
;---------------------------------------------------------------------------------------------------
.continue
CMP.b #$E0
BCS .expanded
STA.b DecompTestByte
REP #$20
AND.w #$001F
BRA .normal
;---------------------------------------------------------------------------------------------------
; Putting some commands up here for branch distance
;---------------------------------------------------------------------------------------------------
.nonrepeating
REP #$21
TYA
ADC.b DecompSize
ORA.w #$8000
STA.b DecompSize
SEP #$20
.next_nonrepeating
%GetNextByte()
STA.l DecompBuffer2,X
INX
CPY.b DecompSize
BNE .next_nonrepeating
BRA .next_command
;---------------------------------------------------------------------------------------------------
.repeating
%GetNextByte()
STY.b DecompSaveY
LDY.b DecompSize
.next_repeating
STA.l DecompBuffer2,X
INX
DEY
BNE .next_repeating
LDY.b DecompSaveY
BRA .next_command
;---------------------------------------------------------------------------------------------------
; Rest of command handling
;---------------------------------------------------------------------------------------------------
.expanded
STA.b DecompCommand
ASL
ASL
ASL
STA.b DecompTestByte
LDA.b DecompCommand
AND.b #$03
XBA
%GetNextByte()
REP #$20
;---------------------------------------------------------------------------------------------------
.normal
INC
STA.b DecompSize
SEP #$20
LDA.b DecompTestByte
AND.b #$E0
BEQ .nonrepeating
BMI .copy
ASL
BPL .repeating
ASL
BPL .repeating_word
;---------------------------------------------------------------------------------------------------
.incremental
%GetNextByte()
STY.b DecompSaveY
LDY.b DecompSize
.next_incremental
STA.l DecompBuffer2,X
INC
INX
DEY
BNE .next_incremental
LDY.b DecompSaveY
JMP .next_command
;---------------------------------------------------------------------------------------------------
.repeating_word
JSR .get_next_word
REP #$20
STY.b DecompSaveY
LDY.b DecompSize
DEY
.next_word
STA.l DecompBuffer2,X
INX
INX
DEY
DEY
BPL .next_word
INY
BEQ .not_too_far
DEX
.not_too_far
SEP #$20
LDY.b DecompSaveY
JMP .next_command
;---------------------------------------------------------------------------------------------------
.copy
JSR .get_next_word
STY.b DecompSaveY
TAY
LDA.b DecompSize
BNE ++
DEC.b DecompSize+1
++ PHB
LDA.b #$7F
PHA
PLB
.next_copy
LDA.w DecompBuffer2,Y
STA.w DecompBuffer2,X
INX
INY
DEC.b DecompSize+0
BNE .next_copy
DEC.b DecompSize+1
BPL .next_copy
PLB
LDY.b DecompSaveY
JMP .next_command
;---------------------------------------------------------------------------------------------------
; These are only used once per command, so I'm fine with letting them be a JSR I guess
;---------------------------------------------------------------------------------------------------
.get_next_word
%GetNextByte()
XBA
%GetNextByte()
XBA
RTS
;===================================================================================================
; More macros, because lazy
;===================================================================================================
macro DoPlanesA(offset)
LDA.w DecompBuffer2+<offset>+<offset>,Y
STA.w BigDecompressionBuffer+<offset>+<offset>,X
ORA.w DecompBuffer2+<offset>+<offset>-1,Y
AND.w #$FF00
STA.b Decomp3BPPScratch
LDA.w DecompBuffer2+$10+<offset>,Y
AND.w #$00FF
TSB.b Decomp3BPPScratch
XBA
ORA.b Decomp3BPPScratch
PHY
LDY.w $06FA : BEQ +
AND.w #$00FF ; idk why this line works but some sheets we pull in aren't correct without it
+
PLY
STA.w BigDecompressionBuffer+$10+<offset>+<offset>,X
endmacro
;===================================================================================================
macro DoIndirectPlanesA(offset)
LDA.b Scrap00 : ADC.w #<offset>+<offset> : STA.b Scrap02
LDA.b (Scrap02),Y
STA.l BigDecompressionBuffer+<offset>+<offset>,X
DEC.b Scrap02
ORA.b (Scrap02),Y
AND.w #$FF00
STA.b Decomp3BPPScratch
LDA.b Scrap00 : ADC.w #$10+<offset> : STA.b Scrap02
LDA.b (Scrap02),Y
AND.w #$00FF
TSB.b Decomp3BPPScratch
XBA
ORA.b Decomp3BPPScratch
PHY
LDY.w $06FA : BEQ +
AND.w #$00FF ; idk why this line works but some sheets we pull in aren't correct without it
+
PLY
STA.l BigDecompressionBuffer+$10+<offset>+<offset>,X
endmacro
;===================================================================================================
Direct3BPPConvert:
REP #$31
STA.b Scrap00
LDY.w #$0000
LDX.b DecompBufferOffset
.next_3bpp_tile
%DoIndirectPlanesA(0) ; 8 times
%DoIndirectPlanesA(1)
%DoIndirectPlanesA(2)
%DoIndirectPlanesA(3)
%DoIndirectPlanesA(4)
%DoIndirectPlanesA(5)
%DoIndirectPlanesA(6)
%DoIndirectPlanesA(7)
; carry will always be clear
; don't worry
TXA
ADC.w #32
TAX
; just trust me
TYA
ADC.w #24
TAY
CMP.w #24*64
BCS .done
JMP .next_3bpp_tile
.done
STX.b DecompBufferOffset
SEP #$30
RTS
;===================================================================================================
Unrolled3BPPConvert:
LDA.b #$7F
PHA
PLB
REP #$21
LDY.w #$0000
LDX.b DecompBufferOffset
.next_3bpp_tile
%DoPlanesA(0) ; 8 times
%DoPlanesA(1)
%DoPlanesA(2)
%DoPlanesA(3)
%DoPlanesA(4)
%DoPlanesA(5)
%DoPlanesA(6)
%DoPlanesA(7)
; carry will always be clear
; don't worry
TXA
ADC.w #32
TAX
; just trust me
TYA
ADC.w #24
TAY
CMP.w #24*64
BCS .done
JMP .next_3bpp_tile
.done
STX.b DecompBufferOffset
SEP #$30
RTS
;===================================================================================================
macro CherryPickGfx(source,dest,length)
LDX.w #BigDecompressionBuffer+<source>
LDY.w #BigDecompressionBuffer+<dest>
LDA.w #<length>-1
MVN BigDecompressionBuffer>>16,BigDecompressionBuffer>>16
LDX.w #BigDecompressionBuffer+<source>+$200
LDY.w #BigDecompressionBuffer+<dest>+$200
LDA.w #<length>-1
MVN BigDecompressionBuffer>>16,BigDecompressionBuffer>>16
endmacro
;===================================================================================================
AddCherryPickGfxToBigBuffer:
; this is mostly to load and rearrange follower gfx to save on space
; assumes DecompBufferOffset left off at $A000 (#BigDecompressionBuffer+$2000)
; adjustments will be needed if anything prior to this changes
LDX.b #$01 : STX.w $06FA
LDX.b #$35+$73 : JSR AddGfxSheetToBigBuffer
LDX.b #$55+$73 : JSR AddGfxSheetToBigBuffer
REP #$30
%CherryPickGfx($2400,$2140,$40) ; move old man head
%CherryPickGfx($2D40,$20C0,$40) ; move zelda body
LDA.b DecompBufferOffset : SEC : SBC.w #$0C00 : STA.b DecompBufferOffset
SEP #$30
LDX.b #$11+$73 : JSR AddGfxSheetToBigBuffer
LDX.b #$15+$73 : JSR AddGfxSheetToBigBuffer
REP #$30
%CherryPickGfx($2940,$2180,$80) ; move locksmith head/body
%CherryPickGfx($2D00,$0440,$40) ; move frog
%CherryPickGfx($31C0,$0500,$40) ; move purple chest
LDA.b DecompBufferOffset : SEC : SBC.w #$1000 : STA.b DecompBufferOffset
SEP #$30
LDX.b #$59+$73 : JSR AddGfxSheetToBigBuffer
LDX.b #$58+$73 : JSR AddGfxSheetToBigBuffer
REP #$30
%CherryPickGfx($2880,$0480,$40) ; move kiki head
%CherryPickGfx($2900,$04C0,$40) ; move kiki body
%CherryPickGfx($30C0,$0540,$40) ; move big bomb
%CherryPickGfx($2C40,$0180,$40) ; move duck
LDA.b DecompBufferOffset : SEC : SBC.w #$1000 : STA.b DecompBufferOffset
SEP #$30
LDX.b #$4D+$73 : JSR AddGfxSheetToBigBuffer
LDX.b #$50+$73 : JSR AddGfxSheetToBigBuffer
REP #$30
%CherryPickGfx($2880,$0580,$40) ; move smith
%CherryPickGfx($3140,$0140,$40) ; move chicken
LDA.b DecompBufferOffset : SEC : SBC.w #$1000 : STA.b DecompBufferOffset
SEP #$30
STZ.w $06FA
RTS

View File

@@ -1,13 +1,10 @@
!CryptoBuffer = "$7F5100"
;!keyBase = "$7F50D0"
;--------------------------------------------------------------------------------
LoadStaticDecryptionKey:
PHB : PHA : PHX : PHY : PHP
REP #$30 ; set 16-bit accumulator & index registers
LDX.w #StaticDecryptionKey ; Source
LDY.w #!keyBase ; Target
LDY.w #KeyBase ; Target
LDA.w #$000F ; Length
MVN $307F
@@ -23,70 +20,68 @@ RetrieveValueFromEncryptedTable:
;Returns result in A
PHX : PHY
PHA
LDY $04 : PHY : LDY $06 : PHY : LDY $08 : PHY
LDY $0A : PHY : LDY $0C : PHY : LDY $0E : PHY
LDY.b Scrap04 : PHY : LDY.b Scrap06 : PHY : LDY.b Scrap08 : PHY
LDY.b Scrap0A : PHY : LDY.b Scrap0C : PHY : LDY.b Scrap0E : PHY
AND.w #$FFF8 : TAY
LDA [$00], Y : STA.l !CryptoBuffer : INY #2
LDA [$00], Y : STA.l !CryptoBuffer+2 : INY #2
LDA [$00], Y : STA.l !CryptoBuffer+4 : INY #2
LDA [$00], Y : STA.l !CryptoBuffer+6
LDA.b [Scrap00], Y : STA.l CryptoBuffer : INY #2
LDA.b [Scrap00], Y : STA.l CryptoBuffer+2 : INY #2
LDA.b [Scrap00], Y : STA.l CryptoBuffer+4 : INY #2
LDA.b [Scrap00], Y : STA.l CryptoBuffer+6
LDA.w #$0002 : STA $04 ;set block size
LDA.w #$0002 : STA.b Scrap04 ;set block size
JSL.l XXTEA_Decode
JSL XXTEA_Decode
PLA : STA $0E : PLA : STA $0C : PLA : STA $0A
PLA : STA $08 : PLA : STA $06 : PLA : STA $04
PLA : STA.b Scrap0E : PLA : STA.b Scrap0C : PLA : STA.b Scrap0A
PLA : STA.b Scrap08 : PLA : STA.b Scrap06 : PLA : STA.b Scrap04
PLA : AND.w #$0007 : TAX
LDA.l !CryptoBuffer, X
LDA.l CryptoBuffer, X
PHA
LDA.w #$0000
STA.l !CryptoBuffer
STA.l !CryptoBuffer+2
STA.l !CryptoBuffer+4
STA.l !CryptoBuffer+6
STA.l CryptoBuffer
STA.l CryptoBuffer+2
STA.l CryptoBuffer+4
STA.l CryptoBuffer+6
PLA
PLY : PLX
RTL
;--------------------------------------------------------------------------------
!ChestData = "$01E96C"
!ChestData_Payload = "$1EABC" ; !ChestData+$0150
ChestData = $01E96C
ChestDataPayload = $01EABC ; ChestData+$0150
;--------------------------------------------------------------------------------
GetChestData:
LDA.l IsEncrypted : BNE .encrypted
INC $0E : LDX.w #$FFFD ; what we wrote over
JML.l Dungeon_OpenKeyedObject_nextChest
INC.b Scrap0E : LDX.w #$FFFD ; what we wrote over
JML Dungeon_OpenKeyedObject_nextChest
.encrypted
INC $0E : LDX.w #$FFFE
INC.b Scrap0E : LDX.w #$FFFE
.nextChest
INX #2 : CPX.w #$0150 : BEQ .couldntFindChest
LDA !ChestData, X : AND.w #$7FFF : CMP $A0 : BNE .nextChest
LDA.l ChestData, X : AND.w #$7FFF : CMP.b RoomIndex : BNE .nextChest
DEC $0E : BNE .nextChest
DEC.b Scrap0E : BNE .nextChest
LDA $00 : PHA : LDA $02 : PHA
LDA.b Scrap00 : PHA : LDA.b Scrap02 : PHA
LDA.w #!ChestData_Payload : STA $00
LDA.w #!ChestData_Payload>>16 : STA $02
LDA.w #ChestDataPayload : STA.b Scrap00
LDA.w #ChestDataPayload>>16 : STA.b Scrap02
TXA : LSR
JSL RetrieveValueFromEncryptedTable
STA $0C
STA.b Scrap0C
PLA : STA $02 : PLA : STA $00
PLA : STA.b Scrap02 : PLA : STA.b Scrap00
LDA !ChestData, X : ASL A : BCC .smallChest
LDA.l ChestData, X : ASL A : BCC .smallChest
JML.l Dungeon_OpenKeyedObject_bigChest ;(bank01.asm line #13783)
JML Dungeon_OpenKeyedObject_bigChest ;(bank01.asm line #13783)
.smallChest
JML.l Dungeon_OpenKeyedObject_smallChest
JML Dungeon_OpenKeyedObject_smallChest
.couldntFindChest
JML.l Dungeon_OpenKeyedObject_couldntFindChest
JML Dungeon_OpenKeyedObject_couldntFindChest
;--------------------------------------------------------------------------------

View File

@@ -2,200 +2,161 @@
; Dialog Pointer Override
;--------------------------------------------------------------------------------
DialogOverride:
LDA $7F5035 : BEQ .skip
LDA $7F5700, X ; use alternate buffer
LDA.l AltTextFlag : BEQ .skip
LDA.l DialogBuffer, X ; use alternate buffer
RTL
.skip
LDA $7F1200, X
LDA.l DecompressionBuffer+$1200, X
RTL
;--------------------------------------------------------------------------------
; $7F5035 - Alternate Text Pointer Flag ; 0=Disable
; $7F5036 - Padding Byte (Must be Zero)
; $7F5700 - $7F57FF - Dialog Buffer
;--------------------------------------------------------------------------------
ResetDialogPointer:
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
LDA.b #$00 : STA $7F5035 ; zero out the alternate flag
LDA.b #$1C : STA $1CE9 ; thing we wrote over
STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer
LDA.b #$00 : STA.l AltTextFlag ; zero out the alternate flag
LDA.b #$1C : STA.w DelayTimer ; thing we wrote over
RTL
;--------------------------------------------------------------------------------
;macro LoadDialog(index,table)
; PHA : PHX : PHY
; PHB : PHK : PLB
; LDA $00 : PHA
; LDA $01 : PHA
; LDA $02 : PHA
; LDA.b #$01 : STA $7F5035 ; set flag
;
; LDA <index> : ASL : !ADD.l <index> : TAX ; get quote offset *3, move to X
; LDA <table>, X : STA $00 ; write pointer to direct page
; LDA <table>+1, X : STA $01
; LDA <table>+2, X : STA $02
;
; LDX.b #$00 : LDY.b #$00
; -
; LDA [$00], Y ; load the next character from the pointer
; STA $7F5700, X ; write to the buffer
; INX : INY
; CMP.b #$7F : BNE -
; PLA : STA $02
; PLA : STA $01
; PLA : STA $00
; PLB
; PLY : PLX : PLA
;endmacro
;--------------------------------------------------------------------------------
;macro LoadDialogAddress(address)
; PHA : PHX : PHY
; PHP
; PHB : PHK : PLB
; SEP #$30 ; set 8-bit accumulator and index registers
; LDA $00 : PHA
; LDA $01 : PHA
; LDA $02 : PHA
; LDA.b #$01 : STA $7F5035 ; set flag
;
; LDA.b #<address> : STA $00 ; write pointer to direct page
; LDA.b #<address>>>8 : STA $01
; LDA.b #<address>>>16 : STA $02
;
; LDX.b #$00 : LDY.b #$00
; -
; LDA [$00], Y ; load the next character from the pointer
; STA $7F5700, X ; write to the buffer
; INX : INY
; CMP.b #$7F : BNE -
; PLA : STA $02
; PLA : STA $01
; PLA : STA $00
; PLB
; PLP
; PLY : PLX : PLA
;endmacro
;--------------------------------------------------------------------------------
!OFFSET_POINTER = "$7F5094"
!OFFSET_RETURN = "$7F5096"
!DIALOG_BUFFER = "$7F5700"
macro LoadDialogAddress(address)
PHA : PHX : PHY
PHP
PHB : PHK : PLB
SEP #$20 ; set 8-bit accumulator
REP #$10 ; set 16-bit index registers
PEI ($00)
LDA $02 : PHA
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
LDA.b #$01 : STA $7F5035 ; set flag
PEI.b (Scrap00)
LDA.b Scrap02 : PHA
STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer
LDA.b #$01 : STA.l AltTextFlag ; set flag
%CopyDialog(<address>)
PLA : STA $02
PLA : STA.b Scrap02
REP #$20
PLA : STA $00
PLA : STA.b Scrap00
PLB
PLP
PLY : PLX : PLA
endmacro
;--------------------------------------------------------------------------------
macro CopyDialog(address)
LDA.b #<address> : STA $00 ; write pointer to direct page
LDA.b #<address>>>8 : STA $01
LDA.b #<address>>>16 : STA $02
LDA.b #<address> : STA.b Scrap00 ; write pointer to direct page
LDA.b #<address>>>8 : STA.b Scrap01
LDA.b #<address>>>16 : STA.b Scrap02
%CopyDialogIndirect()
endmacro
;--------------------------------------------------------------------------------
macro CopyDialogIndirect()
REP #$20 : LDA !OFFSET_POINTER : TAX : LDY.w #$0000 : SEP #$20 ; copy 2-byte offset pointer to X and set Y to 0
REP #$20 : LDA.l DialogOffsetPointer : TAX : LDY.w #$0000 : SEP #$20 ; copy 2-byte offset pointer to X and set Y to 0
?loop:
LDA [$00], Y ; load the next character from the pointer
STA !DIALOG_BUFFER, X ; write to the buffer
LDA.b [Scrap00], Y ; load the next character from the pointer
STA.l DialogBuffer, X ; write to the buffer
INX : INY
CMP.b #$7F : BNE ?loop
REP #$20 ; set 16-bit accumulator
TXA : INC : STA !OFFSET_RETURN ; copy out X into
LDA.w #$0000 : STA !OFFSET_POINTER
TXA : INC : STA.l DialogReturnPointer ; copy out X into
LDA.w #$0000 : STA.l DialogOffsetPointer
SEP #$20 ; set 8-bit accumulator
endmacro
;--------------------------------------------------------------------------------
LoadDialogAddressIndirect:
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
LDA.b #$01 : STA $7F5035 ; set flag
STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer
LDA.b #$01 : STA.l AltTextFlag ; set flag
%CopyDialogIndirect()
;%LoadDialogAddress(UncleText)
RTL
;--------------------------------------------------------------------------------
!ITEM_TEMPORARY = "$7F5040"
FreeDungeonItemNotice:
STA !ITEM_TEMPORARY
STA.l ScratchBufferV
PHA : PHX : PHY
PHP
PHB : PHK : PLB
SEP #$20 ; set 8-bit accumulator
REP #$10 ; set 16-bit index registers
PEI ($00)
LDA $02 : PHA
PHA : PHX : PHY
PHP
PHB : PHK : PLB
SEP #$20 ; set 8-bit accumulator
REP #$10 ; set 16-bit index registers
PEI.b (Scrap00)
LDA.b Scrap02 : PHA
LDA.l ScratchBufferNV : PHA
LDA.l ScratchBufferNV+1 : PHA
;--------------------------------
LDA.l FreeItemText : BNE + : JMP .skip : +
LDA #$00 : STA $7F5010 ; initialize scratch
LDA.b #$00 : STA.l ScratchBufferNV ; initialize scratch
LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for general small key
LDA !ITEM_TEMPORARY : CMP.b #$24 : BNE + ; general small key
LDA.l ScratchBufferV : CMP.b #$24 : BNE + ; general small key
%CopyDialog(Notice_SmallKeyOf)
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
%CopyDialog(Notice_Self)
JMP .done
+ : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for general compass
LDA !ITEM_TEMPORARY : CMP.b #$25 : BNE + ; general compass
LDA.l ScratchBufferV : CMP.b #$25 : BNE + ; general compass
%CopyDialog(Notice_CompassOf)
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
%CopyDialog(Notice_Self)
JMP .done
+ : LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for general map
LDA !ITEM_TEMPORARY : CMP.b #$33 : BNE + ; general map
LDA.l ScratchBufferV : CMP.b #$33 : BNE + ; general map
%CopyDialog(Notice_MapOf)
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
%CopyDialog(Notice_Self)
JMP .done
+ : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for general big key
LDA !ITEM_TEMPORARY : CMP.b #$32 : BNE + ; general big key
LDA.l ScratchBufferV : CMP.b #$32 : BNE + ; general big key
%CopyDialog(Notice_BigKeyOf)
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
%CopyDialog(Notice_Self)
JMP .done
+
LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for dungeon map
LDA !ITEM_TEMPORARY : AND.b #$F0 ; looking at high bits only
LDA.l ScratchBufferV : AND.b #$F0 ; looking at high bits only
CMP.b #$70 : BNE + ; map of...
%CopyDialog(Notice_MapOf)
JMP .dungeon
+ : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for dungeon compass
LDA !ITEM_TEMPORARY : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of...
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of...
%CopyDialog(Notice_CompassOf)
JMP .dungeon
+ : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for dungeon big key
LDA !ITEM_TEMPORARY : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of...
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of...
%CopyDialog(Notice_BigKeyOf)
BRA .dungeon
JMP .dungeon
+ : LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for dungeon small key
LDA !ITEM_TEMPORARY : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of...
LDA !ITEM_TEMPORARY : CMP.b #$AF : BNE ++ : JMP .skip : ++
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of...
LDA.l ScratchBufferV : CMP.b #$AF : BNE ++ : JMP .skip : ++
%CopyDialog(Notice_SmallKeyOf)
PLA : AND.b #$0F : STA $7F5020 : LDA.b #$0F : !SUB $7F5020 : PHA
LDA #$01 : STA $7F5010 ; set up a flip for small keys
LDA.b #$01 : STA.l ScratchBufferNV ; set up a flip for small keys
BRA .dungeon
+
+ : LDA.l FreeItemText : AND.b #$20 : BEQ + ; show message for crystal
LDA.l ScratchBufferV : CMP.b #$B0 : !BLT + ; crystal #
CMP.b #$B7 : !BGE +
%CopyDialog(Notice_Crystal)
JMP .crystal
+
JMP .skip ; it's not something we are going to give a notice for
.dungeon
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
LDA !ITEM_TEMPORARY
AND.b #$0F ; looking at low bits only
STA $7F5011
LDA $7F5010 : BEQ +
LDA $7F5010
LDA #$0F : !SUB $7F5011 : STA $7F5011 ; flip the values for small keys
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
LDA.l ScratchBufferV
AND.b #$0F
STA.l ScratchBufferNV+1
LDA.l ScratchBufferNV : BEQ +
LDA.l ScratchBufferNV
LDA.b #$0F : !SUB.l ScratchBufferNV+1 : STA.l ScratchBufferNV+1 ; flip the values for small keys
+
LDA $7F5011
LDA.l ScratchBufferNV+1
ASL : TAX
REP #$20
LDA.l DungeonItemIDMap,X : CMP.w #$0003 : BCC .hc_sewers
CMP.w DungeonID : BNE +
BRA .self_notice
.hc_sewers
LDA.w DungeonID : CMP.w #$0003 : BCS +
.self_notice
SEP #$20
LDA.l FreeItemText : AND.b #$40 : BEQ ++
LDA.b #$00 : STA.l DialogOffsetPointer : STA.l DialogOffsetPointer+1
JMP .skip
++
%CopyDialog(Notice_Self)
JMP .done
+
SEP #$20
LDA.l ScratchBufferNV+1
CMP.b #$00 : BNE + ; ...light world
%CopyDialog(Notice_LightWorld) : JMP .done
+ : CMP.b #$01 : BNE + ; ...dark world
@@ -223,38 +184,61 @@ FreeDungeonItemNotice:
+ : CMP.b #$0C : BNE + ; ...desert palace
%CopyDialog(Notice_Desert) : JMP .done
+ : CMP.b #$0D : BNE + ; ...eastern palace
%CopyDialog(Notice_Eastern) : BRA .done
%CopyDialog(Notice_Eastern) : JMP .done
+ : CMP.b #$0E : BNE + ; ...hyrule castle
%CopyDialog(Notice_Castle) : BRA .done
%CopyDialog(Notice_Castle) : JMP .done
+ : CMP.b #$0F : BNE + ; ...sewers
%CopyDialog(Notice_Sewers)
+
JMP .done
.crystal
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
LDA.l ScratchBufferV
AND.b #$0F ; looking at low bits only
CMP.b #$00 : BNE +
%CopyDialog(Notice_Six) : JMP .done
+ : CMP.b #$01 : BNE +
%CopyDialog(Notice_One) : JMP .done
+ : CMP.b #$02 : BNE +
%CopyDialog(Notice_Five) : JMP .done
+ : CMP.b #$03 : BNE +
%CopyDialog(Notice_Seven) : JMP .done
+ : CMP.b #$04 : BNE +
%CopyDialog(Notice_Two) : JMP .done
+ : CMP.b #$05 : BNE +
%CopyDialog(Notice_Four) : JMP .done
+ : CMP.b #$06 : BNE +
%CopyDialog(Notice_Three) : JMP .done
+
.done
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
LDA.b #$01 : STA $7F5035 ; set alternate dialog flag
STA $7F509F
STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer
LDA.b #$01 : STA.l AltTextFlag ; set alternate dialog flag
STA.l TextBoxDefer
;--------------------------------
.skip
PLA : STA $02
REP #$20
PLA : STA $00
PLB
PLP
PLY : PLX : PLA
;JSL.l Main_ShowTextMessage_Alt ; .skip can be here so long as this line remains commented out
PLA : STA.l ScratchBufferNV+1
PLA : STA.l ScratchBufferNV
PLA : STA.b Scrap02
REP #$20
PLA : STA.b Scrap00
PLB
PLP
PLY : PLX : PLA
RTL
;--------------------------------------------------------------------------------
DialogResetSelectionIndex:
JSL.l Attract_DecompressStoryGfx ; what we wrote over
STZ $1CE8
JSL Attract_DecompressStoryGfx ; what we wrote over
STZ.w MessageCursor
RTL
;--------------------------------------------------------------------------------
DialogItemReceive:
BCS .nomessage ; if doubling the item value overflowed it must be a rando item
CPY #$98 : BCC ++ ;if the item is $4C or greater it must be a rando item
CPY.b #$98 : BCC ++ ;if the item is $4C or greater it must be a rando item
.nomessage
LDA.w #$FFFF
@@ -267,10 +251,11 @@ RTL
;--------------------------------------------------------------------------------
DialogFairyThrow:
LDA.l Restrict_Ponds : BEQ .normal
LDA BottleContentsOne
ORA BottleContentsTwo : ORA BottleContentsThree : ORA BottleContentsFour : BNE .normal
LDA.l BottleContentsOne
ORA.l BottleContentsTwo : ORA.l BottleContentsThree : ORA.l BottleContentsFour : BNE .normal
.noInventory
LDA $0D80, X : !ADD #$08 : STA $0D80, X
LDA.w SpriteActivity, X : !ADD.b #$08 : STA.w SpriteActivity, X
LDA.b #$51
LDY.b #$01
RTL
@@ -280,17 +265,14 @@ RTL
RTL
;--------------------------------------------------------------------------------
DialogGanon1:
JSL.l CheckGanonVulnerability
LDA.b #$01 : JSL CheckConditionPass
REP #$20
LDA.w #$018C
BCC +
JSL CheckMushroom
LDA.w #$016D
BCC +
LDA.w #$0197
+ STA $1CF0
+ STA.w TextID
SEP #$20
JSL.l Sprite_ShowMessageMinimal_Alt
JSL Sprite_ShowMessageMinimal_Alt
RTL
;--------------------------------------------------------------------------------
; #$0192 - no bow
@@ -302,79 +284,82 @@ RTL
; s = silver arrow bow
; p = 2nd progressive bow
DialogGanon2:
JSL.l CheckGanonVulnerability
LDA.b #$01 : JSL CheckConditionPass
REP #$20
BCS +
LDA.w #$018D : JMP .done
+
JSL CheckMushroom
BCC +
LDA.w #$0198 : JMP .done
+
LDA.l GanonVulnerabilityItem : AND #$00FF : BNE .special_item
LDA.l SpecialWeapons : AND.w #$00FF
CMP.w #$0001 : BEQ .bombs ; bombs if special bomb mode
.silver_arrows
LDA.l BowTracking
LDA.l GanonVulnerabilityItem : AND.w #$00FF
BEQ .silver_arrows
CMP.w #$0001 : BEQ .silver_arrows
CMP.w #$0004 : BEQ .bombs
CMP.w #$0005 : BEQ .powder
CMP.w #$0010 : BEQ .bee
BIT.w #$0080 : BNE + ; branch if bow
LDA.w #$0192 : JMP .done
+
BIT.w #$0040 : BEQ + ; branch if no silvers
LDA.w #$0195 : JMP .done
+
BIT.w #$0020 : BNE + ; branch if p bow
LDA.w #$0194 : JMP .done
+
BIT.w #$0080 : BEQ + ; branch if no bow
LDA.w #$0193 : JMP .done
+
LDA.w #$016E : JMP .done
.special_item
CMP.w #$0001 : BEQ .silver_arrows
CMP.w #$0004 : BEQ .bombs
CMP.w #$0005 : BEQ .powder
CMP.w #$0010 : BEQ .bee
PHX : TAX
LDA.l EquipmentWRAM-1, X : PLX : AND #$00FF : BNE +
LDA.w #$0192 : JMP .done
+
LDA.w #$0195 : BRA .done
.bombs
LDA.l BombsEquipment : AND #$00FF : BNE +
LDA.l InfiniteBombsModifier : AND #$00FF : BNE + ; check for infinite bombs
LDA.w #$0192 : BRA .done
+
LDA.w #$0195 : BRA .done
.powder
LDA.l InventoryTracking : AND #$0010 : BNE + ; check for powder
LDA.w #$0192 : BRA .done
+
LDA.w #$0195 : BRA .done
.bee
LDA.l BottleContentsOne : AND #$00FF : CMP.w #$0007 : BEQ + : CMP.w #$0008 : BEQ +
LDA.l BottleContentsTwo : AND #$00FF : CMP.w #$0007 : BEQ + : CMP.w #$0008 : BEQ +
LDA.l BottleContentsThree : AND #$00FF : CMP.w #$0007 : BEQ + : CMP.w #$0008 : BEQ +
LDA.l BottleContentsFour : AND #$00FF : CMP.w #$0007 : BEQ + : CMP.w #$0008 : BEQ +
LDA.w #$0192 : BRA .done
+
LDA.w #$0195 : BRA .done
.done
STA $1CF0
PHX : TAX
LDA.l EquipmentWRAM-1, X
PLX
AND.w #$00FF : BNE .have
BRA .dont_have
.silver_arrows
LDA.l BowTracking
BIT.w #$0080 : BEQ .dont_have ; no bow
BIT.w #$0040 : BNE .have ; have silvers
BIT.w #$0020 : BNE +
LDA.w #$0194 : BRA .done ; have p bow
+ LDA.w #$0193 : BRA .done ; don't have p bow
.dont_have
LDA.w #$0192 : BRA .done
.have
LDA.w #$0195 : BRA .done
.bombs
LDA.l BombsEquipment : AND.w #$00FF : BNE .have
LDA.l InfiniteBombs : AND.w #$00FF : BNE .have
BRA .dont_have
.powder
LDA.l InventoryTracking : BIT.w #$0010 : BNE .have
BRA .dont_have
.bee
LDA.l BottleContentsOne : AND.w #$00FF
CMP.w #$0007 : BEQ .have
CMP.w #$0008 : BEQ .have
LDA.l BottleContentsTwo : AND.w #$00FF
CMP.w #$0007 : BEQ .have
CMP.w #$0008 : BEQ .have
LDA.l BottleContentsThree : AND.w #$00FF
CMP.w #$0007 : BEQ .have
CMP.w #$0008 : BEQ .have
LDA.l BottleContentsFour : AND.w #$00FF
CMP.w #$0007 : BEQ .have
CMP.w #$0008 : BEQ .have
BRA .dont_have
.done
STA.w TextID
SEP #$20
JSL.l Sprite_ShowMessageMinimal_Alt
JSL Sprite_ShowMessageMinimal_Alt
RTL
;--------------------------------------------------------------------------------
DialogEtherTablet:
PHA
LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped
LDA.w ItemCursor : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped
-
PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text
+
BIT $F4 : BVC - ; Show normal text if Y is not pressed
JSL CheckTabletSword : BMI .yesText
CMP.b #$02 : !BGE .noText
BIT.b Joy1A_New : BVC - ; Show normal text if Y is not pressed
LDA.l AllowHammerTablets : BEQ ++
LDA.l HammerEquipment : BEQ .yesText : BRA .noText
++
LDA.l SwordEquipment : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : BCS .noText
;++
.yesText
PLA
LDA.b #$0C
@@ -387,15 +372,18 @@ RTL
;--------------------------------------------------------------------------------
DialogBombosTablet:
PHA
LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped
LDA.w ItemCursor : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped
-
PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text
+
BIT $F4 : BVC - ; Show normal text if Y is not pressed
JSL CheckTabletSword : BMI .yesText
CMP.b #$02 : !BGE .noText
BIT.b Joy1A_New : BVC - ; Show normal text if Y is not pressed
LDA.l AllowHammerTablets : BEQ ++
LDA.l HammerEquipment : BEQ .yesText : BRA .noText
++
LDA.l SwordEquipment : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : !BGE .noText
;++
.yesText
PLA
PLA
LDA.b #$0D
LDY.b #$01
JML Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm)
@@ -405,81 +393,81 @@ DialogBombosTablet:
RTL
;--------------------------------------------------------------------------------
DialogSahasrahla:
LDA.l PendantsField : AND #$04 : BEQ + ;Check if player has green pendant
LDA.l PendantsField : AND.b #$04 : BEQ + ;Check if player has green pendant
LDA.b #$2F
LDY.b #$00
LDY.b #$00
JML Sprite_ShowMessageUnconditional
+
RTL
;--------------------------------------------------------------------------------
DialogBombShopGuy:
LDY.b #$15
LDA.l CrystalsField : AND #$05 : CMP #$05 : BNE + ;Check if player has crystals 5 & 6
LDA.l CrystalsField : AND.b #$05 : CMP.b #$05 : BNE + ;Check if player has crystals 5 & 6
INY ; from 15 to 16
+
TYA
LDY.b #$01
JSL.l Sprite_ShowMessageUnconditional
JSL Sprite_ShowMessageUnconditional
RTL
;---------------------------------------------------------------------------------------------------
AgahnimAsksAboutPed:
LDA.l InvincibleGanon
CMP.b #$06 : BNE .vanilla
; seems light_speed option to change some aga text is unused for now
BRA .vanilla
LDA.l OverworldEventDataWRAM+$80 ; check ped flag
AND.b #$40
BNE .vanilla
LDA.b #$8C ; message 018C for no ped
STA.w $1CF0
STA.w TextID
.vanilla
JML $05FA8E ; Sprite_ShowMessageMinimal
JML Sprite_ShowMessageMinimal
;--------------------------------------------------------------------------------
Main_ShowTextMessage_Alt:
; Are we in text mode? If so then end the routine.
LDA $10 : CMP.b #$0E : BEQ .already_in_text_mode
LDA.b GameMode : CMP.b #$0E : BEQ .already_in_text_mode
Sprite_ShowMessageMinimal_Alt:
STZ $11
STZ.b GameSubMode
PHX : PHY
PEI ($00)
LDA.b $02 : PHA
PEI.b (Scrap00)
LDA.b Scrap02 : PHA
LDA.b #$1C : STA.b $02
LDA.b #$1C : STA.b Scrap02
REP #$30
LDA.w $1CF0 : ASL : TAX
LDA.w TextID : ASL : TAX
LDA.l $7F71C0, X
STA.b $00
STA.b Scrap00
SEP #$30
LDY.b #$00
LDA [$00], Y : CMP.b #$FE : BNE +
INY : LDA [$00], Y : CMP.b #$6E : BNE +
INY : LDA [$00], Y : : BNE +
INY : LDA [$00], Y : CMP.b #$FE : BNE +
INY : LDA [$00], Y : CMP.b #$6B : BNE +
INY : LDA [$00], Y : CMP.b #$04 : BNE +
STZ $1CE8
LDA.b [Scrap00], Y : CMP.b #$FE : BNE +
INY : LDA.b [Scrap00], Y : CMP.b #$6E : BNE +
INY : LDA.b [Scrap00], Y : : BNE +
INY : LDA.b [Scrap00], Y : CMP.b #$FE : BNE +
INY : LDA.b [Scrap00], Y : CMP.b #$6B : BNE +
INY : LDA.b [Scrap00], Y : CMP.b #$04 : BNE +
STZ.w MessageCursor
JMP .end
+
STZ $0223 ; Otherwise set it so we are in text mode.
STZ $1CD8 ; Initialize the step in the submodule
STZ.w MessageJunk ; Otherwise set it so we are in text mode.
STZ.w MessageSubModule
; Go to text display mode (as opposed to maps, etc)
LDA.b #$02 : STA $11
LDA.b #$02 : STA.b GameSubMode
; Store the current module in the temporary location.
LDA $10 : STA $010C
LDA.b GameMode : STA.w GameModeCache
; Switch the main module ($10) to text mode.
LDA.b #$0E : STA $10
LDA.b #$0E : STA.b GameMode
.end
PLA : STA.b $02
PLA : STA.b $01
PLA : STA.b $00
PLA : STA.b Scrap02
PLA : STA.b Scrap01
PLA : STA.b Scrap00
PLY : PLX
Main_ShowTextMessage_Alt_already_in_text_mode:
@@ -488,26 +476,132 @@ RTL
CalculateSignIndex:
; for the big 1024x1024 screens we are calculating link's effective
; screen area, as though the screen was 4 different 512x512 screens.
; And we do this in a way that will likely give the right value even
; And we do this in a way that will likely give the right value even
; with major glitches.
LDA $8A : ASL A : TAY ;what we wrote over
LDA.b OverworldIndex : ASL A : TAY ;what we wrote over
LDA $0712 : BEQ .done ; If a small map, we can skip these calculations.
LDA.w OWScreenSize : BEQ .done ; If a small map, we can skip these calculations.
LDA $21 : AND.w #$0002 : ASL #2 : EOR $8A : AND.w #$0008 : BEQ +
LDA.b LinkPosY+1 : AND.w #$0002 : ASL #2 : EOR.b OverworldIndex : AND.w #$0008 : BEQ +
TYA : !ADD.w #$0010 : TAY ;add 16 if we are in lower half of big screen.
+
+
LDA $23 : AND.w #$0002 : LSR : EOR $8A : AND.w #$0001 : BEQ +
LDA.b LinkPosX+1 : AND.w #$0002 : LSR : EOR.b OverworldIndex : AND.w #$0001 : BEQ +
TYA : INC #2 : TAY ;add 16 if we are in lower half of big screen.
+
; ensure even if things go horribly wrong, we don't read the sign out of bounds and crash:
TYA : AND.w #$00FF : TAY
TYA : AND.w #$00FF : TAY
.done
RTL
;================================================================
; Contributor: Myramong
;================================================================
Sprite_ShowSolicitedMessageIfPlayerFacing_Alt:
{
STA.w TextID
STY.w TextID+1
JSL Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha
JSL Sprite_CheckIfPlayerPreoccupied : BCS .alpha
LDA.b Joy1B_New : BPL .alpha
LDA.w SpriteTimerE, X : BNE .alpha
LDA.b LinkJumping : CMP.b #$02 : BEQ .alpha
JSL Sprite_DirectionToFacePlayerLong : PHX : TYX
; Make sure that the sprite is facing towards the player, otherwise
; talking can't happen. (What sprites actually use this???)
LDA.l Sprite_ShowSolicitedMessage_Direction, X : PLX : CMP.b LinkDirection : BNE .not_facing_each_other
PHY
LDA.w TextID
LDY.w TextID+1
; Check what room we're in so we know which npc we're talking to
LDA.b RoomIndex
CMP.b #$05 : BEQ .SahasrahlaDialogs
CMP.b #$1C : BEQ .BombShopGuyDialog
BRA .SayNothing
.SahasrahlaDialogs
REP #$20 : LDA.l MapReveal_Sahasrahla : ORA.l MapOverlay : STA.l MapOverlay : SEP #$20
JSL DialogSahasrahla : BRA .SayNothing
.BombShopGuyDialog
REP #$20 : LDA.l MapReveal_BombShop : ORA.l MapOverlay : STA.l MapOverlay : SEP #$20
JSL DialogBombShopGuy
.SayNothing
LDA.b #$40 : STA.w SpriteTimerE, X
PLA : EOR.b #$03
SEC
RTL
.not_facing_each_other
.alpha
LDA.w SpriteMoveDirection, X
CLC
RTL
}
;================================================================
Sprite_ShowSolicitedMessageIfPlayerFacing_PreserveMessage:
{
PHY
PHA
JSL Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha
JSL Sprite_CheckIfPlayerPreoccupied : BCS .alpha
LDA.b Joy1B_New : BPL .alpha
LDA.w SpriteTimerE, X : BNE .alpha
LDA.b LinkJumping : CMP.b #$02 : BEQ .alpha
JSL Sprite_DirectionToFacePlayerLong : PHX : TYX
; Make sure that the sprite is facing towards the player, otherwise
; talking can't happen. (What sprites actually use this???)
LDA.l Sprite_ShowSolicitedMessage_Direction, X : PLX : CMP.b LinkDirection : BNE .not_facing_each_other
PLA : XBA : PLA
PHY
TAY : XBA
JSL Sprite_ShowMessageUnconditional
LDA.b #$40 : STA.w SpriteTimerE, X
PLA : EOR.b #$03
SEC
RTL
.not_facing_each_other
.alpha
PLY
PLA
LDA.w SpriteMoveDirection, X
CLC
RTL
}
;--------------------------------------------------------------------------------
; A0 - A9 - 0 - 9
; AA - C3 - A - Z

Some files were not shown because too many files have changed in this diff Show More