Compare commits
1024 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7cbd9402d0 | |||
| 0396337994 | |||
| 6fbc0829ae | |||
| 4f41cbc9ce | |||
| d1e6d75d70 | |||
| 067f2439ca | |||
| 2d2edbd7be | |||
| f5f457aa6f | |||
| aabbafb749 | |||
| e72e37f713 | |||
| f884893b18 | |||
| c74c0e2250 | |||
| 5f4d2ec891 | |||
| 33b0ab3ed3 | |||
| 2e158a1df8 | |||
| 6a89f18580 | |||
| b3e757dcdc | |||
| 9c675a14ab | |||
| cc99050964 | |||
| f65b1f1c14 | |||
| 1ad2c47444 | |||
| ebef2f2bd1 | |||
| afa23f03c7 | |||
| 9d7b6c6341 | |||
| 4199f7bb23 | |||
| 140d488239 | |||
| 22e9314e18 | |||
| c8a3b3ba31 | |||
| 8b7e4014ae | |||
| 13b94e7ba1 | |||
| ab2a8d5fa9 | |||
| a01d8206e1 | |||
| 61570a2563 | |||
| 822c0e0670 | |||
| c5b5ab3815 | |||
| b28e9a5d54 | |||
| e5e61d189c | |||
| 8b35d07fc9 | |||
| 2f462d391e | |||
| 09d3b90169 | |||
| a329db3036 | |||
| 711fa742be | |||
| d9c549bef5 | |||
| e0d1db0363 | |||
| 1723a4152c | |||
| c212b2987c | |||
| 488a5b201e | |||
| 4770297cd0 | |||
| 3297df580a | |||
| 936b914cbc | |||
| ad51dcf16f | |||
| c8f330e2c8 | |||
| 6467693df9 | |||
| 07716fd301 | |||
| b30cd3bb8e | |||
| a4a8389add | |||
| 7f2fca3a79 | |||
| cfea8a2712 | |||
| 3e59f9a91e | |||
| 69edba036e | |||
| ca1dc6ad7d | |||
| dcd8d3b650 | |||
| 1bc668f72f | |||
| 52d019a321 | |||
| 02c3d35d78 | |||
| 6328453d38 | |||
| 595675df20 | |||
| 4489bca037 | |||
| 333b62b884 | |||
| f06b07a7c4 | |||
| b52a2e4a5b | |||
| 26c3a87a73 | |||
| 73eef4815b | |||
| d85737b1a7 | |||
| ed05bbe2e3 | |||
| f0c492abea | |||
| 2cff04943f | |||
| 1df7b821e8 | |||
| 5fb842761d | |||
| 3cddb99c20 | |||
| e27426dc16 | |||
| 4cf650fb98 | |||
| 3857cda4e5 | |||
| 99ebf96cb0 | |||
| 311af36632 | |||
| cf46a2cfc1 | |||
| 002a504418 | |||
| ff9ff218bb | |||
| 5f838815ab | |||
| c7d606247f | |||
| 546e8a3801 | |||
| f53604f49c | |||
| 84c62b33a4 | |||
| ddc52c06ae | |||
| d02a3d7d64 | |||
| 21a0efa8ac | |||
| 4d7a3395ba | |||
| 78fe4ebf98 | |||
| c596a18b3a | |||
| f3b547f93c | |||
| ef53a3b269 | |||
| 4f364f56d0 | |||
| 4e77ff7ab1 | |||
| 81ad01891a | |||
| 03d303b2bb | |||
| 52bca977c3 | |||
| f9cac45996 | |||
| 04dbcef2cf | |||
| 66e00d5136 | |||
| 11d539042c | |||
| 104e31028b | |||
| fa22c3563d | |||
| 2cd4e5cf27 | |||
| d9744a696e | |||
| 813bd2e0fa | |||
| 2d42d1ce07 | |||
| 9001af38cd | |||
| 67a56a369f | |||
| f4da9c8cb2 | |||
| 963788af33 | |||
| d0e0e59762 | |||
| caf41c99de | |||
| 9185dc0b62 | |||
| 83990c6d5f | |||
| f53ca31b22 | |||
| 44ea82771b | |||
| 984d8f0f31 | |||
| 7570c3ce34 | |||
| d24a535cd6 | |||
| f2d36d589b | |||
| 2b31656661 | |||
| 6e8eecda8b | |||
| 9ed01ede2d | |||
| 5ed2503491 | |||
| 2a34d64f00 | |||
| fe4bd3d495 | |||
| 7ad5cbd28b | |||
| 775369345c | |||
| 17fe80cf85 | |||
| a3428d33ae | |||
| 4a1561ec55 | |||
| 405399682f | |||
| 01e6c5a8fb | |||
| 048b8ba09c | |||
| b451c82943 | |||
| 9d7c71fb26 | |||
| 07c5a8a4b6 | |||
| 15f923a639 | |||
| 4c55551e12 | |||
| 81d5b23d80 | |||
| fa7c76b75b | |||
| 1a7f219158 | |||
| 4b3bde01e4 | |||
| a7fdfbf732 | |||
| c0994b49e5 | |||
| 03fc351a35 | |||
| 24722f0a27 | |||
| b7293e7cb0 | |||
| b5104a7bda | |||
| 78b7bfac70 | |||
| 65a1b97093 | |||
| 2e6e1adcf3 | |||
| 7da0da66f1 | |||
| 4038221d8c | |||
| 5c807fa655 | |||
| aa9e1e7305 | |||
| 721b01a294 | |||
| aa08e3c183 | |||
| 63fb78cc9e | |||
| a39adc593b | |||
| afc6c44bc6 | |||
| 6f26cf87b1 | |||
| 6e9d86a6ca | |||
| e2caf81e4b | |||
| 823fb17f60 | |||
| a30e7438ff | |||
| 269d2178fb | |||
| 6564db437a | |||
| 732f1d5eb6 | |||
| 9033fb6a5d | |||
| b028532db3 | |||
| 80dda2e1f9 | |||
| 4d3595640a | |||
| 0704590238 | |||
| 7c48dc1ff5 | |||
| 68003b2e2f | |||
| f6fbba5638 | |||
| 4bfe7218f7 | |||
| 5dbb6c3a27 | |||
| 0be056adce | |||
| d51f7a0fe7 | |||
| a7b5ea5562 | |||
| d833727074 | |||
| 149e746e3a | |||
| 1c5b0e4667 | |||
| 8508607c87 | |||
| 0862b01770 | |||
| 72ac20e574 | |||
| 69f7bb3db9 | |||
| dc7368e4af | |||
| 79c7e5dcb4 | |||
| 56ac0a5057 | |||
| 183e7dbf8a | |||
| e3097c5578 | |||
| aebc9293ad | |||
| 4b3dcbb6f4 | |||
| 3424d6481b | |||
| 760cec9d1e | |||
| 0196c866f6 | |||
| 13ee74945b | |||
| c6266ff624 | |||
| 9a15433fbf | |||
| db2bd9d08f | |||
| f5ed347734 | |||
| 483f6dd3fc | |||
| 0e5837f79a | |||
| ab1a2373b9 | |||
| aa2b94b7f5 | |||
| 55a8207932 | |||
| 484feed314 | |||
| 04a42dc627 | |||
| 4e9003b061 | |||
| a59a2d7cd3 | |||
| 8cb7b465da | |||
| 0279b20bb7 | |||
| a140cdbedb | |||
| e7db8f2404 | |||
| 70dfeeba91 | |||
| a860d29636 | |||
| a7811429a8 | |||
| 75be38c38b | |||
| 75de6f259d | |||
| e6a6e862db | |||
| 2d1544edf4 | |||
| 0522b539c4 | |||
| ac20d0c7d4 | |||
| 263622cef8 | |||
| 461bd3d488 | |||
| 7baf5ce327 | |||
| 67c43e803b | |||
| fb9bd077a8 | |||
| 6e808b8340 | |||
| 996509531c | |||
| 4e7d6800cd | |||
| 0c9d4bf338 | |||
| 48641d46a0 | |||
| 84159821e9 | |||
| 823199be2e | |||
| 9eb5601349 | |||
| a7604353c3 | |||
| cfd264e4dc | |||
| e7d0739c8b | |||
| e5afc1d937 | |||
| a9a15600b2 | |||
| 086b2d411a | |||
| c61a13f62e | |||
| 0f25af1ab7 | |||
| 21f1c40408 | |||
| f8e479b4f9 | |||
| 775842dfc5 | |||
| a7d436a894 | |||
| 47bc37e806 | |||
| 080a9ebac4 | |||
| cac9589b81 | |||
| 34bd2cd6a7 | |||
| 8cc8d804bc | |||
| 59124678bf | |||
| b9fd52c6c1 | |||
| 458f5b2d0f | |||
| 7139df0265 | |||
| c6490cb3fb | |||
| b7d37eb169 | |||
| 1d26d1a529 | |||
| 5294a53e1b | |||
| 40d8227504 | |||
| a734bcf483 | |||
| 23e37b8eb7 | |||
| 627c0d949c | |||
| 096f9e46f4 | |||
| 7910556ace | |||
| 2bfcc32b6b | |||
| 0af0f8bc53 | |||
| 46c212f4a1 | |||
| 1e61415c9e | |||
| aa4a773095 | |||
| c8b8bf43f7 | |||
| e50848b52e | |||
| 9e8f7a1cc5 | |||
| 39f3a4afa7 | |||
| 4831f3649a | |||
| a9a524d04a | |||
| b773813f10 | |||
| 00bfae3b62 | |||
| 4dcb49bb34 | |||
| fd25eaadfd | |||
| 2d5b70c734 | |||
| 1ee3caf640 | |||
| e6e11794b8 | |||
| 79eabe5ed2 | |||
| b13e67d491 | |||
| 16a8f91822 | |||
| 82f036f66f | |||
| 3d2b5ebb79 | |||
| 302de15c75 | |||
| 18ce96c84b | |||
| e017279423 | |||
| dbc252a5d6 | |||
| cb0a9dad32 | |||
| 1f6f01a37f | |||
| eaa982aae9 | |||
| 07308b192c | |||
| 27105a3222 | |||
| d915b5e688 | |||
| 089980a6ab | |||
| 49992be60a | |||
| 7414b6ce8e | |||
| 591f3c7b36 | |||
| de2df5f6cf | |||
| 4a40dfd361 | |||
| b760bf5066 | |||
| 8e85167cb6 | |||
| af27ea080f | |||
| 65de5d0060 | |||
| a9b816c548 | |||
| 075c576116 | |||
| f9986f5ac5 | |||
| a9a28aa71b | |||
| c6bbd5daa3 | |||
| c89c3c27ad | |||
| 3205afbcdb | |||
| 61003b509a | |||
| ce3f25be7b | |||
| a8fd1bdada | |||
| 4426476a15 | |||
| 7d775a38d1 | |||
| a7d3720050 | |||
| 596ea40bc0 | |||
| f8f194e19b | |||
| 170111422b | |||
| 81969fc91b | |||
| f0366a3550 | |||
| d676e9bb38 | |||
| 188aac48eb | |||
| 24be0d8195 | |||
| fbc5cd5967 | |||
| d11329b2c9 | |||
| 3a74dbf04e | |||
| 299e187380 | |||
| 0f29b1801d | |||
| f8162d442a | |||
| cd09bfa7e8 | |||
| 1bfbf09891 | |||
| 5523388ad4 | |||
| a3cc0bd13f | |||
| 70ada6669d | |||
| 4d76229527 | |||
| 5ea3d0ad4b | |||
| 90efde7aa9 | |||
| 55f1869125 | |||
| b4efd90fdc | |||
| 87dd554592 | |||
| 58974ae1be | |||
| 21c8bab91c | |||
| c58b37be23 | |||
| d3d98c44b8 | |||
| dc2e73d198 | |||
| 774f9649da | |||
| 093287af75 | |||
| 0126189cbd | |||
| c250a2dbc4 | |||
| 2ff9df19c8 | |||
| 528593651b | |||
| 9f073d07cd | |||
| 4bd6ef12a9 | |||
| 52644695a3 | |||
| 45e619718c | |||
| 43fd979763 | |||
| 082bc49a4d | |||
| 4adcaa7bee | |||
| 630ae0beb4 | |||
| 246dfd9fe0 | |||
| 6f056cb1bd | |||
| 9322c023da | |||
| fd4719f8ec | |||
| 3a22a5c489 | |||
| 862b3d27da | |||
| 998664d2fb | |||
| 0bf2d950ac | |||
| 3ae5e875a1 | |||
| a88795d8b9 | |||
| 9ca1b79409 | |||
| ce8277b96a | |||
| 25731eb71f | |||
| e55963b82b | |||
| b9d9b38351 | |||
| 782babf3ae | |||
| 9869fa03c2 | |||
| 0ae02b0191 | |||
| c0ea976fdc | |||
| c4bf9e7d5b | |||
| 2e5d95d612 | |||
| 75b2827da9 | |||
| 5b72e59ebe | |||
| d2c16b5363 | |||
| 977ed05526 | |||
| e2c34dfb70 | |||
| 4416579210 | |||
| 5f591ac189 | |||
| aa9d2beffe | |||
| 24656d587b | |||
| fbaf7d722d | |||
| bda5c40cc2 | |||
| eeac5ccf4d | |||
| bbff30071e | |||
| a7a512682c | |||
| f3f933aaca | |||
| 5433663866 | |||
| 598120c661 | |||
| d4f885fad1 | |||
| 8ab1eabda7 | |||
| d23775f069 | |||
| de45f49b78 | |||
| 2608d5d601 | |||
| 92df4ff1e2 | |||
| 27ecab2993 | |||
| 3dc106b42e | |||
| 768e8bbfe2 | |||
| 324f681c46 | |||
| d178d062a8 | |||
| 3ac421cf55 | |||
| 0e9bd019af | |||
| 5ce4eb8cfc | |||
| 64082fa872 | |||
| 063f67d3f6 | |||
| 5df98fb691 | |||
| a686d81d4c | |||
| bc9fc25799 | |||
| 07d8e1df7b | |||
| 7427fbd252 | |||
| 679f58937f | |||
| af5770058b | |||
| d2cb7a4cb8 | |||
| 62c778d877 | |||
| 9dd6339fe8 | |||
| 7b6b8151a7 | |||
| e77ee397cd | |||
| 8775367043 | |||
| ba752eb7dc | |||
| 8421ab16d5 | |||
| 340a36878b | |||
| 836704e987 | |||
| d0ff9bd048 | |||
| 001c2c905f | |||
| 443a0a3037 | |||
| d294dbcc55 | |||
| 0c63d6a07f | |||
| 3f6157c03f | |||
| c8eab046c0 | |||
| d8230eb37a | |||
| f71980382a | |||
| 0a8678fda7 | |||
| adb5d51510 | |||
| 45679a7f98 | |||
| f6f5ca47e9 | |||
| a4ade28755 | |||
| c957ea6c10 | |||
| 6bfb84d999 | |||
| 49fbacf0fa | |||
| 79efce5252 | |||
| cb9a0ed1c4 | |||
| fc5788364b | |||
| df2b64a601 | |||
| 2ff75fe132 | |||
| 625e8e0624 | |||
| de8ed72233 | |||
| ce2607253c | |||
| b6fb9051b6 | |||
| f069622b94 | |||
| 0b7e532b32 | |||
| f4e6a40097 | |||
| 2ed97974e0 | |||
| 251a9ecd0a | |||
| 777ffc1108 | |||
| 3951a46386 | |||
| bfbf1ba87e | |||
| dc7c3eb58c | |||
| a0126bd6b5 | |||
| c86ecbe9ef | |||
| 99a606be18 | |||
| 7ebae9ed9d | |||
| e803ca54c6 | |||
| d619bff349 | |||
| c7cb81e0fc | |||
| f7c847bcf0 | |||
| b81d119906 | |||
| 5535d749b9 | |||
| 992d204a83 | |||
| b478c035bb | |||
| 0f81d98c6e | |||
| edc659a241 | |||
| ef08805f93 | |||
| 70413668d8 | |||
| 27bbb2c7e4 | |||
| 43ad1597a4 | |||
| ce0badde87 | |||
| 9d46d1042b | |||
| 2e7c792b97 | |||
| c411cec06c | |||
| 451c8d5e09 | |||
| a35753fdf1 | |||
| ca6605877a | |||
| 59db3c82f9 | |||
| e42cfb649f | |||
| cf88455975 | |||
| b272f2326e | |||
| a29494b120 | |||
| 4d172fff64 | |||
| 57ea246dd7 | |||
| 636309952e | |||
| dfeeed2b1a | |||
| f83822bba0 | |||
| 60f67fa791 | |||
| 9b6a6e4412 | |||
| 83b8c199b9 | |||
| 3f1939e674 | |||
| 31616954cc | |||
| ee21885f13 | |||
| 2cc6a85d4b | |||
| 29320f0858 | |||
| 29f200b83e | |||
| 09bf81f77f | |||
| ddbb922b95 | |||
| c7dd98ccc0 | |||
| f5c2c930d8 | |||
| 79fee4cec4 | |||
| 0bec4d0f49 | |||
| a4fc133d75 | |||
| 45c9dc9a23 | |||
| 594ffbe7e6 | |||
| 7decab75c2 | |||
| 9815126ced | |||
| 4b5eba3727 | |||
| 49010b02f1 | |||
| d08aaef0f8 | |||
| 245df782b9 | |||
| 9ffe429a1f | |||
| 673c767a42 | |||
| de42135532 | |||
| 79bf6b3fa9 | |||
| 741456d1da | |||
| c95b158e4e | |||
| d40c260d18 | |||
| 454e0e558b | |||
| 5ea49425c7 | |||
| 08ea9403e9 | |||
| f01882db39 | |||
| 1870273f89 | |||
| d6edf1b24d | |||
| 8ecbe6798d | |||
| 587ad1933d | |||
| 70548aef04 | |||
| 43663cbe79 | |||
| 5f2e7e543b | |||
| c98d1081a3 | |||
| 0b2272bfa7 | |||
| 04982d919c | |||
| 34751f99e9 | |||
| 40d5c6ee64 | |||
| be0b70f903 | |||
| 76aeacfdfd | |||
| dec979fb52 | |||
| 1c85d46436 | |||
| f05dc6d9f9 | |||
| e141642dd6 | |||
| af4d3a3325 | |||
| 91131f8b36 | |||
| b2ea059fd8 | |||
| 150acda1ea | |||
| 3e1449bb80 | |||
| 4c104443bc | |||
| de8a210d0f | |||
| 9d2b36b787 | |||
| 03b78c3825 | |||
| 3c8674dcc7 | |||
| 95919b8b01 | |||
| 1712b13106 | |||
| 50a32429be | |||
| 6f0124f7ec | |||
| acbebaeb70 | |||
| d44b0b3d62 | |||
| 4a3b0118a8 | |||
| 7c7df39e6d | |||
| dba49be1e3 | |||
| 33483bbfbf | |||
| 9630b06284 | |||
| e6acea8247 | |||
| 2cd4c733ef | |||
| 05e5705537 | |||
| 24e48b1abd | |||
| 6d73cae91b | |||
| dd9bc51457 | |||
| dce0f91678 | |||
| eb5701ece9 | |||
| 6f99b3b1c8 | |||
| da9765f1aa | |||
| b7897cddf2 | |||
| ce2300b116 | |||
| cb05dce764 | |||
| a762c0f8f8 | |||
| cd008ab0ba | |||
| 53b36d7074 | |||
| 5a1880bd65 | |||
| 8e280a1464 | |||
| 0bcdd9997e | |||
| d5351c4580 | |||
| 76bc2385ca | |||
| 325f7c6efc | |||
| 93d97d3e5b | |||
| 66b64603a0 | |||
| 7405eaea0b | |||
| 477e433361 | |||
| 7ca2012bc4 | |||
| dace165ef2 | |||
| f6df2b5b45 | |||
| 1a310df17e | |||
| 31edec701b | |||
| dc36d2ae8d | |||
| 4e733b0dc6 | |||
| 6eadaaca66 | |||
| d778340999 | |||
| e2d76f77be | |||
| 0b80af3f41 | |||
| f65acda803 | |||
| 53f485b8f2 | |||
| 69f40f9157 | |||
| 84bb946e05 | |||
| eb132f38d2 | |||
| 0f1fbb1069 | |||
| c9f7ca2259 | |||
| 8594e5af3c | |||
| 6b5e657630 | |||
| a7845e4b0e | |||
| c0624334c4 | |||
| 34bac4c5b5 | |||
| b81385efdb | |||
| 2aae90e65a | |||
| 64f2cb8f9e | |||
| 2820b8866c | |||
| a39881fa89 | |||
| 9d4116f035 | |||
| 287296cf48 | |||
| b491a57f57 | |||
| 19e7f1c677 | |||
| 8a7e19757a | |||
| 70c57e7727 | |||
| 4a8415308e | |||
| 0e3df10fc0 | |||
| 33b95015a2 | |||
| 2ecef68a72 | |||
| 0db0a55e6b | |||
| 0aedfcc17f | |||
| 581f95051d | |||
| 31005ec39d | |||
| b0b3bb6140 | |||
| 7e4bc52d99 | |||
| b9f1a1d964 | |||
| a48f79eafa | |||
| 907c4fda3c | |||
| 3189b71d46 | |||
| 6ae08e9b05 | |||
| 7cd5aa1c2d | |||
| 6d6a8621bb | |||
| db254a977b | |||
| 454bcf107b | |||
| 52688982ea | |||
| 2432d8b32b | |||
| 7f71b87b9b | |||
| 4faad54872 | |||
| e2da4322e2 | |||
| f44706570a | |||
| b452b11854 | |||
| f2b5f0950f | |||
| f43563edb3 | |||
| bec6d741d4 | |||
| d93e6405c3 | |||
| a2e3f4882d | |||
| ef101894d1 | |||
| 6eb896f83d | |||
| c7812bf764 | |||
| 11f49af6f9 | |||
| af1c51b2b5 | |||
| f7c63d82f9 | |||
| a00c25ee17 | |||
| 913f7d04f7 | |||
| b37224a453 | |||
| 8375c61236 | |||
| 424f191bc6 | |||
| 90152b4138 | |||
| c8041558f5 | |||
| 1f10d03923 | |||
| bb560c1153 | |||
| 72794ad50e | |||
| af1c0a548d | |||
| 2f5d547c19 | |||
| 32f056c6eb | |||
| ac62cc455c | |||
| 79f85f46dc | |||
| e2e5875c8d | |||
| 3868a9fc50 | |||
| 28cb1c52b5 | |||
| 70325793d9 | |||
| a2d1eb4532 | |||
| b17ccd264a | |||
| eaa02b2b78 | |||
| c3b3cf5140 | |||
| 3be7b5f56b | |||
| 14bf23c496 | |||
| 5b79785c96 | |||
| f92fe61aa7 | |||
| b7c9fb3864 | |||
| 294d180e68 | |||
| 7dc5a02a83 | |||
| 82004b05dc | |||
| a4f69f6ca3 | |||
| 66571d751f | |||
| 680a1a797c | |||
| 543bbb45dc | |||
| 38504b3133 | |||
| f0d15be552 | |||
| 0383dc90b8 | |||
| 4e4ba5650d | |||
| 29baaf2d95 | |||
| 67e64d6836 | |||
| af8c27dcef | |||
| 163ec73c04 | |||
| b74ad9d639 | |||
| 42c72b92ac | |||
| b46be572a6 | |||
| 5d2d4cf2ad | |||
| 2ba4224a83 | |||
| 9687a0e522 | |||
| cd77fae4e3 | |||
| f2f1007cee | |||
| db2c2a4774 | |||
| f16b8ef983 | |||
| bd13950ba6 | |||
| cda86e586d | |||
| 255878bf60 | |||
| 1d42faac3e | |||
| 350a89f3da | |||
| 5bfda213c7 | |||
| d3d63dd36c | |||
| 4dd7b75232 | |||
| 26abf2f306 | |||
| 9ff7d6fff3 | |||
| 8c514a0688 | |||
| 08ba5d821b | |||
| 35e2a9d6f4 | |||
| 46e509aa69 | |||
| 198db59816 | |||
| 46667bce46 | |||
| 639c1c3e95 | |||
| 07ebafa8c6 | |||
| f548fc04e2 | |||
| c55b19dbc0 | |||
| c78c91d408 | |||
| e07f65eec5 | |||
| cfbbdc7216 | |||
| cb34b350b0 | |||
| 23f3bfabaa | |||
| b66069c10b | |||
| 093ba1fd38 | |||
| a312191ced | |||
| 841c722178 | |||
| 1ed2112bff | |||
| d015406fa6 | |||
| eea9eaf672 | |||
| c79e5017ad | |||
| c3d56f630e | |||
| b1f419e337 | |||
| 068ef68dd6 | |||
| 51d74b092a | |||
| 884a5ce75a | |||
| d0c3e1b7d8 | |||
| 0fe28c021a | |||
| e6e599d760 | |||
| 753c8da4bb | |||
| 8165f240dc | |||
| f98fae470b | |||
| fcc274ce3e | |||
| 47533e1a5f | |||
| 20f5a92d81 | |||
| dcea0e4520 | |||
| 729d9af4b0 | |||
| 01afe12487 | |||
| c57dc64950 | |||
| 07996444a1 | |||
| ba53f67097 | |||
| 7fad72ef9c | |||
| 964f646654 | |||
| 7a23b37c0c | |||
| bfd5c246de | |||
| b89f18ce4e | |||
| 97cf9c5093 | |||
| c6e930b994 | |||
| 611193610b | |||
| 4c735d055e | |||
| adb79e8a41 | |||
| 0f4e4fa48e | |||
| 5bf868e2aa | |||
| f6f5c358eb | |||
| 50f3ebca5e | |||
| ef89699d59 | |||
| b6817e278a | |||
| 4830f5a41e | |||
| 340fbb8ca5 | |||
| 7aa05f39e2 | |||
| 5e2cc6f07f | |||
| 34f05e5162 | |||
| d75891e78b | |||
| 9bf1114535 | |||
| 9084910235 | |||
| 33407f88d7 | |||
| 82854604b8 | |||
| 6ac2ceca45 | |||
| 082f88d242 | |||
| 0fff4ebd4e | |||
| 36a370078c | |||
| 1788aebd00 | |||
| 0de3d2737f | |||
| fc6b0992e9 | |||
| 111d45220e | |||
| fed1044813 | |||
| 3b9c887dbe | |||
| 80a57f9d3e | |||
| db3cecdd2b | |||
| e13b5950ca | |||
| fe1d5a874a | |||
| ea76a537fd | |||
| be0569d2cb | |||
| c5e8d2c77c | |||
| 408bc1befc | |||
| 86e98fbfe5 | |||
| c85b3c144e | |||
| 9311483932 | |||
| c15e154846 | |||
| 02e8f8ea8b | |||
| 31ddde6e80 | |||
| 4a23d86f56 | |||
| 1453cd4c9c | |||
| be8130b621 | |||
| 9e8f7a6c6b | |||
| d052163a9e | |||
| f188ea1554 | |||
| a9894e2d05 | |||
| 0a60a24783 | |||
| d8f8dfc53f | |||
| cc8dd77d51 | |||
| d5d85bf5d9 | |||
| 2dff814e8f | |||
| ad86acd8ef | |||
| 68be13dd62 | |||
| 9e0dfc7749 | |||
| 3747025a11 | |||
| e5d4ae1f80 | |||
| 07ea97a6ea | |||
| 9a5d8f9d1a | |||
| ad2312efee | |||
| dfe1944d2b | |||
| 695404165b | |||
| d3bc2dad4f | |||
| 194e408863 | |||
| b2350a537d | |||
| ba4681e35d | |||
| 3b9684d8ac | |||
| d32c5f1d61 | |||
| cf2c8f0699 | |||
| c8681bcf05 | |||
| fe256cff2a | |||
| 1df03c45f7 | |||
| 458e2ef0cd | |||
| dd4284ab63 | |||
| 251cc80233 | |||
| c6baed2d23 | |||
| 90e2889204 | |||
| ea4f6da48e | |||
| b69cf96aa9 | |||
| cbf4540602 | |||
| 058d1ede54 | |||
| d3c2a0bad0 | |||
| 83f5487e7b | |||
| d3d89f0168 | |||
| b7257a793f | |||
| e50d7a4e65 | |||
| 4be431471c | |||
| 649a7c9871 | |||
| 7fc3cca11b | |||
| c9d7fe1c2a | |||
| 612b5d28ba | |||
| 70207896e3 | |||
| 08437844e4 | |||
| e13b220be9 | |||
| fccc0f7346 | |||
| 1449bf090b | |||
| c9902e386f | |||
| fb7d70c943 | |||
| e066c383a0 | |||
| 0e9f66f72e | |||
| ec99dad874 | |||
| b85fd4fced | |||
| 2050173666 | |||
| df29a60a6e | |||
| 78e407a70f | |||
| 04e2f94e2b | |||
| 4124f2714a | |||
| e21365db78 | |||
| dae7946526 | |||
| 6a37a2de3d | |||
| 4f650bebf0 | |||
| eb5827e059 | |||
| 6917f40d3e | |||
| efe2515a44 | |||
| c6ce39623e | |||
| 962ee6874e | |||
| 2fda85c750 | |||
| f1e00ccf0e | |||
| 09b7885013 | |||
| e126015b5f | |||
| 4ff4c86047 | |||
| cd4a8050d7 | |||
| c09bd56e19 | |||
| 6945a55584 | |||
| 32c79a7b6a | |||
| 57f47f147a | |||
| 6a65940720 | |||
| 40dcbb77ad | |||
| f479f586cb | |||
| a24d0ad703 | |||
| ac39db2f36 | |||
| 9b4da7e3b3 | |||
| 1f1f4bd815 | |||
| 00258d4607 | |||
| 3aaaf0353e | |||
| f54d7b0476 | |||
| 111260cdf3 | |||
| 91c8cba0d2 | |||
| 0f8dcd3713 | |||
| e89802f288 | |||
| c1ac34c1f7 | |||
| c74a931986 | |||
| 686bae25f3 | |||
| ff5d0af7ad | |||
| 8518349cce | |||
| 818204a93f | |||
| eea12d8d75 | |||
| 43ee4a9c5a | |||
| 7ee7af0b0f | |||
| d15f1cc1a3 | |||
| 4f2432cbac | |||
| 60f6b609da | |||
| 1058998550 | |||
| c00b554b56 | |||
| 0bd3bb7b77 | |||
| b6cfb5b2a2 | |||
| c1bcd45ea1 | |||
| 5ba652aa38 | |||
| 1ba50e96ca | |||
| 7b7c9d371f | |||
| 09ac8921fe | |||
| 29a4347f2b | |||
| 68cf06c6d0 | |||
| 5307051e04 | |||
| 045ff9b169 | |||
| c1122e1f90 | |||
| d478e9b0be | |||
| 2aa699b5b0 | |||
| c96cfad4d2 | |||
| bf26e437ff | |||
| 9efdf88101 | |||
| 4273ae84f4 | |||
| b49408a88b | |||
| 764fbf8841 | |||
| f74b416c19 | |||
| 8104fd0853 | |||
| 910555f299 | |||
| 2dd7601dbd | |||
| d7e390e494 | |||
| c8b001411e | |||
| a5265874a2 | |||
| 81eaa893b9 | |||
| a0e84b5d5c | |||
| e8891adf8e | |||
| 1a2d5c1772 | |||
| 65b9048ab6 | |||
| ccd1b56cae | |||
| 5382e12b8d | |||
| 2cdebd5f20 | |||
| 61e5460bc1 | |||
| c100d76a5b | |||
| d59b59cd51 | |||
| c7059874d3 | |||
| dfc451e86a | |||
| d1022e9b53 | |||
| 7c9309f6c5 | |||
| 441457a873 | |||
| 9255037f50 | |||
| 4c95adcdb3 | |||
| 2ef6acaa0e | |||
| a8061efc0d | |||
| 206552ed63 | |||
| 9e48259414 | |||
| ad32c0a986 | |||
| 84ed80365c | |||
| 87440437fb | |||
| 2aca408a9e | |||
| 3991d7b534 | |||
| 3823fc94f1 | |||
| 190e89181e | |||
| 20ca2529ac | |||
| 143da7e5a5 | |||
| 37b95f35c2 | |||
| aed2c61706 | |||
| 0955d1e5fd | |||
| e51924bf49 |
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report incorrect behavior or unexpected errors
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
Write a clear and concise description of what the bug is, and what you expected to happen instead.
|
||||
|
||||
**To reproduce**
|
||||
Fill in steps to reproduce the behavior, such as:
|
||||
1. Connect to server
|
||||
2. Create a game
|
||||
3. Start quest X
|
||||
4. Talk to NPC Y
|
||||
|
||||
**Game version(s) (choose one or more of the following):**
|
||||
DC NTE, DC prototype, DC v1, DC v2, PC, GC Ep1&2, GC Ep3, Xbox, BB
|
||||
|
||||
**Server log output**
|
||||
On macOS/Linux, or in a Cygwin shell on Windows, you can run the server as `./newserv 2>&1 | tee server-log.txt` to generate a log file. Do that, then do whatever you need to do to get the bug to happen, then upload the log file here.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
Write a clear and concise description of what the problem is. For example, "I'm always frustrated when [...]"
|
||||
|
||||
**Describe the solution you'd like**
|
||||
Write a clear and concise description of what you want to happen.
|
||||
|
||||
**Game version(s) (choose one or more of the following):**
|
||||
DC NTE, DC prototype, DC v1, DC v2, PC, GC Ep1&2, GC Ep3, Xbox, BB
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -16,41 +16,48 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
with_resource_file: ["true", "false"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install libraries (Linux)
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
run: sudo apt-get install -y libevent-dev
|
||||
run: sudo apt-get install -y cmake libasio-dev
|
||||
|
||||
- name: Install libraries (macOS)
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: brew install libevent
|
||||
run: |
|
||||
brew install cmake asio libiconv
|
||||
|
||||
cat << EOF > nproc
|
||||
#!/bin/sh
|
||||
sysctl -n hw.logicalcpu
|
||||
EOF
|
||||
chmod a+x nproc
|
||||
sudo cp nproc /usr/local/bin/nproc
|
||||
rm -f nproc
|
||||
|
||||
- name: Install phosg
|
||||
run: |
|
||||
git clone https://github.com/fuzziqersoftware/phosg.git
|
||||
cd phosg
|
||||
cmake .
|
||||
make
|
||||
make -j $(nproc)
|
||||
sudo make install
|
||||
|
||||
- name: Install resource_file
|
||||
if: ${{ matrix.with_resource_file == 'true' }}
|
||||
run: |
|
||||
git clone https://github.com/fuzziqersoftware/resource_dasm.git
|
||||
cd resource_dasm
|
||||
cmake .
|
||||
make
|
||||
make -j $(nproc)
|
||||
sudo make install
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j $(nproc)
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
# After build passes with tests
|
||||
workflow_run:
|
||||
workflows: [CMake]
|
||||
types: [completed]
|
||||
branches:
|
||||
- master
|
||||
|
||||
push:
|
||||
tags:
|
||||
- 'v**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=sha
|
||||
type=ref,event=tag
|
||||
type=semver,pattern={{version}}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -2,6 +2,7 @@
|
||||
.DS_Store
|
||||
|
||||
# Build products
|
||||
src/Revision.cc
|
||||
newserv
|
||||
|
||||
# CMake files
|
||||
@@ -26,6 +27,7 @@ system/players/*.psocard
|
||||
system/players/*.nsc
|
||||
system/players/*.nsa
|
||||
system/teams/*.json
|
||||
system/teams/*.bmp
|
||||
system/patch-pc/.metadata-cache.json
|
||||
system/patch-bb/.metadata-cache.json
|
||||
|
||||
|
||||
+54
-40
@@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0110 NEW)
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +7,7 @@ cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(newserv)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
if (MSVC)
|
||||
add_compile_options(/W4 /WX)
|
||||
@@ -14,37 +15,47 @@ else()
|
||||
add_compile_options(-Wall -Wextra -Werror -Wno-address-of-packed-member)
|
||||
endif()
|
||||
|
||||
set(LOCAL_INCLUDE_DIR "/usr/local/include")
|
||||
set(LOCAL_LIB_DIR "/usr/local/lib")
|
||||
list(APPEND CMAKE_PREFIX_PATH ${LOCAL_LIB_DIR})
|
||||
include_directories(${LOCAL_INCLUDE_DIR})
|
||||
link_directories(${LOCAL_LIB_DIR})
|
||||
|
||||
|
||||
|
||||
# Library search
|
||||
|
||||
find_path (LIBEVENT_INCLUDE_DIR NAMES event.h)
|
||||
find_library (LIBEVENT_LIBRARY NAMES event)
|
||||
find_library (LIBEVENT_CORE NAMES event_core)
|
||||
set (LIBEVENT_INCLUDE_DIRS ${LIBEVENT_INCLUDE_DIR})
|
||||
set (LIBEVENT_LIBRARIES
|
||||
${LIBEVENT_LIBRARY}
|
||||
${LIBEVENT_CORE})
|
||||
|
||||
find_path(ASIO_INCLUDE_DIR NAMES asio.hpp HINTS "${WINDOWS_ENV}/include" REQUIRED)
|
||||
if(WIN32)
|
||||
find_path(Iconv_INCLUDE_DIRS NAMES iconv.h HINTS "${WINDOWS_ENV}/include" REQUIRED)
|
||||
find_library(Iconv_LIBRARIES NAMES iconv HINTS "${WINDOWS_ENV}/lib" REQUIRED)
|
||||
else()
|
||||
find_package(Iconv REQUIRED)
|
||||
endif()
|
||||
find_package(phosg REQUIRED)
|
||||
find_package(Iconv REQUIRED)
|
||||
find_package(resource_file QUIET)
|
||||
find_package(resource_file REQUIRED)
|
||||
|
||||
|
||||
|
||||
# Git metadata
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/src/Revision.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/__Revision__.cc
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/src/Revision-generate.sh ${CMAKE_CURRENT_SOURCE_DIR}/src/Revision.cc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
add_custom_target(
|
||||
newserv-Revision-cc
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/Revision.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/__Revision__.cc
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Executable definition
|
||||
|
||||
set(SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Revision.cc
|
||||
src/Account.cc
|
||||
src/AddressTranslator.cc
|
||||
src/AFSArchive.cc
|
||||
src/AsyncHTTPServer.cc
|
||||
src/AsyncUtils.cc
|
||||
src/BattleParamsIndex.cc
|
||||
src/BMLArchive.cc
|
||||
src/CatSession.cc
|
||||
src/Channel.cc
|
||||
src/ChatCommands.cc
|
||||
src/ChoiceSearch.cc
|
||||
@@ -53,6 +64,7 @@ set(SOURCES
|
||||
src/Compression.cc
|
||||
src/DCSerialNumbers.cc
|
||||
src/DNSServer.cc
|
||||
src/DownloadSession.cc
|
||||
src/EnemyType.cc
|
||||
src/Episode3/AssistServer.cc
|
||||
src/Episode3/BattleRecord.cc
|
||||
@@ -68,17 +80,21 @@ set(SOURCES
|
||||
src/Episode3/Tournament.cc
|
||||
src/FileContentsCache.cc
|
||||
src/FunctionCompiler.cc
|
||||
src/GameServer.cc
|
||||
src/GSLArchive.cc
|
||||
src/GVMEncoder.cc
|
||||
src/HTTPServer.cc
|
||||
src/ImageEncoder.cc
|
||||
src/IntegralExpression.cc
|
||||
src/IPFrameInfo.cc
|
||||
src/IPStackSimulator.cc
|
||||
src/IPV4RangeSet.cc
|
||||
src/ItemCreator.cc
|
||||
src/ItemData.cc
|
||||
src/ItemNameIndex.cc
|
||||
src/ItemParameterTable.cc
|
||||
src/Items.cc
|
||||
src/ItemTranslationTable.cc
|
||||
src/LevelTable.cc
|
||||
src/License.cc
|
||||
src/Lobby.cc
|
||||
src/Loggers.cc
|
||||
src/Main.cc
|
||||
@@ -88,13 +104,13 @@ set(SOURCES
|
||||
src/PatchFileIndex.cc
|
||||
src/PlayerFilesManager.cc
|
||||
src/PlayerSubordinates.cc
|
||||
src/PPKArchive.cc
|
||||
src/ProxyCommands.cc
|
||||
src/ProxyServer.cc
|
||||
src/ProxySession.cc
|
||||
src/PSOEncryption.cc
|
||||
src/PSOGCObjectGraph.cc
|
||||
src/PSOProtocol.cc
|
||||
src/Quest.cc
|
||||
src/QuestAvailabilityExpression.cc
|
||||
src/QuestScript.cc
|
||||
src/RareItemSet.cc
|
||||
src/ReceiveCommands.cc
|
||||
@@ -102,34 +118,29 @@ set(SOURCES
|
||||
src/ReplaySession.cc
|
||||
src/SaveFileFormats.cc
|
||||
src/SendCommands.cc
|
||||
src/Server.cc
|
||||
src/ServerShell.cc
|
||||
src/ServerState.cc
|
||||
src/Shell.cc
|
||||
src/ShellCommands.cc
|
||||
src/SignalWatcher.cc
|
||||
src/StaticGameData.cc
|
||||
src/TeamIndex.cc
|
||||
src/Text.cc
|
||||
src/TextArchive.cc
|
||||
src/UnicodeTextSet.cc
|
||||
src/TextIndex.cc
|
||||
src/Version.cc
|
||||
src/WordSelectTable.cc
|
||||
)
|
||||
|
||||
if(resource_file_FOUND)
|
||||
set(SOURCES ${SOURCES} src/ARCodeTranslator.cc)
|
||||
endif()
|
||||
|
||||
add_executable(newserv ${SOURCES})
|
||||
target_include_directories(newserv PUBLIC ${LIBEVENT_INCLUDE_DIR} ${Iconv_INCLUDE_DIRS})
|
||||
target_link_libraries(newserv phosg ${LIBEVENT_LIBRARIES} ${Iconv_LIBRARIES} pthread)
|
||||
|
||||
if(resource_file_FOUND)
|
||||
target_compile_definitions(newserv PUBLIC HAVE_RESOURCE_FILE)
|
||||
target_link_libraries(newserv resource_file)
|
||||
message(STATUS "libresource_file found; enabling patch support")
|
||||
else()
|
||||
message(WARNING "libresource_file not found; disabling patch support")
|
||||
target_include_directories(newserv PUBLIC ${ASIO_INCLUDE_DIR} ${Iconv_INCLUDE_DIRS})
|
||||
target_link_libraries(newserv phosg::phosg ${Iconv_LIBRARIES} pthread resource_file::resource_file)
|
||||
if (WIN32)
|
||||
target_compile_definitions(newserv PUBLIC -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00)
|
||||
target_link_libraries(newserv ws2_32 mswsock bcrypt iphlpapi -static -static-libgcc -static-libstdc++)
|
||||
endif()
|
||||
add_dependencies(newserv newserv-Revision-cc)
|
||||
|
||||
# target_compile_options(newserv PRIVATE -fsanitize=address)
|
||||
# target_link_options(newserv PRIVATE -fsanitize=address)
|
||||
|
||||
|
||||
|
||||
@@ -138,6 +149,7 @@ endif()
|
||||
enable_testing()
|
||||
|
||||
file(GLOB LogTestCases ${CMAKE_SOURCE_DIR}/tests/*.test.txt)
|
||||
file(GLOB LogRDTestCases ${CMAKE_SOURCE_DIR}/tests/*.rdtest.txt)
|
||||
|
||||
foreach(LogTestCase IN ITEMS ${LogTestCases})
|
||||
add_test(
|
||||
@@ -155,6 +167,8 @@ foreach(ScriptTestCase IN ITEMS ${ScriptTestCases})
|
||||
COMMAND ${ScriptTestCase} ${CMAKE_BINARY_DIR}/newserv)
|
||||
endforeach()
|
||||
|
||||
|
||||
|
||||
# Installation configuration
|
||||
|
||||
install(TARGETS newserv DESTINATION bin)
|
||||
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG BASE_IMAGE=ubuntu:24.04
|
||||
FROM ${BASE_IMAGE} AS builder
|
||||
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
python3 \
|
||||
git \
|
||||
ca-certificates \
|
||||
sudo \
|
||||
make \
|
||||
cmake \
|
||||
g++ \
|
||||
libasio-dev \
|
||||
zlib1g-dev
|
||||
|
||||
# ---
|
||||
|
||||
FROM builder AS deps
|
||||
|
||||
ARG PHOSG_TARGET=master
|
||||
ARG RESOURCE_DASM_TARGET=master
|
||||
ARG BUILD_RESOURCE_DASM=true
|
||||
|
||||
RUN git clone --depth 1 -b ${PHOSG_TARGET} https://github.com/fuzziqersoftware/phosg.git && \
|
||||
cd phosg && \
|
||||
cmake . && \
|
||||
make -j$(nproc) && \
|
||||
sudo make install
|
||||
|
||||
RUN \
|
||||
if [ "$BUILD_RESOURCE_DASM" = "true" ] ; then \
|
||||
git clone --depth 1 -b ${RESOURCE_DASM_TARGET} https://github.com/fuzziqersoftware/resource_dasm.git && \
|
||||
cd resource_dasm && \
|
||||
cmake . && \
|
||||
make -j$(nproc) && \
|
||||
sudo make install \
|
||||
; fi
|
||||
|
||||
# ---
|
||||
|
||||
FROM builder AS newserv
|
||||
|
||||
ARG BUILD_TYPE=Release
|
||||
ARG BUILD_STRIP=true
|
||||
|
||||
WORKDIR /usr/src/newserv
|
||||
COPY . .
|
||||
COPY --from=deps /usr/local /usr/local
|
||||
|
||||
RUN cmake -B $PWD/build -DCMAKE_BUILD_TYPE=${BUILD_TYPE} && \
|
||||
cmake --build $PWD/build --config ${BUILD_TYPE} -j $(nproc) && \
|
||||
sudo make -C build install
|
||||
|
||||
RUN \
|
||||
if [ "$BUILD_STRIP" = "true" ] ; then \
|
||||
strip /usr/local/lib/*.a && \
|
||||
strip /usr/local/bin/* \
|
||||
; fi
|
||||
|
||||
# ---
|
||||
|
||||
FROM ${BASE_IMAGE} AS data
|
||||
|
||||
WORKDIR /newserv
|
||||
COPY system/ ./system
|
||||
RUN cp -f system/config.example.json system/config.json && \
|
||||
sed -i 's/"ExternalAddress": "[^"]*"/"ExternalAddress": "0.0.0.0"/' system/config.json
|
||||
|
||||
# ---
|
||||
|
||||
FROM ${BASE_IMAGE} AS final
|
||||
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
libasio-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||
|
||||
WORKDIR /newserv
|
||||
COPY --from=data /newserv .
|
||||
COPY --from=newserv /usr/local /usr/local
|
||||
|
||||
USER root
|
||||
VOLUME /newserv/system
|
||||
|
||||
# does not allow receiving any signal at the moment, so force kill the app
|
||||
STOPSIGNAL SIGKILL
|
||||
CMD ["newserv"]
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023 Martin Michelsen
|
||||
Copyright (c) 2024 Martin Michelsen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
@@ -18,4 +18,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@@ -1,29 +1,37 @@
|
||||
## General
|
||||
|
||||
- Encapsulate BB server-side random state and make replays deterministic
|
||||
- Write a simple status API
|
||||
- Implement per-game logging
|
||||
- Make reloading happen on separate threads so compression doesn't block active clients
|
||||
- Implement decrypt/encrypt actions for VMS files
|
||||
- Make a server patch version of story flag fixer quest
|
||||
- Fix enemy flag mapping in v2/v3 crossplay and test
|
||||
- Handle items in crossplay - use the replacement table
|
||||
- Make proxy server handle all login commands on non-BB, including sending 9C when needed
|
||||
- Add $switchit command (activates switch flag(s) for nearest object, e.g. laser fence, door, fog collision)
|
||||
- Add a way to persist flags across connections, at least on v3, because of Meet User + B2 enable quest interactions - maybe update the quest to patch one of the login commands so the server can tell it's enabled
|
||||
- Handle MeetUserExtensions properly in 41 and C4 commands on the proxy (rewrite the embedded 19 command and put some metadata in the persistent config, perhaps)
|
||||
- Clean up ItemParameterTable implementation (see comment at the top of the class definition)
|
||||
- Make UI strings localizable (e.g. entries in menus, welcome message, etc.)
|
||||
- Figure out what causes the corruption message on PC proxy sessions and fix it
|
||||
- Add an idle connection timeout for proxy sessions
|
||||
- Look into JP heart symbol bug on Linux
|
||||
|
||||
## PSO DC
|
||||
|
||||
- Investigate if https://crates.io/crates/blaze-ssl-async can be used to implement the HL check server
|
||||
- v2 challenge data in $savechar/$loadchar doesn't work properly
|
||||
|
||||
## Episode 3
|
||||
|
||||
- Enforce tournament deck restrictions (e.g. rank checks, No Assist option) when populating COMs at tournament start time
|
||||
- Add support for recording battles on the proxy server (both in primary and spectator teams)
|
||||
- Make `reload licenses` not vulnerable to online players' licenses overwriting licenses on disk somehow
|
||||
- Make `reload accounts` not vulnerable to online players' accounts overwriting accounts on disk somehow
|
||||
- Implement ranks (based on total Meseta earned)
|
||||
- Make an AR code that gets rid of the SAMPLE overlays on NTE
|
||||
|
||||
## PSO XBOX
|
||||
|
||||
- Fix receiving Guild Cards from non-Xbox players
|
||||
- Research the F94D quest opcode
|
||||
- Finish porting the remaining GC patches
|
||||
|
||||
## PSOBB
|
||||
|
||||
- Test all quest item subcommands
|
||||
- Check if Commander Blade effect works and implement it if not
|
||||
- Figure out why Pouilly Slime EXP doesn't work
|
||||
- Make server-specified rare enemies work with maps loaded by the proxy
|
||||
- Implement serialization for various table types (ItemPMT, ItemPT, etc.)
|
||||
- Record some BB tests
|
||||
- Add all necessary Guild Card number rewrites in BB commands on the proxy
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
struct AITalkBin {
|
||||
be_uint32_t num_scs;
|
||||
be_uint32_t sc_offsets[num_scs];
|
||||
|
||||
struct SCDialogueEntry {
|
||||
be_uint32_t num_entries;
|
||||
be_uint32_t unknown_a1;
|
||||
be_uint32_t size; // in bytes
|
||||
struct WhenEntry {
|
||||
be_uint32_t when;
|
||||
be_uint32_t percent_chance; // 0-100
|
||||
be_uint32_t count;
|
||||
be_uint32_t string_ids[count];
|
||||
} __attribute__((packed));
|
||||
} __attribute__((packed));
|
||||
} __attribute__((packed));
|
||||
+686
-228
@@ -1,266 +1,724 @@
|
||||
(Ep1&2 USA) Unlock all songs in BGM test
|
||||
(Note: sadly, there are no secret/unused ones)
|
||||
04368960 38600001
|
||||
04368964 4E800020
|
||||
This file contains client patches I've made for various versions of PSO.
|
||||
|
||||
(Ep1&2 USA v1.01) Play lobby (and event) music on Pioneer 2 also
|
||||
0417E0F0 60000000
|
||||
Places to find more codes/patches:
|
||||
- GC-Forever: https://www.gc-forever.com/forums/viewtopic.php?t=2050 (3OE0, 3OE2)
|
||||
- GC-Forever: https://www.gc-forever.com/forums/viewtopic.php?t=2049 (3OP0)
|
||||
- BB Patch Project: https://github.com/Solybum/Blue-Burst-Patch-Project (59NL)
|
||||
|
||||
(Ep3 USA) Play lobby (and event) music in Morgue also
|
||||
040B7028 60000000
|
||||
Version codes (from README.md):
|
||||
1OJ1: PSO DC Network Trial Edition
|
||||
1OJ2: PSO DC 11/2000 prototype
|
||||
1OJ3: PSO DC 12/2000 prototype
|
||||
1OJ4: PSO DC 01/2001 prototype
|
||||
1OJF: PSO DC v1 JP
|
||||
1OEF: PSO DC v1 US
|
||||
1OPF: PSO DC v1 EU
|
||||
2OJ5: PSO DC 08/2001 prototype
|
||||
2OJF: PSO DC v2 JP
|
||||
2OEF: PSO DC v2 US
|
||||
2OPF: PSO DC v2 EU
|
||||
2OJW: PSO PC (v2)
|
||||
3OJT: PSO GC Trial Edition
|
||||
3OJ2: PSO GC v1.2 JP
|
||||
3OJ3: PSO GC v1.3 JP
|
||||
3OJ4: PSO GC v1.4 (Plus) JP
|
||||
3OJ5: PSO GC v1.5 (Plus) JP
|
||||
3OE0: PSO GC v1.0 US
|
||||
3OE1: PSO GC v1.1 US
|
||||
3OE2: PSO GC v1.2 (Plus) US
|
||||
3OP0: PSO GC v1.0 EU
|
||||
3SJT: PSO GC Ep3 Trial Edition
|
||||
3SJ0: PSO GC Ep3 JP
|
||||
3SE0: PSO GC Ep3 US
|
||||
3SP0: PSO GC Ep3 EU
|
||||
4OJB: PSO Xbox Beta
|
||||
4OJD: PSO Xbox JP Disc
|
||||
4OJU: PSO Xbox JP TU
|
||||
4OED: PSO Xbox US Disc
|
||||
4OEU: PSO Xbox US TU
|
||||
4OPD: PSO Xbox EU Disc
|
||||
4OPU: PSO Xbox EU TU
|
||||
59NJ: PSO BB JP 1.25.11
|
||||
59NL: PSO BB JP 1.25.13 (including the Tethealla client)
|
||||
|
||||
(Ep3 USA) Skip white logo screens during startup
|
||||
0409D774 38000007
|
||||
(Episodes 1&2 USA v1.01) Skip white logo screens during startup
|
||||
0413F190 38000007
|
||||
The menu code
|
||||
This code makes all disabled items in menus selectable, which allows you to e.g. use items you can't normally use
|
||||
3OJ2 => 04263B80 48000028
|
||||
042AC548 48000020
|
||||
3OJ3 => 04264758 48000028
|
||||
042AD3F0 48000020
|
||||
3OJ4 => 042657B4 48000028
|
||||
042AE51C 48000020
|
||||
3OJ5 => 04265554 48000028
|
||||
042AE2D0 48000020
|
||||
3OE0 => 04264458 48000028
|
||||
042ACF04 48000020
|
||||
3OE1 => 04264458 48000028
|
||||
042ACF48 48000020
|
||||
3OE2 => 04265818 48000028
|
||||
042AE484 48000020
|
||||
3OP0 => 04265060 48000028
|
||||
042ADC18 48000020
|
||||
3SJT => 0417ADD0 48000028
|
||||
3SJ0 => 0416B5A4 48000028
|
||||
3SE0 => 0416B458 48000028
|
||||
3SP0 => 0416B904 48000028
|
||||
|
||||
(Ep3 USA) Skip agreement prompts before online game
|
||||
041B50C8 38000003
|
||||
(Episodes 1&2 USA v1.01) Skip agreement prompt before online game
|
||||
04327D80 38000003
|
||||
Disable serial number validation (untested)
|
||||
2OEF => 8C1E743E 01E0
|
||||
8C2670B6 01E0
|
||||
|
||||
(Ep3 USA) Disable rate limit for pressing A during loading screens
|
||||
042F9B30 38000000
|
||||
Disable item equip restrictions ("God of equip")
|
||||
3OE1 => 0410521C 38000005
|
||||
59NL => 005C9F31 E9A7000000
|
||||
|
||||
(Ep3 USA) Auto-press A as fast as possible during loading screens
|
||||
042F9AC0 60000000
|
||||
All rareable enemies are rare
|
||||
3OE1 => 040AC944 60000000 // Hildeblue
|
||||
040C1B70 60000000 // Rappies
|
||||
040C3FC8 60000000 // Nar Lily
|
||||
040EB050 48000010 // Pouilly Slime
|
||||
|
||||
(Ep3 USA) Replace loading screen A button sounds with random sounds
|
||||
042F9B18 4804BB19
|
||||
042F9B1C 5463063E
|
||||
042F9B20 60631400
|
||||
042F9B24 64630005
|
||||
042F9B28 38800000
|
||||
Unlock all songs in BGM test
|
||||
Note: sadly, there are no secret/unused ones
|
||||
3OJ2 => 04367A68 38600001
|
||||
04367A6C 4E800020
|
||||
3OJ3 => 04368ED8 38600001
|
||||
04368EDC 4E800020
|
||||
3OJ4 => 0436A434 38600001
|
||||
0436A438 4E800020
|
||||
3OJ5 => 0436A1E8 38600001
|
||||
0436A1EC 4E800020
|
||||
3OE0 => 0436891C 38600001
|
||||
04368920 4E800020
|
||||
3OE1 => 04368960 38600001
|
||||
04368964 4E800020
|
||||
3OE2 => 0436A5B4 38600001
|
||||
0436A5B8 4E800020
|
||||
3OP0 => 043699A8 38600001
|
||||
043699AC 4E800020
|
||||
3SJT => 041EA948 38600001
|
||||
041EA94C 4E800020
|
||||
3SJ0 => 041D8CF0 38600001
|
||||
041D8CF4 4E800020
|
||||
3SE0 => 041D8D7C 38600001
|
||||
041D8D80 4E800020
|
||||
3SP0 => 041D93F0 38600001
|
||||
041D93F4 4E800020
|
||||
|
||||
(Ep3 USA) Change color of loading screens
|
||||
(Replace AA, RR, GG, BB appropriately)
|
||||
042FA704 3CC0AARR
|
||||
042FA708 60C6GGBB
|
||||
Play lobby (and event) music in Morgue also
|
||||
3OJ2 => 0417DD34 60000000
|
||||
3OJ3 => 0417E0E8 60000000
|
||||
3OJ4 => 0417E24C 60000000
|
||||
3OJ5 => 0417E1AC 60000000
|
||||
3OE0 => 0417E0F0 60000000
|
||||
3OE1 => 0417E0F0 60000000
|
||||
3OE2 => 0417E210 60000000
|
||||
3OP0 => 0417E6D4 60000000
|
||||
3SJT => 040B8C7C 60000000
|
||||
3SE0 => 040B7028 60000000
|
||||
3SJ0 => 040B7044 60000000
|
||||
3SP0 => 040B746C 60000000
|
||||
|
||||
(Ep3 USA) Use 16:9 aspect ratio
|
||||
04383DC8 4BC87F99
|
||||
0400BD60 C042DED0
|
||||
0400BD64 EC5D00B2
|
||||
0400BD68 4E800020
|
||||
Skip white logo screens during startup
|
||||
3OJ2 => 0413EE54 38000007
|
||||
3OJ3 => 0413F1DC 38000007
|
||||
3OJ4 => 0413F338 38000007
|
||||
3OJ5 => 0413F298 38000007
|
||||
3OE0 => 0413F190 38000007
|
||||
3OE1 => 0413F190 38000007
|
||||
3OE2 => 0413F2A8 38000007
|
||||
3OP0 => 0413F524 38000007
|
||||
3SJT => 0409E10C 38000007
|
||||
3SJ0 => 0409D810 38000007
|
||||
3SE0 => 0409D774 38000007
|
||||
3SP0 => 0409D9A4 38000007
|
||||
|
||||
(Ep3 USA) Disable darkening effect during battle details mode
|
||||
042F951C 4E800020
|
||||
Skip agreement prompts before online game
|
||||
3OJ2 => 0432737C 38000003
|
||||
3OJ3 => 043283CC 38000003
|
||||
3OJ4 => 043298E8 38000003
|
||||
3OJ5 => 04329690 38000003
|
||||
3OE0 => 04327D3C 38000003
|
||||
3OE1 => 04327D80 38000003
|
||||
3OE2 => 0432984C 38000003
|
||||
3OP0 => 04328C58 38000003
|
||||
3SJT => 041C67D0 38000003
|
||||
3SJ0 => 041B5234 38000003
|
||||
3SE0 => 041B50C8 38000003
|
||||
3SP0 => 041B574C 38000003
|
||||
|
||||
(Ep3 USA) Unlock all COM decks
|
||||
042CA908 38600001
|
||||
Disable rate limit for pressing A during loading screens
|
||||
3SJT => 042E1030 38000000
|
||||
3SJ0 => 042F8BE4 38000000
|
||||
3SE0 => 042F9B30 38000000
|
||||
3SP0 => 042FA734 38000000
|
||||
|
||||
(Ep3 USA) Enable all lobby counter options in non-CARD lobbies
|
||||
04096A8C 480000C0
|
||||
04096B4C 38800007
|
||||
04096BFC 4BFFFF2C
|
||||
Auto-press A as fast as possible during loading screens
|
||||
3SP0 => 042FA6C4 60000000
|
||||
3SE0 => 042F9AC0 60000000
|
||||
3SJT => 040C2C48 60000000
|
||||
3SJ0 => 042F8B74 60000000
|
||||
|
||||
(Ep3 USA) Change HUD color mask
|
||||
0438CA8C 3C00RRGG
|
||||
0438CA90 6000BBAA
|
||||
Change type of all loading screens
|
||||
Values for X: 0 = lobby/game join, 1 = quest load, 3 = pipe up, 4 = pipe down, anything else = silent black screen
|
||||
3OE1 => 0401CA04 3BE0000X
|
||||
0401CA08 48000038
|
||||
|
||||
(Ep3 USA) Disable lobby event music (but keep the visuals)
|
||||
040B705C 38000000
|
||||
Replace loading screen A button sounds with random sounds
|
||||
3SJT => 042E1018 480309A9
|
||||
042E101C 5463063E
|
||||
042E1020 60631400
|
||||
042E1024 64630005
|
||||
042E1028 38800000
|
||||
3SE0 => 042F9B18 4804BB19
|
||||
042F9B1C 5463063E
|
||||
042F9B20 60631400
|
||||
042F9B24 64630005
|
||||
042F9B28 38800000
|
||||
|
||||
(Ep3 USA) Enable Pinz's Shop Super Card Capsule Machine as a fourth option
|
||||
043101C0 38800004
|
||||
04310238 2C1D0004
|
||||
04487E8C 000000C8
|
||||
Change color of loading screens
|
||||
Replace AA, RR, GG, BB appropriately
|
||||
3SE0 => 042FA704 3CC0AARR
|
||||
042FA708 60C6GGBB
|
||||
|
||||
(Ep3 USA) Change color of pulsing orange text (e.g. card ability names)
|
||||
0457EE18 RRRRRRRR // Phase 1 (long) red component as 32-bit float (0.0-255.0)
|
||||
0457EE20 GGGGGGGG // Phase 1 (long) green component as 32-bit float (0.0-255.0)
|
||||
0457EE10 BBBBBBBB // Phase 1 (long) blue component as 32-bit float (0.0-255.0)
|
||||
0457EE1C RRRRRRRR // Phase 2 (short) red component as 32-bit float (0.0-255.0)
|
||||
0457EE24 GGGGGGGG // Phase 2 (short) green component as 32-bit float (0.0-255.0)
|
||||
0457EE14 BBBBBBBB // Phase 2 (short) blue component as 32-bit float (0.0-255.0)
|
||||
Use 16:9 aspect ratio
|
||||
3SE0 => 04383DC8 4BC87F99
|
||||
0400BD60 C042DED0
|
||||
0400BD64 EC5D00B2
|
||||
0400BD68 4E800020
|
||||
|
||||
(Ep3 USA) Change color of pulsing orange text to be random every frame
|
||||
04155D78 7CA802A6
|
||||
04155D7C 7C661B78
|
||||
04155D80 481EF8B1
|
||||
04155D84 7C671B78
|
||||
04155D88 481EF8A9
|
||||
04155D8C 50677822
|
||||
04155D90 64E7FF00
|
||||
04155D94 90E60024
|
||||
04155D98 7CA803A6
|
||||
04155D9C 4E800020
|
||||
Disable darkening effect during battle details mode
|
||||
3SJT => 042E09D8 4E800020
|
||||
3SJ0 => 042F85D0 4E800020
|
||||
3SE0 => 042F951C 4E800020
|
||||
3SP0 => 042FA120 4E800020
|
||||
|
||||
(Ep3 USA) Enable color and symbol codes in info board text
|
||||
(Use codes like e.g. $CG to change text colors, as described in CommandFormats.hh)
|
||||
040F2E80 4BF0D41D
|
||||
040F0274 4BF10025
|
||||
040EFC58 4BF10641
|
||||
04000298 38810008
|
||||
0400029C 38C3FFFF
|
||||
040002A0 8CA60001
|
||||
040002A4 28050024
|
||||
040002A8 4082000C
|
||||
040002AC 38000009
|
||||
040002B0 98060000
|
||||
040002B4 28050000
|
||||
040002B8 4082FFE8
|
||||
040002BC 7C633050
|
||||
040002C0 4E800020
|
||||
Unlock all COM decks
|
||||
3SJ0 => 042C9B34 38600001
|
||||
3SP0 => 042CB414 38600001
|
||||
3SE0 => 042CA908 38600001
|
||||
|
||||
(Ep3 USA) Unlock all offline free battle maps
|
||||
042CAA00 38600001
|
||||
(This unlocks ALL maps, including a bunch of maps with garbage names that crash if you try to play them)
|
||||
Enable all lobby counter options in non-CARD lobbies
|
||||
3SE0 => 04096A8C 480000C0
|
||||
04096B4C 38800007
|
||||
04096BFC 4BFFFF2C
|
||||
|
||||
(Ep3 USA) Talk to auction counter offline to get all cards
|
||||
042F5D18 4BD160E8
|
||||
0400BE00 9421FFE0
|
||||
0400BE04 7C0802A6
|
||||
0400BE08 90010024
|
||||
0400BE0C 93E10010
|
||||
0400BE10 93C10014
|
||||
0400BE14 93A10018
|
||||
0400BE18 9381001C
|
||||
0400BE1C 3C60802A
|
||||
0400BE20 60631BAC
|
||||
0400BE24 7C6903A6
|
||||
0400BE28 38600000
|
||||
0400BE2C 4E800421
|
||||
0400BE30 7C7F1B78
|
||||
0400BE34 3C60802A
|
||||
0400BE38 606315BC
|
||||
0400BE3C 7C6903A6
|
||||
0400BE40 7FE3FB78
|
||||
0400BE44 4E800421
|
||||
0400BE48 3F80802A
|
||||
0400BE4C 639C17AC
|
||||
0400BE50 3BC00001
|
||||
0400BE54 3BA00063
|
||||
0400BE58 7FE3FB78
|
||||
0400BE5C 7FC4F378
|
||||
0400BE60 7F8903A6
|
||||
0400BE64 4E800421
|
||||
0400BE68 3BBDFFFF
|
||||
0400BE6C 281D0000
|
||||
0400BE70 4082FFE8
|
||||
0400BE74 3BDE0001
|
||||
0400BE78 281E02F0
|
||||
0400BE7C 4081FFD8
|
||||
0400BE80 3C60802A
|
||||
0400BE84 6063160C
|
||||
0400BE88 7C6903A6
|
||||
0400BE8C 7FE3FB78
|
||||
0400BE90 4E800421
|
||||
0400BE94 83E10010
|
||||
0400BE98 83C10014
|
||||
0400BE9C 83A10018
|
||||
0400BEA0 8381001C
|
||||
0400BEA4 80010024
|
||||
0400BEA8 38210020
|
||||
0400BEAC 7C0803A6
|
||||
0400BEB0 482E9FC0
|
||||
Enable Change Marker option in all lobbies
|
||||
3OJ2 => 04138208 4800004C
|
||||
3OJ3 => 04138510 4800004C
|
||||
3OJ4 => 041390B4 4800004C
|
||||
3OJ5 => 041385B8 4800004C
|
||||
3OE0 => 041384C4 4800004C
|
||||
3OE1 => 041384C4 4800004C
|
||||
3OE2 => 041385C8 4800004C
|
||||
3OP0 => 04138848 4800004C
|
||||
|
||||
(Episodes 1&2 USA v1.01) Press L for enemy debug; enable various other debug messages
|
||||
040FD9D8 38600001 # Various enemy debug messages
|
||||
00153E53 00000001 # Poison fog debug 1
|
||||
00153E4B 00000001 # Poison fog debug 2
|
||||
040FDA18 60000000 # TObjRoomId
|
||||
025CB6AA 00000000
|
||||
4A588EA0 00000040
|
||||
025CB6AA 00000001
|
||||
Change HUD color mask
|
||||
3SE0 => 0438CA8C 3C00RRGG
|
||||
0438CA90 6000BBAA
|
||||
|
||||
Disable lobby event music (but keep the visuals)
|
||||
3SE0 => 040B705C 38000000
|
||||
|
||||
Enable Pinz's Shop Super Card Capsule Machine as a fourth option
|
||||
3SE0 => 043101C0 38800004
|
||||
04310238 2C1D0004
|
||||
04487E8C 000000C8
|
||||
|
||||
Change color of pulsing orange text (e.g. card ability names)
|
||||
3SE0 => 0457EE18 RRRRRRRR // Phase 1 (long) red component as 32-bit float (0.0-255.0)
|
||||
0457EE20 GGGGGGGG // Phase 1 (long) green component as 32-bit float (0.0-255.0)
|
||||
0457EE10 BBBBBBBB // Phase 1 (long) blue component as 32-bit float (0.0-255.0)
|
||||
0457EE1C RRRRRRRR // Phase 2 (short) red component as 32-bit float (0.0-255.0)
|
||||
0457EE24 GGGGGGGG // Phase 2 (short) green component as 32-bit float (0.0-255.0)
|
||||
0457EE14 BBBBBBBB // Phase 2 (short) blue component as 32-bit float (0.0-255.0)
|
||||
|
||||
Change color of pulsing orange text to be random every frame
|
||||
3SE0 => 04155D78 7CA802A6
|
||||
04155D7C 7C661B78
|
||||
04155D80 481EF8B1
|
||||
04155D84 7C671B78
|
||||
04155D88 481EF8A9
|
||||
04155D8C 50677822
|
||||
04155D90 64E7FF00
|
||||
04155D94 90E60024
|
||||
04155D98 7CA803A6
|
||||
04155D9C 4E800020
|
||||
|
||||
Enable color and symbol codes in info board text
|
||||
Use codes like e.g. $CG to change text colors, as described in CommandFormats.hh
|
||||
3SE0 => 040F2E80 4BF0D41D
|
||||
040F0274 4BF10025
|
||||
040EFC58 4BF10641
|
||||
04000298 38810008
|
||||
0400029C 38C3FFFF
|
||||
040002A0 8CA60001
|
||||
040002A4 28050024
|
||||
040002A8 4082000C
|
||||
040002AC 38000009
|
||||
040002B0 98060000
|
||||
040002B4 28050000
|
||||
040002B8 4082FFE8
|
||||
040002BC 7C633050
|
||||
040002C0 4E800020
|
||||
|
||||
Unlock all offline free battle maps
|
||||
This unlocks ALL maps, including a bunch of maps with garbage names that crash if you try to play them
|
||||
3SJT => 042BE538 38600001
|
||||
3SJ0 => 042C9C2C 38600001
|
||||
3SP0 => 042CB50C 38600001
|
||||
3SE0 => 042CAA00 38600001
|
||||
|
||||
Talk to auction counter offline to get all cards
|
||||
3SE0 => 042F5D18 4BD160E8
|
||||
0400BE00 9421FFE0
|
||||
0400BE04 7C0802A6
|
||||
0400BE08 90010024
|
||||
0400BE0C 93E10010
|
||||
0400BE10 93C10014
|
||||
0400BE14 93A10018
|
||||
0400BE18 9381001C
|
||||
0400BE1C 3C60802A
|
||||
0400BE20 60631BAC
|
||||
0400BE24 7C6903A6
|
||||
0400BE28 38600000
|
||||
0400BE2C 4E800421
|
||||
0400BE30 7C7F1B78
|
||||
0400BE34 3C60802A
|
||||
0400BE38 606315BC
|
||||
0400BE3C 7C6903A6
|
||||
0400BE40 7FE3FB78
|
||||
0400BE44 4E800421
|
||||
0400BE48 3F80802A
|
||||
0400BE4C 639C17AC
|
||||
0400BE50 3BC00001
|
||||
0400BE54 3BA00063
|
||||
0400BE58 7FE3FB78
|
||||
0400BE5C 7FC4F378
|
||||
0400BE60 7F8903A6
|
||||
0400BE64 4E800421
|
||||
0400BE68 3BBDFFFF
|
||||
0400BE6C 281D0000
|
||||
0400BE70 4082FFE8
|
||||
0400BE74 3BDE0001
|
||||
0400BE78 281E02F0
|
||||
0400BE7C 4081FFD8
|
||||
0400BE80 3C60802A
|
||||
0400BE84 6063160C
|
||||
0400BE88 7C6903A6
|
||||
0400BE8C 7FE3FB78
|
||||
0400BE90 4E800421
|
||||
0400BE94 83E10010
|
||||
0400BE98 83C10014
|
||||
0400BE9C 83A10018
|
||||
0400BEA0 8381001C
|
||||
0400BEA4 80010024
|
||||
0400BEA8 38210020
|
||||
0400BEAC 7C0803A6
|
||||
0400BEB0 482E9FC0
|
||||
|
||||
Press L for enemy debug; enable various other debug messages
|
||||
TODO: Figure out more debug message conditionals (vars/functions) and add them here
|
||||
3OE1 => 040FD9D8 38600001 # Various enemy debug messages
|
||||
00153E53 00000001 # Poison fog debug 1
|
||||
00153E4B 00000001 # Poison fog debug 2
|
||||
040FDA18 60000000 # TObjRoomId
|
||||
025CB6AA 00000000 # disable enemy debug
|
||||
4A588EA0 00000040 # if L is held...
|
||||
025CB6AA 00000001 # enable enemy debug
|
||||
|
||||
(Episode 3 USA) Able to find VIP cards offline (but they're still rare)
|
||||
042C0B20 4800000C
|
||||
Able to find VIP cards offline (but they're still rare)
|
||||
3SP0 => 042C15DC 4800000C
|
||||
3SJ0 => 042BFE24 4800000C
|
||||
3SE0 => 042C0B20 4800000C
|
||||
|
||||
(Ep3 USA) Hold L when starting battle to enter debug menu
|
||||
042C5460 4BD3AF78
|
||||
040003D8 3C60804A
|
||||
040003DC 60630518
|
||||
040003E0 3C800002
|
||||
040003E4 480C9F35
|
||||
040003E8 2C030000
|
||||
040003EC 4082000C
|
||||
040003F0 8801001A
|
||||
040003F4 48000008
|
||||
040003F8 3800001A
|
||||
040003FC 482C5068
|
||||
Hold L when starting battle to enter debug menu
|
||||
3SE0 => 042C5460 4BD3AF78
|
||||
040003D8 3C60804A
|
||||
040003DC 60630518
|
||||
040003E0 3C800002
|
||||
040003E4 480C9F35
|
||||
040003E8 2C030000
|
||||
040003EC 4082000C
|
||||
040003F0 8801001A
|
||||
040003F4 48000008
|
||||
040003F8 3800001A
|
||||
040003FC 482C5068
|
||||
|
||||
(Ep3 USA) Dressing room always accessible
|
||||
041A16FC 38600001
|
||||
Dressing room always accessible
|
||||
3SJT => 041B2A2C 38600001
|
||||
3SJ0 => 041A1920 38600001
|
||||
3SP0 => 041A1C84 38600001
|
||||
3SE0 => 041A16FC 38600001
|
||||
|
||||
(Ep3 USA) Full dressing room v1
|
||||
Full dressing room v1
|
||||
Original Ep1&2 code by Ralf @ GC-Forever
|
||||
Can't change your class, but you start with your existing appearance
|
||||
Go online with this code on after using the dressing room to fully save changes
|
||||
0418EB5C 60000000
|
||||
042A0184 389D0370
|
||||
042A0188 387E2120
|
||||
3SE0 => 0418EB5C 60000000
|
||||
042A0184 389D0370
|
||||
042A0188 387E2120
|
||||
|
||||
(Ep3 USA) Full dressing room v2
|
||||
Full dressing room v2
|
||||
Original Ep1&2 code by Ralf @ GC-Forever
|
||||
Can change your class, but you start with the default appearance
|
||||
Go online with this code on after using the dressing room to fully save changes
|
||||
04186ECC 4BFFFFD8
|
||||
042A0184 389D0370
|
||||
042A0188 387E2120
|
||||
3SE0 => 04186ECC 4BFFFFD8
|
||||
042A0184 389D0370
|
||||
042A0188 387E2120
|
||||
|
||||
(Ep3 USA) Replace Options menu with debug menu
|
||||
04149E70 38600019
|
||||
Replace Options menu with debug menu
|
||||
3SE0 => 04149E70 38600019
|
||||
|
||||
(Ep3 USA) Jukebox is free
|
||||
0430D1DC 48000024
|
||||
Jukebox is free
|
||||
3SJT => 042248C4 48000024 (useless because the jukebox isn't loaded in NTE, but apparently the code for it exists)
|
||||
3SJ0 => 0430C178 48000024
|
||||
3SE0 => 0430D1DC 48000024
|
||||
3SP0 => 0430DE3C 48000024
|
||||
|
||||
(Ep3 USA) Use own character in battle (online only)
|
||||
041FFAB0 4800001C
|
||||
042A54D8 4BD5B0F9
|
||||
04200A34 4BDFFB9D
|
||||
041FFA9C 4BE00B35
|
||||
040005D0 38600000
|
||||
040005D4 3CA08049
|
||||
040005D8 80A54160
|
||||
040005DC 2805000F
|
||||
040005E0 41820008
|
||||
040005E4 481E8E24
|
||||
040005E8 80ADA448
|
||||
040005EC 7C042800
|
||||
040005F0 41820008
|
||||
040005F4 481E8E14
|
||||
040005F8 38600001
|
||||
040005FC 4E800020
|
||||
Use own character in battle (online only)
|
||||
3SE0 => 041FFAB0 4800001C
|
||||
042A54D8 4BD5B0F9
|
||||
04200A34 4BDFFB9D
|
||||
041FFA9C 4BE00B35
|
||||
040005D0 38600000
|
||||
040005D4 3CA08049
|
||||
040005D8 80A54160
|
||||
040005DC 2805000F
|
||||
040005E0 41820008
|
||||
040005E4 481E8E24
|
||||
040005E8 80ADA448
|
||||
040005EC 7C042800
|
||||
040005F0 41820008
|
||||
040005F4 481E8E14
|
||||
040005F8 38600001
|
||||
040005FC 4E800020
|
||||
|
||||
(Ep3 USA) Disable chat smut filter
|
||||
0412F8B8 7D0802A6
|
||||
0412F8BC 7C661B78
|
||||
0412F8C0 7C872378
|
||||
0412F8C4 48217285
|
||||
0412F8C8 38A30001
|
||||
0412F8CC 7CE33B78
|
||||
0412F8D0 7CC43378
|
||||
0412F8D4 7D0803A6
|
||||
0412F8D8 4BEDEBF4
|
||||
Disable chat smut filter
|
||||
3SE0 => 0412FA4C 60000000
|
||||
|
||||
(Ep3 USA) Metal tiles don't appear in Simulator map
|
||||
04296904 4E800020
|
||||
Metal tiles don't appear in Simulator (Cyber) map
|
||||
3SJT => 0428FED8 4E800020
|
||||
3SJ0 => 04296054 4E800020
|
||||
3SE0 => 04296904 4E800020
|
||||
3SP0 => 04297278 4E800020
|
||||
|
||||
(Ep3 USA) Enable Boooo and Laughter soundchat sounds
|
||||
Enable Boooo and Laughter soundchat sounds
|
||||
Note: Without a TextEnglish.pr2/pr3 patch, the menu items for these sounds will be blank (but they will still work)
|
||||
0430B734 38800029
|
||||
0430B770 2C1F0029
|
||||
0430B59C 2C030029
|
||||
0430B5A8 5460083C
|
||||
0430B5B4 7C63022E
|
||||
0442B690 80258026
|
||||
0442B694 8227852D
|
||||
0442B698 80308031
|
||||
0442B69C 8A3F8532
|
||||
0442B6A0 8A408533
|
||||
0442B6A4 8A418A28
|
||||
0442B6A8 8A388A29
|
||||
0442B6AC 8A39852E
|
||||
0442B6B0 802F853D
|
||||
0442B6B4 85348535
|
||||
0442B6B8 853B8536
|
||||
0442B6BC 8537852B
|
||||
0442B6C0 853A853C
|
||||
0442B6C4 853E8044
|
||||
0442B6C8 80458046
|
||||
0442B6CC 80478048
|
||||
0442B6D0 8049804A
|
||||
0442B6D4 804B804C
|
||||
0442B6D8 804D804E
|
||||
0442B6DC 804F802A
|
||||
0442B6E0 802C0000
|
||||
3SE0 => 0430B734 38800029
|
||||
0430B770 2C1F0029
|
||||
0430B59C 2C030029
|
||||
0430B5A8 5460083C
|
||||
0430B5B4 7C63022E
|
||||
0442B690 80258026
|
||||
0442B694 8227852D
|
||||
0442B698 80308031
|
||||
0442B69C 8A3F8532
|
||||
0442B6A0 8A408533
|
||||
0442B6A4 8A418A28
|
||||
0442B6A8 8A388A29
|
||||
0442B6AC 8A39852E
|
||||
0442B6B0 802F853D
|
||||
0442B6B4 85348535
|
||||
0442B6B8 853B8536
|
||||
0442B6BC 8537852B
|
||||
0442B6C0 853A853C
|
||||
0442B6C4 853E8044
|
||||
0442B6C8 80458046
|
||||
0442B6CC 80478048
|
||||
0442B6D0 8049804A
|
||||
0442B6D4 804B804C
|
||||
0442B6D8 804D804E
|
||||
0442B6DC 804F802A
|
||||
0442B6E0 802C0000
|
||||
|
||||
Use English language files
|
||||
3SJT => 0408E414 38600001
|
||||
0408E448 38000001
|
||||
0408E44C 900DA62C
|
||||
0408E450 4E800020
|
||||
|
||||
Replace all sound effects with specified sound effect
|
||||
3OE1 => 042256E4 3F40XXXX
|
||||
042256E8 635AYYYY
|
||||
042256EC 4800000C
|
||||
|
||||
Enable seasonal rappies offline (Ep2 only)
|
||||
X = 1: Saint Rappy
|
||||
X = 4: Egg Rappy
|
||||
X = 5: Hallo Rappy
|
||||
X = anything else: Love Rappy
|
||||
3OE0 => 040C1658 60000000
|
||||
040C165C 3800000X
|
||||
3OE1 => 040C1658 60000000
|
||||
040C165C 3800000X
|
||||
3OE2 => 040C17F0 60000000
|
||||
040C17F4 3800000X
|
||||
3OJ2 => 040C13B4 60000000
|
||||
040C13B8 3800000X
|
||||
3OJ3 => 040C16B8 60000000
|
||||
040C16BC 3800000X
|
||||
3OJ4 => 040C18EC 60000000
|
||||
040C18F0 3800000X
|
||||
3OJ5 => 040C17E0 60000000
|
||||
040C17E4 3800000X
|
||||
3OP0 => 040C17B8 60000000
|
||||
040C17BC 3800000X
|
||||
|
||||
Heaven Punisher's special always works
|
||||
3OJ2 => 0412AB98 38800001
|
||||
3OJ3 => 0412ADDC 38800001
|
||||
3OJ4 => 0412AE6C 38800001
|
||||
3OJ5 => 0412AD74 38800001
|
||||
3OE0 => 0412AE3C 38800001
|
||||
3OE1 => 0412AE3C 38800001
|
||||
3OE2 => 0412AD84 38800001
|
||||
3OP0 => 0412AF5C 38800001
|
||||
|
||||
Allow loading corrupted save files
|
||||
3OJ2 => 041FC784 38600007
|
||||
041FC788 4E800020
|
||||
3OJ3 => 041FCF98 38600007
|
||||
041FCF9C 4E800020
|
||||
3OJ4 => 041FDED4 38600007
|
||||
041FDED8 4E800020
|
||||
3OJ5 => 041FD504 38600007
|
||||
041FD508 4E800020
|
||||
3OE0 => 041FCDE8 38600007
|
||||
041FCDEC 4E800020
|
||||
3OE1 => 041FCDE8 38600007
|
||||
041FCDEC 4E800020
|
||||
3OE2 => 041FD770 38600007
|
||||
041FD774 4E800020
|
||||
3OP0 => 041FD66C 38600007
|
||||
041FD670 4E800020
|
||||
3SE0 => 04115244 38600007
|
||||
04115248 4E800020
|
||||
3SJ0 => 041152E8 38600007
|
||||
041152EC 4E800020
|
||||
3SJT => 04117AA0 38600007
|
||||
04117AA4 4E800020
|
||||
3SP0 => 041156D0 38600007
|
||||
041156D4 4E800020
|
||||
|
||||
60 frames per second
|
||||
This does not adjust any logic or animations; everything just runs faster
|
||||
3OE1 => 045CDEF8 00000001
|
||||
|
||||
Show extended item info when targeting a dropped item
|
||||
(Compiled from the ExtendedItemInfo patch, also written by me)
|
||||
3OE1 => 044CB088 00000023
|
||||
04262270 4BDA1E15
|
||||
04262580 4BDA1AB8
|
||||
0426224C 4BDA1DFD
|
||||
04262294 4BDA1DC9
|
||||
042874C0 4BD7CB50
|
||||
04287424 4BD7CBF8
|
||||
04004008 41F00000
|
||||
0400400C 43480000
|
||||
04004010 3C808000
|
||||
04004014 90644004
|
||||
04004018 4E800020
|
||||
0400401C 3C808000
|
||||
04004020 80044004
|
||||
04004024 7C001840
|
||||
04004028 4082000C
|
||||
0400402C 38000000
|
||||
04004030 90044004
|
||||
04004034 4E800020
|
||||
04004038 9421FFE0
|
||||
0400403C 7C0802A6
|
||||
04004040 90010024
|
||||
04004044 48000028
|
||||
04004048 9421FFE0
|
||||
0400404C 7C0802A6
|
||||
04004050 90010024
|
||||
04004054 4825E0D5
|
||||
04004058 48000014
|
||||
0400405C 9421FFE0
|
||||
04004060 7C0802A6
|
||||
04004064 90010024
|
||||
04004068 4825DBED
|
||||
0400406C 38600000
|
||||
04004070 48000049
|
||||
04004074 80010024
|
||||
04004078 7C0803A6
|
||||
0400407C 38210020
|
||||
04004080 4E800020
|
||||
04004084 9421FFE0
|
||||
04004088 7C0802A6
|
||||
0400408C 90010024
|
||||
04004090 90810008
|
||||
04004094 93E1000C
|
||||
04004098 4825DF19
|
||||
0400409C 80610008
|
||||
040040A0 48000019
|
||||
040040A4 83E1000C
|
||||
040040A8 80010024
|
||||
040040AC 38210020
|
||||
040040B0 7C0803A6
|
||||
040040B4 4E800020
|
||||
040040B8 9421FFE0
|
||||
040040BC 7C0802A6
|
||||
040040C0 90010024
|
||||
040040C4 90610008
|
||||
040040C8 93E1000C
|
||||
040040CC 3FE08000
|
||||
040040D0 28030000
|
||||
040040D4 41820094
|
||||
040040D8 A08300EC
|
||||
040040DC 28040103
|
||||
040040E0 41820088
|
||||
040040E4 28040300
|
||||
040040E8 40800080
|
||||
040040EC 480155DD
|
||||
040040F0 28030000
|
||||
040040F4 40820074
|
||||
040040F8 3C608000
|
||||
040040FC 80634004
|
||||
04004100 28030000
|
||||
04004104 41820010
|
||||
04004108 8063004C
|
||||
0400410C 546307FF
|
||||
04004110 40820058
|
||||
04004114 807F4000
|
||||
04004118 28030000
|
||||
0400411C 4082002C
|
||||
04004120 386000BC
|
||||
04004124 48225419
|
||||
04004128 907F4000
|
||||
0400412C 28030000
|
||||
04004130 41820050
|
||||
04004134 63E34008
|
||||
04004138 7C641B78
|
||||
0400413C 807F4000
|
||||
04004140 80ADAD80
|
||||
04004144 482509B1
|
||||
04004148 807F4000
|
||||
0400414C 8003002C
|
||||
04004150 60000020
|
||||
04004154 9003002C
|
||||
04004158 80810008
|
||||
0400415C 808400D8
|
||||
04004160 48250519
|
||||
04004164 4800001C
|
||||
04004168 807F4000
|
||||
0400416C 28030000
|
||||
04004170 41820010
|
||||
04004174 38000000
|
||||
04004178 901F4000
|
||||
0400417C 4823F76D
|
||||
04004180 83E1000C
|
||||
04004184 80010024
|
||||
04004188 38210020
|
||||
0400418C 7C0803A6
|
||||
04004190 4E800020
|
||||
3OE2 => 044CF6F0 00000023
|
||||
04263630 4BDA1A55
|
||||
04263940 4BDA16F8
|
||||
0426360C 4BDA1A3D
|
||||
04263654 4BDA1A09
|
||||
0428893C 4BD7C6D4
|
||||
042888A0 4BD7C77C
|
||||
04005008 41F00000
|
||||
0400500C 43480000
|
||||
04005010 3C808000
|
||||
04005014 90645004
|
||||
04005018 4E800020
|
||||
0400501C 3C808000
|
||||
04005020 80045004
|
||||
04005024 7C001840
|
||||
04005028 4082000C
|
||||
0400502C 38000000
|
||||
04005030 90045004
|
||||
04005034 4E800020
|
||||
04005038 9421FFE0
|
||||
0400503C 7C0802A6
|
||||
04005040 90010024
|
||||
04005044 48000028
|
||||
04005048 9421FFE0
|
||||
0400504C 7C0802A6
|
||||
04005050 90010024
|
||||
04005054 4825E495
|
||||
04005058 48000014
|
||||
0400505C 9421FFE0
|
||||
04005060 7C0802A6
|
||||
04005064 90010024
|
||||
04005068 4825DFAD
|
||||
0400506C 38600000
|
||||
04005070 48000049
|
||||
04005074 80010024
|
||||
04005078 7C0803A6
|
||||
0400507C 38210020
|
||||
04005080 4E800020
|
||||
04005084 9421FFE0
|
||||
04005088 7C0802A6
|
||||
0400508C 90010024
|
||||
04005090 90810008
|
||||
04005094 93E1000C
|
||||
04005098 4825E2D9
|
||||
0400509C 80610008
|
||||
040050A0 48000019
|
||||
040050A4 83E1000C
|
||||
040050A8 80010024
|
||||
040050AC 38210020
|
||||
040050B0 7C0803A6
|
||||
040050B4 4E800020
|
||||
040050B8 9421FFE0
|
||||
040050BC 7C0802A6
|
||||
040050C0 90010024
|
||||
040050C4 90610008
|
||||
040050C8 93E1000C
|
||||
040050CC 3FE08000
|
||||
040050D0 28030000
|
||||
040050D4 41820094
|
||||
040050D8 A08300EC
|
||||
040050DC 28040103
|
||||
040050E0 41820088
|
||||
040050E4 28040300
|
||||
040050E8 40800080
|
||||
040050EC 480145A5
|
||||
040050F0 28030000
|
||||
040050F4 40820074
|
||||
040050F8 3C608000
|
||||
040050FC 80635004
|
||||
04005100 28030000
|
||||
04005104 41820010
|
||||
04005108 8063004C
|
||||
0400510C 546307FF
|
||||
04005110 40820058
|
||||
04005114 807F5000
|
||||
04005118 28030000
|
||||
0400511C 4082002C
|
||||
04005120 386000BC
|
||||
04005124 482254CD
|
||||
04005128 907F5000
|
||||
0400512C 28030000
|
||||
04005130 41820050
|
||||
04005134 63E35008
|
||||
04005138 7C641B78
|
||||
0400513C 807F5000
|
||||
04005140 80ADADA0
|
||||
04005144 48250B89
|
||||
04005148 807F5000
|
||||
0400514C 8003002C
|
||||
04005150 60000020
|
||||
04005154 9003002C
|
||||
04005158 80810008
|
||||
0400515C 808400D8
|
||||
04005160 482506F1
|
||||
04005164 4800001C
|
||||
04005168 807F5000
|
||||
0400516C 28030000
|
||||
04005170 41820010
|
||||
04005174 38000000
|
||||
04005178 901F5000
|
||||
0400517C 4823F899
|
||||
04005180 83E1000C
|
||||
04005184 80010024
|
||||
04005188 38210020
|
||||
0400518C 7C0803A6
|
||||
04005190 4E800020
|
||||
|
||||
All weapons can do 3-hit combos
|
||||
3OE1 => 041D3248 38000001
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
000F04 LOGiN
|
||||
006E00 GAME MAGAZNE
|
||||
00AD00 RAGE DE FEU
|
||||
00AD01 RAGE DE FEU
|
||||
00AD02 RAGE DE FEU
|
||||
00D000 UNKNOWN3
|
||||
00D100 UNKNOWN4
|
||||
01013D KROE'S SWEATER
|
||||
01013F SONICTEAM ARMOR
|
||||
010230 HUNTER'S SHELL
|
||||
010233 HUNTER'S SHELL
|
||||
010234 HUNTER'S SHELL
|
||||
010236 Barrier
|
||||
010237 Barrier
|
||||
010238 Barrier
|
||||
010239 Barrier
|
||||
010253 BLUE RING
|
||||
010254 BLUE RING
|
||||
010255 BLUE RING
|
||||
010256 BLUE RING
|
||||
010257 BLUE RING
|
||||
010258 BLUE RING
|
||||
01025A BLUE RING
|
||||
01025B GREEN RING
|
||||
01025C GREEN RING
|
||||
01025D GREEN RING
|
||||
01025E GREEN RING
|
||||
010260 GREEN RING
|
||||
010261 GREEN RING
|
||||
010262 GREEN RING
|
||||
010263 YELLOW RING
|
||||
010264 YELLOW RING
|
||||
010265 YELLOW RING
|
||||
010267 YELLOW RING
|
||||
010268 YELLOW RING
|
||||
010269 YELLOW RING
|
||||
01026A YELLOW RING
|
||||
01026B PURPLE RING
|
||||
01026D PURPLE RING
|
||||
01026E PURPLE RING
|
||||
01026F PURPLE RING
|
||||
010270 PURPLE RING
|
||||
010271 PURPLE RING
|
||||
010272 PURPLE RING
|
||||
010274 WHITE RING
|
||||
010276 WHITE RING
|
||||
010277 WHITE RING
|
||||
010278 WHITE RING
|
||||
010279 WHITE RING
|
||||
01027A WHITE RING
|
||||
01027C BLACK RING
|
||||
01027D BLACK RING
|
||||
01027E BLACK RING
|
||||
01027F BLACK RING
|
||||
010281 BLACK RING
|
||||
01029A UNKNOWN_B
|
||||
024300 \n
|
||||
024A00 Yahoo!
|
||||
024D00 Cell of MAG 0503
|
||||
024E00 Cell of MAG 0504
|
||||
024F00 Cell of MAG 0505
|
||||
025000 Cell of MAG 0506
|
||||
025100 Cell of MAG 0507
|
||||
03120B New Year's Card
|
||||
03120C Christmas Card
|
||||
03120D Birthday Card
|
||||
03120E Proof of Sonic Team
|
||||
03120F Special Event Ticket
|
||||
03140A Bouquet
|
||||
03140B Decoction
|
||||
031603 DISK Vol.4 "Open Your Heart"
|
||||
031604 DISK Vol.5 "Live & Learn"
|
||||
031801 UNKNOWN2
|
||||
031808 Yahoo!'s engine
|
||||
03180B Cell of MAG 0503
|
||||
03180C Cell of MAG 0504
|
||||
03180D Cell of MAG 0505
|
||||
03180E Cell of MAG 0506
|
||||
03180F Cell of MAG 0507
|
||||
200000 (invalid item code)
|
||||
+451
-453
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
DC NTE: pso02.dricas.ne.jp
|
||||
Nov 2000 proto: test1.st-pso.games.sega.net
|
||||
Dec 2000 proto: sg107634.csrd.sega.co.jp OR master.pso.dream-key.com
|
||||
Jan 2001 proto: master.pso.dream-key.com
|
||||
Aug 2001 proto (v2): game01.st-pso.games.sega.net
|
||||
1OJ1 (DC NTE): pso02.dricas.ne.jp
|
||||
1OJ2 (11/2000): test1.st-pso.games.sega.net
|
||||
1OJ3 (12/2000): sg107634.csrd.sega.co.jp OR master.pso.dream-key.com
|
||||
1OJ4 (01/2001): master.pso.dream-key.com
|
||||
2OJ5 (08/2001; v2): game01.st-pso.games.sega.net
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
This is a list of common shared serials for the Dreamcast version of the game.
|
||||
These serials are listed in decimal format for use with newserv and are not valid
|
||||
for use in the game itself.
|
||||
|
||||
If you are looking for a serial number to use for your Dreamcast copy of the game,
|
||||
please use newserv's DC serial number generator, or PSO Tool GUI at
|
||||
https://segaxtreme.net/resources/pso-tool-gui-by-razorx.224/
|
||||
|
||||
To allow the below shared serials to be used on your server by multiple users, use
|
||||
the below command (this works if the serial is already registered too):
|
||||
|
||||
add-license serial=<serial-number> flags=80000000
|
||||
|
||||
---
|
||||
|
||||
144243108
|
||||
297233506
|
||||
400533035
|
||||
446310728
|
||||
532044219
|
||||
1315107383
|
||||
1567634924
|
||||
1748940599
|
||||
2004318071
|
||||
2309795986
|
||||
3811232030
|
||||
3828776100
|
||||
4098754580
|
||||
@@ -0,0 +1,9 @@
|
||||
entry counter flags
|
||||
|
||||
01 = rules have any non-default values
|
||||
02 = map number is set
|
||||
04 = UNKNOWN (something to do with deck selection/verification)
|
||||
08 = tournament mode (set by 6xB4x3D; shows timer in battle select menu and skips map select and rule select)
|
||||
10 = UNKNOWN (used by 6xB5x43)
|
||||
20 = command DC received
|
||||
40 = tournament result available (6xB4x51 received)
|
||||
@@ -0,0 +1,58 @@
|
||||
List of differences in Ep3 NTE compared to Final:
|
||||
- COMs can play more than one defense card per turn
|
||||
- The battle setup menu allows 1v2 battles
|
||||
- Assist cards
|
||||
- - Dice Fever sets dice to 6, not 5, and there is no Dice Fever +
|
||||
- - Rich + and Charity + also don't exist
|
||||
- - Powerless Rain, Brave Wind, Influence, Fix apply at a different phase of the attack procedure
|
||||
- - Tech Field applies to SCs only; on Final, it applies to SCs and creatures
|
||||
- - The denominator for Vengeance is 2; on Final it's 3
|
||||
- - AP Absorption logic is different (TODO: see apply_ap_and_tp_adjust_assists_to_attack)
|
||||
- - God Whim can use ANY assist card, not only the normally-obtainable ones, and it assigns all 4 players an assist, not only those who already had assists
|
||||
- - Inflation and Deflation only cause +1 or -1 cost per action, not per card
|
||||
- - Exchange can be set on other players
|
||||
- - The SET_MV condition overrides Snail Pace and Stamina completely
|
||||
- - Stamina sets your effective MV to 99 instead of 9
|
||||
- - Land Price is 2x instead of 1.5x
|
||||
- - Shuffle All and Shuffle Group don't respect deck shuffle/loop disabled settings
|
||||
- - Assist Vanish clears immediately, which means it can override other assists that happen at the same time (Trash 1, Empty Hand, etc.); in Final it happens after those
|
||||
- Abilities
|
||||
- - Rampage and Pierce are not player-specific; that is, if an attack has Rampage against one target, it has Rampage against all targets (this distinction is important for conditional abilities like Major Rampage and Heavy Pierce)
|
||||
- - Several abilities don't exist (TODO: Which ones? 0x64 and above?)
|
||||
- - Abnormal conditions do not have priorities like they do on Final
|
||||
- - Ability Trap seems incompletely implemented (or not implemented at all?)
|
||||
- - It appears that Major Pierce doesn't work against Arkz SCs, and this was fixed in Final
|
||||
- Conditions
|
||||
- - Anti-Abnormality doesn't prevent Freeze, Drop, Guom, or Curse
|
||||
- - SCs can get Freeze (they can't in Final)
|
||||
- - Bosses do not have automatic Anti-Abnormality
|
||||
- - Ability Trap prevents all abnormal conditions
|
||||
- Traps
|
||||
- - Traps trigger as soon as you move into their tile; on Final, they trigger at the end of the Move phase
|
||||
- - Traps may use any assist card, and this can be configured in the map definition
|
||||
- Rules
|
||||
- - Dice Boost does not exist
|
||||
- - ATK and DEF dice ranges can be set independently, but there are only 7 options for each: 1-6, 1-1, 2-2, 3-3, 4-4, 5-5, 6-6
|
||||
- - There may be a bug when either die is set to 1-1 so you'll always get 2 instead (TODO: verify this)
|
||||
- COM interference is not implemented
|
||||
- The target's defense power is computed after checking if the attack is Resta instead of before
|
||||
- Card definitions
|
||||
- - The n21 and n22 arg2 conditions don't exist
|
||||
- - The p25 condition finds cards with Paralyze or Fly in NTE, vs. Aerial or Fly in Final; looks like a copy-paste error by Sega
|
||||
- - The p36 condition includes SCs and items on NTE, but only SCs on Final
|
||||
- - The p41 condition includes only your team on NTE, but both teams on Final
|
||||
- - Several tokens can't be used in expr fields: ddm, sat, edm, ldm, rdm, fdm, ndm, ehp
|
||||
- Missing rule checks
|
||||
- - Boss SCs can use items
|
||||
- - Move logic is different, which I didn't reverse-engineer because I was too lazy and couldn't imagine how it could be meaningfully different from Final
|
||||
- - Many values are not clamped (in Final, many are clamped to 0-9 or -99-99)
|
||||
- - You can set cards that aren't actually in your hand
|
||||
- - The game assumes team A always is at the top facing down and team B is always at the bottom facing up; if the map defines them to start on different edges or facing different directions than expected, the creature summoning areas will be wrong
|
||||
- - Character HP rule completely overrides the HP stat on SC cards; in Final, the SC's HP stat is added to Character HP
|
||||
- - Boss SCs are not exempt from this either; they have the same HP as normal SCs
|
||||
- - Cards marked as dead but not yet deleted can still attack
|
||||
- - The HOLD (6) and CANNOT_DEFEND (7) conditions don't actually stop you from defending
|
||||
- - There is no hard limit of 1000 turns for any battle
|
||||
- - In case of a draw, the first two tiebreaker rules (number of dead SCs and remaining SC HP) are skipped
|
||||
- The server cannot override EXP result values (thus post-battle EXP loss cannot be disabled)
|
||||
- Surprisingly, the code for PBs is identical between NTE and Final; it seems like they didn't spend any time on PBs after NTE at all
|
||||
@@ -81,7 +81,7 @@ blr
|
||||
|
||||
|
||||
|
||||
Ep1&2 v1.01 version of the above code
|
||||
Ep1&2 v1.1 version of the above code
|
||||
|
||||
send_D9
|
||||
./m68kdasm --assemble-ppc32 --ppc32 --start-address=801DA398
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
Ep1 Ep2
|
||||
1 Forest 1 Temple
|
||||
2 Forest 2 Temple
|
||||
3 Cave 1 Spaceship
|
||||
4 Cave 2 Spaceship
|
||||
5 Cave 3 CCA
|
||||
6 Mine 1 Jungle
|
||||
7 Mine 2 Jungle
|
||||
8 Ruins 1 (broken) Mountain
|
||||
9 Ruins 2 (broken) Seaside
|
||||
10 Ruins 3 (broken) Void (Seabed doors + Mine music)
|
||||
11 Dragon Void (doors + Dolmolm + Mine music)
|
||||
12 De Rol Le Gal Gryphon
|
||||
13 Vol Opt Olga Flow (unfinished, Flow does no damage)
|
||||
14 void (Falz music) Barba Ray (unfinished)
|
||||
15 Lobby Gol Dragon (unfinished)
|
||||
16 Versus1 crash
|
||||
17 Versus2 crash
|
||||
@@ -5,17 +5,7 @@ import sys
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
version_tokens = ("JP12", "JP13", "JP14", "JP15", "US10", "US11", "US12", "EU")
|
||||
version_to_specific_version = {
|
||||
"JP12": "3OJ2",
|
||||
"JP13": "3OJ3",
|
||||
"JP14": "3OJ4",
|
||||
"JP15": "3OJ5",
|
||||
"US10": "3OE0",
|
||||
"US11": "3OE1",
|
||||
"US12": "3OE2",
|
||||
"EU": "3OP0",
|
||||
}
|
||||
version_tokens = ("3OJ2", "3OJ3", "3OJ4", "3OJ5", "3OE0", "3OE1", "3OE2", "3OP0")
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -60,7 +50,7 @@ def write_patches_for_code(
|
||||
if write_regions:
|
||||
filename = os.path.join(
|
||||
out_dir,
|
||||
f'{name.replace(" ", "")}.{version_to_specific_version[v]}.patch.s',
|
||||
f'{name.replace(" ", "")}.{v}.patch.s',
|
||||
)
|
||||
with open(filename, "wt") as f:
|
||||
if long_name is not None:
|
||||
@@ -72,7 +62,7 @@ def write_patches_for_code(
|
||||
f.write("reloc0:\n")
|
||||
f.write(" .offsetof start\n")
|
||||
f.write("start:\n")
|
||||
f.write(" .include WriteCodeBlocks\n")
|
||||
f.write(" .include WriteCodeBlocksGC\n")
|
||||
for region in write_regions:
|
||||
f.write(
|
||||
f" # region @ {region.address:08X} ({len(region.data) * 4} bytes)\n"
|
||||
@@ -144,7 +134,7 @@ def main():
|
||||
| (data[z + 2] << 8)
|
||||
| (data[z + 3] << 0)
|
||||
)
|
||||
elif line.startswith("JP12------------"):
|
||||
elif line.startswith("3OJ2------------"):
|
||||
reading_code = True
|
||||
else:
|
||||
code_name = line
|
||||
|
||||
+1044
-987
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
patch required in 59NL to get this to work: 0048210D EB
|
||||
|
||||
is_hangame callsites in 59NL:
|
||||
0040457C - don't save password on disconnect
|
||||
004820F4 - client version check (use patch above to bypass)
|
||||
00708318 - patch server domain name
|
||||
00708348 - patch server port
|
||||
0070852C - ep4 unlocked setting (always true for hangame)
|
||||
007085F4 - data server domain name
|
||||
00708670 - data server port
|
||||
007618E3 - whether to save user/pass to registry
|
||||
00761C4C - create title screen menu (only shows Start Game and Exit Game in Hangame mode)
|
||||
007623B0 - input password length limit?? (does nothing, since both branches of if statement lead to same result)
|
||||
00762530 - registry account data access
|
||||
00762708 - input password length limit?? (does nothing, since both branches of if statement lead to same result)
|
||||
0076296F - input username length limit?? (limits to 12 instead of 16)
|
||||
00762C30 - input username length limit?? (limits to 12 instead of 16)
|
||||
00762D00 - password length limit again??
|
||||
00762D2C - username length limit again??
|
||||
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+206
File diff suppressed because one or more lines are too long
+111
-81
@@ -21,7 +21,7 @@ Common Bank Patch
|
||||
CommonBank
|
||||
*** name=Common bank
|
||||
*** desc=Hold L and open\nthe bank to use a\ncommon bank stored\nin temp character\n3's data
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000BAB4 281B0002 8000BAB4 281B0002 8000BAB4 281B0002 8000BAB4 281B0002 8000BAB4 281B0002 8000BAB4 281B0002 8000BAB4 281B0002 8000BAB4 281B0002 cmplwi r27, 2
|
||||
8000BAB8 40820018 8000BAB8 40820018 8000BAB8 40820018 8000BAB8 40820018 8000BAB8 40820018 8000BAB8 40820018 8000BAB8 40820018 8000BAB8 40820018 bne +0x00000018 /* 8000BAD0 */
|
||||
8000BABC 3C008000 8000BABC 3C008000 8000BABC 3C008000 8000BABC 3C008000 8000BABC 3C008000 8000BABC 3C008000 8000BABC 3C008000 8000BABC 3C008000 lis r0, 0x8000
|
||||
@@ -71,11 +71,11 @@ Item Loss Prevention
|
||||
ItemLossPrevention
|
||||
*** name=No item loss
|
||||
*** desc=Don't lose items if\nyou don't log off\nnormally
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
801D33E4 4800004C 801D38EC 4800004C 801D3CC4 4800004C 801D39B8 4800004C 801D381C 4800004C 801D381C 4800004C 801D3A1C 4800004C 801D3ED8 4800004C b +0x0000004C /* 801D3868 */
|
||||
8020010C 60000000 801FF710 60000000 801FF0FC 60000000 801FF0FC 60000000 801FFA44 60000000 801FF9E0 60000000 nop
|
||||
802016CC 60000000 80200C9C 60000000 80200658 60000000 80200658 60000000 80200FD0 60000000 80200F3C 60000000 nop
|
||||
801FD944 38000000 80202860 38000000 802021C4 38000000 802021C4 38000000 80202B94 38000000 80202AA8 38000000 li r0, 0x0000
|
||||
801FE900 60000000 801FF174 60000000 8020010C 60000000 801FF710 60000000 801FF0FC 60000000 801FF0FC 60000000 801FFA44 60000000 801FF9E0 60000000 nop
|
||||
801FFE5C 60000000 802006D0 60000000 802016CC 60000000 80200C9C 60000000 80200658 60000000 80200658 60000000 80200FD0 60000000 80200F3C 60000000 nop
|
||||
802019C8 38000000 8020223C 38000000 801FD944 38000000 80202860 38000000 802021C4 38000000 802021C4 38000000 80202B94 38000000 80202AA8 38000000 li r0, 0x0000
|
||||
802C2060 4800004C 802C2F98 4800004C 802C42E4 4800004C 802C3E78 4800004C 802C2A40 4800004C 802C2A84 4800004C 802C402C 4800004C 802C37C0 4800004C b +0x0000004C /* 802C2A8C */
|
||||
802D0AA0 48000020 802D1A58 48000020 802D2C10 48000020 802D2938 48000020 802D1480 48000020 802D14C4 48000020 802D2AEC 48000020 802D2280 48000020 b +0x00000020 /* 802D14A0 */
|
||||
|
||||
@@ -83,7 +83,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
Palette
|
||||
*** name=Palette
|
||||
*** desc=Press Z to cycle\nthrough 4 customize\nconfigs instead of of\njust one
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000CD00 3C808000 8000CD00 3C808000 8000CD00 3C808000 8000CD00 3C808000 8000CD00 3C808000 8000CD00 3C808000 8000CD00 3C808000 8000CD00 3C808000 lis r4, 0x8000
|
||||
8000CD04 6084CF3E 8000CD04 6084CF3E 8000CD04 6084CF3E 8000CD04 6084CF3E 8000CD04 6084CF3E 8000CD04 6084CF3E 8000CD04 6084CF3E 8000CD04 6084CF3E ori r4, r4, 0xCF3E
|
||||
8000CD08 3BE00000 8000CD08 3BE00000 8000CD08 3BE00000 8000CD08 3BE00000 8000CD08 3BE00000 8000CD08 3BE00000 8000CD08 3BE00000 8000CD08 3BE00000 li r31, 0x0000
|
||||
@@ -123,7 +123,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
"Palette Patch" Part 2
|
||||
Palette
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000CD8C 38600003 8000CD8C 38600003 8000CD8C 38600003 8000CD8C 38600003 8000CD8C 38600003 8000CD8C 38600003 8000CD8C 38600003 8000CD8C 38600003 li r3, 0x0003
|
||||
8000CD90 3C808001 8000CD90 3C808001 8000CD90 3C808001 8000CD90 3C808001 8000CD90 3C808001 8000CD90 3C808001 8000CD90 3C808001 8000CD90 3C808001 lis r4, 0x8001
|
||||
8000CD94 B064CF78 8000CD94 B064CF78 8000CD94 B064CF78 8000CD94 B064CF78 8000CD94 B064CF78 8000CD94 B064CF78 8000CD94 B064CF78 8000CD94 B064CF78 sth [r4 - 0x3088], r3
|
||||
@@ -159,7 +159,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
"Palette Patch" Part 3 (this part adds PBs to the customize list)
|
||||
Palette
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000CA40 28030000 8000CA40 28030000 8000CA40 28030000 8000CA40 28030000 8000CA40 28030000 8000CA40 28030000 8000CA40 28030000 8000CA40 28030000 cmplwi r3, 0
|
||||
8000CA44 40820008 8000CA44 40820008 8000CA44 40820008 8000CA44 40820008 8000CA44 40820008 8000CA44 40820008 8000CA44 40820008 8000CA44 40820008 bne +0x00000008 /* 8000CA4C */
|
||||
8000CA48 3BE00000 8000CA48 3BE00000 8000CA48 3BE00000 8000CA48 3BE00000 8000CA48 3BE00000 8000CA48 3BE00000 8000CA48 3BE00000 8000CA48 3BE00000 li r31, 0x0000
|
||||
@@ -195,12 +195,12 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
"Palette Patch" Part 4 (this disables PBs from overtaking the back palette)
|
||||
Palette
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
801B55F8 38600000 801B5A4C 38600000 801B7BB8 38600000 801B5B18 38600000 801B59E4 38600000 801B59E4 38600000 801B5B7C 38600000 801B6038 38600000 li r3, 0x0000
|
||||
|
||||
"Palette Patch" Part 5 (saves palettes to temp slot 3)
|
||||
Palette
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000B958 906DB93C 8000B958 906DB944 8000B958 906DB964 8000B958 906DB964 8000B958 906DB954 8000B958 906DB954 8000B958 906DB974 8000B958 906DB9B4 stw [r13 - 0x46AC], r3
|
||||
8000B95C 1C63003C 8000B95C 1C63003C 8000B95C 1C63003C 8000B95C 1C63003C 8000B95C 1C63003C 8000B95C 1C63003C 8000B95C 1C63003C 8000B95C 1C63003C mulli r3, r3, 60
|
||||
8000B960 808DB920 8000B960 808DB928 8000B960 808DB948 8000B960 808DB948 8000B960 808DB938 8000B960 808DB938 8000B960 808DB958 8000B960 808DB998 lwz r4, [r13 - 0x46C8]
|
||||
@@ -244,7 +244,7 @@ Decoction Patch (makes the Decoction item wipe non-HP/TP materials)
|
||||
Decoction
|
||||
*** name=Decoction
|
||||
*** desc=Make the Decoction\nitem reset your\nmaterial usage
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80350740 880300EE 80351B44 880300EE 803530A0 880300EE 80352E54 880300EE 803515F4 880300EE 80351638 880300EE 80353220 880300EE 80352614 880300EE lbz r0, [r3 + 0x00EE]
|
||||
80350744 2800000B 80351B48 2800000B 803530A4 2800000B 80352E58 2800000B 803515F8 2800000B 8035163C 2800000B 80353224 2800000B 80352618 2800000B cmplwi r0, 11
|
||||
80350748 40820144 80351B4C 40820144 803530A8 40820144 80352E5C 40820144 803515FC 40820144 80351640 40820144 80353228 40820144 8035261C 40820144 bne +0x00000144 /* 80351740 */
|
||||
@@ -288,19 +288,19 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
Movement
|
||||
*** name=Movement
|
||||
*** desc=Allow backsteps and\nmovement when\nenemies are\nnearby
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
801CF69C 48000014 801CFBB0 48000014 801D1CEC 48000014 801CFC7C 48000014 801CFAE0 48000014 801CFAE0 48000014 801CFCE0 48000014 801D019C 48000014 b +0x00000014 /* 801CFAF4 */
|
||||
|
||||
"Movement Patch" Part 2 (restores backstep functionality on certain movements)
|
||||
Movement
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
801CE7AC 4800000C 801CECC0 4800000C 801D0D10 4800000C 801CED8C 4800000C 801CEBF0 4800000C 801CEBF0 4800000C 801CEDF0 4800000C 801CF2AC 4800000C b +0x0000000C /* 801CEBFC */
|
||||
|
||||
Olga Flow Barta Bug Fix (makes barta work on ice weakness Olga Flow instead of damaging player)
|
||||
BugFixes
|
||||
*** name=Bug fixes
|
||||
*** desc=Fix many minor\ngameplay, sound,\nand graphical bugs
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000D980 807C0000 8000D980 807C0000 8000D980 807C0000 8000D980 807C0000 8000D980 807C0000 8000D980 807C0000 8000D980 807C0000 8000D980 807C0000 lwz r3, [r28]
|
||||
8000D984 2C030013 8000D984 2C030013 8000D984 2C030013 8000D984 2C030013 8000D984 2C030013 8000D984 2C030013 8000D984 2C030013 8000D984 2C030013 cmpwi r3, 19
|
||||
8000D988 40820008 8000D988 40820008 8000D988 40820008 8000D988 40820008 8000D988 40820008 8000D988 40820008 8000D988 40820008 8000D988 40820008 bne +0x00000008 /* 8000D990 */
|
||||
@@ -310,7 +310,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Morfos Frozen Player Bug Fix (stops Morfos Laser multi-hitting when player is frozen)
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000D9A0 C042FC78 8000D9A0 C042FC80 8000D9A0 C042FC80 8000D9A0 C042FC80 8000D9A0 C042FC88 8000D9A0 C042FC88 8000D9A0 C042FC88 8000D9A0 C042FC88 lfs f2, [r2 - 0x0378]
|
||||
8000D9A4 807E0030 8000D9A4 807E0030 8000D9A4 807E0030 8000D9A4 807E0030 8000D9A4 807E0030 8000D9A4 807E0030 8000D9A4 807E0030 8000D9A4 807E0030 lwz r3, [r30 + 0x0030]
|
||||
8000D9A8 70630020 8000D9A8 70630020 8000D9A8 70630020 8000D9A8 70630020 8000D9A8 70630020 8000D9A8 70630020 8000D9A8 70630020 8000D9A8 70630020 andi. r3, r3, 0x0020
|
||||
@@ -321,18 +321,18 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Tiny Grass Assassins Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
800BC750 48000010 800BCA58 48000010 800BCBD0 48000010 800BCB80 48000010 800BC9E8 48000010 800BC9E8 48000010 800BCB90 48000010 800BCB58 48000010 b +0x00000010 /* 800BC9F8 */
|
||||
|
||||
Bulclaw HP Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80091528 4800024D 80091814 4800024D 8009198C 4800024D 8009193C 4800024D 800917B4 4800024D 800917B4 4800024D 8009194C 4800024D 80091914 4800024D bl +0x0000024C /* 80091A00 */
|
||||
8009152C B3C3032C 80091818 B3C3032C 80091990 B3C3032C 80091940 B3C3032C 800917B8 B3C3032C 800917B8 B3C3032C 80091950 B3C3032C 80091918 B3C3032C sth [r3 + 0x032C], r30
|
||||
|
||||
Control Tower: Delbiter Death SFX Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80301600 48000020 803025CC 48000020 80303A1C 48000020 803037D0 48000020 80301F58 48000020 80301F9C 48000020 8030398C 48000020 80302D64 48000020 b +0x00000020 /* 80301F78 */
|
||||
80301604 3863A830 803025D0 3863A830 80303A20 3863A830 803037D4 3863A830 80301F5C 3863A830 80301FA0 3863A830 80303990 3863A830 80302D68 3863A830 subi r3, r3, 0x57D0
|
||||
80301608 800DB98C 803025D4 800DB994 80303A24 800DB9B4 803037D8 800DB9B4 80301F60 800DB9A4 80301FA4 800DB9A4 80303994 800DB9C4 80302D6C 800DBA04 lwz r0, [r13 - 0x465C]
|
||||
@@ -344,7 +344,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Weapon Attributes Patch (allows attributes to work on minibosses and Olga Flow)
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000C8C0 7000000F 8000C8C0 7000000F 8000C8C0 7000000F 8000C8C0 7000000F 8000C8C0 7000000F 8000C8C0 7000000F 8000C8C0 7000000F 8000C8C0 7000000F andi. r0, r0, 0x000F
|
||||
8000C8C4 7000004F 8000C8C4 7000004F 8000C8C4 7000004F 8000C8C4 7000004F 8000C8C4 7000004F 8000C8C4 7000004F 8000C8C4 7000004F 8000C8C4 7000004F andi. r0, r0, 0x004F
|
||||
8000C8C8 2C000004 8000C8C8 2C000004 8000C8C8 2C000004 8000C8C8 2C000004 8000C8C8 2C000004 8000C8C8 2C000004 8000C8C8 2C000004 8000C8C8 2C000004 cmpwi r0, 4
|
||||
@@ -354,34 +354,34 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Ruins Laser Fence SFX Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80166324 3C604005 801666D8 3C604005 80166848 3C604005 8016679C 3C604005 801666E0 3C604005 801666E0 3C604005 80166800 3C604005 80166CC4 3C604005 lis r3, 0x4005
|
||||
80166328 4800009C 801666DC 4800009C 8016684C 4800009C 801667A0 4800009C 801666E4 4800009C 801666E4 4800009C 80166804 4800009C 80166CC8 4800009C b +0x0000009C /* 80166780 */
|
||||
801663C0 4800001C 80166774 4800001C 801668E4 4800001C 80166838 4800001C 8016677C 4800001C 8016677C 4800001C 8016689C 4800001C 80166D60 4800001C b +0x0000001C /* 80166798 */
|
||||
|
||||
SFX Cancellation Distance Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
805CB608 46AFC800 805D5C08 46AFC800 805DD0A8 46AFC800 805DCE48 46AFC800 805CBF10 46AFC800 805D2F30 46AFC800 805DC750 46AFC800 805D8990 46AFC800 .invalid sc
|
||||
805CB8A8 43480000 805D5EA8 43480000 805DD348 43480000 805DD0E8 43480000 805CC1B0 43480000 805D31D0 43480000 805DC9F0 43480000 805D8C30 43480000 bc 26, 8, +0x00000000 /* 805CC1B0 */
|
||||
|
||||
Foie SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8022E2A8 3880FF00 8022EC44 3880FF00 8022FB30 3880FF00 8022F8E4 3880FF00 8022EB64 3880FF00 8022EB64 3880FF00 8022FC18 3880FF00 8022F4B0 3880FF00 li r4, 0xFFFFFF00
|
||||
8022E2D8 3880FE80 8022EC74 3880FE80 8022FB60 3880FE80 8022F914 3880FE80 8022EB94 3880FE80 8022EB94 3880FE80 8022FC48 3880FE80 8022F4E0 3880FE80 li r4, 0xFFFFFE80
|
||||
8022E308 3880FDB0 8022ECA4 3880FDB0 8022FB90 3880FDB0 8022F944 3880FDB0 8022EBC4 3880FDB0 8022EBC4 3880FDB0 8022FC78 3880FDB0 8022F510 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Gifoie SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
802300B8 3880FF00 80230A54 3880FF00 80231940 3880FF00 802316F4 3880FF00 80230974 3880FF00 80230974 3880FF00 80231A28 3880FF00 802312C0 3880FF00 li r4, 0xFFFFFF00
|
||||
802300E8 3880FE80 80230A84 3880FE80 80231970 3880FE80 80231724 3880FE80 802309A4 3880FE80 802309A4 3880FE80 80231A58 3880FE80 802312F0 3880FE80 li r4, 0xFFFFFE80
|
||||
80230118 3880FDB0 80230AB4 3880FDB0 802319A0 3880FDB0 80231754 3880FDB0 802309D4 3880FDB0 802309D4 3880FDB0 80231A88 3880FDB0 80231320 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Rafoie SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
802365AC 3880FF00 80236F68 3880FF00 80237E54 3880FF00 80237C08 3880FF00 80236E88 3880FF00 80236E88 3880FF00 80237F3C 3880FF00 802377D4 3880FF00 li r4, 0xFFFFFF00
|
||||
802365DC 3880FE80 80236F98 3880FE80 80237E84 3880FE80 80237C38 3880FE80 80236EB8 3880FE80 80236EB8 3880FE80 80237F6C 3880FE80 80237804 3880FE80 li r4, 0xFFFFFE80
|
||||
8023660C 3880FDB0 80236FC8 3880FDB0 80237EB4 3880FDB0 80237C68 3880FDB0 80236EE8 3880FDB0 80236EE8 3880FDB0 80237F9C 3880FDB0 80237834 3880FDB0 li r4, 0xFFFFFDB0
|
||||
@@ -391,79 +391,79 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Barta SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80229B54 3880FF00 8022A4F0 3880FF00 8022B3E0 3880FF00 8022B190 3880FF00 8022A410 3880FF00 8022A410 3880FF00 8022B4C4 3880FF00 8022AD5C 3880FF00 li r4, 0xFFFFFF00
|
||||
80229B84 3880FE80 8022A520 3880FE80 8022B410 3880FE80 8022B1C0 3880FE80 8022A440 3880FE80 8022A440 3880FE80 8022B4F4 3880FE80 8022AD8C 3880FE80 li r4, 0xFFFFFE80
|
||||
80229BB4 3880FDB0 8022A550 3880FDB0 8022B440 3880FDB0 8022B1F0 3880FDB0 8022A470 3880FDB0 8022A470 3880FDB0 8022B524 3880FDB0 8022ADBC 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Gibarta SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8022EAB4 3880FF00 8022F450 3880FF00 80230340 3880FF00 802300F0 3880FF00 8022F370 3880FF00 8022F370 3880FF00 80230424 3880FF00 8022FCBC 3880FF00 li r4, 0xFFFFFF00
|
||||
8022EAE4 3880FE80 8022F480 3880FE80 80230370 3880FE80 80230120 3880FE80 8022F3A0 3880FE80 8022F3A0 3880FE80 80230454 3880FE80 8022FCEC 3880FE80 li r4, 0xFFFFFE80
|
||||
8022EB14 3880FDB0 8022F4B0 3880FDB0 802303A0 3880FDB0 80230150 3880FDB0 8022F3D0 3880FDB0 8022F3D0 3880FDB0 80230484 3880FDB0 8022FD1C 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Rabarta SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80235DD4 3880FF00 80236790 3880FF00 8023767C 3880FF00 80237430 3880FF00 802366B0 3880FF00 802366B0 3880FF00 80237764 3880FF00 80236FFC 3880FF00 li r4, 0xFFFFFF00
|
||||
80235E10 3880FE80 802367CC 3880FE80 802376B8 3880FE80 8023746C 3880FE80 802366EC 3880FE80 802366EC 3880FE80 802377A0 3880FE80 80237038 3880FE80 li r4, 0xFFFFFE80
|
||||
80235E4C 3880FDB0 80236808 3880FDB0 802376F4 3880FDB0 802374A8 3880FDB0 80236728 3880FDB0 80236728 3880FDB0 802377DC 3880FDB0 80237074 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Zonde SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8023B2C8 3880FF00 8023BC84 3880FF00 8023CB70 3880FF00 8023C924 3880FF00 8023BBA4 3880FF00 8023BBA4 3880FF00 8023CC58 3880FF00 8023C4F0 3880FF00 li r4, 0xFFFFFF00
|
||||
8023B2F8 3880FE80 8023BCB4 3880FE80 8023CBA0 3880FE80 8023C954 3880FE80 8023BBD4 3880FE80 8023BBD4 3880FE80 8023CC88 3880FE80 8023C520 3880FE80 li r4, 0xFFFFFE80
|
||||
8023B328 3880FDB0 8023BCE4 3880FDB0 8023CBD0 3880FDB0 8023C984 3880FDB0 8023BC04 3880FDB0 8023BC04 3880FDB0 8023CCB8 3880FDB0 8023C550 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Gizonde SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80230E08 3880FF00 802317C4 3880FF00 802326B0 3880FF00 80232464 3880FF00 802316E4 3880FF00 802316E4 3880FF00 80232798 3880FF00 80232030 3880FF00 li r4, 0xFFFFFF00
|
||||
80230E38 3880FE80 802317F4 3880FE80 802326E0 3880FE80 80232494 3880FE80 80231714 3880FE80 80231714 3880FE80 802327C8 3880FE80 80232060 3880FE80 li r4, 0xFFFFFE80
|
||||
80230E68 3880FDB0 80231824 3880FDB0 80232710 3880FDB0 802324C4 3880FDB0 80231744 3880FDB0 80231744 3880FDB0 802327F8 3880FDB0 80232090 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Razonde SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80237998 3880FF00 80238354 3880FF00 80239240 3880FF00 80238FF4 3880FF00 80238274 3880FF00 80238274 3880FF00 80239328 3880FF00 80238BC0 3880FF00 li r4, 0xFFFFFF00
|
||||
802379C8 3880FE80 80238384 3880FE80 80239270 3880FE80 80239024 3880FE80 802382A4 3880FE80 802382A4 3880FE80 80239358 3880FE80 80238BF0 3880FE80 li r4, 0xFFFFFE80
|
||||
802379F8 3880FDB0 802383B4 3880FDB0 802392A0 3880FDB0 80239054 3880FDB0 802382D4 3880FDB0 802382D4 3880FDB0 80239388 3880FDB0 80238C20 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Grants SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
802316FC 3880FF00 802320B8 3880FF00 80232FA4 3880FF00 80232D58 3880FF00 80231FD8 3880FF00 80231FD8 3880FF00 8023308C 3880FF00 80232924 3880FF00 li r4, 0xFFFFFF00
|
||||
80231734 3880FE80 802320F0 3880FE80 80232FDC 3880FE80 80232D90 3880FE80 80232010 3880FE80 80232010 3880FE80 802330C4 3880FE80 8023295C 3880FE80 li r4, 0xFFFFFE80
|
||||
8023176C 3880FDB0 80232128 3880FDB0 80233014 3880FDB0 80232DC8 3880FDB0 80232048 3880FDB0 80232048 3880FDB0 802330FC 3880FDB0 80232994 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Megid SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
802337A8 3880FF00 80234164 3880FF00 80235050 3880FF00 80234E04 3880FF00 80234084 3880FF00 80234084 3880FF00 80235138 3880FF00 802349D0 3880FF00 li r4, 0xFFFFFF00
|
||||
802337D8 3880FE80 80234194 3880FE80 80235080 3880FE80 80234E34 3880FE80 802340B4 3880FE80 802340B4 3880FE80 80235168 3880FE80 80234A00 3880FE80 li r4, 0xFFFFFE80
|
||||
80233808 3880FDB0 802341C4 3880FDB0 802350B0 3880FDB0 80234E64 3880FDB0 802340E4 3880FDB0 802340E4 3880FDB0 80235198 3880FDB0 80234A30 3880FDB0 li r4, 0xFFFFFDB0
|
||||
|
||||
Anti SFX Pitch Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80229354 2C000001 80229CF0 2C000001 8022ABDC 2C000001 8022A990 2C000001 80229C10 2C000001 80229C10 2C000001 8022ACC4 2C000001 8022A55C 2C000001 cmpwi r0, 1
|
||||
|
||||
Shield DFP/EVP Bug Fix (allows shields to reach true max DFP/EVP values)
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
801185B0 88040016 801187CC 88040016 8011885C 88040016 80118764 88040016 80118854 88040016 80118854 88040016 80118774 88040016 8011894C 88040016 lbz r0, [r4 + 0x0016]
|
||||
801185BC 88040017 801187D8 88040017 80118868 88040017 80118770 88040017 80118860 88040017 80118860 88040017 80118780 88040017 80118958 88040017 lbz r0, [r4 + 0x0017]
|
||||
|
||||
VR Spaceship Item Drop Bug Fix (allows items to drop from enemies above a certain Y position)
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
805C996C 435C0000 805D3F6C 435C0000 805DB40C 435C0000 805DB1AC 435C0000 805CA274 435C0000 805D1294 435C0000 805DAAB4 435C0000 805D6CF4 435C0000 bc 26, 28, +0x00000000 /* 805CA274 */
|
||||
|
||||
Invalid Items Bug Fix (something to do with making invalid items correctly display as ???? I think)
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8011CA90 7C030378 8011CCD4 7C030378 8011CD0C 7C030378 8011CC6C 7C030378 8011CD34 7C030378 8011CD34 7C030378 8011CC7C 7C030378 8011CE54 7C030378 mr r3, r0
|
||||
8011CA94 3863FFFF 8011CCD8 3863FFFF 8011CD10 3863FFFF 8011CC70 3863FFFF 8011CD38 3863FFFF 8011CD38 3863FFFF 8011CC80 3863FFFF 8011CE58 3863FFFF subi r3, r3, 0x0001
|
||||
8011CA98 4BFFFFE8 8011CCDC 4BFFFFE8 8011CD14 4BFFFFE8 8011CC74 4BFFFFE8 8011CD3C 4BFFFFE8 8011CD3C 4BFFFFE8 8011CC84 4BFFFFE8 8011CE5C 4BFFFFE8 b -0x00000018 /* 8011CD24 */
|
||||
@@ -476,7 +476,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Item Removal Maxed Stats Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000B088 7FA3EB78 8000B088 7FA3EB78 8000B088 7FA3EB78 8000B088 7FA3EB78 8000B088 7FA3EB78 8000B088 7FA3EB78 8000B088 7FA3EB78 8000B088 7FA3EB78 mr r3, r29
|
||||
8000B08C 38800000 8000B08C 38800000 8000B08C 38800000 8000B08C 38800000 8000B08C 38800000 8000B08C 38800000 8000B08C 38800000 8000B08C 38800000 li r4, 0x0000
|
||||
8000B090 481AE725 8000B090 481AEB91 8000B090 481B1C09 8000B090 481AEC5D 8000B090 481AEB11 8000B090 481AEB11 8000B090 481AECC1 8000B090 481AF17D bl +0x001AEB10 /* 801B9BA0 */
|
||||
@@ -537,7 +537,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Unit Present Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000C640 54800673 8000C640 54800673 8000C640 54800673 8000C640 54800673 8000C640 54800673 8000C640 54800673 8000C640 54800673 8000C640 54800673 rlwinm. r0, r4, 0, 25, 25
|
||||
8000C644 41820008 8000C644 41820008 8000C644 41820008 8000C644 41820008 8000C644 41820008 8000C644 41820008 8000C644 41820008 8000C644 41820008 beq +0x00000008 /* 8000C64C */
|
||||
8000C648 38800000 8000C648 38800000 8000C648 38800000 8000C648 38800000 8000C648 38800000 8000C648 38800000 8000C648 38800000 8000C648 38800000 li r4, 0x0000
|
||||
@@ -547,7 +547,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Bank Item Stacking Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000C6D0 38000001 8000C6D0 38000001 8000C6D0 38000001 8000C6D0 38000001 8000C6D0 38000001 8000C6D0 38000001 8000C6D0 38000001 8000C6D0 38000001 li r0, 0x0001
|
||||
8000C6D4 901D0054 8000C6D4 901D0054 8000C6D4 901D0054 8000C6D4 901D0054 8000C6D4 901D0054 8000C6D4 901D0054 8000C6D4 901D0054 8000C6D4 901D0054 stw [r29 + 0x0054], r0
|
||||
8000C6D8 807D0024 8000C6D8 807D0024 8000C6D8 807D0024 8000C6D8 807D0024 8000C6D8 807D0024 8000C6D8 807D0024 8000C6D8 807D0024 8000C6D8 807D0024 lwz r3, [r29 + 0x0024]
|
||||
@@ -561,28 +561,28 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Dropped Mag Colour Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80114378 38000012 8011458C 38000012 80114634 38000012 80114524 38000012 8011461C 38000012 8011461C 38000012 80114534 38000012 8011470C 38000012 li r0, 0x0012
|
||||
|
||||
Meseta Drop System Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80107478 4800000C 80107654 4800000C 80107708 4800000C 801075D4 4800000C 8010771C 4800000C 8010771C 4800000C 801075E4 4800000C 801077D4 4800000C b +0x0000000C /* 80107728 */
|
||||
8010748C 7C030378 80107668 7C030378 8010771C 7C030378 801075E8 7C030378 80107730 7C030378 80107730 7C030378 801075F8 7C030378 801077E8 7C030378 mr r3, r0
|
||||
|
||||
Present Colour Bug Fix (TODO: which versions need this?)
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80101C14 60000000 60000000 60000000 60000000 80101EB8 60000000 80101EB8 60000000 60000000 60000000 nop
|
||||
|
||||
Offline Quests Drop Table Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80104B48 4182000C 80104D24 4182000C 80104DE0 4182000C 80104CA4 4182000C 80104DEC 4182000C 80104DEC 4182000C 80104CB4 4182000C 80104EA4 4182000C beq +0x0000000C /* 80104DF8 */
|
||||
|
||||
Mag Revival Priority Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000C8A0 1C00000A 8000C8A0 1C00000A 8000C8A0 1C00000A 8000C8A0 1C00000A 8000C8A0 1C00000A 8000C8A0 1C00000A 8000C8A0 1C00000A 8000C8A0 1C00000A mulli r0, r0, 10
|
||||
8000C8A4 57E407BD 8000C8A4 57E407BD 8000C8A4 57E407BD 8000C8A4 57E407BD 8000C8A4 57E407BD 8000C8A4 57E407BD 8000C8A4 57E407BD 8000C8A4 57E407BD rlwinm. r4, r31, 0, 30, 30
|
||||
8000C8A8 41820008 8000C8A8 41820008 8000C8A8 41820008 8000C8A8 41820008 8000C8A8 41820008 8000C8A8 41820008 8000C8A8 41820008 8000C8A8 41820008 beq +0x00000008 /* 8000C8B0 */
|
||||
@@ -592,22 +592,22 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Mag Revival Challenge & Quest Mode Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
801CA1F4 48000010 801CA6E0 48000010 801CB5EC 48000010 801CA7AC 48000010 801CA610 48000010 801CA610 48000010 801CA810 48000010 801CACCC 48000010 b +0x00000010 /* 801CA620 */
|
||||
|
||||
Chat Bubble Window TAB Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80250264 60000000 80250CB0 60000000 80251CA4 60000000 802519A4 60000000 80250AEC 60000000 80250AEC 60000000 80251C68 60000000 802514B0 60000000 nop
|
||||
|
||||
Chat Log Window LF/Tab Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80267DDC 60000000 80268A88 60000000 80269AE4 60000000 80269898 60000000 80268788 60000000 80268788 60000000 80269B5C 60000000 802693A4 60000000 nop
|
||||
|
||||
Dark/Hell Special GFX Bug Fix (makes Dark/Hell display graphic on success like in PSO BB)
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000E1E0 7FC802A6 8000E1E0 7FC802A6 8000E1E0 7FC802A6 8000E1E0 7FC802A6 8000E1E0 7FC802A6 8000E1E0 7FC802A6 8000E1E0 7FC802A6 8000E1E0 7FC802A6 mflr r30
|
||||
8000E1E4 38A00000 8000E1E4 38A00000 8000E1E4 38A00000 8000E1E4 38A00000 8000E1E4 38A00000 8000E1E4 38A00000 8000E1E4 38A00000 8000E1E4 38A00000 li r5, 0x0000
|
||||
8000E1E8 38C0001E 8000E1E8 38C0001E 8000E1E8 38C0001E 8000E1E8 38C0001E 8000E1E8 38C0001E 8000E1E8 38C0001E 8000E1E8 38C0001E 8000E1E8 38C0001E li r6, 0x001E
|
||||
@@ -622,18 +622,18 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Gol Dragon Camera Bug Fix (makes the camera after Gol Dragon display "normally")
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
802FB99C 2C030001 802FC968 2C030001 802FDE60 2C030001 802FDB6C 2C030001 802FC2F4 2C030001 802FC338 2C030001 802FDD28 2C030001 802FD100 2C030001 cmpwi r3, 1
|
||||
|
||||
Box/Fence Fadeout Bug Fix (stops boxes and other environmental objects fading in and out as you approach)
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80189A54 60000000 80189E2C 60000000 80189F90 60000000 80189EF0 60000000 80189E20 60000000 80189E20 60000000 80189F54 60000000 8018A418 60000000 nop
|
||||
801933DC 60000000 801937B0 60000000 80193914 60000000 80193874 60000000 801937A8 60000000 801937A8 60000000 801938D8 60000000 80193D9C 60000000 nop
|
||||
|
||||
TP Bar Colour Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8026DA74 3884AAFA 8026E738 3884AAFA 8026F794 3884AAFA 8026F548 3884AAFA 8026E2D4 3884AAFA 8026E2D4 3884AAFA 8026F6FC 3884AAFA 8026EF44 3884AAFA subi r4, r4, 0x5506
|
||||
8026DB88 3863AAFA 8026E84C 3863AAFA 8026F8A8 3863AAFA 8026F65C 3863AAFA 8026E3E8 3863AAFA 8026E3E8 3863AAFA 8026F810 3863AAFA 8026F058 3863AAFA subi r3, r3, 0x5506
|
||||
8026DC10 3883AAFA 8026E8D4 3883AAFA 8026F930 3883AAFA 8026F6E4 3883AAFA 8026E470 3883AAFA 8026E470 3883AAFA 8026F898 3883AAFA 8026F0E0 3883AAFA subi r4, r3, 0x5506
|
||||
@@ -641,12 +641,12 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Devil's and Demon's Special Damage Display Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8001306C 4BFFFCC0 8001309C 4BFFFCC0 80013364 4BFFFCC0 8001304C 4BFFFCC0 80013084 4BFFFCC0 80013084 4BFFFCC0 8001304C 4BFFFCC0 800130C4 4BFFFCC0 b -0x00000340 /* 80012D44 */
|
||||
|
||||
Christmas Trees Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000B5C8 80630098 8000B5C8 80630098 8000B5C8 80630098 8000B5C8 80630098 8000B5C8 80630098 8000B5C8 80630098 8000B5C8 80630098 8000B5C8 80630098 lwz r3, [r3 + 0x0098]
|
||||
8000B5CC 483D46F5 8000B5CC 483D70D1 8000B5CC 483D8F71 8000B5CC 483D8D21 8000B5CC 483D5999 8000B5CC 483D59F1 8000B5CC 483D90F1 8000B5CC 483D7BE1 bl +0x003D5998 /* 803E0F64 */
|
||||
8000B5D0 807F042C 8000B5D0 807F042C 8000B5D0 807F042C 8000B5D0 807F042C 8000B5D0 807F042C 8000B5D0 807F042C 8000B5D0 807F042C 8000B5D0 807F042C lwz r3, [r31 + 0x042C]
|
||||
@@ -657,25 +657,25 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Rain Drops Colour Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
804B3738 70808080 804B6E58 70808080 804B92F8 70808080 804B90B8 70808080 804B3EF0 70808080 804B43D0 70808080 804B8990 70808080 804B8E10 70808080 andi. r0, r4, 0x8080
|
||||
804B373C 60707070 804B6E5C 60707070 804B92FC 60707070 804B90BC 60707070 804B3EF4 60707070 804B43D4 60707070 804B8994 60707070 804B8E14 60707070 ori r16, r3, 0x7070
|
||||
|
||||
Reverser Target Lock Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
801C5EA4 389F02FC 801C6360 389F02FC 801C6604 389F02FC 801C642C 389F02FC 801C62C0 389F02FC 801C62C0 389F02FC 801C6490 389F02FC 801C694C 389F02FC addi r4, r31, 0x02FC
|
||||
|
||||
Deband/Shifta/Resta Target Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8022CF84 41810630 8022D920 41810630 8022E85C 41810630 8022E5C0 41810630 8022D840 41810630 8022D840 41810630 8022E8F4 41810630 8022E18C 41810630 bgt +0x00000630 /* 8022DE70 */
|
||||
8022D278 4181033C 4181033C 4181033C 4181033C 8022DB34 4181033C 8022DB34 4181033C 4181033C 4181033C bgt +0x0000033C /* 8022DE70 */
|
||||
8022D36C 41810248 41810248 41810248 41810248 8022DC28 41810248 8022DC28 41810248 41810248 41810248 bgt +0x00000248 /* 8022DE70 */
|
||||
|
||||
Tech Auto Targetting Bug Fix
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8022C850 60000000 8022D1EC 60000000 8022E128 60000000 8022DE8C 60000000 8022D10C 60000000 8022D10C 60000000 8022E1C0 60000000 8022DA58 60000000 nop
|
||||
804C6EE4 0000001E 804CA61C 0000001E 804CCB6C 0000001E 804CC90C 0000001E 804C76B4 0000001E 804C7B94 0000001E 804CC1E4 0000001E 804CC5D4 0000001E .invalid
|
||||
804C6F3C 00000028 804CA674 00000028 804CCBC4 00000028 804CC964 00000028 804C770C 00000028 804C7BEC 00000028 804CC23C 00000028 804CC62C 00000028 .invalid
|
||||
@@ -686,7 +686,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Enable Trap Animations
|
||||
BugFixes
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000BBD0 809F0370 8000BBD0 809F0370 8000BBD0 809F0370 8000BBD0 809F0370 8000BBD0 809F0370 8000BBD0 809F0370 8000BBD0 809F0370 8000BBD0 809F0370 lwz r4, [r31 + 0x0370]
|
||||
8000BBD4 3884FC00 8000BBD4 3884FC00 8000BBD4 3884FC00 8000BBD4 3884FC00 8000BBD4 3884FC00 8000BBD4 3884FC00 8000BBD4 3884FC00 8000BBD4 3884FC00 subi r4, r4, 0x0400
|
||||
8000BBD8 909F0370 8000BBD8 909F0370 8000BBD8 909F0370 8000BBD8 909F0370 8000BBD8 909F0370 8000BBD8 909F0370 8000BBD8 909F0370 8000BBD8 909F0370 stw [r31 + 0x0370], r4
|
||||
@@ -702,12 +702,12 @@ Extended Word Select
|
||||
ChatFeatures
|
||||
*** name=Chat
|
||||
*** desc=Enable extended\nWord Select and\nstop the Log Window\nfrom scrolling by\nholding L+R
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8034445C 38600000 803457AC 38600000 80346CCC 38600000 80346A80 38600000 8034525C 38600000 803452A0 38600000 80346E4C 38600000 8034627C 38600000 li r3, 0x0000
|
||||
|
||||
Chat Log Window: Lock Scrolling with L+R
|
||||
ChatFeatures
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000D6A0 3C608051 8000D6A0 3C608051 8000D6A0 3C608051 8000D6A0 3C608051 8000D6A0 3C608051 8000D6A0 3C608051 8000D6A0 3C608051 8000D6A0 3C608051 lis r3, 0x8051
|
||||
8000D6A4 A0638AD0 8000D6A4 A063C590 8000D6A4 A063EBD0 8000D6A4 A063E970 8000D6A4 A06393B0 8000D6A4 A0639890 8000D6A4 A063E270 8000D6A4 A063F290 lhz r3, [r3 - 0x6C50]
|
||||
8000D6A8 70600003 8000D6A8 70600003 8000D6A8 70600003 8000D6A8 70600003 8000D6A8 70600003 8000D6A8 70600003 8000D6A8 70600003 8000D6A8 70600003 andi. r0, r3, 0x0003
|
||||
@@ -718,10 +718,10 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
80267EC8 4BDA57D8 80268B74 4BDA4B2C 80269BD0 4BDA3AD0 80269984 4BDA3D1C 80268874 4BDA4E2C 80268874 4BDA4E2C 80269C48 4BDA3A58 80269490 4BDA4210 b -0x0025B1D4 /* 8000D6A0 */
|
||||
|
||||
Improved Draw Distance of most objects
|
||||
DrawDistance
|
||||
*** name=DrawDistance
|
||||
Draw Distance
|
||||
*** name=Draw Distance
|
||||
*** desc=Extend the draw\ndistance of many\nobjects
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000DFA0 C3C2C1F8 8000DFA0 C3C2C1F8 8000DFA0 C3C2C1F8 8000DFA0 C3C2C1F8 8000DFA0 C3C2C200 8000DFA0 C3C2C200 8000DFA0 C3C2C200 8000DFA0 C3C2C200 lfs f30, [r2 - 0x3E00]
|
||||
8000DFA4 EFDE0072 8000DFA4 EFDE0072 8000DFA4 EFDE0072 8000DFA4 EFDE0072 8000DFA4 EFDE0072 8000DFA4 EFDE0072 8000DFA4 EFDE0072 8000DFA4 EFDE0072 fmuls f30, f30, f1
|
||||
8000DFA8 4E800020 8000DFA8 4E800020 8000DFA8 4E800020 8000DFA8 4E800020 8000DFA8 4E800020 8000DFA8 4E800020 8000DFA8 4E800020 8000DFA8 4E800020 blr
|
||||
@@ -739,7 +739,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
8000DFD8 3C60804C 8000DFD8 3C60804C 8000DFD8 3C60804D 8000DFD8 3C60804D 8000DFD8 3C60804C 8000DFD8 3C60804C 8000DFD8 3C60804D 8000DFD8 3C60804D lis r3, 0x804C
|
||||
8000DFDC 4E800020 8000DFDC 4E800020 8000DFDC 4E800020 8000DFDC 4E800020 8000DFDC 4E800020 8000DFDC 4E800020 8000DFDC 4E800020 8000DFDC 4E800020 blr
|
||||
801008E8 4BF0D6B9 80100AD0 4BF0D4D1 80100B74 4BF0D42D 80100A50 4BF0D551 80100B8C 4BF0D415 80100B8C 4BF0D415 80100A60 4BF0D541 80100C50 4BF0D351 bl -0x000F2BEC /* 8000DFA0 */
|
||||
80156D00 4BEB72AD 801570B4 4BEB6EF9 80157218 4BEB6D95 80157178 4BEB6E35 801570BC 4BEB6EF1 801570BC 4BEB6EF1 801571DC 4BEB6DD1 801576A0 4BEB690D bl -0x00149110 /* 8000DFAC */
|
||||
8015671C 4BEB7891 80156AD0 4BEB74DD 80156C34 4BEB7379 80156B94 4BEB7419 80156AD8 4BEB74D5 80156AD8 4BEB74D5 80156BF8 4BEB73B5 801570BC 4BEB6EF1 bl -0x00148C4C /* 8000DFAC */
|
||||
801A1C64 4BE6C359 801A203C 4BE6BF81 801A21A0 4BE6BE1D 801A2100 4BE6BEBD 801A2040 4BE6BF7D 801A2040 4BE6BF7D 801A2164 4BE6BE59 801A2628 4BE6B995 bl -0x00194084 /* 8000DFBC */
|
||||
801A1E64 4BE6C13D 801A223C 4BE6BD65 801A23A0 4BE6BC01 801A2300 4BE6BCA1 801A2240 4BE6BD61 801A2240 4BE6BD61 801A2364 4BE6BC3D 801A2828 4BE6B779 bl -0x001942A0 /* 8000DFA0 */
|
||||
80205044 4BE08F85 802058B8 4BE08711 80206640 4BE07989 802063F4 4BE07BD5 80205840 4BE08789 80205840 4BE08789 80206728 4BE078A1 80206124 4BE07EA5 bl -0x001F7878 /* 8000DFC8 */
|
||||
@@ -754,21 +754,51 @@ Show Enemy HP Bars
|
||||
EnemyHPBars
|
||||
*** name=Enemy HP bars
|
||||
*** desc=Show HP bars in\nenemy info windows
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US12)
|
||||
802612C4 4BFE1541 80261E9C 4BFE1349 80262EE4 4BFE0665 80262C98 4BFE1241 80261B9C 4BFE1545 80261B9C 4BFE1545 80262F5C 4BFE12B1 802627A4 4BFE12B1 bl -0x0001EABC /* 802430E0 */
|
||||
804CAF00 42300000 804CE650 42300000 804D0BA0 42300000 804D0940 42300000 804CB6D0 42300000 804CBBB0 42300000 804D0218 42300000 804D0608 42300000 bdnz cr4, +0x00000000 /* 804CB6D0 */
|
||||
804CAF1C FF00FF15 804CE66C FF00FF15 804D0BBC FF00FF15 804D095C FF00FF15 804CB6EC FF00FF15 804CBBCC FF00FF15 804D0234 FF00FF15 804D0624 FF00FF15 .invalid FC, 0
|
||||
805CBFBC 42A00000 805D65BC 42A00000 805DDA5C 42A00000 805DD7FC 42A00000 805CC8C4 42A00000 805D38E4 42A00000 805DD104 42A00000 805D9344 42A00000 b +0x00000000 /* 805CC8C4 */
|
||||
804CAE40 42640000 804CE590 42640000 804D0AE0 42640000 804D0880 42640000 804CB610 42640000 804CBAF0 42640000 804D0158 42640000 804D0548 42640000 bc 19, 4, +0x00000000 /* 804CB610 */
|
||||
804CAE4C 42640000 804CE59C 42640000 804D0AEC 42640000 804D088C 42640000 804CB61C 42640000 804CBAFC 42640000 804D0164 42640000 804D0554 42640000 bc 19, 4, +0x00000000 /* 804CB61C */
|
||||
804CAE58 42640000 804CE5A8 42640000 804D0AF8 42640000 804D0898 42640000 804CB628 42640000 804CBB08 42640000 804D0170 42640000 804D0560 42640000 bc 19, 4, +0x00000000 /* 804CB628 */
|
||||
804CAE64 42640000 804CE5B4 42640000 804D0B04 42640000 804D08A4 42640000 804CB634 42640000 804CBB14 42640000 804D017C 42640000 804D056C 42640000 bc 19, 4, +0x00000000 /* 804CB634 */
|
||||
804CAF00 42780000 804CE650 42780000 804D0BA0 42780000 804D0940 42780000 804CB6D0 42780000 804CBBB0 42780000 804D0218 42780000 804D0608 42780000
|
||||
804CAF1C FF00FF15 804CE66C FF00FF15 804D0BBC FF00FF15 804D095C FF00FF15 804CB6EC FF00FF15 804CBBCC FF00FF15 804D0234 FF00FF15 804D0624 FF00FF15
|
||||
805CBFBC 42C00000 805D65BC 42C00000 805DDA5C 42C00000 805DD7FC 42C00000 805CC8C4 42C00000 805D38E4 42C00000 805DD104 42C00000 805D9344 42C00000
|
||||
804CAE40 42960000 804CE590 42960000 804D0AE0 42960000 804D0880 42960000 804CB610 42960000 804CBAF0 42960000 804D0158 42960000 804D0548 42960000
|
||||
804CAE4C 42960000 804CE59C 42960000 804D0AEC 42960000 804D088C 42960000 804CB61C 42960000 804CBAFC 42960000 804D0164 42960000 804D0554 42960000
|
||||
804CAE58 42960000 804CE5A8 42960000 804D0AF8 42960000 804D0898 42960000 804CB628 42960000 804CBB08 42960000 804D0170 42960000 804D0560 42960000
|
||||
804CAE64 42960000 804CE5B4 42960000 804D0B04 42960000 804D08A4 42960000 804CB634 42960000 804CBB14 42960000 804D017C 42960000 804D056C 42960000
|
||||
804CAE70 42960000 804CE5C0 42960000 804D0B10 42960000 804D08B0 42960000 804CB640 42960000 804CBB20 42960000 804D0188 42960000 804D0578 42960000
|
||||
80261260 4BDAA3F1 80261E38 4BDA9819 80262E80 4BDA87D1 80262C34 4BDA8A1D 80261B38 4BDA9B19 80261B38 4BDA9B19 80262EF8 4BDA8759 80262740 4BDA8F11 bl -0x002578A8 /* 8000B650 */
|
||||
80261420 4BDAA245 80261FF8 4BDA966D 80263040 4BDA8625 80262DF4 4BDA8871 80261CF8 4BDA996D 80261CF8 4BDA996D 802630B8 4BDA85AD 80262900 4BDA8D65 bl -0x00257A54 /* 8000B664 */
|
||||
8000B650 3CA08001 8000B650 3CA08001 8000B650 3CA08001 8000B650 3CA08001 8000B650 3CA08001 8000B650 3CA08001 8000B650 3CA08001 8000B650 3CA08001 lis r5, 0x8001
|
||||
8000B654 8065B6BC 8000B654 8065B6BC 8000B654 8065B6BC 8000B654 8065B6BC 8000B654 8065B6BC 8000B654 8065B6BC 8000B654 8065B6BC 8000B654 8065B6BC lwz r3, [r5 - 0x4944]
|
||||
8000B658 7FFEFB78 8000B658 7FFEFB78 8000B658 7FFEFB78 8000B658 7FFEFB78 8000B658 7FFEFB78 8000B658 7FFEFB78 8000B658 7FFEFB78 8000B658 7FFEFB78 mr r30, r31
|
||||
8000B65C A8DE032C 8000B65C A8DE032C 8000B65C A8DE032C 8000B65C A8DE032C 8000B65C A8DE032C 8000B65C A8DE032C 8000B65C A8DE032C 8000B65C A8DE032C lha r6, [r30 + 0x032C]
|
||||
8000B660 48000010 8000B660 48000010 8000B660 48000010 8000B660 48000010 8000B660 48000010 8000B660 48000010 8000B660 48000010 8000B660 48000010 b +0x00000010 /* 8000B670 */
|
||||
8000B664 A8DE02B8 8000B664 A8DE02B8 8000B664 A8DE02B8 8000B664 A8DE02B8 8000B664 A8DE02B8 8000B664 A8DE02B8 8000B664 A8DE02B8 8000B664 A8DE02B8 lha r6, [r30 + 0x02B8]
|
||||
8000B668 3CA08001 8000B668 3CA08001 8000B668 3CA08001 8000B668 3CA08001 8000B668 3CA08001 8000B668 3CA08001 8000B668 3CA08001 8000B668 3CA08001 lis r5, 0x8001
|
||||
8000B66C 9065B6BC 8000B66C 9065B6BC 8000B66C 9065B6BC 8000B66C 9065B6BC 8000B66C 9065B6BC 8000B66C 9065B6BC 8000B66C 9065B6BC 8000B66C 9065B6BC stw [r5 - 0x4944], r3
|
||||
8000B670 7C0802A6 8000B670 7C0802A6 8000B670 7C0802A6 8000B670 7C0802A6 8000B670 7C0802A6 8000B670 7C0802A6 8000B670 7C0802A6 8000B670 7C0802A6 mflr r0
|
||||
8000B674 9005B6C0 8000B674 9005B6C0 8000B674 9005B6C0 8000B674 9005B6C0 8000B674 9005B6C0 8000B674 9005B6C0 8000B674 9005B6C0 8000B674 9005B6C0 stw [r5 - 0x4940], r0
|
||||
8000B678 7C651B78 8000B678 7C651B78 8000B678 7C651B78 8000B678 7C651B78 8000B678 7C651B78 8000B678 7C651B78 8000B678 7C651B78 8000B678 7C651B78 mr r5, r3
|
||||
8000B67C A8FE02B8 8000B67C A8FE02B8 8000B67C A8FE02B8 8000B67C A8FE02B8 8000B67C A8FE02B8 8000B67C A8FE02B8 8000B67C A8FE02B8 8000B67C A8FE02B8 lha r7, [r30 + 0x02B8]
|
||||
8000B680 3C808000 8000B680 3C808000 8000B680 3C808000 8000B680 3C808000 8000B680 3C808000 8000B680 3C808000 8000B680 3C808000 8000B680 3C808000 lis r4, 0x8000
|
||||
8000B684 6084B6AC 8000B684 6084B6AC 8000B684 6084B6AC 8000B684 6084B6AC 8000B684 6084B6AC 8000B684 6084B6AC 8000B684 6084B6AC 8000B684 6084B6AC ori r4, r4, 0xB6AC
|
||||
8000B688 38640018 8000B688 38640018 8000B688 38640018 8000B688 38640018 8000B688 38640018 8000B688 38640018 8000B688 38640018 8000B688 38640018 addi r3, r4, 0x0018
|
||||
8000B68C 4CC63182 8000B68C 4CC63182 8000B68C 4CC63182 8000B68C 4CC63182 8000B68C 4CC63182 8000B68C 4CC63182 8000B68C 4CC63182 8000B68C 4CC63182 crxor crb6, crb6, crb6
|
||||
8000B690 4838A86D 8000B690 4838D275 8000B690 4838F115 8000B690 4838EEC5 8000B690 4838BB3D 8000B690 4838BB95 8000B690 4838F295 8000B690 4838DD85 bl sprintf /* 8039A924 */
|
||||
8000B694 3C808000 8000B694 3C808000 8000B694 3C808000 8000B694 3C808000 8000B694 3C808000 8000B694 3C808000 8000B694 3C808000 8000B694 3C808000 lis r4, 0x8000
|
||||
8000B698 6084B6C4 8000B698 6084B6C4 8000B698 6084B6C4 8000B698 6084B6C4 8000B698 6084B6C4 8000B698 6084B6C4 8000B698 6084B6C4 8000B698 6084B6C4 ori r4, r4, 0xB6C4
|
||||
8000B69C 7F83E378 8000B69C 7F83E378 8000B69C 7F83E378 8000B69C 7F83E378 8000B69C 7F83E378 8000B69C 7F83E378 8000B69C 7F83E378 8000B69C 7F83E378 mr r3, r28
|
||||
8000B6A0 8004FFFC 8000B6A0 8004FFFC 8000B6A0 8004FFFC 8000B6A0 8004FFFC 8000B6A0 8004FFFC 8000B6A0 8004FFFC 8000B6A0 8004FFFC 8000B6A0 8004FFFC lwz r0, [r4 - 0x0004]
|
||||
8000B6A4 7C0803A6 8000B6A4 7C0803A6 8000B6A4 7C0803A6 8000B6A4 7C0803A6 8000B6A4 7C0803A6 8000B6A4 7C0803A6 8000B6A4 7C0803A6 8000B6A4 7C0803A6 mtlr r0
|
||||
8000B6A8 4E800020 8000B6A8 4E800020 8000B6A8 4E800020 8000B6A8 4E800020 8000B6A8 4E800020 8000B6A8 4E800020 8000B6A8 4E800020 8000B6A8 4E800020 blr
|
||||
8000B6AC 25730A0A 8000B6AC 25730A0A 8000B6AC 25730A0A 8000B6AC 25730A0A 8000B6AC 25730A0A 8000B6AC 25730A0A 8000B6AC 25730A0A 8000B6AC 25730A0A .invalid
|
||||
8000B6B0 48503A25 8000B6B0 48503A25 8000B6B0 48503A25 8000B6B0 48503A25 8000B6B0 48503A25 8000B6B0 48503A25 8000B6B0 48503A25 8000B6B0 48503A25 bl +0x00503A24 /* 8050F0D4 */
|
||||
8000B6B4 642F2564 8000B6B4 642F2564 8000B6B4 642F2564 8000B6B4 642F2564 8000B6B4 642F2564 8000B6B4 642F2564 8000B6B4 642F2564 8000B6B4 642F2564 oris r15, r1, 0x2564
|
||||
8000B6B8 00000000 8000B6B8 00000000 8000B6B8 00000000 8000B6B8 00000000 8000B6B8 00000000 8000B6B8 00000000 8000B6B8 00000000 8000B6B8 00000000 .invalid
|
||||
|
||||
PSO DC Reticle Colours
|
||||
DCReticleColors
|
||||
*** name=DC targets
|
||||
*** desc=Change the target\nreticle colors to\nthose used on the\nDreamcast
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
802AB3FC 3C8000FF 802AC2A4 3C8000FF 802AD3D0 3C8000FF 802AD184 3C8000FF 802ABDB8 3C8000FF 802ABDFC 3C8000FF 802AD338 3C8000FF 802ACACC 3C8000FF lis r4, 0x00FF
|
||||
802AB410 388000FF 802AC2B8 388000FF 802AD3E4 388000FF 802AD198 388000FF 802ABDCC 388000FF 802ABE10 388000FF 802AD34C 388000FF 802ACAE0 388000FF li r4, 0x00FF
|
||||
802AB424 3884FF00 802AC2CC 3884FF00 802AD3F8 3884FF00 802AD1AC 3884FF00 802ABDE0 3884FF00 802ABE24 3884FF00 802AD360 3884FF00 802ACAF4 3884FF00 subi r4, r4, 0x0100
|
||||
@@ -789,7 +819,7 @@ PSOX / BB Reticle Colours
|
||||
PSOXReticleColors
|
||||
*** name=Xbox/BB targets
|
||||
*** desc=Change the target\nreticle colors to\nthose used on the\nXbox and Blue Burst
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
802AB424 388000FF 802AC2CC 388000FF 802AD3F8 388000FF 802AD1AC 388000FF 802ABDE0 388000FF 802ABE24 388000FF 802AD360 388000FF 802ACAF4 388000FF li r4, 0x00FF
|
||||
804A1F38 00000000 804A5658 00000000 804A7AF8 00000000 804A78B8 00000000 804A26E8 00000000 804A2BC8 00000000 804A7188 00000000 804A7608 00000000 .invalid
|
||||
804A1F3C 00000000 804A565C 00000000 804A7AFC 00000000 804A78BC 00000000 804A26EC 00000000 804A2BCC 00000000 804A718C 00000000 804A760C 00000000 .invalid
|
||||
@@ -799,7 +829,7 @@ Show Rare Items on Area & Radar Map
|
||||
RareDropNotifications
|
||||
*** name=Rare alerts
|
||||
*** desc=Show rare items on\nthe map and play a\nsound when a rare\nitem drops
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000C660 881F00EF 8000C660 881F00EF 8000C660 881F00EF 8000C660 881F00EF 8000C660 881F00EF 8000C660 881F00EF 8000C660 881F00EF 8000C660 881F00EF lbz r0, [r31 + 0x00EF]
|
||||
8000C664 28000004 8000C664 28000004 8000C664 28000004 8000C664 28000004 8000C664 28000004 8000C664 28000004 8000C664 28000004 8000C664 28000004 cmplwi r0, 4
|
||||
8000C668 40820018 8000C668 40820018 8000C668 40820018 8000C668 40820018 8000C668 40820018 8000C668 40820018 8000C668 40820018 8000C668 40820018 bne +0x00000018 /* 8000C680 */
|
||||
@@ -814,7 +844,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Rare Item Drops: Play SFX
|
||||
RareDropNotifications
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000C690 28030000 8000C690 28030000 8000C690 28030000 8000C690 28030000 8000C690 28030000 8000C690 28030000 8000C690 28030000 8000C690 28030000 cmplwi r3, 0
|
||||
8000C694 41820020 8000C694 41820020 8000C694 41820020 8000C694 41820020 8000C694 41820020 8000C694 41820020 8000C694 41820020 8000C694 41820020 beq +0x00000020 /* 8000C6B4 */
|
||||
8000C698 880300EF 8000C698 880300EF 8000C698 880300EF 8000C698 880300EF 8000C698 880300EF 8000C698 880300EF 8000C698 880300EF 8000C698 880300EF lbz r0, [r3 + 0x00EF]
|
||||
@@ -832,7 +862,7 @@ Play SFX for Hungry Mag
|
||||
HungryMagSound
|
||||
*** name=MAG alert
|
||||
*** desc=Play a sound when\nyour MAG is hungry
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000BF30 9421FFF0 8000BF30 9421FFF0 8000BF30 9421FFF0 8000BF30 9421FFF0 8000BF30 9421FFF0 8000BF30 9421FFF0 8000BF30 9421FFF0 8000BF30 9421FFF0 stwu [r1 - 0x0010], r1
|
||||
8000BF34 7C0802A6 8000BF34 7C0802A6 8000BF34 7C0802A6 8000BF34 7C0802A6 8000BF34 7C0802A6 8000BF34 7C0802A6 8000BF34 7C0802A6 8000BF34 7C0802A6 mflr r0
|
||||
8000BF38 90010014 8000BF38 90010014 8000BF38 90010014 8000BF38 90010014 8000BF38 90010014 8000BF38 90010014 8000BF38 90010014 8000BF38 90010014 stw [r1 + 0x0014], r0
|
||||
@@ -850,12 +880,12 @@ Invisible Mag
|
||||
InvisibleMag
|
||||
*** name=Invisible MAG
|
||||
*** desc=Make MAGs invisible
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80114F04 480000D4 80115118 480000D4 8011521C 480000D4 801150B0 480000D4 801151A8 480000D4 801151A8 480000D4 801150C0 480000D4 80115298 480000D4 b +0x000000D4 /* 8011527C */
|
||||
|
||||
16:9 Aspect Ratio
|
||||
169AspectRatioV1
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
80000088 C04210F0 80000088 C0421120 80000088 C0421130 80000088 C0421130 80000088 C0421108 80000088 C0421108 80000088 C0421138 80000088 C0421128 lfs f2, [r2 + 0x1108]
|
||||
8000008C EFBD00B2 8000008C EFBD00B2 8000008C EFBD00B2 8000008C EFBD00B2 8000008C EFBD00B2 8000008C EFBD00B2 8000008C EFBD00B2 8000008C EFBD00B2 fmuls f29, f29, f2
|
||||
80000090 FC40E890 80000090 FC40E890 80000090 FC40E890 80000090 FC40E890 80000090 FC40E890 80000090 FC40E890 80000090 FC40E890 80000090 FC40E890 fmr f2, f29
|
||||
@@ -864,7 +894,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
16:9 Aspect Ratio V2
|
||||
169AspectRatioV2
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000BE4C C01C0040 8000BE4C C01C0040 8000BE4C C01C0040 8000BE4C C01C0040 8000BE4C C01C0040 8000BE4C C01C0040 8000BE4C C01C0040 8000BE4C C01C0040 lfs f0, [r28 + 0x0040]
|
||||
8000BE50 C062F7C0 8000BE50 C062F7C8 8000BE50 C062F7C8 8000BE50 C062F7C8 8000BE50 C062F7D0 8000BE50 C062F7D0 8000BE50 C062F7D0 8000BE50 C062F7D0 lfs f3, [r2 - 0x0830]
|
||||
8000BE54 EC4100FA 8000BE54 EC4100FA 8000BE54 EC4100FA 8000BE54 EC4100FA 8000BE54 EC4100FA 8000BE54 EC4100FA 8000BE54 EC4100FA 8000BE54 EC4100FA fmadds f2, f1, f0, f3
|
||||
@@ -925,7 +955,7 @@ JP12------------- JP13------------- JP14------------- JP15------------- US10----
|
||||
|
||||
Water & Light Effects Aspect Ratio Fix (for use with a 16:9 code)
|
||||
169AmbientEffectsFix
|
||||
JP12------------- JP13------------- JP14------------- JP15------------- US10------------- US11------------- US12------------- EU--------------- DISASSEMBLY (US10)
|
||||
3OJ2------------- 3OJ3------------- 3OJ4------------- 3OJ5------------- 3OE0------------- 3OE1------------- 3OE2------------- 3OP0------------- DISASSEMBLY (US10)
|
||||
8000BDF0 C36210F0 8000BDF0 C3621120 8000BDF0 C3621130 8000BDF0 C3621130 8000BDF0 C3621108 8000BDF0 C3621108 8000BDF0 C3621138 8000BDF0 C3621128 lfs f27, [r2 + 0x1108]
|
||||
8000BDF4 EC4206F2 8000BDF4 EC4206F2 8000BDF4 EC4206F2 8000BDF4 EC4206F2 8000BDF4 EC4206F2 8000BDF4 EC4206F2 8000BDF4 EC4206F2 8000BDF4 EC4206F2 fmuls f2, f2, f27
|
||||
8000BDF8 FF601090 8000BDF8 FF601090 8000BDF8 FF601090 8000BDF8 FF601090 8000BDF8 FF601090 8000BDF8 FF601090 8000BDF8 FF601090 8000BDF8 FF601090 fmr f27, f2
|
||||
|
||||
-2785
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
########################################################################
|
||||
Restore JP PSOBB original IME Behavior
|
||||
########################################################################
|
||||
|
||||
The default Tethealla client included a custom patch to disable the IME
|
||||
system in-game which allows you to type in Japanese (presumably to allow
|
||||
English versions of Windows to type properly)
|
||||
|
||||
However, if you plan to play PSOBB in it's original Japanese language it
|
||||
is recommended you remove this patch to restore the original functions
|
||||
|
||||
|
||||
Open a unpacked PSOBB.exe in a hex editor and:
|
||||
|
||||
FIND 9CC38E
|
||||
|
||||
REPLACE WITH A8838F
|
||||
|
||||
|
||||
Make sure to install Japanese Language Support in Windows 10/11 to enable
|
||||
the Japanese keyboard and IME.
|
||||
|
||||
If there's a problem, you can also use the Legacy IME by heading into the
|
||||
options of the Japanese Language settings and scroll down to the bottom of
|
||||
the page to enable Legacy IME Support to restore the original Pre-Windows 7
|
||||
IME system.
|
||||
|
||||
Last but not least, remember the default Tethealla client is the original
|
||||
Japanese client, so you don't need to apply any other special patch but this
|
||||
one and make sure you have the original Japanese files set in your data folder
|
||||
the game should start entirely in Japanese.
|
||||
|
||||
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+94
-96
@@ -1,96 +1,94 @@
|
||||
###########################################################
|
||||
|
||||
NPC: Coren Tsu - The Wanderer
|
||||
AREAS: Pioneer 2
|
||||
|
||||
Translations by: apexseals (discord: apexseals)
|
||||
Proofing & Debugging by: nolrinale (github.com/nolrinale)
|
||||
|
||||
###########################################################
|
||||
|
||||
presentation:
|
||||
|
||||
I am Coren Tsu, a wandering merchant,
|
||||
you could say.
|
||||
|
||||
Please take some time to look at
|
||||
the rare and wonderous goods
|
||||
I have been collecting.
|
||||
|
||||
If you spend a little meseta,
|
||||
you could win a wonderful prize.
|
||||
|
||||
Well? Wanna try?
|
||||
|
||||
|
||||
You may win,
|
||||
you may lose.
|
||||
|
||||
But if you don't win,
|
||||
don't take it out on me.
|
||||
|
||||
That's just the way
|
||||
gambling is, yes?
|
||||
|
||||
Well then, how much
|
||||
meseta do you want to pay?
|
||||
|
||||
As long as you pay me,
|
||||
I'll give you a great service.
|
||||
|
||||
|
||||
Huh?
|
||||
|
||||
That's too bad...
|
||||
|
||||
Well, these kind of things usually
|
||||
have a chance to lose money.
|
||||
|
||||
Let's keep this discreet.
|
||||
If you feel up to it, talk to me again.
|
||||
|
||||
|
||||
It seems you have
|
||||
too many items.
|
||||
|
||||
First, go and
|
||||
organize your items,
|
||||
|
||||
Then speak to me again.
|
||||
|
||||
What?
|
||||
|
||||
You said you'd try,
|
||||
then you said no.
|
||||
|
||||
People like that
|
||||
fail at everything.
|
||||
|
||||
|
||||
What the...?
|
||||
|
||||
You don't have the
|
||||
meseta to pay me?
|
||||
|
||||
I won't work with such
|
||||
cold hearted people.
|
||||
|
||||
|
||||
Alright, let's do it.
|
||||
|
||||
You better pray
|
||||
for something good...
|
||||
|
||||
|
||||
Look here!
|
||||
Take it!
|
||||
|
||||
Even if you had bad luck,
|
||||
something good will come out of it.
|
||||
|
||||
You'll win someday!
|
||||
|
||||
In case you want to try again,
|
||||
come back to me once more.
|
||||
|
||||
|
||||
###########################################################
|
||||
|
||||
NPC: Coren Tsu - The Wanderer
|
||||
AREAS: Pioneer 2
|
||||
|
||||
Translations by: apexseals (discord: apexseals)
|
||||
Proofing & Debugging by: nolrinale (github.com/nolrinale)
|
||||
|
||||
###########################################################
|
||||
|
||||
presentation:
|
||||
|
||||
I am Coren Tsu, a wandering merchant,
|
||||
you could say.
|
||||
|
||||
Please take some time to look at
|
||||
the rare and wonderous goods
|
||||
I have been collecting.
|
||||
|
||||
If you spend a little meseta,
|
||||
you could win a wonderful prize.
|
||||
|
||||
Well? Wanna try?
|
||||
|
||||
|
||||
You may win,
|
||||
you may lose.
|
||||
|
||||
But if you don't win,
|
||||
don't take it out on me.
|
||||
|
||||
That's just the way
|
||||
gambling is, yes?
|
||||
|
||||
Well then, how much
|
||||
meseta do you want to pay?
|
||||
|
||||
As long as you pay me,
|
||||
I'll give you a great service.
|
||||
|
||||
|
||||
Huh?
|
||||
|
||||
That's too bad...
|
||||
|
||||
Well, these kind of things usually
|
||||
have a chance to lose money.
|
||||
|
||||
Let's keep this discreet.
|
||||
If you feel up to it, talk to me again.
|
||||
|
||||
|
||||
It seems you have
|
||||
too many items.
|
||||
|
||||
First, go and
|
||||
organize your items,
|
||||
|
||||
Then speak to me again.
|
||||
|
||||
What?
|
||||
|
||||
You said you'd try,
|
||||
then you said no.
|
||||
|
||||
People like that
|
||||
fail at everything.
|
||||
|
||||
|
||||
What the...?
|
||||
|
||||
You don't have the
|
||||
meseta to pay me?
|
||||
|
||||
I won't work with such
|
||||
cold hearted people.
|
||||
|
||||
|
||||
Alright, let's do it.
|
||||
|
||||
You better pray
|
||||
for something good...
|
||||
|
||||
|
||||
Look here!
|
||||
Take it!
|
||||
|
||||
Even if you had bad luck,
|
||||
something good will come out of it.
|
||||
|
||||
You'll win someday!
|
||||
|
||||
In case you want to try again,
|
||||
come back to me once more.
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,165 @@
|
||||
$qfread
|
||||
|
||||
00 000003FF Garon points
|
||||
00 0003FC00 Garon button-mashing game score
|
||||
00 03FC0000 Garon timing game score
|
||||
00 04000000 Garon Tier 1 (10 cards) of Guild Card counter
|
||||
00 08000000 Garon Tier 2 (30 cards) of Guild Card counter
|
||||
00 10000000 Garon Tier 3 (50 cards) of Guild Card counter
|
||||
00 20000000 Garon Tier 4 (100 cards) of Guild Card counter
|
||||
00 C0000000 __UNUSED__
|
||||
|
||||
01 00000001 Dream Messenger: NiGHTS
|
||||
01 00000002 Pioneer Warehouse: ???
|
||||
01 00000004 Garon's Shop: Puyo Pop
|
||||
01 00000008 Pioneer Warehouse: Chu Chu Challenge
|
||||
01 00000010 Reach for the Dream: Chu Chu Puzzle
|
||||
01 00000020 Seat of the Heart: Checkpoint (Normal)
|
||||
01 00000040 Seat of the Heart: Checkpoint (Sue path)
|
||||
01 00000080 Seat of the Heart: Checkpoint (Elly is mad)
|
||||
01 00000100 Seat of the Heart: Quest complete (no Sue path)
|
||||
01 00000200 Seat of the Heart: Quest complete (Sue path)
|
||||
01 00000400 Seat of the Heart: Got Ragol Ring (Normal)
|
||||
01 00000800 Seat of the Heart: Checkpoint (Hard)
|
||||
01 00000800 White Day: ???
|
||||
01 00001000 Blue Star Memories: Future Forecast
|
||||
01 00001000 Seat of the Heart: Checkpoint (Sue path)
|
||||
01 00002000 Blue Star Memories: Future Bullet
|
||||
01 00002000 Seat of the Heart: Checkpoint (Elly is mad)
|
||||
01 00004000 Seat of the Heart: Quest complete (no Sue path)
|
||||
01 00008000 Seat of the Heart: Quest complete (Sue path)
|
||||
01 00010000 Seat of the Heart: Got Ragol Ring (Hard)
|
||||
01 00020000 Seat of the Heart: Checkpoint (Very Hard)
|
||||
01 00040000 Seat of the Heart: Checkpoint (Sue path)
|
||||
01 00080000 Seat of the Heart: Checkpoint (Elly is mad)
|
||||
01 00100000 Seat of the Heart: Quest complete (no Sue path)
|
||||
01 00200000 Seat of the Heart: Quest complete (Sue path)
|
||||
01 003F8000 Beta Lucky Coins
|
||||
01 00400000 Seat of the Heart: Got Ragol Ring (Very Hard)
|
||||
01 00800000 Seat of the Heart: Checkpoint (Ultimate)
|
||||
01 01000000 Seat of the Heart: Checkpoint (Sue path)
|
||||
01 02000000 Seat of the Heart: Checkpoint (Elly is mad)
|
||||
01 04000000 Seat of the Heart: Quest complete (no Sue path)
|
||||
01 08000000 Seat of the Heart: Quest complete (Sue path)
|
||||
01 10000000 Seat of the Heart: Got Ragol Ring (Ultimate)
|
||||
01 E0000000 __UNUSED__
|
||||
|
||||
02 00000001 Pioneer Halloween: Got Jack-O'-Lantern
|
||||
02 00000002 Pioneer Halloween: Got cake
|
||||
02 00000020 East Tower
|
||||
02 00000020 The East Tower: Paganini side quest
|
||||
02 00000040 The West Tower: Paganini side quest
|
||||
02 00000040 West Tower
|
||||
02 00000080 Labyrinthine Trial: White Ring
|
||||
02 00000100 Garon's Treachery: Rakonia Stone
|
||||
02 00000200 Garon's Treachery: Fragment of Friendship
|
||||
02 00000400 Towards the Future: Purple Ring
|
||||
02 00000800 Towards the Future: Flower Bouquet
|
||||
02 00002000 Heart Of Poumn
|
||||
02 00002000 Rappy's Holiday: Heart of Poumn
|
||||
02 003FC000 Rappy's Holiday points
|
||||
02 07000000 Respective Tomorrow: WIS
|
||||
02 08000000 Respective Tomorrow: S/SS Rank
|
||||
02 10000000 Towards the Future: Black Ring
|
||||
02 20000000 Green Ring
|
||||
02 C0C0101C __UNUSED__
|
||||
|
||||
03 000000FF Lucky Tickets
|
||||
03 003FFF00 Kill count
|
||||
03 07C00000 Song count
|
||||
03 08000000 Couple flag
|
||||
03 7FFFFFFF MA4 kills (Central Dome)
|
||||
03 80000000 __UNUSED__
|
||||
|
||||
04 7FFFFFFF MA4 kills (Gal Da Val)
|
||||
04 80000000 __UNUSED__
|
||||
|
||||
05 00007FFF Principal's Gift: Random Candy ID
|
||||
05 00008000 Candy ID init flag
|
||||
05 00200000 Racket
|
||||
05 00400000 Tree Clippers
|
||||
05 00800000 Synthesizer
|
||||
05 01000000 Shichishito
|
||||
05 02000000 Dirty Life Jacket
|
||||
05 04000000 Lost Hell Pallasch: Gush Raygun
|
||||
05 F81F0000 __UNUSED__
|
||||
|
||||
06 0FF00000 Lucky Tickets
|
||||
06 F00FFFFF __UNUSED__
|
||||
|
||||
07 00000001 Government 4-5: Normal cleared
|
||||
07 00000002 Government 4-5: Hard cleared
|
||||
07 00000004 Government 4-5: Very Hard cleared
|
||||
07 00000008 Government 4-5: Ultimate cleared
|
||||
07 00000010 Government 8-3: Normal cleared
|
||||
07 00000020 Government 8-3: Hard cleared
|
||||
07 00000040 Government 8-3: Very Hard cleared
|
||||
07 00000080 Government 8-3: Ultimate cleared
|
||||
07 FFFFFF00 __UNUSED__
|
||||
|
||||
08 7FFFFFFF MA4 kills (Crater)
|
||||
08 80000000 __UNUSED__
|
||||
|
||||
09 00003FFF MA1v2 points
|
||||
09 00003FFF Maximum Attack 1 Ver.2: points
|
||||
09 0FFFC000 MA2v2 points
|
||||
09 0FFFC000 Maximum Attack 2 Ver.2: points
|
||||
09 10000000 AOL CUP -Sunset Base- (Mag Cell)
|
||||
09 10000000 Maximum Attack 1 Ver.2: Class Master flag
|
||||
09 20000000 AOL CUP -Sunset Base- (Ruins)
|
||||
09 20000000 Maximum Attack 2 Ver.2: ID Master flag
|
||||
09 40000000 Beach Laughter: Got 5 Photon Spheres & Black Ring
|
||||
09 40000000 Blue Ring
|
||||
09 80000000 __UNUSED__
|
||||
|
||||
0A 00000001 Heart of HUmar
|
||||
0A 00000002 Heart of HUnewearl
|
||||
0A 00000004 Heart of HUcast
|
||||
0A 00000008 Heart of HUcaseal
|
||||
0A 00000010 Heart of RAmar
|
||||
0A 00000020 Heart of RAmarl
|
||||
0A 00000040 Heart of RAcast
|
||||
0A 00000080 Heart of RAcaseal
|
||||
0A 00000100 Heart of FOmar
|
||||
0A 00000200 Heart of FOmarl
|
||||
0A 00000400 Heart of FOnewm
|
||||
0A 00000800 Heart of FOnewearl
|
||||
0A 00001000 Heart of Viridia
|
||||
0A 00002000 Heart of Greenill
|
||||
0A 00004000 Heart of Skyly
|
||||
0A 00008000 Heart of Bluefull
|
||||
0A 00010000 Heart of Purplenum
|
||||
0A 00020000 Heart of Pinkal
|
||||
0A 00040000 Heart of Redria
|
||||
0A 00080000 Heart of Oran
|
||||
0A 00100000 Heart of Yellowboze
|
||||
0A 00200000 Heart of Whitill
|
||||
0A 7FC00000 Lucky Tickets
|
||||
0A 80000000 __UNUSED__
|
||||
|
||||
0B 00000001 Garon's Shop: Black Gear
|
||||
0B 00000001 Roulette (SEIRYU)
|
||||
0B 00000002 Beta -> Final Lucky Coins init flag
|
||||
0B 00000002 Roulette (GENBU)
|
||||
0B 000001FC Lucky Coins
|
||||
0B 0007FC00 Pioneer Christmas ???
|
||||
0B 00080000 Cleared 4th Pioneer Christmas tier?
|
||||
0B 1FF00000 Wrapping Papers
|
||||
0B 20000000 Pioneer Christmas Present
|
||||
0B 40000000 Wall
|
||||
0B 40000000 White Day: Flower Bouquet or Heart Key
|
||||
0B 80000200 __UNUSED__
|
||||
|
||||
0C FFFFFFFF __UNUSED__
|
||||
|
||||
0D FFFFFFFF __UNUSED__
|
||||
|
||||
0E 7FFFFFFF MA4 kills (Total)
|
||||
0E 80000000 __UNUSED__
|
||||
|
||||
0F 000000FF MA4 Tickets
|
||||
0F 00000100 MA4 PHOTON CRYSTAL
|
||||
0F 00000200 MA4 FRIEND RING
|
||||
0F 00000400 MA4 GIRASOLE
|
||||
0F 00000800 MA4 SAMURAI ARMOR
|
||||
0F FFFFF000 __UNUSED__
|
||||
@@ -0,0 +1,187 @@
|
||||
0007 = Set by rico capsule in caves
|
||||
000B = P2 Tyrell Start
|
||||
000C = P2 Irene Start
|
||||
000D = P2 Scientist 1 Start
|
||||
000E = P2 Scientist 2 Start
|
||||
000F = P2 More Scientist stuff.
|
||||
0010 = P2 Irene after talking to Tyrell
|
||||
0011 = Read a rico capsule (any)
|
||||
0012 = P2 Scientist after talking to Irene.
|
||||
0013 = P2 Menu 6, quest counter / Tekker talked to
|
||||
0014 = Entered Forest 1
|
||||
0015 = Entered Forest 2
|
||||
0016 = Entered Dragon Area
|
||||
0017 = Dragon defeated
|
||||
0018 = Caves unlocked
|
||||
0018 = P2 Principle after defeating dragon
|
||||
0019 = P2 Scientist after defeating dragon
|
||||
001E = Entered Caves 1 (Gov 2-1)
|
||||
001F = Entered De Rol Le in 2-4
|
||||
0020 = De Ro lee defeated
|
||||
0021 = Mines unlocked (P2 Tyrell after defeating De Rol Le)
|
||||
0028 = Entered Mines 1
|
||||
0029 = Entered Vol Opt Area
|
||||
002A = Defeated Vol Opt
|
||||
002B = Set by rico capsule about the 3 seals (after vol opt).
|
||||
002C = Activated Forest monument
|
||||
002D = Activated Caves monument (Gov 2-2)
|
||||
002E = Activated Mines monument
|
||||
002F = Activated all monuments
|
||||
0030 = Entered Ruins 1
|
||||
0032 = Entered Falz 1
|
||||
0035 = Hard mode unlocked
|
||||
0036 = Entered Falz 3 // Very Hard mode unlocked (?)
|
||||
0037 = Ultimate unlocked
|
||||
0046 = One CCA door lock unlocked
|
||||
0047 = One CCA door lock unlocked
|
||||
0048 = One CCA door lock unlocked
|
||||
0049 = Entered Laboratory
|
||||
004A = Lab Assistant Start
|
||||
004B = Entered Temple Beta
|
||||
004C = Defeated Barba Ray
|
||||
004D = Lab Assistant after defeating barba ray
|
||||
004E = Entered Spaceship Beta
|
||||
004F = Defeated Gol Dragon
|
||||
0051 = Entered CCA
|
||||
0052 = Defeated Gal Gyrphon // Defeated Gol dragon in seat of heart (?)
|
||||
0054 = Entered Seabed Upper
|
||||
0057 = Defeated Olga Flow
|
||||
005B = Lab Natasha Start
|
||||
005C = Lab Natasha after VR temple
|
||||
005D = Lab Natasha after VR Spaceship
|
||||
005E = Lab Assistant after defeating Gal gryphon
|
||||
005F = After reading the last capsule from flowen
|
||||
0060 = Lab Natasha after CCA
|
||||
0065 = Cleared Magnitude of Metal
|
||||
0067 = Cleared Claiming a Stake
|
||||
0069 = Cleared Value of Money
|
||||
006B = Cleared Battle Training
|
||||
006D = Cleared Journalistic Pursuit
|
||||
006F = Cleared The Fake in Yellow
|
||||
0071 = Cleared Native Research
|
||||
0073 = Cleared Forest of Sorrow
|
||||
0075 = Cleared Gran Squall
|
||||
0077 = Cleared Addicting Food
|
||||
0079 = Cleared The Lost Bride
|
||||
007B = Cleared Waterfall Tears
|
||||
007D = Cleared Black Paper
|
||||
007F = Cleared Secret Delivery
|
||||
0081 = Cleared Soul of a Blacksmith
|
||||
0083 = Cleared Letter from Lionel
|
||||
0085 = Cleared The Grave's Butler
|
||||
0087 = Cleared Knowing One's Heart
|
||||
0089 = Cleared The Retired Hunter
|
||||
008B = Cleared Dr. Osto's Research
|
||||
008D = Cleared Unsealed Door
|
||||
008F = Cleared Soul of Steel
|
||||
0091 = Cleared Doc's Secret Plan (able to make enemy part weapons)
|
||||
0093 = Cleared Seek my Master
|
||||
0095 = Cleared From the Depths
|
||||
0096 = Unknown (set in the fake in yellow)
|
||||
0097 = Seat of heart unknown
|
||||
009B = Cleared Central Dome Fire Swirl
|
||||
00A1 = Cleared Seat of the Heart
|
||||
00C9 = Got an enemy weapon converted
|
||||
00CA = unknown Fake In Yellow
|
||||
00CE = unknown Fake In Yellow
|
||||
00D3 = Dr.Osto's research black paper subplot. Told Sue your name
|
||||
00D4 = Dr.Osto's research black paper subplot. Didn't tell Sue your name from before.
|
||||
00D5 = Dr.Osto's research black paper subplot. Did tell Sue your name from before.
|
||||
00D6 = Unsealed door. black paper subplot Talked to Sue. Refused to tell her your name
|
||||
00D7 = Unsealed door. black paper subplot. bernie tells you Sue is part of black paper.
|
||||
00D8 = Black paper subplot in waterfall of tears talking to Sue
|
||||
00D9 = Black paper subplot in Black paper talking to Sue (used option 2)
|
||||
00DB = Black paper subplot in Black paper talking to Sue (used any option)
|
||||
00DE = Black paper subplot in Black paper talked to Sue at the end of quest?
|
||||
00DF = Knowing ones heart talked to Bernie?
|
||||
00E0 = Seek my master. Zoke ,Donoph subplot?
|
||||
00E2 = Bernie Gran Squall
|
||||
00E7 = Defeated Kireek in waterfall of tears
|
||||
00E8 = Black paper subplot in black paper. defeated Kireek...
|
||||
00EB = Black paper subplot in from the depths. Defeated Kireek and got soul eater!
|
||||
00F1 = Secret delivery. Started the Weapons subplot //is cleared if quest is left
|
||||
00F3 = Weapon badge approval for claiming the snake //is cleared if quest is left
|
||||
00F4 = Weapon badge approval for the lost bride //is cleared if quest is left
|
||||
00F5 = Weapon badge approval for gran squall //is cleared if quest is left
|
||||
00F6 = Secret delivery. Got AKIKO's FRYING PAN!
|
||||
00FB = Got Orochi-agito
|
||||
00FD = Unknown addicting food
|
||||
0105 = Central dome fire swirl. Got Glory of the past!
|
||||
0106 = Central dome fire swirl. Got Mark3.
|
||||
0107 = Central dome fire swirl. got Sonic knuckles
|
||||
0108 = Central dome fire swirl. got mail from BOGARDE
|
||||
0109 = Central dome fire swirl. got mail from ANNA
|
||||
010A = Central dome fire swirl. got mail from NADJA
|
||||
010B = Central dome fire swirl. got mail from Lionel
|
||||
010C = Soul of the blacksmith. Got one of the 3 special weapons!
|
||||
010D = Donoph Baz dies The Retired Hunter
|
||||
010E = Seat of heart unknown
|
||||
010F = Seat of heart unknown
|
||||
0110 = Seat of heart unknown
|
||||
0111 = Seat of heart unknown
|
||||
0112 = Seat of heart unknown
|
||||
0113 = Seat of heart unknown
|
||||
0187 = Soul of steel. Got Marina's bag! //dreamcast
|
||||
0188 = Soul of steel. Unknown.
|
||||
0191 = Capsule Elly VR
|
||||
0197 = Cleared VR Temple
|
||||
01AD = Capsule elly CCA
|
||||
01AE = Capsule elly CCA
|
||||
01B3 = After reading a capsule from flowen
|
||||
01D6 = Set after unlocking vr spaceship
|
||||
01F5 = Episode1: Cleared government 1-1
|
||||
01F7 = Episode1: Cleared government 1-2
|
||||
01F9 = Episode1: Cleared government 1-3
|
||||
01FB = Episode1: Cleared government 2-1
|
||||
01FD = Episode1: Cleared government 2-2
|
||||
01FF = Episode1: Cleared government 2-3
|
||||
0201 = Episode1: Cleared government 2-4
|
||||
0203 = Episode1: Cleared government 3-1
|
||||
0205 = Episode1: Cleared government 3-2
|
||||
0207 = Episode1: Cleared government 3-3
|
||||
0209 = Episode1: Cleared government 4-1
|
||||
020B = Episode1: Cleared government 4-2
|
||||
020D = Episode1: Cleared government 4-3
|
||||
020F = Episode1: Cleared government 4-4
|
||||
0211 = Episode1: Cleared government 4-5
|
||||
0213 = Episode2: Cleared government 5-1 // Talked to Tekker (?)
|
||||
0214 = Entered Forest 1
|
||||
0215 = Episode2: Cleared government 5-2
|
||||
0217 = Episode2: Cleared government 5-3 // Defeated Dragon (?)
|
||||
0219 = Episode2: Cleared government 5-4
|
||||
021B = Episode2: Cleared government 5-5
|
||||
021D = Episode2: Cleared government 6-1
|
||||
021F = Episode2: Cleared government 6-2
|
||||
0220 = Defeated De Rol Le
|
||||
0221 = Episode2: Cleared government 6-3
|
||||
0223 = Episode2: Cleared government 6-4
|
||||
0225 = Episode2: Cleared government 6-5
|
||||
0227 = Episode2: Cleared government 7-1
|
||||
0229 = Episode2: Cleared government 7-2
|
||||
022A = Defeated Vol Opt (002A and 022A together on hard mode)
|
||||
022B = Episode2: Cleared government 7-3 // Rico capsule after Vol Opt, at Ruins door (?)
|
||||
022D = Episode2: Cleared government 7-4 // Entered Caves 2 (?)
|
||||
022F = Episode2: Cleared government 7-5
|
||||
0230 = Entered Ruins 1
|
||||
0231 = Episode2: Cleared government 8-1
|
||||
0233 = Episode2: Cleared government 8-2
|
||||
0234 = Entered Falz 2
|
||||
0235 = Episode2: Cleared government 8-3
|
||||
0246 = Activated Jungle East big door switch
|
||||
0248 = Activated Seaside big door switch
|
||||
024F = Defeated Gol Dragon
|
||||
0252 = Defeated Gal Gryphon
|
||||
02BD = Episode4: Cleared government 9-1
|
||||
02BE = Episode4: Cleared government 9-2
|
||||
02BF = Episode4: Cleared government 9-3
|
||||
02C0 = Episode4: Cleared government 9-4
|
||||
02C1 = Episode4: Cleared government 9-5
|
||||
02C2 = Episode4: Cleared government 9-6
|
||||
02C3 = Episode4: Cleared government 9-7
|
||||
02C4 = Episode4: Cleared government 9-8
|
||||
0314 = Entered Forest 1
|
||||
0330 = Entered Ruins 1
|
||||
03FA = P2 Menu 7, G-Counter // Talked to Momoka
|
||||
03FB = Nol start
|
||||
03FC = Cleared Ep2 government on ultimate
|
||||
03FE = Cleared Ep2 government on normal-vh
|
||||
@@ -0,0 +1,21 @@
|
||||
import asyncio
|
||||
import aiohttp
|
||||
|
||||
|
||||
async def main():
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.ws_connect("ws://localhost:5050/y/rare-drops/stream") as ws:
|
||||
async for msg in ws:
|
||||
if msg.type == aiohttp.WSMsgType.TEXT:
|
||||
data = msg.json()
|
||||
print(f"Received message: {data}")
|
||||
elif msg.type == aiohttp.WSMsgType.BINARY:
|
||||
print(f"Received binary data: {msg.data}")
|
||||
elif msg.type == aiohttp.WSMsgType.CLOSE:
|
||||
break
|
||||
elif msg.type == aiohttp.WSMsgType.ERROR:
|
||||
break
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
@@ -0,0 +1,27 @@
|
||||
### T FLAG NAME REQUIREMENTS AVAILABLE_IF ENABLED_IF
|
||||
001 1 0065 Magnitude of Metal !F_0065 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
002 1 0067 Claiming A Stake !F_0067 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
003 3 0069 The Value of Money T1, Caves F_0065 && F_0067 && F_006B && F_01F9 !F_0069 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
004 1 006B Battle Training !F_006B || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
005 2 006D Journalistic Pursuit T1 F_0065 && F_0067 && F_006B !F_006D || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
006 2 006F The Fake in yellow T1 F_0065 && F_0067 && F_006B !F_006F || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
007 2 0071 Native Research T1 F_0065 && F_0067 && F_006B !F_0071 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
008 2 0073 Forest of Sorrow 007 F_0071 !F_0073 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
009 2 0075 Gran Squall T1 F_0065 && F_0067 && F_006B !F_0075 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
010 3 0077 Addicting Food T1 F_0065 && F_0067 && F_006B !F_0077 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
011 3 0079 The Lost Bride T1 F_0065 && F_0067 && F_006B !F_0079 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
012 3 007B Waterfall tears 010, 011, 014, 017 F_0077 && F_0079 && F_007F && F_0085 !F_007B || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
013 3 007D Black Paper 012 F_007B !F_007D || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
014 3 007F Secret Delivery T1 F_0065 && F_0067 && F_006B !F_007F || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
015 3 0081 Soul of a Blacksmith 010, 011, 014, 017 F_0077 && F_0079 && F_007F && F_0085 !F_0081 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
016 3 0083 Letter from Lionel T1, Mines F_0065 && F_0067 && F_006B && F_0201 !F_0083 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
017 3 0085 The Grave's Butler T1 F_0065 && F_0067 && F_006B !F_0085 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
018 4 0087 Knowing One's Heart T1, Mines F_0065 && F_0067 && F_006B && F_0201 !F_0087 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
019 5 0089 Retired Hunter T1, Ruins F_0065 && F_0067 && F_006B && F_0207 !F_0089 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
020 4 008B Dr. Osto's Research T1, Mines F_0065 && F_0067 && F_006B && F_0201 !F_008B || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
021 4 008D The Unsealed Door 020, 014 F_008B && F_007F !F_008D || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
022 5 008F Soul of Steel 023 F_0091 !F_008F || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
023 5 0091 Doc's Secret Plan 014, Ruins F_007F && F_0207 !F_0091 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
024 5 0093 Seek My Master T1, Ruins F_0065 && F_0067 && F_006B && F_0207 !F_0093 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
025 5 0095 From the Depths 023 F_0091 !F_0095 || (F_0065 && F_0067 && F_0069 && F_006B && F_006D && F_006F && F_0071 && F_0073 && F_0075 && F_0077 && F_0079 && F_007B && F_007D && F_007F && F_0081 && F_0083 && F_0085 && F_0087 && F_0089 && F_008B && F_008D && F_008F && F_0091 && F_0093 && F_0095)
|
||||
026 2 009B Central Dome Fire Swirl 008 F_0073
|
||||
@@ -1,11 +0,0 @@
|
||||
star value tables
|
||||
|
||||
psobb [B1-437]
|
||||
00010203 04090909 01020304 05090909 01020304 05090909 01020304 05090909 01020304 05090909 00010203 04090909 01020304 05090909 01020304 05090909 01020304 05090909 00010203 09090901 02030409 09090102 03040909 09090A0A 090A0A09 0A0A090C 0B0A0A0A 0A0A0A0B 0A090A0A 0A0A0A09 0A0A0A0A 0A0A0A0A 0A0A0B0A 0C0C0B0A 0A090A09 090A0A0A 0A0C090C 0B0A090A 090C0A0B 0A0A0A0A 0A0A0A0B 0B0A0A0A 09090A09 0C0A0A0A 0B0A0B09 0A0A090A 0A0B090B 0A0B0B0A 090A090A 0B090A0A 0A0A0A0A 0A0A0A09 090C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0009 0A0A0A0B 090A0A09 0A0A0B0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0B0B0B0B 0B0B0B0B 0B0B0B0A 0C0A0C0B 0A0A0A0A 0A0B0A0B 0B0B0B0B 0A0A090A 0A0A090B 0B0B0B0C 0C0C0C0C 0A0A0C0A 090A0C09 0A0B0A0A 0A0A0C0A 0A0A0A09 0A0C0A09 0A0A0A0A 0A090C0B 09090909 09090909 09090909 09090909 0909090B 0A0C0A0B 0B0C0A0A 0A090A0A 0A0A0B0A 0A0A0A0A 0909090A 0A090C0A 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0102 03040102 03040203 04020304 01020304 01020304 01020304 01020304 01020304 01020304 03040000 00010102 02030304 04050506 06070707 07080808 08080809 09090A0A 0A0A0A0A 0B0C0A0A 0A0A0A0A 0B0B0B0A 0B0B0C0B 0B0B0B0B 0A0A0A0A 0A0A0C09 0909090A 0A0B0C09 0B0A0A0A 0A0A0A0A 0A0A0A0B 0A0A0A0A 0A0A0A00 00010203 03040405 05050606 07070808 08080808 0A0A0A0A 0A0A0909 090A0A0A 0A0A0A0A 0A0A0B0A 0A0B0A09 0909090A 0B0B0000 0B000000 00080808 08080808 09080808 09080808 09070707 07070909 090C0909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 0A0A0B0A 0B0A0909 0B0B0B0C 0A0A0A09 0A0A0A0A 090A0A0A 0A0A0A0A 0A0A0A0A 0203050B 0203050B 0203050B 0203050B 0204060B 0204060B 0203050B 080B080A 0B020305 02030502 03050304 06030405 07080B04 06090406 09040609 06090B06 090B0909 09090909 0A0B0B0B 0B0B0B0B 0B0B0B0B 0B0B0B0B 0B0B0B0B 0A0B0B0B 0B0B0B0B
|
||||
|
||||
psogc [94-2F7]
|
||||
00010203 04090909 01020304 05090909 01020304 05090909 01020304 05090909 01020304 05090909 00010203 04090909 01020304 05090909 01020304 05090909 01020304 05090909 00010203 09090901 02030409 09090102 03040909 09090A0A 090A0A09 0A0A090C 0B0A0A0A 0A0A0A0B 0A090A0A 0A0A0A09 0A0A0A0A 0A0A0A0A 0A0A0B0A 0C0C0B0A 0A090A09 090A0A0A 0A0C090C 0B0A090A 090C0A0B 0A0A0A0A 0A0A0A0B 0B0A0A0A 09090A09 0C0A0A0A 0B0A0B09 0A0A090A 0A0B090B 0A0B0B0A 090A090A 0B090A0A 0A0A0A0A 0A0A0A09 090C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0009 0A0A0A0B 090A0A09 0A0A0B0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0B0B0B0B 0B0B0B0B 0B0B0B0A 0C0A0C0B 0A0A0A0A 0A0B0A0B 0B0B0B0B 0A0A090A 0A0A090B 0B0B0B0C 0C0C0C0C 01020304 01020304 02030402 03040102 03040102 03040102 03040102 03040102 03040102 03040304 00000001 01020203 03040405 05060607 07070708 08080808 08090909 0A0A0A0A 0A0A0B0C 0A0A0A0A 0A0A0B0B 0B0A0B0B 0C0B0B0B 0B0B0000 01020303 04040505 05060607 07080808 0808080A 0A0A0A0A 0A090909 0A0A0A0A 0A0A0A0A 0A0B0A0A 0B0A0909 09090A0B 0B000000 00000000 08080808 08080809 08080809 08080809 07070707 07090909 0C090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090902 03050B02 03050B02 03050B02 03050B02 04060B02 04060B02 03050B08 0B080A0B 02030502 03050203 05030406 03040507 080B0406 09040609 04060906 090B0609 0B090909 090909
|
||||
|
||||
|
||||
|
||||
0203050B0203050B0203050B0203050B
|
||||
+12
-12
@@ -7,6 +7,8 @@
|
||||
#include <phosg/Filesystem.hh>
|
||||
#include <phosg/Strings.hh>
|
||||
|
||||
#include "Text.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
AFSArchive::AFSArchive(shared_ptr<const string> data)
|
||||
@@ -14,14 +16,14 @@ AFSArchive::AFSArchive(shared_ptr<const string> data)
|
||||
struct FileHeader {
|
||||
be_uint32_t magic;
|
||||
le_uint32_t num_files;
|
||||
} __attribute__((packed));
|
||||
} __packed_ws__(FileHeader, 8);
|
||||
|
||||
struct FileEntry {
|
||||
le_uint32_t offset;
|
||||
le_uint32_t size;
|
||||
} __attribute__((packed));
|
||||
} __packed_ws__(FileEntry, 8);
|
||||
|
||||
StringReader r(*this->data);
|
||||
phosg::StringReader r(*this->data);
|
||||
const auto& header = r.get<FileHeader>();
|
||||
if (header.magic != 0x41465300) { // 'AFS\0'
|
||||
throw runtime_error("file is not an AFS archive");
|
||||
@@ -50,29 +52,27 @@ string AFSArchive::get_copy(size_t index) const {
|
||||
return string(reinterpret_cast<const char*>(ret.first), ret.second);
|
||||
}
|
||||
|
||||
StringReader AFSArchive::get_reader(size_t index) const {
|
||||
phosg::StringReader AFSArchive::get_reader(size_t index) const {
|
||||
auto ret = this->get(index);
|
||||
return StringReader(ret.first, ret.second);
|
||||
return phosg::StringReader(ret.first, ret.second);
|
||||
}
|
||||
|
||||
string AFSArchive::generate(const vector<string>& files, bool big_endian) {
|
||||
return big_endian ? AFSArchive::generate_t<true>(files) : AFSArchive::generate_t<false>(files);
|
||||
}
|
||||
|
||||
template <bool IsBigEndian>
|
||||
template <bool BE>
|
||||
string AFSArchive::generate_t(const vector<string>& files) {
|
||||
using U32T = typename std::conditional<IsBigEndian, be_uint32_t, le_uint32_t>::type;
|
||||
|
||||
StringWriter w;
|
||||
phosg::StringWriter w;
|
||||
w.put_u32b(0x41465300); // 'AFS\0'
|
||||
w.put<U32T>(files.size());
|
||||
w.put<U32T<BE>>(files.size());
|
||||
|
||||
// It seems entries are aligned to 0x800-byte boundaries, and the file's
|
||||
// header is always 0x80000 (!) bytes, most of which is unused
|
||||
uint32_t data_offset = 0x80000;
|
||||
for (const auto& file : files) {
|
||||
w.put<U32T>(data_offset);
|
||||
w.put<U32T>(file.size());
|
||||
w.put<U32T<BE>>(data_offset);
|
||||
w.put<U32T<BE>>(file.size());
|
||||
data_offset = (data_offset + file.size() + 0x7FF) & (~0x7FF);
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -8,6 +8,8 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "Types.hh"
|
||||
|
||||
class AFSArchive {
|
||||
public:
|
||||
AFSArchive(std::shared_ptr<const std::string> data);
|
||||
@@ -23,12 +25,12 @@ public:
|
||||
|
||||
std::pair<const void*, size_t> get(size_t index) const;
|
||||
std::string get_copy(size_t index) const;
|
||||
StringReader get_reader(size_t index) const;
|
||||
phosg::StringReader get_reader(size_t index) const;
|
||||
|
||||
static std::string generate(const std::vector<std::string>& files, bool big_endian);
|
||||
|
||||
private:
|
||||
template <bool IsBigEndian>
|
||||
template <bool BE>
|
||||
static std::string generate_t(const std::vector<std::string>& files);
|
||||
|
||||
std::shared_ptr<const std::string> data;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
inline void run_ar_code_translator(const std::string&, const std::string&, const std::string&) {
|
||||
throw std::runtime_error("resource_file is not available; install it and rebuild newserv");
|
||||
}
|
||||
|
||||
inline std::vector<std::pair<uint32_t, std::string>> diff_dol_files(const std::string&, const std::string&) {
|
||||
throw std::runtime_error("resource_file is not available; install it and rebuild newserv");
|
||||
}
|
||||
@@ -1,401 +0,0 @@
|
||||
#include "ARCodeTranslator.hh"
|
||||
|
||||
#include <array>
|
||||
#include <future>
|
||||
#include <phosg/Filesystem.hh>
|
||||
#include <phosg/Strings.hh>
|
||||
#include <resource_file/ExecutableFormats/DOLFile.hh>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class ARCodeTranslator {
|
||||
public:
|
||||
enum class ExpandMethod {
|
||||
FORWARD = 0,
|
||||
FORWARD_WITH_BARRIER,
|
||||
BACKWARD,
|
||||
BACKWARD_WITH_BARRIER,
|
||||
BOTH,
|
||||
BOTH_WITH_BARRIER,
|
||||
BOTH_IGNORE_ORIGIN,
|
||||
};
|
||||
|
||||
static const char* name_for_expand_method(ExpandMethod method) {
|
||||
switch (method) {
|
||||
case ExpandMethod::FORWARD:
|
||||
return "FORWARD";
|
||||
case ExpandMethod::FORWARD_WITH_BARRIER:
|
||||
return "FORWARD_WITH_BARRIER";
|
||||
case ExpandMethod::BACKWARD:
|
||||
return "BACKWARD";
|
||||
case ExpandMethod::BACKWARD_WITH_BARRIER:
|
||||
return "BACKWARD_WITH_BARRIER";
|
||||
case ExpandMethod::BOTH:
|
||||
return "BOTH";
|
||||
case ExpandMethod::BOTH_WITH_BARRIER:
|
||||
return "BOTH_WITH_BARRIER";
|
||||
case ExpandMethod::BOTH_IGNORE_ORIGIN:
|
||||
return "BOTH_IGNORE_ORIGIN";
|
||||
default:
|
||||
throw logic_error("invalid expand method");
|
||||
}
|
||||
}
|
||||
|
||||
ARCodeTranslator(const string& directory)
|
||||
: log("[ar-trans] "),
|
||||
directory(directory) {
|
||||
while (ends_with(this->directory, "/")) {
|
||||
this->directory.pop_back();
|
||||
}
|
||||
for (const auto& filename : list_directory(this->directory)) {
|
||||
if (ends_with(filename, ".dol")) {
|
||||
string name = filename.substr(0, filename.size() - 4);
|
||||
string path = directory + "/" + filename;
|
||||
this->files.emplace(name, make_shared<DOLFile>(path.c_str()));
|
||||
this->log.info("Loaded %s", name.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
~ARCodeTranslator() = default;
|
||||
|
||||
const string& get_source_filename() const {
|
||||
return this->src_filename;
|
||||
}
|
||||
void set_source_file(const string& filename) {
|
||||
this->src_filename = filename;
|
||||
this->src_file = files.at(this->src_filename);
|
||||
}
|
||||
|
||||
void find_rtoc_global_regs() const {
|
||||
for (const auto& it : files) {
|
||||
bool r2_high_found = false;
|
||||
bool r2_low_found = false;
|
||||
bool r13_high_found = false;
|
||||
bool r13_low_found = false;
|
||||
uint32_t r2 = 0;
|
||||
uint32_t r13 = 0;
|
||||
for (const auto& section : it.second->sections) {
|
||||
if (!section.is_text) {
|
||||
continue;
|
||||
}
|
||||
StringReader r(section.data);
|
||||
while (!r.eof() && r.where()) {
|
||||
uint32_t opcode = r.get_u32b();
|
||||
if ((opcode & 0xFFFF0000) == 0x3DA00000) {
|
||||
if (r13_high_found) {
|
||||
throw runtime_error("multiple values for r13_high");
|
||||
}
|
||||
r13_high_found = true;
|
||||
r13 |= (opcode << 16);
|
||||
} else if ((opcode & 0xFFFF0000) == 0x3C400000) {
|
||||
if (r2_high_found) {
|
||||
throw runtime_error("multiple values for r2_high");
|
||||
}
|
||||
r2_high_found = true;
|
||||
r2 |= (opcode << 16);
|
||||
} else if ((opcode & 0xFFFF0000) == 0x61AD0000) {
|
||||
if (r13_low_found) {
|
||||
throw runtime_error("multiple values for r13_low");
|
||||
}
|
||||
r13_low_found = true;
|
||||
r13 |= (opcode & 0xFFFF);
|
||||
} else if ((opcode & 0xFFFF0000) == 0x60420000) {
|
||||
if (r2_low_found) {
|
||||
throw runtime_error("multiple values for r2_low");
|
||||
}
|
||||
r2_low_found = true;
|
||||
r2 |= (opcode & 0xFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (r2_low_found && r2_high_found) {
|
||||
fprintf(stderr, "(%s) r2 = %08" PRIX32 "\n", it.first.c_str(), r2);
|
||||
} else {
|
||||
fprintf(stderr, "(%s) r2 = __MISSING__\n", it.first.c_str());
|
||||
}
|
||||
if (r13_low_found && r13_high_found) {
|
||||
fprintf(stderr, "(%s) r13 = %08" PRIX32 "\n", it.first.c_str(), r13);
|
||||
} else {
|
||||
fprintf(stderr, "(%s) r13 = __MISSING__\n", it.first.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t find_match(shared_ptr<const DOLFile> dest_file, uint32_t src_address, ExpandMethod expand_method) const {
|
||||
if (!this->src_file) {
|
||||
throw runtime_error("no source file selected");
|
||||
}
|
||||
|
||||
const DOLFile::Section* src_section = nullptr;
|
||||
for (const auto& sec : this->src_file->sections) {
|
||||
if (src_address >= sec.address && src_address < sec.address + sec.data.size()) {
|
||||
src_section = &sec;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!src_section) {
|
||||
throw runtime_error("source address not within any section");
|
||||
}
|
||||
|
||||
const char* method_token = this->name_for_expand_method(expand_method);
|
||||
|
||||
size_t src_offset = src_address - src_section->address;
|
||||
size_t src_bytes_available_before = src_offset;
|
||||
size_t src_bytes_available_after = src_section->data.size() - src_offset - 4;
|
||||
this->log.info("(find_match/%s) Source offset = %08zX with %zX/%zX bytes available before/after",
|
||||
method_token, src_offset, src_bytes_available_before, src_bytes_available_after);
|
||||
|
||||
size_t match_bytes_before = 0;
|
||||
size_t match_bytes_after = 0;
|
||||
while (match_bytes_before + match_bytes_after + 4 < 0x100) {
|
||||
size_t num_matches = 0;
|
||||
size_t last_match_address = 0;
|
||||
size_t match_length = match_bytes_before + match_bytes_after + 4;
|
||||
StringReader src_r(src_section->data.data() + src_offset - match_bytes_before, match_length);
|
||||
for (const auto& dest_section : dest_file->sections) {
|
||||
for (size_t dest_match_offset = 0;
|
||||
dest_match_offset < dest_section.data.size();
|
||||
dest_match_offset += 4) {
|
||||
src_r.go(0);
|
||||
StringReader dest_r(dest_section.data.data() + dest_match_offset, match_length);
|
||||
size_t z;
|
||||
for (z = 0; z < match_length; z += 4) {
|
||||
if (expand_method == ExpandMethod::BOTH_IGNORE_ORIGIN && z == match_bytes_before) {
|
||||
src_r.skip(4);
|
||||
dest_r.skip(4);
|
||||
} else if (src_section->is_text) {
|
||||
uint32_t src_opcode = src_r.get_u32b();
|
||||
uint32_t dest_opcode = dest_r.get_u32b();
|
||||
uint32_t src_class = src_opcode & 0xFC000000;
|
||||
if (src_class != (dest_opcode & 0xFC000000)) {
|
||||
break;
|
||||
}
|
||||
if (src_class == 0x48000000) {
|
||||
// b +-offset
|
||||
src_opcode &= 0xFC000003;
|
||||
dest_opcode &= 0xFC000003;
|
||||
} else if (((src_opcode & 0xAC1F0000) == 0x800D0000) || ((src_opcode & 0xAC1F0000) == 0x80020000)) {
|
||||
// lwz/lfs rXX/fXX, [r2/r13 +- offset] OR stw/stfs [r2/r13 +- offset], rXX/fXX
|
||||
src_opcode &= 0xFFFF0000;
|
||||
dest_opcode &= 0xFFFF0000;
|
||||
}
|
||||
if (src_opcode != dest_opcode) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
uint32_t src_data = src_r.get_u32b();
|
||||
uint32_t dest_data = dest_r.get_u32b();
|
||||
if ((src_data & 0xFE000000) == 0x80000000) {
|
||||
src_data &= 0xFE000003;
|
||||
}
|
||||
if ((dest_data & 0xFE000000) == 0x80000000) {
|
||||
dest_data &= 0xFE000003;
|
||||
}
|
||||
if (src_data != dest_data) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (z == match_length) {
|
||||
num_matches++;
|
||||
last_match_address = dest_section.address + dest_match_offset + match_bytes_before;
|
||||
}
|
||||
}
|
||||
}
|
||||
this->log.info("(find_match/%s) For match length %zX, %zu matches found", method_token, match_length, num_matches);
|
||||
if (num_matches == 1) {
|
||||
return last_match_address;
|
||||
} else if (num_matches == 0) {
|
||||
throw runtime_error("did not find exactly one match");
|
||||
}
|
||||
bool can_expand_backward = false;
|
||||
bool can_expand_forward = false;
|
||||
switch (expand_method) {
|
||||
case ExpandMethod::BACKWARD_WITH_BARRIER:
|
||||
can_expand_backward = (src_r.pget_u32b(0) != 0x4E800020) &&
|
||||
(src_bytes_available_before >= match_bytes_before + 4);
|
||||
break;
|
||||
case ExpandMethod::BACKWARD:
|
||||
can_expand_backward = (src_bytes_available_before >= match_bytes_before + 4);
|
||||
break;
|
||||
case ExpandMethod::FORWARD_WITH_BARRIER:
|
||||
can_expand_forward = (src_r.pget_u32b(src_r.size() - 4) != 0x4E800020) &&
|
||||
(src_bytes_available_after >= match_bytes_after + 4);
|
||||
break;
|
||||
case ExpandMethod::FORWARD:
|
||||
can_expand_forward = (src_bytes_available_after >= match_bytes_after + 4);
|
||||
break;
|
||||
case ExpandMethod::BOTH_WITH_BARRIER:
|
||||
case ExpandMethod::BOTH_IGNORE_ORIGIN:
|
||||
can_expand_backward = (src_r.pget_u32b(0) != 0x4E800020) &&
|
||||
(src_bytes_available_before >= match_bytes_before + 4);
|
||||
can_expand_forward = (src_r.pget_u32b(src_r.size() - 4) != 0x4E800020) &&
|
||||
(src_bytes_available_after >= match_bytes_after + 4);
|
||||
break;
|
||||
case ExpandMethod::BOTH:
|
||||
can_expand_backward = (src_bytes_available_before >= match_bytes_before + 4);
|
||||
can_expand_forward = (src_bytes_available_after >= match_bytes_after + 4);
|
||||
break;
|
||||
default:
|
||||
throw logic_error("invalid expand method");
|
||||
}
|
||||
if (!can_expand_backward && !can_expand_forward) {
|
||||
throw runtime_error("no further expansion is allowed");
|
||||
}
|
||||
if (can_expand_backward) {
|
||||
match_bytes_before += 4;
|
||||
}
|
||||
if (can_expand_forward) {
|
||||
match_bytes_after += 4;
|
||||
}
|
||||
}
|
||||
throw runtime_error("scan field too long; too many matches");
|
||||
}
|
||||
|
||||
void find_all_matches(uint32_t src_addr) const {
|
||||
if (!this->src_file) {
|
||||
throw runtime_error("no source file selected");
|
||||
}
|
||||
|
||||
unordered_map<string, uint32_t> results;
|
||||
for (const auto& it : files) {
|
||||
if (it.second == this->src_file) {
|
||||
log.info("(%s) %08" PRIX32 " (from source)", it.first.c_str(), src_addr);
|
||||
results.emplace(it.first, src_addr);
|
||||
} else {
|
||||
|
||||
array<future<uint32_t>, 7> futures;
|
||||
static const array<ExpandMethod, 7> methods = {
|
||||
ExpandMethod::FORWARD,
|
||||
ExpandMethod::FORWARD_WITH_BARRIER,
|
||||
ExpandMethod::BACKWARD,
|
||||
ExpandMethod::BACKWARD_WITH_BARRIER,
|
||||
ExpandMethod::BOTH,
|
||||
ExpandMethod::BOTH_WITH_BARRIER,
|
||||
ExpandMethod::BOTH_IGNORE_ORIGIN,
|
||||
};
|
||||
for (size_t z = 0; z < methods.size(); z++) {
|
||||
futures[z] = async(&ARCodeTranslator::find_match, this, it.second, src_addr, methods[z]);
|
||||
}
|
||||
|
||||
unordered_set<uint32_t> match_addrs;
|
||||
for (size_t z = 0; z < futures.size(); z++) {
|
||||
const char* method_name = this->name_for_expand_method(methods[z]);
|
||||
try {
|
||||
uint32_t ret = futures[z].get();
|
||||
log.info("(%s) (%s) %08" PRIX32, it.first.c_str(), method_name, ret);
|
||||
match_addrs.emplace(ret);
|
||||
} catch (const exception& e) {
|
||||
log.error("(%s) (%s) failed: %s", it.first.c_str(), method_name, e.what());
|
||||
}
|
||||
}
|
||||
|
||||
if (match_addrs.empty()) {
|
||||
log.error("(%s) no match found", it.first.c_str());
|
||||
} else if (match_addrs.size() > 1) {
|
||||
log.error("(%s) different matches found by different methods", it.first.c_str());
|
||||
} else {
|
||||
results.emplace(it.first, *match_addrs.begin());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const auto& it : results) {
|
||||
fprintf(stdout, "%s => %08" PRIX32 "\n", it.first.c_str(), it.second);
|
||||
}
|
||||
}
|
||||
|
||||
void handle_command(const string& command) {
|
||||
auto tokens = split(command, ' ');
|
||||
if (tokens.empty()) {
|
||||
throw runtime_error("no command given");
|
||||
}
|
||||
strip_trailing_whitespace(tokens[tokens.size() - 1]);
|
||||
|
||||
if (tokens[0] == "use") {
|
||||
this->set_source_file(tokens.at(1));
|
||||
} else if (tokens[0] == "match") {
|
||||
this->find_all_matches(stoul(tokens.at(1), nullptr, 16));
|
||||
} else if (tokens[0] == "find-globals") {
|
||||
this->find_rtoc_global_regs();
|
||||
} else if (!tokens[0].empty()) {
|
||||
throw runtime_error("unknown command");
|
||||
}
|
||||
}
|
||||
|
||||
void run_shell() {
|
||||
while (!feof(stdin)) {
|
||||
if (!this->src_filename.empty()) {
|
||||
fprintf(stdout, "ar-trans:%s/%s> ", this->directory.c_str(), this->src_filename.c_str());
|
||||
} else {
|
||||
fprintf(stdout, "ar-trans:%s> ", this->directory.c_str());
|
||||
}
|
||||
fflush(stdout);
|
||||
|
||||
string command = fgets(stdin);
|
||||
try {
|
||||
this->handle_command(command);
|
||||
} catch (const exception& e) {
|
||||
this->log.error("Failed: %s", e.what());
|
||||
}
|
||||
}
|
||||
fputc('\n', stdout);
|
||||
}
|
||||
|
||||
private:
|
||||
PrefixedLogger log;
|
||||
string directory;
|
||||
unordered_map<string, shared_ptr<const DOLFile>> files;
|
||||
string src_filename;
|
||||
shared_ptr<const DOLFile> src_file;
|
||||
};
|
||||
|
||||
void run_ar_code_translator(const std::string& directory, const std::string& use_filename, const std::string& command) {
|
||||
ARCodeTranslator trans(directory);
|
||||
if (!use_filename.empty()) {
|
||||
trans.set_source_file(use_filename);
|
||||
}
|
||||
|
||||
if (!command.empty()) {
|
||||
trans.handle_command(command);
|
||||
} else {
|
||||
trans.run_shell();
|
||||
}
|
||||
}
|
||||
|
||||
vector<pair<uint32_t, string>> diff_dol_files(const string& a_filename, const string& b_filename) {
|
||||
DOLFile a(a_filename.c_str());
|
||||
DOLFile b(b_filename.c_str());
|
||||
auto a_mem = make_shared<MemoryContext>();
|
||||
auto b_mem = make_shared<MemoryContext>();
|
||||
a.load_into(a_mem);
|
||||
b.load_into(b_mem);
|
||||
|
||||
uint32_t min_addr = 0xFFFFFFFF;
|
||||
uint32_t max_addr = 0x00000000;
|
||||
for (const auto& sec : a.sections) {
|
||||
min_addr = min<uint32_t>(min_addr, sec.address);
|
||||
max_addr = max<uint32_t>(max_addr, sec.address + sec.data.size());
|
||||
}
|
||||
for (const auto& sec : b.sections) {
|
||||
min_addr = min<uint32_t>(min_addr, sec.address);
|
||||
max_addr = max<uint32_t>(max_addr, sec.address + sec.data.size());
|
||||
}
|
||||
|
||||
vector<pair<uint32_t, string>> ret;
|
||||
for (uint32_t addr = min_addr; addr < max_addr; addr += 4) {
|
||||
bool a_exists = a_mem->exists(addr, 4);
|
||||
bool b_exists = b_mem->exists(addr, 4);
|
||||
if (a_exists && b_exists) {
|
||||
string a_value = a_mem->read(addr, 4);
|
||||
string b_value = b_mem->read(addr, 4);
|
||||
if (a_value != b_value) {
|
||||
if (!ret.empty() && (ret.back().first + ret.back().second.size() == addr)) {
|
||||
ret.back().second += b_value;
|
||||
} else {
|
||||
ret.emplace_back(make_pair(addr, b_value));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
void run_ar_code_translator(const std::string& initial_directory, const std::string& use_file, const std::string& command);
|
||||
std::vector<std::pair<uint32_t, std::string>> diff_dol_files(const std::string& a_filename, const std::string& b_filename);
|
||||
+1064
File diff suppressed because it is too large
Load Diff
+306
@@ -0,0 +1,306 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <phosg/Hash.hh>
|
||||
#include <phosg/JSON.hh>
|
||||
#include <shared_mutex>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "Text.hh"
|
||||
|
||||
class LicenseIndex;
|
||||
|
||||
struct DCNTELicense {
|
||||
std::string serial_number;
|
||||
std::string access_key;
|
||||
|
||||
inline uint64_t proxy_session_id_part() const {
|
||||
return phosg::fnv1a32(this->serial_number);
|
||||
}
|
||||
|
||||
static std::shared_ptr<DCNTELicense> from_json(const phosg::JSON& json);
|
||||
phosg::JSON json() const;
|
||||
};
|
||||
|
||||
struct V1V2License {
|
||||
uint32_t serial_number = 0;
|
||||
std::string access_key;
|
||||
|
||||
inline uint64_t proxy_session_id_part() const {
|
||||
return this->serial_number;
|
||||
}
|
||||
|
||||
static std::shared_ptr<V1V2License> from_json(const phosg::JSON& json);
|
||||
phosg::JSON json() const;
|
||||
};
|
||||
|
||||
struct GCLicense {
|
||||
uint32_t serial_number = 0;
|
||||
std::string access_key;
|
||||
std::string password;
|
||||
|
||||
inline uint64_t proxy_session_id_part() const {
|
||||
return this->serial_number;
|
||||
}
|
||||
|
||||
static std::shared_ptr<GCLicense> from_json(const phosg::JSON& json);
|
||||
phosg::JSON json() const;
|
||||
};
|
||||
|
||||
struct XBLicense {
|
||||
std::string gamertag;
|
||||
uint64_t user_id = 0;
|
||||
uint64_t account_id = 0;
|
||||
|
||||
inline uint64_t proxy_session_id_part() const {
|
||||
return phosg::fnv1a32(this->gamertag);
|
||||
}
|
||||
|
||||
static std::shared_ptr<XBLicense> from_json(const phosg::JSON& json);
|
||||
phosg::JSON json() const;
|
||||
};
|
||||
|
||||
struct BBLicense {
|
||||
std::string username;
|
||||
std::string password;
|
||||
|
||||
inline uint64_t proxy_session_id_part() const {
|
||||
return phosg::fnv1a32(this->username);
|
||||
}
|
||||
|
||||
static std::shared_ptr<BBLicense> from_json(const phosg::JSON& json);
|
||||
phosg::JSON json() const;
|
||||
};
|
||||
|
||||
struct Account {
|
||||
enum class Flag : uint32_t {
|
||||
// clang-format off
|
||||
KICK_USER = 0x00000001,
|
||||
BAN_USER = 0x00000002,
|
||||
SILENCE_USER = 0x00000004,
|
||||
CHANGE_EVENT = 0x00000010,
|
||||
ANNOUNCE = 0x00000020,
|
||||
FREE_JOIN_GAMES = 0x00000040,
|
||||
DEBUG = 0x01000000,
|
||||
CHEAT_ANYWHERE = 0x02000000,
|
||||
DISABLE_QUEST_REQUIREMENTS = 0x04000000,
|
||||
ALWAYS_ENABLE_CHAT_COMMANDS = 0x08000000,
|
||||
MODERATOR = 0x00000007,
|
||||
ADMINISTRATOR = 0x000000FF,
|
||||
ROOT = 0x7FFFFFFF,
|
||||
IS_SHARED_ACCOUNT = 0x80000000,
|
||||
// NOTE: When adding or changing license flags, don't forget to change the
|
||||
// documentation in the shell's help text.
|
||||
UNUSED_BITS = 0x70FFFF00,
|
||||
// clang-format on
|
||||
};
|
||||
enum class UserFlag : uint32_t {
|
||||
DISABLE_DROP_NOTIFICATION_BROADCAST = 0x00000001,
|
||||
};
|
||||
|
||||
// account_id is also the account's guild card number
|
||||
uint32_t account_id = 0;
|
||||
|
||||
uint32_t flags = 0;
|
||||
uint32_t user_flags = 0;
|
||||
uint64_t ban_end_time = 0; // 0 = not banned
|
||||
std::string last_player_name;
|
||||
std::string auto_reply_message;
|
||||
|
||||
uint32_t ep3_current_meseta = 0;
|
||||
uint32_t ep3_total_meseta_earned = 0;
|
||||
|
||||
uint32_t bb_team_id = 0;
|
||||
bool is_temporary = false; // If true, isn't saved to disk
|
||||
|
||||
std::unordered_set<std::string> auto_patches_enabled;
|
||||
|
||||
std::unordered_map<std::string, std::shared_ptr<DCNTELicense>> dc_nte_licenses;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<V1V2License>> dc_licenses;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<V1V2License>> pc_licenses;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<GCLicense>> gc_licenses;
|
||||
std::unordered_map<uint64_t, std::shared_ptr<XBLicense>> xb_licenses;
|
||||
std::unordered_map<std::string, std::shared_ptr<BBLicense>> bb_licenses;
|
||||
|
||||
Account() = default;
|
||||
explicit Account(const phosg::JSON& json);
|
||||
virtual ~Account() = default;
|
||||
|
||||
phosg::JSON json() const;
|
||||
virtual void save() const;
|
||||
virtual void delete_file() const;
|
||||
|
||||
[[nodiscard]] inline bool check_flag(Flag flag) const {
|
||||
return !!(this->flags & static_cast<uint32_t>(flag));
|
||||
}
|
||||
inline void set_flag(Flag flag) {
|
||||
this->flags |= static_cast<uint32_t>(flag);
|
||||
}
|
||||
inline void clear_flag(Flag flag) {
|
||||
this->flags &= (~static_cast<uint32_t>(flag));
|
||||
}
|
||||
inline void toggle_flag(Flag flag) {
|
||||
this->flags ^= static_cast<uint32_t>(flag);
|
||||
}
|
||||
inline void replace_all_flags(Flag mask) {
|
||||
this->flags = static_cast<uint32_t>(mask);
|
||||
}
|
||||
|
||||
[[nodiscard]] inline bool check_user_flag(UserFlag flag) const {
|
||||
return !!(this->user_flags & static_cast<uint32_t>(flag));
|
||||
}
|
||||
inline void set_user_flag(UserFlag flag) {
|
||||
this->user_flags |= static_cast<uint32_t>(flag);
|
||||
}
|
||||
inline void clear_user_flag(UserFlag flag) {
|
||||
this->user_flags &= (~static_cast<uint32_t>(flag));
|
||||
}
|
||||
inline void toggle_user_flag(UserFlag flag) {
|
||||
this->user_flags ^= static_cast<uint32_t>(flag);
|
||||
}
|
||||
|
||||
std::string str() const;
|
||||
};
|
||||
|
||||
struct Login {
|
||||
bool account_was_created = false;
|
||||
// This field will never be null
|
||||
std::shared_ptr<Account> account;
|
||||
// Exactly one of the following will be non-null, representing the license
|
||||
// that the client logged in with
|
||||
std::shared_ptr<DCNTELicense> dc_nte_license;
|
||||
std::shared_ptr<V1V2License> dc_license;
|
||||
std::shared_ptr<V1V2License> pc_license;
|
||||
std::shared_ptr<GCLicense> gc_license;
|
||||
std::shared_ptr<XBLicense> xb_license;
|
||||
std::shared_ptr<BBLicense> bb_license;
|
||||
|
||||
uint64_t proxy_session_id() const;
|
||||
|
||||
std::string str() const;
|
||||
};
|
||||
|
||||
class AccountIndex {
|
||||
public:
|
||||
class no_username : public std::invalid_argument {
|
||||
public:
|
||||
no_username() : invalid_argument("serial number is zero or username is missing") {}
|
||||
};
|
||||
class incorrect_password : public std::invalid_argument {
|
||||
public:
|
||||
incorrect_password() : invalid_argument("incorrect password") {}
|
||||
};
|
||||
class incorrect_access_key : public std::invalid_argument {
|
||||
public:
|
||||
incorrect_access_key() : invalid_argument("incorrect access key") {}
|
||||
};
|
||||
class missing_account : public std::invalid_argument {
|
||||
public:
|
||||
missing_account() : invalid_argument("missing account") {}
|
||||
};
|
||||
class account_banned : public std::invalid_argument {
|
||||
public:
|
||||
account_banned() : invalid_argument("account is banned") {}
|
||||
};
|
||||
|
||||
explicit AccountIndex(bool force_all_temporary);
|
||||
virtual ~AccountIndex() = default;
|
||||
|
||||
std::shared_ptr<Account> create_account(bool is_temporary) const;
|
||||
|
||||
size_t count() const;
|
||||
std::vector<std::shared_ptr<Account>> all() const;
|
||||
|
||||
void add(std::shared_ptr<Account> a);
|
||||
void remove(uint32_t serial_number);
|
||||
|
||||
void add_dc_nte_license(std::shared_ptr<Account> account, std::shared_ptr<DCNTELicense> license);
|
||||
void add_dc_license(std::shared_ptr<Account> account, std::shared_ptr<V1V2License> license);
|
||||
void add_pc_license(std::shared_ptr<Account> account, std::shared_ptr<V1V2License> license);
|
||||
void add_gc_license(std::shared_ptr<Account> account, std::shared_ptr<GCLicense> license);
|
||||
void add_xb_license(std::shared_ptr<Account> account, std::shared_ptr<XBLicense> license);
|
||||
void add_bb_license(std::shared_ptr<Account> account, std::shared_ptr<BBLicense> license);
|
||||
void remove_dc_nte_license(std::shared_ptr<Account> account, const std::string& serial_number);
|
||||
void remove_dc_license(std::shared_ptr<Account> account, uint32_t serial_number);
|
||||
void remove_pc_license(std::shared_ptr<Account> account, uint32_t serial_number);
|
||||
void remove_gc_license(std::shared_ptr<Account> account, uint32_t serial_number);
|
||||
void remove_xb_license(std::shared_ptr<Account> account, uint64_t user_id);
|
||||
void remove_bb_license(std::shared_ptr<Account> account, const std::string& username);
|
||||
|
||||
std::shared_ptr<Account> from_account_id(uint32_t account_id) const;
|
||||
std::shared_ptr<Login> from_dc_nte_credentials(
|
||||
const std::string& serial_number,
|
||||
const std::string& access_key,
|
||||
bool allow_create);
|
||||
std::shared_ptr<Login> from_dc_credentials(
|
||||
uint32_t serial_number,
|
||||
const std::string& access_key,
|
||||
const std::string& character_name,
|
||||
bool allow_create);
|
||||
std::shared_ptr<Login> from_pc_nte_credentials(
|
||||
uint32_t guild_card_number,
|
||||
bool allow_create);
|
||||
std::shared_ptr<Login> from_pc_credentials(
|
||||
uint32_t serial_number,
|
||||
const std::string& access_key,
|
||||
const std::string& character_name,
|
||||
bool allow_create);
|
||||
std::shared_ptr<Login> from_gc_credentials(
|
||||
uint32_t serial_number,
|
||||
const std::string& access_key,
|
||||
const std::string* password,
|
||||
const std::string& character_name,
|
||||
bool allow_create);
|
||||
std::shared_ptr<Login> from_xb_credentials(
|
||||
const std::string& gamertag,
|
||||
uint64_t user_id,
|
||||
uint64_t account_id,
|
||||
bool allow_create);
|
||||
std::shared_ptr<Login> from_bb_credentials(
|
||||
const std::string& username,
|
||||
const std::string* password,
|
||||
bool allow_create);
|
||||
|
||||
std::shared_ptr<Account> create_temporary_account_for_shared_account(
|
||||
std::shared_ptr<const Account> src_a, const std::string& variation_data) const;
|
||||
|
||||
protected:
|
||||
bool force_all_temporary;
|
||||
|
||||
// This class must be thread-safe because it's used by both the patch server
|
||||
// and game server threads
|
||||
mutable std::shared_mutex lock;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<Account>> by_account_id;
|
||||
std::unordered_map<std::string, std::shared_ptr<Account>> by_dc_nte_serial_number;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<Account>> by_dc_serial_number;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<Account>> by_pc_serial_number;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<Account>> by_gc_serial_number;
|
||||
std::unordered_map<uint64_t, std::shared_ptr<Account>> by_xb_user_id;
|
||||
std::unordered_map<std::string, std::shared_ptr<Account>> by_bb_username;
|
||||
|
||||
void add_locked(std::shared_ptr<Account> a);
|
||||
|
||||
std::shared_ptr<Login> from_dc_nte_credentials_locked(
|
||||
const std::string& serial_number,
|
||||
const std::string& access_key);
|
||||
std::shared_ptr<Login> from_dc_credentials_locked(
|
||||
uint32_t serial_number,
|
||||
const std::string& access_key,
|
||||
const std::string& character_name);
|
||||
std::shared_ptr<Login> from_pc_credentials_locked(
|
||||
uint32_t serial_number,
|
||||
const std::string& access_key,
|
||||
const std::string& character_name);
|
||||
std::shared_ptr<Login> from_gc_credentials_locked(
|
||||
uint32_t serial_number,
|
||||
const std::string& access_key,
|
||||
const std::string* password,
|
||||
const std::string& character_name);
|
||||
std::shared_ptr<Login> from_xb_credentials_locked(uint64_t user_id);
|
||||
std::shared_ptr<Login> from_bb_credentials_locked(
|
||||
const std::string& username,
|
||||
const std::string* password);
|
||||
};
|
||||
@@ -0,0 +1,972 @@
|
||||
#include "AddressTranslator.hh"
|
||||
|
||||
#include <array>
|
||||
#include <filesystem>
|
||||
#include <future>
|
||||
#include <phosg/Filesystem.hh>
|
||||
#include <phosg/Strings.hh>
|
||||
#include <resource_file/Emulators/X86Emulator.hh>
|
||||
#include <resource_file/ExecutableFormats/DOLFile.hh>
|
||||
#include <resource_file/ExecutableFormats/PEFile.hh>
|
||||
#include <resource_file/ExecutableFormats/XBEFile.hh>
|
||||
|
||||
#include "Map.hh"
|
||||
#include "Text.hh"
|
||||
#include "Types.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class AddressTranslator {
|
||||
public:
|
||||
enum class ExpandMethod {
|
||||
PPC_TEXT_FORWARD = 0,
|
||||
PPC_TEXT_FORWARD_WITH_BARRIER,
|
||||
PPC_TEXT_BACKWARD,
|
||||
PPC_TEXT_BACKWARD_WITH_BARRIER,
|
||||
PPC_TEXT_BOTH,
|
||||
PPC_TEXT_BOTH_WITH_BARRIER,
|
||||
PPC_TEXT_BOTH_IGNORE_ORIGIN,
|
||||
PPC_DATA_FORWARD,
|
||||
PPC_DATA_BACKWARD,
|
||||
PPC_DATA_BOTH,
|
||||
RAW_FORWARD,
|
||||
RAW_BACKWARD,
|
||||
RAW_BOTH,
|
||||
};
|
||||
|
||||
static const char* name_for_expand_method(ExpandMethod method) {
|
||||
switch (method) {
|
||||
case ExpandMethod::PPC_TEXT_FORWARD:
|
||||
return "PPC_TEXT_FORWARD";
|
||||
case ExpandMethod::PPC_TEXT_FORWARD_WITH_BARRIER:
|
||||
return "PPC_TEXT_FORWARD_WITH_BARRIER";
|
||||
case ExpandMethod::PPC_TEXT_BACKWARD:
|
||||
return "PPC_TEXT_BACKWARD";
|
||||
case ExpandMethod::PPC_TEXT_BACKWARD_WITH_BARRIER:
|
||||
return "PPC_TEXT_BACKWARD_WITH_BARRIER";
|
||||
case ExpandMethod::PPC_TEXT_BOTH:
|
||||
return "PPC_TEXT_BOTH";
|
||||
case ExpandMethod::PPC_TEXT_BOTH_WITH_BARRIER:
|
||||
return "PPC_TEXT_BOTH_WITH_BARRIER";
|
||||
case ExpandMethod::PPC_TEXT_BOTH_IGNORE_ORIGIN:
|
||||
return "PPC_TEXT_BOTH_IGNORE_ORIGIN";
|
||||
case ExpandMethod::PPC_DATA_FORWARD:
|
||||
return "PPC_DATA_FORWARD";
|
||||
case ExpandMethod::PPC_DATA_BACKWARD:
|
||||
return "PPC_DATA_BACKWARD";
|
||||
case ExpandMethod::PPC_DATA_BOTH:
|
||||
return "PPC_DATA_BOTH";
|
||||
case ExpandMethod::RAW_FORWARD:
|
||||
return "RAW_FORWARD";
|
||||
case ExpandMethod::RAW_BACKWARD:
|
||||
return "RAW_BACKWARD";
|
||||
case ExpandMethod::RAW_BOTH:
|
||||
return "RAW_BOTH";
|
||||
default:
|
||||
throw logic_error("invalid expand method");
|
||||
}
|
||||
}
|
||||
|
||||
static bool is_ppc_expand_method(ExpandMethod method) {
|
||||
switch (method) {
|
||||
case ExpandMethod::PPC_TEXT_FORWARD:
|
||||
case ExpandMethod::PPC_TEXT_FORWARD_WITH_BARRIER:
|
||||
case ExpandMethod::PPC_TEXT_BACKWARD:
|
||||
case ExpandMethod::PPC_TEXT_BACKWARD_WITH_BARRIER:
|
||||
case ExpandMethod::PPC_TEXT_BOTH:
|
||||
case ExpandMethod::PPC_TEXT_BOTH_WITH_BARRIER:
|
||||
case ExpandMethod::PPC_TEXT_BOTH_IGNORE_ORIGIN:
|
||||
case ExpandMethod::PPC_DATA_FORWARD:
|
||||
case ExpandMethod::PPC_DATA_BACKWARD:
|
||||
case ExpandMethod::PPC_DATA_BOTH:
|
||||
return true;
|
||||
case ExpandMethod::RAW_FORWARD:
|
||||
case ExpandMethod::RAW_BACKWARD:
|
||||
case ExpandMethod::RAW_BOTH:
|
||||
return false;
|
||||
default:
|
||||
throw logic_error("invalid expand method");
|
||||
}
|
||||
}
|
||||
|
||||
static bool is_ppc_data_expand_method(ExpandMethod method) {
|
||||
switch (method) {
|
||||
case ExpandMethod::PPC_DATA_FORWARD:
|
||||
case ExpandMethod::PPC_DATA_BACKWARD:
|
||||
case ExpandMethod::PPC_DATA_BOTH:
|
||||
return true;
|
||||
case ExpandMethod::PPC_TEXT_FORWARD:
|
||||
case ExpandMethod::PPC_TEXT_FORWARD_WITH_BARRIER:
|
||||
case ExpandMethod::PPC_TEXT_BACKWARD:
|
||||
case ExpandMethod::PPC_TEXT_BACKWARD_WITH_BARRIER:
|
||||
case ExpandMethod::PPC_TEXT_BOTH:
|
||||
case ExpandMethod::PPC_TEXT_BOTH_WITH_BARRIER:
|
||||
case ExpandMethod::PPC_TEXT_BOTH_IGNORE_ORIGIN:
|
||||
case ExpandMethod::RAW_FORWARD:
|
||||
case ExpandMethod::RAW_BACKWARD:
|
||||
case ExpandMethod::RAW_BOTH:
|
||||
return false;
|
||||
default:
|
||||
throw logic_error("invalid expand method");
|
||||
}
|
||||
}
|
||||
|
||||
AddressTranslator(const string& directory)
|
||||
: log("[addr-trans] "),
|
||||
directory(directory) {
|
||||
while (this->directory.ends_with("/")) {
|
||||
this->directory.pop_back();
|
||||
}
|
||||
for (const auto& item : std::filesystem::directory_iterator(this->directory)) {
|
||||
string filename = item.path().filename().string();
|
||||
if (filename.size() < 4) {
|
||||
continue;
|
||||
}
|
||||
string name = filename.substr(0, filename.size() - 4);
|
||||
string path = directory + "/" + filename;
|
||||
|
||||
if (filename.ends_with(".dol")) {
|
||||
ResourceDASM::DOLFile dol(path.c_str());
|
||||
auto mem = make_shared<ResourceDASM::MemoryContext>();
|
||||
dol.load_into(mem);
|
||||
this->mems.emplace(name, mem);
|
||||
this->ppc_mems.emplace(mem);
|
||||
this->log.info_f("Loaded {}", name);
|
||||
} else if (filename.ends_with(".xbe")) {
|
||||
ResourceDASM::XBEFile xbe(path.c_str());
|
||||
auto mem = make_shared<ResourceDASM::MemoryContext>();
|
||||
xbe.load_into(mem);
|
||||
this->mems.emplace(name, mem);
|
||||
this->log.info_f("Loaded {}", name);
|
||||
} else if (filename.ends_with(".exe")) {
|
||||
ResourceDASM::PEFile pe(path.c_str());
|
||||
auto mem = make_shared<ResourceDASM::MemoryContext>();
|
||||
pe.load_into(mem);
|
||||
this->mems.emplace(name, mem);
|
||||
this->log.info_f("Loaded {}", name);
|
||||
} else if (filename.ends_with(".bin")) {
|
||||
string data = phosg::load_file(path);
|
||||
auto mem = make_shared<ResourceDASM::MemoryContext>();
|
||||
mem->allocate_at(0x8C010000, data.size());
|
||||
mem->memcpy(0x8C010000, data.data(), data.size());
|
||||
this->mems.emplace(name, mem);
|
||||
this->log.info_f("Loaded {}", name);
|
||||
}
|
||||
}
|
||||
}
|
||||
~AddressTranslator() = default;
|
||||
|
||||
const string& get_source_filename() const {
|
||||
return this->src_filename;
|
||||
}
|
||||
void set_source_file(const string& filename) {
|
||||
this->src_filename = filename;
|
||||
this->src_mem = this->mems.at(this->src_filename);
|
||||
}
|
||||
|
||||
void find_ppc_rtoc_global_regs() const {
|
||||
for (const auto& it : this->mems) {
|
||||
bool r2_high_found = false;
|
||||
bool r2_low_found = false;
|
||||
bool r13_high_found = false;
|
||||
bool r13_low_found = false;
|
||||
uint32_t r2 = 0;
|
||||
uint32_t r13 = 0;
|
||||
for (const auto& block : it.second->allocated_blocks()) {
|
||||
phosg::StringReader r = it.second->reader(block.first, block.second);
|
||||
while (!r.eof() && r.where()) {
|
||||
uint32_t opcode = r.get_u32b();
|
||||
if ((opcode & 0xFFFF0000) == 0x3DA00000) {
|
||||
if (r13_high_found) {
|
||||
throw runtime_error("multiple values for r13_high");
|
||||
}
|
||||
r13_high_found = true;
|
||||
r13 |= (opcode << 16);
|
||||
} else if ((opcode & 0xFFFF0000) == 0x3C400000) {
|
||||
if (r2_high_found) {
|
||||
throw runtime_error("multiple values for r2_high");
|
||||
}
|
||||
r2_high_found = true;
|
||||
r2 |= (opcode << 16);
|
||||
} else if ((opcode & 0xFFFF0000) == 0x61AD0000) {
|
||||
if (r13_low_found) {
|
||||
throw runtime_error("multiple values for r13_low");
|
||||
}
|
||||
r13_low_found = true;
|
||||
r13 |= (opcode & 0xFFFF);
|
||||
} else if ((opcode & 0xFFFF0000) == 0x60420000) {
|
||||
if (r2_low_found) {
|
||||
throw runtime_error("multiple values for r2_low");
|
||||
}
|
||||
r2_low_found = true;
|
||||
r2 |= (opcode & 0xFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (r2_low_found && r2_high_found) {
|
||||
phosg::fwrite_fmt(stderr, "({}) r2 = {:08X}\n", it.first, r2);
|
||||
} else {
|
||||
phosg::fwrite_fmt(stderr, "({}) r2 = __MISSING__\n", it.first);
|
||||
}
|
||||
if (r13_low_found && r13_high_found) {
|
||||
phosg::fwrite_fmt(stderr, "({}) r13 = {:08X}\n", it.first, r13);
|
||||
} else {
|
||||
phosg::fwrite_fmt(stderr, "({}) r13 = __MISSING__\n", it.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ParseDATConstructorTableSpec {
|
||||
string src_name;
|
||||
uint32_t index_addr;
|
||||
size_t num_areas;
|
||||
bool has_names;
|
||||
vector<uint32_t> x86_constructor_calls;
|
||||
|
||||
ParseDATConstructorTableSpec(const phosg::JSON& json) {
|
||||
this->src_name = json.at("SourceName").as_string();
|
||||
this->index_addr = json.at("IndexAddress").as_int();
|
||||
this->num_areas = json.at("AreaCount").as_int();
|
||||
this->has_names = json.at("HasNames").as_bool();
|
||||
for (const auto& z : json.at("X86ConstructorCalls").as_list()) {
|
||||
this->x86_constructor_calls.emplace_back(z->as_int());
|
||||
}
|
||||
}
|
||||
|
||||
static vector<ParseDATConstructorTableSpec> from_json_list(const phosg::JSON& json) {
|
||||
vector<ParseDATConstructorTableSpec> ret;
|
||||
for (const auto& z : json.as_list()) {
|
||||
ret.emplace_back(*z);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
template <bool BE>
|
||||
struct DATConstructorTableEntry {
|
||||
static constexpr bool IsBE = BE;
|
||||
|
||||
U16T<BE> type;
|
||||
U16T<BE> unknown_a1;
|
||||
U32T<BE> constructor_addr;
|
||||
F32T<BE> unknown_a2;
|
||||
U32T<BE> default_num_children;
|
||||
} __attribute__((packed));
|
||||
|
||||
template <bool BE>
|
||||
struct DATConstructorTableEntryWithName {
|
||||
static constexpr bool IsBE = BE;
|
||||
|
||||
pstring<TextEncoding::ASCII, 0x10> debug_name;
|
||||
U16T<BE> type;
|
||||
U16T<BE> unknown_a1;
|
||||
U32T<BE> constructor_addr;
|
||||
F32T<BE> unknown_a2;
|
||||
U32T<BE> default_num_children;
|
||||
} __attribute__((packed));
|
||||
|
||||
// Returns {type: {constructor_addr: [(start_area, end_area), ...]}}
|
||||
template <typename EntryT>
|
||||
map<uint32_t, map<uint32_t, vector<pair<size_t, size_t>>>>
|
||||
parse_dat_constructor_table_t(
|
||||
shared_ptr<const ResourceDASM::MemoryContext>& mem,
|
||||
const ParseDATConstructorTableSpec& spec) {
|
||||
if (!mem) {
|
||||
throw runtime_error("no file selected");
|
||||
}
|
||||
|
||||
// On some of the x86 builds of the game (PCv2 and Xbox), the constructor
|
||||
// tables aren't entirely static in the data sections - some parts are
|
||||
// written during static initialization instead. To handle this, we make a
|
||||
// copy of the immutable MemoryContext and run the static initialization
|
||||
// functions using resource_dasm's emulator before parsing the constructor
|
||||
// table.
|
||||
shared_ptr<const ResourceDASM::MemoryContext> effective_mem = mem;
|
||||
if (!spec.x86_constructor_calls.empty()) {
|
||||
auto constructed_mem = make_shared<ResourceDASM::MemoryContext>(mem->duplicate());
|
||||
uint32_t esp = constructed_mem->allocate(0x1000) + 0x1000;
|
||||
for (uint32_t constructor_addr : spec.x86_constructor_calls) {
|
||||
ResourceDASM::X86Emulator emu(constructed_mem);
|
||||
|
||||
// Uncomment for debugging
|
||||
// auto debugger = make_shared<ResourceDASM::EmulatorDebugger<ResourceDASM::X86Emulator>>();
|
||||
// debugger->bind(emu);
|
||||
// debugger->state.mode = ResourceDASM::DebuggerMode::TRACE;
|
||||
|
||||
auto& regs = emu.registers();
|
||||
regs.eip = constructor_addr;
|
||||
regs.esp().u = esp - 4;
|
||||
constructed_mem->write_u32l(esp - 4, 0xFFFFFFFF); // Return addr
|
||||
try {
|
||||
emu.execute();
|
||||
} catch (const out_of_range&) {
|
||||
if (regs.eip != 0xFFFFFFFF) {
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
effective_mem = constructed_mem;
|
||||
}
|
||||
|
||||
map<uint32_t, map<uint32_t, vector<pair<size_t, size_t>>>> table;
|
||||
|
||||
auto index_r = effective_mem->reader(spec.index_addr, spec.num_areas * sizeof(uint32_t));
|
||||
for (size_t area = 0; area < spec.num_areas; area++) {
|
||||
uint32_t entries_addr = EntryT::IsBE ? index_r.get_u32b() : index_r.get_u32l();
|
||||
if (!entries_addr) {
|
||||
continue;
|
||||
}
|
||||
auto entries_r = effective_mem->reader(entries_addr, 0x4000); // 0x4000 is probably enough
|
||||
while (!entries_r.eof()) {
|
||||
const auto& entry = entries_r.get<EntryT>();
|
||||
if (entry.type == 0xFFFF) {
|
||||
break;
|
||||
}
|
||||
auto& group = table[entry.type][entry.constructor_addr];
|
||||
if (!group.empty() && (group.back().second == (area - 1))) {
|
||||
group.back().second = area;
|
||||
} else {
|
||||
group.emplace_back(make_pair(area, area));
|
||||
}
|
||||
}
|
||||
if (entries_r.eof()) {
|
||||
throw runtime_error("did not find end-of-entries marker");
|
||||
}
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
static uint64_t area_mask_for_ranges(const vector<pair<size_t, size_t>>& ranges) {
|
||||
uint64_t ret = 0;
|
||||
for (const auto& [start, end] : ranges) {
|
||||
for (size_t z = start; z <= end; z++) {
|
||||
ret |= static_cast<uint64_t>(1ULL << z);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void parse_dat_constructor_table(const ParseDATConstructorTableSpec& spec) {
|
||||
map<uint32_t, map<uint32_t, vector<pair<size_t, size_t>>>> table;
|
||||
auto spec_mem = this->mems.at(spec.src_name);
|
||||
if (this->ppc_mems.count(spec_mem)) {
|
||||
table = this->parse_dat_constructor_table_t<DATConstructorTableEntry<true>>(spec_mem, spec);
|
||||
} else if (!spec.has_names) {
|
||||
table = this->parse_dat_constructor_table_t<DATConstructorTableEntry<false>>(spec_mem, spec);
|
||||
} else {
|
||||
table = this->parse_dat_constructor_table_t<DATConstructorTableEntryWithName<false>>(spec_mem, spec);
|
||||
}
|
||||
|
||||
for (const auto& [type, constructor_to_area_ranges] : table) {
|
||||
phosg::fwrite_fmt(stdout, "{:04X} =>", type);
|
||||
for (const auto& [constructor, area_ranges] : constructor_to_area_ranges) {
|
||||
phosg::fwrite_fmt(stdout, " {:08X}", constructor);
|
||||
bool is_first = true;
|
||||
for (const auto& [start, end] : area_ranges) {
|
||||
fputc(is_first ? ':' : ',', stdout);
|
||||
if (start == end) {
|
||||
phosg::fwrite_fmt(stdout, "{:02X}", start);
|
||||
} else {
|
||||
phosg::fwrite_fmt(stdout, "{:02X}-{:02X}", start, end);
|
||||
}
|
||||
is_first = false;
|
||||
}
|
||||
}
|
||||
fputc('\n', stdout);
|
||||
}
|
||||
}
|
||||
|
||||
void parse_dat_constructor_table_multi(
|
||||
const vector<ParseDATConstructorTableSpec>& specs, bool is_enemies, bool print_area_masks) {
|
||||
map<string, map<uint32_t, map<uint32_t, vector<pair<size_t, size_t>>>>> all_tables;
|
||||
for (const auto& spec : specs) {
|
||||
map<uint32_t, map<uint32_t, vector<pair<size_t, size_t>>>> table;
|
||||
auto spec_mem = this->mems.at(spec.src_name);
|
||||
if (this->ppc_mems.count(spec_mem)) {
|
||||
table = this->parse_dat_constructor_table_t<DATConstructorTableEntry<true>>(spec_mem, spec);
|
||||
} else if (!spec.has_names) {
|
||||
table = this->parse_dat_constructor_table_t<DATConstructorTableEntry<false>>(spec_mem, spec);
|
||||
} else {
|
||||
table = this->parse_dat_constructor_table_t<DATConstructorTableEntryWithName<false>>(spec_mem, spec);
|
||||
}
|
||||
all_tables.emplace(spec.src_name, std::move(table));
|
||||
}
|
||||
|
||||
map<string, size_t> version_widths;
|
||||
map<uint32_t, map<string, string>> formatted_cells_for_type;
|
||||
for (const auto& spec : specs) {
|
||||
const auto& table = all_tables.at(spec.src_name);
|
||||
size_t max_width = 0;
|
||||
|
||||
for (const auto& [type, constructor_to_area_ranges] : table) {
|
||||
string cell_data;
|
||||
for (const auto& [constructor, area_ranges] : constructor_to_area_ranges) {
|
||||
if (!cell_data.empty()) {
|
||||
cell_data.push_back(' ');
|
||||
}
|
||||
cell_data += std::format("{:08X}", constructor);
|
||||
if (print_area_masks) {
|
||||
cell_data += std::format(":{:016X}", this->area_mask_for_ranges(area_ranges));
|
||||
} else {
|
||||
bool is_first = true;
|
||||
for (const auto& [start, end] : area_ranges) {
|
||||
cell_data.push_back(is_first ? ':' : ',');
|
||||
if (start == end) {
|
||||
cell_data += std::format("{:02X}", start);
|
||||
} else {
|
||||
cell_data += std::format("{:02X}-{:02X}", start, end);
|
||||
}
|
||||
is_first = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
max_width = max<size_t>(max_width, cell_data.size());
|
||||
formatted_cells_for_type[type][spec.src_name] = std::move(cell_data);
|
||||
}
|
||||
version_widths[spec.src_name] = max_width;
|
||||
}
|
||||
|
||||
vector<string> formatted_lines;
|
||||
string header_line = "TYPE =>";
|
||||
for (const auto& spec : specs) {
|
||||
size_t width = version_widths.at(spec.src_name);
|
||||
header_line.push_back(' ');
|
||||
header_line += spec.src_name;
|
||||
if (width > spec.src_name.size()) {
|
||||
header_line.resize(header_line.size() + (width - spec.src_name.size()), '-');
|
||||
}
|
||||
}
|
||||
header_line += " NAME";
|
||||
|
||||
for (const auto& [type, formatted_cells] : formatted_cells_for_type) {
|
||||
string line = std::format("{:04X} =>", type);
|
||||
for (const auto& spec : specs) {
|
||||
size_t width = version_widths.at(spec.src_name);
|
||||
try {
|
||||
const auto& cell_data = formatted_cells.at(spec.src_name);
|
||||
line.push_back(' ');
|
||||
line += cell_data;
|
||||
if (width > cell_data.size()) {
|
||||
line.resize(line.size() + (width - cell_data.size()), ' ');
|
||||
}
|
||||
} catch (const out_of_range&) {
|
||||
line.resize(line.size() + (width + 1), ' ');
|
||||
}
|
||||
}
|
||||
line.push_back(' ');
|
||||
line += is_enemies
|
||||
? MapFile::name_for_enemy_type(type)
|
||||
: MapFile::name_for_object_type(type);
|
||||
|
||||
if ((formatted_lines.size() % 40) == 0) {
|
||||
formatted_lines.emplace_back(header_line);
|
||||
}
|
||||
formatted_lines.emplace_back(std::move(line));
|
||||
}
|
||||
|
||||
for (auto& line : formatted_lines) {
|
||||
phosg::strip_trailing_whitespace(line);
|
||||
phosg::fwrite_fmt(stdout, "{}\n", line);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t find_match(
|
||||
shared_ptr<const ResourceDASM::MemoryContext> dest_mem,
|
||||
uint32_t src_addr,
|
||||
uint32_t src_size,
|
||||
ExpandMethod expand_method) const {
|
||||
bool is_ppc = this->is_ppc_expand_method(expand_method);
|
||||
bool is_ppc_data = this->is_ppc_data_expand_method(expand_method);
|
||||
if (!this->src_mem) {
|
||||
throw runtime_error("no source file selected");
|
||||
}
|
||||
|
||||
if (src_size == 0) {
|
||||
src_size = is_ppc ? 4 : 1;
|
||||
}
|
||||
|
||||
pair<uint32_t, uint32_t> src_section = make_pair(0, 0);
|
||||
for (const auto& sec : this->src_mem->allocated_blocks()) {
|
||||
if (src_addr >= sec.first && src_addr + src_size <= sec.first + sec.second) {
|
||||
src_section = sec;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!src_section.second) {
|
||||
throw runtime_error("source address not within any section");
|
||||
}
|
||||
|
||||
const char* method_token = this->name_for_expand_method(expand_method);
|
||||
|
||||
size_t src_offset = src_addr - src_section.first;
|
||||
size_t src_bytes_available_before = src_offset;
|
||||
size_t src_bytes_available_after = src_section.second - src_offset - 4;
|
||||
this->log.info_f("(find_match/{}) Source offset = {:08X} with {:X}/{:X} bytes available before/after",
|
||||
method_token, src_offset, src_bytes_available_before, src_bytes_available_after);
|
||||
|
||||
size_t match_bytes_before = 0;
|
||||
size_t match_bytes_after = 0;
|
||||
while (match_bytes_before + match_bytes_after + 4 < 0x100) {
|
||||
size_t num_matches = 0;
|
||||
size_t last_match_address = 0;
|
||||
size_t match_length = match_bytes_before + match_bytes_after + 4;
|
||||
phosg::StringReader src_r = this->src_mem->reader(src_section.first + src_offset - match_bytes_before, match_length);
|
||||
for (const auto& dest_section : dest_mem->allocated_blocks()) {
|
||||
for (size_t dest_match_offset = 0;
|
||||
dest_match_offset + match_length < dest_section.second;
|
||||
dest_match_offset += (is_ppc ? 4 : 1)) {
|
||||
src_r.go(0);
|
||||
phosg::StringReader dest_r = dest_mem->reader(dest_section.first + dest_match_offset, match_length);
|
||||
size_t z;
|
||||
if (is_ppc) {
|
||||
for (z = 0; z < match_length; z += 4) {
|
||||
if ((expand_method == ExpandMethod::PPC_TEXT_BOTH_IGNORE_ORIGIN) && (z == match_bytes_before)) {
|
||||
src_r.skip(4);
|
||||
dest_r.skip(4);
|
||||
} else if (!is_ppc_data) {
|
||||
uint32_t src_opcode = src_r.get_u32b();
|
||||
uint32_t dest_opcode = dest_r.get_u32b();
|
||||
uint32_t src_class = src_opcode & 0xFC000000;
|
||||
if (src_class != (dest_opcode & 0xFC000000)) {
|
||||
break;
|
||||
}
|
||||
if (src_class == 0x48000000) {
|
||||
// b +-offset
|
||||
src_opcode &= 0xFC000003;
|
||||
dest_opcode &= 0xFC000003;
|
||||
} else if (((src_opcode & 0xAC1F0000) == 0x800D0000) || ((src_opcode & 0xAC1F0000) == 0x80020000)) {
|
||||
// lwz/lfs rXX/fXX, [r2/r13 +- offset] OR stw/stfs [r2/r13 +- offset], rXX/fXX
|
||||
src_opcode &= 0xFFFF0000;
|
||||
dest_opcode &= 0xFFFF0000;
|
||||
}
|
||||
if (src_opcode != dest_opcode) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
uint32_t src_data = src_r.get_u32b();
|
||||
uint32_t dest_data = dest_r.get_u32b();
|
||||
if ((src_data & 0xFE000000) == 0x80000000) {
|
||||
src_data &= 0xFE000003;
|
||||
}
|
||||
if ((dest_data & 0xFE000000) == 0x80000000) {
|
||||
dest_data &= 0xFE000003;
|
||||
}
|
||||
if (src_data != dest_data) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (z = 0; z < match_length; z++) {
|
||||
uint8_t src_data = src_r.get_u8();
|
||||
uint8_t dest_data = dest_r.get_u8();
|
||||
if (src_data != dest_data) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (z == match_length) {
|
||||
num_matches++;
|
||||
last_match_address = dest_section.first + dest_match_offset + match_bytes_before;
|
||||
}
|
||||
}
|
||||
}
|
||||
this->log.info_f("(find_match/{}) For match length {:X}, {} matches found", method_token, match_length, num_matches);
|
||||
if (num_matches == 1) {
|
||||
return last_match_address;
|
||||
} else if (num_matches == 0) {
|
||||
throw runtime_error("did not find exactly one match");
|
||||
}
|
||||
bool can_expand_backward = false;
|
||||
bool can_expand_forward = false;
|
||||
switch (expand_method) {
|
||||
case ExpandMethod::PPC_TEXT_BACKWARD_WITH_BARRIER:
|
||||
can_expand_backward = (src_r.pget_u32b(0) != 0x4E800020) &&
|
||||
(src_bytes_available_before >= match_bytes_before + 4);
|
||||
break;
|
||||
case ExpandMethod::PPC_TEXT_BACKWARD:
|
||||
case ExpandMethod::PPC_DATA_BACKWARD:
|
||||
can_expand_backward = (src_bytes_available_before >= match_bytes_before + 4);
|
||||
break;
|
||||
case ExpandMethod::PPC_TEXT_FORWARD_WITH_BARRIER:
|
||||
can_expand_forward = (src_r.pget_u32b(src_r.size() - 4) != 0x4E800020) &&
|
||||
(src_bytes_available_after >= match_bytes_after + 4);
|
||||
break;
|
||||
case ExpandMethod::PPC_TEXT_FORWARD:
|
||||
case ExpandMethod::PPC_DATA_FORWARD:
|
||||
can_expand_forward = (src_bytes_available_after >= match_bytes_after + 4);
|
||||
break;
|
||||
case ExpandMethod::PPC_TEXT_BOTH_WITH_BARRIER:
|
||||
case ExpandMethod::PPC_TEXT_BOTH_IGNORE_ORIGIN:
|
||||
can_expand_backward = (src_r.pget_u32b(0) != 0x4E800020) &&
|
||||
(src_bytes_available_before >= match_bytes_before + 4);
|
||||
can_expand_forward = (src_r.pget_u32b(src_r.size() - 4) != 0x4E800020) &&
|
||||
(src_bytes_available_after >= match_bytes_after + 4);
|
||||
break;
|
||||
case ExpandMethod::PPC_TEXT_BOTH:
|
||||
case ExpandMethod::PPC_DATA_BOTH:
|
||||
can_expand_backward = (src_bytes_available_before >= match_bytes_before + 4);
|
||||
can_expand_forward = (src_bytes_available_after >= match_bytes_after + 4);
|
||||
break;
|
||||
case ExpandMethod::RAW_BACKWARD:
|
||||
can_expand_backward = (src_bytes_available_before > match_bytes_before);
|
||||
break;
|
||||
case ExpandMethod::RAW_FORWARD:
|
||||
can_expand_forward = (src_bytes_available_after > match_bytes_after);
|
||||
break;
|
||||
case ExpandMethod::RAW_BOTH:
|
||||
can_expand_backward = (src_bytes_available_before > match_bytes_before);
|
||||
can_expand_forward = (src_bytes_available_after > match_bytes_after);
|
||||
break;
|
||||
default:
|
||||
throw logic_error("invalid expand method");
|
||||
}
|
||||
if (!can_expand_backward && !can_expand_forward) {
|
||||
throw runtime_error("no further expansion is allowed");
|
||||
}
|
||||
if (can_expand_backward) {
|
||||
match_bytes_before += (is_ppc ? 4 : 1);
|
||||
}
|
||||
if (can_expand_forward) {
|
||||
match_bytes_after += (is_ppc ? 4 : 1);
|
||||
}
|
||||
}
|
||||
throw runtime_error("scan field too long; too many matches");
|
||||
}
|
||||
|
||||
void find_all_matches(uint32_t src_addr, uint32_t src_size) const {
|
||||
if (!this->src_mem) {
|
||||
throw runtime_error("no source file selected");
|
||||
}
|
||||
|
||||
map<string, uint32_t> results;
|
||||
for (const auto& it : this->mems) {
|
||||
if (it.second == this->src_mem) {
|
||||
log.info_f("({}) {:08X} (from source)", it.first, src_addr);
|
||||
results.emplace(it.first, src_addr);
|
||||
|
||||
} else {
|
||||
vector<future<uint32_t>> futures;
|
||||
static const vector<ExpandMethod> ppc_methods = {
|
||||
ExpandMethod::PPC_TEXT_FORWARD,
|
||||
ExpandMethod::PPC_TEXT_FORWARD_WITH_BARRIER,
|
||||
ExpandMethod::PPC_TEXT_BACKWARD,
|
||||
ExpandMethod::PPC_TEXT_BACKWARD_WITH_BARRIER,
|
||||
ExpandMethod::PPC_TEXT_BOTH,
|
||||
ExpandMethod::PPC_TEXT_BOTH_WITH_BARRIER,
|
||||
ExpandMethod::PPC_TEXT_BOTH_IGNORE_ORIGIN,
|
||||
ExpandMethod::PPC_DATA_FORWARD,
|
||||
ExpandMethod::PPC_DATA_BACKWARD,
|
||||
ExpandMethod::PPC_DATA_BOTH,
|
||||
};
|
||||
static const vector<ExpandMethod> raw_methods = {
|
||||
ExpandMethod::RAW_FORWARD,
|
||||
ExpandMethod::RAW_BACKWARD,
|
||||
ExpandMethod::RAW_BOTH,
|
||||
};
|
||||
const auto& methods = this->ppc_mems.count(it.second) ? ppc_methods : raw_methods;
|
||||
for (size_t z = 0; z < methods.size(); z++) {
|
||||
futures.emplace_back(async(&AddressTranslator::find_match, this, it.second, src_addr, src_size, methods[z]));
|
||||
}
|
||||
|
||||
unordered_set<uint32_t> match_addrs;
|
||||
for (size_t z = 0; z < futures.size(); z++) {
|
||||
const char* method_name = this->name_for_expand_method(methods[z]);
|
||||
try {
|
||||
uint32_t ret = futures[z].get();
|
||||
log.info_f("({}) ({}) {:08X}", it.first, method_name, ret);
|
||||
match_addrs.emplace(ret);
|
||||
} catch (const exception& e) {
|
||||
log.error_f("({}) ({}) failed: {}", it.first, method_name, e.what());
|
||||
}
|
||||
}
|
||||
|
||||
if (match_addrs.empty()) {
|
||||
log.error_f("({}) no match found", it.first);
|
||||
} else if (match_addrs.size() > 1) {
|
||||
log.error_f("({}) different matches found by different methods", it.first);
|
||||
} else {
|
||||
results.emplace(it.first, *match_addrs.begin());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const auto& it : results) {
|
||||
phosg::fwrite_fmt(stdout, "{} => {:08X}\n", it.first, it.second);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t find_be_to_le_data_match(
|
||||
shared_ptr<const ResourceDASM::MemoryContext> dest_mem,
|
||||
uint32_t src_addr,
|
||||
uint32_t src_size) const {
|
||||
if (src_size == 0) {
|
||||
src_size = 4;
|
||||
}
|
||||
|
||||
pair<uint32_t, uint32_t> src_section = make_pair(0, 0);
|
||||
for (const auto& sec : this->src_mem->allocated_blocks()) {
|
||||
if (src_addr >= sec.first && src_addr + src_size <= sec.first + sec.second) {
|
||||
src_section = sec;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!src_section.second) {
|
||||
throw runtime_error("source address not within any section");
|
||||
}
|
||||
|
||||
size_t src_offset = src_addr - src_section.first;
|
||||
size_t src_bytes_available_before = src_offset;
|
||||
size_t src_bytes_available_after = src_section.second - src_offset - 4;
|
||||
|
||||
size_t match_bytes_before = 0;
|
||||
size_t match_bytes_after = 0;
|
||||
while (match_bytes_before + match_bytes_after + 4 < 0x100) {
|
||||
size_t num_matches = 0;
|
||||
size_t last_match_address = 0;
|
||||
size_t match_length = match_bytes_before + match_bytes_after + 4;
|
||||
uint32_t src_addr = src_section.first + src_offset - match_bytes_before;
|
||||
phosg::StringReader src_r = this->src_mem->reader(src_addr, match_length);
|
||||
for (const auto& dest_section : dest_mem->allocated_blocks()) {
|
||||
for (size_t dest_match_offset = 0;
|
||||
dest_match_offset + match_length < dest_section.second;
|
||||
dest_match_offset += 4) {
|
||||
src_r.go(0);
|
||||
phosg::StringReader dest_r = dest_mem->reader(dest_section.first + dest_match_offset, match_length);
|
||||
size_t z;
|
||||
for (z = 0; z < match_length; z += 4) {
|
||||
uint32_t src_v = src_r.get_u32b();
|
||||
uint32_t dest_v = dest_r.get_u32l();
|
||||
bool src_is_addr = ((src_v & 0xFE000003) == 0x80000000);
|
||||
bool dest_is_addr = ((dest_v >= 0x00010000) && (dest_v <= 0x00800000));
|
||||
if (src_is_addr != dest_is_addr) {
|
||||
break;
|
||||
} else if (src_v != dest_v) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (z == match_length) {
|
||||
num_matches++;
|
||||
last_match_address = dest_section.first + dest_match_offset + match_bytes_before;
|
||||
}
|
||||
}
|
||||
}
|
||||
this->log.info_f("... For match length {:X}, {} matches found", match_length, num_matches);
|
||||
if (num_matches == 1) {
|
||||
return last_match_address;
|
||||
} else if (num_matches == 0) {
|
||||
throw runtime_error("did not find exactly one match");
|
||||
}
|
||||
bool can_expand_backward = (src_bytes_available_before >= match_bytes_before + 4);
|
||||
bool can_expand_forward = (src_bytes_available_after >= match_bytes_after + 4);
|
||||
if (!can_expand_backward && !can_expand_forward) {
|
||||
throw runtime_error("no further expansion is allowed");
|
||||
}
|
||||
if (can_expand_backward) {
|
||||
match_bytes_before += 4;
|
||||
}
|
||||
if (can_expand_forward) {
|
||||
match_bytes_after += 4;
|
||||
}
|
||||
}
|
||||
throw runtime_error("scan field too long; too many matches");
|
||||
}
|
||||
|
||||
void find_all_be_to_le_data_matches(uint32_t src_addr, uint32_t src_size) const {
|
||||
if (!this->src_mem) {
|
||||
throw runtime_error("no source file selected");
|
||||
}
|
||||
|
||||
map<string, uint32_t> results;
|
||||
for (const auto& it : this->mems) {
|
||||
if (it.second == this->src_mem) {
|
||||
log.info_f("({}) {:08X} (from source)", it.first, src_addr);
|
||||
results.emplace(it.first, src_addr);
|
||||
|
||||
} else {
|
||||
uint32_t ret = 0;
|
||||
try {
|
||||
ret = this->find_be_to_le_data_match(it.second, src_addr, src_size);
|
||||
log.info_f("({}) {:08X}", it.first, ret);
|
||||
} catch (const exception& e) {
|
||||
log.error_f("({}) failed: {}", it.first, e.what());
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
log.error_f("({}) no match found", it.first);
|
||||
} else {
|
||||
results.emplace(it.first, ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const auto& it : results) {
|
||||
phosg::fwrite_fmt(stdout, "{} => {:08X}\n", it.first, it.second);
|
||||
}
|
||||
}
|
||||
|
||||
void find_data(const string& data) const {
|
||||
for (const auto& [name, mem] : this->mems) {
|
||||
for (const auto& [sec_addr, sec_size] : mem->allocated_blocks()) {
|
||||
uint32_t last_addr = sec_addr + sec_size - data.size();
|
||||
for (uint32_t addr = sec_addr; addr < last_addr; addr++) {
|
||||
if (!mem->memcmp(addr, data.data(), data.size())) {
|
||||
phosg::fwrite_fmt(stderr, "{} => {:08X}\n", name, addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void handle_command(const string& command) {
|
||||
auto tokens = phosg::split(command, ' ');
|
||||
if (tokens.empty()) {
|
||||
throw runtime_error("no command given");
|
||||
}
|
||||
phosg::strip_trailing_whitespace(tokens[tokens.size() - 1]);
|
||||
|
||||
if (tokens[0] == "use") {
|
||||
this->set_source_file(tokens.at(1));
|
||||
} else if (tokens[0] == "find") {
|
||||
this->find_data(phosg::parse_data_string(tokens.at(1)));
|
||||
} else if (tokens[0] == "match") {
|
||||
this->find_all_matches(
|
||||
stoul(tokens.at(1), nullptr, 16),
|
||||
tokens.size() >= 3 ? stoul(tokens[2], nullptr, 16) : 0);
|
||||
} else if (tokens[0] == "match-be-le") {
|
||||
this->find_all_be_to_le_data_matches(
|
||||
stoul(tokens.at(1), nullptr, 16),
|
||||
tokens.size() >= 3 ? stoul(tokens[2], nullptr, 16) : 0);
|
||||
} else if (tokens[0] == "find-ppc-globals") {
|
||||
this->find_ppc_rtoc_global_regs();
|
||||
} else if ((tokens[0] == "parse-dat-object-constructor-tables") ||
|
||||
(tokens[0] == "parse-dat-enemy-constructor-tables")) {
|
||||
bool is_enemies = (tokens[0] == "parse-dat-enemy-constructor-tables");
|
||||
auto specs = ParseDATConstructorTableSpec::from_json_list(phosg::JSON::parse(phosg::load_file(tokens.at(1))));
|
||||
this->parse_dat_constructor_table_multi(specs, is_enemies, true);
|
||||
} else if (!tokens[0].empty()) {
|
||||
throw runtime_error("unknown command");
|
||||
}
|
||||
}
|
||||
|
||||
void run_shell() {
|
||||
while (!feof(stdin)) {
|
||||
if (!this->src_filename.empty()) {
|
||||
phosg::fwrite_fmt(stdout, "addr-trans:{}/{}> ", this->directory, this->src_filename);
|
||||
} else {
|
||||
phosg::fwrite_fmt(stdout, "addr-trans:{}> ", this->directory);
|
||||
}
|
||||
fflush(stdout);
|
||||
|
||||
string command = phosg::fgets(stdin);
|
||||
try {
|
||||
this->handle_command(command);
|
||||
} catch (const exception& e) {
|
||||
this->log.error_f("Failed: {}", e.what());
|
||||
}
|
||||
}
|
||||
fputc('\n', stdout);
|
||||
}
|
||||
|
||||
private:
|
||||
phosg::PrefixedLogger log;
|
||||
string directory;
|
||||
unordered_map<string, shared_ptr<const ResourceDASM::MemoryContext>> mems;
|
||||
unordered_set<shared_ptr<const ResourceDASM::MemoryContext>> ppc_mems;
|
||||
string src_filename;
|
||||
shared_ptr<const ResourceDASM::MemoryContext> src_mem;
|
||||
};
|
||||
|
||||
void run_address_translator(const string& directory, const string& use_filename, const string& command) {
|
||||
AddressTranslator trans(directory);
|
||||
if (!use_filename.empty()) {
|
||||
trans.set_source_file(use_filename);
|
||||
}
|
||||
|
||||
if (!command.empty()) {
|
||||
trans.handle_command(command);
|
||||
} else {
|
||||
trans.run_shell();
|
||||
}
|
||||
}
|
||||
|
||||
vector<DiffEntry> diff_dol_files(const string& a_filename, const string& b_filename) {
|
||||
ResourceDASM::DOLFile a(a_filename.c_str());
|
||||
ResourceDASM::DOLFile b(b_filename.c_str());
|
||||
auto a_mem = make_shared<ResourceDASM::MemoryContext>();
|
||||
auto b_mem = make_shared<ResourceDASM::MemoryContext>();
|
||||
a.load_into(a_mem);
|
||||
b.load_into(b_mem);
|
||||
|
||||
uint32_t min_addr = 0xFFFFFFFF;
|
||||
uint32_t max_addr = 0x00000000;
|
||||
for (const auto& sec : a.sections) {
|
||||
min_addr = min<uint32_t>(min_addr, sec.address);
|
||||
max_addr = max<uint32_t>(max_addr, sec.address + sec.data.size());
|
||||
}
|
||||
for (const auto& sec : b.sections) {
|
||||
min_addr = min<uint32_t>(min_addr, sec.address);
|
||||
max_addr = max<uint32_t>(max_addr, sec.address + sec.data.size());
|
||||
}
|
||||
|
||||
vector<DiffEntry> ret;
|
||||
for (uint32_t addr = min_addr; addr < max_addr; addr += 4) {
|
||||
bool a_exists = a_mem->exists(addr, 4);
|
||||
bool b_exists = b_mem->exists(addr, 4);
|
||||
if (a_exists && b_exists) {
|
||||
string a_value = a_mem->read(addr, 4);
|
||||
string b_value = b_mem->read(addr, 4);
|
||||
if (a_value != b_value) {
|
||||
if (!ret.empty() && (ret.back().address + ret.back().b_data.size() == addr)) {
|
||||
ret.back().a_data += a_value;
|
||||
ret.back().b_data += b_value;
|
||||
} else {
|
||||
ret.emplace_back(DiffEntry{.address = addr, .a_data = a_value, .b_data = b_value});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
vector<DiffEntry> diff_xbe_files(const string& a_filename, const string& b_filename) {
|
||||
ResourceDASM::XBEFile a(a_filename.c_str());
|
||||
ResourceDASM::XBEFile b(b_filename.c_str());
|
||||
auto a_mem = make_shared<ResourceDASM::MemoryContext>();
|
||||
auto b_mem = make_shared<ResourceDASM::MemoryContext>();
|
||||
a.load_into(a_mem);
|
||||
b.load_into(b_mem);
|
||||
|
||||
uint32_t min_addr = 0xFFFFFFFF;
|
||||
uint32_t max_addr = 0x00000000;
|
||||
for (const auto& sec : a.sections) {
|
||||
min_addr = min<uint32_t>(min_addr, sec.addr);
|
||||
max_addr = max<uint32_t>(max_addr, sec.addr + sec.size);
|
||||
}
|
||||
for (const auto& sec : b.sections) {
|
||||
min_addr = min<uint32_t>(min_addr, sec.addr);
|
||||
max_addr = max<uint32_t>(max_addr, sec.addr + sec.size);
|
||||
}
|
||||
|
||||
vector<DiffEntry> ret;
|
||||
for (uint32_t addr = min_addr; addr < max_addr; addr++) {
|
||||
bool a_exists = a_mem->exists(addr, 1);
|
||||
bool b_exists = b_mem->exists(addr, 1);
|
||||
if (a_exists && b_exists) {
|
||||
uint8_t a_value = a_mem->read_u8(addr);
|
||||
uint8_t b_value = b_mem->read_u8(addr);
|
||||
if (a_value != b_value) {
|
||||
if (!ret.empty() && (ret.back().address + ret.back().b_data.size() == addr)) {
|
||||
auto& entry = ret.back();
|
||||
entry.a_data.push_back(a_value);
|
||||
entry.b_data.push_back(b_value);
|
||||
} else {
|
||||
auto& entry = ret.emplace_back();
|
||||
entry.address = addr;
|
||||
entry.a_data.push_back(a_value);
|
||||
entry.b_data.push_back(b_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
struct DiffEntry {
|
||||
uint32_t address;
|
||||
std::string a_data;
|
||||
std::string b_data;
|
||||
};
|
||||
|
||||
void run_address_translator(const std::string& directory, const std::string& use_filename, const std::string& command);
|
||||
std::vector<DiffEntry> diff_dol_files(const std::string& a_filename, const std::string& b_filename);
|
||||
std::vector<DiffEntry> diff_xbe_files(const std::string& a_filename, const std::string& b_filename);
|
||||
@@ -0,0 +1,409 @@
|
||||
#include "AsyncHTTPServer.hh"
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <phosg/Encoding.hh>
|
||||
#include <phosg/Network.hh>
|
||||
#include <phosg/Time.hh>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "AsyncUtils.hh"
|
||||
#include "Loggers.hh"
|
||||
#include "Revision.hh"
|
||||
#include "Server.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static const unordered_map<int, const char*> explanation_for_response_code{
|
||||
{100, "Continue"},
|
||||
{101, "Switching Protocols"},
|
||||
{102, "Processing"},
|
||||
{200, "OK"},
|
||||
{201, "Created"},
|
||||
{202, "Accepted"},
|
||||
{203, "Non-Authoritative Information"},
|
||||
{204, "No Content"},
|
||||
{205, "Reset Content"},
|
||||
{206, "Partial Content"},
|
||||
{207, "Multi-Status"},
|
||||
{208, "Already Reported"},
|
||||
{226, "IM Used"},
|
||||
{300, "Multiple Choices"},
|
||||
{301, "Moved Permanently"},
|
||||
{302, "Found"},
|
||||
{303, "See Other"},
|
||||
{304, "Not Modified"},
|
||||
{305, "Use Proxy"},
|
||||
{307, "Temporary Redirect"},
|
||||
{308, "Permanent Redirect"},
|
||||
{400, "Bad Request"},
|
||||
{401, "Unathorized"},
|
||||
{402, "Payment Required"},
|
||||
{403, "Forbidden"},
|
||||
{404, "Not Found"},
|
||||
{405, "Method Not Allowed"},
|
||||
{406, "Not Acceptable"},
|
||||
{407, "Proxy Authentication Required"},
|
||||
{408, "Request Timeout"},
|
||||
{409, "Conflict"},
|
||||
{410, "Gone"},
|
||||
{411, "Length Required"},
|
||||
{412, "Precondition Failed"},
|
||||
{413, "Request Entity Too Large"},
|
||||
{414, "Request-URI Too Long"},
|
||||
{415, "Unsupported Media Type"},
|
||||
{416, "Requested Range Not Satisfiable"},
|
||||
{417, "Expectation Failed"},
|
||||
{418, "I\'m a Teapot"},
|
||||
{420, "Enhance Your Calm"},
|
||||
{422, "Unprocessable Entity"},
|
||||
{423, "Locked"},
|
||||
{424, "Failed Dependency"},
|
||||
{426, "Upgrade Required"},
|
||||
{428, "Precondition Required"},
|
||||
{429, "Too Many Requests"},
|
||||
{431, "Request Header Fields Too Large"},
|
||||
{444, "No Response"},
|
||||
{449, "Retry With"},
|
||||
{451, "Unavailable For Legal Reasons"},
|
||||
{500, "Internal Server Error"},
|
||||
{501, "Not Implemented"},
|
||||
{502, "Bad Gateway"},
|
||||
{503, "Service Unavailable"},
|
||||
{504, "Gateway Timeout"},
|
||||
{505, "HTTP Version Not Supported"},
|
||||
{506, "Variant Also Negotiates"},
|
||||
{507, "Insufficient Storage"},
|
||||
{508, "Loop Detected"},
|
||||
{509, "Bandwidth Limit Exceeded"},
|
||||
{510, "Not Extended"},
|
||||
{511, "Network Authentication Required"},
|
||||
{598, "Network Read Timeout Error"},
|
||||
{599, "Network Connect Timeout Error"},
|
||||
};
|
||||
|
||||
HTTPError::HTTPError(int code, const std::string& what)
|
||||
: std::runtime_error(what), code(code) {}
|
||||
|
||||
const std::string* HTTPRequest::get_header(const std::string& name) const {
|
||||
auto its = this->headers.equal_range(name);
|
||||
if (its.first == its.second) {
|
||||
return nullptr;
|
||||
}
|
||||
const string* ret = &its.first->second;
|
||||
its.first++;
|
||||
if (its.first != its.second) {
|
||||
throw std::out_of_range("Header appears multiple times: " + name);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
const std::string* HTTPRequest::get_query_param(const std::string& name) const {
|
||||
auto its = this->query_params.equal_range(name);
|
||||
if (its.first == its.second) {
|
||||
return nullptr;
|
||||
}
|
||||
const string* ret = &its.first->second;
|
||||
its.first++;
|
||||
if (its.first != its.second) {
|
||||
throw std::out_of_range("Query parameter appears multiple times: " + name);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void url_decode_inplace(string& s) {
|
||||
size_t write_offset = 0, read_offset = 0;
|
||||
for (; read_offset < s.size(); write_offset++) {
|
||||
if ((s[read_offset] == '%') && (read_offset < s.size() - 2)) {
|
||||
s[write_offset] =
|
||||
static_cast<char>(phosg::value_for_hex_char(s[read_offset + 1]) << 4) |
|
||||
static_cast<char>(phosg::value_for_hex_char(s[read_offset + 2]));
|
||||
read_offset += 3;
|
||||
} else if (s[write_offset] == '+') {
|
||||
s[write_offset] = ' ';
|
||||
read_offset++;
|
||||
} else {
|
||||
s[write_offset] = s[read_offset];
|
||||
read_offset++;
|
||||
}
|
||||
}
|
||||
s.resize(write_offset);
|
||||
}
|
||||
|
||||
HTTPClient::HTTPClient(asio::ip::tcp::socket&& sock) : r(std::move(sock)) {}
|
||||
|
||||
asio::awaitable<HTTPRequest> HTTPClient::recv_http_request(size_t max_line_size, size_t max_body_size) {
|
||||
HTTPRequest req;
|
||||
std::string request_line = co_await this->r.read_line("\r\n", max_line_size);
|
||||
auto line_tokens = phosg::split(request_line, ' ');
|
||||
if (line_tokens.size() != 3) {
|
||||
throw runtime_error("invalid HTTP request line");
|
||||
}
|
||||
const auto& method_token = line_tokens[0];
|
||||
if (method_token == "GET") {
|
||||
req.method = HTTPRequest::Method::GET;
|
||||
} else if (method_token == "POST") {
|
||||
req.method = HTTPRequest::Method::POST;
|
||||
} else if (method_token == "DELETE") {
|
||||
req.method = HTTPRequest::Method::DELETE;
|
||||
} else if (method_token == "HEAD") {
|
||||
req.method = HTTPRequest::Method::HEAD;
|
||||
} else if (method_token == "PATCH") {
|
||||
req.method = HTTPRequest::Method::PATCH;
|
||||
} else if (method_token == "PUT") {
|
||||
req.method = HTTPRequest::Method::PUT;
|
||||
} else if (method_token == "UPDATE") {
|
||||
req.method = HTTPRequest::Method::UPDATE;
|
||||
} else if (method_token == "OPTIONS") {
|
||||
req.method = HTTPRequest::Method::OPTIONS;
|
||||
} else if (method_token == "CONNECT") {
|
||||
req.method = HTTPRequest::Method::CONNECT;
|
||||
} else if (method_token == "TRACE") {
|
||||
req.method = HTTPRequest::Method::TRACE;
|
||||
} else {
|
||||
throw HTTPError(400, "unknown request method");
|
||||
}
|
||||
|
||||
req.http_version = std::move(line_tokens[2]);
|
||||
|
||||
size_t fragment_start_offset = line_tokens[1].find('#');
|
||||
if (fragment_start_offset != string::npos) {
|
||||
req.fragment = line_tokens[1].substr(fragment_start_offset + 1);
|
||||
line_tokens[1].resize(fragment_start_offset);
|
||||
}
|
||||
|
||||
size_t query_start_offset = line_tokens[1].find('?');
|
||||
string query;
|
||||
if (query_start_offset != string::npos) {
|
||||
query = line_tokens[1].substr(query_start_offset + 1);
|
||||
line_tokens[1].resize(query_start_offset);
|
||||
}
|
||||
|
||||
req.path = std::move(line_tokens[1]);
|
||||
if (req.path.empty()) {
|
||||
throw std::runtime_error("request path is missing");
|
||||
}
|
||||
|
||||
auto query_tokens = phosg::split(query, '&');
|
||||
for (auto& token : query_tokens) {
|
||||
size_t equals_pos = token.find('=');
|
||||
if (equals_pos == string::npos) {
|
||||
url_decode_inplace(token);
|
||||
req.query_params.emplace(std::move(token), "");
|
||||
} else {
|
||||
string key = token.substr(0, equals_pos);
|
||||
string value = token.substr(equals_pos + 1);
|
||||
url_decode_inplace(key);
|
||||
url_decode_inplace(value);
|
||||
req.query_params.emplace(std::move(key), std::move(value));
|
||||
}
|
||||
}
|
||||
|
||||
auto prev_header_it = req.headers.end();
|
||||
for (;;) {
|
||||
std::string line = co_await this->r.read_line("\r\n", max_line_size);
|
||||
if (line.empty()) {
|
||||
break;
|
||||
}
|
||||
if (line[0] == ' ' || line[0] == '\t') {
|
||||
if (prev_header_it == req.headers.end()) {
|
||||
throw std::runtime_error("received header continuation line before any header");
|
||||
} else {
|
||||
phosg::strip_whitespace(line);
|
||||
prev_header_it->second.append(1, ' ');
|
||||
prev_header_it->second += line;
|
||||
}
|
||||
} else {
|
||||
size_t colon_pos = line.find(':');
|
||||
if (colon_pos == string::npos) {
|
||||
throw runtime_error("malformed header line");
|
||||
}
|
||||
string key = line.substr(0, colon_pos);
|
||||
string value = line.substr(colon_pos + 1);
|
||||
phosg::strip_whitespace(key);
|
||||
phosg::strip_whitespace(value);
|
||||
prev_header_it = req.headers.emplace(phosg::tolower(key), std::move(value));
|
||||
}
|
||||
}
|
||||
|
||||
auto transfer_encoding_header = req.get_header("transfer-encoding");
|
||||
if (transfer_encoding_header && phosg::tolower(*transfer_encoding_header) == "chunked") {
|
||||
deque<string> chunks;
|
||||
size_t total_data_bytes = 0;
|
||||
for (;;) {
|
||||
auto line = co_await this->r.read_line("\r\n", 0x20);
|
||||
size_t parse_offset = 0;
|
||||
size_t chunk_size = stoull(line, &parse_offset, 16);
|
||||
if (parse_offset != line.size()) {
|
||||
throw HTTPError(400, "invalid chunk header during chunked encoding");
|
||||
}
|
||||
if (chunk_size == 0) {
|
||||
break;
|
||||
}
|
||||
total_data_bytes += chunk_size;
|
||||
if (total_data_bytes > max_body_size) {
|
||||
throw HTTPError(400, "request data size too large");
|
||||
}
|
||||
chunks.emplace_back(co_await this->r.read_data(chunk_size));
|
||||
auto after_chunk_data = co_await this->r.read_line("\r\n", 0x20);
|
||||
if (!after_chunk_data.empty()) {
|
||||
throw HTTPError(400, "incorrect trailing sequence after chunk data");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
auto content_length_header = req.get_header("content-length");
|
||||
size_t content_length = content_length_header ? stoull(*content_length_header) : 0;
|
||||
if (content_length > max_body_size) {
|
||||
throw HTTPError(400, "request data size too large");
|
||||
} else if (content_length > 0) {
|
||||
req.data = co_await this->r.read_data(content_length);
|
||||
}
|
||||
}
|
||||
|
||||
co_return req;
|
||||
}
|
||||
|
||||
asio::awaitable<void> HTTPClient::send_http_response(const HTTPResponse& resp) {
|
||||
AsyncWriteCollector w;
|
||||
w.add(std::format("{} {} {}\r\n",
|
||||
resp.http_version, resp.response_code, explanation_for_response_code.at(resp.response_code)));
|
||||
for (const auto& it : resp.headers) {
|
||||
w.add(it.first + ": " + it.second + "\r\n");
|
||||
}
|
||||
if (!resp.data.empty()) {
|
||||
w.add(std::format("Content-Length: {}\r\n", resp.data.size()));
|
||||
}
|
||||
w.add("\r\n");
|
||||
if (!resp.data.empty()) {
|
||||
w.add_reference(resp.data.data(), resp.data.size());
|
||||
}
|
||||
co_await w.write(this->r.get_socket());
|
||||
}
|
||||
|
||||
asio::awaitable<WebSocketMessage> HTTPClient::recv_websocket_message(size_t max_data_size) {
|
||||
WebSocketMessage prev_msg;
|
||||
bool prev_msg_present = false;
|
||||
|
||||
while (this->r.get_socket().is_open()) {
|
||||
WebSocketMessage msg;
|
||||
|
||||
// We need at most 10 bytes to determine if there's a valid frame, or as
|
||||
// little as 2
|
||||
co_await this->r.read_data_into(msg.header, 2);
|
||||
|
||||
// Get the payload size
|
||||
bool has_mask = msg.header[1] & 0x80;
|
||||
size_t payload_size = msg.header[1] & 0x7F;
|
||||
if (payload_size == 0x7F) {
|
||||
phosg::be_uint64_t wire_size;
|
||||
co_await this->r.read_data_into(&wire_size, sizeof(wire_size));
|
||||
payload_size = wire_size;
|
||||
} else if (payload_size == 0x7E) {
|
||||
phosg::be_uint16_t wire_size;
|
||||
co_await this->r.read_data_into(&wire_size, sizeof(wire_size));
|
||||
payload_size = wire_size;
|
||||
}
|
||||
|
||||
if (payload_size > max_data_size) {
|
||||
throw runtime_error("Incoming WebSocket message exceeds size limit");
|
||||
}
|
||||
|
||||
// Read the masking key if present
|
||||
if (has_mask) {
|
||||
co_await this->r.read_data_into(msg.mask_key, sizeof(msg.mask_key));
|
||||
}
|
||||
|
||||
// Read and unmask message data
|
||||
msg.data = co_await this->r.read_data(payload_size);
|
||||
if (has_mask) {
|
||||
for (size_t x = 0; x < msg.data.size(); x++) {
|
||||
msg.data[x] ^= msg.mask_key[x & 3];
|
||||
}
|
||||
}
|
||||
|
||||
this->last_communication_time = phosg::now();
|
||||
|
||||
// If the current message is a control message, respond appropriately
|
||||
// (these can be sent in the middle of fragmented messages)
|
||||
uint8_t opcode = msg.header[0] & 0x0F;
|
||||
if (opcode & 0x08) {
|
||||
if (opcode == 0x0A) {
|
||||
// Ping response; ignore it
|
||||
|
||||
} else if (opcode == 0x08) {
|
||||
// Close message
|
||||
co_await this->send_websocket_message(msg.data, msg.opcode);
|
||||
this->r.get_socket().close();
|
||||
|
||||
} else if (opcode == 0x09) {
|
||||
// Ping message
|
||||
co_await this->send_websocket_message(msg.data, 0x0A);
|
||||
|
||||
} else {
|
||||
// Unknown control message type
|
||||
this->r.get_socket().close();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// If there's an existing fragment, the current message's opcode should be
|
||||
// zero; if there's no pending message, it must not be zero
|
||||
if (prev_msg_present == (opcode != 0)) {
|
||||
this->r.get_socket().close();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Save the message opcode, if present, and append the frame data
|
||||
if (!prev_msg_present) {
|
||||
prev_msg = std::move(msg);
|
||||
} else {
|
||||
prev_msg.header[0] = msg.header[0];
|
||||
prev_msg.header[1] = msg.header[1];
|
||||
if (opcode) {
|
||||
prev_msg.opcode = msg.opcode;
|
||||
}
|
||||
if (has_mask) {
|
||||
prev_msg.mask_key[0] = msg.mask_key[0];
|
||||
prev_msg.mask_key[1] = msg.mask_key[1];
|
||||
prev_msg.mask_key[2] = msg.mask_key[2];
|
||||
prev_msg.mask_key[3] = msg.mask_key[3];
|
||||
}
|
||||
prev_msg.data += msg.data;
|
||||
}
|
||||
|
||||
// If the FIN bit is set, then the frame is complete - append the payload
|
||||
// to any pending payloads and call the message handler. If the FIN bit
|
||||
// isn't set, we need to receive at least one continuation frame to
|
||||
// complete the message.
|
||||
if (prev_msg.header[0] & 0x80) {
|
||||
co_return prev_msg;
|
||||
}
|
||||
}
|
||||
|
||||
throw logic_error("failed to receive websocket message");
|
||||
}
|
||||
|
||||
asio::awaitable<void> HTTPClient::send_websocket_message(const void* data, size_t size, uint8_t opcode) {
|
||||
phosg::StringWriter w;
|
||||
w.put_u8(0x80 | (opcode & 0x0F));
|
||||
if (size > 0xFFFF) {
|
||||
w.put_u8(0x7F);
|
||||
w.put_u64b(size);
|
||||
} else if (size > 0x7D) {
|
||||
w.put_u8(0x7E);
|
||||
w.put_u16b(size);
|
||||
} else {
|
||||
w.put_u8(size);
|
||||
}
|
||||
|
||||
array<asio::const_buffer, 2> bufs = {asio::const_buffer(w.data(), w.size()), asio::const_buffer(data, size)};
|
||||
co_await asio::async_write(this->r.get_socket(), bufs, asio::use_awaitable);
|
||||
}
|
||||
|
||||
asio::awaitable<void> HTTPClient::send_websocket_message(const std::string& data, uint8_t opcode) {
|
||||
return this->send_websocket_message(data.data(), data.size(), opcode);
|
||||
}
|
||||
|
||||
const HTTPServerLimits DEFAULT_HTTP_LIMITS;
|
||||
@@ -0,0 +1,228 @@
|
||||
#pragma once
|
||||
|
||||
#include "WindowsPlatform.hh"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <asio.hpp>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <phosg/Hash.hh>
|
||||
#include <phosg/Time.hh>
|
||||
#include <string>
|
||||
|
||||
#include "AsyncUtils.hh"
|
||||
#include "Server.hh"
|
||||
|
||||
struct HTTPRequest {
|
||||
enum class Method {
|
||||
GET = 0,
|
||||
POST,
|
||||
DELETE,
|
||||
HEAD,
|
||||
PATCH,
|
||||
PUT,
|
||||
UPDATE,
|
||||
OPTIONS,
|
||||
CONNECT,
|
||||
TRACE,
|
||||
};
|
||||
std::string http_version;
|
||||
Method method;
|
||||
std::string path;
|
||||
std::string fragment;
|
||||
std::unordered_multimap<std::string, std::string> headers; // Header names converted to all lowercase
|
||||
std::unordered_multimap<std::string, std::string> query_params;
|
||||
std::string data;
|
||||
|
||||
// Header name should be entirely lowercase for this function. Returns
|
||||
// nullptr if the header doesn't exist; throws http_error(400) if multiple
|
||||
// instances of it exist.
|
||||
const std::string* get_header(const std::string& name) const;
|
||||
|
||||
const std::string* get_query_param(const std::string& name) const;
|
||||
};
|
||||
|
||||
struct HTTPResponse {
|
||||
std::string http_version;
|
||||
int response_code = 200;
|
||||
// Content-Length should NOT be specified in headers; it is automatically
|
||||
// added in async_write() if data is not blank.
|
||||
std::unordered_multimap<std::string, std::string> headers;
|
||||
std::string data;
|
||||
};
|
||||
|
||||
struct WebSocketMessage {
|
||||
uint8_t header[2] = {0, 0};
|
||||
uint8_t opcode = 0x01;
|
||||
uint8_t mask_key[4] = {0, 0, 0, 0};
|
||||
std::string data;
|
||||
};
|
||||
|
||||
class HTTPError : public std::runtime_error {
|
||||
public:
|
||||
HTTPError(int code, const std::string& what);
|
||||
int code;
|
||||
};
|
||||
|
||||
struct HTTPClient {
|
||||
AsyncSocketReader r;
|
||||
uint64_t last_communication_time = 0;
|
||||
bool is_websocket = false;
|
||||
|
||||
HTTPClient(asio::ip::tcp::socket&& sock);
|
||||
|
||||
asio::awaitable<HTTPRequest> recv_http_request(size_t max_line_size, size_t max_body_size);
|
||||
asio::awaitable<void> send_http_response(const HTTPResponse& resp);
|
||||
|
||||
asio::awaitable<WebSocketMessage> recv_websocket_message(size_t max_data_size);
|
||||
asio::awaitable<void> send_websocket_message(const void* data, size_t size, uint8_t opcode = 0x01);
|
||||
asio::awaitable<void> send_websocket_message(const std::string& data, uint8_t opcode = 0x01);
|
||||
};
|
||||
|
||||
struct HTTPServerLimits {
|
||||
size_t max_http_request_line_size = 0x1000; // 4KB
|
||||
size_t max_http_data_size = 0x200000; // 2MB
|
||||
size_t max_http_keepalive_idle_usecs = 300 * 1000 * 1000; // 5 minutes (0 = no limit)
|
||||
size_t max_websocket_message_size = 0x200000; // 2MB
|
||||
size_t max_websocket_idle_usecs = 300 * 1000 * 1000; // 5 minutes (0 = no limit)
|
||||
};
|
||||
|
||||
extern const HTTPServerLimits DEFAULT_HTTP_LIMITS;
|
||||
|
||||
template <typename ClientT = HTTPClient>
|
||||
class AsyncHTTPServer : public Server<ClientT, ServerSocket> {
|
||||
public:
|
||||
explicit AsyncHTTPServer(
|
||||
std::shared_ptr<asio::io_context> io_context,
|
||||
const std::string& log_prefix = "[AsyncHTTPServer] ",
|
||||
const HTTPServerLimits& limits = DEFAULT_HTTP_LIMITS)
|
||||
: Server<ClientT, ServerSocket>(io_context, log_prefix), limits(limits) {}
|
||||
AsyncHTTPServer(const AsyncHTTPServer&) = delete;
|
||||
AsyncHTTPServer(AsyncHTTPServer&&) = delete;
|
||||
AsyncHTTPServer& operator=(const AsyncHTTPServer&) = delete;
|
||||
AsyncHTTPServer& operator=(AsyncHTTPServer&&) = delete;
|
||||
virtual ~AsyncHTTPServer() = default;
|
||||
|
||||
void listen(const std::string& addr, int port) {
|
||||
if (port == 0) {
|
||||
throw std::runtime_error("Listening port cannot be zero");
|
||||
}
|
||||
asio::ip::address asio_addr = addr.empty() ? asio::ip::address_v4::any() : asio::ip::make_address(addr);
|
||||
auto sock = std::make_shared<ServerSocket>();
|
||||
sock->name = std::format("http:{}:{}", addr, port);
|
||||
sock->endpoint = asio::ip::tcp::endpoint(asio_addr, port);
|
||||
this->add_socket(std::move(sock));
|
||||
}
|
||||
|
||||
protected:
|
||||
HTTPServerLimits limits;
|
||||
|
||||
// Attempts to switch the client to WebSockets. Returns true if this is done
|
||||
// successfully (and the caller should then receive/send WebSocket messages),
|
||||
// or false if this failed (and the caller should send an HTTP response).
|
||||
asio::awaitable<bool> enable_websockets(std::shared_ptr<ClientT> c, const HTTPRequest& req) {
|
||||
if (req.method != HTTPRequest::Method::GET) {
|
||||
co_return false;
|
||||
}
|
||||
|
||||
auto connection_header = req.get_header("connection");
|
||||
if (!connection_header || phosg::tolower(*connection_header) != "upgrade") {
|
||||
co_return false;
|
||||
}
|
||||
auto upgrade_header = req.get_header("upgrade");
|
||||
if (!upgrade_header || phosg::tolower(*upgrade_header) != "websocket") {
|
||||
co_return false;
|
||||
}
|
||||
auto sec_websocket_key_header = req.get_header("sec-websocket-key");
|
||||
if (!sec_websocket_key_header) {
|
||||
co_return false;
|
||||
}
|
||||
|
||||
std::string sec_websocket_accept_data = *sec_websocket_key_header + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
|
||||
std::string sec_websocket_accept = phosg::base64_encode(phosg::SHA1(sec_websocket_accept_data).bin());
|
||||
|
||||
HTTPResponse resp;
|
||||
resp.http_version = req.http_version;
|
||||
resp.response_code = 101;
|
||||
resp.headers.emplace("Upgrade", "websocket");
|
||||
resp.headers.emplace("Connection", "upgrade");
|
||||
resp.headers.emplace("Sec-WebSocket-Accept", std::move(sec_websocket_accept));
|
||||
co_await c->send_http_response(resp);
|
||||
|
||||
c->is_websocket = true;
|
||||
co_return true;
|
||||
}
|
||||
|
||||
[[nodiscard]] virtual std::shared_ptr<ClientT> create_client(
|
||||
std::shared_ptr<ServerSocket>, asio::ip::tcp::socket&& client_sock) {
|
||||
return std::make_shared<HTTPClient>(std::move(client_sock));
|
||||
}
|
||||
|
||||
// handle_request must do one of the following three things:
|
||||
// 1. Return an HTTP response.
|
||||
// 2. Call enable_websockets, and if it returns true, return nullptr. After
|
||||
// this point, handle_request will not be called again for this client;
|
||||
// handle_websocket_message will be called instead when any WebSocket
|
||||
// messages are received. If enable_websockets returns false,
|
||||
// handle_request must still return an HTTP response.
|
||||
// 3. Throw an exception. In this case, the client receives an HTTP 500
|
||||
// response.
|
||||
virtual asio::awaitable<std::unique_ptr<HTTPResponse>> handle_request(std::shared_ptr<ClientT> c, HTTPRequest&& req) = 0;
|
||||
virtual asio::awaitable<void> handle_websocket_message(std::shared_ptr<ClientT>, WebSocketMessage&&) {
|
||||
co_return;
|
||||
}
|
||||
|
||||
virtual asio::awaitable<void> handle_client(std::shared_ptr<ClientT> c) {
|
||||
asio::steady_timer idle_timer(*this->io_context);
|
||||
while (c->r.get_socket().is_open()) {
|
||||
if (c->is_websocket) {
|
||||
WebSocketMessage msg = co_await c->recv_websocket_message(this->limits.max_websocket_message_size);
|
||||
idle_timer.cancel();
|
||||
try {
|
||||
co_await this->handle_websocket_message(c, std::move(msg));
|
||||
} catch (const std::exception& e) {
|
||||
c->r.close();
|
||||
}
|
||||
|
||||
} else {
|
||||
HTTPRequest req = co_await c->recv_http_request(
|
||||
this->limits.max_http_request_line_size, this->limits.max_http_data_size);
|
||||
idle_timer.cancel();
|
||||
std::unique_ptr<HTTPResponse> resp;
|
||||
try {
|
||||
resp = co_await this->handle_request(c, std::move(req));
|
||||
} catch (const std::exception& e) {
|
||||
resp = std::make_unique<HTTPResponse>();
|
||||
resp->http_version = req.http_version;
|
||||
resp->response_code = 500;
|
||||
resp->headers.emplace("Content-Type", "text/plain");
|
||||
resp->data = "Internal server error:\n";
|
||||
resp->data += e.what();
|
||||
}
|
||||
if (resp) {
|
||||
co_await c->send_http_response(*resp);
|
||||
}
|
||||
auto* conn_header = req.get_header("connection");
|
||||
if (!conn_header || (*conn_header != "keep-alive")) {
|
||||
c->r.close();
|
||||
}
|
||||
}
|
||||
|
||||
size_t idle_usecs_limit = c->is_websocket
|
||||
? this->limits.max_websocket_idle_usecs
|
||||
: this->limits.max_http_keepalive_idle_usecs;
|
||||
if (idle_usecs_limit && c->r.get_socket().is_open()) {
|
||||
idle_timer.expires_after(std::chrono::microseconds(idle_usecs_limit));
|
||||
idle_timer.async_wait([c](std::error_code ec) {
|
||||
if (!ec) {
|
||||
c->r.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
idle_timer.cancel();
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,160 @@
|
||||
#include "AsyncUtils.hh"
|
||||
|
||||
#include <asio.hpp>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <phosg/Strings.hh>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
AsyncEvent::AsyncEvent(asio::any_io_executor ex)
|
||||
: executor(ex), is_set(false) {}
|
||||
|
||||
void AsyncEvent::set() {
|
||||
lock_guard g(this->lock);
|
||||
this->is_set = true;
|
||||
for (auto& waiter : this->waiters) {
|
||||
asio::post(this->executor,
|
||||
[handler = std::move(waiter)]() mutable {
|
||||
(*handler)();
|
||||
});
|
||||
}
|
||||
this->waiters.clear();
|
||||
}
|
||||
|
||||
void AsyncEvent::clear() {
|
||||
lock_guard g(this->lock);
|
||||
this->is_set = false;
|
||||
}
|
||||
|
||||
asio::awaitable<void> AsyncEvent::wait() {
|
||||
auto token = asio::use_awaitable_t<>{};
|
||||
co_await asio::async_initiate<asio::use_awaitable_t<>, void()>(
|
||||
[this](auto&& handler) -> void {
|
||||
lock_guard g(this->lock);
|
||||
if (this->is_set) {
|
||||
handler();
|
||||
} else {
|
||||
this->waiters.emplace_back(make_unique<asio::detail::awaitable_handler<asio::any_io_executor>>(std::move(handler)));
|
||||
}
|
||||
},
|
||||
token);
|
||||
}
|
||||
|
||||
AsyncSocketReader::AsyncSocketReader(asio::ip::tcp::socket&& sock)
|
||||
: sock(std::move(sock)) {}
|
||||
|
||||
asio::awaitable<string> AsyncSocketReader::read_line(const char* delimiter, size_t max_length) {
|
||||
size_t delimiter_size = strlen(delimiter);
|
||||
if (delimiter_size == 0) {
|
||||
throw logic_error("delimiter is empty");
|
||||
}
|
||||
size_t delimiter_backup_bytes = delimiter_size - 1;
|
||||
|
||||
size_t delimiter_pos = this->pending_data.find(delimiter);
|
||||
while ((delimiter_pos == string::npos) && (!max_length || (this->pending_data.size() < max_length))) {
|
||||
size_t pre_size = this->pending_data.size();
|
||||
this->pending_data.resize(min(max_length, this->pending_data.size() + 0x400));
|
||||
|
||||
auto buf = asio::buffer(this->pending_data.data() + pre_size, this->pending_data.size() - pre_size);
|
||||
size_t bytes_read = co_await this->sock.async_read_some(buf, asio::use_awaitable);
|
||||
this->pending_data.resize(pre_size + bytes_read);
|
||||
delimiter_pos = this->pending_data.find(
|
||||
delimiter,
|
||||
(delimiter_backup_bytes > pre_size) ? 0 : (pre_size - delimiter_backup_bytes));
|
||||
}
|
||||
|
||||
if (delimiter_pos == string::npos) {
|
||||
throw runtime_error("line exceeds max length");
|
||||
}
|
||||
|
||||
// TODO: It's not great that we copy the data here. There's probably a more
|
||||
// idiomatic and efficient way to do this.
|
||||
string ret = this->pending_data.substr(0, delimiter_pos);
|
||||
this->pending_data = this->pending_data.substr(delimiter_pos + delimiter_size);
|
||||
co_return ret;
|
||||
}
|
||||
|
||||
asio::awaitable<string> AsyncSocketReader::read_data(size_t size) {
|
||||
string ret;
|
||||
if (this->pending_data.size() == size) {
|
||||
this->pending_data.swap(ret);
|
||||
} else if (this->pending_data.size() > size) {
|
||||
ret = this->pending_data.substr(0, size);
|
||||
this->pending_data = this->pending_data.substr(size);
|
||||
} else {
|
||||
size_t bytes_to_read = size - this->pending_data.size();
|
||||
this->pending_data.swap(ret);
|
||||
ret.resize(size);
|
||||
co_await asio::async_read(this->sock, asio::buffer(ret.data() + size - bytes_to_read, bytes_to_read), asio::use_awaitable);
|
||||
}
|
||||
co_return ret;
|
||||
}
|
||||
|
||||
asio::awaitable<void> AsyncSocketReader::read_data_into(void* data, size_t size) {
|
||||
if (this->pending_data.size() == size) {
|
||||
memcpy(data, this->pending_data.data(), size);
|
||||
this->pending_data.clear();
|
||||
} else if (this->pending_data.size() > size) {
|
||||
memcpy(data, this->pending_data.data(), size);
|
||||
this->pending_data = this->pending_data.substr(size);
|
||||
} else {
|
||||
memcpy(data, this->pending_data.data(), this->pending_data.size());
|
||||
size_t bytes_to_read = size - this->pending_data.size();
|
||||
this->pending_data.clear();
|
||||
void* read_buf = reinterpret_cast<uint8_t*>(data) + size - bytes_to_read;
|
||||
co_await asio::async_read(this->sock, asio::buffer(read_buf, bytes_to_read), asio::use_awaitable);
|
||||
}
|
||||
}
|
||||
|
||||
void AsyncWriteCollector::add(string&& data) {
|
||||
const auto& item = this->owned_data.emplace_back(std::move(data));
|
||||
bufs.emplace_back(asio::buffer(item.data(), item.size()));
|
||||
}
|
||||
|
||||
void AsyncWriteCollector::add_reference(const void* data, size_t size) {
|
||||
bufs.emplace_back(asio::buffer(data, size));
|
||||
}
|
||||
|
||||
asio::awaitable<void> AsyncWriteCollector::write(asio::ip::tcp::socket& sock) {
|
||||
deque<string> local_owned_data;
|
||||
local_owned_data.swap(this->owned_data);
|
||||
vector<asio::const_buffer> local_bufs;
|
||||
local_bufs.swap(this->bufs);
|
||||
co_await asio::async_write(sock, local_bufs, asio::use_awaitable);
|
||||
}
|
||||
|
||||
asio::awaitable<void> async_sleep(chrono::steady_clock::duration duration) {
|
||||
asio::steady_timer timer(co_await asio::this_coro::executor, duration);
|
||||
co_await timer.async_wait(asio::use_awaitable);
|
||||
}
|
||||
|
||||
asio::awaitable<asio::ip::tcp::socket> async_connect_tcp(uint32_t ipv4_addr, uint16_t port) {
|
||||
uint8_t octets[4] = {
|
||||
static_cast<uint8_t>(ipv4_addr >> 24),
|
||||
static_cast<uint8_t>(ipv4_addr >> 16),
|
||||
static_cast<uint8_t>(ipv4_addr >> 8),
|
||||
static_cast<uint8_t>(ipv4_addr)};
|
||||
return async_connect_tcp(std::format("{}.{}.{}.{}", octets[0], octets[1], octets[2], octets[3]), port);
|
||||
}
|
||||
|
||||
asio::awaitable<asio::ip::tcp::socket> async_connect_tcp(const std::string& host, uint16_t port) {
|
||||
auto executor = co_await asio::this_coro::executor;
|
||||
|
||||
asio::ip::tcp::resolver resolver(executor);
|
||||
auto endpoints = co_await resolver.async_resolve(host, std::format("{}", port), asio::use_awaitable);
|
||||
|
||||
asio::ip::tcp::socket sock(executor);
|
||||
co_await asio::async_connect(sock, endpoints, asio::use_awaitable);
|
||||
|
||||
co_return sock;
|
||||
}
|
||||
|
||||
asio::awaitable<asio::ip::tcp::socket> async_connect_tcp(const asio::ip::tcp::endpoint& ep) {
|
||||
auto executor = co_await asio::this_coro::executor;
|
||||
asio::ip::tcp::socket sock(executor);
|
||||
co_await sock.async_connect(ep, asio::use_awaitable);
|
||||
co_return sock;
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
#pragma once
|
||||
|
||||
#include <asio.hpp>
|
||||
#include <asio/experimental/parallel_group.hpp>
|
||||
#include <asio/experimental/promise.hpp>
|
||||
#include <deque>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <phosg/Strings.hh>
|
||||
|
||||
template <typename T>
|
||||
class AsyncPromise {
|
||||
public:
|
||||
AsyncPromise() = default;
|
||||
|
||||
asio::awaitable<T> get() {
|
||||
if (!this->exc && !this->val.has_value()) {
|
||||
auto executor = co_await asio::this_coro::executor;
|
||||
co_await asio::async_initiate<decltype(asio::use_awaitable), void(std::error_code)>(
|
||||
[this, &executor](auto&& new_handler) {
|
||||
this->resolver_ref.emplace(ResolverRef{.resolve = std::move(new_handler), .executor = &executor});
|
||||
},
|
||||
asio::use_awaitable);
|
||||
}
|
||||
|
||||
if (this->exc) {
|
||||
std::rethrow_exception(this->exc);
|
||||
} else if (this->val.has_value()) {
|
||||
co_return *this->val;
|
||||
} else {
|
||||
throw std::logic_error("AsyncPromise await resolved but did not have a value or exception");
|
||||
}
|
||||
}
|
||||
|
||||
void set_value(T&& result) {
|
||||
if (this->exc || this->val.has_value()) {
|
||||
throw std::logic_error("attempted to set value on completed promise");
|
||||
}
|
||||
this->val = result;
|
||||
this->resolve();
|
||||
}
|
||||
|
||||
void set_exception(std::exception_ptr ex) {
|
||||
if (this->exc || this->val.has_value()) {
|
||||
throw std::logic_error("attempted to set value on completed promise");
|
||||
}
|
||||
this->exc = ex;
|
||||
this->resolve();
|
||||
}
|
||||
|
||||
void cancel() {
|
||||
this->set_exception(std::make_exception_ptr(std::runtime_error("AsyncPromise cancelled")));
|
||||
}
|
||||
|
||||
bool done() const {
|
||||
return this->exc || this->val.has_value();
|
||||
}
|
||||
|
||||
private:
|
||||
struct ResolverRef {
|
||||
asio::detail::awaitable_handler<asio::any_io_executor, std::error_code> resolve;
|
||||
asio::any_io_executor* executor;
|
||||
};
|
||||
std::optional<T> val;
|
||||
std::exception_ptr exc;
|
||||
std::optional<ResolverRef> resolver_ref;
|
||||
|
||||
void resolve() {
|
||||
if (this->resolver_ref.has_value()) {
|
||||
auto* executor = this->resolver_ref->executor;
|
||||
asio::post(*executor, [ref = std::move(this->resolver_ref)]() mutable -> void {
|
||||
ref->resolve(std::error_code{});
|
||||
});
|
||||
this->resolver_ref.reset();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
class AsyncPromise<void> {
|
||||
public:
|
||||
AsyncPromise() = default;
|
||||
|
||||
asio::awaitable<void> get() {
|
||||
if (!this->exc && !this->returned) {
|
||||
auto executor = co_await asio::this_coro::executor;
|
||||
co_await asio::async_initiate<decltype(asio::use_awaitable), void(std::error_code)>(
|
||||
[this, &executor](auto&& new_handler) {
|
||||
this->resolver_ref.emplace(ResolverRef{.resolve = std::move(new_handler), .executor = &executor});
|
||||
},
|
||||
asio::use_awaitable);
|
||||
}
|
||||
|
||||
if (this->exc) {
|
||||
std::rethrow_exception(this->exc);
|
||||
} else if (this->returned) {
|
||||
co_return;
|
||||
} else {
|
||||
throw std::logic_error("AsyncPromise await resolved but did not have a value or exception");
|
||||
}
|
||||
}
|
||||
|
||||
void set_value() {
|
||||
if (this->exc || this->returned) {
|
||||
throw std::logic_error("attempted to set value on completed promise");
|
||||
}
|
||||
this->returned = true;
|
||||
this->resolve();
|
||||
}
|
||||
|
||||
void set_exception(std::exception_ptr ex) {
|
||||
if (this->exc || this->returned) {
|
||||
throw std::logic_error("attempted to set value on completed promise");
|
||||
}
|
||||
this->exc = ex;
|
||||
this->resolve();
|
||||
}
|
||||
|
||||
void cancel() {
|
||||
this->set_exception(std::make_exception_ptr(std::runtime_error("AsyncPromise cancelled")));
|
||||
}
|
||||
|
||||
bool done() const {
|
||||
return this->exc || this->returned;
|
||||
}
|
||||
|
||||
private:
|
||||
struct ResolverRef {
|
||||
asio::detail::awaitable_handler<asio::any_io_executor, std::error_code> resolve;
|
||||
asio::any_io_executor* executor;
|
||||
};
|
||||
bool returned;
|
||||
std::exception_ptr exc;
|
||||
std::optional<ResolverRef> resolver_ref;
|
||||
|
||||
void resolve() {
|
||||
if (this->resolver_ref.has_value()) {
|
||||
auto* executor = this->resolver_ref->executor;
|
||||
asio::post(*executor, [ref = std::move(this->resolver_ref)]() mutable -> void {
|
||||
ref->resolve(std::error_code{});
|
||||
});
|
||||
this->resolver_ref.reset();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class AsyncEvent {
|
||||
public:
|
||||
AsyncEvent(asio::any_io_executor ex);
|
||||
AsyncEvent(const AsyncEvent&) = delete;
|
||||
AsyncEvent(AsyncEvent&&) = delete;
|
||||
AsyncEvent& operator=(const AsyncEvent&) = delete;
|
||||
AsyncEvent& operator=(AsyncEvent&&) = delete;
|
||||
|
||||
void set();
|
||||
void clear();
|
||||
asio::awaitable<void> wait();
|
||||
|
||||
private:
|
||||
asio::any_io_executor executor;
|
||||
bool is_set;
|
||||
std::mutex lock;
|
||||
std::vector<std::unique_ptr<asio::detail::awaitable_handler<asio::any_io_executor>>> waiters;
|
||||
};
|
||||
|
||||
class AsyncSocketReader {
|
||||
public:
|
||||
explicit AsyncSocketReader(asio::ip::tcp::socket&& sock);
|
||||
AsyncSocketReader(const AsyncSocketReader&) = delete;
|
||||
AsyncSocketReader(AsyncSocketReader&&) = delete;
|
||||
AsyncSocketReader& operator=(const AsyncSocketReader&) = delete;
|
||||
AsyncSocketReader& operator=(AsyncSocketReader&&) = delete;
|
||||
~AsyncSocketReader() = default;
|
||||
|
||||
// Reads one line from the socket, buffering any extra data read. The
|
||||
// delimiter is not included in the returned line. max_length = 0 means no
|
||||
// maximum length is enforced.
|
||||
asio::awaitable<std::string> read_line(
|
||||
const char* delimiter = "\n", size_t max_length = 0);
|
||||
asio::awaitable<std::string> read_data(size_t size);
|
||||
asio::awaitable<void> read_data_into(void* data, size_t size);
|
||||
|
||||
// The caller cannot know what the socket's read state is, so this should
|
||||
// only be used when the caller intends to write to the socket, not read
|
||||
inline asio::ip::tcp::socket& get_socket() {
|
||||
return this->sock;
|
||||
}
|
||||
|
||||
inline void close() {
|
||||
this->sock.close();
|
||||
}
|
||||
|
||||
private:
|
||||
std::string pending_data; // Data read but not yet returned to the caller
|
||||
asio::ip::tcp::socket sock;
|
||||
};
|
||||
|
||||
class AsyncWriteCollector {
|
||||
public:
|
||||
AsyncWriteCollector() = default;
|
||||
AsyncWriteCollector(const AsyncWriteCollector&) = delete;
|
||||
AsyncWriteCollector(AsyncWriteCollector&&) = delete;
|
||||
AsyncWriteCollector& operator=(const AsyncWriteCollector&) = delete;
|
||||
AsyncWriteCollector& operator=(AsyncWriteCollector&&) = delete;
|
||||
~AsyncWriteCollector() = default;
|
||||
|
||||
void add(std::string&& data);
|
||||
|
||||
// When using add_reference, it is the caller's responsibility to ensure that
|
||||
// the buffer is valid until *this is destroyed or write() returns.
|
||||
void add_reference(const void* data, size_t size);
|
||||
|
||||
asio::awaitable<void> write(asio::ip::tcp::socket& sock);
|
||||
|
||||
private:
|
||||
std::deque<std::string> owned_data;
|
||||
std::vector<asio::const_buffer> bufs;
|
||||
};
|
||||
|
||||
asio::awaitable<void> async_sleep(std::chrono::steady_clock::duration duration);
|
||||
|
||||
inline asio::ip::tcp::endpoint make_endpoint_ipv4(uint32_t addr, uint16_t port) {
|
||||
return asio::ip::tcp::endpoint(asio::ip::address_v4(addr), port);
|
||||
}
|
||||
|
||||
inline std::string str_for_endpoint(const asio::ip::tcp::endpoint& ep) {
|
||||
return ep.address().to_string() + std::format(":{}", ep.port());
|
||||
}
|
||||
|
||||
inline uint32_t ipv4_addr_for_asio_addr(const asio::ip::address& addr) {
|
||||
if (!addr.is_v4()) {
|
||||
throw std::runtime_error("Address is not IPv4");
|
||||
}
|
||||
return ntohl(addr.to_v4().to_uint());
|
||||
}
|
||||
|
||||
asio::awaitable<asio::ip::tcp::socket> async_connect_tcp(uint32_t ipv4_addr, uint16_t port);
|
||||
asio::awaitable<asio::ip::tcp::socket> async_connect_tcp(const std::string& host, uint16_t port);
|
||||
asio::awaitable<asio::ip::tcp::socket> async_connect_tcp(const asio::ip::tcp::endpoint& ep);
|
||||
|
||||
template <typename FnT, typename... ArgTs>
|
||||
asio::awaitable<std::invoke_result_t<FnT, ArgTs...>> call_on_thread_pool(asio::thread_pool& pool, FnT&& f, ArgTs&&... args) {
|
||||
using ReturnT = std::invoke_result_t<FnT, ArgTs...>;
|
||||
auto bound = std::bind(std::forward<FnT>(f), std::forward<ArgTs>(args)...);
|
||||
AsyncPromise<ReturnT> promise;
|
||||
|
||||
asio::post(pool, [&promise, &bound]() -> void {
|
||||
promise.set_value(bound());
|
||||
});
|
||||
co_return co_await promise.get();
|
||||
}
|
||||
+26
-19
@@ -5,40 +5,47 @@
|
||||
#include <stdexcept>
|
||||
|
||||
#include "Text.hh"
|
||||
#include "Types.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
template <bool IsBigEndian>
|
||||
struct BMLHeader {
|
||||
using U32T = typename std::conditional<IsBigEndian, be_uint32_t, le_uint32_t>::type;
|
||||
|
||||
template <bool BE>
|
||||
struct BMLHeaderT {
|
||||
parray<uint8_t, 0x04> unknown_a1;
|
||||
U32T num_entries;
|
||||
U32T<BE> num_entries;
|
||||
parray<uint8_t, 0x38> unknown_a2;
|
||||
} __attribute__((packed));
|
||||
|
||||
template <bool IsBigEndian>
|
||||
struct BMLHeaderEntry {
|
||||
using U32T = typename std::conditional<IsBigEndian, be_uint32_t, le_uint32_t>::type;
|
||||
using BMLHeader = BMLHeaderT<false>;
|
||||
using BMLHeaderBE = BMLHeaderT<true>;
|
||||
check_struct_size(BMLHeader, 0x40);
|
||||
check_struct_size(BMLHeaderBE, 0x40);
|
||||
|
||||
template <bool BE>
|
||||
struct BMLHeaderEntryT {
|
||||
pstring<TextEncoding::ASCII, 0x20> filename;
|
||||
U32T compressed_size;
|
||||
U32T<BE> compressed_size;
|
||||
parray<uint8_t, 0x04> unknown_a1;
|
||||
U32T decompressed_size;
|
||||
U32T compressed_gvm_size;
|
||||
U32T decompressed_gvm_size;
|
||||
U32T<BE> decompressed_size;
|
||||
U32T<BE> compressed_gvm_size;
|
||||
U32T<BE> decompressed_gvm_size;
|
||||
parray<uint8_t, 0x0C> unknown_a2;
|
||||
} __attribute__((packed));
|
||||
|
||||
template <bool IsBigEndian>
|
||||
void BMLArchive::load_t() {
|
||||
StringReader r(*this->data);
|
||||
using BMLHeaderEntry = BMLHeaderEntryT<false>;
|
||||
using BMLHeaderEntryBE = BMLHeaderEntryT<true>;
|
||||
check_struct_size(BMLHeaderEntry, 0x40);
|
||||
check_struct_size(BMLHeaderEntryBE, 0x40);
|
||||
|
||||
const auto& header = r.get<BMLHeader<IsBigEndian>>();
|
||||
template <bool BE>
|
||||
void BMLArchive::load_t() {
|
||||
phosg::StringReader r(*this->data);
|
||||
|
||||
const auto& header = r.get<BMLHeaderT<BE>>();
|
||||
|
||||
size_t offset = 0x800;
|
||||
while (this->entries.size() < header.num_entries) {
|
||||
const auto& entry = r.get<BMLHeaderEntry<IsBigEndian>>();
|
||||
const auto& entry = r.get<BMLHeaderEntryT<BE>>();
|
||||
|
||||
if (offset + entry.compressed_size > this->data->size()) {
|
||||
throw runtime_error("BML data entry extends beyond end of data");
|
||||
@@ -96,10 +103,10 @@ string BMLArchive::get_copy(const string& name) const {
|
||||
}
|
||||
}
|
||||
|
||||
StringReader BMLArchive::get_reader(const string& name) const {
|
||||
phosg::StringReader BMLArchive::get_reader(const string& name) const {
|
||||
try {
|
||||
const auto& entry = this->entries.at(name);
|
||||
return StringReader(this->data->data() + entry.offset, entry.size);
|
||||
return phosg::StringReader(this->data->data() + entry.offset, entry.size);
|
||||
} catch (const out_of_range&) {
|
||||
throw out_of_range("BML does not contain file: " + name);
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,10 +24,10 @@ public:
|
||||
std::pair<const void*, size_t> get(const std::string& name) const;
|
||||
std::pair<const void*, size_t> get_gvm(const std::string& name) const;
|
||||
std::string get_copy(const std::string& name) const;
|
||||
StringReader get_reader(const std::string& name) const;
|
||||
phosg::StringReader get_reader(const std::string& name) const;
|
||||
|
||||
private:
|
||||
template <bool IsBigEndian>
|
||||
template <bool BE>
|
||||
void load_t();
|
||||
|
||||
std::shared_ptr<const std::string> data;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user