Compare commits
819 Commits
v31.0.5
...
kara_dr_tr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1044baf41 | ||
|
|
cbfd77d812 | ||
|
|
86c970dc3a | ||
|
|
8e306f1379 | ||
|
|
024746d78f | ||
|
|
aa3c8a232b | ||
|
|
6e327c951f | ||
|
|
bc7cd584e3 | ||
|
|
86f641b710 | ||
|
|
cc309ecb48 | ||
|
|
474cfba250 | ||
|
|
0157c5d05b | ||
|
|
e12af76559 | ||
|
|
d75c72f85d | ||
|
|
0339e09b5d | ||
|
|
a70251d2b2 | ||
|
|
2e2b493240 | ||
|
|
f25c9dd4c4 | ||
|
|
364fd81a93 | ||
|
|
0d18000070 | ||
| 29d241bcbe | |||
|
|
dcb0a2b42d | ||
|
|
de8703e13f | ||
|
|
2daa8daaae | ||
|
|
16d249859f | ||
|
|
ed8cefe0c6 | ||
|
|
23f839cced | ||
|
|
50dec603e2 | ||
|
|
fc08fa33c8 | ||
|
|
8d87e70e18 | ||
|
|
8654719572 | ||
|
|
ce8497e3d2 | ||
|
|
014b3a719a | ||
|
|
8c080c81a6 | ||
|
|
660674c051 | ||
|
|
553fb272a0 | ||
|
|
97f3c527b0 | ||
|
|
85581b6813 | ||
|
|
cec4e0430b | ||
|
|
d81a19c367 | ||
|
|
88ef1f385d | ||
|
|
7001767c9b | ||
|
|
55f18eb108 | ||
|
|
7116cb6557 | ||
|
|
85e338ad67 | ||
|
|
9ac2156945 | ||
|
|
687f6b25bd | ||
|
|
81cbc5d2ed | ||
|
|
52325979a7 | ||
|
|
79bdace3b3 | ||
|
|
62356f0159 | ||
|
|
f7f558cd59 | ||
|
|
8c384ff123 | ||
|
|
f3768ea0ad | ||
|
|
032d15fba6 | ||
|
|
f133ce7159 | ||
|
|
c5d8c69396 | ||
|
|
f71759754e | ||
|
|
3f0082a771 | ||
|
|
4eaa214626 | ||
|
|
1290751307 | ||
|
|
a8a1eaa1b9 | ||
|
|
507ba379cf | ||
|
|
334f721a29 | ||
|
|
c0dff8e7c9 | ||
|
|
b831dd29a5 | ||
|
|
5ad0e7781e | ||
|
|
0fdb6ed133 | ||
|
|
cc36ccc0b1 | ||
|
|
23ef62522b | ||
|
|
b67e5c8433 | ||
|
|
a723fe2865 | ||
|
|
fcbde59a1e | ||
|
|
f916346747 | ||
|
|
2561737236 | ||
|
|
70758bf5c0 | ||
|
|
e772b4a931 | ||
|
|
f6842204d0 | ||
|
|
8af9c17cfe | ||
|
|
57e537f12d | ||
|
|
bc3dd5c186 | ||
|
|
71e86f7c1a | ||
|
|
0f72e6fcec | ||
|
|
790f3f0ba3 | ||
|
|
134651e4fb | ||
|
|
6a55fc2b12 | ||
|
|
7dc71cf1ac | ||
|
|
5a0bd6dbe0 | ||
|
|
f778674b83 | ||
|
|
2e433732f8 | ||
|
|
4ec523c8b3 | ||
|
|
23b6e1ae6b | ||
|
|
9800a86189 | ||
|
|
74a31f5f11 | ||
|
|
73b2a180ba | ||
|
|
2cead7ae92 | ||
|
|
9fc85218ae | ||
|
|
aecc65595e | ||
|
|
6fbce240b8 | ||
|
|
3a5974b456 | ||
|
|
5ccdebe09d | ||
|
|
71e6d54276 | ||
|
|
139c963e6a | ||
|
|
29176fa194 | ||
|
|
b635126e81 | ||
|
|
150adec969 | ||
|
|
e21067f0a2 | ||
|
|
d09aea3ff9 | ||
|
|
d6ac9feae4 | ||
|
|
cd67d27798 | ||
|
|
90c8e95f9b | ||
|
|
c6e586fbb8 | ||
|
|
4c98268d81 | ||
|
|
51011dcada | ||
|
|
b688149dfa | ||
|
|
e3a35ef5fc | ||
|
|
52d2616537 | ||
|
|
05a79ad2d9 | ||
|
|
7e513c4696 | ||
|
|
77e269ff31 | ||
|
|
90ffa8bd23 | ||
|
|
6980d36d27 | ||
|
|
5ac2f8c537 | ||
|
|
3f5455b647 | ||
|
|
1cbcd1d5ff | ||
|
|
09702e659d | ||
|
|
188c965fbc | ||
|
|
f1dda4a8c0 | ||
|
|
2a789b04e4 | ||
|
|
247128b9f6 | ||
|
|
9bde734ca3 | ||
|
|
80f94824f4 | ||
|
|
e2525ebdb1 | ||
|
|
66540f2819 | ||
|
|
59b16eeb05 | ||
|
|
63ba27e93d | ||
|
|
ca917404e5 | ||
|
|
ba080ef556 | ||
|
|
8a63b7ca91 | ||
|
|
78b5695e30 | ||
|
|
71d3f6cefe | ||
|
|
e206d6f368 | ||
|
|
1b115ebb50 | ||
|
|
491e033ff0 | ||
|
|
a3bc24c383 | ||
|
|
cc83fef9b0 | ||
|
|
aaf970b837 | ||
|
|
ad17c8e88d | ||
|
|
ed1a8f1bdb | ||
|
|
858057d9c0 | ||
|
|
a2671e7ed5 | ||
|
|
103f072cf3 | ||
|
|
459dacd582 | ||
|
|
56cb17a0a3 | ||
|
|
8d0585ec33 | ||
|
|
39ac6c301a | ||
|
|
1c0b7b5320 | ||
|
|
bdf8c7bd6e | ||
|
|
87e665965c | ||
|
|
2c9161927e | ||
|
|
6a22218727 | ||
|
|
75545cf568 | ||
|
|
cb16ffc20b | ||
|
|
d446bd3c1b | ||
|
|
ddfb8eed0f | ||
|
|
8ed4cbda1d | ||
|
|
d3ed95d639 | ||
|
|
653f66e57a | ||
|
|
c424cf4311 | ||
|
|
05409f1875 | ||
|
|
0a073df728 | ||
|
|
83377b6bea | ||
|
|
421740cdae | ||
|
|
389e436b52 | ||
|
|
bbd25c2543 | ||
|
|
d5b5a20862 | ||
|
|
fed357141b | ||
|
|
c3c7078969 | ||
|
|
aec3370f48 | ||
|
|
815c2ab81f | ||
|
|
3a90df5bd4 | ||
|
|
878536903e | ||
|
|
15236c9aee | ||
|
|
08c178a974 | ||
|
|
5cac501cc7 | ||
|
|
ef057638c5 | ||
|
|
568708afd3 | ||
|
|
4f09d30fe5 | ||
|
|
bd2432d2ce | ||
|
|
67f22ab602 | ||
|
|
21522f29d1 | ||
|
|
23ecf41b33 | ||
|
|
0505cc28e1 | ||
|
|
b10dff8a30 | ||
|
|
69a6e7f918 | ||
|
|
c7c5ac23a8 | ||
|
|
04aabc8bd8 | ||
|
|
5ef08d934c | ||
|
|
5a0990638c | ||
|
|
1f8389c446 | ||
|
|
95f0e9eed2 | ||
|
|
efa5d288a8 | ||
|
|
df60b3641b | ||
|
|
7968ddf020 | ||
|
|
0f541ad069 | ||
|
|
7e96db4ba6 | ||
|
|
380f917e60 | ||
|
|
c0986d6bbc | ||
|
|
d0f9bf6b32 | ||
|
|
5c213477bc | ||
|
|
72e8d73277 | ||
|
|
13879317fe | ||
|
|
b9c8984d6d | ||
|
|
af1df7cc6c | ||
|
|
5e3fce17be | ||
|
|
af05d2df44 | ||
|
|
5546827c48 | ||
|
|
23427497b4 | ||
|
|
096157e981 | ||
|
|
d76d4b4254 | ||
|
|
068d4c2449 | ||
|
|
a2020c9c76 | ||
|
|
66fd23fc61 | ||
|
|
af59265712 | ||
|
|
02786974ad | ||
|
|
aed9166f48 | ||
|
|
d5c8de0436 | ||
|
|
3b848f0586 | ||
|
|
2411d0344e | ||
|
|
ff6b8b996b | ||
|
|
4a8b8b7691 | ||
|
|
aae1e2a1f3 | ||
|
|
d7887b2305 | ||
|
|
c0b7605c12 | ||
|
|
663ba966a1 | ||
|
|
caac2877fc | ||
|
|
830e86f199 | ||
|
|
aaff8a1975 | ||
|
|
296c311b0a | ||
|
|
c2ea144bfb | ||
|
|
7151093664 | ||
|
|
35e1b3a659 | ||
|
|
85b433fcd4 | ||
|
|
8957b8db7b | ||
|
|
4802107516 | ||
|
|
ff88437f8e | ||
|
|
05fdeaccb0 | ||
|
|
c23facd617 | ||
|
|
36ca193b75 | ||
|
|
5ab91e7137 | ||
|
|
83465e39af | ||
|
|
186cbba855 | ||
|
|
1d64ee7926 | ||
|
|
6797e84696 | ||
|
|
6e876b2d1f | ||
|
|
4437982063 | ||
|
|
3c7399eb12 | ||
|
|
89f2f555e5 | ||
|
|
03601d5df5 | ||
|
|
194e745f22 | ||
|
|
955766dc2a | ||
|
|
918173523f | ||
|
|
0397623340 | ||
|
|
dac500627c | ||
|
|
46272e7fad | ||
|
|
9e50d5f02c | ||
|
|
612597be12 | ||
|
|
3af9e75dbd | ||
|
|
d7431b6550 | ||
|
|
aa65adbec5 | ||
|
|
b2fdeb6b84 | ||
|
|
69fd6015e6 | ||
|
|
8d0315e4c1 | ||
|
|
823166c4cd | ||
|
|
9425b1c3b1 | ||
|
|
d3cd3a86ca | ||
|
|
524a27d680 | ||
|
|
7426ce5945 | ||
|
|
da8576546d | ||
|
|
09d15f3294 | ||
|
|
788cceaab9 | ||
|
|
43f753b517 | ||
|
|
9cf3cb0601 | ||
|
|
6b2e7a5c34 | ||
|
|
44a648e3be | ||
|
|
cafb0908a0 | ||
|
|
0e87fb3bc4 | ||
|
|
177452c853 | ||
|
|
dbf674c9fd | ||
|
|
651d00d320 | ||
|
|
8e20d6280c | ||
|
|
48ccf03ac8 | ||
|
|
686bb0c064 | ||
|
|
d6f50525a1 | ||
|
|
895074a4cb | ||
|
|
3fdf95a364 | ||
|
|
5e93e59727 | ||
|
|
f8d9be201a | ||
|
|
9cdca6edb3 | ||
|
|
6b853222f2 | ||
|
|
2acee4abb9 | ||
|
|
8a18566da1 | ||
|
|
0e15eb3560 | ||
|
|
0941cd321e | ||
|
|
2457c67d0e | ||
|
|
e1fa3aa7b7 | ||
|
|
ca70d8c2a3 | ||
|
|
ad6a2ed2fe | ||
|
|
2309b88545 | ||
|
|
22b5524a4c | ||
|
|
031e3965b2 | ||
|
|
e321299603 | ||
|
|
a6577b4e4b | ||
|
|
196905a83f | ||
|
|
aba3ec930d | ||
|
|
95ee31f7c9 | ||
|
|
d8846a4ba9 | ||
|
|
53f89790a7 | ||
|
|
10079a539b | ||
|
|
0e6e5d5b45 | ||
|
|
17d1b12890 | ||
|
|
4e6acaf7b9 | ||
|
|
9e5e9a17ed | ||
|
|
7f8e560b76 | ||
|
|
3b5ccc7dfa | ||
|
|
3e6da34c71 | ||
|
|
92c155f5c0 | ||
|
|
ae1fde65f4 | ||
|
|
a36068fb04 | ||
|
|
6f1eda9296 | ||
|
|
2579038832 | ||
|
|
87cac1a113 | ||
|
|
04906b5f87 | ||
|
|
2297a8f0a2 | ||
|
|
da8ce3c6b1 | ||
|
|
1ccc24f72f | ||
|
|
bea2d24d4d | ||
|
|
e1258eba06 | ||
|
|
6ff400776a | ||
|
|
cc1d97466c | ||
|
|
9779f91ce9 | ||
|
|
003278f7e0 | ||
|
|
15cc72c1e0 | ||
|
|
b095a0c337 | ||
|
|
db2fe4cf39 | ||
|
|
ed3ce6af6f | ||
|
|
336931fb02 | ||
|
|
4cdd41dbf5 | ||
|
|
5863f9783f | ||
|
|
445a91c2aa | ||
|
|
e804455743 | ||
|
|
6d39ea5872 | ||
|
|
675d68175c | ||
|
|
55970bdff9 | ||
|
|
326b8f294e | ||
|
|
3685d8194e | ||
|
|
6def39ff58 | ||
|
|
71d26eb109 | ||
|
|
0960dcaac9 | ||
|
|
eb0bc2b7f6 | ||
|
|
f0b767885c | ||
|
|
e088a040f8 | ||
|
|
53f723a196 | ||
|
|
352d1e8a22 | ||
|
|
4b68406be0 | ||
|
|
a017c98c4e | ||
|
|
e8f06f2da6 | ||
|
|
9c41ffb55b | ||
|
|
3114223a04 | ||
|
|
f6015a8569 | ||
|
|
5861f546ad | ||
| 638967ee9c | |||
|
|
d116249412 | ||
|
|
4239e7204e | ||
|
|
c6adf11a0d | ||
|
|
a754a6f22b | ||
|
|
281beeeb58 | ||
|
|
93fe175cab | ||
|
|
c687157882 | ||
|
|
60026bea50 | ||
|
|
66657eb956 | ||
|
|
a0ebf72d59 | ||
|
|
c83185c1b2 | ||
|
|
5d943d9a6d | ||
|
|
838d4e9bf8 | ||
|
|
2c8299bac3 | ||
|
|
fe66c67d07 | ||
|
|
a80171ba9b | ||
|
|
57dec5651f | ||
|
|
5bd4d36cd9 | ||
|
|
e8b85e4815 | ||
|
|
93fe72466d | ||
|
|
7db582d894 | ||
|
|
905e897b52 | ||
|
|
02932a2a9d | ||
|
|
959aa40f58 | ||
|
|
3c6c45ddb4 | ||
|
|
dfc4284a70 | ||
|
|
3e2362b7ca | ||
|
|
c048589c02 | ||
|
|
8f74ddab05 | ||
|
|
a247a0ae01 | ||
|
|
7ca4fd6467 | ||
|
|
32d619c9e7 | ||
|
|
725f6c110a | ||
|
|
3c9b04f30a | ||
|
|
c515beb853 | ||
|
|
b46269b662 | ||
|
|
b91ac58b47 | ||
|
|
02ed70442d | ||
|
|
df27e07221 | ||
|
|
6c4acb1e5b | ||
|
|
78148fb4f3 | ||
|
|
f3d1e99421 | ||
|
|
b392eb7554 | ||
|
|
50dd0c7be4 | ||
|
|
1d378211ba | ||
|
|
cad5a43d4b | ||
|
|
6d72a1a9c2 | ||
|
|
149f19df83 | ||
|
|
8698c3e109 | ||
|
|
7bf2a259a4 | ||
|
|
83ce4bf566 | ||
|
|
fc5e6191eb | ||
|
|
52c40ba0ca | ||
|
|
c88a301708 | ||
|
|
e5d3ebf3cd | ||
|
|
2a3d6fae58 | ||
|
|
6f58b9f959 | ||
|
|
4eafefb501 | ||
|
|
04fa0fc1a1 | ||
|
|
e8623768af | ||
|
|
ed225e044b | ||
|
|
7cf57a7a37 | ||
|
|
6821648443 | ||
|
|
c09839eb33 | ||
|
|
be2d59eec8 | ||
|
|
c4c9065a79 | ||
|
|
c8ea2c6dce | ||
|
|
6c9b33ed93 | ||
|
|
15d88b19a3 | ||
|
|
e2bb55c1ba | ||
|
|
9e2382cbb2 | ||
|
|
ae0b57635c | ||
|
|
06d0c6e9f9 | ||
|
|
7f03cf68e8 | ||
|
|
ae82caca45 | ||
|
|
fa76b61df0 | ||
|
|
774aeb5e73 | ||
|
|
640e94153d | ||
|
|
e4d917c47c | ||
|
|
d47dea6123 | ||
|
|
7dda06cf11 | ||
|
|
7b263917ff | ||
|
|
faaf89f584 | ||
|
|
b994668676 | ||
|
|
42bc1d743a | ||
|
|
aa6aaffd2f | ||
|
|
7cc5f802f9 | ||
|
|
b943f86c15 | ||
|
|
7edaedf3f8 | ||
|
|
046a98fdaf | ||
|
|
7c6c5f4316 | ||
|
|
190653d70f | ||
|
|
1b9734d1af | ||
|
|
db8df2a12b | ||
|
|
c1e4ca0053 | ||
|
|
c29de40484 | ||
|
|
d5c4834b1d | ||
|
|
2e97329250 | ||
|
|
14b899d47a | ||
|
|
fcd9b949e8 | ||
|
|
df2bca00ee | ||
|
|
c82edadadd | ||
|
|
5fc5dc13b2 | ||
|
|
580bbb7c67 | ||
|
|
24f6a4d8a8 | ||
|
|
2fe5f0c126 | ||
|
|
2c6db075a9 | ||
|
|
ad5b78b3d1 | ||
|
|
e8d5a9635d | ||
|
|
f19b65b86c | ||
|
|
6757e35dca | ||
|
|
553821885f | ||
|
|
1e6d79badc | ||
|
|
3f34e50a62 | ||
|
|
a1fafb72cd | ||
|
|
2b1a3566d8 | ||
|
|
7f749e9578 | ||
|
|
71ae648137 | ||
|
|
85d799ba67 | ||
|
|
620c672fe1 | ||
|
|
f95bce282b | ||
|
|
415e2cae41 | ||
|
|
9bf662642b | ||
|
|
27654b9ac9 | ||
|
|
aee5fe506a | ||
|
|
c503e3eb61 | ||
|
|
798af49215 | ||
|
|
319aba5e4d | ||
|
|
4ec6acfae7 | ||
|
|
501699e401 | ||
|
|
cc502c7524 | ||
|
|
1ef55470d5 | ||
|
|
aca809862d | ||
|
|
f9e3bec5cb | ||
|
|
c37dcec6ea | ||
|
|
9f1933d8c0 | ||
|
|
bbc8228175 | ||
|
|
0a93c3fa00 | ||
|
|
07a3a9ad03 | ||
|
|
086230bb8c | ||
|
|
48d9a7d4bc | ||
|
|
af8a47e743 | ||
|
|
9ebde3e5b7 | ||
|
|
bd16b9ff92 | ||
|
|
03c287a988 | ||
|
|
910d63e886 | ||
|
|
9067790b20 | ||
|
|
f69a33aed0 | ||
|
|
f18eac796c | ||
|
|
7057d984e2 | ||
| 230b15a294 | |||
|
|
e2e4db8237 | ||
|
|
fd490cab9a | ||
|
|
39441eb0a6 | ||
|
|
187c2aa4a2 | ||
|
|
df66369f17 | ||
|
|
fa516b58d4 | ||
|
|
9cecd30e89 | ||
|
|
15337a1382 | ||
|
|
9861c76d23 | ||
|
|
5b8c90e069 | ||
|
|
e038b0bb18 | ||
| 8e12033105 | |||
|
|
8da0dcf3e0 | ||
|
|
df7ce30bbe | ||
|
|
a5d66bc5a8 | ||
|
|
b726ea1d0a | ||
|
|
f0a00aea0d | ||
| a2547e9810 | |||
|
|
bfbe3fbcc0 | ||
|
|
641ec0ffa0 | ||
|
|
e35c437fe3 | ||
|
|
c01c6f337a | ||
|
|
30d8bdd813 | ||
|
|
0bce51af4e | ||
| 12bc26bd5a | |||
| 2be05eed33 | |||
| e7d4f09871 | |||
|
|
1c9936d231 | ||
| 0054be1e4b | |||
| 02e66ba9e3 | |||
| 3944dadcab | |||
| 5470b41f46 | |||
|
|
aee82fa319 | ||
|
|
264f7b26bc | ||
|
|
6f2383fafe | ||
|
|
5d7bfde194 | ||
| 3548a0bbf5 | |||
|
|
27cb1b5459 | ||
|
|
270f0685ff | ||
|
|
00c59c791f | ||
|
|
bdd16bc20f | ||
|
|
f403ca10da | ||
|
|
04a07025ef | ||
| 01537a7f2f | |||
|
|
69ec104027 | ||
|
|
ae0a712bdd | ||
|
|
aa4dbde9d7 | ||
|
|
5e152e18ed | ||
|
|
49f1f49ccb | ||
|
|
38fdf5442a | ||
|
|
72f2a875ca | ||
|
|
d3db31b05e | ||
|
|
be0389ffbb | ||
|
|
e9aec2ba86 | ||
|
|
717434bd88 | ||
|
|
1531f7a8e2 | ||
|
|
cc12372627 | ||
|
|
cc9c355ef7 | ||
|
|
76878def98 | ||
|
|
49afe7ca9b | ||
|
|
b16f7b4994 | ||
|
|
4b6d70a61b | ||
|
|
c60cbbc869 | ||
|
|
429fea004f | ||
|
|
d0fbd11d0f | ||
|
|
ac2aab4044 | ||
|
|
77f742b25c | ||
|
|
2276b5782a | ||
|
|
55c5208652 | ||
|
|
14844400b3 | ||
|
|
183d439ff7 | ||
|
|
3d7e12a760 | ||
|
|
a9a929c6f4 | ||
|
|
3f86caf083 | ||
|
|
ce7396ae35 | ||
|
|
34bb99b7d0 | ||
|
|
dca1bfbab2 | ||
|
|
a378bcf5c5 | ||
|
|
775a970bcc | ||
|
|
6261b9b8e0 | ||
|
|
3204ad2ed5 | ||
|
|
8f74212259 | ||
|
|
feb27d71b9 | ||
|
|
050ce5e20e | ||
|
|
429649bde8 | ||
|
|
c7a4d817c0 | ||
|
|
5672e2f090 | ||
|
|
1bbf359198 | ||
|
|
327f08ce35 | ||
|
|
b09b214ac0 | ||
|
|
869706e50b | ||
|
|
9d64b5edd1 | ||
|
|
feb3105c5a | ||
|
|
471a6da9ba | ||
|
|
6e86c5c9b8 | ||
|
|
abd3dbe1fc | ||
|
|
ce58e22496 | ||
|
|
e9a376d92a | ||
|
|
47e52d3fb2 | ||
|
|
a7f8bc8d91 | ||
|
|
842bb043e6 | ||
|
|
b76efe6df4 | ||
|
|
01e894a0b0 | ||
|
|
086721d035 | ||
|
|
2048f75185 | ||
|
|
3e09808536 | ||
|
|
f389a2e737 | ||
|
|
12e30ba2db | ||
|
|
03c0eb0475 | ||
|
|
02ec4ded4b | ||
|
|
9744f846f7 | ||
|
|
6fdd5f636e | ||
|
|
8db9b67654 | ||
|
|
d52e5f2037 | ||
|
|
08abf980eb | ||
|
|
1efb19b88d | ||
|
|
8881aa66b1 | ||
|
|
ca7eaf3385 | ||
|
|
7b4e3f5c95 | ||
|
|
fe708fd20f | ||
|
|
edfecad1b2 | ||
|
|
74cb39f666 | ||
|
|
452a2db03d | ||
|
|
6a34b5cbc4 | ||
|
|
c04ff98269 | ||
|
|
bc91aac550 | ||
|
|
c179bfcb64 | ||
|
|
12decaab45 | ||
|
|
975dd10db5 | ||
|
|
44445b51ce | ||
|
|
c9340e5aa8 | ||
|
|
e9584597c4 | ||
|
|
fc29db2b46 | ||
|
|
e6aee5c375 | ||
|
|
05af915fe2 | ||
|
|
2da2d16896 | ||
|
|
ed9c6681e8 | ||
|
|
182b23d4de | ||
|
|
70933b01f8 | ||
|
|
b0dda07ce1 | ||
|
|
c5053b7847 | ||
|
|
ead4cf5ca8 | ||
|
|
5def08afc0 | ||
|
|
4614c4e0a9 | ||
|
|
b95923fb9a | ||
|
|
9703195961 | ||
|
|
b188024daa | ||
|
|
fab1c22d43 | ||
|
|
362e9d3b14 | ||
|
|
b84921e255 | ||
|
|
36a21a7190 | ||
|
|
f95351183c | ||
|
|
1dca518150 | ||
|
|
3c891b526f | ||
|
|
8321a5ef59 | ||
|
|
6472553213 | ||
|
|
372b0ba599 | ||
|
|
33dbe3003c | ||
|
|
f4a336db9e | ||
|
|
5273112d9d | ||
|
|
d883b9a637 | ||
|
|
9ce7b9f9d2 | ||
|
|
a5580621ef | ||
|
|
8b9ea182d8 | ||
|
|
a28726d20e | ||
|
|
97e3a995e0 | ||
|
|
ffd1db722b | ||
|
|
f6f28d89a9 | ||
|
|
cd7260c5f4 | ||
|
|
025b4941f3 | ||
|
|
a19c72a062 | ||
|
|
f2ce8aaf59 | ||
|
|
d015310e4d | ||
|
|
f6cc3607df | ||
|
|
37f7125198 | ||
|
|
4ff4fde49b | ||
|
|
8b622dd841 | ||
|
|
ddf56a9ed1 | ||
|
|
5f1ea34646 | ||
|
|
4ae59ad1e6 | ||
|
|
9d607b7caa | ||
|
|
98ecf42fbf | ||
|
|
6be396543e | ||
|
|
d9946e8f2a | ||
|
|
d15dc91db4 | ||
|
|
9b33530dba | ||
|
|
c9d42587a4 | ||
|
|
7fee6ce440 | ||
|
|
f68a635e2b | ||
|
|
a83608366c | ||
|
|
d3af10649c | ||
|
|
244b622074 | ||
|
|
2f5b555e0e | ||
|
|
96d7a6a9ae | ||
|
|
6fe4132564 | ||
|
|
a63aa6f5fe | ||
|
|
2a08959229 | ||
|
|
dab4d58f12 | ||
|
|
b1d4ef3252 | ||
|
|
05e7f8eb96 | ||
|
|
356bfb3a05 | ||
|
|
7266706315 | ||
|
|
c97475f422 | ||
|
|
265f9f3dfa | ||
|
|
df45a9b451 | ||
|
|
0c608c1380 | ||
|
|
078aebed8d | ||
|
|
99da1d3115 | ||
|
|
a9bddea1b4 | ||
|
|
b3fcd2192e | ||
|
|
443070fe2c | ||
|
|
be3960bedb | ||
|
|
264e9f337d | ||
|
|
6c7f5e46a3 | ||
|
|
94561e01c2 | ||
|
|
8d9775c3de | ||
|
|
4c4fa74f1a | ||
|
|
5310569aa3 | ||
|
|
5c2df8b6a6 | ||
|
|
b5bcc13806 | ||
|
|
717913b8fb | ||
|
|
fcebea97af | ||
|
|
44485fc02a | ||
|
|
0dba58c194 | ||
|
|
6fe8496fde | ||
|
|
49dc0f4037 | ||
|
|
5b6e23fcf5 | ||
|
|
b10dc742c2 | ||
|
|
76f35b8786 | ||
|
|
9dc35af9d3 | ||
|
|
9c9925fdda | ||
|
|
6e657f00db | ||
|
|
f26a10a526 | ||
|
|
ba8c7c735b | ||
|
|
01dec8aef8 | ||
|
|
c79f4b19b7 | ||
|
|
fab7c67909 | ||
|
|
0e9e5d034c | ||
|
|
8814f8764a | ||
|
|
a3c4fed33f | ||
|
|
af20beb472 | ||
|
|
233afa1e38 | ||
|
|
94722d452e | ||
|
|
820b5d5357 | ||
|
|
e82f01ae2f | ||
|
|
acf119d6a1 | ||
|
|
397da02e3f | ||
|
|
d58fa5d5b7 | ||
|
|
cdd4199cf9 | ||
|
|
f565fc93be | ||
|
|
a892ff39b2 | ||
|
|
dad73fc883 | ||
|
|
8d17f61f44 | ||
|
|
5930406ecb | ||
|
|
4a9f86ba85 | ||
|
|
65bd0df346 | ||
|
|
ff3bdc1326 | ||
|
|
715ba87517 | ||
|
|
af7cce9ae5 | ||
|
|
7955a37cd9 | ||
|
|
5a10017747 | ||
|
|
6b6bce9b78 | ||
|
|
c78559ec0f | ||
|
|
ae85ec35b9 | ||
|
|
c4e21be268 | ||
|
|
c3398b305a | ||
|
|
594e4e56c0 | ||
|
|
9c8e531d20 | ||
|
|
7b3e200d22 | ||
|
|
3cae3a66a5 | ||
|
|
59f851395c | ||
|
|
c02285306a | ||
|
|
ffc190e3cf | ||
|
|
1d88d7479d | ||
|
|
ea477878fc | ||
|
|
47091dfd68 | ||
|
|
8cf3ccb13e | ||
|
|
b5c7846c40 | ||
|
|
4530021fea | ||
|
|
1b3a586a57 | ||
|
|
65db6eefb7 | ||
|
|
e8a384200f | ||
|
|
0bdc88d13a | ||
|
|
80bc9c2028 | ||
|
|
2a5e305fc6 | ||
|
|
c3c5ba9d53 | ||
|
|
af4c84c1aa | ||
|
|
f843ef9eb8 | ||
|
|
49ba8e064d | ||
|
|
94218b048b | ||
|
|
6818c3e119 | ||
|
|
ddd456c04e | ||
|
|
50ff7683ab | ||
|
|
a20c432003 | ||
|
|
8f9f582250 | ||
|
|
a939bfcdbc |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
tournament.asm
|
||||
/build
|
||||
/.idea
|
||||
/.idea
|
||||
/__pycache__
|
||||
build.sh
|
||||
@@ -3,99 +3,84 @@
|
||||
;================================================================================
|
||||
lorom
|
||||
|
||||
;================================================================================
|
||||
;===================================================================================================
|
||||
|
||||
;org $00FFC0 ; <- 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 #$35 ; set fast exhirom
|
||||
db #$30 ; set fast lorom
|
||||
|
||||
;org $00FFD6 ; <- 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 $00FFD8 ; <- 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 $1FFFF8 ; <- FFFF8 timestamp rom
|
||||
db #$20, #$19, #$08, #$31 ; year/month/day
|
||||
; 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 $80FFC0 ; <- 7FC0 - Bank00.asm : 9173 (db "THE LEGEND OF ZELDA " ; 21 bytes)
|
||||
;db $23, $4E
|
||||
|
||||
org $80FFD5 ; <- 7FD5 - Bank00.asm : 9175 (db $20 ; rom layout)
|
||||
db $30 ; set fast lorom
|
||||
|
||||
;org $80FFD6 ; <- 7FD6 - Bank00.asm : 9176 (db $02 ; cartridge type)
|
||||
;db $55 ; enable S-RTC
|
||||
|
||||
org $80FFD7 ; <- 7FD7 - Bank00.asm : 9177 (db $0A ; rom size)
|
||||
db $0B ; mark rom as 16mbit
|
||||
|
||||
org $80FFD8 ; <- 7FD8 - Bank00.asm : 9178 (db $03 ; ram size (sram size))
|
||||
db $05 ; mark sram as 32k
|
||||
|
||||
org $BFFFFF ; <- 1FFFFF
|
||||
db $00 ; expand file to 2mb
|
||||
|
||||
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 ?= 5 ;
|
||||
|
||||
org $80FFE0 ; Unused hardware vector
|
||||
RomVersion:
|
||||
dw !ROM_VERSION_LOW
|
||||
dw !ROM_VERSION_HIGH
|
||||
|
||||
;================================================================================
|
||||
!ADD = "CLC : ADC"
|
||||
!SUB = "SEC : SBC"
|
||||
!BLT = "BCC"
|
||||
!BGE = "BCS"
|
||||
|
||||
; Rando Specific SRAM assignments
|
||||
!SHOP_PURCHASE_COUNTS = "$7EF302" ;$7EF302 - $7EF33F (temporary home)
|
||||
!INVENTORY_SWAP = "$7EF38C" ; [w]
|
||||
!INVENTORY_SWAP_2 = "$7EF38E" ; [w]
|
||||
!ITEM_LIMIT_COUNTS = "$7EF390" ; $7EF390 - ????
|
||||
!NPC_FLAGS = "$7EF410"
|
||||
!NPC_FLAGS_2 = "$7EF411"
|
||||
!MAP_OVERLAY = "$7EF414" ; [w]
|
||||
!PROGRESSIVE_SHIELD = "$7EF416" ; ss-- ----
|
||||
!HUD_FLAG = "$7EF416" ; --h- ----
|
||||
!FORCE_PYRAMID = "$7EF416" ; ---- p---
|
||||
!IGNORE_FAIRIES = "$7EF416" ; ---- -i--
|
||||
!SHAME_CHEST = "$7EF416" ; ---s ----
|
||||
!HAS_GROVE_ITEM = "$7EF416" ; ---- ---g general flags, don't waste these
|
||||
!HIGHEST_SWORD_LEVEL = "$7EF417" ; --- -sss
|
||||
;$7EF41A[w] - Programmable Item #1
|
||||
;$7EF41C[w] - Programmable Item #2
|
||||
;$7EF41E[w] - Programmable Item #3
|
||||
!SRAM_SINK = "$7EF41E" ; <- change this (conflicts with Programmable item 3)
|
||||
;$7EF418 - Goal Item Counter
|
||||
;$7EF419 - Service Sequence
|
||||
;$7EF420 - $7EF466 - Stat Tracking Bank 1 (overlaps with RNG Item Flags)
|
||||
;$7EF450 - $7EF45F - RNG Item (Single) Flags
|
||||
;$7EF4A0 - $7EF4A7 - Service Request Block
|
||||
!FRESH_FILE_MARKER = "$7EF4F0" ; zero if fresh file
|
||||
;$700500 - $70050F - Extended File Name
|
||||
;$701000 - $70100F - Password (incorporate into log header)
|
||||
;$702000 - $702014 - Rom title copy (incorporate into log header)
|
||||
function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<0))
|
||||
|
||||
|
||||
!MS_GOT = "$7F5031"
|
||||
!DARK_WORLD = "$7EF3CA"
|
||||
|
||||
!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_SPC_LOADING = $7F50AD
|
||||
!REG_MUSIC_CONTROL = $012B
|
||||
;!REG_MUSIC_CONTROL = $012C
|
||||
!REG_MUSIC_CONTROL_REQUEST = $012C
|
||||
; Feature flags, run asar with -DFEATURE_X=1 to enable
|
||||
|
||||
;================================================================================
|
||||
|
||||
!MULTIWORLD_ITEM = "$7EF4D2"
|
||||
!MULTIWORLD_ITEM_FROM = "$7EF4D3"
|
||||
!MULTIWORLD_ROOMID = "$7EF4D4"
|
||||
!MULTIWORLD_ROOMDATA = "$7EF4D6"
|
||||
!MULTIWORLD_SCOUT_LOCATION = "$7EF4D7"
|
||||
!MULTIWORLD_SCOUTREPLY_LOCATION = "$7EF4D8"
|
||||
!MULTIWORLD_SCOUTREPLY_ITEM = "$7EF4D9"
|
||||
!MULTIWORLD_SCOUTREPLY_PLAYER = "$7EF4DA"
|
||||
!MULTIWORLD_RECEIVING_ITEM = "$7EC057" ; 0 = default | 1 = receiving
|
||||
!MULTIWORLD_HUD_CHARACTER_DATA = "$7EC058" ; 0x40 bytes
|
||||
!MULTIWORLD_ITEM_PLAYER_ID = "$7EC098" ; 0 = disabled
|
||||
!MULTIWORLD_SPRITEITEM_PLAYER_ID = "$7EC099"
|
||||
!MULTIWORLD_HUD_TIMER = "$7EC09A"
|
||||
!MULTIWORLD_HUD_DELAY = "#120"
|
||||
!MULTIWORLD_ITEM_ID = "$7EC09B" ; for lua scripts?
|
||||
!Dungeon_ChestData = "$01E96C"
|
||||
|
||||
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
|
||||
incsrc menu/overworldmap.asm ; Overwrites some code in bank $8A
|
||||
|
||||
;org $208000 ; bank #$20
|
||||
org $A08000 ; bank #$A0
|
||||
org $A08000 ; bank $20
|
||||
incsrc itemdowngrade.asm
|
||||
incsrc bugfixes.asm
|
||||
incsrc darkworldspawn.asm
|
||||
@@ -103,9 +88,7 @@ incsrc lampmantlecone.asm
|
||||
incsrc floodgatesoftlock.asm
|
||||
incsrc heartpieces.asm
|
||||
incsrc npcitems.asm
|
||||
incsrc utilities.asm
|
||||
incsrc flipperkill.asm
|
||||
incsrc previewdatacopy.asm
|
||||
incsrc pendantcrystalhud.asm
|
||||
incsrc potions.asm
|
||||
incsrc shopkeeper.asm
|
||||
@@ -115,27 +98,16 @@ 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 newitems.asm
|
||||
incsrc mantle.asm
|
||||
incsrc swordswap.asm
|
||||
incsrc stats.asm
|
||||
incsrc scratchpad.asm
|
||||
incsrc map.asm
|
||||
incsrc msu.asm
|
||||
incsrc dialog.asm
|
||||
incsrc events.asm
|
||||
incsrc entrances.asm
|
||||
incsrc clock.asm
|
||||
incsrc accessability.asm
|
||||
incsrc accessibility.asm
|
||||
incsrc heartbeep.asm
|
||||
incsrc capacityupgrades.asm
|
||||
incsrc timer.asm
|
||||
@@ -145,9 +117,9 @@ incsrc roomloading.asm
|
||||
incsrc icepalacegraphics.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
|
||||
@@ -158,13 +130,18 @@ 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.
|
||||
incsrc invertedstatic.asm
|
||||
warnpc $A1A100
|
||||
|
||||
org $A1B000
|
||||
incsrc failure.asm
|
||||
warnpc $A1FF00
|
||||
|
||||
|
||||
org $A1FF00 ; static mapping area
|
||||
incsrc init.asm
|
||||
|
||||
@@ -172,14 +149,12 @@ org $A48000 ; code bank - PUT NEW CODE HERE
|
||||
incsrc glitched.asm
|
||||
incsrc hardmode.asm
|
||||
incsrc goalitem.asm
|
||||
incsrc openmode.asm
|
||||
incsrc quickswap.asm
|
||||
incsrc endingsequence.asm
|
||||
incsrc cuccostorm.asm
|
||||
incsrc compression.asm
|
||||
incsrc retro.asm
|
||||
incsrc dpadinvert.asm
|
||||
incsrc controllerjank.asm
|
||||
incsrc boots.asm
|
||||
incsrc events.asm
|
||||
incsrc fileselect.asm
|
||||
incsrc playername.asm
|
||||
incsrc decryption.asm
|
||||
@@ -187,107 +162,156 @@ incsrc hashalphabet.asm
|
||||
incsrc inverted.asm
|
||||
incsrc invertedmaps.asm
|
||||
incsrc newhud.asm
|
||||
incsrc compasses.asm
|
||||
incsrc save.asm
|
||||
incsrc password.asm
|
||||
incsrc enemy_adjustments.asm
|
||||
incsrc hudtext.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 hextodec.asm
|
||||
incsrc multiworld.asm
|
||||
incsrc textrenderer.asm
|
||||
warnpc $A58000
|
||||
|
||||
;org $228000 ; contrib area
|
||||
org $A28000 ; contrib area
|
||||
incsrc contrib.asm
|
||||
org $A28000
|
||||
ItemReceiptGraphicsROM:
|
||||
; we need some empty space here so that 0000 can mean nothing
|
||||
fillbyte $00 : fill 32
|
||||
incbin "data/customitems.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 $A38000
|
||||
incsrc stats/credits.asm ; Statically mapped
|
||||
incsrc stats/main.asm
|
||||
incsrc stats/statConfig.asm
|
||||
FontTable:
|
||||
incsrc stats/fonttable.asm
|
||||
|
||||
org $308000 ; bank #$30
|
||||
incsrc doorrando/doorrando.asm ; bank 27/A7
|
||||
;bank 28/A8 for keydropshuffle / standing items
|
||||
incsrc keydrop/standing_items.asm ; bank 28/A8
|
||||
incsrc enemizer/main.asm ; bank 36/B6
|
||||
|
||||
org $B08000 ; bank #$30
|
||||
incsrc tables.asm
|
||||
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/drsheetdc.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 $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 $328000
|
||||
org $B39600
|
||||
BossMapIconGFX:
|
||||
incbin "data/bossicons.4bpp"
|
||||
|
||||
org $B39C00
|
||||
NewFont:
|
||||
incbin "data/newfont.bin"
|
||||
NewFontInverted:
|
||||
incbin "data/newfont_inverted.bin"
|
||||
SmallCharacters:
|
||||
incbin "data/smallchars.2bpp"
|
||||
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:
|
||||
incsrc itemtext.asm
|
||||
warnpc $B2E000
|
||||
|
||||
org $B2DFD0 ; PC 0x195FD0
|
||||
incsrc multiworldplayernames.asm
|
||||
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
|
||||
@@ -302,385 +326,60 @@ 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 Reserved for "outlet data" ~5.8k
|
||||
;$2E Reserved for Tournament Use
|
||||
;$2F Static RNG (rest is reserved for tournament use)
|
||||
;$30 Main Configuration Table
|
||||
;$31 Graphics Bank
|
||||
;$32 Text Bank
|
||||
;$33 Graphics Bank
|
||||
;$37 Don't Use ZSNES Graphics
|
||||
;$38 Don't Use ZSNES Graphics (continued)
|
||||
;$36 reserved for Enemizer
|
||||
;$37 Room data if needed for DR/Pottery/Enemizer
|
||||
;$3A reserved for downstream use
|
||||
;$3B reserved for downstream use
|
||||
;$3F reserved for internal debugging
|
||||
;================================================================================
|
||||
;RAM
|
||||
;$7EC900[0x1F00]: BIGRAM buffer
|
||||
;RAM
|
||||
;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
|
||||
;$7F6000[0x500]: Free RAM (reclaimed from damage table) Not allocated yet
|
||||
;$7F6500[0xB00]: SRAM mirror for last 0xB00 bytes of SRAM (extended sram)
|
||||
; 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
|
||||
;$70:0000 ( 4K) Game state
|
||||
; 0000-04FF Vanilla Slot 1 (mirrored at 0x7EF000)
|
||||
; See earlier in this file for rando specific assignments
|
||||
; 0500-0FFF Ext Slot 1 (not yet mirrored)
|
||||
; See earlier in this file for rando specific assignments
|
||||
;$70:1000 (20K) Log entries
|
||||
;$70:6000 ( 8K) Scratch buffers
|
||||
;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)
|
||||
;$70:2000 (0x25) ROM Name and version number
|
||||
;$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:
|
||||
|
||||
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 $02B861
|
||||
Dungeon_SaveRoomQuadrantData:
|
||||
|
||||
org $02FD8A ; 17D8A - Bank0E.asm: 3732 Note: Different bank
|
||||
LoadGearPalettes_bunny:
|
||||
|
||||
org $02FD95 ; 17D95 - Bank0E.asm: 3742 Note: Different bank
|
||||
LoadGearPalettes_variable:
|
||||
|
||||
org $05A51D
|
||||
Sprite_SpawnFallingItem:
|
||||
|
||||
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 $0683E6
|
||||
Utility_CheckIfHitBoxesOverlapLong:
|
||||
|
||||
org $06A7DB
|
||||
Chicken_SpawnAvengerChicken: ; returns short
|
||||
|
||||
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 $07E68F
|
||||
Unknown_Method_0: ; In US version disassembly simply called "$3E6A6 IN ROM"
|
||||
|
||||
org $07F4AA
|
||||
Sprite_CheckIfPlayerPreoccupied:
|
||||
|
||||
org $08C3AE
|
||||
Ancilla_ReceiveItem:
|
||||
|
||||
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 $098BAD
|
||||
AddPendantOrCrystal:
|
||||
|
||||
org $098CFD
|
||||
AddWeathervaneExplosion:
|
||||
|
||||
org $0993DF
|
||||
AddDashTremor:
|
||||
|
||||
org $099D04
|
||||
AddAncillaLong:
|
||||
|
||||
org $09AE64
|
||||
Sprite_SetSpawnedCoords:
|
||||
|
||||
org $09AD58
|
||||
GiveRupeeGift:
|
||||
|
||||
org $0ABA4F
|
||||
OverworldMap_InitGfx:
|
||||
|
||||
org $0ABA99
|
||||
OverworldMap_DarkWorldTilemap:
|
||||
|
||||
org $0ABAB9
|
||||
OverworldMap_LoadSprGfx:
|
||||
|
||||
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:
|
||||
|
||||
;================================================================================
|
||||
|
||||
15
README.md
Normal file
15
README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# z3randomizer
|
||||
Zelda 3 Randomizer Template ASM
|
||||
|
||||
How to create the bps patch:
|
||||
|
||||
* Assemble the ROM with asar (recommend to use a copy of original rom)
|
||||
|
||||
`asar LTTP_RND_GeneralBugfixes.asm copy_original_rom.sfc`
|
||||
(copy_orignal_rom.sfc is now assembled_rom.sfc)
|
||||
|
||||
* Use flips to create a bps file
|
||||
|
||||
`flips original_rom.sfc assembled_rom.sfc base2current.bps`
|
||||
|
||||
* Update RANDOMIZERBASEHASH in DR with the md5 sum of assembled_rom.sfc. And put base2current.bps in the data directory.
|
||||
@@ -1,36 +0,0 @@
|
||||
;================================================================================
|
||||
; Accessability 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
|
||||
;================================================================================
|
||||
!EPILEPSY_TIMER = "$7F5041"
|
||||
SetEtherFlicker:
|
||||
LDA.l Seizure_Safety : BNE +
|
||||
LDA $031D : CMP.b #$0B : RTL
|
||||
+
|
||||
LDA !EPILEPSY_TIMER : INC : STA !EPILEPSY_TIMER
|
||||
|
||||
LDA.l Seizure_Safety : CMP !EPILEPSY_TIMER : BNE +++
|
||||
LDA.b #$00 : STA !EPILEPSY_TIMER : BRA ++
|
||||
+++
|
||||
LSR : CMP !EPILEPSY_TIMER : !BLT ++
|
||||
SEP #$02 : RTL
|
||||
++
|
||||
REP #$02
|
||||
+
|
||||
RTL
|
||||
;================================================================================
|
||||
SetAttractMaidenFlicker:
|
||||
LDA.l Seizure_Safety : BNE +
|
||||
JSL.l Filter_MajorWhitenMain : LDA $5F : RTL
|
||||
+
|
||||
LDA #$00
|
||||
RTL
|
||||
;================================================================================
|
||||
285
accessibility.asm
Normal file
285
accessibility.asm
Normal file
@@ -0,0 +1,285 @@
|
||||
;================================================================================
|
||||
; Accessibility Fixes
|
||||
;================================================================================
|
||||
ConditionalLightning:
|
||||
CMP.b #$05 : BEQ ++
|
||||
CMP.b #$2C : BEQ ++
|
||||
CMP.b #$5A : BEQ ++
|
||||
LDA.l DisableFlashing : BNE ++
|
||||
LDA.b #$32 : STA.w CGADSUBQ
|
||||
RTL
|
||||
++
|
||||
LDA.b #$72
|
||||
STA.b CGADSUBQ
|
||||
RTL
|
||||
;================================================================================
|
||||
ConditionalWhitenBg:
|
||||
LDX.b #$00
|
||||
LDA.l DisableFlashing : REP #$20 : BNE +
|
||||
LDA.b Scrap00,X
|
||||
JSR WhitenLoopReal
|
||||
RTL
|
||||
+
|
||||
LDA.b Scrap00
|
||||
JSR WhitenLoopDummy
|
||||
RTL
|
||||
;================================================================================
|
||||
WhitenLoopReal:
|
||||
-
|
||||
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.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.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.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.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.l PaletteBuffer+$40 : TAY
|
||||
LDA.l PaletteBufferAux : BNE +
|
||||
TAY
|
||||
+
|
||||
TYA : STA.l PaletteBuffer
|
||||
SEP #$30
|
||||
RTS
|
||||
;================================================================================
|
||||
WhitenLoopDummy:
|
||||
-
|
||||
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.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.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.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.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.l PaletteBuffer+$40 : TAY
|
||||
LDA.l PaletteBufferAux : BNE +
|
||||
TAY
|
||||
+
|
||||
TYA : STA.l PaletteBuffer
|
||||
SEP #$30
|
||||
RTS
|
||||
;================================================================================
|
||||
RestoreBgEther:
|
||||
LDX.b #$00
|
||||
LDA.l DisableFlashing : REP #$20 : BNE +
|
||||
-
|
||||
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.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 Palette_RestoreFixedColor-7 ; Bank0E.asm : 3936 vanilla restore routine after loop which RTLs
|
||||
;================================================================================
|
||||
DDMConditionalLightning:
|
||||
LDA.l DisableFlashing
|
||||
REP #$20
|
||||
BNE +
|
||||
LDA.w Scrap
|
||||
LDX.b #$02
|
||||
JML FlashGanonTowerPalette_next_thunder-2 ; Bank0E.asm : 4738 vanilla loop equivalent to below beginning at LDY #$00
|
||||
+
|
||||
LDA.b Scrap00 : LDX.b #$02 : LDY.b #$00
|
||||
-
|
||||
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 FlashGanonTowerPalette_bright_white ; Bank0E.asm : 4754 both branches converge here
|
||||
;================================================================================
|
||||
ConditionalGTFlash:
|
||||
LDA.l DisableFlashing : REP #$20 : BNE +
|
||||
LDA.w Scrap
|
||||
-
|
||||
LDA.w $F9C1, Y : STA.l PaletteBuffer+$D0, X
|
||||
INY #2
|
||||
INX #2 : CPX.b #$10 : BNE -
|
||||
RTL
|
||||
+
|
||||
LDA.b Scrap00
|
||||
-
|
||||
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.b Scrap,X
|
||||
LDA.w #$1D59 : STA.l PaletteBuffer+$DA
|
||||
LDA.w #$25FF : STA.l PaletteBuffer+$DC
|
||||
LDA.w #$001A
|
||||
RTL
|
||||
+
|
||||
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.b Scrap,X
|
||||
LDA.b Scrap00 : STA.b Scrap04
|
||||
LDA.b Scrap02 : STA.b Scrap06
|
||||
RTL
|
||||
+
|
||||
LDA.b Scrap
|
||||
LDA.b Scrap00 : LDA.b Scrap04
|
||||
LDA.b Scrap02 : LDA.b Scrap06
|
||||
RTL
|
||||
;================================================================================
|
||||
LoadElectroPalette:
|
||||
REP #$20
|
||||
LDA.w #$0202 : STA.b Scrap0C
|
||||
LDA.w #$0404 : STA.b Scrap0E
|
||||
LDA.w #$001B : STA.b Scrap02
|
||||
SEP #$10
|
||||
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.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.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.b NMICGRAM
|
||||
RTL
|
||||
;================================================================================
|
||||
ConditionalLoadGearPalette:
|
||||
STA.b Scrap00
|
||||
SEP #$20
|
||||
LDA.l DisableFlashing : REP #$20 : BNE +
|
||||
LDA.b Scrap,X
|
||||
-
|
||||
LDA.b [Scrap00]
|
||||
STA.l PaletteBuffer, X
|
||||
INC.b Scrap00 : INC.b Scrap00
|
||||
INX #2
|
||||
DEY
|
||||
BPL -
|
||||
RTS
|
||||
+
|
||||
LDA.b Scrap
|
||||
-
|
||||
LDA.b [Scrap00]
|
||||
LDA.l PaletteBuffer, X
|
||||
INC.b Scrap00 : INC.b Scrap00
|
||||
INX #2
|
||||
DEY
|
||||
BPL -
|
||||
RTS
|
||||
;================================================================================
|
||||
RestoreElectroPalette:
|
||||
REP #$30
|
||||
LDX.w #$01B2 : LDY.w #$0002
|
||||
JSR FillPaletteBufferFromAux
|
||||
LDX.w #$01B8 : LDY.w #$0003
|
||||
JSR FillPaletteBufferFromAux
|
||||
LDX.w #$01E2 : LDY.w #$000E
|
||||
JSR FillPaletteBufferFromAux
|
||||
SEP #$30
|
||||
INC.b NMICGRAM
|
||||
RTL
|
||||
;================================================================================
|
||||
FillPaletteBufferFromAux:
|
||||
-
|
||||
LDA.l PaletteBufferAux, X
|
||||
STA.l PaletteBuffer, X
|
||||
INX #2
|
||||
DEY
|
||||
BPL -
|
||||
RTS
|
||||
BIN
asar-x64.dll
Normal file
BIN
asar-x64.dll
Normal file
Binary file not shown.
421
asar.py
Normal file
421
asar.py
Normal file
@@ -0,0 +1,421 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
python interface for asar.dll
|
||||
by randomdude999
|
||||
|
||||
Usage: import asar, call asar.init, call asar.patch, then use the various
|
||||
functions to get info about the patch
|
||||
"""
|
||||
|
||||
import ctypes
|
||||
import enum
|
||||
import sys
|
||||
from ctypes import c_int, c_char_p, POINTER
|
||||
c_int_ptr = POINTER(c_int)
|
||||
|
||||
__all__ = ["errordata", "writtenblockdata", "mappertype", "version",
|
||||
"apiversion", "init", "reset", "patch", "maxromsize", "close",
|
||||
"geterrors", "getwarnings", "getprints", "getalllabels",
|
||||
"getlabelval", "getdefine", "getalldefines", "resolvedefines",
|
||||
"math", "getwrittenblocks", "getmapper", "getsymbolsfile"]
|
||||
_target_api_ver = 303
|
||||
_asar = None
|
||||
|
||||
|
||||
class AsarArithmeticError(ArithmeticError):
|
||||
pass
|
||||
|
||||
|
||||
class errordata(ctypes.Structure):
|
||||
_fields_ = [("fullerrdata", c_char_p),
|
||||
("rawerrdata", c_char_p),
|
||||
("block", c_char_p),
|
||||
("filename", c_char_p),
|
||||
("line", c_int),
|
||||
("callerfilename", c_char_p),
|
||||
("callerline", c_int),
|
||||
("errid", c_int)]
|
||||
|
||||
def __repr__(self):
|
||||
return "<asar error: {!r}>".format(self.fullerrdata.decode())
|
||||
|
||||
|
||||
# for internal use only. getalllabels() returns a dict.
|
||||
class _labeldata(ctypes.Structure):
|
||||
_fields_ = [("name", c_char_p),
|
||||
("location", c_int)]
|
||||
|
||||
|
||||
# for internal use only. getalldefines() returns a dict.
|
||||
class _definedata(ctypes.Structure):
|
||||
_fields_ = [("name", c_char_p),
|
||||
("contents", c_char_p)]
|
||||
|
||||
|
||||
class writtenblockdata(ctypes.Structure):
|
||||
_fields_ = [("pcoffset", c_int),
|
||||
("snesoffset", c_int),
|
||||
("numbytes", c_int)]
|
||||
|
||||
def __repr__(self):
|
||||
return "<written block ${:06x} 0x{:x} size:{}>".format(
|
||||
self.snesoffset, self.pcoffset, self.numbytes)
|
||||
|
||||
|
||||
# internal use only. patch() accepts a dict.
|
||||
class _memoryfile(ctypes.Structure):
|
||||
_fields_ = [("path", c_char_p),
|
||||
("buffer", c_char_p),
|
||||
("length", ctypes.c_size_t)]
|
||||
|
||||
|
||||
# internal use only. patch() accepts a dict.
|
||||
class _warnsetting(ctypes.Structure):
|
||||
_fields_ = [("warnid", c_char_p),
|
||||
("enabled", ctypes.c_bool)]
|
||||
|
||||
|
||||
# For internal use only.
|
||||
class _patchparams(ctypes.Structure):
|
||||
_fields_ = [("structsize", c_int),
|
||||
("patchloc", c_char_p),
|
||||
("romdata", c_char_p),
|
||||
("buflen", c_int),
|
||||
("romlen", c_int_ptr),
|
||||
("includepaths", POINTER(c_char_p)),
|
||||
("numincludepaths", c_int),
|
||||
("should_reset", ctypes.c_bool),
|
||||
("additional_defines", POINTER(_definedata)),
|
||||
("additional_define_count", c_int),
|
||||
("stdincludesfile", c_char_p),
|
||||
("stddefinesfile", c_char_p),
|
||||
("warning_settings", POINTER(_warnsetting)),
|
||||
("warning_setting_count", c_int),
|
||||
("memory_files", POINTER(_memoryfile)),
|
||||
("memory_file_count", c_int),
|
||||
("override_checksum_gen", ctypes.c_bool),
|
||||
("generate_checksum", ctypes.c_bool)]
|
||||
|
||||
|
||||
class mappertype(enum.Enum):
|
||||
invalid_mapper = 0
|
||||
lorom = 1
|
||||
hirom = 2
|
||||
sa1rom = 3
|
||||
bigsa1rom = 4
|
||||
sfxrom = 5
|
||||
exlorom = 6
|
||||
exhirom = 7
|
||||
norom = 8
|
||||
|
||||
|
||||
def _getall(func):
|
||||
"""Helper that does the work common to all the getall* functions."""
|
||||
count = c_int()
|
||||
raw_errs = func(ctypes.byref(count))
|
||||
errs = []
|
||||
for i in range(count.value):
|
||||
errs.append(raw_errs[i])
|
||||
return errs
|
||||
|
||||
|
||||
class _AsarDLL:
|
||||
def __init__(self, dllname):
|
||||
dll = ctypes.CDLL(dllname)
|
||||
self.dll = dll
|
||||
self.funcs = {}
|
||||
try:
|
||||
# argument/return type setup
|
||||
# (also verifies that those functions are exported from the DLL)
|
||||
# this is directly from asardll.h
|
||||
# setup_func(name, argtypes, returntype)
|
||||
self.setup_func("version", (), c_int)
|
||||
self.setup_func("apiversion", (), c_int)
|
||||
self.setup_func("init", (), ctypes.c_bool)
|
||||
self.setup_func("reset", (), ctypes.c_bool)
|
||||
self.setup_func("patch", (c_char_p, c_char_p, c_int, c_int_ptr),
|
||||
ctypes.c_bool)
|
||||
self.setup_func("patch_ex", (POINTER(_patchparams),), ctypes.c_bool)
|
||||
self.setup_func("maxromsize", (), c_int)
|
||||
self.setup_func("close", (), None)
|
||||
self.setup_func("geterrors", (c_int_ptr,), POINTER(errordata))
|
||||
self.setup_func("getwarnings", (c_int_ptr,), POINTER(errordata))
|
||||
self.setup_func("getprints", (c_int_ptr,), POINTER(c_char_p))
|
||||
self.setup_func("getalllabels", (c_int_ptr,), POINTER(_labeldata))
|
||||
self.setup_func("getlabelval", (c_char_p,), c_int)
|
||||
self.setup_func("getdefine", (c_char_p,), c_char_p)
|
||||
self.setup_func("getalldefines", (c_int_ptr,), POINTER(_definedata))
|
||||
self.setup_func("resolvedefines", (c_char_p, ctypes.c_bool),
|
||||
c_char_p)
|
||||
self.setup_func("math", (c_char_p, POINTER(c_char_p)),
|
||||
ctypes.c_double)
|
||||
self.setup_func("getwrittenblocks", (c_int_ptr,),
|
||||
POINTER(writtenblockdata))
|
||||
self.setup_func("getmapper", (), c_int)
|
||||
self.setup_func("getsymbolsfile", (c_char_p,), c_char_p)
|
||||
|
||||
except AttributeError:
|
||||
raise OSError("Asar DLL is missing some functions")
|
||||
api_ver = dll.asar_apiversion()
|
||||
if api_ver < _target_api_ver or \
|
||||
(api_ver // 100) > (_target_api_ver // 100):
|
||||
raise OSError("Asar DLL version "+str(api_ver)+" unsupported")
|
||||
|
||||
def setup_func(self, name, argtypes, restype):
|
||||
"""Setup argument and return types for a function.
|
||||
|
||||
name: name of the function in the DLL. "asar_" is added automatically
|
||||
argtypes and restype: see ctypes documentation
|
||||
"""
|
||||
func = getattr(self.dll, "asar_" + name)
|
||||
func.argtypes = argtypes
|
||||
func.restype = restype
|
||||
|
||||
|
||||
def init(dll_path=None):
|
||||
"""Load the Asar DLL.
|
||||
|
||||
You must call this before calling any other Asar functions. Raises OSError
|
||||
if there was something wrong with the DLL (not found, wrong version,
|
||||
doesn't have all necessary functions).
|
||||
You can pass a custom DLL path if you want. If you don't, some common names
|
||||
for the asar dll are tried.
|
||||
"""
|
||||
global _asar
|
||||
if _asar is not None:
|
||||
return
|
||||
|
||||
if dll_path is not None:
|
||||
_asar = _AsarDLL(dll_path)
|
||||
else:
|
||||
if sys.platform == "win32":
|
||||
libnames = ["./asar.dll", "asar", "./asar-x64.dll", "asar-x64"]
|
||||
elif sys.platform == "darwin":
|
||||
libnames = ["./libasar.dylib", "libasar"]
|
||||
else:
|
||||
libnames = ["./libasar.so", "libasar"]
|
||||
|
||||
for x in libnames:
|
||||
try:
|
||||
_asar = _AsarDLL(x)
|
||||
except OSError:
|
||||
continue
|
||||
|
||||
if _asar is None:
|
||||
# Nothing in the search path is valid
|
||||
raise OSError("Could not find asar DLL")
|
||||
|
||||
if not _asar.dll.asar_init():
|
||||
_asar = None
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def close():
|
||||
"""Free all of Asar's structures and unload the module.
|
||||
|
||||
Only asar.init() may be called after calling this.
|
||||
"""
|
||||
global _asar
|
||||
if _asar is None:
|
||||
return
|
||||
_asar.dll.asar_close()
|
||||
_asar = None
|
||||
|
||||
|
||||
def version():
|
||||
"""Return the version, in the format major*10000+minor*100+bugfix*1.
|
||||
|
||||
This means that 1.2.34 would be returned as 10234.
|
||||
"""
|
||||
return _asar.dll.asar_version()
|
||||
|
||||
|
||||
def apiversion():
|
||||
"""Return the API version, in the format major*100+minor.
|
||||
|
||||
Minor is incremented on backwards compatible changes; major is incremented
|
||||
on incompatible changes. Does not have any correlation with the Asar
|
||||
version. It's not very useful directly, since asar.init() verifies this
|
||||
automatically.
|
||||
"""
|
||||
return _asar.dll.asar_apiversion()
|
||||
|
||||
|
||||
def reset():
|
||||
"""Clear out errors, warnings, printed statements and the file cache.
|
||||
|
||||
Not really useful, since asar.patch() already does this.
|
||||
"""
|
||||
return _asar.dll.asar_reset()
|
||||
|
||||
|
||||
def patch(patch_name, rom_data, includepaths=[], should_reset=True,
|
||||
additional_defines={}, std_include_file=None, std_define_file=None,
|
||||
warning_overrides={}, memory_files={}, override_checksum=None):
|
||||
"""Applies a patch.
|
||||
|
||||
Returns (success, new_rom_data). If success is False you should call
|
||||
geterrors() to see what went wrong. rom_data is assumed to be headerless.
|
||||
|
||||
If includepaths is specified, it lists additional include paths for asar
|
||||
to search.
|
||||
|
||||
should_reset specifies whether asar should clear out all defines, labels,
|
||||
etc from the last inserted file. Setting it to False will make Asar act
|
||||
like the currently patched file was directly appended to the previous one.
|
||||
|
||||
additional_defines specifies extra defines to give to the patch
|
||||
(similar to the -D option).
|
||||
|
||||
std_include_file and std_define_file specify files where to look for extra
|
||||
include paths and defines, respectively.
|
||||
|
||||
warning_overrides is a dict of str (warning ID) -> bool. It overrides
|
||||
enabling/disabling specific warnings.
|
||||
|
||||
memory_files is a dict of str (file name) -> bytes (file contents). It
|
||||
specifies memory files to use.
|
||||
|
||||
override_checksum specifies whether to override checksum generation. True
|
||||
forces Asar to update the ROM's checksum, False forces Asar to not update
|
||||
it.
|
||||
"""
|
||||
romlen = c_int(len(rom_data))
|
||||
rom_ptr = ctypes.create_string_buffer(bytes(rom_data), maxromsize())
|
||||
pp = _patchparams()
|
||||
pp.structsize = ctypes.sizeof(_patchparams)
|
||||
pp.patchloc = patch_name.encode()
|
||||
pp.romdata = ctypes.cast(rom_ptr, c_char_p)
|
||||
pp.buflen = maxromsize()
|
||||
pp.romlen = ctypes.pointer(romlen)
|
||||
|
||||
# construct an array type of len(includepaths) elements and initialize
|
||||
# it with elements from includepaths
|
||||
pp.includepaths = (c_char_p*len(includepaths))(*includepaths)
|
||||
pp.numincludepaths = len(includepaths)
|
||||
|
||||
defines = (_definedata * len(additional_defines))()
|
||||
for i, (k, v) in enumerate(additional_defines.items()):
|
||||
defines[i].name = k.encode()
|
||||
defines[i].contents = v.encode()
|
||||
pp.additional_defines = defines
|
||||
pp.additional_define_count = len(additional_defines)
|
||||
|
||||
pp.should_reset = should_reset
|
||||
|
||||
pp.stdincludesfile = std_include_file.encode() if std_include_file else None
|
||||
pp.stddefinesfile = std_define_file.encode() if std_define_file else None
|
||||
|
||||
warnsettings = (_warnsetting * len(warning_overrides))()
|
||||
for i, (k, v) in enumerate(warning_overrides.items()):
|
||||
warnsettings[i].warnid = k.encode()
|
||||
warnsettings[i].enabled = v
|
||||
pp.warning_settings = warnsettings
|
||||
pp.warning_setting_count = len(warnsettings)
|
||||
|
||||
memoryfiles = (_memoryfile * len(memory_files))()
|
||||
for i, (k, v) in enumerate(memory_files.items()):
|
||||
memoryfiles[i].path = k.encode()
|
||||
memoryfiles[i].buffer = v
|
||||
memoryfiles[i].length = len(v)
|
||||
pp.memory_files = memoryfiles
|
||||
pp.memory_file_count = len(memory_files)
|
||||
|
||||
if override_checksum is not None:
|
||||
pp.override_checksum_gen = True
|
||||
pp.generate_checksum = override_checksum
|
||||
else:
|
||||
pp.override_checksum_gen = False
|
||||
pp.generate_checksum = False
|
||||
|
||||
result = _asar.dll.asar_patch_ex(ctypes.byref(pp))
|
||||
return result, rom_ptr.raw[:romlen.value]
|
||||
|
||||
|
||||
def maxromsize():
|
||||
"""Return the maximum possible size of the output ROM."""
|
||||
return _asar.dll.asar_maxromsize()
|
||||
|
||||
|
||||
def geterrors():
|
||||
"""Get a list of all errors."""
|
||||
return _getall(_asar.dll.asar_geterrors)
|
||||
|
||||
|
||||
def getwarnings():
|
||||
"""Get a list of all warnings."""
|
||||
return _getall(_asar.dll.asar_getwarnings)
|
||||
|
||||
|
||||
def getprints():
|
||||
"""Get a list of all printed data."""
|
||||
return [x.decode() for x in _getall(_asar.dll.asar_getprints)]
|
||||
|
||||
|
||||
def getalllabels():
|
||||
"""Get a dictionary of label name -> SNES address."""
|
||||
labeldatas = _getall(_asar.dll.asar_getalllabels)
|
||||
return {x.name.decode(): x.location for x in labeldatas}
|
||||
|
||||
|
||||
def getlabelval(name):
|
||||
"""Get the ROM location of one label. None means "not found"."""
|
||||
val = _asar.dll.asar_getlabelval(name.encode())
|
||||
return None if (val == -1) else val
|
||||
|
||||
|
||||
def getdefine(name):
|
||||
"""Get the value of a define."""
|
||||
return _asar.dll.asar_getdefine(name.encode()).decode()
|
||||
|
||||
|
||||
def getalldefines():
|
||||
"""Get the names and values of all defines."""
|
||||
definedatas = _getall(_asar.dll.asar_getalldefines)
|
||||
return {x.name.decode(): x.contents.decode() for x in definedatas}
|
||||
|
||||
|
||||
def resolvedefines(data, learnnew):
|
||||
"""Parse all defines in the given data.
|
||||
|
||||
Returns the data with all defines evaluated.
|
||||
learnnew controls whether it'll learn new defines in this string if it
|
||||
finds any. Note that it may emit errors.
|
||||
"""
|
||||
return _asar.dll.asar_resolvedefines(data, learnnew)
|
||||
|
||||
|
||||
def math(to_calculate):
|
||||
"""Parse a string containing math.
|
||||
|
||||
It automatically assumes global scope (no namespaces), and has access to
|
||||
all functions and labels from the last call to asar.patch(). If there was
|
||||
an error, ArithmeticError is raised with the message returned by Asar.
|
||||
"""
|
||||
error = ctypes.c_char_p()
|
||||
result = _asar.dll.asar_math(to_calculate.encode(), ctypes.byref(error))
|
||||
if not bool(error):
|
||||
# Null pointer, means no error
|
||||
return result
|
||||
else:
|
||||
raise AsarArithmeticError(error.value.decode())
|
||||
|
||||
|
||||
def getwrittenblocks():
|
||||
"""Get a list of all the blocks written to the ROM."""
|
||||
return _getall(_asar.dll.asar_getwrittenblocks)
|
||||
|
||||
|
||||
def getmapper():
|
||||
"""Get the ROM mapper currently used by Asar."""
|
||||
return mappertype(_asar.dll.asar_getmapper())
|
||||
|
||||
def getsymbolsfile(fmt="wla"):
|
||||
"""Generates the contents of a symbols file for in a specific format.
|
||||
|
||||
Returns the textual contents of the symbols file.
|
||||
format specified the format of the symbols file that gets generated.
|
||||
"""
|
||||
return _asar.dll.asar_getsymbolsfile(fmt.encode()).decode()
|
||||
BIN
bin/linux/asar
Executable file
BIN
bin/linux/asar
Executable file
Binary file not shown.
BIN
bin/macos/asar
Executable file
BIN
bin/macos/asar
Executable file
Binary file not shown.
BIN
bin/windows/asar.exe
Normal file
BIN
bin/windows/asar.exe
Normal file
Binary file not shown.
135
bookofmudora.asm
135
bookofmudora.asm
@@ -2,23 +2,24 @@
|
||||
; Randomize Book of Mudora
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadLibraryItemGFX:
|
||||
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
||||
STA $0E80, X ; Store item type
|
||||
JSL.l PrepDynamicTile
|
||||
LDA.l LibraryItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
||||
JSL AttemptItemSubstitution
|
||||
JSL ResolveLootIDLong
|
||||
STA.w SpriteID, X
|
||||
JSL PrepDynamicTile_loot_resolved
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawLibraryItemGFX:
|
||||
PHA
|
||||
LDA $0E80, X ; Retrieve stored item type
|
||||
JSL.l DrawDynamicTile
|
||||
PLA
|
||||
PHA
|
||||
LDA.w SpriteID, X
|
||||
JSL DrawDynamicTile
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
SetLibraryItem:
|
||||
PHA
|
||||
LDY $0E80, X ; Retrieve stored item type
|
||||
PLA
|
||||
JSL.l ItemSet_Library ; contains thing we wrote over
|
||||
LDY.w SpriteID, X
|
||||
JSL ItemSet_Library ; contains thing we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -26,52 +27,90 @@ 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
|
||||
JSL.l PrepDynamicTile
|
||||
LDA.b #$00 : STA.l RedrawFlag
|
||||
JSR LoadBonkItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
JSR LoadBonkItem
|
||||
JSL AttemptItemSubstitution
|
||||
JSL ResolveLootIDLong
|
||||
STA.w $0E80, X
|
||||
STA.w SpriteID, X
|
||||
JSL PrepDynamicTile
|
||||
PHA : PHX
|
||||
LDA.w SpriteID,X : TAX
|
||||
LDA.l SpriteProperties_standing_width,X : BNE +
|
||||
LDA.b #$00 : STA.l SpriteOAM : STA.l SpriteOAM+8
|
||||
+
|
||||
PLX : PLA
|
||||
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.l RedrawFlag : BEQ .skipInit
|
||||
JSL LoadBonkItemGFX_inner
|
||||
BRA .done ; don't draw on the init frame
|
||||
|
||||
.skipInit
|
||||
LDA.w SpriteID,X
|
||||
JSL DrawDynamicTileNoShadow
|
||||
|
||||
.done
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
GiveBonkItem:
|
||||
JSR LoadBonkItem
|
||||
CMP #$24 : BNE .notKey
|
||||
.key
|
||||
PHY : LDY.b #$24 : JSL.l AddInventory : PLY ; do inventory processing for a small key
|
||||
LDA $7EF36F : INC A : STA $7EF36F
|
||||
LDA.b #$2F : JSL.l Sound_SetSfx3PanLong
|
||||
RTL
|
||||
JSR LoadBonkItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
JSR LoadBonkItem
|
||||
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
|
||||
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
|
||||
++
|
||||
RTS
|
||||
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.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
|
||||
|
||||
81
boots.asm
81
boots.asm
@@ -1,15 +1,76 @@
|
||||
;================================================================================
|
||||
; Boots State Modifier
|
||||
;--------------------------------------------------------------------------------
|
||||
!BOOTS_MODIFIER = "$7F50CE"
|
||||
ModifyBoots:
|
||||
PHA
|
||||
LDA !BOOTS_MODIFIER : CMP.b #$01 : BNE +
|
||||
PLA : AND $7EF379 : ORA.b #$04 : RTL ; yes boots
|
||||
+ : CMP #$02 : BNE +
|
||||
PLA : AND $7EF379 : AND.b #$FB : RTL ; no boots
|
||||
+
|
||||
PLA
|
||||
AND $7EF379 ; regular boots
|
||||
PHA
|
||||
LDA.l BootsModifier : CMP.b #$01 : BNE +
|
||||
PLA : AND.l AbilityFlags : ORA.b #$04 : RTL ; yes boots
|
||||
+ : CMP.b #$02 : BNE +
|
||||
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.l AbilityFlags ; regular boots
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
AddBonkTremors:
|
||||
PHA
|
||||
LDA.b LinkIncapacitatedTimer : BNE + ; Check for incapacitated Link
|
||||
JSL IncrementBonkCounter
|
||||
+
|
||||
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
||||
LDA.l BootsEquipment : BNE + ; Check for Boots
|
||||
PLA : RTL
|
||||
+
|
||||
PLA
|
||||
JSL AddDashTremor : JSL Player_ApplyRumbleToSprites ; things we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
BonkBreakableWall:
|
||||
PHX : PHP
|
||||
SEP #$30 ; set 8-bit accumulator and index registers
|
||||
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
||||
LDA.l BootsEquipment : BNE + ; Check for Boots
|
||||
PLP : PLX : LDA.w #$0000 : RTL
|
||||
+
|
||||
PLP : PLX
|
||||
LDA.w LinkDashing : AND.w #$00FF ; things we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
BonkRockPile:
|
||||
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
||||
LDA.l BootsEquipment : BNE + ; Check for Boots
|
||||
LDA.b #$00 : RTL
|
||||
+
|
||||
LDA.w TileActBE : AND.b #$70 ; things we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
GravestoneHook:
|
||||
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
||||
LDA.l BootsEquipment : BEQ .done ; Check for Boots
|
||||
+
|
||||
LDA.w LinkDashing : BEQ .done ; things we wrote over
|
||||
JML moveGravestone
|
||||
.done
|
||||
JML GravestoneHook_continue
|
||||
;--------------------------------------------------------------------------------
|
||||
JumpDownLedge:
|
||||
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
||||
LDA.l BootsEquipment : BNE + ; Check for Boots
|
||||
; Disarm Waterwalk
|
||||
LDA.b LinkSlipping : CMP.b #$01 : BNE +
|
||||
STZ.b LinkSlipping
|
||||
+
|
||||
LDA.b IndoorsFlag : BNE .done : LDA.b #$02 : STA.b LinkLayer ; things we wrote over
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
BonkRecoil:
|
||||
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.b LinkRecoilZ ; things we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
208
bugfixes.asm
208
bugfixes.asm
@@ -2,8 +2,8 @@
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
AssignKiki:
|
||||
LDA.b #$00 : STA $7EF3D3 ; defuse bomb
|
||||
LDA.b #$0A : STA $7EF3CC ; assign kiki as follower
|
||||
LDA.b #$00 : STA.l FollowerDropped ; defuse bomb
|
||||
LDA.b #$0A : STA.l FollowerIndicator ; assign kiki as follower
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -11,10 +11,9 @@ RTL
|
||||
; Name: AllowSQ
|
||||
; Returns: Accumulator = 0 if S&Q is disallowed, 1 if allowed
|
||||
;--------------------------------------------------------------------------------
|
||||
!ITEM_BUSY = "$7F5091"
|
||||
AllowSQ:
|
||||
LDA $7EF3C5 : 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 +22,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 +31,11 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
;0 = Become (Perma)bunny
|
||||
DecideIfBunny:
|
||||
LDA $7EF357 : BEQ + : RTL : +
|
||||
LDA $7EF3CA : 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 +46,25 @@ RTL
|
||||
DecideIfBunnyByScreenIndex:
|
||||
; If indoors we don't have a screen index. Return non-bunny to make mirror-based
|
||||
; superbunny work
|
||||
LDA $1B : BEQ + : RTL : +
|
||||
LDA $7EF357 : BEQ + : RTL : +
|
||||
LDA $8A : AND.b #$40 : PHA
|
||||
LDA.b IndoorsFlag : BNE .done
|
||||
LDA.l MoonPearlEquipment : BNE .done
|
||||
LDA.b OverworldIndex : AND.b #$40 : 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 $7EF340, 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
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -82,12 +72,18 @@ RTS
|
||||
; bunny on the pyramid
|
||||
FixAga2Bunny:
|
||||
LDA.l FixFakeWorld : BEQ + ; Only use this fix is fakeworld fix is in use
|
||||
LDA.l InvertedMode : BEQ +++
|
||||
LDA.b #$00 : STA.l CurrentWorld ; Switch to light world
|
||||
BRA ++
|
||||
+++
|
||||
LDA.b #$40 : STA.l CurrentWorld ; Switch to dark world
|
||||
++
|
||||
JSL DecideIfBunny : BNE +
|
||||
JSR MakeBunny
|
||||
LDA.b #$04 : STA.w $012C ; play bunny music
|
||||
LDA.b #$04 : STA.w MusicControlRequest ; play bunny music
|
||||
BRA .done
|
||||
+
|
||||
LDA.b #$09 : STA.w $012C ; what we wrote over
|
||||
LDA.b #$09 : STA.w MusicControlRequest ; what we wrote over
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -95,8 +91,8 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
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
|
||||
@@ -106,46 +102,45 @@ RTS
|
||||
; fix issue where cross world caves (in Entrance randomizer) don't cause
|
||||
; frog to become smith or vice versa.
|
||||
FixFrogSmith:
|
||||
LDA.l $7EF3CA : BNE .darkWorld
|
||||
LDA.l $7EF3CC : CMP.b #$07 : BNE .done
|
||||
LDA.b #$08 : STA.l $7EF3CC ; make frog into smith in light world
|
||||
LDA.l CurrentWorld : BNE .darkWorld
|
||||
LDA.l FollowerIndicator : CMP.b #$07 : BNE .done
|
||||
LDA.b #$08 ; make frog into smith in light world
|
||||
BRA .loadgfx
|
||||
.darkWorld
|
||||
LDA.l $7EF3CC : CMP.b #$08 : BNE .done
|
||||
LDA.b #$07 : STA.l $7EF3CC ; make smith into frog in dark world
|
||||
LDA.l FollowerIndicator : CMP.b #$08 : BNE .done
|
||||
LDA.b #$07 ; make smith into frog in dark world
|
||||
.loadgfx
|
||||
STA.l FollowerIndicator
|
||||
JSL Tagalong_LoadGfx
|
||||
.done
|
||||
RTS
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
;Fix for PoD causing accidental Exploration Glitch
|
||||
PodEGFix:
|
||||
LDA Bugfix_PodEG : BNE .done
|
||||
LDA $040C : CMP.b #$0C : BNE .done ;check if we are in PoD
|
||||
STZ $047A ;disarm exploration glitch
|
||||
.done
|
||||
RTL
|
||||
; Fix for SQ jumping causing accidental Exploration Glitch
|
||||
SQEGFix:
|
||||
LDA.l Bugfix_PodEG : BEQ ++
|
||||
STZ.w LayerAdjustment ; disarm exploration glitch
|
||||
++ RTL
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; Fix crystal not spawning when using somaria vs boss
|
||||
TryToSpawnCrystalUntilSuccess:
|
||||
STX $02D8 ; what we overwrote
|
||||
JSL AddAncillaLong : BCC .spawned ; a clear carry flag indicates success
|
||||
.failed
|
||||
RTL
|
||||
.spawned
|
||||
STZ $AE ; the "trying to spawn crystal" flag
|
||||
STZ $AF ; the "trying to spawn pendant" flag
|
||||
STX.w ItemReceiptID ; what we overwrote
|
||||
JSL AddAncillaLong : BCS .failed ; a clear carry flag indicates success
|
||||
.spawned
|
||||
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
|
||||
|
||||
@@ -153,8 +148,8 @@ WallmasterCameraFix:
|
||||
; Fix losing glove colors
|
||||
LoadActualGearPalettesWithGloves:
|
||||
REP #$20
|
||||
LDA $7EF359 : STA $0C
|
||||
LDA $7EF35B : 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
|
||||
@@ -162,35 +157,98 @@ 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
|
||||
inx #2
|
||||
dey
|
||||
bpl -
|
||||
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
|
||||
inx #2
|
||||
dey
|
||||
bpl -
|
||||
LDA.b [Scrap00]
|
||||
STA.l PaletteBuffer, X
|
||||
INC.b Scrap00 : INC.b Scrap00
|
||||
INX #2
|
||||
DEY
|
||||
BPL -
|
||||
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
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
FixJingleGlitch:
|
||||
LDA.b GameSubMode
|
||||
BEQ .set_doors
|
||||
|
||||
LDA.l AllowAccidentalMajorGlitch
|
||||
BEQ .exit
|
||||
|
||||
.set_doors
|
||||
LDA.b #$05
|
||||
STA.b GameSubMode
|
||||
|
||||
.exit
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
; Fix spawning with more hearts than capacity when less than 3 heart containers
|
||||
pushpc
|
||||
org $09F4AC ; <- module_death.asm:331
|
||||
db $08, $08, $10
|
||||
pullpc
|
||||
;--------------------------------------------------------------------------------
|
||||
SetOverworldTransitionFlags:
|
||||
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
|
||||
RTL
|
||||
|
||||
.skipMostOfLine
|
||||
; Set line length to 192 bytes (the first 6 8x8 tiles in the line)
|
||||
LDX.w #$00C0 : STX.w DAS0L
|
||||
BRA .uploadLine
|
||||
;--------------------------------------------------------------------------------
|
||||
SetItemRiseTimer:
|
||||
LDA.w ItemReceiptMethod : CMP.b #$01 : BNE .not_from_chest
|
||||
LDA.b #$38 : STA.w AncillaTimer, X
|
||||
RTL
|
||||
.not_from_chest
|
||||
TYA : STA.w AncillaTimer, X ; What we wrote over
|
||||
RTL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
del ..\working.sfc
|
||||
copy ..\alttp.sfc ..\working.sfc
|
||||
xkas.exe LTTP_RND_GeneralBugfixes.asm ..\working.sfc
|
||||
cmd /k
|
||||
%~dp0bin\windows\asar.exe LTTP_RND_GeneralBugfixes.asm ..\working.sfc
|
||||
cmd /k
|
||||
|
||||
115
build.py
Normal file
115
build.py
Normal file
@@ -0,0 +1,115 @@
|
||||
import os
|
||||
import sys
|
||||
import hashlib
|
||||
|
||||
from asar import init as asar_init, close as asar_close, patch as asar_patch, geterrors as asar_errors, getprints as asar_prints, getwarnings as asar_warnings
|
||||
|
||||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||
|
||||
try:
|
||||
from yaml import CLoader as Loader
|
||||
except ImportError:
|
||||
from yaml import Loader
|
||||
|
||||
|
||||
def int16_as_bytes(value):
|
||||
value = value & 0xFFFF
|
||||
return [value & 0xFF, (value >> 8) & 0xFF]
|
||||
|
||||
|
||||
def int32_as_bytes(value):
|
||||
value = value & 0xFFFFFFFF
|
||||
return [value & 0xFF, (value >> 8) & 0xFF, (value >> 16) & 0xFF, (value >> 24) & 0xFF]
|
||||
|
||||
|
||||
def is_bundled():
|
||||
return getattr(sys, 'frozen', False)
|
||||
|
||||
|
||||
def local_path(path):
|
||||
if local_path.cached_path:
|
||||
return os.path.join(local_path.cached_path, path)
|
||||
|
||||
elif is_bundled():
|
||||
if hasattr(sys, "_MEIPASS"):
|
||||
# we are running in a PyInstaller bundle
|
||||
local_path.cached_path = sys._MEIPASS # pylint: disable=protected-access,no-member
|
||||
else:
|
||||
# cx_Freeze
|
||||
local_path.cached_path = os.path.dirname(os.path.abspath(sys.argv[0]))
|
||||
else:
|
||||
# we are running in a normal Python environment
|
||||
import __main__
|
||||
local_path.cached_path = os.path.dirname(os.path.abspath(__main__.__file__))
|
||||
|
||||
return os.path.join(local_path.cached_path, path)
|
||||
|
||||
|
||||
local_path.cached_path = None
|
||||
|
||||
|
||||
def make_new_base2current(old_rom_data, new_rom_data):
|
||||
from collections import OrderedDict
|
||||
import json
|
||||
# extend to 2 mb
|
||||
old_rom_data.extend(bytearray([0x00]) * (2097152 - len(old_rom_data)))
|
||||
|
||||
out_data = OrderedDict()
|
||||
for idx, old in enumerate(old_rom_data):
|
||||
new = new_rom_data[idx]
|
||||
if old != new:
|
||||
out_data[idx] = [int(new)]
|
||||
for offset in reversed(list(out_data.keys())):
|
||||
if offset - 1 in out_data:
|
||||
out_data[offset-1].extend(out_data.pop(offset))
|
||||
with open('../base2current.json', 'wt') as outfile:
|
||||
json.dump([{key: value} for key, value in out_data.items()], outfile, separators=(",", ":"))
|
||||
|
||||
basemd5 = hashlib.md5()
|
||||
basemd5.update(new_rom_data)
|
||||
return "New Rom Hash: " + basemd5.hexdigest()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
asar_init()
|
||||
print("Asar DLL initialized")
|
||||
|
||||
print("Opening Base rom")
|
||||
with open('../alttp.sfc', 'rb') as stream:
|
||||
old_rom_data = bytearray(stream.read())
|
||||
|
||||
if len(old_rom_data) % 0x400 == 0x200:
|
||||
old_rom_data = old_rom_data[0x200:]
|
||||
|
||||
basemd5 = hashlib.md5()
|
||||
basemd5.update(old_rom_data)
|
||||
if JAP10HASH != basemd5.hexdigest():
|
||||
raise Exception("Base rom is not 'Zelda no Densetsu - Kamigami no Triforce (J) (V1.0)'")
|
||||
|
||||
print("Patching Base Rom")
|
||||
result, new_rom_data = asar_patch(os.path.abspath('LTTP_RND_GeneralBugfixes.asm'), old_rom_data)
|
||||
|
||||
if result:
|
||||
with open('../working.sfc', 'wb') as stream:
|
||||
stream.write(new_rom_data)
|
||||
print("Success\n")
|
||||
print(make_new_base2current(old_rom_data, new_rom_data))
|
||||
prints = asar_prints()
|
||||
for p in prints:
|
||||
print(p)
|
||||
else:
|
||||
errors = asar_errors()
|
||||
print("\nErrors: " + str(len(errors)))
|
||||
for error in errors:
|
||||
print (error)
|
||||
warnings = asar_warnings()
|
||||
print("\nWarnings: " + str(len(warnings)))
|
||||
for w in warnings:
|
||||
print(w)
|
||||
|
||||
asar_close()
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
9
build.sh
9
build.sh
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm ../working.sfc
|
||||
cp ../alttp.sfc ../working.sfc
|
||||
./xkas 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
|
||||
|
||||
5
build_linux.sh
Executable file
5
build_linux.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm ../working.sfc
|
||||
cp ../alttp.sfc ../working.sfc
|
||||
./bin/linux/asar -DFEATURE_PATREON_SUPPORTERS=1 LTTP_RND_GeneralBugfixes.asm ../working.sfc
|
||||
@@ -1,42 +1,27 @@
|
||||
;================================================================================
|
||||
; Capacity Logic
|
||||
;================================================================================
|
||||
!BOMB_UPGRADES = "$7EF370"
|
||||
!BOMB_CURRENT = "$7EF343"
|
||||
;--------------------------------------------------------------------------------
|
||||
IncrementBombs:
|
||||
LDA !BOMB_UPGRADES ; get bomb upgrades
|
||||
!ADD.l StartingMaxBombs : DEC
|
||||
|
||||
CMP !BOMB_CURRENT
|
||||
|
||||
!BLT +
|
||||
LDA !BOMB_CURRENT
|
||||
CMP.b #99 : !BGE +
|
||||
INC : STA !BOMB_CURRENT
|
||||
+
|
||||
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
|
||||
;--------------------------------------------------------------------------------
|
||||
!ARROW_UPGRADES = "$7EF371"
|
||||
!ARROW_CURRENT = "$7EF377"
|
||||
;--------------------------------------------------------------------------------
|
||||
IncrementArrows:
|
||||
LDA !ARROW_UPGRADES ; get arrow upgrades
|
||||
!ADD.l StartingMaxArrows : DEC
|
||||
|
||||
CMP !ARROW_CURRENT
|
||||
|
||||
!BLT +
|
||||
LDA !ARROW_CURRENT
|
||||
CMP.b #99 : !BGE +
|
||||
INC : STA !ARROW_CURRENT
|
||||
+
|
||||
LDA.l ArrowCapacity : DEC
|
||||
CMP.l CurrentArrows : !BLT +
|
||||
LDA.l CurrentArrows
|
||||
CMP.b #99 : !BGE +
|
||||
INC : STA.l CurrentArrows
|
||||
+
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
CompareBombsToMax:
|
||||
LDA !BOMB_UPGRADES ; get bomb upgrades
|
||||
!ADD.l StartingMaxBombs
|
||||
|
||||
CMP !BOMB_CURRENT
|
||||
LDA.l BombCapacity
|
||||
CMP.l BombsEquipment
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
39
catfish.asm
39
catfish.asm
@@ -1,39 +0,0 @@
|
||||
;================================================================================
|
||||
; Randomize Catfish
|
||||
;--------------------------------------------------------------------------------
|
||||
!HEART_REDRAW = "$7F5000"
|
||||
LoadCatfishItemGFX:
|
||||
LDA.l $1DE185 ; location randomizer writes catfish item to
|
||||
JSL.l PrepDynamicTile
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
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
|
||||
JSL.l DrawDynamicTile
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
MarkThrownItem:
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
|
||||
LDA $8A : CMP.b #$81 : BNE .catfish
|
||||
|
||||
.zora
|
||||
JSL.l ItemSet_ZoraKing
|
||||
BRA .done
|
||||
|
||||
.catfish
|
||||
JSL.l ItemSet_Catfish
|
||||
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
250
clock.asm
250
clock.asm
@@ -1,250 +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
|
||||
JSL.l Clock_IsSupported
|
||||
RTL
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; 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 + ; check for clock chip ready signal
|
||||
CPX.b #$0E : !BLT ++ : CLC : BRA .done : ++ ; if we've read 14 bytes with no success, unset carry and exit
|
||||
INX
|
||||
BRA - : +
|
||||
SEC ; found a clock chip
|
||||
.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 : BRL .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 : BRL .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
|
||||
;--------------------------------------------------------------------------------
|
||||
152
compasses.asm
152
compasses.asm
@@ -1,152 +0,0 @@
|
||||
;--------------------------------------------------------------------------------
|
||||
; $7F5010 - Scratch Space
|
||||
;--------------------------------------------------------------------------------
|
||||
; The number of items in a dungeon never changes. use this macro instead of
|
||||
; HexToDec when drawing the "??/XX" item counter
|
||||
; %DrawConstantNumber(1,4) draws 14
|
||||
;--------------------------------------------------------------------------------
|
||||
macro DrawConstantNumber(digit1,digit2)
|
||||
LDA.w #$2490+<digit1> : STA $7EC79A
|
||||
LDA.w #$2490+<digit2> : STA $7EC79C
|
||||
endmacro
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
DrawDungeonCompassCounts:
|
||||
LDX $1B : BNE + : RTL : + ; Skip if outdoors
|
||||
LDX $040C : CPX.b #$FF : BNE + : RTL : + ; Skip if not in a dungeon
|
||||
|
||||
CMP.w #$0002 : BEQ ++ ; if CompassMode==2, we don't check for the compass
|
||||
LDA $7EF364 : AND.l .item_masks, X ; Load compass values to A, mask with dungeon item masks
|
||||
BNE + : RTL : + ; skip if we don't have compass
|
||||
++
|
||||
|
||||
JMP (CompassCountDungeonHandlers, X) : .return_spot
|
||||
|
||||
; we switch to 8-bit A in the jump before this
|
||||
JSR HudHexToDec2Digit
|
||||
REP #$20
|
||||
|
||||
LDX.b $06 : TXA : ORA #$2400 : STA $7EC794 ; Draw the item count
|
||||
LDX.b $07 : TXA : ORA #$2400 : STA $7EC796
|
||||
|
||||
LDA.w #$2830 : STA $7EC798 ; draw the slash
|
||||
|
||||
.done
|
||||
RTL
|
||||
|
||||
.item_masks ; 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
|
||||
|
||||
CompassCountDungeonHandlers: ; pointers to functions that handle dungeon-specific code
|
||||
dw CompassCount_Escape, CompassCount_Escape ; (hyrule castle, sewers)
|
||||
dw CompassCount_Eastern, CompassCount_Desert, CompassCount_Agah
|
||||
dw CompassCount_Swamp, CompassCount_PoD, CompassCount_Mire
|
||||
dw CompassCount_Skull, CompassCount_Ice, CompassCount_Hera
|
||||
dw CompassCount_Thieves, CompassCount_Trock, CompassCount_Gt
|
||||
}
|
||||
|
||||
CompassCount_Escape:
|
||||
%DrawConstantNumber(0,8)
|
||||
SEP #$20
|
||||
LDA $7EF434 : LSR #4
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Eastern:
|
||||
%DrawConstantNumber(0,6)
|
||||
SEP #$20
|
||||
LDA $7EF436 : AND.b #$07
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Desert:
|
||||
%DrawConstantNumber(0,6)
|
||||
SEP #$20
|
||||
LDA $7EF435 : LSR #5
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Agah:
|
||||
%DrawConstantNumber(0,2)
|
||||
SEP #$20
|
||||
LDA $7EF435 : AND.b #$02
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Swamp:
|
||||
%DrawConstantNumber(1,0)
|
||||
SEP #$20
|
||||
LDA $7EF439 : AND.b #$0F
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_PoD:
|
||||
%DrawConstantNumber(1,4)
|
||||
SEP #$20
|
||||
LDA $7EF434 : AND.b #$0F
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Mire:
|
||||
%DrawConstantNumber(0,8)
|
||||
SEP #$20
|
||||
LDA $7EF438 : AND.b #$0F
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Skull:
|
||||
%DrawConstantNumber(0,8)
|
||||
SEP #$20
|
||||
LDA $7EF437 : LSR #4
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Ice:
|
||||
%DrawConstantNumber(0,8)
|
||||
SEP #$20
|
||||
LDA $7EF438 : LSR #4
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Hera:
|
||||
%DrawConstantNumber(0,6)
|
||||
SEP #$20
|
||||
LDA $7EF435 : AND.b #$1C : LSR #2
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Thieves:
|
||||
%DrawConstantNumber(0,8)
|
||||
SEP #$20
|
||||
LDA $7EF437 : AND.b #$0F
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Trock:
|
||||
%DrawConstantNumber(1,2)
|
||||
SEP #$20
|
||||
LDA $7EF439 : LSR #4
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Gt:
|
||||
%DrawConstantNumber(2,7)
|
||||
SEP #$20
|
||||
LDA $7EF436 : LSR #3
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; $7EF434 - hhhhdddd - item locations checked
|
||||
; h - hyrule castle/sewers
|
||||
; d - palace of darkness
|
||||
;--------------------------------------------------------------------------------
|
||||
; $7EF435 - dddhhhaa - item locations checked
|
||||
; d - desert palace
|
||||
; h - tower of hera
|
||||
; a - agahnim's tower
|
||||
;--------------------------------------------------------------------------------
|
||||
; $7EF436 - gggggeee - item locations checked
|
||||
; g - ganon's tower
|
||||
; e - eastern palace
|
||||
;--------------------------------------------------------------------------------
|
||||
; $7EF437 - sssstttt - item locations checked
|
||||
; s - skull woods
|
||||
; t - thieves town
|
||||
;--------------------------------------------------------------------------------
|
||||
; $7EF438 - iiiimmmm - item locations checked
|
||||
; i - ice palace
|
||||
; m - misery mire
|
||||
;--------------------------------------------------------------------------------
|
||||
; $7EF439 - ttttssss - item locations checked
|
||||
; t - turtle rock
|
||||
; s - swamp palace
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -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
|
||||
;--------------------------------------------------------------------------------
|
||||
183
contrib.asm
183
contrib.asm
@@ -1,183 +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 $7EF3CC
|
||||
;
|
||||
; STZ $5E
|
||||
;
|
||||
; JML $09A6B6 ; <- 4A6B6 tagalong.asm:1194 (SEP #$30 : RTS)
|
||||
;}
|
||||
;================================================================
|
||||
!MAP_OVERLAY = "$7EF414" ; [2]
|
||||
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 !MAP_OVERLAY : STA !MAP_OVERLAY : SEP #$20
|
||||
JSL DialogSahasrahla : BRA .SayNothing
|
||||
|
||||
.BombShopGuyDialog
|
||||
REP #$20 : LDA.l MapReveal_BombShop : ORA !MAP_OVERLAY : STA !MAP_OVERLAY : 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
|
||||
}
|
||||
;================================================================
|
||||
121
controllerjank.asm
Normal file
121
controllerjank.asm
Normal file
@@ -0,0 +1,121 @@
|
||||
;================================================================================
|
||||
; D-Pad Invert
|
||||
; runs in NMI, must use minimum possible # of cycles
|
||||
;--------------------------------------------------------------------------------
|
||||
; Filtered Joypad 1 Register: [AXLR | ????]
|
||||
; Filtered Joypad 1 Register: [BYST | udlr] [AXLR | ????]
|
||||
|
||||
InvertDPad:
|
||||
LDA.l OneMindPlayerCount : BEQ .crowd_control
|
||||
|
||||
LDA.l OneMindId
|
||||
AND.b #$03
|
||||
TAX
|
||||
LDA.l .onemind_controller_offset, X
|
||||
TAX
|
||||
|
||||
LDA.w JOY1L,X : STA.w Scrap00
|
||||
LDA.w JOY1H,X : STA.w Scrap01
|
||||
|
||||
LDA.b #$80 : STA.w WRIO ; reset this so latch can read it, otherwise RNG breaks
|
||||
|
||||
JML InvertDPadReturn
|
||||
|
||||
.crowd_control
|
||||
LDA.l ControllerInverter : BNE +
|
||||
|
||||
LDA.w JOY1L : STA.b Scrap00
|
||||
LDA.w JOY1H : STA.b Scrap01
|
||||
JML InvertDPadReturn
|
||||
|
||||
+ DEC : BEQ .dpadOnly
|
||||
DEC : BEQ .buttonsOnly
|
||||
DEC : BEQ .invertBoth
|
||||
.swapSides
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
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.b Scrap00
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
JML InvertDPadReturn
|
||||
.invertBoth
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
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.b Scrap00
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
JML InvertDPadReturn
|
||||
.buttonsOnly
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA.w JOY1L
|
||||
BIT.w #$8040 : BEQ + : EOR.w #$8040 : + ; swap X/B
|
||||
BIT.w #$4080 : BEQ + : EOR.w #$4080 : + ; swap Y/A
|
||||
STA.b Scrap00
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
JML InvertDPadReturn
|
||||
.dpadOnly
|
||||
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.b Scrap01
|
||||
JML InvertDPadReturn
|
||||
|
||||
.onemind_controller_offset
|
||||
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
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
HandleOneMindController:
|
||||
LDA.l OneMindPlayerCount
|
||||
BEQ .no_onemind
|
||||
|
||||
REP #$20
|
||||
|
||||
LDA.l OneMindTimerRAM
|
||||
DEC
|
||||
BPL .no_switch
|
||||
|
||||
SEP #$20
|
||||
LDA.l OneMindId
|
||||
INC
|
||||
CMP.l OneMindPlayerCount
|
||||
BCC .no_wrap
|
||||
|
||||
LDA.b #$01 ; reset to player 1
|
||||
|
||||
.no_wrap
|
||||
STA.l OneMindId
|
||||
|
||||
REP #$20
|
||||
LDA.l OneMindTimerInit
|
||||
|
||||
.no_switch
|
||||
STA.l OneMindTimerRAM
|
||||
|
||||
SEP #$20
|
||||
LDA.l OneMindId
|
||||
|
||||
CMP.b #$04 ; is it player 4 or 5?
|
||||
BCC .no_multitap_switch
|
||||
|
||||
STZ.w WRIO
|
||||
|
||||
.no_multitap_switch
|
||||
|
||||
.no_onemind
|
||||
STZ.b NMIDoneFlag
|
||||
|
||||
JML MainGameLoop ; reset frame loop
|
||||
|
||||
235
crypto.asm
235
crypto.asm
@@ -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 + : BRL --- : + ; } 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);
|
||||
; }
|
||||
;}
|
||||
|
||||
127
cuccostorm.asm
127
cuccostorm.asm
@@ -1,74 +1,61 @@
|
||||
;================================================================================
|
||||
StartCuccoStorm:
|
||||
;STA $FFFFFF
|
||||
PHA : PHX : PHY : PHP
|
||||
SEP #$30 ; set 8-bit accumulator & index registers
|
||||
LDA $1B : BNE .done ; skip if indoors
|
||||
!CUCCO = $0B
|
||||
!INERT = $00
|
||||
!INIT = $08
|
||||
!ALIVE = $09
|
||||
!CUCCO_ENRAGED = $23
|
||||
|
||||
CuccoStorm:
|
||||
|
||||
SEP #$30 ; set 8-bit accumulator index registers
|
||||
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
|
||||
|
||||
-
|
||||
;==== Find a Cucco
|
||||
|
||||
LDY.b #$FF : PHY ; push "cucco not found"
|
||||
|
||||
LDX.b #$00 : -- : CPX.b #$10 : !BGE .ldone
|
||||
LDA.w SpriteAITable, X : CMP.b #!ALIVE : BEQ +++
|
||||
; enemy not found
|
||||
CMP.b #!INERT : BNE ++
|
||||
; log inert enemy slot
|
||||
PLA : PHX
|
||||
BRA ++
|
||||
+++
|
||||
; found an enemy
|
||||
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 SpriteAuxTable, X : CMP.b #!CUCCO_ENRAGED : !BLT ++
|
||||
PLA : BRA + ; we found an angry cucco, done
|
||||
++ : INX : BRA -- : .ldone
|
||||
|
||||
LDY.b #$0A
|
||||
LDA.b #$0B : JSL Sprite_SpawnDynamically_arbitrary : BMI .done ; spawn a chicken
|
||||
JSL Sprite_SetSpawnedCoords
|
||||
LDA.b #$24 : STA $0DA0, Y ; turn it into an attack chicken
|
||||
LDA.b #$01 : STA $0DB0, Y
|
||||
|
||||
.done
|
||||
PLP : PLY : PLX : PLA
|
||||
;==== Create a Cucco
|
||||
|
||||
CPY.b #$FF : BNE ++
|
||||
; 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 SpriteTypeTable, Y
|
||||
LDA.b #!INIT : STA.w SpriteAITable, 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 SpriteAuxTable, Y ; enrage the cucco
|
||||
LDA.b #$00 : STA.w SpriteAuxTable+$10, Y : STA.w SpriteDirectionTable, Y
|
||||
|
||||
;====
|
||||
+
|
||||
RTL
|
||||
;================================================================================
|
||||
SpawnAngryCucco:
|
||||
TXA : EOR $1A : AND.b #$0F : ORA $1B : BNE .spawn_delay
|
||||
|
||||
LDA.b #$0B
|
||||
LDY.b #$0A
|
||||
|
||||
JSL Sprite_SpawnDynamically_arbitrary : BMI .spawn_failed
|
||||
|
||||
PHX
|
||||
|
||||
TYX
|
||||
|
||||
LDA.b #$1E : JSL Sound_SetSfx3PanLong
|
||||
|
||||
PLX
|
||||
|
||||
LDA.b #$01 : STA $0DB0, Y
|
||||
|
||||
PHX
|
||||
|
||||
JSL GetRandomInt : STA $0F : AND.b #$02 : BEQ .vertical_entry_point
|
||||
|
||||
LDA $0F : ADC $E2 : STA $0D10, Y
|
||||
LDA $E3 : ADC.b #$00 : STA $0D30, Y
|
||||
|
||||
LDA $0F : AND.b #$01 : TAX
|
||||
|
||||
LDA $9F3C, X : ADC $E8 : STA $0D00, Y
|
||||
LDA $E9 : ADC.b #$00 : STA $0D20, Y
|
||||
|
||||
BRA .set_velocity
|
||||
|
||||
.vertical_entry_point
|
||||
|
||||
LDA $0F : ADC $E8 : STA $0D00, Y
|
||||
LDA $E9 : ADC.b #$00 : STA $0D20, Y
|
||||
|
||||
LDA $0F : AND.b #$01 : TAX
|
||||
|
||||
LDA $9F3C, X : ADC $E2 : STA $0D10, Y
|
||||
LDA $E3 : ADC.b #$00 : STA $0D30, Y
|
||||
|
||||
.set_velocity
|
||||
|
||||
TYX
|
||||
|
||||
LDA.b #$20 : JSL Sprite_ApplySpeedTowardsPlayerLong
|
||||
|
||||
PLX
|
||||
|
||||
LDA.b #$30 : JSL Sound_SetSfx2PanLong
|
||||
|
||||
.spawn_failed
|
||||
.spawn_delay
|
||||
|
||||
RTL
|
||||
;================================================================================
|
||||
17
custompalettes.asm
Normal file
17
custompalettes.asm
Normal 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
|
||||
@@ -1,25 +0,0 @@
|
||||
CheckReceivedItemPropertiesBeforeLoad:
|
||||
LDA $7EC005 : BNE .lightOff
|
||||
LDA.l AddReceivedItemExpanded_properties, X ;Restore Rando Code
|
||||
RTL
|
||||
|
||||
.lightOff
|
||||
PHX : PHY : PHB
|
||||
LDA.l AddReceivedItemExpanded_properties, X ; 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
|
||||
@@ -3,82 +3,85 @@
|
||||
;--------------------------------------------------------------------------------
|
||||
DarkWorldSaveFix:
|
||||
LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change
|
||||
JSL.l MasterSwordFollowerClear
|
||||
JSL.l StatSaveCounter
|
||||
RTL
|
||||
JSL MasterSwordFollowerClear
|
||||
JML StatSaveCounter
|
||||
;--------------------------------------------------------------------------------
|
||||
DoWorldFix:
|
||||
LDA InvertedMode : BEQ +
|
||||
LDA.l InvertedMode : BEQ +
|
||||
JMP DoWorldFix_Inverted
|
||||
+
|
||||
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
|
||||
LDA $7EF353 : BEQ .noMirror ; check if we have the mirror
|
||||
LDA.l FollowerIndicator : CMP.b #$04 : BEQ .setLightWorld ; check if old man is following
|
||||
LDA.l MirrorEquipment : AND.b #$02 : BEQ .noMirror ; check if we have the mirror
|
||||
.skip_mirror_check ; alt entrance point
|
||||
LDA $7EF3C5 : CMP.b #$03 : !BLT .aga1Alive ; check if agahnim 1 is alive
|
||||
BRA .done
|
||||
LDA.l ProgressIndicator : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive
|
||||
.setLightWorld
|
||||
LDA.b #$00
|
||||
.noMirror
|
||||
.aga1Alive
|
||||
LDA #$00 : STA $7EF3CA ; set flag to light world
|
||||
LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; convert frog to dwarf
|
||||
STA.l CurrentWorld ; set flag to light world
|
||||
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 : 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 $7EF3CA ; set flag to dark world
|
||||
LDA $7EF3CC : CMP #$08 : BNE + : LDA.b #$07 : STA $7EF3CC : + ; 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.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
|
||||
LDA $7EF353 : BEQ .noMirror ; check if we have the mirror
|
||||
LDA.l FollowerIndicator : CMP.b #$04 : BEQ .setDarkWorld ; check if old man is following
|
||||
LDA.l MirrorEquipment : AND.b #$02 : BEQ .setDarkWorld ; check if we have the mirror
|
||||
.skip_mirror_check ; alt entrance point
|
||||
LDA $7EF3C5 : CMP.b #$03 : !BLT .aga1Alive ; check if agahnim 1 is alive
|
||||
BRA .done
|
||||
.noMirror
|
||||
.aga1Alive
|
||||
LDA #$40 : STA $7EF3CA ; set flag to dark world
|
||||
LDA $7EF3CC
|
||||
CMP #$07 : BEQ .clear ; clear frog
|
||||
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications
|
||||
LDA.l ProgressIndicator : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive
|
||||
.setDarkWorld
|
||||
LDA.b #$40 : STA.l CurrentWorld ; set flag to dark world
|
||||
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 $7EF3CC ; clear follower
|
||||
LDA.b #$00 : STA.l FollowerIndicator ; clear follower
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
SetDeathWorldChecked_Inverted:
|
||||
LDA $1B : BEQ .outdoors
|
||||
LDA $040C : CMP #$FF : BNE .dungeon
|
||||
LDA $A0 : 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
|
||||
|
||||
.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 $7EF3CA ; set flag to dark world
|
||||
LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; 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
|
||||
;================================================================================
|
||||
@@ -86,23 +89,22 @@ RTL
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
FakeWorldFix:
|
||||
LDA FixFakeWorld : BEQ +
|
||||
LDA $8A : AND.b #$40 : STA $7EF3CA
|
||||
LDA.l FixFakeWorld : BEQ +
|
||||
LDA.b OverworldIndex : AND.b #$40 : STA.l CurrentWorld
|
||||
+
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
MasterSwordFollowerClear:
|
||||
LDA $7EF3CC
|
||||
CMP #$0E : BEQ .clear ; clear master sword follower
|
||||
RTL
|
||||
.clear
|
||||
LDA.b #$00 : STA $7EF3CC ; clear follower
|
||||
RTL
|
||||
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 $7EF3CC ; clear follower
|
||||
JSL PrepDungeonExit ; thing we wrote over
|
||||
RTL
|
||||
LDA.b #$00 : STA.l FollowerIndicator ; clear follower
|
||||
JML PrepDungeonExit ; thing we wrote over
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
macro SetMinimum(base,filler,compare)
|
||||
LDA.l <compare> : !SUB.l <base> : !BLT ?done
|
||||
@@ -110,49 +112,53 @@ macro SetMinimum(base,filler,compare)
|
||||
?done:
|
||||
endmacro
|
||||
RefreshRainAmmo:
|
||||
LDA $7EF3C5 : CMP.b #$01 : BEQ + : RTL : + ; 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 $7EF3C8
|
||||
LDA.l StartingEntrance
|
||||
+ CMP.b #$03 : BNE + ; Uncle
|
||||
%SetMinimum($7EF36E,$7EF373,RainDeathRefillMagic_Uncle)
|
||||
%SetMinimum($7EF343,$7EF375,RainDeathRefillBombs_Uncle)
|
||||
%SetMinimum($7EF377,$7EF376,RainDeathRefillArrows_Uncle)
|
||||
BRA .done
|
||||
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Uncle)
|
||||
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Uncle)
|
||||
LDA.l ArrowMode : BEQ ++
|
||||
LDA.l BowEquipment : BEQ +++
|
||||
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Uncle)
|
||||
+++ BRA .done
|
||||
+ CMP.b #$02 : BNE + ; Cell
|
||||
%SetMinimum($7EF36E,$7EF373,RainDeathRefillMagic_Cell)
|
||||
%SetMinimum($7EF343,$7EF375,RainDeathRefillBombs_Cell)
|
||||
%SetMinimum($7EF377,$7EF376,RainDeathRefillArrows_Cell)
|
||||
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Cell)
|
||||
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Cell)
|
||||
LDA.l ArrowMode : BEQ ++
|
||||
LDA.l BowEquipment : BEQ .done
|
||||
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Cell)
|
||||
BRA .done
|
||||
+ CMP.b #$04 : BNE + ; Mantle
|
||||
%SetMinimum($7EF36E,$7EF373,RainDeathRefillMagic_Mantle)
|
||||
%SetMinimum($7EF343,$7EF375,RainDeathRefillBombs_Mantle)
|
||||
%SetMinimum($7EF377,$7EF376,RainDeathRefillArrows_Mantle)
|
||||
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Mantle)
|
||||
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Mantle)
|
||||
LDA.l ArrowMode : BEQ ++
|
||||
LDA.l BowEquipment : BEQ .done
|
||||
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Mantle)
|
||||
+
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
!INFINITE_ARROWS = "$7F50C8"
|
||||
!INFINITE_BOMBS = "$7F50C9"
|
||||
!INFINITE_MAGIC = "$7F50CA"
|
||||
SetEscapeAssist:
|
||||
LDA $7EF3C5 : CMP.b #$01 : BNE .notrain ; 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 !INFINITE_MAGIC : +
|
||||
BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : +
|
||||
BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : +
|
||||
BIT.b #$04 : BEQ + : STA.l InfiniteArrows : +
|
||||
BIT.b #$02 : BEQ + : STA.l InfiniteBombs : +
|
||||
BIT.b #$01 : BEQ + : STA.l InfiniteArrows : +
|
||||
BRA ++
|
||||
.notrain
|
||||
LDA.l EscapeAssist : BIT.b #$04 : BEQ + : LDA.b #$00 : STA !INFINITE_MAGIC : +
|
||||
LDA.l EscapeAssist : BIT.b #$02 : BEQ + : LDA.b #$00 : STA !INFINITE_BOMBS : +
|
||||
LDA.l EscapeAssist : BIT.b #$01 : BEQ + : LDA.b #$00 : STA !INFINITE_ARROWS : +
|
||||
.no_train ; choo choo
|
||||
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 : +
|
||||
++
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
SetSilverBowMode:
|
||||
LDA SilverArrowsUseRestriction : BEQ + ; fix bow type for restricted arrow mode
|
||||
LDA $7EF340 : CMP.b #$3 : !BLT +
|
||||
!SUB.b #$02 : STA $7EF340
|
||||
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
0
99ff1_bombos.gfx → data/99ff1_bombos.gfx
Executable file → Normal file
0
99ff1_quake.gfx → data/99ff1_quake.gfx
Executable file → Normal file
0
99ff1_quake.gfx → data/99ff1_quake.gfx
Executable file → Normal file
0
a6fc4_bombos.gfx → data/a6fc4_bombos.gfx
Executable file → Normal file
0
a6fc4_bombos.gfx → data/a6fc4_bombos.gfx
Executable file → Normal file
0
a6fc4_ether.gfx → data/a6fc4_ether.gfx
Executable file → Normal file
0
a6fc4_ether.gfx → data/a6fc4_ether.gfx
Executable file → Normal file
BIN
data/bossicons.4bpp
Normal file
BIN
data/bossicons.4bpp
Normal file
Binary file not shown.
71
data/bsodencode.txt
Normal file
71
data/bsodencode.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
=00
|
||||
A=01
|
||||
a=01
|
||||
B=02
|
||||
b=02
|
||||
C=03
|
||||
c=03
|
||||
D=04
|
||||
d=04
|
||||
E=05
|
||||
e=05
|
||||
F=06
|
||||
f=06
|
||||
G=07
|
||||
g=07
|
||||
H=08
|
||||
h=08
|
||||
I=09
|
||||
i=09
|
||||
J=0A
|
||||
j=0A
|
||||
K=0B
|
||||
k=0B
|
||||
L=0C
|
||||
l=0C
|
||||
M=0D
|
||||
m=0D
|
||||
N=0E
|
||||
n=0E
|
||||
O=0F
|
||||
o=0F
|
||||
P=10
|
||||
p=10
|
||||
Q=11
|
||||
q=11
|
||||
R=12
|
||||
r=12
|
||||
S=13
|
||||
s=13
|
||||
T=14
|
||||
t=14
|
||||
U=15
|
||||
u=15
|
||||
V=16
|
||||
v=16
|
||||
W=17
|
||||
w=17
|
||||
X=18
|
||||
x=18
|
||||
Y=19
|
||||
y=19
|
||||
Z=1A
|
||||
z=1A
|
||||
0=1B
|
||||
1=1C
|
||||
2=1D
|
||||
3=1E
|
||||
4=1F
|
||||
5=20
|
||||
6=21
|
||||
7=22
|
||||
8=23
|
||||
9=24
|
||||
.=25
|
||||
#=26
|
||||
?=27
|
||||
-=28
|
||||
/=29
|
||||
,=2A
|
||||
'=2B
|
||||
;=2C
|
||||
BIN
data/bsodfont.1bpp
Normal file
BIN
data/bsodfont.1bpp
Normal file
Binary file not shown.
BIN
data/bsodhex.2bpp
Normal file
BIN
data/bsodhex.2bpp
Normal file
Binary file not shown.
0
c2807_v3.gfx → data/c2807_v3.gfx
Executable file → Normal file
0
c2807_v3.gfx → data/c2807_v3.gfx
Executable file → Normal file
Binary file not shown.
BIN
data/c2e3e.gfx
Normal file
BIN
data/c2e3e.gfx
Normal file
Binary file not shown.
79
data/creditscharmapbighi.txt
Normal file
79
data/creditscharmapbighi.txt
Normal 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
|
||||
79
data/creditscharmapbiglo.txt
Normal file
79
data/creditscharmapbiglo.txt
Normal 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
|
||||
28
data/creditscharmapsmall_green.txt
Normal file
28
data/creditscharmapsmall_green.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
=9F
|
||||
A=38
|
||||
B=39
|
||||
C=3A
|
||||
D=3B
|
||||
E=3C
|
||||
F=3D
|
||||
G=3E
|
||||
H=3F
|
||||
I=40
|
||||
J=41
|
||||
K=42
|
||||
L=43
|
||||
M=44
|
||||
N=45
|
||||
O=46
|
||||
P=47
|
||||
Q=48
|
||||
R=49
|
||||
S=4A
|
||||
T=4B
|
||||
U=4C
|
||||
V=4D
|
||||
W=4E
|
||||
X=4F
|
||||
Y=50
|
||||
Z=51
|
||||
.=52
|
||||
27
data/creditscharmapsmall_red.txt
Normal file
27
data/creditscharmapsmall_red.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
=9F
|
||||
A=00
|
||||
B=01
|
||||
C=02
|
||||
D=03
|
||||
E=04
|
||||
F=05
|
||||
G=06
|
||||
H=07
|
||||
I=08
|
||||
J=09
|
||||
K=0A
|
||||
L=0B
|
||||
M=0C
|
||||
N=0D
|
||||
O=0E
|
||||
P=0F
|
||||
Q=10
|
||||
R=11
|
||||
S=12
|
||||
T=13
|
||||
U=14
|
||||
V=15
|
||||
W=16
|
||||
X=17
|
||||
Y=18
|
||||
Z=19
|
||||
31
data/creditscharmapsmall_yellow.txt
Normal file
31
data/creditscharmapsmall_yellow.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
=9F
|
||||
A=1A
|
||||
B=1B
|
||||
C=1C
|
||||
D=1D
|
||||
E=1E
|
||||
F=1F
|
||||
G=20
|
||||
H=21
|
||||
I=22
|
||||
J=23
|
||||
K=24
|
||||
L=25
|
||||
M=26
|
||||
N=27
|
||||
O=28
|
||||
P=29
|
||||
Q=2A
|
||||
R=2B
|
||||
S=2C
|
||||
T=2D
|
||||
U=2E
|
||||
V=2F
|
||||
W=30
|
||||
X=31
|
||||
Y=32
|
||||
Z=33
|
||||
,=34
|
||||
'=35
|
||||
-=36
|
||||
.=37
|
||||
BIN
data/customitems.4bpp
Normal file
BIN
data/customitems.4bpp
Normal file
Binary file not shown.
BIN
data/customitems.png
Normal file
BIN
data/customitems.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
fileselect.chr.gfx → data/fileselectgfx.2bpp
Executable file → Normal file
BIN
fileselect.chr.gfx → data/fileselectgfx.2bpp
Executable file → Normal file
Binary file not shown.
BIN
data/fileselectgfx.png
Normal file
BIN
data/fileselectgfx.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
55
data/kanjireplacements.asm
Normal file
55
data/kanjireplacements.asm
Normal 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
|
||||
BIN
data/newfont.bin
Normal file
BIN
data/newfont.bin
Normal file
Binary file not shown.
BIN
data/newfont_inverted.bin
Normal file
BIN
data/newfont_inverted.bin
Normal file
Binary file not shown.
0
newitems.gfx → data/newitems.gfx
Executable file → Normal file
0
newitems.gfx → data/newitems.gfx
Executable file → Normal file
59
data/playernamecharmap.asm
Normal file
59
data/playernamecharmap.asm
Normal 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
BIN
data/playernamecharmap.bin
Normal file
Binary file not shown.
BIN
data/playernamestripes_1.bin
Normal file
BIN
data/playernamestripes_1.bin
Normal file
Binary file not shown.
72
data/playernamestripes_2.asm
Normal file
72
data/playernamestripes_2.asm
Normal 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
|
||||
|
||||
BIN
data/playernamestripes_2.bin
Normal file
BIN
data/playernamestripes_2.bin
Normal file
Binary file not shown.
72
data/playernamestripes_3.asm
Normal file
72
data/playernamestripes_3.asm
Normal 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
|
||||
|
||||
25
data/playernamestripes_4.asm
Normal file
25
data/playernamestripes_4.asm
Normal 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/smallchars.2bpp
Normal file
BIN
data/smallchars.2bpp
Normal file
Binary file not shown.
61
data/textbytecharmap.txt
Normal file
61
data/textbytecharmap.txt
Normal 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
61
data/textwordcharmap.txt
Normal 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
|
||||
539
decompresseditemgraphics.asm
Normal file
539
decompresseditemgraphics.asm
Normal file
@@ -0,0 +1,539 @@
|
||||
;===================================================================================================
|
||||
; 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 FastSpriteDecomp
|
||||
LDX.b #$5C+$73 : JSR FastSpriteDecomp
|
||||
LDX.b #$5B+$73 : JSR FastSpriteDecomp
|
||||
LDX.b #$5A+$73 : JSR FastSpriteDecomp
|
||||
|
||||
REP #$30
|
||||
PLX
|
||||
TXS
|
||||
|
||||
SEP #$20
|
||||
|
||||
LDA.b #$81
|
||||
STA.l $4200
|
||||
|
||||
|
||||
PLD
|
||||
PLB
|
||||
PLP
|
||||
|
||||
RTL
|
||||
|
||||
;===================================================================================================
|
||||
; 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:
|
||||
SEP #$30
|
||||
|
||||
LDA.l GFXSheetPointers_background_bank,X : PHA : PLB
|
||||
LDA.l GFXSheetPointers_background_high,X : XBA
|
||||
LDA.l GFXSheetPointers_background_low,X
|
||||
|
||||
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
|
||||
STA.w BigDecompressionBuffer+$10+<offset>+<offset>,X
|
||||
|
||||
endmacro
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
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
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
|
||||
@@ -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
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
631
dialog.asm
631
dialog.asm
@@ -2,280 +2,256 @@
|
||||
; 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
|
||||
LDA $00 : PHA
|
||||
LDA $01 : PHA
|
||||
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 $01
|
||||
PLA : STA $00
|
||||
PLA : STA.b Scrap02
|
||||
REP #$20
|
||||
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
|
||||
LDA $00 : PHA
|
||||
LDA $01 : PHA
|
||||
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 + : BRL .skip : +
|
||||
LDA.l FreeItemText : BNE + : JMP .skip : +
|
||||
|
||||
LDA #$00 : STA $7F5010 ; initialize scratch
|
||||
LDA.l FreeItemText : AND.b #$01 : CMP.b #$01 : BNE + ; show message for general small key
|
||||
LDA !ITEM_TEMPORARY : CMP.b #$24 : BNE + ; general small key
|
||||
LDA.b #$00 : STA.l ScratchBufferNV ; initialize scratch
|
||||
LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for 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)
|
||||
BRL .done
|
||||
+ : LDA.l FreeItemText : AND.b #$02 : CMP.b #$02 : BNE + ; show message for general compass
|
||||
LDA !ITEM_TEMPORARY : CMP.b #$25 : BNE + ; general compass
|
||||
JMP .done
|
||||
+ : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for 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)
|
||||
BRL .done
|
||||
+ : LDA.l FreeItemText : AND.b #$04 : CMP.b #$04 : BNE + ; show message for general map
|
||||
LDA !ITEM_TEMPORARY : CMP.b #$33 : BNE + ; general map
|
||||
JMP .done
|
||||
+ : LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for 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)
|
||||
BRL .done
|
||||
+ : LDA.l FreeItemText : AND.b #$08 : CMP.b #$08 : BNE + ; show message for general big key
|
||||
LDA !ITEM_TEMPORARY : CMP.b #$32 : BNE + ; general big key
|
||||
JMP .done
|
||||
+ : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for 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)
|
||||
BRL .done
|
||||
JMP .done
|
||||
+
|
||||
LDA !ITEM_TEMPORARY : AND.b #$F0 ; looking at high bits only
|
||||
LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for dungeon map
|
||||
LDA.l ScratchBufferV : AND.b #$F0 ; looking at high bits only
|
||||
CMP.b #$70 : BNE + ; map of...
|
||||
%CopyDialog(Notice_MapOf)
|
||||
BRL .dungeon
|
||||
+ : CMP.b #$80 : BNE + ; compass of...
|
||||
JMP .dungeon
|
||||
+ : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for dungeon compass
|
||||
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of...
|
||||
%CopyDialog(Notice_CompassOf)
|
||||
BRL .dungeon
|
||||
+ : CMP.b #$90 : BNE + ; big key of...
|
||||
JMP .dungeon
|
||||
+ : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for dungeon big key
|
||||
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of...
|
||||
%CopyDialog(Notice_BigKeyOf)
|
||||
BRA .dungeon
|
||||
+ : CMP.b #$A0 : BNE + ; small key of...
|
||||
LDA !ITEM_TEMPORARY : CMP.b #$AF : BNE ++ : BRL .skip : ++
|
||||
JMP .dungeon
|
||||
+ : LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for dungeon small key
|
||||
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
|
||||
+
|
||||
BRL .skip ; it's not something we are going to give a notice for
|
||||
+ : 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
|
||||
%CopyDialog(Notice_Self)
|
||||
JMP .done
|
||||
+
|
||||
SEP #$20
|
||||
LDA.l ScratchBufferNV+1
|
||||
CMP.b #$00 : BNE + ; ...light world
|
||||
%CopyDialog(Notice_LightWorld) : BRL .done
|
||||
%CopyDialog(Notice_LightWorld) : JMP .done
|
||||
+ : CMP.b #$01 : BNE + ; ...dark world
|
||||
%CopyDialog(Notice_DarkWorld) : BRL .done
|
||||
%CopyDialog(Notice_DarkWorld) : JMP .done
|
||||
+ : CMP.b #$02 : BNE + ; ...ganon's tower
|
||||
%CopyDialog(Notice_GTower) : BRL .done
|
||||
%CopyDialog(Notice_GTower) : JMP .done
|
||||
+ : CMP.b #$03 : BNE + ; ...turtle rock
|
||||
%CopyDialog(Notice_TRock) : BRL .done
|
||||
%CopyDialog(Notice_TRock) : JMP .done
|
||||
+ : CMP.b #$04 : BNE + ; ...thieves' town
|
||||
%CopyDialog(Notice_Thieves) : BRL .done
|
||||
%CopyDialog(Notice_Thieves) : JMP .done
|
||||
+ : CMP.b #$05 : BNE + ; ...tower of hera
|
||||
%CopyDialog(Notice_Hera) : BRL .done
|
||||
%CopyDialog(Notice_Hera) : JMP .done
|
||||
+ : CMP.b #$06 : BNE + ; ...ice palace
|
||||
%CopyDialog(Notice_Ice) : BRL .done
|
||||
%CopyDialog(Notice_Ice) : JMP .done
|
||||
+ : CMP.b #$07 : BNE + ; ...skull woods
|
||||
%CopyDialog(Notice_Skull) : BRL .done
|
||||
%CopyDialog(Notice_Skull) : JMP .done
|
||||
+ : CMP.b #$08 : BNE + ; ...misery mire
|
||||
%CopyDialog(Notice_Mire) : BRL .done
|
||||
%CopyDialog(Notice_Mire) : JMP .done
|
||||
+ : CMP.b #$09 : BNE + ; ...dark palace
|
||||
%CopyDialog(Notice_PoD) : BRL .done
|
||||
%CopyDialog(Notice_PoD) : JMP .done
|
||||
+ : CMP.b #$0A : BNE + ; ...swamp palace
|
||||
%CopyDialog(Notice_Swamp) : BRL .done
|
||||
%CopyDialog(Notice_Swamp) : JMP .done
|
||||
+ : CMP.b #$0B : BNE + ; ...agahnim's tower
|
||||
%CopyDialog(Notice_AgaTower) : BRL .done
|
||||
%CopyDialog(Notice_AgaTower) : JMP .done
|
||||
+ : CMP.b #$0C : BNE + ; ...desert palace
|
||||
%CopyDialog(Notice_Desert) : BRL .done
|
||||
%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
|
||||
LDA.b #$01 : 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
|
||||
|
||||
;--------------------------------
|
||||
PLA : STA $02
|
||||
PLA : STA $01
|
||||
PLA : STA $00
|
||||
PLB
|
||||
PLP
|
||||
PLY : PLX : PLA
|
||||
;JSL.l Main_ShowTextMessage_Alt
|
||||
RTL
|
||||
|
||||
.skip
|
||||
;--------------------------------
|
||||
PLA : STA $02
|
||||
PLA : STA $01
|
||||
PLA : STA $00
|
||||
PLB
|
||||
PLP
|
||||
PLY : PLX : PLA
|
||||
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 : !BLT + ;if the item is $4C or greater it must be a rando item
|
||||
.noMessage
|
||||
LDA.w #$FFFF
|
||||
BRA .done
|
||||
+
|
||||
LDA.w Ancilla_ReceiveItem_item_messages, Y
|
||||
BCS .nomessage ; if doubling the item value overflowed 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
|
||||
|
||||
BRA .done
|
||||
|
||||
++ LDA.w Ancilla_ReceiveItem_item_messages, Y
|
||||
.done
|
||||
CMP.w #$FFFF
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DialogFairyThrow:
|
||||
LDA.l Restrict_Ponds : BEQ .normal
|
||||
LDA $7EF35C : ORA $7EF35D : ORA $7EF35E : ORA $7EF35F : 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
|
||||
@@ -285,159 +261,172 @@ RTL
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DialogGanon1:
|
||||
JSL.l CheckGanonVulnerability : BCS +
|
||||
REP #$20 : LDA.w #$018C : STA $1CF0 : SEP #$20
|
||||
BRA ++
|
||||
+
|
||||
REP #$20 : LDA.w #$016D : STA $1CF0 : SEP #$20
|
||||
++
|
||||
JSL.l Sprite_ShowMessageMinimal_Alt
|
||||
JSL CheckGanonVulnerability
|
||||
REP #$20
|
||||
LDA.w #$018C
|
||||
BCC +
|
||||
LDA.w #$016D
|
||||
+ STA.w TextID
|
||||
SEP #$20
|
||||
JSL Sprite_ShowMessageMinimal_Alt
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
; #$0192 - no bow
|
||||
; #$0193 - no silvers alternate
|
||||
; #$0194 - no silvers
|
||||
; #$0195 - silvers
|
||||
; $7EF38E - bsp-- ---
|
||||
; BowTracking - bsp-- ---
|
||||
; b = bow
|
||||
; s = silver arrow bow
|
||||
; p = 2nd progressive bow
|
||||
DialogGanon2:
|
||||
JSL.l CheckGanonVulnerability : BCS +
|
||||
REP #$20 : LDA.w #$018D : STA $1CF0 : SEP #$20
|
||||
BRA ++
|
||||
+
|
||||
LDA.l $7EF38E : AND #$80 : BNE + ; branch if bow
|
||||
REP #$20 : LDA.w #$0192 : STA $1CF0 : SEP #$20 ; no bow
|
||||
BRA ++
|
||||
+
|
||||
LDA.l $7EF38E : AND #$40 : BEQ + ; branch if no silvers
|
||||
REP #$20 : LDA.w #$0195 : STA $1CF0 : SEP #$20 ;has silvers
|
||||
BRA ++
|
||||
+
|
||||
LDA.l $7EF38E : AND #$20 : BNE + ; branch if p bow
|
||||
REP #$20 : LDA.w #$0194 : STA $1CF0 : SEP #$20 ; bow, no-silvers, no-p-bow
|
||||
BRA ++
|
||||
+
|
||||
LDA.l $7EF38E : AND #$80 : BEQ + ; branch if no bow
|
||||
REP #$20 : LDA.w #$0193 : STA $1CF0 : SEP #$20 ; bow, no-silvers, p-bow
|
||||
BRA ++
|
||||
+
|
||||
REP #$20 : LDA.w #$016E : STA $1CF0 : SEP #$20 ; both bow and no bow. impossible.
|
||||
++
|
||||
JSL.l Sprite_ShowMessageMinimal_Alt
|
||||
JSL CheckGanonVulnerability
|
||||
|
||||
REP #$20
|
||||
BCS +
|
||||
LDA.w #$018D : BRA ++
|
||||
+
|
||||
LDA.l BowTracking
|
||||
|
||||
BIT.w #$0080 : BNE + ; branch if bow
|
||||
LDA.w #$0192 : BRA ++
|
||||
+
|
||||
BIT.w #$0040 : BEQ + ; branch if no silvers
|
||||
LDA.w #$0195 : BRA ++
|
||||
+
|
||||
BIT.w #$0020 : BNE + ; branch if p bow
|
||||
LDA.w #$0194 : BRA ++
|
||||
+
|
||||
BIT.w #$0080 : BEQ + ; branch if no bow
|
||||
LDA.w #$0193 : BRA ++
|
||||
+
|
||||
LDA.w #$016E
|
||||
++
|
||||
STA.w TextID
|
||||
SEP #$20
|
||||
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 : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text
|
||||
RTL
|
||||
PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text
|
||||
+
|
||||
BIT $F4 : BVC - ; Show normal text if Y is not pressed
|
||||
BIT.b Joy1A_New : BVC - ; Show normal text if Y is not pressed
|
||||
LDA.l AllowHammerTablets : BEQ ++
|
||||
LDA $7EF34B : BEQ .yesText : BRA .noText
|
||||
LDA.l HammerEquipment : BEQ .yesText : BRA .noText
|
||||
++
|
||||
LDA $7EF359 : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : !BGE .noText
|
||||
LDA.l SwordEquipment : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : BCS .noText
|
||||
;++
|
||||
.yesText
|
||||
PLA
|
||||
LDA.b #$0c
|
||||
LDA.b #$0C
|
||||
LDY.b #$01
|
||||
JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm)
|
||||
RTL
|
||||
JML Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm)
|
||||
|
||||
.noText
|
||||
PLA
|
||||
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 : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text
|
||||
RTL
|
||||
PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text
|
||||
+
|
||||
BIT $F4 : BVC - ; Show normal text if Y is not pressed
|
||||
BIT.b Joy1A_New : BVC - ; Show normal text if Y is not pressed
|
||||
LDA.l AllowHammerTablets : BEQ ++
|
||||
LDA $7EF34B : BEQ .yesText : BRA .noText
|
||||
LDA.l HammerEquipment : BEQ .yesText : BRA .noText
|
||||
++
|
||||
LDA $7EF359 : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : !BGE .noText
|
||||
LDA.l SwordEquipment : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : !BGE .noText
|
||||
;++
|
||||
.yesText
|
||||
PLA
|
||||
LDA.b #$0D
|
||||
LDY.b #$01
|
||||
JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm)
|
||||
RTL
|
||||
JML Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm)
|
||||
|
||||
.noText
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DialogSahasrahla:
|
||||
LDA.l $7EF374 : 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
|
||||
JSL.l Sprite_ShowMessageUnconditional
|
||||
JML Sprite_ShowMessageUnconditional
|
||||
+
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DialogBombShopGuy:
|
||||
LDA.l $7EF37A : AND #$05 : CMP #$05 : BEQ + ;Check if player has crystals 5 & 6
|
||||
LDA.b #$15
|
||||
LDY.b #$01
|
||||
JSL.l Sprite_ShowMessageUnconditional
|
||||
RTL
|
||||
LDY.b #$15
|
||||
LDA.l CrystalsField : AND.b #$05 : CMP.b #$05 : BNE + ;Check if player has crystals 5 & 6
|
||||
INY ; from 15 to 16
|
||||
+
|
||||
LDA.b #$16
|
||||
LDY.b #$01
|
||||
JSL.l Sprite_ShowMessageUnconditional
|
||||
TYA
|
||||
LDY.b #$01
|
||||
JSL Sprite_ShowMessageUnconditional
|
||||
RTL
|
||||
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
AgahnimAsksAboutPed:
|
||||
LDA.l GanonVulnerableMode
|
||||
CMP.b #$06 : BNE .vanilla
|
||||
|
||||
LDA.l OverworldEventDataWRAM+$80 ; check ped flag
|
||||
AND.b #$40
|
||||
BNE .vanilla
|
||||
|
||||
LDA.b #$8C ; message 018C for no ped
|
||||
STA.w TextID
|
||||
|
||||
.vanilla
|
||||
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
|
||||
LDA.b $00 : PHA
|
||||
LDA.b $01 : PHA
|
||||
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.l $7f71c0, X
|
||||
STA.b $00
|
||||
LDA.w TextID : ASL : TAX
|
||||
LDA.l $7F71C0, X
|
||||
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
|
||||
BRL .end
|
||||
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:
|
||||
@@ -449,15 +438,15 @@ CalculateSignIndex:
|
||||
; 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:
|
||||
@@ -466,6 +455,112 @@ CalculateSignIndex:
|
||||
.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
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
;--------------------------------------------------------------------------------
|
||||
StoreLastOverworldDoorID:
|
||||
TXA : INC
|
||||
STA $7F5099
|
||||
LDA $1BBB73, X : STA $010E
|
||||
STA.l PreviousOverworldDoor
|
||||
LDA.l Overworld_Entrance_ID, X : STA.w EntranceIndex
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -16,14 +16,14 @@ RTL
|
||||
; CacheDoorFrameData
|
||||
;--------------------------------------------------------------------------------
|
||||
CacheDoorFrameData:
|
||||
LDA $7F5099 : BEQ .originalBehaviour
|
||||
LDA.l PreviousOverworldDoor : BEQ .originalBehaviour
|
||||
DEC : ASL : TAX
|
||||
LDA EntranceDoorFrameTable, X : STA $0696
|
||||
LDA EntranceAltDoorFrameTable, X : STA $0698
|
||||
LDA.l EntranceDoorFrameTable, X : STA.w TileMapEntranceDoors
|
||||
LDA.l EntranceAltDoorFrameTable, X : STA.w TileMapTile32
|
||||
BRA .done
|
||||
.originalBehaviour
|
||||
LDA $D724, X : STA $0696
|
||||
STZ $0698
|
||||
LDA.w $D724, X : STA.w TileMapEntranceDoors
|
||||
STZ.w TileMapTile32
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -32,8 +32,59 @@ RTL
|
||||
; WalkDownIntoTavern
|
||||
;--------------------------------------------------------------------------------
|
||||
WalkDownIntoTavern:
|
||||
LDA $7F5099
|
||||
LDA.l PreviousOverworldDoor
|
||||
; tavern door has index 0x42 (saved off value is incremented by one)
|
||||
CMP #$43
|
||||
CMP.b #$43
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; TurnAroundOnUnderworld
|
||||
;--------------------------------------------------------------------------------
|
||||
TurnAroundOnUnderworld:
|
||||
LDA.b LinkPushDirection : BEQ .done
|
||||
; turn around if ($010E == #$43) != ($7F5099 == #$43)
|
||||
LDX.b #$00
|
||||
LDA.b #$43 : CMP.w EntranceIndex : BEQ +
|
||||
INX
|
||||
+
|
||||
CMP.l PreviousOverworldDoor : BEQ +
|
||||
DEX
|
||||
+
|
||||
CPX.b #$00 : BEQ .done
|
||||
LDA.b LinkPushDirection : EOR.b #$0C : STA.b LinkPushDirection
|
||||
.done
|
||||
JML Underworld_LoadCustomTileAttributes ; what we overwrote
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; TurnUpOnOverworld
|
||||
;--------------------------------------------------------------------------------
|
||||
TurnUpOnOverworld:
|
||||
LDA.l EntranceTavernBack : CMP.b #$43 : BEQ .done
|
||||
LDA.b #$08 : STA.b LinkPushDirection ; only fix this glitch if exit not vanilla
|
||||
.done
|
||||
JML Link_HandleMovingAnimation_FullLongEntry ; what we overwrote
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; WalkUpOnOverworld
|
||||
;--------------------------------------------------------------------------------
|
||||
WalkUpOnOverworld:
|
||||
LDA.b LinkPosY : CMP.w #$091B : BNE .normal ; hardcoded Y coordinate
|
||||
STZ.b LinkDirection
|
||||
RTL
|
||||
.normal
|
||||
LDA.w #$0002 : STA.b LinkDirection ; what we overwrote
|
||||
RTL
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; CheckStairsAdjustment
|
||||
;--------------------------------------------------------------------------------
|
||||
CheckStairsAdjustment:
|
||||
LDA.b RoomIndex
|
||||
CMP.w #$0124 ; vanilla check, rooms $0124 to $0127 have a lower exit position (currently ER ignores the entrance location)
|
||||
BCC .done
|
||||
LDA.w #$FFFF-1
|
||||
CMP.w TileMapEntranceDoors ; tavern back ($0696 == #$FFFF) should always have carry cleared
|
||||
.done
|
||||
RTL
|
||||
; if carry cleared, shift position up
|
||||
51
doorrando/bugfix/kholdstare_shell_collision.asm
Normal file
51
doorrando/bugfix/kholdstare_shell_collision.asm
Normal file
@@ -0,0 +1,51 @@
|
||||
pushpc
|
||||
|
||||
org $9E9463
|
||||
JSL CheckKholdShellCoordinates
|
||||
BCC Sprite_A3_KholdstareShell_link_not_close
|
||||
BRA Sprite_A3_KholdstareShell_link_close
|
||||
NOP #13
|
||||
|
||||
Sprite_A3_KholdstareShell_link_close = $9E9478
|
||||
Sprite_A3_KholdstareShell_link_not_close = $9E9480
|
||||
|
||||
pullpc
|
||||
|
||||
CheckKholdShellCoordinates:
|
||||
|
||||
LDA.w SpritePosXHigh, X
|
||||
XBA
|
||||
LDA.w SpritePosXLow, X ; full 16 bit X coordinate of sprite
|
||||
|
||||
REP #$21 ; carry is guaranteed clear
|
||||
SBC.w #$0020
|
||||
CMP.b LinkPosX
|
||||
BCS .not_colliding
|
||||
|
||||
ADC.w #$0040 ; carry is guaranteed clear
|
||||
CMP.b LinkPosX
|
||||
BCC .not_colliding
|
||||
|
||||
SEP #$20
|
||||
LDA.w SpritePosYHigh, X
|
||||
XBA
|
||||
LDA.w SpritePosYLow, X ; full 16 bit Y coordinate of sprite
|
||||
|
||||
REP #$21 ; carry is guaranteed clear
|
||||
SBC.w #$001F ; could go to 27 and still let link squeeze in
|
||||
CMP.b LinkPosY
|
||||
BCS .not_colliding
|
||||
|
||||
ADC.w #$0037 ; carry is guaranteed clear
|
||||
CMP.b LinkPosY
|
||||
BCC .not_colliding
|
||||
|
||||
SEP #$20 ; collision detected
|
||||
SEC
|
||||
RTL
|
||||
|
||||
.not_colliding
|
||||
SEP #$30
|
||||
CLC
|
||||
RTL
|
||||
|
||||
59
doorrando/doorrando.asm
Normal file
59
doorrando/doorrando.asm
Normal file
@@ -0,0 +1,59 @@
|
||||
; Free RAM notes
|
||||
; Normal doors use $AB-AC for scrolling indicator
|
||||
; Normal doors use $FE to store the trap door indicator
|
||||
; Normal doors use $045e to store Y coordinate when transitioning to in-room stairs
|
||||
; Normal doors use $045f to determine the order in which supertile quadrants are drawn
|
||||
; Straight stairs use $046d to store X coordinate on animation start
|
||||
; Spiral doors use $045e to store stair type
|
||||
; Gfx uses $b1 to for sub-sub-sub-module thing
|
||||
|
||||
; Hooks into various routines
|
||||
incsrc drhooks.asm
|
||||
|
||||
;Main Code
|
||||
org $A78000 ;138000
|
||||
db $44, $52 ;DR
|
||||
DRMode:
|
||||
dw 0
|
||||
; xxpg rmse
|
||||
; xxxx xBDM
|
||||
; x - unused
|
||||
|
||||
; p - use the original palette for the dungeon rooms instead of the DR table
|
||||
; g - fix the EG glitch in more places (should be off for no logic)
|
||||
; r - The collection rate flag
|
||||
; m - Whether to display keys Map Info
|
||||
; s - Start with Mirror Scroll
|
||||
; e - GT minibosses marked as defeated instead of spawning heart container in all dungeons
|
||||
|
||||
; B - Big Key doors can displayed and be opened on the "south" side in addition
|
||||
; D - Enabled spawning as a bunny in the Dark World underworld
|
||||
; M - hides the total number in the collection rate
|
||||
DRFlags:
|
||||
dw 0
|
||||
DRScroll:
|
||||
db 0
|
||||
OffsetTable:
|
||||
dw -8, 8
|
||||
org $A78010
|
||||
DRVersionInfo:
|
||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
||||
|
||||
org $A78020
|
||||
|
||||
incsrc normal.asm
|
||||
incsrc scroll.asm
|
||||
incsrc spiral.asm
|
||||
incsrc gfx.asm
|
||||
incsrc keydoors.asm
|
||||
incsrc overrides.asm
|
||||
incsrc edges.asm
|
||||
incsrc math.asm
|
||||
incsrc hudadditions.asm
|
||||
incsrc dr_lobby.asm
|
||||
incsrc entrance_fixes.asm
|
||||
incsrc bugfix/kholdstare_shell_collision.asm
|
||||
warnpc $A79C00
|
||||
|
||||
incsrc doortables.asm
|
||||
warnpc $A88000
|
||||
697
doorrando/doortables.asm
Normal file
697
doorrando/doortables.asm
Normal file
@@ -0,0 +1,697 @@
|
||||
org $A79C00
|
||||
KeyDoorOffset:
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
dw $0000,$0001,$0003,$0000,$0006,$0000,$000b,$0000,$0000,$0000,$000c,$000d,$0010,$0011,$0012,$0000
|
||||
dw $0000,$0015,$0018,$001c,$001e,$0025,$0027,$0000,$0000,$002b,$002d,$0033,$0035,$0038,$0039,$003d
|
||||
dw $003f,$0040,$0043,$0045,$0047,$0000,$004f,$0000,$0053,$0000,$0055,$005b,$0000,$0000,$005f,$0000
|
||||
dw $0060,$0062,$0064,$0065,$0066,$0068,$006e,$0074,$007a,$007c,$007e,$0081,$0000,$0082,$0086,$0088
|
||||
dw $0089,$008a,$0000,$008b,$008e,$0092,$0096,$0000,$0000,$0099,$009d,$00a2,$00a5,$00a6,$00a8,$00aa
|
||||
dw $00ab,$00ad,$00af,$00b2,$0000,$0000,$00b5,$00b9,$00bf,$00c5,$00c9,$00ca,$00cc,$00ce,$00d1,$00d5
|
||||
dw $00d6,$00dc,$00e3,$00e9,$00ec,$00ed,$00ee,$00f2,$00f5,$0000,$00f7,$00f8,$00fc,$00ff,$0102,$0000
|
||||
dw $0000,$0103,$0106,$0107,$010a,$010c,$010e,$0112,$0000,$0000,$0000,$0114,$0117,$011b,$011e,$0121
|
||||
dw $0000,$0123,$0000,$0124,$0127,$0128,$0000,$012c,$0000,$0000,$0000,$012e,$0133,$0139,$013e,$0000
|
||||
dw $013f,$0140,$0141,$0146,$0000,$0149,$014b,$014d,$014f,$0150,$0000,$0153,$0156,$015a,$015d,$0161
|
||||
dw $0163,$0164,$0166,$016a,$016c,$016d,$0000,$0000,$0170,$0176,$017c,$0182,$0184,$0000,$0185,$0186
|
||||
dw $0188,$018b,$018f,$0197,$019c,$019d,$019e,$01a3,$01a4,$01a6,$01aa,$01ad,$01b3,$0000,$01bb,$01be
|
||||
dw $01bf,$01c2,$01ca,$01d2,$01d9,$01da,$01dd,$01e3,$01e6,$01e7,$0000,$01ec,$01ed,$0000,$01f0,$0000
|
||||
dw $01f1,$01f3,$01f7,$0000,$0000,$01f8,$01fa,$0000,$01fd,$0200,$0203,$0204,$0206,$0000,$0000,$0000
|
||||
dw $0207
|
||||
|
||||
|
||||
org $A79E00
|
||||
SpiralOffset:
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
db $00,$01,$02,$00,$03,$00,$00,$04,$00,$05,$07,$00,$08,$00,$0b,$00
|
||||
db $00,$0c,$00,$00,$00,$0d,$0e,$0f,$00,$00,$11,$00,$13,$14,$15,$00
|
||||
db $00,$00,$00,$00,$00,$00,$16,$19,$1b,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$1c,$00,$00,$1f,$00,$00,$00,$20,$00,$21,$00,$00,$00,$00,$22
|
||||
db $23,$24,$25,$00,$00,$26,$00,$00,$00,$00,$27,$00,$29,$2a,$2b,$00
|
||||
db $00,$00,$00,$2c,$2d,$00,$00,$00,$00,$00,$00,$00,$2e,$2f,$00,$30
|
||||
db $00,$00,$00,$35,$36,$00,$37,$00,$00,$00,$38,$3a,$3b,$00,$3c,$00
|
||||
db $3d,$40,$41,$00,$00,$00,$42,$45,$00,$00,$00,$00,$00,$00,$00,$49
|
||||
db $4a,$00,$00,$00,$00,$00,$00,$4b,$00,$00,$00,$00,$4f,$00,$53,$00
|
||||
db $00,$54,$00,$55,$00,$00,$00,$56,$57,$58,$00,$00,$00,$00,$59,$00
|
||||
db $5a,$00,$5b,$00,$00,$5c,$5d,$00,$00,$00,$00,$5e,$00,$00,$5f,$00
|
||||
db $60,$00,$00,$00,$00,$63,$64,$00,$00,$00,$00,$00,$65,$00,$66,$00
|
||||
db $67,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $6a,$6d,$6e,$00,$00,$00,$00,$00,$00,$00,$6f,$00,$00,$00,$00,$00
|
||||
db $70
|
||||
|
||||
org $A79F00
|
||||
DoorOffset:
|
||||
db $00,$01,$02,$00,$03,$00,$04,$00,$00,$00,$00,$00,$9A,$05,$99,$00
|
||||
db $00,$06,$07,$08,$09,$0A,$0B,$00,$00,$0C,$0D,$0E,$00,$0F,$10,$11
|
||||
db $12,$13,$14,$15,$16,$00,$17,$00,$98,$00,$18,$19,$00,$00,$1A,$00
|
||||
db $1B,$00,$1C,$1D,$1E,$1F,$20,$21,$22,$23,$24,$25,$00,$26,$27,$00
|
||||
db $96,$28,$97,$29,$2A,$2B,$2C,$00,$00,$2D,$2E,$2F,$30,$31,$32,$00
|
||||
db $33,$34,$35,$36,$00,$00,$37,$38,$39,$3A,$3B,$3C,$3D,$3E,$3F,$40
|
||||
db $41,$42,$43,$A0,$00,$00,$44,$45,$46,$00,$47,$48,$49,$4A,$4B,$00
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
db $00,$4C,$00,$00,$00,$4D,$4E,$9E,$00,$00,$00,$4F,$50,$51,$52,$53
|
||||
db $00,$54,$00,$9C,$9D,$55,$00,$00,$00,$00,$00,$56,$57,$58,$59,$00
|
||||
db $5A,$5B,$5C,$5D,$00,$5E,$5F,$00,$9B,$60,$00,$61,$62,$63,$64,$65
|
||||
db $66,$67,$68,$69,$6A,$6B,$00,$00,$6C,$6D,$6E,$6F,$70,$00,$71,$72
|
||||
db $00,$73,$74,$75,$76,$77,$78,$79,$7A,$7B,$7C,$7D,$7E,$00,$7F,$80
|
||||
db $00,$81,$82,$83,$84,$85,$86,$87,$88,$89,$00,$8A,$8B,$00,$8C,$00
|
||||
db $00,$8D,$8E,$00,$00,$8F,$90,$00,$91,$92,$93,$94,$95,$00,$00,$00
|
||||
db $9f
|
||||
|
||||
org $A7A000
|
||||
DoorTable:
|
||||
;; NW 00 N 01 NE 02 WN 00 W 01 WS 02 SW 00 S 01 SE 02 EN 00 E 01 ES 02 - Door ruler
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Default/Garbage row
|
||||
dw $0003, $0003, $0003, $0450, $0003, $0003, $0003, $0003, $0003, $0452, $0003, $0003 ; HC Back Hall (x01)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Sewer Switches (x02)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Crystaroller
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Arghus
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Aga 2
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Sewer Secret Room
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Sanc
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Pokey
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Lava Pipe
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Pipes n Ledge
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swap Canal
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Pod dark Maze
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Pod Bridge
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Pod Eye Statue
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Pre Aga
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Cross
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice BK
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x20 Aga1
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Sewer Key Rat
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Sewer Waters
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Eye Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Chest Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp Statue
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; PoD Arena (x2a)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; PoD Statue (x2b)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Compass
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x30 Aga's Altar
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Dark Cross
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Lanmolas
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp West Wing
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Flooded Key
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp Main Hub (x36)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp Hammer Time
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp First Basement
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Drop to the Moth
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Pod 3 Catwalks
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Pod Conveyor
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Minihelma
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Conveyor
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Sewers
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert Torches
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT Big Chest
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT Cellblock
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp Compass Loop
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Skull3 Torches
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Pod Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Pod Mimics 1
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Conveyor Ice
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Moldorm
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; IPBJ
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0401, $0003, $0003 ; HC West Hall (x50)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; HC Throne Room (x51)
|
||||
dw $0003, $0003, $0003, $0401, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; HC East Hall (x52)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert Tiles 1
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Skull 2 Left Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Skull 2 Right Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Skull 1 Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Skull 3 Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Helmasaur
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Spike Switch
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Cannonball
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Gauntlet 1
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Choice Cross
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Iced U
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; HC West Lobby (x60)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; HC Main Lobby (x61)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; HC East Lobby (x62)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x66 Swamp Waterfall
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x67 Skull 1 Left Drop
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x68 Skull 1 Pinball
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x6a Pod Rupees
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x6b GT Mimics
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x6c GT Lanmolas
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x6d Gauntlet 2
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; x6e Ice Gators
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; HC Armory
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert BK Chest
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp Flooded Chests
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT DM's Tile
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Randoroom
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Warp Maze
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Freezors
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Hookpit
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; HC Catawalk
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert Right Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Left
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Hopeful Torch
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Right
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Lonely Freezor
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Vitreous (x90)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Rain
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Dark Crystals
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Blockswitch
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Fallbridge
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Torch Cross
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Darkness
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Warp Maze 2
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Invis Bridge
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Compass Room
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Big Chests
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Icy Pots
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Pre-Vitreous (xa0)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Fishbone
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Bridges
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Corner
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Trinexx (xa4)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Wizzrobes
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Compass (xa8)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Courtyard (xa9)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Map (xaa)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT Switch
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Blind
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Iced T
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Slipway
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Warpzone
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire ????
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Spikes
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Refill
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Dark Maze
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Chainchomp
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Rollers
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Big Key
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Easter Cannonball
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Dark Circle
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT Hellway
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT Bossway
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Blockswitch
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Backtracker
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Tiles
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Main Hub
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Big Chest
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Switch Maze
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Narrow
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Early Hub
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Floating Torches
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Armos
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT NW Quad
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT NE Quad
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Boss Drop
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire BK
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire 2
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Laser Bridge
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TR Main Entrance
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Eyegores
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Attic Switches
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Eastern Attic Start
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT Entrance Quad
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT SE Quad
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Aga 6F
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Sewers Rope
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert West Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert Main Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Hera Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Tower Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert Back Lobby
|
||||
; this should end at 27AF18 about (160 * 24 bytes = 3840 or F18)
|
||||
; some values you can hardcode for spirals
|
||||
;dw $0070, $36a0 ; ->HC Stairwell
|
||||
;dw $0072, $4ff8 ; ->HC Map Room
|
||||
;dw $0080, $1f50 ; ->zelda's cellblock
|
||||
|
||||
org $A7B000
|
||||
SpiralTable: ;113 4 byte entries - should end at 27B1C4
|
||||
dw $0203, $8080 ;null row
|
||||
dw $0203, $8080 ;HC Backhallway
|
||||
dw $0203, $8080 ;Sewer Pull
|
||||
dw $0203, $8080 ;Crystaroller
|
||||
dw $0203, $8080 ;Moldorm
|
||||
dw $0203, $8080, $0203, $8080 ;Pod Basement
|
||||
dw $0203, $8080 ;Pod Stalfos
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080 ;GT Entrance
|
||||
dw $0203, $8080 ;Ice Entrance
|
||||
dw $0203, $8080 ;Escape
|
||||
dw $0203, $8080 ;TR Pipe Ledge
|
||||
dw $0203, $8080 ;Swamp Way
|
||||
dw $0203, $8080, $0203, $8080 ;Hera Fallplace
|
||||
dw $0203, $8080, $0203, $8080 ;PoD Bridge
|
||||
dw $0203, $8080 ;GT Ice
|
||||
dw $0203, $8080 ;GT F8
|
||||
dw $0203, $8080 ;Ice Cross
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Swamp Statue
|
||||
dw $0203, $8080, $0203, $8080 ;Hera Big
|
||||
dw $0203, $8080 ;Swamp Ent
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Hera Startiles (middle value unused)
|
||||
dw $0203, $8080 ;West Swamp
|
||||
dw $0203, $8080 ;Swamp Basement
|
||||
dw $0203, $8080 ;Pod Drops
|
||||
dw $0203, $8080 ;Ice Hammer
|
||||
dw $0203, $8080 ;Aga Guards
|
||||
dw $0203, $8080 ;Sewer Begin
|
||||
dw $0203, $8080 ;Sewer Rope
|
||||
dw $0203, $8080 ;TT Cellblock
|
||||
dw $0203, $8080, $0203, $8080 ;Pod Entrance
|
||||
dw $0203, $8080 ;GT Icespike
|
||||
dw $0203, $8080 ;GT Moldorm
|
||||
dw $0203, $8080 ;IPBJ
|
||||
dw $0203, $8080 ;Desert Prep
|
||||
dw $0203, $8080 ;Swamp Attic
|
||||
dw $0203, $8080 ;GT Cannonball
|
||||
dw $0203, $8080 ;GT Gauntlet1
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080 ;Ice U (1st three values unused)
|
||||
dw $0203, $8080 ;Desert Back
|
||||
dw $0203, $8080 ;TT Attic L
|
||||
dw $0203, $8080 ;Swamp Waterf
|
||||
dw $0203, $8080 ;Pod Rupees
|
||||
dw $0203, $8080 ;Pod Rupees
|
||||
dw $0203, $8080 ;GT Mimics
|
||||
dw $0203, $8080 ;GT Lanmo
|
||||
dw $0203, $8080 ;Ice Gators
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080 ;HC Tiny (first value placeholder)
|
||||
dw $0203, $8080 ;HC Boomer
|
||||
dw $0203, $8080 ;HC Pits1
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Swamp Sunken
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080 ;Hera Entrance (first value unused)
|
||||
dw $0203, $8080 ;Ice Hookshot
|
||||
dw $0203, $8080 ;HC Cellblock
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080 ;Hera Basement (first and third values unused)
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080 ;GT Circle (third value unused)
|
||||
dw $0203, $8080 ;Ice Last Freeze
|
||||
dw $0203, $8080 ;Mire Drops
|
||||
dw $0203, $8080 ;Mire Block
|
||||
dw $0203, $8080 ;Mire Attic
|
||||
dw $0203, $8080 ;Mire Entrance
|
||||
dw $0203, $8080 ;East Dark
|
||||
dw $0203, $8080 ;Ice Big
|
||||
dw $0203, $8080 ;Mire Previtreous
|
||||
dw $0203, $8080 ;Mire Bridges
|
||||
dw $0203, $8080 ;GT Wizzrobes
|
||||
dw $0203, $8080 ;GT Spikepit
|
||||
dw $0203, $8080 ;TT Switch
|
||||
dw $0203, $8080 ;Ice T
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Tower Usains (2nd value unused)
|
||||
dw $0203, $8080 ;TR PlatMaze
|
||||
dw $0203, $8080 ;TR Chainchomp
|
||||
dw $0203, $8080 ;TT Bossway
|
||||
dw $0203, $8080 ;Ice FallZone
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Tower Dark2 (2nd value unused)
|
||||
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Tower Dark1 (2nd value unused)
|
||||
dw $0203, $8080 ;Mire BK Thang
|
||||
dw $0203, $8080 ;Mire2
|
||||
dw $0203, $8080 ;East Attic Start
|
||||
dw $0203, $8080 ;Tower Entrance
|
||||
|
||||
|
||||
org $A7C000 ;ends around 27C418
|
||||
PairedDoorTable:
|
||||
dw $0000 ; the bad template
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000
|
||||
|
||||
dw $0000,$0000,$8021
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $4014,$0000
|
||||
dw $8024,$8013,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $201a,$401a
|
||||
dw $0000,$4019,$8019,$402a,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
|
||||
dw $0000
|
||||
dw $2011,$0000,$0000
|
||||
dw $8032,$0000
|
||||
dw $0000,$0000
|
||||
dw $8014,$0000,$0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $4036,$0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$101a,$402b,$0000,$0000,$0000
|
||||
dw $0000,$202a,$0000,$0000
|
||||
dw $0000
|
||||
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $8022
|
||||
dw $0000
|
||||
dw $0000,$0000
|
||||
dw $2036,$0000,$0000,$0000,$0000,$0000
|
||||
dw $8037,$8026,$8035,$0000,$0000,$0000
|
||||
dw $8036,$8038,$0000,$4038,$0000,$0000
|
||||
dw $4037,$1037
|
||||
dw $0000,$0000
|
||||
dw $204a,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$804d,$0000
|
||||
dw $0000,$404e
|
||||
dw $0000
|
||||
|
||||
dw $0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$2053
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$8059,$0000
|
||||
dw $0000,$0000,$803a,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $203d,$0000
|
||||
dw $0000,$403e
|
||||
dw $0000 ; this is the odd extra room - shouldn't be used
|
||||
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$2043
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$4058,$0000,$0000,$0000
|
||||
dw $0000,$2057,$4068,$0000,$0000,$0000
|
||||
dw $2049,$0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $806b,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $805f,$0000,$0000,$0000
|
||||
dw $805e
|
||||
|
||||
dw $0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$2058
|
||||
dw $0000
|
||||
dw $805b,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$207c,$0000
|
||||
dw $0000,$407d,$407b,$0000
|
||||
dw $0000,$407c,$0000
|
||||
dw $808e,$0000,$0000
|
||||
dw $0000,$0000
|
||||
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000
|
||||
dw $807e
|
||||
|
||||
dw $0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$20a9,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
|
||||
dw $0000
|
||||
dw $40b1,$0000
|
||||
dw $80b2,$0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$80b8,$0000,$0000,$0000
|
||||
dw $0000,$0000,$4099,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000
|
||||
dw $0000
|
||||
dw $0000,$0000
|
||||
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$80a1,$0000,$0000
|
||||
dw $80a2,$0000,$0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$80c6,$0000,$0000
|
||||
dw $0000
|
||||
dw $20a8,$0000
|
||||
dw $80ba,$0000,$0000,$0000
|
||||
dw $80b9,$0000,$0000
|
||||
dw $0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$80cc,$0000,$40cc,$0000,$0000,$0000,$0000
|
||||
dw $0000,$80bf,$0000
|
||||
dw $40be
|
||||
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$40c2,$0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $80c3,$40c1,$0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $80c2,$0000,$0000,$0000,$0000,$0000,$0000
|
||||
dw $80c5
|
||||
dw $80c4,$0000,$0000
|
||||
dw $20b6,$0000,$0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000,$0000,$0000
|
||||
dw $20cc
|
||||
dw $40bc,$10bc,$80cb
|
||||
dw $0000
|
||||
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000
|
||||
dw $0000
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $ffff ; indicates the end - we can drop this
|
||||
|
||||
; Edge Transition Table (Target Room, Flags, MultiDiv ratio for edges)
|
||||
org $A7C500 ;ends around 27C5F(9) 4 bytes would be 27C649
|
||||
;I kind of want to split the 3rd byte into two
|
||||
NorthOpenEdge:
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
SouthOpenEdge:
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
WestOpenEdge:
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
EastOpenEdge:
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
; Edge Info Table (Midpoint, Width, Min Coord)
|
||||
; I kind of want to add a fourth byte to help indicate quadrant info on min coord
|
||||
NorthEdgeInfo:
|
||||
db $a8,$10,$a0, $2c,$08,$28 ;HC
|
||||
db $b8,$20,$a8 ; DP West Wing
|
||||
db $38,$20,$28, $f8,$a0,$a8, $b8,$20,$a8 ; DP Main
|
||||
db $78,$20,$68 ; DP East Wing
|
||||
db $f8,$10,$f0, $7c,$18,$70 ; TT Lobby
|
||||
db $74,$18,$68, $f8,$10,$f0 ; TT Compass
|
||||
SouthEdgeInfo:
|
||||
db $a8,$10,$a0, $2c,$08,$28 ; HC
|
||||
db $b8,$20,$a8 ; DP Sandworm
|
||||
db $38,$20,$28, $f8,$a0,$a8, $b8,$20,$a8 ; DP North Hall & Dead End
|
||||
db $78,$20,$68 ; DP Arrow Pot
|
||||
db $f8,$10,$f0, $7c,$18,$70 ; TT Ambush
|
||||
db $74,$18,$68, $f8,$10,$f0 ; TT BK Corner
|
||||
WestEdgeInfo:
|
||||
db $78,$30,$60 ; TT Attic
|
||||
db $40,$20,$30 ; DP North Hall
|
||||
db $40,$20,$30 ; DP Arrow Pot
|
||||
db $84,$18,$78, $68,$10,$60 ; HC South
|
||||
db $a0,$a0,$50 ; DP East Wing
|
||||
db $58,$50,$30, $98,$50,$70 ; TT BK Corner
|
||||
db $58,$50,$30 ; TT Compass
|
||||
EastEdgeInfo:
|
||||
db $78,$30,$60 ; TT Attic
|
||||
db $40,$20,$30 ; DP Sandworm
|
||||
db $40,$20,$30 ; DP North Hall
|
||||
db $68,$10,$60, $84,$18,$78 ; HC Guards
|
||||
db $a0,$a0,$50 ; DP Main Lobby
|
||||
db $58,$50,$30, $98,$50,$70 ; TT Ambush
|
||||
db $58,$50,$30 ; TT Nook
|
||||
MultDivInfo: ; (1, 2, 3, 4, 5, 6, 10, 20)
|
||||
db $01, $02, $03, $04, $05, $06, $0a, $14
|
||||
; indices: 0-7
|
||||
|
||||
; In-room stairs in North/South pairs. From left to right:
|
||||
; PoD, IP right side, IP Freezor chest and GT
|
||||
org $A7C700
|
||||
InroomStairsTable:
|
||||
dw $0003,$0003, $0003,$0003, $0003,$0003, $0003,$0003
|
||||
|
||||
org $A7C720
|
||||
InroomStairsRoom:
|
||||
db $0B,$1B, $3F,$1F, $7E,$5E, $96,$3D
|
||||
InroomStairsX:
|
||||
dw $0190, $0160, $0040, $0178
|
||||
InroomStairsY:
|
||||
dw $0058, $0148, $0198, $0190
|
||||
|
||||
|
||||
org $A7E000
|
||||
CutoffRooms:
|
||||
; TT Alcove, Mire Bridge Left & Right, Mire Bent Bridge, Mire Hub
|
||||
; Pod Falling & Harmless, SW Star Pits, TR Lava Escape & TR Dual Pipes, Bob's Room & GT Big Chest
|
||||
dw $00bc, $00a2, $00a3, $00c2, $001a, $0049, $0014, $008c
|
||||
; Ice Many Pots, Swamp Waterfall, GT Gauntlet 3, Eastern Push Block, Eastern Courtyard, Eastern Map Valley
|
||||
; Eastern Cannonball, HC East Hall
|
||||
dw $009f, $0066, $005d, $00a8, $00a9, $00aa, $00b9, $0052
|
||||
; HC West Hall, TR Dash Bridge, TR Hub, Pod Arena, GT Petting Zoo, Ice Spike Cross
|
||||
dw $0050, $00c5, $00c6, $0009, $0003, $002a, $007d, $005e
|
||||
; Sewer Drop, Mire Cross, GT Crystal Circles
|
||||
dw $0011, $00b2, $003d
|
||||
dw $ffff
|
||||
|
||||
; dungeon tables
|
||||
; HC HC EP DP AT SP PD MM SW IP TH TT TR GT
|
||||
org $A7f000
|
||||
CompassBossIndicator:
|
||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
||||
TotalKeys: ;27f020
|
||||
db $04, $04, $02, $04, $04, $06, $06, $06, $05, $06, $01, $03, $06, $08, $00, $00
|
||||
skip $10
|
||||
;ChestKeys: ;27f030 - moved to B0F010
|
||||
;db $01, $01, $00, $01, $02, $01, $06, $03, $03, $02, $01, $01, $04, $04, $00, $00
|
||||
BigKeyStatus: ;27f040 (status 2 indicate BnC guard)
|
||||
dw $0002, $0002, $0001, $0001, $0000, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0000, $0000
|
||||
DungeonReminderTable: ;27f060
|
||||
dw $2D50, $2D50, $2D51, $2D52, $2D54, $2D56, $2D55, $2D5A, $2D57, $2D59, $2D53, $2D58, $2D5B, $2D5C, $0000, $0000
|
||||
TotalLocationsLow: ;27f080
|
||||
db $08, $08, $06, $06, $02, $00, $04, $08, $08, $08, $06, $08, $02, $07, $00, $00
|
||||
TotalLocationsHigh: ;27f090
|
||||
db $00, $00, $00, $00, $00, $01, $01, $00, $00, $00, $00, $00, $01, $02, $00, $00
|
||||
org $A7f0a0
|
||||
TotalLocations:
|
||||
db $08, $08, $06, $06, $02, $0a, $0e, $08, $08, $08, $06, $08, $0c, $1b, $00, $00
|
||||
; no more room here
|
||||
|
||||
; Vert 0,6,0 Horz 2,0,8
|
||||
org $A7f0b0
|
||||
CoordIndex: ; Horizontal 1st
|
||||
db 2, 0 ; Coordinate Index $20-$23
|
||||
OppCoordIndex:
|
||||
db 0, 2 ; Swapped coordinate Index $20-$23 (minor optimization)
|
||||
CameraIndex: ; Horizontal 1st
|
||||
db 0, 6 ; Camera Index $e2-$ea
|
||||
CamQuadIndex: ; Horizontal 1st
|
||||
db 8, 0 ; Camera quadrants $600-$60f
|
||||
ShiftQuadIndex:
|
||||
db 2, 1 ; see ShiftQuad func (relates to $a9,$aa)
|
||||
CamBoundIndex: ; Horizontal 1st
|
||||
db 0, 4 ; Camera Bounds $0618-$61f
|
||||
OppCamBoundIndex: ; Horizontal 1st
|
||||
db 4, 0 ; Camera Bounds $0618-$61f
|
||||
CamBoundBaseLine: ; X camera stuff is 1st column todo Y camera needs more testing
|
||||
dw $007f, $0077 ; Left/Top camera bounds when at edge or layout frozen
|
||||
dw $0007, $000b ; Left/Top camera bounds when not frozen + appropriate low byte $22/$20 (preadj. by #$78/#$6c)
|
||||
dw $00ff, $010b ; Right/Bot camera bounds when not frozen + appropriate low byte $20/$22
|
||||
dw $017f, $0187 ; Right/Bot camera bound when at edge or layout frozen
|
||||
;27f0ce next free byte
|
||||
|
||||
org $A7f0f0
|
||||
RemoveRainDoorsRoom:
|
||||
dw $0060, $0062, $ffff ; ffff indicates end of list
|
||||
RainDoorMatch: ; org $A7f0f6 and f8 for now
|
||||
dw $0081, $0061 ; not xba'd
|
||||
BlockSanctuaryDoorInRain: ;27f0fa
|
||||
dw $0000
|
||||
|
||||
|
||||
org $A7f100
|
||||
TilesetTable:
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
db $13,$04,$04,$06,$0d,$ff,$08,$05,$06,$07,$07,$07,$0e,$0e,$0b,$ff
|
||||
db $13,$04,$04,$0d,$0d,$0d,$08,$05,$06,$07,$07,$07,$0e,$0e,$0b,$0b
|
||||
db $04,$04,$04,$0d,$0d,$ff,$08,$05,$08,$09,$07,$07,$06,$ff,$0b,$06
|
||||
db $04,$05,$04,$12,$08,$08,$08,$08,$08,$09,$07,$07,$06,$0e,$0b,$0b
|
||||
db $04,$04,$04,$12,$0a,$0a,$08,$ff,$ff,$09,$07,$07,$0e,$0e,$0b,$0b
|
||||
db $04,$04,$04,$12,$08,$01,$09,$09,$09,$09,$07,$0e,$0e,$0e,$0b,$0b
|
||||
db $04,$04,$04,$12,$0a,$0a,$08,$09,$09,$ff,$07,$0e,$0e,$0e,$0b,$ff
|
||||
db $04,$04,$04,$12,$12,$12,$08,$05,$ff,$ff,$ff,$0e,$0e,$0e,$0b,$0b
|
||||
db $04,$04,$04,$12,$12,$12,$ff,$05,$ff,$05,$ff,$0e,$0e,$0e,$0b,$ff
|
||||
db $0c,$0c,$0c,$0c,$ff,$0e,$0e,$0c,$0c,$05,$ff,$0e,$0e,$0e,$0b,$0b
|
||||
db $0c,$0c,$0c,$0c,$0d,$0e,$0e,$05,$05,$05,$05,$0a,$0a,$ff,$0b,$0b
|
||||
db $04,$0c,$0c,$0c,$0d,$0d,$0d,$0d,$05,$05,$05,$0a,$0a,$ff,$0b,$0b
|
||||
db $04,$0c,$0c,$0c,$0d,$0d,$0d,$0d,$05,$05,$ff,$0a,$0a,$ff,$0b,$ff
|
||||
db $04,$0c,$0c,$ff,$ff,$0d,$0d,$ff,$05,$05,$05,$0a,$0a,$ff,$0b,$06
|
||||
db $04,$06,$06,$06,$06,$06,$06,$06,$06,$ff,$06,$06,$ff,$06,$06,$06
|
||||
db $06,$06,$03,$03,$03,$03,$ff,$ff,$06,$06,$06,$06,$ff,$06,$06,$06
|
||||
|
||||
;27f200
|
||||
PaletteTable:
|
||||
db $21,$00,$00,$07,$00,$08,$00,$00,$07,$00,$00,$00,$00,$00,$00,$21
|
||||
db $21,$00,$00,$00,$00,$00,$00,$00,$07,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$0e,$00,$00,$07,$00,$00,$07
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$13
|
||||
db $00,$00,$00,$00,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
db $00,$00,$00,$00,$00,$00,$00,$06,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$14,$20
|
||||
db $00,$07,$20,$20,$07,$07,$07,$07,$07,$20,$20,$07,$20,$20,$20,$20
|
||||
db $07,$07,$02,$02,$02,$02,$07,$07,$07,$20,$20,$07,$20,$20,$20,$07
|
||||
|
||||
;A7f300
|
||||
DungeonTilesets:
|
||||
db $04,$04,$05,$12,$04,$08,$07,$0C,$09,$0B,$05,$0A,$0D,$0E,$06,$06
|
||||
|
||||
;
|
||||
;org $A7ff00
|
||||
|
||||
org $A7fff0
|
||||
LinksHouseDarkWorld:
|
||||
dw $ffff
|
||||
SanctuaryDarkWorld:
|
||||
dw $ffff
|
||||
OldManDarkWorld:
|
||||
dw $ffff
|
||||
10
doorrando/dr_lobby.asm
Normal file
10
doorrando/dr_lobby.asm
Normal file
@@ -0,0 +1,10 @@
|
||||
CheckDarkWorldSpawn:
|
||||
STA.b RoomIndex : STA.w RoomIndexMirror ; what we wrote over
|
||||
LDA.l DRFlags : AND.w #$0200 : BEQ + ; skip if the flag isn't set
|
||||
LDA.l MoonPearlEquipment : AND.w #$00FF : BNE + ; moon pearl?
|
||||
LDA.l LinksHouseDarkWorld : CMP.b RoomIndex : BEQ ++
|
||||
LDA.l SanctuaryDarkWorld : CMP.b RoomIndex : BEQ ++
|
||||
LDA.l OldManDarkWorld : CMP.b RoomIndex : BNE +
|
||||
++ SEP #$30 : LDA.b #$17 : STA.b LinkState
|
||||
INC.w BunnyFlag : LDA.b #$40 : STA.l CurrentWorld : REP #$30
|
||||
+ RTL
|
||||
224
doorrando/drhooks.asm
Normal file
224
doorrando/drhooks.asm
Normal file
@@ -0,0 +1,224 @@
|
||||
org $82b5c4 ; -- moving right routine 135c4
|
||||
jsl WarpRight
|
||||
org $82b665 ; -- moving left routine
|
||||
jsl WarpLeft
|
||||
org $82b713 ; -- moving down routine
|
||||
jsl WarpDown
|
||||
org $82b7b4 ; -- moving up routine
|
||||
jsl WarpUp
|
||||
org $82bd80
|
||||
jsl AdjustTransition
|
||||
nop
|
||||
|
||||
;turn off linking doors -- see .notRoomLinkDoor label in Bank02.asm
|
||||
org $82b5a8 ; <- 135a8 - Bank02.asm : 8368 (LDA $7EC004 : STA $A0)
|
||||
jsl CheckLinkDoorR
|
||||
bcc NotLinkDoor1
|
||||
org $82b5b6
|
||||
NotLinkDoor1:
|
||||
org $82b649 ; <- 135a8 - Bank02.asm : 8482 (LDA $7EC004 : STA $A0)
|
||||
jsl CheckLinkDoorL
|
||||
bcc NotLinkDoor2
|
||||
org $82b657
|
||||
NotLinkDoor2:
|
||||
|
||||
|
||||
; Staircase routine
|
||||
org $81c3d4 ; <- c3d4 - Bank01.asm : 9762-4 (Dungeon_DetectStaircase-> STA $A0 : LDA $063D, X)
|
||||
jsl RecordStairType : nop
|
||||
org $82a1e7 ;(PC: 121e7)
|
||||
jsl SpiralWarp
|
||||
|
||||
org $8291b3 ; <- Bank02.asm : 3303 (LDA $0462 : AND.b #$04)
|
||||
jsl SpiralPriorityHack : nop
|
||||
org $8290f9 ; <- Bank02.asm : 3188 (LDA $0462 : AND.b #$04)
|
||||
jsl SpiralPriorityHack : nop
|
||||
|
||||
org $829369 ; <- 11369 - Bank02.asm : 3610 (STX $0464 : STY $012E)
|
||||
jsl StraightStairsAdj : nop #2
|
||||
org $829383 ; <- 11384 - Bank02.asm : 3629 (.walkingDownStaircase-> ADD $20 : STA $20)
|
||||
jsl StraightStairsFix : nop
|
||||
org $8293aa ; <- 113aa - Bank02.asm : 3653 (ADD $20 : STA $20)
|
||||
jsl StraightStairsFix : nop
|
||||
org $8293d1 ; <- 113d1 - Bank02.asm : 3683 (ADD $20 : STA $20 BRANCH_IOTA)
|
||||
jsl StraightStairsFix : nop
|
||||
org $829396 ; <- 11396 - Bank02.asm : 3641 (LDA $01C322, X)
|
||||
jsl StraightStairLayerFix
|
||||
org $82c06d ; <- Bank02.asm : 9874 (LDX $0418, CMP.b #$02)
|
||||
jsl DoorToStraight : nop
|
||||
org $82c092 ; STA $0020, Y : LDX #$00
|
||||
jsl DoorToInroom : nop
|
||||
org $82c0f8 ; CMP $02C034, X
|
||||
jsl DoorToInroomEnd
|
||||
org $82941a ; <- Bank02.asm : 3748 module 7.12.11 (LDA $0464 : BNE BRANCH_$11513 : INC $B0 : RTS)
|
||||
jsl StraightStairsTrapDoor : rts
|
||||
org $828b54 ; <- Bank02.asm : 2200 (JSL UseImplicitRegIndexedLocalJumpTable)
|
||||
jsl InroomStairsTrapDoor
|
||||
org $82c146
|
||||
jsl HandleSpecialDoorLanding
|
||||
|
||||
org $8289a0 ; JSL $0091C4
|
||||
jsl QuadrantLoadOrderBeforeScroll
|
||||
org $82bd9c ; JSL $0091C4
|
||||
jsl QuadrantLoadOrderAfterScroll
|
||||
|
||||
|
||||
; Graphics fix
|
||||
org $82895d ; Bank 02 line 1812 (JSL Dungeon_LoadRoom : JSL Dungeon_InitStarTileChr : JSL $00D6F9 : INC $B0)
|
||||
Splicer:
|
||||
jsl GfxFixer
|
||||
lda.b $b1 : beq .done
|
||||
rts
|
||||
nop #5
|
||||
.done
|
||||
|
||||
org $81b618 ; Bank01.asm : 7963 Dungeon_LoadHeader (REP #$20 : INY : LDA [$0D], Y)
|
||||
nop : jsl OverridePaletteHeader
|
||||
|
||||
org $82817e ; Bank02.asm : 414 (LDA $02811E, X)
|
||||
jsl FixAnimatedTiles
|
||||
|
||||
org $8aef43 ; UnderworldMap_RecoverGFX
|
||||
jsl FixCloseDungeonMap
|
||||
|
||||
org $828a06 ; Bank02.asm : 1941 Dungeon_ResetTorchBackgroundAndPlayer
|
||||
JSL FixWallmasterLamp
|
||||
|
||||
org $80d377 ;Bank 00 line 3185
|
||||
DecompDungAnimatedTiles:
|
||||
org $80fda4 ;Bank 00 line 8882
|
||||
Dungeon_InitStarTileCh:
|
||||
org $80d6ae ;(PC: 56ae)
|
||||
LoadTransAuxGfx:
|
||||
org $80d739 ;
|
||||
LoadTransAuxGfx_Alt:
|
||||
org $80df5a ;(PC: 5f5a)
|
||||
PrepTransAuxGfx:
|
||||
org $8ffd65 ;(PC: 07fd65)
|
||||
Dungeon_LoadCustomTileAttr:
|
||||
org $81feb0
|
||||
Dungeon_ApproachFixedColor:
|
||||
;org $81fec1
|
||||
;Dungeon_ApproachFixedColor_variable:
|
||||
;org $a0f972 ; Rando version
|
||||
;LoadRoomHook:
|
||||
org $9bee74 ;(PC: 0dee74)
|
||||
Palette_DungBgMain:
|
||||
org $9bec77
|
||||
Palette_SpriteAux3:
|
||||
org $9becc5
|
||||
Palette_SpriteAux2:
|
||||
org $9bece4
|
||||
Palette_SpriteAux1:
|
||||
|
||||
|
||||
org $828046 ; <- 10046 - Bank02.asm : 217 (JSL EnableForceBlank) (Start of Module_LoadFile)
|
||||
jsl OnFileLoadOverride
|
||||
org $87A93F ; < 3A93F - Bank07.asm 6548 (LDA $8A : AND.b #$40 - Mirror checks)
|
||||
jsl MirrorCheckOverride
|
||||
|
||||
org $85ef47
|
||||
Sprite_HeartContainer_Override: ;sprite_heart_upgrades.asm : 96-100 (LDA $040C : CMP.b #$1A : BNE .not_in_ganons_tower)
|
||||
jsl GtBossHeartCheckOverride : bcs .not_in_ganons_tower
|
||||
nop : stz.w SpriteAITable, X : rts
|
||||
.not_in_ganons_tower
|
||||
|
||||
|
||||
org $87a955 ; <- Bank07.asm : around 6564 (JP is a bit different) (STZ $05FC : STZ $05FD)
|
||||
jsl BlockEraseFix
|
||||
nop #2
|
||||
|
||||
org $82A0A8
|
||||
Mirror_SaveRoomData:
|
||||
org $87A95B ; < bank_07.asm ; #_07A95B: JSL Mirror_SaveRoomData
|
||||
jsl EGFixOnMirror
|
||||
|
||||
org $82b82a
|
||||
jsl FixShopCode
|
||||
|
||||
org $9ddeea ; <- Bank1D.asm : 286 (JSL SpritePrep_LoadProperties)
|
||||
jsl VitreousKeyReset
|
||||
|
||||
org $9ed024 ; f5024 sprite_guruguru_bar.asm : 27 (LDA $040C : CMP.b #$12 : INY #2
|
||||
jsl GuruguruFix : bra .next
|
||||
nop #3
|
||||
.next
|
||||
|
||||
org $828fc9
|
||||
nop #2 : jsl BlindAtticFix
|
||||
|
||||
org $828409
|
||||
jsl SuctionOverworldFix
|
||||
|
||||
org $8ded04 ; <- rando's hooks.asm line 2192 - 6ED04 - equipment.asm : 1963 (REP #$30)
|
||||
jsl DrHudDungeonItemsAdditions
|
||||
;org $098638 ; rando's hooks.asm line 2192
|
||||
;jsl CountChestKeys
|
||||
org $86D192 ; rando's hooks.asm line 457
|
||||
jsl CountAbsorbedKeys
|
||||
; rando's hooks.asm line 1020
|
||||
;org $05FC7E ; <- 2FC7E - sprite_dash_item.asm : 118 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||
;jsl CountBonkItem
|
||||
|
||||
org $819dbd ; <- Bank01.asm : 4465 of Object_Draw8xN (LDA $9B52, Y : STA $7E2000, X)
|
||||
jsl CutoffEntranceRug : bra .nextTile : nop
|
||||
.nextTile
|
||||
|
||||
;maybe set 02e2 to 0
|
||||
|
||||
org $8799de ; <- Bank07.asm : 4088 (LDA.b #$15 : STA $5D)
|
||||
JSL StoreTempBunnyState
|
||||
;
|
||||
org $88C450 ; <- ancilla_receive_item.asm : 146-148 (STY $5D : STZ $02D8)
|
||||
JSL RetrieveBunnyState : JMP.w + : NOP : +
|
||||
|
||||
org $82d9ce ; <- Bank02.asm : Dungeon_LoadEntrance 10829 (STA $A0 : STA $048E)
|
||||
JSL CheckDarkWorldSpawn : NOP
|
||||
|
||||
org $9edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00)
|
||||
JSL StandardAgaDmg
|
||||
|
||||
org $89F7B2 ; 09F7B2 Module17_01 S&Q
|
||||
JSL StandardSaveAndQuit
|
||||
|
||||
org $89a681 ; < - similar to talalong.asm : 1157 (JSL Main_ShowTextMessage)
|
||||
JSL BlindsAtticHint : NOP #2
|
||||
org $9cfd69
|
||||
Main_ShowTextMessage:
|
||||
|
||||
; Conditionally disable UW music changes in Door Rando
|
||||
org $828ADB ; <- Bank02.asm:2088-2095 (LDX.b #$14 : LDA $A0 ...)
|
||||
JSL Underworld_DoorDown_Entry : CPX.b #$FF
|
||||
BEQ + : db $80, $1C ; BRA $028B04
|
||||
NOP #6 : +
|
||||
|
||||
org $82FD00 ; unreachable code
|
||||
Underworld_SetBossOrSancMusicUponEntry_long:
|
||||
JSR Underworld_SetBossOrSancMusicUponEntry : RTL
|
||||
|
||||
org $81AA90
|
||||
JSL BigKeyDoorCheck : NOP
|
||||
|
||||
org $81AAA2
|
||||
RoomDraw_OneSidedShutters_South_onesided_shutter_or_big_key_door:
|
||||
|
||||
;Enable south facing bk graphic
|
||||
org $80CE24
|
||||
dw $2ac8
|
||||
|
||||
org $81b714 ; PC: b714
|
||||
OpenableDoors:
|
||||
jsl CheckIfDoorsOpen
|
||||
bcs .normal
|
||||
rts
|
||||
.normal
|
||||
|
||||
org $82C157
|
||||
JSL AlwaysPushThroughFDoors
|
||||
|
||||
; Modified from OWR - will need to remove once merged
|
||||
org $85AF75
|
||||
Sprite_6C_MirrorPortal:
|
||||
JSL FixOvalFadeOutMirror : NOP #2 ; LDA $7EF3CA : BNE $05AFDF
|
||||
org $85AFDF
|
||||
Sprite_6C_MirrorPortal_missing_mirror:
|
||||
305
doorrando/edges.asm
Normal file
305
doorrando/edges.asm
Normal file
@@ -0,0 +1,305 @@
|
||||
; defines
|
||||
; Ram usage
|
||||
|
||||
HorzEdge:
|
||||
cpy.b #$ff : beq +
|
||||
jsr DetectWestEdge : ldy.b #$02 : bra ++
|
||||
+ jsr DetectEastEdge
|
||||
++ cmp.b #$ff : beq +
|
||||
sta.b Scrap00 : asl : !ADD.b Scrap00 : tax
|
||||
cpy.b #$ff : beq ++
|
||||
jsr LoadWestData : bra .main
|
||||
++ jsr LoadEastData
|
||||
.main
|
||||
jsr LoadEdgeRoomHorz
|
||||
sec : rts
|
||||
+ clc : rts
|
||||
|
||||
VertEdge:
|
||||
cpy.b #$ff : beq +
|
||||
jsr DetectNorthEdge : bra ++
|
||||
+ jsr DetectSouthEdge
|
||||
++ cmp.b #$ff : beq +
|
||||
sta.b Scrap00 : asl : !ADD.b Scrap00 : tax
|
||||
cpy.b #$ff : beq ++
|
||||
jsr LoadNorthData : bra .main
|
||||
++ jsr LoadSouthData
|
||||
.main
|
||||
jsr LoadEdgeRoomVert
|
||||
sec : rts
|
||||
+ clc : rts
|
||||
|
||||
LoadEdgeRoomHorz:
|
||||
lda.b Scrap03 : sta.b RoomIndex
|
||||
sty.b Scrap06
|
||||
and.b #$0f : asl a : !SUB.b LinkPosX+1 : !ADD.b Scrap06 : sta.b Scrap02
|
||||
ldy.b #$00 : jsr ShiftVariablesMainDir
|
||||
|
||||
lda.b Scrap04 : and.b #$80 : bne .edge
|
||||
lda.b Scrap04 : sta.b Scrap01 ; load up flags in $01
|
||||
jsr PrepScrollToNormal
|
||||
bra .scroll
|
||||
|
||||
.edge
|
||||
lda.b Scrap04 : and.b #$10 : beq +
|
||||
lda.b #$01
|
||||
+ sta.b LinkLayer ; layer stuff
|
||||
|
||||
jsr MathHorz
|
||||
|
||||
.scroll
|
||||
jsr ScrollY
|
||||
rts
|
||||
|
||||
LoadEdgeRoomVert:
|
||||
lda.b Scrap03 : sta.b RoomIndex
|
||||
sty.b Scrap06
|
||||
and.b #$f0 : lsr #3 : !SUB.b LinkPosY+1 : !ADD.b Scrap06 : sta.b Scrap02
|
||||
|
||||
lda.b Scrap04 : and.b #$80 : bne .edge
|
||||
lda.b Scrap04 : sta.b Scrap01 ; load up flags in $01
|
||||
and.b #$03 : cmp.b #$03 : beq .inroom
|
||||
ldy.b #$01 : jsr ShiftVariablesMainDir
|
||||
jsr PrepScrollToNormal
|
||||
bra .scroll
|
||||
|
||||
.inroom
|
||||
jsr ScrollToInroomStairs
|
||||
rts
|
||||
|
||||
.edge
|
||||
ldy.b #$01 : jsr ShiftVariablesMainDir
|
||||
lda.b Scrap04 : and.b #$10 : beq +
|
||||
lda.b #$01
|
||||
+ sta.b LinkLayer ; layer stuff
|
||||
|
||||
jsr MathVert
|
||||
lda.b Scrap03
|
||||
|
||||
.scroll
|
||||
jsr ScrollX
|
||||
rts
|
||||
|
||||
|
||||
MathHorz:
|
||||
jsr MathStart : lda.b LinkPosY
|
||||
jsr MathMid : and.w #$0040
|
||||
jsr MathEnd
|
||||
rts
|
||||
|
||||
MathVert:
|
||||
jsr MathStart : lda.b LinkPosX
|
||||
jsr MathMid : and.w #$0020
|
||||
jsr MathEnd
|
||||
rts
|
||||
|
||||
MathStart:
|
||||
rep #$30
|
||||
lda.b Scrap08 : and.w #$00ff : sta.b Scrap00
|
||||
rts
|
||||
|
||||
MathMid:
|
||||
and.w #$01ff : !SUB.b Scrap00 : and.w #$00ff : sta.b Scrap00
|
||||
; nothing should be bigger than $a0 at this point
|
||||
|
||||
lda.b Scrap05 : and.w #$00f0 : lsr #4 : tax
|
||||
lda.w MultDivInfo, x : and.w #$00ff : tay
|
||||
lda.b Scrap00 : jsr MultiplyByY : sta.b Scrap02
|
||||
|
||||
lda.b Scrap07 : and.w #$00ff : jsr MultiplyByY : tax
|
||||
|
||||
lda.b Scrap05 : and.w #$000f : tay
|
||||
lda.w MultDivInfo, y : and.w #$00ff : tay
|
||||
lda.b Scrap02 : jsr DivideByY : sta.b Scrap00
|
||||
lda.b Scrap0C : and.w #$00ff : sta.b Scrap02
|
||||
lda.b Scrap04
|
||||
rts
|
||||
|
||||
MathEnd:
|
||||
beq +
|
||||
lda.w #$0100
|
||||
+ !ADD.b Scrap02 : !ADD.b Scrap00
|
||||
sta.b Scrap04
|
||||
sep #$30
|
||||
rts
|
||||
|
||||
; don't need midpoint of edge Link is leaving (formerly in $06 - used by dir indicator)
|
||||
; don't need width of edge Link is going to (currently in $0b)
|
||||
LoadNorthData:
|
||||
lda.w NorthOpenEdge, x : sta.b Scrap03 : inx ; target room
|
||||
lda.w NorthEdgeInfo, x : sta.b Scrap07 ; needed for maths - (divide by 2 anyway)
|
||||
lda.w NorthOpenEdge, x : sta.b Scrap04 : inx ; bit field
|
||||
lda.w NorthEdgeInfo, x : sta.b Scrap08 ; needed for maths
|
||||
lda.w NorthOpenEdge, x : sta.b Scrap05 ; ratio
|
||||
lda.b Scrap04 : jsr LoadSouthMidpoint : inx ; needed now, and for nrml transition
|
||||
lda.w SouthEdgeInfo, x : sta.b Scrap0B : inx ; probably not needed todo: remove
|
||||
lda.w SouthEdgeInfo, x : sta.b Scrap0C ; needed for maths
|
||||
rts
|
||||
|
||||
LoadSouthMidpoint:
|
||||
and.b #$0f : sta.b Scrap00 : asl : !ADD.b Scrap00 : tax
|
||||
lda.w SouthEdgeInfo, x : sta.b Scrap0A ; needed now, and for nrml transition
|
||||
rts
|
||||
|
||||
LoadSouthData:
|
||||
lda.w SouthOpenEdge, x : sta.b Scrap03 : inx
|
||||
lda.w SouthEdgeInfo, x : sta.b Scrap07
|
||||
lda.w SouthOpenEdge, x : sta.b Scrap04 : inx
|
||||
lda.w SouthEdgeInfo, x : sta.b Scrap08
|
||||
lda.w SouthOpenEdge, x : sta.b Scrap05
|
||||
lda.b Scrap04 : jsr LoadNorthMidpoint : inx
|
||||
lda.w NorthEdgeInfo, x : sta.b Scrap0B : inx
|
||||
lda.w NorthEdgeInfo, x : sta.b Scrap0C
|
||||
rts
|
||||
|
||||
LoadNorthMidpoint:
|
||||
and.b #$0f : sta.b Scrap00 : asl : !ADD.b Scrap00 : tax
|
||||
lda.w NorthEdgeInfo, x : sta.b Scrap0A ; needed now, and for nrml transition
|
||||
rts
|
||||
|
||||
LoadWestData:
|
||||
lda.w WestOpenEdge, x : sta.b Scrap03 : inx
|
||||
lda.w WestEdgeInfo, x : sta.b Scrap07
|
||||
lda.w WestOpenEdge, x : sta.b Scrap04 : inx
|
||||
lda.w WestEdgeInfo, x : sta.b Scrap08
|
||||
lda.w WestOpenEdge, x : sta.b Scrap05
|
||||
lda.b Scrap04 : jsr LoadEastMidpoint : inx
|
||||
lda.w EastEdgeInfo, x : sta.b Scrap0B : inx
|
||||
lda.w EastEdgeInfo, x : sta.b Scrap0C
|
||||
rts
|
||||
|
||||
LoadEastMidpoint:
|
||||
and.b #$0f : sta.b Scrap00 : asl : !ADD.b Scrap00 : tax
|
||||
lda.w EastEdgeInfo, x : sta.b Scrap0A ; needed now, and for nrml transition
|
||||
rts
|
||||
|
||||
LoadEastData:
|
||||
lda.w EastOpenEdge, x : sta.b Scrap03 : inx
|
||||
lda.w EastEdgeInfo, x : sta.b Scrap07
|
||||
lda.w EastOpenEdge, x : sta.b Scrap04 : inx
|
||||
lda.w EastEdgeInfo, x : sta.b Scrap08
|
||||
lda.w EastOpenEdge, x : sta.b Scrap05
|
||||
lda.b Scrap04 : jsr LoadWestMidpoint : inx
|
||||
lda.w WestEdgeInfo, x : sta.b Scrap0B : inx
|
||||
lda.w WestEdgeInfo, x : sta.b Scrap0C
|
||||
|
||||
|
||||
LoadWestMidpoint:
|
||||
and.b #$0f : sta.b Scrap00 : asl : !ADD.b Scrap00 : tax
|
||||
lda.w WestEdgeInfo, x : sta.b Scrap0A ; needed now, and for nrml transition
|
||||
rts
|
||||
|
||||
|
||||
DetectNorthEdge:
|
||||
ldx.b #$ff
|
||||
lda.b PreviousRoom
|
||||
cmp.b #$82 : bne +
|
||||
lda.b LinkPosX : cmp.b #$50 : bcs ++
|
||||
ldx.b #$01 : bra .end
|
||||
++ ldx.b #$00 : bra .end
|
||||
+ cmp.b #$83 : bne +
|
||||
ldx.b #$02 : bra .end
|
||||
+ cmp.b #$84 : bne +
|
||||
lda.b $a9 : beq ++
|
||||
lda.b LinkPosX : cmp.b #$78 : bcs +++
|
||||
ldx.b #$04 : bra .end
|
||||
+++ ldx.b #$05 : bra .end
|
||||
++ lda.b LinkPosX : cmp.b #$78 : bcs ++
|
||||
ldx.b #$03 : bra .end
|
||||
++ ldx.b #$04 : bra .end
|
||||
+ cmp.b #$85 : bne +
|
||||
ldx.b #$06 : bra .end
|
||||
+ cmp.b #$db : bne +
|
||||
lda.b $a9 : beq ++
|
||||
lda.b LinkPosX : beq ++
|
||||
ldx.b #$08 : bra .end
|
||||
++ ldx.b #$07 : bra .end
|
||||
+ cmp.b #$dc : bne .end
|
||||
lda.b $a9 : bne ++
|
||||
lda.b LinkPosX : cmp.b #$b0 : bcs ++
|
||||
ldx.b #$09 : bra .end
|
||||
++ ldx.b #$0a
|
||||
.end txa : rts
|
||||
|
||||
DetectSouthEdge:
|
||||
ldx.b #$ff
|
||||
lda.b PreviousRoom
|
||||
cmp.b #$72 : bne +
|
||||
lda.b LinkPosX : cmp.b #$50 : bcs ++
|
||||
ldx.b #$01 : bra .end
|
||||
++ ldx.b #$00 : bra .end
|
||||
+ cmp.b #$73 : bne +
|
||||
ldx.b #$02 : bra .end
|
||||
+ cmp.b #$74 : bne +
|
||||
lda.b $a9 : beq ++
|
||||
lda.b LinkPosX : cmp.b #$78 : bcs +++
|
||||
ldx.b #$04 : bra .end
|
||||
+++ ldx.b #$05 : bra .end
|
||||
++ lda.b LinkPosX : cmp.b #$78 : bcs ++
|
||||
ldx.b #$03 : bra .end
|
||||
++ ldx.b #$04 : bra .end
|
||||
+ cmp.b #$75 : bne +
|
||||
ldx.b #$06 : bra .end
|
||||
+ cmp.b #$cb : bne +
|
||||
lda.b $a9 : beq ++
|
||||
lda.b LinkPosX : beq ++
|
||||
ldx.b #$08 : bra .end
|
||||
++ ldx.b #$07 : bra .end
|
||||
+ cmp.b #$cc : bne .end
|
||||
lda.b $a9 : bne ++
|
||||
lda.b LinkPosX : cmp.b #$b0 : bcs ++
|
||||
ldx.b #$09 : bra .end
|
||||
++ ldx.b #$0a
|
||||
.end txa : rts
|
||||
|
||||
DetectWestEdge:
|
||||
ldx.b #$ff
|
||||
lda.b PreviousRoom
|
||||
cmp.b #$65 : bne +
|
||||
ldx.b #$00 : bra .end
|
||||
+ cmp.b #$74 : bne +
|
||||
ldx.b #$01 : bra .end
|
||||
+ cmp.b #$75 : bne +
|
||||
ldx.b #$02 : bra .end
|
||||
+ cmp.b #$82 : bne +
|
||||
lda.b LinkQuadrantV : beq ++
|
||||
ldx.b #$03 : bra .end
|
||||
++ ldx.b #$04 : bra .end
|
||||
+ cmp.b #$85 : bne +
|
||||
ldx.b #$05 : bra .end
|
||||
+ cmp.b #$cc : bne +
|
||||
lda.b LinkQuadrantV : beq ++
|
||||
ldx.b #$06 : bra .end
|
||||
++ ldx.b #$07 : bra .end
|
||||
+ cmp.b #$dc : bne .end
|
||||
ldx.b #$08
|
||||
.end txa : rts
|
||||
|
||||
DetectEastEdge:
|
||||
ldx.b #$ff
|
||||
lda.b PreviousRoom
|
||||
cmp.b #$64 : bne +
|
||||
ldx.b #$00 : bra .end
|
||||
+ cmp.b #$73 : bne +
|
||||
ldx.b #$01 : bra .end
|
||||
+ cmp.b #$74 : bne +
|
||||
ldx.b #$02 : bra .end
|
||||
+ cmp.b #$81 : bne +
|
||||
lda.b LinkQuadrantV : beq ++
|
||||
ldx.b #$04 : bra .end
|
||||
++ ldx.b #$03 : bra .end
|
||||
+ cmp.b #$84 : bne +
|
||||
ldx.b #$05 : bra .end
|
||||
+ cmp.b #$cb : bne +
|
||||
lda.b LinkQuadrantV : beq ++
|
||||
ldx.b #$06 : bra .end
|
||||
++ ldx.b #$07 : bra .end
|
||||
+ cmp.b #$db : bne .end
|
||||
ldx.b #$08
|
||||
.end txa : rts
|
||||
|
||||
AlwaysPushThroughFDoors:
|
||||
PHA : AND.b #$F0 : CMP.b #$F0 : BNE +
|
||||
PLA : RTL
|
||||
+ PLA : AND.b #$8E : CMP.b #$80
|
||||
RTL
|
||||
300
doorrando/entrance_fixes.asm
Normal file
300
doorrando/entrance_fixes.asm
Normal file
@@ -0,0 +1,300 @@
|
||||
;===================================================================================================
|
||||
; The only specific concern to keep in mind with this code is that your databank will be $00
|
||||
; Actually, it should be $80, if you're using my fastrom changes.
|
||||
;
|
||||
; Leave all your door data vanilla
|
||||
; Do not try to adjust doors as I previously suggested (not worth the effort)
|
||||
; We need a few hooks and some light hardcoding either way
|
||||
; Might as well just do it in a brute, but reliable, way
|
||||
;
|
||||
; In brief, this is the hack we're making:
|
||||
; 1) Let vanilla routines draw the door normally
|
||||
; 2) Draw over what vanilla just drew
|
||||
; 3) Hijack the door tile type routine
|
||||
; and replace the vanilla value with that of solid collision
|
||||
|
||||
; For door dection free RAM at $19EE-$19FF has been co-opted to door each drawn doors position and type bytes
|
||||
; 19EE is for the "current" door for the IdentifyBlockedEntrance routine
|
||||
; The array at 19F0 is for the collision routine to retrieve that information as it is no longer
|
||||
; available by that point
|
||||
;===================================================================================================
|
||||
pushpc
|
||||
|
||||
org $81B0E6
|
||||
JSL StoreDoorInfo
|
||||
|
||||
org $81892F
|
||||
DoorDrawJankMove:
|
||||
JML PrepDoorDraw
|
||||
|
||||
.return
|
||||
JSL AdjustEscapeDoorGraphics
|
||||
RTS
|
||||
|
||||
; we don't want to overwrite the JMP ($000E) that's already there
|
||||
; Well, we could, but we don't need to
|
||||
warnpc $818939
|
||||
|
||||
org $81BF43
|
||||
JSL AdjustEscapeDoorCollision
|
||||
|
||||
org $81C132 ; ADC.w #$0040 : TAX : LDA.b $00
|
||||
JSL AdjustEscapeDoorCollision_LowEntrance : NOP #2
|
||||
|
||||
pullpc
|
||||
|
||||
;===================================================================================================
|
||||
StoreDoorInfo:
|
||||
STA.w $1980,X
|
||||
LDA.b Scrap00 : STA.w $19F0,X
|
||||
TXA
|
||||
RTL
|
||||
|
||||
PrepDoorDraw:
|
||||
; first off, we need this routine to return to our jank hook
|
||||
; otherwise, finding a reliable place to put the graphics change check will be a pin
|
||||
; so push the address to return to the routine
|
||||
|
||||
; It's a lot to explain why this is necessary
|
||||
; Much easier to just tell you to look at $01890D in the disassembly
|
||||
; and you should understand the vanilla program flow we need to reject
|
||||
PEA.w DoorDrawJankMove_return-1
|
||||
LDA.b Scrap00
|
||||
STA.w $19EE ; for current routine
|
||||
|
||||
; copy vanilla code (but fast rom)
|
||||
LDA.l $8186F0,X
|
||||
STA.b Scrap0E
|
||||
|
||||
LDX.b Scrap02
|
||||
LDA.b Scrap04
|
||||
|
||||
; and to execute the jump, we'll use the JMP ($000E) we carefully avoided overwriting
|
||||
JML $818939
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
; Adjustment stage 1: graphics
|
||||
AdjustEscapeDoorGraphics:
|
||||
JSR IdentifyBlockedEntrance
|
||||
BCS .replace_graphics
|
||||
JSR IdentifySancEntrance
|
||||
BCS .fix_sanctuary_entrance
|
||||
JSR IdentifySwampEntrance
|
||||
BCS .fix_swamp_entrance
|
||||
; Do nothing
|
||||
RTL
|
||||
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
|
||||
.replace_graphics ; for blocked doors
|
||||
; using the value in $19A0 should be fine for finding the graphics
|
||||
; the only caveat is that this appears to locate the tile just above the north-west corner
|
||||
; so below, I've indicated that offset with a +$xxx after the base tilemap buffer
|
||||
; The only odd thing I notice with this position is that some bad hardcoded adjust for
|
||||
; exploding walls that shouldn't affect how we use this value at all!
|
||||
LDY.w $0460 ; get door index
|
||||
|
||||
LDX.w $19A0-2,Y ; get tilemap index
|
||||
|
||||
; hardcoded shutter door graphics tile replacement
|
||||
|
||||
; the horizontal flips could easily be explicit LDAs
|
||||
; but it's probably best the door is symmetrical
|
||||
; using ORA makes your intent more clear
|
||||
; and gives you fewer values to change if you experiment with other graphics
|
||||
|
||||
; row 1
|
||||
LDA.w #$8838
|
||||
STA.l TileMapA+$080,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$086,X
|
||||
|
||||
; row 2
|
||||
LDA.w #$8828
|
||||
STA.l TileMapA+$100,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$106,X
|
||||
|
||||
LDA.w #$8829
|
||||
STA.l TileMapA+$102,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$104,X
|
||||
|
||||
JSR IdentifySwampEntrance
|
||||
BCS .fix_swamp_entrance_alternate
|
||||
|
||||
; the state of the A, X, and Y registers is irrelevant when we exit
|
||||
; they're all subsequently loaded with new values
|
||||
RTL
|
||||
|
||||
.fix_sanctuary_entrance
|
||||
LDY.w $0460 ; get door index
|
||||
LDX.w $19A0-2,Y ; get tilemap index
|
||||
|
||||
; row 0
|
||||
LDA.w #$14C4
|
||||
STA.l TileMapA+$000,X ; sanity check = should calculate to 7e3bbc
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$006,X
|
||||
|
||||
LDA.w #$14C5
|
||||
STA.l TileMapA+$002,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$004,X
|
||||
|
||||
; row 1
|
||||
LDA.w #$14E8
|
||||
STA.l TileMapA+$082,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$084,X
|
||||
|
||||
; row 2
|
||||
LDA.w #$14F8
|
||||
STA.l TileMapA+$102,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$104,X
|
||||
RTL
|
||||
|
||||
.fix_swamp_entrance
|
||||
LDY.w $0460 ; get door index
|
||||
LDX.w $19A0-2,Y ; get tilemap index
|
||||
|
||||
; row 1 - outer section
|
||||
LDA.w #$0908
|
||||
STA.l TileMapA+$080,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$086,X
|
||||
|
||||
; row 2
|
||||
LDA.w #$0918
|
||||
STA.l TileMapA+$100,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$106,X
|
||||
|
||||
LDA.w #$14F8
|
||||
STA.l TileMapA+$102,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$104,X
|
||||
|
||||
.fix_swamp_entrance_alternate
|
||||
; row 0
|
||||
LDA.w #$9DFC
|
||||
STA.l TileMapA+$000,X
|
||||
STA.l TileMapA+$002,X
|
||||
STA.l TileMapA+$004,X
|
||||
STA.l TileMapA+$006,X
|
||||
|
||||
; row 1 - mid section
|
||||
LDA.w #$14E8
|
||||
STA.l TileMapA+$082,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$084,X
|
||||
|
||||
; row 3
|
||||
LDA.w #$A82C
|
||||
STA.l TileMapA+$180,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$186,X
|
||||
|
||||
LDA.w #$A82D
|
||||
STA.l TileMapA+$182,X
|
||||
ORA.w #$4000 ; horizontally flip
|
||||
STA.l TileMapA+$184,X
|
||||
RTL
|
||||
|
||||
IdentifySancEntrance:
|
||||
LDA.b RoomIndex : CMP.w #$0012 : BNE +
|
||||
LDA.b Scrap0A : CMP.w #$0010 : BNE +
|
||||
SEC : RTS
|
||||
+ CLC : RTS
|
||||
|
||||
IdentifySwampEntrance:
|
||||
LDA.b RoomIndex : CMP.w #$0036 : BNE +
|
||||
LDA.b Scrap0A : CMP.w #$0010 : BNE +
|
||||
SEC : RTS
|
||||
+ CLC : RTS
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
; Leaving this here in case you desire a fully custom door later
|
||||
; For now, we'll just hardcode the tiles, as I did above
|
||||
; I put these in column order because that's how they're expected for the vanilla draw routines
|
||||
; but I changed my mind on redefining things
|
||||
; and am too lazy to change it to a row-wise listing
|
||||
BlockedEntrance:
|
||||
dw $8838, $8828, $A888 ; column 0
|
||||
dw $14E8, $8829, $C888 ; column 1
|
||||
dw $14E8, $8829, $A888 ; column 2
|
||||
dw $C838, $C828, $C888 ; column 3
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
; Adjustment stage 2: collision
|
||||
AdjustEscapeDoorCollision:
|
||||
LSR ; vanilla shift
|
||||
|
||||
AdjustEscapeDoorCollisionShared:
|
||||
; save our parameters
|
||||
; but one or both of these may not be necessary depending on how you detect these doors
|
||||
; all that matters is that after identifying blockage, we have:
|
||||
; Y is the same as what we entered with
|
||||
; X has A>>1, for whatever A entered with
|
||||
PHA
|
||||
LDA.w $19F0, Y ; grab door info (type, position)
|
||||
STA.w $19EE ; store in temporary variable
|
||||
JSR IdentifyBlockedEntrance
|
||||
|
||||
PLX ; this is a TAX in vanilla, just have X pull A instead
|
||||
|
||||
BCS .block_entrance
|
||||
|
||||
; vanilla value
|
||||
LDA.b Scrap00
|
||||
|
||||
RTL
|
||||
|
||||
.block_entrance
|
||||
LDA.w #$0101 ; load tile type for solid collision
|
||||
|
||||
RTL
|
||||
|
||||
AdjustEscapeDoorCollision_LowEntrance:
|
||||
ADC.w #$0040 ; vanilla add
|
||||
JMP AdjustEscapeDoorCollisionShared
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
; Enter with:
|
||||
; $19EE containing the door information: position and type bytes
|
||||
; Exit with:
|
||||
; carry clear - leave door alone
|
||||
; carry set - block door
|
||||
IdentifyBlockedEntrance:
|
||||
LDA.l ProgressIndicator : AND.w #$00FF : CMP.w #$0002 : BCS .leave_alone ; only in rain states (0 or 1)
|
||||
LDA.l ProgressFlags : AND.w #$0004 : BNE .leave_alone ; zelda's been rescued
|
||||
LDA.l BlockSanctuaryDoorInRain : BEQ + ;flagged
|
||||
LDA.b RoomIndex : CMP.w #$0012 : BNE +
|
||||
; we're in the sanctuary
|
||||
; this code could be removed because you can't reach sanc without zelda currently
|
||||
; but that's enforced in the logic, so this is to catch that case in case some mode allows it
|
||||
LDA.l FollowerIndicator : AND.w #$00FF : CMP.w #$0001 : BEQ .leave_alone ; zelda is following
|
||||
LDA.b Scrap0A
|
||||
CMP.w #$000A : BCC .leave_alone
|
||||
CMP.w #$0014 : BCS .leave_alone
|
||||
.block_door
|
||||
SEC : RTS
|
||||
+ LDA.l BlockCastleDoorsInRain : AND.w #$00FF : BEQ .leave_alone
|
||||
LDX.w #$FFFE
|
||||
- INX #2
|
||||
LDA.l RemoveRainDoorsRoom, X : CMP.w #$FFFF : BEQ .leave_alone
|
||||
CMP.b RoomIndex : BNE -
|
||||
LDA.l RainDoorMatch, X
|
||||
CMP.w $19EE : BNE .leave_alone
|
||||
BRA .block_door
|
||||
.continue
|
||||
BRA -
|
||||
.leave_alone
|
||||
CLC : RTS
|
||||
|
||||
;===================================================================================================
|
||||
95
doorrando/gfx.asm
Normal file
95
doorrando/gfx.asm
Normal file
@@ -0,0 +1,95 @@
|
||||
GfxFixer:
|
||||
{
|
||||
lda.l DRMode : bne +
|
||||
jsl LoadRoomHook ;this is the code we overwrote
|
||||
jsl Dungeon_InitStarTileCh
|
||||
jsl LoadTransAuxGfx_Alt
|
||||
inc.b SubSubModule
|
||||
rtl
|
||||
+ lda.b $b1 : bne .stage2
|
||||
jsl LoadRoomHook ; this is the rando version - let's only call this guy once - may fix star tiles and slower loads
|
||||
jsl Dungeon_InitStarTileCh
|
||||
jsl LoadTransAuxGfx
|
||||
jsl Dungeon_LoadCustomTileAttr
|
||||
jsl PrepTransAuxGfx
|
||||
lda.l DRMode : cmp.b #$02 : bne + ; only do this in crossed mode
|
||||
ldx.b RoomIndex : lda.l TilesetTable, x
|
||||
cmp.w $0aa1 : beq + ; already eq no need to decomp
|
||||
sta.w $0aa1
|
||||
tax : lda.l AnimatedTileSheets, x : tay
|
||||
jsl DecompDungAnimatedTiles
|
||||
+
|
||||
lda.b #$09 : sta.b NMIINCR : sta.w SkipOAM
|
||||
jsl Palette_SpriteAux3
|
||||
jsl Palette_SpriteAux2
|
||||
jsl Palette_SpriteAux1
|
||||
jsl Palette_DungBgMain
|
||||
jsr CgramAuxToMain
|
||||
inc.b $b1
|
||||
rtl
|
||||
.stage2
|
||||
lda.b #$0a : sta.b NMIINCR : sta.w SkipOAM
|
||||
stz.b $b1 : inc.b SubSubModule
|
||||
rtl
|
||||
}
|
||||
|
||||
FixAnimatedTiles:
|
||||
LDA.l DRMode : CMP.b #$02 : BNE +
|
||||
LDA.w DungeonID : CMP.b #$FF : BEQ +
|
||||
PHX
|
||||
LDX.b RoomIndex : LDA.l TilesetTable, x
|
||||
CMP.w $0AA1 : beq ++
|
||||
TAX : PLA : BRA +
|
||||
++
|
||||
PLX
|
||||
+ LDA.l AnimatedTileSheets, X ; what we wrote over
|
||||
RTL
|
||||
|
||||
FixCloseDungeonMap:
|
||||
LDA.l DRMode : CMP.b #$02 : BNE .vanilla
|
||||
LDA.w DungeonID : BMI .vanilla
|
||||
LSR : TAX
|
||||
LDA.l DungeonTilesets,x
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.l $7EC20E
|
||||
RTL
|
||||
|
||||
FixWallmasterLamp:
|
||||
ORA.w $0458
|
||||
STY.b MAINDESQ : STA.b SUBDESQ : RTL ; what we wrote over
|
||||
|
||||
|
||||
CgramAuxToMain: ; ripped this from bank02 because it ended with rts
|
||||
{
|
||||
rep #$20
|
||||
ldx.b #$00
|
||||
|
||||
.loop
|
||||
lda.l $7EC300, X : sta.l $7EC500, x
|
||||
lda.l $7EC340, x : sta.l $7EC540, x
|
||||
lda.l $7EC380, x : sta.l $7EC580, x
|
||||
lda.l $7EC3C0, x : sta.l $7EC5C0, x
|
||||
lda.l $7EC400, x : sta.l $7EC600, x
|
||||
lda.l $7EC440, x : sta.l $7EC640, x
|
||||
lda.l $7EC480, x : sta.l $7EC680, x
|
||||
lda.l $7EC4C0, x : sta.l $7EC6C0, x
|
||||
|
||||
inx #2 : cpx.b #$40 : bne .loop
|
||||
sep #$20
|
||||
|
||||
; tell NMI to upload new CGRAM data
|
||||
inc.b NMICGRAM
|
||||
rts
|
||||
}
|
||||
|
||||
OverridePaletteHeader:
|
||||
lda.l DRMode : cmp.b #$02 : bne +
|
||||
lda.l DRFlags : and.b #$20 : bne +
|
||||
cpx.w #$01c2 : !BGE +
|
||||
rep #$20
|
||||
txa : lsr : tax
|
||||
lda.l PaletteTable, x
|
||||
iny : rtl
|
||||
+ rep #$20 : iny : lda.b [Scrap0D], Y ; what we wrote over
|
||||
rtl
|
||||
268
doorrando/hudadditions.asm
Normal file
268
doorrando/hudadditions.asm
Normal file
@@ -0,0 +1,268 @@
|
||||
!BlankTile = $207F
|
||||
!SlashTile = $2830
|
||||
!HyphenTile = $2405
|
||||
!PTile = $296C
|
||||
!CTile = $295F
|
||||
!RedSquare = $345E
|
||||
!BlueSquare = $2C5E
|
||||
|
||||
DrHudOverride:
|
||||
PHB
|
||||
SEP #$30
|
||||
LDA.b #$7E
|
||||
PHA
|
||||
PLB
|
||||
|
||||
DRHUD_DrawItemCounter:
|
||||
; hides total for mystery seeds
|
||||
LDA.l ItemCounterHUD : BEQ DRHUD_DrawIndicators
|
||||
LDA.l DRFlags+1 : LSR : BCC DRHUD_DrawIndicators
|
||||
REP #$30
|
||||
LDY.w #!HyphenTile : STY.w HUDGoalIndicator+$0A : STY.w HUDGoalIndicator+$0C
|
||||
STY.w HUDGoalIndicator+$0E : STY.w HUDGoalIndicator+$10
|
||||
SEP #$30
|
||||
|
||||
DRHUD_DrawIndicators:
|
||||
LDA.b IndoorsFlag : BNE .continue
|
||||
JMP DRHUD_Finished
|
||||
.continue
|
||||
LDA.b FrameCounter : AND.b #$10 : BEQ DRHUD_EnemyDropIndicator
|
||||
|
||||
DRHUD_BossIndicator:
|
||||
LDA.l DRMode : BNE .continue
|
||||
.early_exit
|
||||
REP #$10
|
||||
LDY.w #!BlankTile : STY.w HUDMultiIndicator
|
||||
JMP DRHUD_Finished
|
||||
.continue
|
||||
LDA.w DungeonID : CMP.b #$1B : BCS .early_exit
|
||||
|
||||
SEP #$10 ; clears the high byte of X and prevents it from getting B register
|
||||
TAX
|
||||
|
||||
REP #$30
|
||||
LDY.w #!BlankTile
|
||||
LDA.w CompassField : AND.l DungeonMask, x
|
||||
SEP #$20
|
||||
BEQ .draw_indicator
|
||||
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
|
||||
LDY.w #!RedSquare
|
||||
.draw_indicator
|
||||
STY.w HUDMultiIndicator
|
||||
BRA DRHUD_DrawCurrentDungeonIndicator
|
||||
|
||||
DRHUD_EnemyDropIndicator:
|
||||
REP #$30
|
||||
LDA.w EnemyDropIndicator : STA.w HUDMultiIndicator
|
||||
SEP #$20
|
||||
LDA.w DungeonID : CMP.b #$1B : BCS DRHUD_Finished
|
||||
SEP #$10 : TAX : REP #$10
|
||||
|
||||
DRHUD_DrawCurrentDungeonIndicator: ; mX
|
||||
LDA.l DRMode : BIT.b #$02 : BEQ DRHUD_Finished
|
||||
LDY.w #!BlankTile
|
||||
LDA.w CurrentHealth : BEQ .draw_indicator
|
||||
|
||||
REP #$20 : LDA.l DungeonReminderTable,X : TAY
|
||||
SEP #$20
|
||||
.draw_indicator
|
||||
STY.w HUDCurrentDungeonWorld
|
||||
|
||||
DRHUD_DrawKeyCounter:
|
||||
LDA.l DRFlags : AND.b #$04 : BEQ DRHUD_Finished
|
||||
REP #$20
|
||||
LDA.w MapField : AND.l DungeonMask, X : BEQ DRHUD_Finished
|
||||
TXA : LSR : TAX
|
||||
LDA.l GenericKeys : AND.w #$00FF : BNE .total_only
|
||||
LDA.w DungeonCollectedKeys, X : JSR ConvertToDisplay : STA.w HUDKeysObtained
|
||||
LDA.w #!SlashTile : STA.w HUDKeysSlash
|
||||
.total_only
|
||||
LDA.l ChestKeys, x : JSR ConvertToDisplay : STA.w HUDKeysTotal
|
||||
|
||||
DRHUD_Finished:
|
||||
PLB : RTL
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
;column distance for BK/Smalls
|
||||
HudOffsets:
|
||||
; none hc east desert aga swamp pod mire skull ice hera tt tr gt
|
||||
dw $fffe, $0000, $0006, $0008, $0002, $0010, $000e, $0018, $0012, $0016, $000a, $0014, $001a, $001e
|
||||
|
||||
; offset from 1644
|
||||
RowOffsets:
|
||||
dw $0000, $0000, $0040, $0080, $0000, $0080, $0040, $0080, $00c0, $0040, $00c0, $0000, $00c0, $0000
|
||||
|
||||
ColumnOffsets:
|
||||
dw $0000, $0000, $0000, $0000, $000a, $000a, $000a, $0014, $000a, $0014, $0000, $0014, $0014, $001e
|
||||
|
||||
|
||||
DrHudDungeonItemsAdditions:
|
||||
{
|
||||
jsl DrawHUDDungeonItems
|
||||
lda.l HUDDungeonItems : and.b #$ff : bne + : rtl : +
|
||||
lda.l DRMode : cmp.b #$02 : beq + : rtl : +
|
||||
|
||||
phx : phy : php
|
||||
rep #$30
|
||||
|
||||
lda.w #$24f5 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
|
||||
sta.w $1644 : sta.w $164a : sta.w $1652 : sta.w $1662 : sta.w $1684 : sta.w $16c4
|
||||
ldx.w #$0000
|
||||
- sta.w $1704, x : sta.w $170e, x : sta.w $1718, x
|
||||
inx #2 : cpx.w #$0008 : !BLT -
|
||||
|
||||
lda.l HudFlag : and.w #$0020 : beq + : JMP ++ : +
|
||||
lda.l HUDDungeonItems : and.w #$0007 : bne + : JMP ++ : +
|
||||
; bk symbols
|
||||
lda.w #$2811 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
|
||||
; sm symbols
|
||||
lda.w #$2810 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
|
||||
; blank out stuff
|
||||
lda.w #$24f5 : sta.w $1724
|
||||
|
||||
ldx.w #$0002
|
||||
- lda.w #$0000 : !ADD.l RowOffsets,x : !ADD.l ColumnOffsets, x : tay
|
||||
lda.l DungeonReminderTable, x : sta.w $1644, y : iny #2
|
||||
lda.w #$24f5 : sta.w $1644, y
|
||||
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
|
||||
jsr BkStatus : sta.w $1644, y : bra .smallKey ; big key status
|
||||
+ lda.l BigKeyField : and.l DungeonMask, x : beq .smallKey
|
||||
lda.w #$2826 : sta.w $1644, y
|
||||
.smallKey
|
||||
+ iny #2
|
||||
cpx.w #$001a : bne +
|
||||
tya : !ADD.w #$003c : tay
|
||||
+ stx.b Scrap00
|
||||
txa : lsr : tax
|
||||
lda.w #$24f5 : sta.w $1644, y
|
||||
lda.l GenericKeys : and.w #$00FF : bne +
|
||||
lda.l DungeonKeys, x : and.w #$00FF : beq +
|
||||
jsr ConvertToDisplay2 : sta.w $1644, y
|
||||
+ iny #2 : lda.w #$24f5 : sta.w $1644, y
|
||||
phx : ldx.b Scrap00
|
||||
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
|
||||
plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02
|
||||
lda.l GenericKeys : bne +++
|
||||
lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02
|
||||
+++ lda.b Scrap02
|
||||
rep #$30
|
||||
jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals
|
||||
bra .skipStack
|
||||
+ plx
|
||||
.skipStack iny #2
|
||||
cpx.w #$000d : beq +
|
||||
lda.w #$24f5 : sta.w $1644, y
|
||||
+
|
||||
ldx.b Scrap00
|
||||
+ inx #2 : cpx.w #$001b : bcs ++ : JMP -
|
||||
++
|
||||
lda.l HudFlag : and.w #$0020 : bne + : JMP ++ : +
|
||||
lda.l HUDDungeonItems : and.w #$000c : bne + : JMP ++ : +
|
||||
; map symbols (do I want these) ; note compass symbol is 2c20
|
||||
lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
|
||||
; blank out a couple thing from old hud
|
||||
lda.w #$24f5 : sta.w $16e4 : sta.w $1724
|
||||
sta.w $160a : sta.w $1614 : sta.w $161e ; blank out sm key indicators
|
||||
ldx.w #$0002
|
||||
- lda.w #$0000 ; start of hud area
|
||||
!ADD.l RowOffsets, x : !ADD.l ColumnOffsets, x : tay
|
||||
lda.l DungeonReminderTable, x : sta.w $1644, y
|
||||
iny #2
|
||||
lda.w #$24f5 : sta.w $1644, y ; blank out map spot
|
||||
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
|
||||
JSR MapIndicatorShort : STA.w $1644, Y
|
||||
+ iny #2
|
||||
cpx.w #$001a : bne +
|
||||
tya : !ADD.w #$003c : tay
|
||||
+ lda.l CompassField : and.l DungeonMask, x : beq + ; must have compass
|
||||
phx ; total chest counts
|
||||
LDA.l CompassTotalsWRAM, x : !SUB.l DungeonLocationsChecked, x
|
||||
SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30
|
||||
lda.b Scrap06 : jsr ConvertToDisplay2 : sta.w $1644, y : iny #2
|
||||
lda.b Scrap07 : jsr ConvertToDisplay2 : sta.w $1644, y
|
||||
plx
|
||||
bra .skipBlanks
|
||||
+ lda.w #$24f5 : sta.w $1644, y : iny #2 : sta.w $1644, y
|
||||
.skipBlanks iny #2
|
||||
cpx.w #$001a : beq +
|
||||
lda.w #$24f5 : sta.w $1644, y ; blank out spot
|
||||
+ inx #2 : cpx.w #$001b : !BGE ++ : JMP -
|
||||
++
|
||||
plp : ply : plx : rtl
|
||||
}
|
||||
|
||||
MapIndicatorLong:
|
||||
PHX
|
||||
LDA.l OldHudToNewHudTable, X : TAX
|
||||
JSR MapIndicator
|
||||
PLX
|
||||
RTL
|
||||
|
||||
MapIndicatorShort:
|
||||
PHX
|
||||
TXA : LSR : TAX
|
||||
JSR MapIndicator
|
||||
PLX
|
||||
RTS
|
||||
|
||||
OldHudToNewHudTable:
|
||||
dw 1, 2, 3, 10, 4, 6, 5, 8, 11, 9, 7, 12, 13
|
||||
|
||||
IndicatorCharacters:
|
||||
; check 1 2 3 4 5 6 7 G B R
|
||||
dw $2426, $2817, $2818, $2819, $281A, $281B, $281C, $281D, $2590, $258B, $259B
|
||||
|
||||
MapIndicator:
|
||||
LDA.l CrystalPendantFlags_3, X : AND.w #$00FF
|
||||
PHX
|
||||
ASL : TAX : LDA.l IndicatorCharacters, X
|
||||
PLX
|
||||
RTS
|
||||
|
||||
BkStatus:
|
||||
lda.l BigKeyField : and.l DungeonMask, x : bne +++ ; has the bk already
|
||||
lda.l BigKeyStatus, x : bne ++
|
||||
lda.w #$2827 : rts ; 0/O for no BK
|
||||
++ cmp.w #$0002 : bne +
|
||||
lda.w #$2420 : rts ; symbol for BnC
|
||||
+ lda.w #$24f5 : rts ; black otherwise
|
||||
+++ lda.w #$2826 : rts ; check mark
|
||||
|
||||
ConvertToDisplay:
|
||||
and.w #$00ff : cmp.w #$000a : !BLT +
|
||||
!ADD.w #$2553 : rts
|
||||
+ !ADD.w #$2490 : rts
|
||||
|
||||
ConvertToDisplay2:
|
||||
and.w #$00ff : beq ++
|
||||
cmp.w #$000a : !BLT +
|
||||
!ADD.w #$2553 : rts ; 2580 with 258A as "A" for non transparent digits
|
||||
+ !ADD.w #$2816 : rts
|
||||
++ lda.w #$2827 : rts ; 0/O for 0 or placeholder digit ;2483
|
||||
|
||||
CountAbsorbedKeys:
|
||||
JML IncrementSmallKeysNoPrimary
|
||||
|
||||
;================================================================================
|
||||
; 8-bit registers
|
||||
; in: A(b) - Byte to Convert
|
||||
; out: $06 - $07 (high - low)
|
||||
;================================================================================
|
||||
HudHexToDec2DigitCopy: ; modified
|
||||
PHY
|
||||
LDY.b #$00
|
||||
-
|
||||
CMP.b #10 : !BLT +
|
||||
INY
|
||||
SBC.b #10 : BRA -
|
||||
+
|
||||
STY.b Scrap06 : LDY.b #$00 ; Store 10s digit and reset Y
|
||||
CMP.b #1 : !BLT +
|
||||
-
|
||||
INY
|
||||
DEC : BNE -
|
||||
+
|
||||
STY.b Scrap07 ; Store 1s digit
|
||||
PLY
|
||||
RTS
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user