Compare commits

..

555 Commits

Author SHA1 Message Date
Martin Michelsen 2d8de65dd0 fix initial lobby position commands across NTE/proto boundary 2023-11-27 22:50:44 -08:00
Martin Michelsen 33ef130098 allow word select across NTE/proto boundary 2023-11-27 22:50:23 -08:00
Martin Michelsen 3370d9c940 allow symbol chats to cross 11/2000 version boundary 2023-11-27 22:09:38 -08:00
Martin Michelsen 2c24cce740 send 15EA commands upon request 2023-11-27 21:34:28 -08:00
Martin Michelsen 26685ab32c save team config when points are earned 2023-11-27 21:31:10 -08:00
Martin Michelsen 1a5e56c0b2 fix team metadata in lobbies 2023-11-27 21:30:59 -08:00
Martin Michelsen 8e2a58ccaa eliminate ServerBehavior::DATA_SERVER_BB 2023-11-27 21:30:41 -08:00
Martin Michelsen 5192b5f615 hide some unnecessary data from log output 2023-11-27 21:29:48 -08:00
Martin Michelsen 9e55cd228c fix quest opcode flags constants 2023-11-27 16:02:58 -08:00
Martin Michelsen 65417749b2 don't send text messages to 11/2000 clients 2023-11-27 15:58:56 -08:00
Martin Michelsen 9a0ce6c131 update compatibility table in readme 2023-11-27 14:41:10 -08:00
Martin Michelsen d86b41daab update quest disassembler for 11/2000 prototype 2023-11-27 14:40:59 -08:00
Martin Michelsen 0a522e6ac4 add support for 12/2000 DC prototype 2023-11-27 14:40:42 -08:00
Martin Michelsen f2c3d256f3 fix quest disassembler opcode flags 2023-11-27 11:49:24 -08:00
Martin Michelsen dfb1249efc add comment about 11/2000 symbol chat 2023-11-27 11:49:20 -08:00
Martin Michelsen 7feb11b6a7 fix notes in compatibility table 2023-11-27 00:32:12 -08:00
Martin Michelsen 20b66a7a58 improve support for 11/2000 prototype 2023-11-27 00:29:26 -08:00
Martin Michelsen 9b6a023d38 preserve original disp if client is v1 or v2 2023-11-26 22:37:26 -08:00
Martin Michelsen ea83935dc4 implement BB EXP requests properly 2023-11-26 16:21:09 -08:00
Martin Michelsen 654132b5d2 fix BB team chat 2023-11-26 16:18:51 -08:00
Martin Michelsen e484ad72e0 rewrite quest category menu system 2023-11-26 14:52:37 -08:00
Martin Michelsen 64ac199730 fix battle map reloading 2023-11-26 11:46:10 -08:00
Martin Michelsen f4e9b4c60a fix error message when CatchHandlerExceptions is off 2023-11-26 11:45:59 -08:00
Martin Michelsen a4039fa9cd update to-do list 2023-11-25 23:43:54 -08:00
Martin Michelsen 6af0527498 implement team points and member ranking 2023-11-25 23:12:09 -08:00
Martin Michelsen 1cd0092a41 use client's ignore_def value when it doesn't match server's 2023-11-25 22:15:08 -08:00
Martin Michelsen 62d4c65a7d fix help text formatting 2023-11-25 22:13:13 -08:00
Martin Michelsen 220259b093 fix BB quest map loading bug 2023-11-25 21:12:03 -08:00
Martin Michelsen 0f8d88bb58 remove debugging messages 2023-11-25 21:02:53 -08:00
Martin Michelsen 4a3716191b update compatibility notes in readme 2023-11-25 21:02:44 -08:00
Martin Michelsen 5c58c500c1 fix DCNTE smoke test 2023-11-25 19:37:28 -08:00
Martin Michelsen a3d677316a fix DC NTE game join sync commands 2023-11-25 19:35:09 -08:00
Martin Michelsen 0f45ced3e9 add DC NTE map variations 2023-11-25 19:23:25 -08:00
Martin Michelsen ccfdbf2faf use 6x1F instead of 6F to unlock DC NTE games 2023-11-25 16:53:05 -08:00
Martin Michelsen 9c403e9107 remove unneeded debug prints 2023-11-25 16:26:19 -08:00
Martin Michelsen 46c3a44b41 fix uninitialized memory bug in UTF16 encoder 2023-11-25 16:12:11 -08:00
Martin Michelsen bc82594a26 add debugging prints for failure that only happens in GH Actions 2023-11-25 15:54:36 -08:00
Martin Michelsen e3ce4edede fix 8-bit challenge rank encryption 2023-11-25 15:33:33 -08:00
Martin Michelsen 61c37d86c1 fix signedness issue on linux 2023-11-25 13:16:45 -08:00
Martin Michelsen ff12a9aaca fix AR code translator stub 2023-11-25 12:41:24 -08:00
Martin Michelsen b5dbf25254 fix bug that causes long char names to disappear on BB 2023-11-25 12:30:27 -08:00
Martin Michelsen 10e5dc4708 clear arrow color when changing lobbies 2023-11-25 12:30:27 -08:00
Martin Michelsen 1b499ab953 fix spacing in help message 2023-11-25 12:30:27 -08:00
Martin Michelsen 011eedb855 add extra languages on PC v2 2023-11-25 12:30:27 -08:00
Martin Michelsen 897cca83cf add ability to disassemble DC NTE quests 2023-11-25 12:30:27 -08:00
Martin Michelsen fe6e957c92 add DC and GC NTE smoke tests 2023-11-25 12:30:27 -08:00
Martin Michelsen de4cb26c34 refactor GameVersion and QuestScriptVersion into a single enum 2023-11-25 12:30:27 -08:00
Martin Michelsen 9097abf307 fix starting inventory on new BB chars 2023-11-25 12:30:27 -08:00
Matt 14a86610ed Add download quests for V1 and PC 2023-11-25 10:26:33 -08:00
Matt 9e34ce6f49 Add official download quests for DC 2023-11-24 17:56:37 -08:00
Matt 7f1846013d Add missing DC version of MU3 2023-11-24 14:03:19 -08:00
Martin Michelsen 05d6d495a5 work around Tethealla bug in proxy 2023-11-21 23:04:20 -08:00
Martin Michelsen 5991a5a894 rewrite unit generation logic to fix v2/bb behavior 2023-11-21 22:11:41 -08:00
Martin Michelsen b0c481ed62 fix xbox 64 command on schtserv 2023-11-21 20:27:25 -08:00
Martin Michelsen 3712574784 minor style adjustment 2023-11-21 17:09:31 -08:00
Martin Michelsen e738f7f089 update to-do list 2023-11-21 17:09:18 -08:00
Martin Michelsen 8eba207a6b add BFR1 BB key 2023-11-21 13:31:22 -08:00
Martin Michelsen 67ed70082c rewrite 6x6D bug comment 2023-11-21 11:51:06 -08:00
Martin Michelsen 35aa6fba01 fix area number for specialized box item drops 2023-11-21 11:38:24 -08:00
Martin Michelsen 267c2ca00b fix invalid tool class on v3/v4 2023-11-21 11:25:25 -08:00
Martin Michelsen 1d8ae0b4d9 use constructor tables from GC and BB client in map parsing 2023-11-20 23:43:40 -08:00
Martin Michelsen 30ad83fa67 fix incorrect team metadata command target 2023-11-20 17:13:10 -08:00
Martin Michelsen 11880ecc05 fix v2 challenge mode overlays 2023-11-20 17:12:58 -08:00
Martin Michelsen a62b7dad26 fix warning in Map.cc 2023-11-19 23:20:14 -08:00
Martin Michelsen f8280e5f97 fix 6xC6 format 2023-11-19 23:18:31 -08:00
Martin Michelsen c1bf5ebb43 completely reset item creator when a quest loads 2023-11-19 23:07:21 -08:00
Martin Michelsen d1866c9bbf fix Ep2 Sinow child entity handling 2023-11-19 23:06:53 -08:00
Martin Michelsen 42e927caa9 add basic quest map disassembler 2023-11-19 23:06:30 -08:00
Martin Michelsen cd4c06231f fix challenge overlay creation on non-BB versions 2023-11-19 21:42:37 -08:00
Martin Michelsen 4588a71e5a implement 6xD1 command for BB challenge mode 2023-11-19 21:41:51 -08:00
Martin Michelsen 9476a3fc27 show rare seed and variations at game join time if $debug is on 2023-11-19 16:02:01 -08:00
Martin Michelsen b03ccc7e3e fix bug that leaves units equipped after armor item is destroyed 2023-11-19 16:01:24 -08:00
Martin Michelsen bc4092fb75 clean up switch block in team command handler 2023-11-19 13:13:55 -08:00
Martin Michelsen 261cefc8b1 name the unknown grave field in PlayerRecords_Challenge 2023-11-19 13:13:37 -08:00
Martin Michelsen 34666ee220 add missing challenge mode restart commands 2023-11-19 12:38:34 -08:00
Martin Michelsen c918596850 update to-do list 2023-11-19 12:38:22 -08:00
Martin Michelsen 976610705a fix wrap item bug 2023-11-18 23:13:34 -08:00
Martin Michelsen 5758f8dba1 remove in-game enemy drop debug message 2023-11-18 23:13:34 -08:00
Martin Michelsen 8d83b941d0 add debug messages in tekker adjustment code 2023-11-18 23:13:34 -08:00
Martin Michelsen 7ab98f41da fix challenge overlays for non-leaders 2023-11-18 23:13:34 -08:00
Martin Michelsen 5499d29cc2 add AR code translator shell 2023-11-18 23:13:34 -08:00
Martin Michelsen dd5873266d update sub_version notes 2023-11-18 23:13:34 -08:00
Martin Michelsen c1e225847e initial implementation of BB teams (WIP) 2023-11-18 23:13:34 -08:00
Matt 99d1a3272a Add English versions of JP-only BB quests 2023-11-18 15:13:19 -08:00
Martin Michelsen d316d2e260 fix game menu entry flags on v1/v2 2023-11-16 23:37:33 -08:00
Martin Michelsen 2f99a3760a fix visual.version field 2023-11-16 23:27:24 -08:00
Martin Michelsen 6b1a3e615b fix UTF-16 decoding bug again 2023-11-16 23:22:51 -08:00
Martin Michelsen 132395a53a fix DC NTE lobby interactions 2023-11-16 23:22:26 -08:00
Martin Michelsen 9cbcd09be0 fix UTF-16 decoding bug 2023-11-16 21:02:00 -08:00
Martin Michelsen 35f48cbd8f fix default in 18EA struct 2023-11-16 21:01:42 -08:00
Martin Michelsen db6578d57c move color encoding functions to GVMEncoder header 2023-11-16 21:01:06 -08:00
Martin Michelsen 4a5ea63f4a update 6xAC notes 2023-11-16 15:44:00 -08:00
Martin Michelsen 27608d9c11 implement 6xE1 2023-11-16 15:43:53 -08:00
Martin Michelsen c84d4b134f add BB global EXP multiplier 2023-11-15 22:38:37 -08:00
Martin Michelsen 722010c0f7 add $save command 2023-11-15 22:38:36 -08:00
Martin Michelsen 82c651a3ad implement BB trade window 2023-11-15 22:38:36 -08:00
Martin Michelsen 5834a41cec update to-do list 2023-11-15 21:34:27 -08:00
Martin Michelsen f48b5ac8b2 update notes on 8A command 2023-11-15 20:57:09 -08:00
Martin Michelsen 1b29f20541 fix incorrect object lists in quest 2023-11-15 20:01:45 -08:00
Martin Michelsen b492a2fac6 handle rejected tekker results properly 2023-11-15 18:14:04 -08:00
Martin Michelsen c896c11f57 fix duplicate pick up disconnections on BB 2023-11-15 17:29:09 -08:00
Martin Michelsen 6aef245eab fix item ID inconsistencies between server and client due to shops and tekker in BB 2023-11-15 17:18:46 -08:00
Martin Michelsen 8ae6500fb5 add extra aliases for m&y in $item 2023-11-15 17:17:59 -08:00
Martin Michelsen 768bdb5b05 fix variance on specialized boxes 2023-11-15 16:02:31 -08:00
Martin Michelsen f997376819 fix equip slot check 2023-11-15 15:24:54 -08:00
Martin Michelsen 3d7b6837ec disable equip tracking in non-BB games 2023-11-15 14:41:13 -08:00
Martin Michelsen 533ee04443 fix join command queue bug 2023-11-15 13:33:34 -08:00
Martin Michelsen 6e1691d023 fix mag stat adjustments during level up 2023-11-15 12:47:24 -08:00
Martin Michelsen be6fd25190 implement proper equip/unequip tracking 2023-11-15 12:47:14 -08:00
Martin Michelsen ac57fb16a4 fix unit modifiers in $item command 2023-11-15 11:39:50 -08:00
Martin Michelsen 687a4515a2 fix bug that caused sorting inventory to delete extended tech levels 2023-11-15 11:34:53 -08:00
Martin Michelsen 0705b4d155 don't filter by episode at government counter 2023-11-15 00:03:21 -08:00
Martin Michelsen 2818b4ac2f clean up bit cast 2023-11-14 23:50:46 -08:00
Martin Michelsen ab5536d554 add more quest debugging commands 2023-11-14 23:27:40 -08:00
Martin Michelsen fbb053883b implement 6xDE command 2023-11-14 23:27:27 -08:00
Martin Michelsen d1161dd8e4 fix cheat mode check on proxy 2023-11-14 22:25:03 -08:00
Martin Michelsen 91b54b635d fix bug that caused boxes to never be empty 2023-11-14 21:52:38 -08:00
Martin Michelsen 2e89cfa8d6 use server's rt_index for enemy item drops 2023-11-14 21:52:38 -08:00
Martin Michelsen 62d484472f implement 6xE0 command 2023-11-14 21:52:38 -08:00
Martin Michelsen ba3016f89c filter non-download quests by episode 2023-11-14 21:52:38 -08:00
Martin Michelsen c5605c8685 fix some missing client ID bounds checks 2023-11-14 21:52:38 -08:00
Martin Michelsen 126e5944f4 refine 6x70 structure 2023-11-14 21:52:38 -08:00
Martin Michelsen 1531f4dad2 work around data race during game join 2023-11-14 21:52:38 -08:00
Martin Michelsen 82d0539c31 also blank name_color_checksum during $bbchar 2023-11-14 12:29:35 -08:00
Martin Michelsen 5c47385bee fix some $bbchar bugs 2023-11-14 12:25:19 -08:00
Martin Michelsen e3956a0a09 improve specialized box log messages 2023-11-14 12:24:59 -08:00
Martin Michelsen 6568ba7e32 unset x bit on everything in system/ 2023-11-13 22:18:22 -08:00
Martin Michelsen 4fe238a01a track specialized boxes server-side 2023-11-13 22:07:21 -08:00
Martin Michelsen 4b4627d3e5 fix material tracking bug 2023-11-13 22:06:49 -08:00
Martin Michelsen a1b457a5e6 make EXP computation match the client 2023-11-13 18:16:59 -08:00
Martin Michelsen 1ca0e928a4 rename area -> floor in most places 2023-11-13 17:25:16 -08:00
Martin Michelsen 8d4c9ca93a add Ep3 EU in handler-tables 2023-11-13 16:49:46 -08:00
Martin Michelsen 83b8f1a87c delete now-unused player data templates 2023-11-13 16:21:35 -08:00
Martin Michelsen 33a6e307e9 add support for v1 rare item tables 2023-11-13 16:18:20 -08:00
Martin Michelsen 08fbbd50ad fix various battle mode behaviors 2023-11-13 15:42:17 -08:00
Martin Michelsen c5f047dc0d don't check missing categories during quest indexing 2023-11-13 14:25:49 -08:00
Martin Michelsen d976452e00 update readme for new quest directory structure 2023-11-13 14:25:49 -08:00
Martin Michelsen cbe69c6ada fix pvr codepath in quest loading 2023-11-13 14:25:49 -08:00
Martin Michelsen 201676be5c fix REG32_SET_FIXED disassembly 2023-11-13 14:25:49 -08:00
Martin Michelsen 5e6a5355f5 fix load condition for non-BB clients 2023-11-13 14:00:59 -08:00
Martin Michelsen 18ddfa4ef4 use .psochar format for BB characters 2023-11-13 13:00:22 -08:00
Martin Michelsen f5bfd4a3c6 fix signed/unsigned comparison 2023-11-12 20:16:29 -08:00
Martin Michelsen 9c821b2988 organize quests directory by category 2023-11-12 16:30:03 -08:00
Martin Michelsen afba337575 clean up random enemy generation 2023-11-12 12:19:37 -08:00
Martin Michelsen 53451c2d45 add both Ep3 EU ports in config.json 2023-11-12 12:16:48 -08:00
Matt 884653d41c Fix Xbox symlink for q240 2023-11-12 12:14:47 -08:00
Matt 5304fff790 Fix incorrect names for Episode 2 Challenge J 2023-11-12 12:14:47 -08:00
Matt 4316afc137 Add Xbox login and lobby ports 2023-11-12 12:14:47 -08:00
Matt 616f8ad827 Add J versions of BB side story quests 2023-11-12 12:14:47 -08:00
Matt f0f9171acd Add various BB quests 2023-11-12 12:14:47 -08:00
Matt 049135bd2d test commit 2023-11-12 12:14:47 -08:00
Matt 4e68e6a48c Add J versions of Challenge/Battle 2023-11-12 00:26:00 -08:00
Matt 272e757315 Add various BB quests 2023-11-12 00:26:00 -08:00
Matt 768c07b99a test commit 2023-11-12 00:26:00 -08:00
Martin Michelsen 4de1495c31 fix categories on updated Ep3 maps 2023-11-12 00:12:32 -08:00
Martin Michelsen 7872fea6ab send rare enemy list again after loading a quest 2023-11-12 00:01:41 -08:00
Martin Michelsen d33709f4a2 make quests appear in the menu even if they don't exist in player's language 2023-11-12 00:01:41 -08:00
Martin Michelsen 43d7815165 fix some item-related debug messages 2023-11-12 00:01:41 -08:00
Martin Michelsen 3057c31d01 update notes on Ep3 EU 50Hz 2023-11-12 00:01:41 -08:00
Martin Michelsen cce42c4165 add $quest command for debugging 2023-11-12 00:01:41 -08:00
Martin Michelsen 3e735fcea4 implement BB challenge mode random enemy generation 2023-11-11 23:58:24 -08:00
Martin Michelsen 779d32d20f fix $matcount on v2 2023-11-11 22:32:10 -08:00
Martin Michelsen 1fa3d3a56d add other languages for Ep3 maps 2023-11-11 21:44:00 -08:00
Martin Michelsen b2a22522d2 unset x bit on ep3 maps 2023-11-11 21:39:49 -08:00
Martin Michelsen 4e93b2fc8b fix S-rank weapon name encoding/decoding 2023-11-11 15:45:59 -08:00
Martin Michelsen 90b7f0d0c0 add $ping command 2023-11-10 17:59:43 -08:00
Martin Michelsen a0f0230700 forbid rare enemies in challenge mode 2023-11-10 12:41:41 -08:00
Martin Michelsen a0505176ec get quest episode number from start function instead of header 2023-11-10 12:41:29 -08:00
Martin Michelsen 51ba23faa6 exempt solo-mode games from $debug client placement 2023-11-10 11:57:58 -08:00
Martin Michelsen d8e35b021f fix disconnect message when Quit Game is selected 2023-11-09 10:33:08 -08:00
Martin Michelsen a966696d9d fix used_chars_16 error message 2023-11-09 09:18:32 -08:00
Martin Michelsen 72d0047634 fix incorrect parray usage 2023-11-09 09:18:21 -08:00
Martin Michelsen cabd03a82e implement BB challenge param commands 2023-11-08 22:44:59 -08:00
Martin Michelsen 3ea65ccc75 fix missing 6x1B handler 2023-11-08 19:01:01 -08:00
Martin Michelsen 38c0d975cc fix missing 6xDC handler 2023-11-08 15:47:56 -08:00
Martin Michelsen 77799d1a37 add comment about 9F command timing 2023-11-08 15:47:43 -08:00
Martin Michelsen 7d0438f149 fix area_norm for Episode 4 2023-11-07 22:51:44 -08:00
Martin Michelsen c9a61afa62 fix BB $edit name 2023-11-07 22:51:27 -08:00
Martin Michelsen 2da235caf7 don't print BB character name language markers to terminal 2023-11-07 22:24:54 -08:00
Martin Michelsen aa577b4b63 fix HP/TP results in $matcount 2023-11-07 21:50:46 -08:00
Martin Michelsen af43756899 fix typo in comment 2023-11-07 18:51:52 -08:00
Martin Michelsen 696fb8377e re-record XB test 2023-11-07 18:01:09 -08:00
Martin Michelsen cb0e9ba0b2 fix ending proxy session on non-virtual connections 2023-11-07 17:53:31 -08:00
Martin Michelsen 01f3ed7bc6 fix some endianness differences on GC/XB 2023-11-07 17:53:31 -08:00
Martin Michelsen d46e6de4f0 fix xbox redirect command 2023-11-07 17:53:31 -08:00
Martin Michelsen 71cfced5ee add xbox support 2023-11-06 23:09:09 -08:00
Martin Michelsen 4b1f5420f2 save player stats on external level up 2023-11-06 23:09:09 -08:00
Martin Michelsen 0de169e474 fix overlay creation log message 2023-11-06 23:09:09 -08:00
Matt bc8010d704 Add info about setting DNS info to DC flash
Should probably ask Flycast to do this automatically with zero values.
2023-11-06 08:50:04 -08:00
Matt 05b5998a62 Update README.md 2023-11-06 08:50:04 -08:00
Matt 7a5a3deb4d Update Flycast instructions 2023-11-06 08:50:04 -08:00
Martin Michelsen f2e84dbf78 add logging for BB bank actions 2023-11-05 18:37:11 -08:00
Martin Michelsen f0cbb08742 show item price in encode-item action 2023-11-05 18:36:57 -08:00
Martin Michelsen 1deb5e0708 fix tech disk price computation 2023-11-05 18:36:40 -08:00
Martin Michelsen 5326c1d888 fix comment on Ep3 tournament command struct 2023-11-05 18:36:23 -08:00
Martin Michelsen 519565760f add to-do list for PSOX 2023-11-05 18:36:04 -08:00
Martin Michelsen d0dbffb364 add PSOX login port 2023-11-05 12:36:01 -08:00
Martin Michelsen 5957fd62e3 add missing include 2023-11-04 22:10:52 -07:00
Martin Michelsen e8d605afe3 implement v1-encoding for v2 items 2023-11-04 21:30:24 -07:00
Martin Michelsen 25c0aa21dc remove client ID check for externally-generated item IDs 2023-11-04 09:20:42 -07:00
Martin Michelsen b06bfc13b4 don't enforce grind limits on v1/v2 2023-11-03 23:42:44 -07:00
Martin Michelsen a7e478780e deal with invalid 6x59 commands 2023-11-03 23:10:07 -07:00
Martin Michelsen f63b4bd88b don't send blank 6x5F commands when items are skipped 2023-11-03 22:15:43 -07:00
Martin Michelsen cbfcbe16f9 fix $inftp text message 2023-11-03 21:23:00 -07:00
Martin Michelsen 6b812520bc refine ObjectEntry structure 2023-11-02 23:20:00 -07:00
Martin Michelsen f1b00d3ee0 fix unit modifiers in ItemData 2023-11-02 23:19:24 -07:00
Martin Michelsen 008e59b892 fix DC QST decoder 2023-11-02 14:26:06 -07:00
Martin Michelsen 482bc5fbad use client's language when generating download quests 2023-11-02 12:07:11 -07:00
Martin Michelsen 983c6e1ebc fix English language quest fallback in menu generation 2023-11-01 23:19:49 -07:00
Martin Michelsen 1888ab61d4 add ItemRT conversion action 2023-11-01 23:19:49 -07:00
nolrinale ef5350f69b Fixing redaction 2023-10-31 11:59:59 -07:00
nolrinale 5a518c9980 Adding PSOBB localization resources 2023-10-31 11:59:59 -07:00
Martin Michelsen d97db987cd fix BB joinable quest loading bug 2023-10-31 11:04:08 -07:00
Martin Michelsen 8c85868e08 add force English flag for Tethealla BB client 2023-10-31 11:00:54 -07:00
Martin Michelsen 9e682e7c13 add TODO about quest progress flags 2023-10-31 11:00:32 -07:00
Martin Michelsen 96e478192a fix missing value in name_for_enum<EnemyType> 2023-10-31 10:08:17 -07:00
Martin Michelsen 724186a8c0 make $edit level also set stats 2023-10-31 09:57:29 -07:00
Martin Michelsen 4158f4a42a don't double-clear destroyed entity set during quest load 2023-10-30 15:27:08 -07:00
Martin Michelsen 14e6111448 remove redirection feature 2023-10-30 15:19:41 -07:00
Martin Michelsen add46095c3 document BB 0101 command 2023-10-30 14:48:02 -07:00
Martin Michelsen 5e2e38f1b5 rewrite client config; use BB state from login command 2023-10-30 13:15:41 -07:00
Martin Michelsen 47198779b7 add more info to log prefixes 2023-10-29 18:29:34 -07:00
Martin Michelsen 5ff2694ded split information menu across v1+v2 / v3 2023-10-29 18:14:09 -07:00
Martin Michelsen 138c563a40 add v2 challenge templates 2023-10-29 18:01:47 -07:00
Martin Michelsen 5ec969ece3 ignore duplicate item pickup requests 2023-10-29 18:01:44 -07:00
Martin Michelsen 4e2e423a4b fix duplicate entity ids in ItemCreator; add decision logging 2023-10-29 15:28:23 -07:00
Martin Michelsen 632af03a3f fix unidentified flag logic on v2 2023-10-29 14:39:21 -07:00
Martin Michelsen 025fc154d4 refine some BB structures 2023-10-29 13:32:29 -07:00
Martin Michelsen 1ca3d3b27f fix Anti max level on v2 2023-10-29 13:32:29 -07:00
Martin Michelsen 1b839520c9 delete unused SJIS table 2023-10-29 13:32:29 -07:00
Martin Michelsen 293df2b73a fix license autocreation 2023-10-29 13:32:29 -07:00
Martin Michelsen c496abc2bf fix flags argument to add-license shell command 2023-10-28 16:52:56 -07:00
Martin Michelsen 45c2b792f7 fix range check bug in non-v4 ItemParameterTable 2023-10-28 14:50:31 -07:00
Martin Michelsen 50a594ec60 fix logic for EXP-stealing weapons 2023-10-28 13:23:32 -07:00
Martin Michelsen b5739fff68 annotate special name table with types/amounts 2023-10-28 13:23:16 -07:00
Martin Michelsen 2c6df68af3 fix unit table in v2/v3 ItemCreator 2023-10-28 13:23:00 -07:00
Martin Michelsen 8a1c4f5f8b PhysicalData and PlayerStats are the same structure 2023-10-28 10:45:59 -07:00
Martin Michelsen 87cae99326 add default values for all command structs 2023-10-28 10:29:37 -07:00
Martin Michelsen ef939075ef fix some text handling with DC NTE 2023-10-28 01:06:43 -07:00
Martin Michelsen a6a1647801 add missing include again 2023-10-28 00:16:59 -07:00
Martin Michelsen 3ebe7dd3e2 fix camera zone layout in ep3 map disassembly 2023-10-28 00:10:55 -07:00
Martin Michelsen cc1ce099e5 fix constexpr global 2023-10-28 00:10:55 -07:00
Martin Michelsen 62dde991df add missing include 2023-10-28 00:03:59 -07:00
Martin Michelsen 75c11aeba5 refine BattleParamEntry format 2023-10-27 23:58:34 -07:00
Martin Michelsen ed05a5f6ec convert schtserv rare table to json 2023-10-27 23:04:02 -07:00
Martin Michelsen 1c2786ef43 support v2 and v3 ItemPMT files 2023-10-27 21:08:34 -07:00
Martin Michelsen 7651922dc9 add notes about mag effect activation 2023-10-27 21:08:34 -07:00
Martin Michelsen 3a21cb29fd refine PlayerInventoryItem 2023-10-27 21:08:34 -07:00
Matt 005eeb3a3f Change HUcast and RAcast shorthand to the more commonly accepted standard 2023-10-27 12:37:22 -07:00
Martin Michelsen 582fd84f5e rewrite CommonItemSet to support v2 2023-10-26 17:40:26 -07:00
Martin Michelsen 067c28dee5 fix luck material usage on v2 2023-10-26 14:41:28 -07:00
Martin Michelsen 12fbdbbcdd restrict externally-generated item ID range further 2023-10-26 11:25:27 -07:00
Martin Michelsen 700b1497d6 don't use format_data_string to serialize non-English strings 2023-10-26 00:48:29 -07:00
Martin Michelsen 20d709686a require cheats to be allowed on the server for $rand and $secid commands 2023-10-26 00:24:27 -07:00
Martin Michelsen 5c2564336e fix unicode text set codec 2023-10-26 00:03:36 -07:00
nolrinale ee4dade7ad Adding Vanilla PSOBB Rare Item Drop Data Files 2023-10-25 20:20:55 -07:00
Martin Michelsen 7476eb62d3 allow server item tables to be enabled by default 2023-10-25 18:48:22 -07:00
Martin Michelsen 6466eec106 fix externally-generated item IDs in item tracking code 2023-10-25 17:14:04 -07:00
Martin Michelsen 5f0a6f3d8e factor FloorItem struct into 6x5F format 2023-10-25 17:14:04 -07:00
Martin Michelsen 5d251361b0 fix negative bonuses in item descriptions 2023-10-25 17:14:04 -07:00
Martin Michelsen 554edf6edf don't force personal cheat flags off when cheat mode is disabled in a game 2023-10-25 17:14:04 -07:00
Martin Michelsen 0c53a0dc41 rewrite text encoding to handle non-English properly 2023-10-25 17:14:04 -07:00
Matt 6b97c628ef Update DC Serial Generator instructions once again 2023-10-22 20:31:23 -07:00
Martin Michelsen 85125a5569 add override section ID name to confirmation message 2023-10-22 09:43:02 -07:00
Martin Michelsen 1a2be3ab11 update DC serial generator instructions again 2023-10-22 09:43:02 -07:00
Martin Michelsen c0740fd21f fix v2 visual checks again 2023-10-22 09:13:29 -07:00
Martin Michelsen d2d96d9c0a get client language from login command instead of player data 2023-10-22 08:55:09 -07:00
Martin Michelsen ba7a3fc4c6 move item tables to a separate directory 2023-10-21 22:48:27 -07:00
Martin Michelsen 8f2f7670b2 make $item disk:reverser work 2023-10-21 22:17:29 -07:00
Martin Michelsen c579e47354 fix exception handling in $patch command 2023-10-21 22:17:29 -07:00
Martin Michelsen c4790068ef fix cross-version lobby appearance and name colors 2023-10-21 22:01:38 -07:00
Martin Michelsen 7b035d311f fix identified item flag during item generation 2023-10-21 20:34:59 -07:00
Martin Michelsen 713e8ff7c1 fix android skin color change for v2 limits 2023-10-21 18:51:58 -07:00
Martin Michelsen 53ebd42612 add unitxt encode/decode actions 2023-10-21 16:40:19 -07:00
Martin Michelsen 81edf93e3b handle V2 mag encoding properly 2023-10-21 11:48:31 -07:00
Martin Michelsen 05d508230b remove unneeded include 2023-10-20 16:27:55 -07:00
Martin Michelsen 27734a6944 use correct ItemPT table in Challenge mode 2023-10-20 16:23:23 -07:00
Martin Michelsen bf346d3f95 fix Word Select mapping across versions 2023-10-20 16:19:03 -07:00
Martin Michelsen 6933a4338b fix early idle timeout in IP stack simulator 2023-10-19 23:16:16 -07:00
Martin Michelsen 08361ad597 add extract-afs command 2023-10-19 18:55:11 -07:00
Martin Michelsen fbefb1fb21 fix comment about enemy DAR 2023-10-19 18:43:08 -07:00
Matt 08dd67d894 Correct EU Episode III connection port 2023-10-19 18:28:35 -07:00
Martin Michelsen de0e56f37c fix EXP multiplier command 2023-10-19 17:24:16 -07:00
Martin Michelsen 57a5476ff8 remove some done items from to-do list 2023-10-19 15:54:46 -07:00
Martin Michelsen a211bd07ac implement 6xD2 command 2023-10-19 15:45:32 -07:00
Martin Michelsen 5a30272869 implement some BB quest commands 2023-10-19 15:34:06 -07:00
Martin Michelsen 4bc5f1b90f describe entire battle rules structure 2023-10-18 23:30:27 -07:00
Martin Michelsen c0c7bf9b16 fix incorrect game base_version setting 2023-10-18 21:15:45 -07:00
Martin Michelsen 6ec41a279e add more missing includes 2023-10-18 17:33:46 -07:00
Martin Michelsen 519933c44d add missing include 2023-10-18 17:27:14 -07:00
Martin Michelsen 9d0ba3a97b fix class replacement for v3/v2 compatibility 2023-10-18 17:22:26 -07:00
Martin Michelsen 2e36cebbcc implement redirect destinations 2023-10-18 17:22:07 -07:00
Martin Michelsen e8d8b94ffa implement character overlays for challenge mode 2023-10-18 17:16:51 -07:00
Martin Michelsen 8c2ce5210d implement battle rules and character replacement 2023-10-18 11:57:13 -07:00
Martin Michelsen 13dacc013a document CardDefinition and a few other things 2023-10-17 15:51:29 -07:00
Martin Michelsen 85ef84a6d5 fix wording in Ep3 card transformation comment 2023-10-17 10:24:11 -07:00
Martin Michelsen 08a1bf3238 implement server drop tables 2023-10-16 23:10:13 -07:00
Martin Michelsen d66c1f5de9 add ItemRT.afs decoder 2023-10-16 21:14:38 -07:00
Martin Michelsen ba09188b82 add TODO about Ep3 ranks 2023-10-16 19:37:38 -07:00
Martin Michelsen 0bb9718da3 add JSON rare table conversion 2023-10-16 19:37:29 -07:00
Martin Michelsen 04d92d93e5 don't show weapon percents if they're all zero 2023-10-16 19:36:39 -07:00
Martin Michelsen e2f72f3088 split Ep3 and Ep1&2 quest indexes 2023-10-16 17:54:04 -07:00
Martin Michelsen 22ceb2d1f7 fix cross-language quest loading 2023-10-16 11:43:06 -07:00
Martin Michelsen 112896bb34 add non-English versions of several GC quests 2023-10-16 11:34:11 -07:00
Martin Michelsen 5d71b66f84 implement quest version separation 2023-10-16 00:20:38 -07:00
Martin Michelsen 7005b573f5 add names to IPS listen sockets 2023-10-14 21:28:02 -07:00
Martin Michelsen 7d95efa803 don't warn for DHCP release commands 2023-10-13 10:07:43 -07:00
Martin Michelsen 0a3528b978 explicitly clear unused_bootp_legacy 2023-10-13 00:54:46 -07:00
Martin Michelsen 78698a0a89 implement DHCP in IPStackSimulator 2023-10-13 00:45:27 -07:00
Martin Michelsen 01033287f2 add AITalk.bin format notes 2023-10-13 00:37:32 -07:00
Martin Michelsen 1d8c78166d allow trap cards to be customized 2023-10-12 17:55:37 -07:00
Martin Michelsen 4e29f22655 rename Leader/Group function in Ep3 server 2023-10-12 11:46:33 -07:00
Martin Michelsen 31c0a35bb6 reorganize and expand save file tests 2023-10-12 10:57:47 -07:00
Martin Michelsen 9fd19d2676 name more fields in save structs 2023-10-12 10:55:42 -07:00
Martin Michelsen bb89bc9b7b document flags field in character save file struct 2023-10-10 23:53:56 -07:00
Martin Michelsen 76ad50886f add $matcount command 2023-10-10 23:53:33 -07:00
Martin Michelsen 8b1fab916d update some effect names and descriptions 2023-10-10 15:45:27 -07:00
Martin Michelsen 16bb320ed8 add yet another spectator metadata send 2023-10-10 15:14:20 -07:00
Martin Michelsen 453a05fb8c reformat comment 2023-10-10 11:50:33 -07:00
Martin Michelsen c33af99ae5 name some previously-unknown fields 2023-10-10 10:55:49 -07:00
Martin Michelsen 8ad27e9001 fix trial quest for downloading 2023-10-09 21:41:38 -07:00
Martin Michelsen 132daf2c0e retitle Pinz's Shop code appropriately 2023-10-09 20:53:36 -07:00
Martin Michelsen d39f1eb74c add Ep3 proxy option for infinite time 2023-10-09 18:51:19 -07:00
Martin Michelsen 9da756cc14 fix control characters in text-english.json 2023-10-09 18:39:54 -07:00
Martin Michelsen a693fcd48e update note on simple mail command 2023-10-09 18:06:15 -07:00
Martin Michelsen 462f4842aa add unused sound effects code 2023-10-09 18:05:53 -07:00
Martin Michelsen 99fff5baf2 add default dice text files 2023-10-09 11:07:18 -07:00
Martin Michelsen 40da9e5604 add TextDice to disassembly 2023-10-09 11:06:47 -07:00
Martin Michelsen 41c07a3da8 update format of cards.html and make generation faster 2023-10-09 10:00:00 -07:00
Martin Michelsen 9677d0fca4 add default text archive for ep3 card disassembly 2023-10-09 09:10:39 -07:00
Martin Michelsen a674721727 add text archive encoder/decoder 2023-10-08 23:00:18 -07:00
Martin Michelsen aa76631073 update some comments 2023-10-08 17:57:40 -07:00
Martin Michelsen 3902c64424 fix $spec in tournaments 2023-10-08 17:57:24 -07:00
Martin Michelsen 226140deb7 load correct version of quest in cross-play games 2023-10-08 15:45:42 -07:00
Martin Michelsen 812310054c fix 6x70 handling in dc/pc cross-play 2023-10-08 15:20:48 -07:00
Martin Michelsen 5673de78be fix up to-do list 2023-10-08 15:20:15 -07:00
Martin Michelsen 32af88cd9b undo accidental language tag change 2023-10-08 14:53:52 -07:00
Martin Michelsen 3bb8ac5c43 fix BB play_time handling with long char names 2023-10-08 14:50:32 -07:00
Martin Michelsen ea7f655408 implement Episode 3 download quest categories 2023-10-08 14:19:31 -07:00
Martin Michelsen 948985b057 describe card effect name_index field 2023-10-08 12:35:34 -07:00
Martin Michelsen 8df36ea3c2 index quests by number, then by version 2023-10-08 11:14:46 -07:00
Martin Michelsen e723e80171 fix show-ep3-maps 2023-10-08 09:25:01 -07:00
Martin Michelsen 29dd0caaab fix QST encoding issues 2023-10-08 09:15:19 -07:00
Martin Michelsen 30394e7120 consolidate args in quest disassembler 2023-10-07 22:38:51 -07:00
Martin Michelsen eee420f2e1 update to-do list 2023-10-07 21:51:02 -07:00
Martin Michelsen 065c11ac90 only show leader change if player notifs are on 2023-10-07 21:51:02 -07:00
Martin Michelsen 6bebcc841e implement overflow lobbies 2023-10-07 21:10:08 -07:00
Martin Michelsen c2b2239df0 bring back patch_flycast_memory.py 2023-10-07 21:10:08 -07:00
Martin Michelsen abd87054ac add cross-play options 2023-10-07 20:43:35 -07:00
Martin Michelsen 07b1e9cde3 enforce 6x command size limit 2023-10-07 18:22:58 -07:00
Martin Michelsen d5cc91a9bf handle inventory extension data properly 2023-10-07 18:17:54 -07:00
Martin Michelsen 9fd90ee324 update names used in Ep3 disassembly 2023-10-07 13:59:48 -07:00
Martin Michelsen 8a6a7fb47f update some command notes 2023-10-07 12:27:23 -07:00
Martin Michelsen f77e21800c fix QST encoder 2023-10-07 08:38:06 -07:00
Martin Michelsen 2478f18298 don't forward Ep3 server commands sent by clients 2023-10-07 08:38:06 -07:00
Martin Michelsen bb1c0f1d1a add shell server TODO 2023-10-07 08:38:06 -07:00
Matt 9cf53c85a2 pls work 2023-10-07 08:36:38 -07:00
Matt ab5d8e4522 Correct Readme spacing 2023-10-07 08:36:38 -07:00
Matt e4bb5bc28c Remove patch_flycast_memory.py 2023-10-07 08:36:38 -07:00
Matt 1cb0d5bcec Update Flycast connection instructions 2023-10-07 08:36:38 -07:00
Martin Michelsen 88d887a58a combine maps-free and maps-quest into one directory 2023-10-05 22:49:54 -07:00
Martin Michelsen 77f64d3496 document PC save encrypt/decrypt actions 2023-10-05 22:49:54 -07:00
Martin Michelsen cdb3943d9f rename and document DC serial number functions 2023-10-05 22:49:54 -07:00
Martin Michelsen 532bcab0b6 add debug messages for previously-unused CAx commands 2023-10-05 10:38:40 -07:00
Martin Michelsen ab3c27772e document more Ep3 battle subcommands 2023-10-05 10:28:34 -07:00
Martin Michelsen 682632f1c5 implement GBA file not found command 2023-10-05 10:28:04 -07:00
Martin Michelsen 6850bc0e06 update some command notes 2023-10-05 10:27:38 -07:00
Martin Michelsen 6368ebcd71 use spectator text field for something 2023-10-05 00:06:34 -07:00
Martin Michelsen a23dabd58e fix spectator count on joining a spectator team 2023-10-05 00:00:18 -07:00
Martin Michelsen da37fc1fee document spectator message in 6xB4x52 command 2023-10-05 00:00:18 -07:00
Martin Michelsen 15c08c0101 add more info to 6xB4x46 version messages 2023-10-05 00:00:18 -07:00
Martin Michelsen 7e84a5cb6a update some comments 2023-10-04 10:40:18 -07:00
Martin Michelsen 3c4019f705 add simulator AR code 2023-10-04 10:40:05 -07:00
Martin Michelsen 040356d365 fix silly gcc warning 2023-10-03 21:20:06 -07:00
Martin Michelsen f0c339e040 make tournament deck selection start at the same time for all players 2023-10-03 21:13:09 -07:00
Martin Michelsen 38aaffd4bd add TODO for DC/PC crossplay 2023-10-03 21:13:09 -07:00
Matt e81e60b543 Unhide VR category for V1/2 2023-10-03 19:40:06 -07:00
Martin Michelsen da48712449 absolve myself of some longstanding laziness 2023-10-03 19:35:39 -07:00
Martin Michelsen ceefe44b96 add some to-do items 2023-10-03 19:35:39 -07:00
Martin Michelsen bc22327361 add support for all DC versions 2023-10-03 17:58:24 -07:00
Martin Michelsen 37c4cbd8f3 undo battle table fast loading change 2023-10-02 16:58:14 -07:00
Martin Michelsen d90fc2a543 make encryption objects serializable 2023-10-01 22:44:56 -07:00
Martin Michelsen 2dca523a4b clean up comment about Ep3 reverse-engineering 2023-10-01 22:44:56 -07:00
Martin Michelsen 4aa156a322 only show recording messages if Ep3 debug messages are on 2023-10-01 19:27:59 -07:00
Martin Michelsen e9b6b681bd fix Ep3 spectator test 2023-10-01 15:51:53 -07:00
Martin Michelsen 8cf0b9f947 add initializer for SpectatorEntry::name_color 2023-10-01 08:55:08 -07:00
Martin Michelsen bbe42b765c fix spectators not seeing each other's names when joining spectator team 2023-10-01 08:45:13 -07:00
Martin Michelsen 507b2fbcac fix disconnect when viewing Ep3 team info with missing player 2023-10-01 07:52:38 -07:00
Martin Michelsen 5fe21b8eec add initializers to ClientConfig structs 2023-09-30 09:40:50 -07:00
Martin Michelsen d488ccd100 fix type in GVM entry struct 2023-09-30 00:45:28 -07:00
Martin Michelsen 403c17b42d show defeat status in tournament team info 2023-09-29 23:36:08 -07:00
Martin Michelsen a0ff0cf8e7 add some reloading TODOs 2023-09-29 19:00:34 -07:00
Martin Michelsen feded3e891 make tournament and battle table matches load faster 2023-09-29 19:00:25 -07:00
Martin Michelsen 74307ea7a2 maybe fix multiplayer tournament matches 2023-09-29 18:20:36 -07:00
Martin Michelsen 45ea21860d fix spectator list in game details display 2023-09-28 23:19:02 -07:00
Martin Michelsen 6a6fb91acb explain overall_time_limit more clearly 2023-09-28 15:44:18 -07:00
Martin Michelsen 8aaadf81ac update notes about before_message 2023-09-28 14:51:16 -07:00
Martin Michelsen 1f34b6bb90 add TODO for nonblocking reloads 2023-09-28 14:51:07 -07:00
Martin Michelsen fbdfdb085a add learnings from Ep3 Trial Edition download quest 2023-09-28 14:50:52 -07:00
Martin Michelsen 5c5da8e10b add converted Ep3 Trial Edition download quest 2023-09-28 14:46:24 -07:00
Martin Michelsen 103e5325a3 fix CAx1B client ID check 2023-09-27 10:51:18 -07:00
Martin Michelsen 02584e4458 add card list HTML generator 2023-09-27 10:00:33 -07:00
Martin Michelsen 263e9114c5 add TODO for detector encryption 2023-09-26 20:11:34 -07:00
Martin Michelsen fed50aec6b fix typo in readme 2023-09-26 20:11:21 -07:00
Martin Michelsen b9057cf562 add DC NTE UDP-off variants 2023-09-26 12:17:53 -07:00
Martin Michelsen 63f6aff4ed add decoder for Ep3 trial download quests 2023-09-26 12:12:41 -07:00
Martin Michelsen a4961ad69d fix DCv1 login with UDP off 2023-09-26 12:10:04 -07:00
Martin Michelsen f0bd2c7aa6 make incorrect password errors let you re-enter your password 2023-09-26 10:47:16 -07:00
Martin Michelsen ac13bf13b2 update readme 2023-09-26 10:46:57 -07:00
Martin Michelsen 98dc2af278 support decompressed card text archives 2023-09-26 10:46:46 -07:00
Martin Michelsen b7ceeb029a fix battle record loading 2023-09-25 22:37:44 -07:00
Martin Michelsen f036f137f7 fix some wording in example config 2023-09-25 22:28:55 -07:00
Martin Michelsen 187bfa1756 fix download quests on proxy server 2023-09-25 22:28:39 -07:00
Martin Michelsen 5e14a8449c add $meseta command 2023-09-25 21:42:36 -07:00
Martin Michelsen 65f8dea0da add $call command 2023-09-25 09:47:56 -07:00
Martin Michelsen 995a05c409 prefix battle record filenames with serial number 2023-09-25 09:26:48 -07:00
Martin Michelsen 885d125fc4 eliminate the concept of temporary licenses 2023-09-25 09:26:48 -07:00
Martin Michelsen 949ad0d260 fix minor isses in battle replays 2023-09-24 23:17:22 -07:00
Martin Michelsen 9272feff8f add json licenses to gitignore 2023-09-24 16:38:12 -07:00
Martin Michelsen 058b040975 implement Episode 3 meseta 2023-09-24 16:29:58 -07:00
Martin Michelsen 8b544830a0 delete unused enum 2023-09-24 16:29:58 -07:00
Martin Michelsen 0c2ecd4ebb save player names along with tournament entries and show them in info window 2023-09-24 16:29:58 -07:00
Martin Michelsen 6b5e672ebb move VMS structure into SaveFileFormats 2023-09-24 16:29:58 -07:00
Martin Michelsen 7f7aaf920b make reload config affect welcome message and information menu 2023-09-24 09:22:49 -07:00
Martin Michelsen 5c48c75fdc fix decode_sjis 2023-09-24 08:57:07 -07:00
Martin Michelsen 2846e73710 rewrite default information menu contents 2023-09-23 22:33:06 -07:00
Martin Michelsen 2ee1891153 fix PC system filename 2023-09-23 18:06:49 -07:00
Martin Michelsen cc70280761 add PC save file formats and encrypt/decrypt functions 2023-09-23 17:08:37 -07:00
Martin Michelsen 85897baaeb ignore client rules in tournament matches 2023-09-23 09:11:22 -07:00
Martin Michelsen 14973f7453 don't allow multiple simultaneous tournaments with the same name 2023-09-23 08:47:17 -07:00
Martin Michelsen fe984a4284 fix pending match state when loading in-progress tournament 2023-09-23 08:46:58 -07:00
Martin Michelsen 99b508a256 allow tournament matches to start at any battle table 2023-09-23 08:18:36 -07:00
Martin Michelsen 6e522459ae add ability to specify separate DEF dice range 2023-09-22 22:00:17 -07:00
Martin Michelsen be0e616df7 allow players to register for another tournament if they lose their current tournament 2023-09-22 18:11:05 -07:00
Martin Michelsen 1bf3e6869d fix dice option in create-tournament 2023-09-22 17:50:10 -07:00
Martin Michelsen 0df670893f fix log settings not applying to command data 2023-09-22 17:45:31 -07:00
Martin Michelsen de9d52b352 make card drop rate explanation easier to read 2023-09-22 10:58:19 -07:00
Martin Michelsen 3542200379 improve random loading sounds code 2023-09-21 22:43:12 -07:00
Martin Michelsen 82c877f55d document how card transformation works 2023-09-21 21:18:13 -07:00
Martin Michelsen 19499bf23d update notes about D3 rank 2023-09-21 21:14:52 -07:00
Martin Michelsen 4cf1895f4d enforce ep3 lobby restrictions during Meet User 2023-09-21 18:13:01 -07:00
Martin Michelsen aa25f7e79a make compression tests not fail when run in parallel 2023-09-21 17:08:18 -07:00
Martin Michelsen 93906f8ff3 default-clear all converted_endian parrays to zero 2023-09-21 17:07:58 -07:00
Martin Michelsen 931258e8ac fix uninitialized memory in E8 command 2023-09-21 10:39:02 -07:00
Martin Michelsen 5b907d4413 add Ep3 battle test with spectator 2023-09-21 10:22:00 -07:00
Martin Michelsen a8c7da70e0 fix patch ping event case 2023-09-20 23:11:24 -07:00
Martin Michelsen 3682c082ea fix some struct notes 2023-09-20 18:27:43 -07:00
Martin Michelsen de110a1c88 don't repeat ping and idle timeout events 2023-09-20 08:28:05 -07:00
Martin Michelsen 7e4664ea25 handle ping exceptions 2023-09-20 08:03:19 -07:00
Martin Michelsen 3d0a842496 don't allow *this to be destroyed too early on idle timeout 2023-09-19 23:40:31 -07:00
Martin Michelsen 64bbeb0f70 add $stat for live ep3 battle stats 2023-09-19 22:37:19 -07:00
Martin Michelsen 2eb429436f add parent pointers to eliminate code duplication in many places 2023-09-19 22:15:41 -07:00
Martin Michelsen adad870aff annotate more fields in PlayerConfig 2023-09-19 10:05:56 -07:00
Martin Michelsen ecaea3fe49 extend full dressing room codes 2023-09-19 10:05:56 -07:00
Martin Michelsen 4f16243e41 fix incorrect type in Ep3 PlayerConfig 2023-09-19 09:16:10 -07:00
Martin Michelsen 7706adc7cb document more fields in Ep3PlayerConfig 2023-09-19 00:11:13 -07:00
Martin Michelsen 3cf39887e8 add offset comments in CameraSpec 2023-09-18 13:39:26 -07:00
Martin Michelsen c65b012ea5 add full dressing room codes 2023-09-18 13:29:14 -07:00
Martin Michelsen ed97279436 add comment about snapshot format 2023-09-18 11:06:09 -07:00
Martin Michelsen 9cb9e8064a make Rules debug string show open cases 2023-09-18 10:22:22 -07:00
Martin Michelsen 80b9af46db write a bit more about AI params 2023-09-18 09:37:09 -07:00
Martin Michelsen 83ecbf77ab add information about Ep3 camera and AI data in map files 2023-09-18 00:20:49 -07:00
Martin Michelsen 8952a4d56b don't allow toggling spectator flag in a spectator team 2023-09-17 20:47:58 -07:00
Martin Michelsen 4575adea11 fix chat message forwarding to spectators 2023-09-17 19:20:18 -07:00
Martin Michelsen 9e8a59798c explain more about how card drops work 2023-09-17 16:27:34 -07:00
Martin Michelsen bb92feb9a5 add disable chat filter AR code 2023-09-17 16:22:51 -07:00
Martin Michelsen 72155939d5 don't send spectator join commands if battle is already finished 2023-09-17 12:49:18 -07:00
Martin Michelsen 3c1c63f24e make spectator joining more robust 2023-09-17 12:36:05 -07:00
Martin Michelsen ef7f5fb798 maybe fix spectator team map loading 2023-09-17 12:02:58 -07:00
Martin Michelsen 49be421ff4 add wchat shell command 2023-09-17 11:43:35 -07:00
Martin Michelsen e27bce9313 fix spectator count when joining an existing spectator team 2023-09-17 11:43:23 -07:00
Martin Michelsen fbe621173f use correct credentials in test 2023-09-17 10:36:49 -07:00
Martin Michelsen ae518eaaf6 fix accidentally-switched tables in drop rate explanation 2023-09-17 10:33:44 -07:00
Martin Michelsen e858b79b33 use latest official card definitions file 2023-09-17 10:26:13 -07:00
Martin Michelsen 04c34e1b22 update TODO.md 2023-09-17 10:04:46 -07:00
Martin Michelsen f799cfe87c add TODO.md 2023-09-16 11:51:00 -07:00
Martin Michelsen 24f3ddef40 add puyo_j 2023-09-16 11:51:00 -07:00
Martin Michelsen 30e1aacaf0 fix tournament commands on Ep3 trial edition 2023-09-16 10:22:25 -07:00
Martin Michelsen 4741091b9f fix client crash when creating spectator team 2023-09-16 10:00:36 -07:00
Martin Michelsen 4ddc4fce1d add shuffle and resize options in tournaments 2023-09-16 10:00:36 -07:00
Martin Michelsen 1d45c18ce8 keep tournament state consistent on clients 2023-09-16 10:00:36 -07:00
Martin Michelsen 5caa21bccb disband spectator teams when primary players go to results screen 2023-09-15 20:27:23 -07:00
Martin Michelsen 9cef4a14f8 add a tournament option to disable COM entries 2023-09-15 20:27:23 -07:00
Martin Michelsen 27081bd3da add comments for better searchability 2023-09-13 18:22:57 -07:00
Martin Michelsen 2115f188d1 minor formatting 2023-09-13 12:24:18 -07:00
Martin Michelsen bf55da55bf fix segfault on insufficient level for game creation 2023-09-12 20:33:39 -07:00
Martin Michelsen 550b62dec9 add cheat command to remove an FC in an Ep3 battle 2023-09-12 19:49:38 -07:00
Martin Michelsen 215c181798 add fallback map loading in BB solo mode 2023-09-12 19:49:38 -07:00
Martin Michelsen 2f663ef2b3 add missing BB maps 2023-09-12 19:49:38 -07:00
Martin Michelsen b07748d07f fix Madness not skipping HUNTERS_SC with items equipped 2023-09-12 17:54:57 -07:00
Martin Michelsen f708ecc035 strip trailing whitespace from card text 2023-09-12 17:31:11 -07:00
Martin Michelsen fb52047e7c revert card definitions file again 2023-09-12 14:59:27 -07:00
Martin Michelsen a8d09363f1 add Ep3 flag to allow interference for human teams 2023-09-12 14:53:16 -07:00
Martin Michelsen 15566f7143 fix chained action card conditions not applying 2023-09-12 10:30:33 -07:00
Martin Michelsen 7657d4f2fc update Ep3 BB command format 2023-09-11 17:24:13 -07:00
Martin Michelsen d843a54245 update comment on map_category 2023-09-11 12:33:25 -07:00
Martin Michelsen df013784fc document map_category field in MapDefinition 2023-09-11 11:24:57 -07:00
Martin Michelsen 1f6f76a6dc fix uninitialized value used in attack env stats computation 2023-09-10 22:06:24 -07:00
Martin Michelsen b885442a4b remove client ID checks during registration phase 2023-09-10 14:56:06 -07:00
Martin Michelsen e64fa10a58 fix Raspberry Pi build 2023-09-10 13:52:49 -07:00
Martin Michelsen 66ca3ed6dd update to-do list 2023-09-10 10:50:53 -07:00
Martin Michelsen 013e099f50 update to-do list 2023-09-10 10:25:04 -07:00
Martin Michelsen debc920997 update Dolphin connection instructions 2023-09-10 09:48:46 -07:00
Martin Michelsen 80f79aa13c fix name behavior on BB/GC lobby interactions 2023-09-10 09:27:56 -07:00
Martin Michelsen 7585eaeae5 name some unknown Ep3 enum values 2023-09-10 09:27:28 -07:00
Martin Michelsen 52ed062ed9 add comment on AssistFlag enum 2023-09-09 20:06:01 -07:00
Martin Michelsen 753b89c78d give names to assist_flags 2023-09-09 19:21:33 -07:00
Martin Michelsen fa48b58773 fix invalid array access 2023-09-09 17:55:28 -07:00
Martin Michelsen aa48dd5e15 delete hard_reset_flag 2023-09-09 17:55:06 -07:00
Martin Michelsen 0863c4f27c fix CPU replacement on player disconnect 2023-09-09 12:50:41 -07:00
Martin Michelsen f12fdaf165 bounds-check input client IDs 2023-09-09 12:48:12 -07:00
Martin Michelsen e890bfad63 fix multiple array index bugs 2023-09-09 12:48:08 -07:00
Martin Michelsen f8198580dd merge Ep3 ServerBase and Server into one class 2023-09-09 10:13:51 -07:00
Martin Michelsen a40d1ad851 add reload config shell command 2023-09-09 00:06:30 -07:00
Martin Michelsen 901b2b78d2 add missing include 2023-09-08 23:58:10 -07:00
Martin Michelsen 24439a9dc3 re-record Episode 3 battle test 2023-09-08 23:54:02 -07:00
Martin Michelsen 4498fe1232 rename ep3 game command handlers 2023-09-08 23:35:16 -07:00
Martin Michelsen b9fc225786 add Ep3 $inftime command 2023-09-08 23:32:47 -07:00
Martin Michelsen c430340c9d hide Ep3 maps that don't have enough player slots for the game 2023-09-08 23:32:47 -07:00
Martin Michelsen 9c3f764cd9 fix all-players range gathering bug 2023-09-08 23:32:47 -07:00
Martin Michelsen 9dcdece1f9 fix UNKNOWN_07 and NOT_SC condition codes 2023-09-08 20:09:49 -07:00
Martin Michelsen d663472aae delete some TODO items which are now done 2023-09-08 11:30:21 -07:00
Martin Michelsen 245ebd92c6 don't send Ep3 lobby banners again after ending a proxy session 2023-09-08 10:50:16 -07:00
Martin Michelsen c1ed1afa5b add more info about Ep3 lobby banners 2023-09-08 09:38:00 -07:00
Martin Michelsen 39e491eb1e split field in 6x70 command 2023-09-07 23:54:15 -07:00
Martin Michelsen 15b9c05004 add some more AR codes 2023-09-07 22:34:18 -07:00
Martin Michelsen cfa4e3b8b0 implement Episode 3 lobby banners 2023-09-07 22:34:07 -07:00
Martin Michelsen bd6102a894 add another loading screen AR code 2023-09-06 23:55:26 -07:00
Martin Michelsen c45b4cced7 fix rules not serializing properly in tournament state 2023-09-06 23:55:06 -07:00
Martin Michelsen 548aca8cc0 fix Ep3 card auction 2023-09-06 16:39:32 -07:00
Martin Michelsen 75fab887e1 make tournament state parsing more robust 2023-09-06 09:46:33 -07:00
Martin Michelsen d2a589d968 update MapDefinition comments 2023-09-06 09:46:16 -07:00
Martin Michelsen 71d3d4e27c add offline maps and quests 2023-09-05 23:21:36 -07:00
Martin Michelsen 74ff094012 Revert "increase read timeout during log replay"
This reverts commit bbab6968d1.
2023-09-05 23:18:03 -07:00
Martin Michelsen bbab6968d1 increase read timeout during log replay 2023-09-05 23:07:18 -07:00
Martin Michelsen af781dbc09 re-record Episode 3 battle test 2023-09-05 23:00:30 -07:00
Martin Michelsen f771643880 fix rounding in division expressions 2023-09-05 23:00:30 -07:00
Martin Michelsen 2b2d8dfb3d make Episode 3 EX results configurable 2023-09-05 23:00:30 -07:00
Martin Michelsen 66f584d475 fix condition apply using incorrect criterion for non-item checks 2023-09-05 23:00:30 -07:00
Martin Michelsen 3b69d3484d bring back the $ln command 2023-09-05 23:00:30 -07:00
Matt 013a19885f Update Tournament Explainer
Explains which 4-player battle table to use more clearly
2023-09-04 17:58:52 -07:00
Matt 3a7277bc5d Update README for tournament table location
To make it less ambiguous
2023-09-04 17:58:52 -07:00
Martin Michelsen 9f943cf5d8 add $surrender command 2023-09-03 22:44:36 -07:00
Martin Michelsen c3edb93248 fix tests after name marker update 2023-09-03 22:08:07 -07:00
Martin Michelsen 5712ff3e3e fix long name truncation on non-BB versions 2023-09-03 21:33:00 -07:00
Martin Michelsen 2cb2dd3b24 fix creature summon are computation on left/right-oriented maps 2023-09-03 21:25:33 -07:00
Martin Michelsen da431cc174 add details about Ep3 rank text 2023-09-02 10:10:14 -07:00
Martin Michelsen 7c6a1e730e fix fields in Ep3 card definitions footer struct 2023-09-02 08:46:19 -07:00
Martin Michelsen 85dbea215b document Ep3 assist AI parameters 2023-09-01 20:37:54 -07:00
Martin Michelsen 8449a6d21a describe how ep3 card drop rates actually work 2023-09-01 11:08:23 -07:00
Martin Michelsen 2eda283f8f revert accidentally-committed card defs file 2023-08-31 14:03:05 -07:00
Martin Michelsen ba7951a9f4 make CardAuctionPool name matching more lenient 2023-08-31 14:00:02 -07:00
Martin Michelsen e566a247e4 fix card names in example config auction pool 2023-08-31 13:36:05 -07:00
Martin Michelsen 5b038364a1 be more aggressive when reducing size of card defs file 2023-08-31 13:35:02 -07:00
Martin Michelsen ee7c574fdf fix meseta transaction command 2023-08-31 09:37:12 -07:00
3556 changed files with 187273 additions and 81086 deletions
+7 -5
View File
@@ -15,13 +15,15 @@ Testing
# Files modified by the user and/or server that don't have defaults
system/config.json
system/ep3/battle-records/*.mzrd
system/ep3/tournament-state.json
system/ep3/maps-free/*.bind
system/ep3/maps-quest/*.bind
system/licenses.nsi
system/players/player_*
system/players/account_*
system/players/bank_*
system/licenses/*.json
system/players/*.psochar
system/players/*.psosys
system/players/*.psocard
system/players/*.nsc
system/players/*.nsa
system/patch-pc/.metadata-cache.json
system/patch-bb/.metadata-cache.json
+30 -25
View File
@@ -33,13 +33,15 @@ set (LIBEVENT_LIBRARIES
${LIBEVENT_CORE})
find_package(phosg REQUIRED)
find_package(Iconv REQUIRED)
find_package(resource_file QUIET)
# Executable definition
add_executable(newserv
set(SOURCES
src/AFSArchive.cc
src/BattleParamsIndex.cc
src/BMLArchive.cc
src/CatSession.cc
@@ -48,6 +50,7 @@ add_executable(newserv
src/Client.cc
src/CommonItemSet.cc
src/Compression.cc
src/DCSerialNumbers.cc
src/DNSServer.cc
src/EnemyType.cc
src/Episode3/AssistServer.cc
@@ -65,10 +68,12 @@ add_executable(newserv
src/FileContentsCache.cc
src/FunctionCompiler.cc
src/GSLArchive.cc
src/GVMEncoder.cc
src/IPFrameInfo.cc
src/IPStackSimulator.cc
src/ItemCreator.cc
src/ItemData.cc
src/ItemNameIndex.cc
src/ItemParameterTable.cc
src/Items.cc
src/LevelTable.cc
@@ -81,7 +86,7 @@ add_executable(newserv
src/NetworkAddresses.cc
src/PatchFileIndex.cc
src/Player.cc
src/Product.cc
src/PlayerSubordinates.cc
src/ProxyCommands.cc
src/ProxyServer.cc
src/PSOEncryption.cc
@@ -100,11 +105,21 @@ add_executable(newserv
src/ServerState.cc
src/Shell.cc
src/StaticGameData.cc
src/TeamIndex.cc
src/Text.cc
src/TextArchive.cc
src/UnicodeTextSet.cc
src/Version.cc
src/WordSelectTable.cc
)
target_include_directories(newserv PUBLIC ${LIBEVENT_INCLUDE_DIR})
target_link_libraries(newserv phosg ${LIBEVENT_LIBRARIES} pthread)
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)
@@ -120,33 +135,23 @@ endif()
enable_testing()
file(GLOB TestCases ${CMAKE_SOURCE_DIR}/tests/*.test.txt)
file(GLOB LogTestCases ${CMAKE_SOURCE_DIR}/tests/*.test.txt)
foreach(TestCase IN ITEMS ${TestCases})
foreach(LogTestCase IN ITEMS ${LogTestCases})
add_test(
NAME ${TestCase}
NAME ${LogTestCase}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_BINARY_DIR}/newserv replay-log ${TestCase} --config=${CMAKE_SOURCE_DIR}/tests/config.json --require-password=11111111 --require-access-key=111111111111)
COMMAND ${CMAKE_BINARY_DIR}/newserv --replay-log=${LogTestCase} --config=${CMAKE_SOURCE_DIR}/tests/config.json)
endforeach()
add_test(
NAME "compression-prs"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_SOURCE_DIR}/tests/test-compression.sh prs ${CMAKE_BINARY_DIR}/newserv)
add_test(
NAME "compression-bc0"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_SOURCE_DIR}/tests/test-compression.sh bc0 ${CMAKE_BINARY_DIR}/newserv)
file(GLOB ScriptTestCases ${CMAKE_SOURCE_DIR}/tests/*.test.sh)
add_test(
NAME "decode-vms"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_SOURCE_DIR}/tests/test-decode-vms.sh ${CMAKE_BINARY_DIR}/newserv)
add_test(
NAME "decode-gci"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_SOURCE_DIR}/tests/test-decode-gci.sh ${CMAKE_BINARY_DIR}/newserv)
foreach(ScriptTestCase IN ITEMS ${ScriptTestCases})
add_test(
NAME ${ScriptTestCase}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${ScriptTestCase} ${CMAKE_BINARY_DIR}/newserv)
endforeach()
# Installation configuration
+96 -85
View File
@@ -1,6 +1,6 @@
# newserv <img align="right" src="s-newserv.png" />
newserv is a game server and proxy for Phantasy Star Online (PSO).
newserv is a game server, proxy, and reverse-engineering tool for Phantasy Star Online (PSO).
This project includes code that was reverse-engineered by the community in ages long past, and has been included in many projects since then. It also includes some game data from Phantasy Star Online itself, which was originally created by Sega.
@@ -19,6 +19,7 @@ This project includes code that was reverse-engineered by the community in ages
* How to connect
* Connecting local clients
* [PSO DC](#pso-dc)
* [PSO DC on Flycast](#pso-dc-on-flycast)
* [PSO PC](#pso-pc)
* [PSO GC on a real GameCube](#pso-gc-on-a-real-gamecube)
* [PSO GC on Dolphin](#pso-gc-on-dolphin)
@@ -49,58 +50,34 @@ newserv is many things - a server, a proxy, an encryption and decryption tool, a
With that said, I offer no guarantees on how or when this project will advance. Feel free to submit GitHub issues if you find bugs or have feature requests; I'd like to make the server as stable and complete as possible, but I can't promise that I'll respond to issues in a timely manner. If you feel like contributing to newserv yourself, pull requests are welcome as well.
Current known issues / missing features / things to do:
- Implement the rest of PSOBB. Major areas of work:
- Find any remaining mismatches in enemy IDs / experience
- Sale prices for non-rare weapons with specials are computed incorrectly when buying/selling at shops
- Replace enemy list, game episode, etc. with quest data when loading a quest
- Implement trade window
- Fix some edge cases on the BB proxy server (e.g. make sure Change Ship does the right thing, which is not the same as what it should do on other versions).
- There is a function that encodes QST files, but there's no corresponding CLI option.
- Figure out what controls BML file data segment alignment.
- Extension data in inventories is not handled properly.
- PSOX is not tested at all.
- Find a way to silence audio in RunDOL.s. Some old DOLs don't reset audio systems at load time and it's annoying to hear the crash buzz when the GC hasn't actually crashed.
- Implement private and overflow lobbies.
- Enforce client-side size limits (e.g. for 60/62 commands) on the server side as well. (For 60/62 specifically, perhaps transform them to 6C/6D if needed.)
- Encapsulate BB server-side random state and make replays deterministic.
- Implement character and inventory replacement for battle and challenge modes.
- Implement the C5 (battle/challenge records) command.
- Implement choice search.
- Episode 3 bugs
- Fix behavior when joining a spectator team after the beginning of a battle.
- Disconnecting during a match turns you into a COM if there are other humans in the match, even if the match is part of a tournament. This may be incorrect behavior for tournaments.
- Disconnecting during a tournament when there are no other humans in the match simply cancels the match (so it can be replayed) instead of forfeiting, which is almost certainly incorrect behavior. (Then again, no one likes losing tournaments to COMs...)
- Tournament deck restrictions aren't enforced when populating COMs at tournament start time. This can cause weird behavior if, for example, a COM deck contains assist cards and the tournament rules forbid them.
- There is a rare failure mode during battles that causes one of the clients to be disconnected.
- Code style
- Add default values in all command structures (like we use for Episode 3 battle commands).
See TODO.md for a list of known issues and future work.
## Compatibility
newserv supports several versions of PSO. Specifically:
| Version | Login | Lobbies | Games | Proxy |
|----------------|--------------|--------------|--------------|--------------|
| DC Trial | Yes (4) | Yes (4) | Yes (4) | No |
| DC Prototype | Yes (4) | Yes (4) | Yes (4) | No |
| DC V1 | Yes (1) | Yes | Yes | Yes |
| DC V2 | Yes (1) | Yes | Yes | Yes |
| DC Trial | Yes | Yes | Yes | No |
| DC 11/2000 | Yes | Yes | Yes | No |
| DC 12/2000 | Yes | Yes | Yes | Yes |
| DC 01/2001 | Yes | Yes | Yes | Yes |
| DC V1 | Yes | Yes | Yes | Yes |
| DC 08/2001 | Untested (1) | Untested (1) | Untested (1) | Untested (1) |
| DC V2 | Yes | Yes | Yes | Yes |
| PC | Yes | Yes | Yes | Yes |
| GC Ep1&2 Trial | Untested (2) | Untested (2) | Untested (2) | Untested (2) |
| GC Ep1&2 Trial | Untested (1) | Untested (1) | Untested (1) | Untested (1) |
| GC Ep1&2 | Yes | Yes | Yes | Yes |
| GC Ep1&2 Plus | Yes | Yes | Yes | Yes |
| GC Ep3 Trial | Yes | Yes | Partial (5) | Yes |
| GC Ep3 Trial | Yes | Yes | Partial (3) | Yes |
| GC Ep3 | Yes | Yes | Yes | Yes |
| XBOX Ep1&2 | Untested (2) | Untested (2) | Untested (2) | Untested (2) |
| BB (vanilla) | Yes | Yes | Yes (3) | Yes |
| BB (Tethealla) | Yes | Yes | Yes (3) | Yes |
| Xbox Ep1&2 | Yes | Yes | Yes | Yes |
| BB (vanilla) | Yes | Yes | Yes (2) | Yes |
| BB (Tethealla) | Yes | Yes | Yes (2) | Yes |
*Notes:*
1. *DC support has only been tested with the US versions of PSO DC. Other versions probably don't work, but will be easy to add support for. Please submit a GitHub issue if you have a non-US DC version, and can provide a log from a connection attempt.*
2. *newserv's implementations of these versions are based on disassembly of the client executables and have never been tested.*
3. *BB games are mostly playable, but there are still some unimplemented features (for example, some quests that use rare commands may not work). Please submit a GitHub issue if you find something that doesn't work.*
4. *Support for PSO Dreamcast Trial Edition and the December 2000 prototype is somewhat incomplete and probably never will be complete. These versions are rather unstable and seem to crash often, but it's not obvious whether it's because they're prototypes or because newserv sends data they can't handle.*
5. *Creating a game works and battle setup behaves mostly normally, but starting a battle doesn't work.*
1. *newserv's implementations of these versions are based on disassembly of the client executables and have never been tested.*
2. *BB games are mostly playable, but there are still some unimplemented features (for example, some quests that use rare commands may not work). Please submit a GitHub issue if you find something that doesn't work.*
3. *Creating a game works and battle setup behaves mostly normally, but starting a battle doesn't work.*
## Setup
@@ -113,8 +90,8 @@ There is a fairly recent macOS ARM64 release on the newserv GitHub repository. Y
There is a fairly recent Windows release on the newserv GitHub repository also. It's built with Cygwin, and all the necessary DLL files should be included. That said, I've only tested it on my own machine and there is no CI for Windows builds like there is for macOS and Linux, so if it doesn't work for you, please open a GitHub issue to let me know.
If you're not using a release from the GitHub repository, do this to build newserv:
1. If you're on Windows, install Cygwin. While doing so, install the `cmake`, `gcc-core`, `gcc-g++`, `git`, `libevent2.1_7`, `make`, and `zlib` packages. Do the rest of these steps inside a Cygwin shell (not a Windows cmd shell or PowerShell).
2. Make sure you have CMake and libevent installed. (On macOS, `brew install cmake libevent`; on most Linuxes, `sudo apt-get install cmake libevent-dev`; on Windows, you already did this in step 1.)
1. If you're on Windows, install Cygwin. While doing so, install the `cmake`, `gcc-core`, `gcc-g++`, `git`, `libevent2.1_7`, `make`, `libiconv`, and `zlib` packages. Do the rest of these steps inside a Cygwin shell (not a Windows cmd shell or PowerShell).
2. Make sure you have CMake, libevent, and libiconv installed. (On macOS, `brew install cmake libevent libiconv`; on most Linuxes, `sudo apt-get install cmake libevent-dev`; on Windows, you already did this in step 1.)
3. Build and install phosg (https://github.com/fuzziqersoftware/phosg).
4. Optionally, install resource_dasm (https://github.com/fuzziqersoftware/resource_dasm). This will enable newserv to send memory patches and load DOL files on PSO GC clients. PSO GC clients can play PSO normally on newserv without this.
5. Run `cmake . && make` in the newserv directory.
@@ -130,17 +107,23 @@ To use newserv in other ways (e.g. for translating data), see the end of this do
### Installing quests
newserv automatically finds quests in the system/quests/ directory. To install your own quests, or to use quests you've saved using the proxy's "save files" option, just put them in that directory and name them appropriately.
newserv automatically finds quests in the subdirectories of the system/quests/ directory. To install your own quests, or to use quests you've saved using the proxy's Save Files option, just put them in one of the subdirectories there and name them appropriately. The subdirectories and their behaviors (e.g. in which game modes they should appear and for which PSO versions) is defined in the QuestCategories field in config.json.
Standard quest files should be named like `q###-CATEGORY-VERSION.EXT`, battle quests should be named like `b###-VERSION.EXT`, challenge quests should be named like `c###-VERSION.EXT` for Episode 1 or `d###-VERSION.EXT` for Episode 2, and Episode 3 download quests should be named like `e###-gc3.EXT`. The fields in each filename are:
Within the category directories, quest files should be named like `q###-VERSION-LANGUAGE.EXT` (although the `q` is ignored, and can be any letter). The fields in each filename are:
- `###`: quest number (this doesn't really matter; it should just be unique across the PSO version)
- `CATEGORY`: ret = Retrieval, ext = Extermination, evt = Events, shp = Shops, vr = VR, twr = Tower, gv1/gv2/gv4 = Government (BB only), dl = Download (these don't appear during online play), 1p = Solo (BB only)
- `VERSION`: dn = Dreamcast NTE, d1 = Dreamcast v1, dc = Dreamcast v2, pc = PC, gcn = GameCube Trial Edition, gc = GameCube Episodes 1 & 2, gc3 = Episode 3, xb = Xbox, bb = Blue Burst
- `VERSION`: dn = Dreamcast NTE, dp = Dreamcast 11/2000 prototype, d1 = Dreamcast v1, dc = Dreamcast v2, pc = PC, gcn = GameCube Trial Edition, gc = GameCube Episodes 1 & 2, gc3 = Episode 3 (see below), xb = Xbox, bb = Blue Burst
- `LANGUAGE`: j = Japanese, e = English, g = German, f = French, s = Spanish
- `EXT`: file extension (see table below)
For example, the GameCube version of Lost HEAT SWORD is in two files named `q058-ret-gc.bin` and `q058-ret-gc.dat`. newserv knows these files are quests because they're in the system/quests/ directory, it knows they're for PSO GC because the filenames contain `-gc`, and it puts them in the Retrieval category because the filenames contain `-ret`.
For .dat files, the `LANGUAGE` token may be omitted. If it's present, then that .dat file will only be used for that language of the quest; if omitted, then that .dat file will be used for all languages of the quest.
The type identifiers (`b`, `c`, `d`, `e`, or `q`) and categories are configurable. See QuestCategories in config.example.json for more information on how to make new categories or edit the existing categories.
Some quests (mostly battle and challenge mode quests) have additional JSON metadata files that describe how the server should handle them. These metadata files are generally named similarly to their .bin and .dat counterparts, except the `VERSION` token may also be omitted if the metadata applies to all versions of the quest on all PSO versions.
Some quests may also include a .pvr file, which contains an image used in the quest. These files are named similarly to their .bin and .dat counterparts.
For example, the GameCube version of Lost HEAT SWORD is in two files named `q058-gc-e.bin` and `q058-gc.dat`. newserv knows these files are quests because they're in the system/quests/ directory, it knows they're for PSO GC because the filenames contain `-gc`, it knows this is the English version of the quest because the .bin filename ends with `-e` (even though the .dat filename does not), and it puts them in the Retrieval category because the files are within the retrieval/ directory within system/quests/.
The GameCube and Xbox quest formats are very similar, but newserv treats them as different. If you want to use the same quest file for GameCube and Xbox clients, you can make one a symbolic link to the other.
There are multiple PSO quest formats out there; newserv supports all of them. It can also decode any known format to standard .bin/.dat format. Specifically:
@@ -156,6 +139,7 @@ There are multiple PSO quest formats out there; newserv supports all of them. It
| GCI (with key) | .bin.gci and .dat.gci | Yes | decode-gci |
| GCI (no key) | .bin.gci and .dat.gci | Decode (3) | decode-gci (3) |
| GCI (Ep3) | .bin.gci or .mnm.gci | Yes | decode-gci |
| GCI (Ep3 Trial) | .bin.gci or .mnm.gci | Decode (3) | decode-gci (3) |
| DLQ | .bin.dlq and .dat.dlq | Yes | decode-dlq |
| DLQ (Ep3) | .bin.dlq or .mnm.dlq | Yes | decode-dlq |
| QST (online) | .qst | Yes | decode-qst |
@@ -165,9 +149,9 @@ There are multiple PSO quest formats out there; newserv supports all of them. It
1. *This is the default format. You can convert these to uncompressed format by running `newserv decompress-prs FILENAME.bin FILENAME.bind` (and similarly for .dat -> .datd)*
2. *Similar to (1), to compress an uncompressed quest file: `newserv compress-prs FILENAME.bind FILENAME.bin` (and likewise for .datd -> .dat)*
3. *Use the decode action to convert these quests to .bin/.dat format before putting them into the server's quests directory. If you know the encryption seed (serial number), pass it in as a hex string with the `--seed=` option. If you don't know the encryption seed, newserv will find it for you, which will likely take a long time.*
4. *Episode 3 online quests don't go in the system/quests directory; they instead go in the system/ep3/maps-free or system/ep3/maps-quest directories. If you want an Episode 3 quest to be available for both online play and for downloading, the file must exist in both system/quests and in one of the map directories in system/ep3.*
4. *Episode 3 quests don't go in the system/quests directory. See the Episode 3 section below.*
Episode 3 download quests consist only of a .bin file - there is no corresponding .dat file. Episode 3 download quest files may be named with the .mnm extension instead of .bin, since the format is the same as the standard map files (in system/ep3/). These files can be encoded in any of the formats described above, except .qst. There are no encrypted Episode 3 GCI formats because the game doesn't encrypt quests saved to the memory card, unlike Episodes 1&2.
Episode 3 download quests consist only of a .bin file - there is no corresponding .dat file. Episode 3 download quest files may be named with the .mnm extension instead of .bin, since the format is the same as the standard map files (in system/ep3/). These files can be encoded in any of the formats described above, except .qst.
When newserv indexes the quests during startup, it will warn (but not fail) if any quests are corrupt or in unrecognized formats.
@@ -177,29 +161,37 @@ All quests, including those originally in GCI or DLQ format, are treated as onli
### Episode 3 features
The following Episode 3 features work well:
newserv supports many features unique to Episode 3:
* CARD battles. Not every combination of abilities has been tested yet, so if you find a feature or card ability that doesn't work like it's supposed to, please make a GitHub issue and describe the situation (the attacking card(s), defending card(s), and ability or condition that didn't work).
* Tournaments. (But they don't work like Sega's tournaments did - see below)
* Spectator teams.
* Tournaments. (But they work differently than Sega's tournaments did - see below)
* Downloading quests.
* Trading cards.
* Participating in card auctions. (The auction contents must be configured in config.json.)
* Decorations in lobbies. Currently only images are supported; the game also supports loading custom 3D models in lobbies, but newserv does not implement this (yet).
The following Episode 3 features are implemented, but are only partially tested:
* Spectator teams. There is a known issue that prevents viewing battles unless you're in the spectator team when the battle begins, and spectating clients sometimes crash for an unknown reason.
* Battle replays also sometimes cause the client to crash during the replay. Using the $playrec command is therefore not recommended.
#### Battle records
Tournaments work differently than they did on Sega's servers. Tournaments can be created with the `create-tournament` shell command, which enables players to register for them. (Use `help` to see all the arguments - there are many!) The `start-tournament` shell command starts the tournament (and prevents further registrations), but this doesn't schedule any matches. Instead, players who are ready to play their next match can all stand at the rightmost 4-player battle table in the same CARD lobby, and the tournament match will start automatically.
After playing a battle, you can save the record of the battle with the $saverec command. You can then replay the battle later by using the $playrec command in a lobby - this will create a spectator team and play the recording of the battle as if it were happening in realtime. Note that there is a bug in older versions of Dolphin that seems to be frequently triggered when playing battle records, which causes the emulator to crash with the message `QObject::~QObject: Timers cannot be stopped from another thread`. To avoid this, use the latest version of Dolphin.
#### Tournaments
Tournaments work differently than they did on Sega's servers. Tournaments can be created with the `create-tournament` shell command, which enables players to register for them. (Use `help` to see all the arguments - there are many!) The `start-tournament` shell command starts the tournament (and prevents further registrations), but this doesn't schedule any matches. Instead, players who are ready to play their next match can all stand at the 4-player battle table near the lobby warp in the same CARD lobby, and the tournament match will start automatically.
These tournament semantics mean that there can be multiple matches in the same tournament in play simultaneously, and not all matches in a round must be complete before the next round can begin - only the matches preceding each individual match must be complete for that match to be playable.
Because newserv gives all players 1000000 meseta, there is no reward for winning a tournament. This may change in the future.
The Meseta rewards for winning tournament matches can be configured in config.json.
#### Episode 3 files
Episode 3 state and game data is stored in the system/ep3 directory. The files in there are:
* card-definitions.mnr: Compressed card definition list, sent to Episode 3 clients at connect time. Card stats and abilities can be changed by editing this file.
* card-definitions.mnrd: Decompressed version of the above. If present, newserv will use this instead of the compressed version, since this is easier to edit.
* card-text.mnr: Compressed card text archive. Generally only used for debugging.
* card-text.mnrd: Decompressed card text archive; same format as TextCardE.bin. Generally only used for debugging.
* com-decks.json: COM decks used in tournaments. The default decks in this file come from logs from Sega's servers, so the file doesn't include every COM deck Sega ever made - the rest are probably lost to time.
* maps-free/ and maps-quest/: Online free battle and quest maps (.mnm/.bin/.mnmd/.bind files). Free battle and quest files have exactly the same format; the only difference between the files in these directories is which section of the menu they will appear in on the client.
* maps/: Online free battle and quest maps (.mnm/.bin/.mnmd/.bind files). newserv comes with all the original online and offline maps, including Story Mode quests. If you don't want the offline maps and quests to be playable online, delete the .bind files system/ep3/maps.
* maps-download/: Download maps and quests (.mnm/.bin/.mnmd/.bind files). There are two subcategories by default (download maps and Trial Edition download maps), but you can add more by editing QuestCategories in config.json. Categories that have flag 0x40 (Ep3 download) set are indexed from this directory; all others are indexed from system/quests/. Files in maps-download/ subdirectories have the same format as those in the maps/ directory, but should be named like `e###-gc3-LANGUAGE.EXT` (similar to how non-Episode 3 quests are named in the system/quests/ directory). If you want a map to be available for online play and for downloading, the file must exist in both maps/ and in a maps-download/ subdirectory (a symbolic link is acceptable).
* tournament-state.json: State of all active tournaments. This file is automatically written when any tournament changes state for any reason (e.g. a tournament is created/started/deleted or a match is resolved).
There is no public editor for Episode 3 maps and quests, but the format is described fairly thoroughly in src/Episode3/DataIndexes.hh (see the MapDefinition structure). You'll need to use `newserv decompress-prs ...` to decompress .bin or .mnm files before editing them, but you don't need to compress the files again to use them - just put the .bind or .mnmd file in the maps directory and newserv will make it available.
@@ -276,18 +268,22 @@ Some chat commands (see below) have the same basic function on the proxy server
### Chat commands
The server's shell supports a variety of administration commands. If the interactive shell is enabled, you can enter these commands at any time, even if the prompt isn't visible. Run `help` in the server's shell to see all of the commands and how to use them.
newserv also supports a variety of commands players can use via the chat interface. Any chat message that begins with `$` is treated as a chat command. (If you actually want to send a chat message starting with `$`, type `$$` instead.)
newserv supports a variety of commands players can use by chatting in-game. Any chat message that begins with `$` is treated as a chat command. (If you actually want to send a chat message starting with `$`, type `$$` instead.)
Some commands only work on the game server and not on the proxy server. The chat commands are:
* Information commands
* `$li`: Shows basic information about the lobby or game you're in. If you're on the proxy server, shows information about your connection instead (remote Guild Card number, client ID, etc.).
* `$ping` (game server only): Shows round-trip ping time from the server to you.
* `$what` (game server only): Shows the type, name, and stats of the nearest item on the ground.
* `$matcount` (game server only): Shows how many of each type of material you've used.
* Debugging commands
* `$debug` (game server only): Enable or disable debug. You need the DEBUG permission in your user license to use this command. When debug is enabled, you'll see in-game messages from the server when you take certain actions. You'll also be placed into the highest available slot in lobbies and games instead of the lowest, which is useful for finding commands for which newserv doesn't handle client IDs properly. This setting also disables certain safeguards and allows you to do some things that might crash your client.
* `$quest <number>`: Load a quest by quest number. Can be used to load battle or challenge quests with only one player present.
* `$qcall <function-id>`: Call a quest function on your client.
* `$qset <flag-num>` or `$qclear <flag-num>`: Set or clear a global quest flag for everyone in the game.
* `$qsync <reg-num> <value>`: Set a quest register's value on your client. `<reg-num>` should be either rXX (e.g. r60) or fXX (e.g. f60); if the latter, `<value>` is parsed as a floating-point value instead of as an integer.
* `$gc` (game server only): Send your own Guild Card to yourself.
* `$persist` (game server only): Enable or disable persistence for the current lobby or game. This determines whether the lobby/game is deleted when the last player leaves. You need the DEBUG permission in your user license to use this command because there are no game state checks when you do this. For example, if you make a game persistent, start a quest, then leave the game, the game can't be joined by anyone but also can't be deleted.
* `$sc <data>`: Send a command to yourself.
@@ -295,31 +291,42 @@ Some commands only work on the game server and not on the proxy server. The chat
* Personal state commands
* `$arrow <color-id>`: Changes your lobby arrow color.
* `$secid <section-id>`: Sets your override section ID. After running this command, any games you create will use your override section ID for rare drops instead of your character's actual section ID. To revert to your actual section id, run `$secid` with no name after it. On the proxy server, this will not work if the remote server controls item drops (e.g. on BB, or on Schtserv with server drops enabled).
* `$rand <seed>`: Sets your override random seed (specified as a 32-bit hex value). This will make any games you create use the given seed for rare enemies. This also makes item drops deterministic in Blue Burst games hosted by newserv. On the proxy server, this command can cause desyncs with other players in the same game, since they will not see the overridden random seed. To remove the override, run `$rand` with no arguments.
* `$secid <section-id>`: Sets your override section ID. After running this command, any games you create will use your override section ID for rare drops instead of your character's actual section ID. To revert to your actual section id, run `$secid` with no name after it. On the proxy server, this will not work if the remote server controls item drops (e.g. on BB, or on Schtserv with server drops enabled). If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing.
* `$rand <seed>`: Sets your override random seed (specified as a 32-bit hex value). This will make any games you create use the given seed for rare enemies. This also makes item drops deterministic in Blue Burst games hosted by newserv. On the proxy server, this command can cause desyncs with other players in the same game, since they will not see the overridden random seed. To remove the override, run `$rand` with no arguments. If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing.
* `$ln [name-or-type]`: Sets the lobby number. Visible only to you. This command exists because some non-lobby maps can be loaded as lobbies with invalid lobby numbers. See the "GC lobby types" and "Ep3 lobby types" entries in the information menu for acceptable values here. Note that non-lobby maps do not have a lobby counter, so there's no way to exit the lobby without using either `$ln` again or `$exit`. On the game server, `$ln` reloads the lobby immediately; on the proxy server, it doesn't take effect until you load another lobby yourself (which means you'll like have to use `$exit` to escape). Run this command with no argument to return to the default lobby.
* `$exit`: If you're in a lobby, sends you to the main menu (which ends your proxy session, if you're in one). If you're in a game or spectator team, sends you to the lobby (but does not end your proxy session if you're in one). Does nothing if you're in a non-Episode 3 game and no quest is in progress.
* `$patch <name>`: Run a patch on your client. `<name>` must exactly match the name of a patch on the server.
* Blue Burst player commands (game server only)
* `$bbchar <username> <password> <1-4>`: Use this command when playing on a non-BB version of PSO. If the username and password are correct, this command converts your current character to BB format and saves it on the server in the given slot. Any character already in that slot is overwritten.
* `$edit <stat> <value>`: Modifies your character data.
* `$edit <stat> <value>`: Modifies your character data. If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing.
* `$save`: Saves your character, system, and Guild Card data immediately. (By default, your character is saved every 60 seconds while online, and your account and Guild Card data are saved whenever they change.)
* Game state commands (game server only)
* `$maxlevel <level>`: Sets the maximum level for players to join the current game. (This only applies when joining; if a player joins and then levels up past this level during the game, they are not kicked out, but won't be able to rejoin if they leave.)
* `$minlevel <level>`: Sets the minimum level for players to join the current game.
* `$password <password>`: Sets the game's join password. To unlock the game, run `$password` with nothing after it.
* `$spec`: Toggles the allow spectators flag. If any players are spectating when this flag is disabled, they will be sent back to the lobby.
* `$saverec <name>`: Save the recording of the last Episode 3 battle.
* `$playrec <name>`: Play a battle recording. This command creates a spectator team and replays the specified battle log within it. There is a known issue which causes spectators to crash in some cases, so use of this command is currently not recommended.
* `$itemtable`: Switches between using the client's or the server's drop table. No effect on BB (the server's drop table is always used). The server's rare tables are defined in JSON files in the system/item-tables directory.
* `$drop`: Enables or disables all item drops from boxes and enemies in the current game.
* Episode 3 commands (game server only)
* `$spec`: Toggles the allow spectators flag for Episode 3 games. If any players are spectating when this flag is disabled, they will be sent back to the lobby.
* `$inftime`: Toggles infinite-time mode. Must be used before starting a battle. If infinite-time mode is enabled, the overall and per-phase time limits will be disabled regardless of the values chosen during battle setup. After completing a battle, infinite-time mode is reset to the server's default value (which can be set in Episode3BehaviorFlags in config.json).
* `$defrange <min>-<max>`: Sets the DEF dice range for the next battle. If this is used, the dice range set during battle rules setup will apply only to ATK dice; DEF dice will use this range instead. Assist cards and other dice effects will still apply. Dice exchange also still applies if it is enabled.
* `$stat <what>`: Shows a statistic about your player or team in the current battle. `<what>` can be `duration`, `fcs-destroyed`, `cards-destroyed`, `damage-given`, `damage-taken`, `opp-cards-destroyed`, `own-cards-destroyed`, `move-distance`, `cards-set`, `fcs-set`, `attack-actions-set`, `techs-set`, `assists-set`, `defenses-self`, `defenses-ally`, `cards-drawn`, `max-attack-damage`, `max-combo`, `attacks-given`, `attacks-taken`, `sc-damage`, `damage-defended`, or `rank`.
* `$surrender`: Causes your team to immediately lose the current battle.
* `$saverec <name>`: Saves the recording of the last battle.
* `$playrec <name>`: Plays a battle recording. This command creates a spectator team and replays the specified battle log within it. There is a bug in Dolphin that makes use of this command unstable in emulation (see the "Battle records" section above).
* Cheat mode commands
* `$cheat`: Enables or disables cheat mode for the current game. All other cheat mode commands do nothing if cheat mode is disabled. By default, cheat mode is off in new games but can be enabled; there is an option in config.json that allows you to disable cheat mode entirely, or set it to on by default in new games.
* `$infhp` / `$inftp`: Enables or disables infinite HP or TP mode. Applies to only you. In infinite HP mode, one-hit KO attacks will still kill you.
* `$warpme <area-id>`: Warps yourself to the given area.
* `$warpall <area-id>`: Warps everyone in the game to the given area. You must be the leader to use this command, unless you're on the proxy server.
* `$next`: Warps yourself to the next area.
* `$warpme <floor-id>`: Warps yourself to the given floor.
* `$warpall <floor-id>`: Warps everyone in the game to the given floor. You must be the leader to use this command, unless you're on the proxy server.
* `$next`: Warps yourself to the next floor.
* `$swa`: Enables or disables switch assist. When enabled, the server will attempt to automatically unlock two-player doors in solo games if you step on both switches sequentially.
* `$item <desc>` (or `$i <desc>`): Create an item. `desc` may be a description of the item (e.g. "Hell Saber +5 0/10/25/0/10") or a string of hex data specifying the item code. Item codes are 16 hex bytes; at least 2 bytes must be specified, and all unspecified bytes are zeroes. If you are on the proxy server, you must not be using Blue Burst for this command to work. On the game server, this command works for all versions.
* `$unset <index>`: In an Episode 3 battle, removes one of your set cards from the field. `<index>` is the index of the set card as it appears on your screen - 1 is the card next to your SC's icon, 2 is the card to the right of 1, etc. This does not cause a Hunters-side SC to lose HP, as they normally do when their items are destroyed.
* Configuration commands
* `$event <event>`: Sets the current holiday event in the current lobby. Holiday events are documented in the "Using $event" item in the information menu. If you're on the proxy server, this applies to all lobbies and games you join, but only you will see the new event - other players will not.
@@ -341,18 +348,25 @@ Some versions of PSO DC will connect to a private server if you just set their D
If you're emulating PSO DC or have a disc image, you can patch the appropriate files within the disc image to make it connect to any address you want. Creating such a patch is also beyond the scope of this document.
Finally, if you're emulating PSO DC, you can modify the loaded executable in memory to make it connect anywhere you want. There is a script included with newserv that can do this for Flycast. The script only works on macOS because it uses memwatch, which is specifically for macOS, but a similar technique could be done manually using scanmem on Linux or Cheat Engine on Windows. (The script is fairly short, and what it does should be easy to understand so you can duplicate its effects with scanmem or Cheat Engine.)
#### PSO DC on Flycast
To use the script, do this:
If you're emulating PSO DC, all versions will connect to newserv by setting the following options in Flycast's `emu.cfg` file under `[network]`:
- DNS = Your newserv's server address (newserv's DNS server must be running on port 53)
- EmulateBBA = yes
- Enable = yes
It is also necessary to save any DNS information to the flash memory of the Dreamcast to use the BBA - the easiest way to do this is to use the website option in USv2 and then choose the save to flash option.
Once set up, the EU and US versions will work without any extra set up (other than the HL Check Disable code for USv2), while the JP versions require HL Check Disable codes to be running.
If the server is running on the same machine as Flycast, this might not work, even if you point Flycast's DNS queries at your local IP address (instead of 127.0.0.1). In this case, you can modify the loaded executable in memory to make it connect anywhere you want. There is a script included with newserv that can do this on macOS; a similar technique could be done manually using scanmem on Linux or Cheat Engine on Windows. To use the script, do this:
1. Build and install memwatch (https://github.com/fuzziqersoftware/memwatch).
2. Start Flycast and run PSO. (You must run the script below after PSO is loaded - it won't work if you run it before loading the game.)
2. Start Flycast and run PSO. (You must start PSO before running the script; it won't work if you run the script before loading the game.)
3. Run `sudo patch_flycast_memory.py <original-destination>`. Replace `<original-destination>` with the hostname that PSO wants to connect to (you can find this out by using Wireshark and looking for DNS queries). The script may take up to a minute; you can continue using Flycast while it runs, but don't start an online game until the script is done.
4. Run newserv and start an online game in PSO.
If you use this method, you'll have to run the script every time you start PSO in Flycast, but you won't have to run it again if you start another online game without restarting emulation.
Finally, the script takes an optional second argument that allows you to redirect the connection elsewhere (instead of the local machine). This allows you to connect directly to remote servers if desired.
#### PSO PC
The version of PSO PC I have has the server addresses starting at offset 0x29CB34 in pso.exe. Using a hex editor, change those to "localhost" (without quotes) if you just want to connect to a locally-running newserv instance. Alternatively, you can add an entry to the Windows hosts file (C:\Windows\System32\drivers\etc\hosts) to redirect the connection to 127.0.0.1 (localhost) or any other IP address.
@@ -365,17 +379,14 @@ If you have PSO Plus or Episode III, it won't want to connect to a server on the
#### PSO GC on Dolphin
If you have BBA support via a tap interface or via the HLE/built-in interface, you may be able to just set the DNS server address (as you would on a real GameCube, above) and it may work.
If you're using the HLE BBA type, set the BBA's DNS server address to newserv's IP address and it should work. (If newserv is on the same machine as Dolphin, try your local IP address or 127.0.0.1.) In PSO, use the example values below in PSO's network configuration.
If you're using a version of Dolphin with tapserver support, you can make it connect to a newserv instance running on the same machine via the tapserver interface. You do not need to install or run tapserver, and this works for all PSO versions without any of the dual-interface trickery described above. To do this:
If you're using the TAP BBA type, you'll have to set PSO's network settings appropriately for your tap interface. Set the DNS server address in PSO's network settings to newserv's IP address.
If you're using a version of Dolphin with tapserver support, you can make it connect to a newserv instance running on the same machine via the tapserver interface. You do not need to install or run tapserver. To do this:
1. Set Dolphin's BBA type to tapserver (Config -> GameCube -> SP1).
2. Enable newserv's IP stack simulator according to the comments in config.json and start newserv.
3. In PSO, you have to configure the network settings manually (DHCP doesn't work), but the actual values don't matter as long as they're valid IP addresses. Example values:
- IP address: `10.0.1.5`
- Subnet mask: `255.255.255.0`
- Default gateway: `10.0.1.1`
- DNS server address 1: `10.0.1.1`
- Leave everything else blank
3. In PSO's network settings, enable DHCP ("Automatically obtain an IP address"), set DNS server address to "Automatic", and leave DHCP Hostname as "Not set". Leave the proxy server settings blank.
4. Start an online game.
### Connecting external clients
@@ -397,9 +408,9 @@ newserv has many CLI options, which can be used to access functionality other th
* Convert a PSO GC or Episode 3 snapshot file to a BMP image (`decode-gci-snapshot`)
* Find the likely round1 or round2 seed for a corrupt save file (`salvage-gci`)
* Run a brute-force search for a decryption seed (`find-decryption-seed`)
* Decode Shift-JIS text to UTF-16 (`decode-sjis`)
* Convert quests in .gci, .vms, .dlq, or .qst format to .bin/.dat format (`decode-gci`, `decode-vms`, `decode-dlq`, `decode-qst`)
* Convert quests in .bin/.dat to .qst format (`encode-qst`)
* Convert text archives (e.g. TextEnglish.pr2) to JSON and vice versa (`decode-text-archive`, `encode-text-archive`)
* Disassemble quest scripts (`disassemble-quest-script`)
* Format Episode 3 game data in a human-readable manner (`show-ep3-maps`, `show-ep3-cards`)
* Convert item data to a human-readable description, or vice versa (`describe-item`, `encode-item`)
+41
View File
@@ -0,0 +1,41 @@
## General
- Find a way to silence audio in RunDOL.s
- Encapsulate BB server-side random state and make replays deterministic
- Implement choice search
- Write a simple status API
- Implement per-game logging
- Build an exception-handling abstraction in ChatCommands that shows formatted error messages in all cases
- Make reloading happen on separate threads so compression doesn't block active clients
- Implement decrypt/encrypt actions for VMS files
- 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
- Make $edit for DC/PC
- Add an idle connection timeout for proxy sessions
## Episode 3
- Make disconnecting during a tournament match cause you to forfeit the match
- Enforce tournament deck restrictions (e.g. rank checks, No Assist option) when populating COMs at tournament start time
- It may be possible to send spectators back to the waiting room after a non-tournament battle by sending 6xB4x05 with environment 0x19, then 6xB4x3B again; try this
- Add support for recording battles on the proxy server (both in primary and spectator teams)
- When `reload ep3` happens and the defs file is changed, send the new defs file to all connected players who aren't in a game (if this even works - when exactly does the client decompress the defs file from the server?)
- Make `reload licenses` not vulnerable to online players' licenses overwriting licenses on disk somehow
- Implement ranks (based on total Meseta earned)
## PSO XBOX
- Fix receiving Guild Cards from non-Xbox players
- Make the Guild Card description field in SavedPlayerDataBB longer to accommodate XB descriptions (0x200 bytes)
## PSOBB
- Find any remaining mismatches in enemy indexes / experience
- Fix some edge cases on the BB proxy server (e.g. Change Ship)
- Implement less-common subcommands
- 6xD8: Add S-rank weapon special
- Test team commands
- Test all EA subcommands (a few are still not implemented)
- 6xC1, 6xC2, 6xCD, 6xCE: Team invites/administration (not implemented)
- Fix invite member menu
- Implement story progress flags for unlocking quests
+16
View File
@@ -0,0 +1,16 @@
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));
+91 -1
View File
@@ -25,6 +25,18 @@
(Ep3 USA) Auto-press A as fast as possible during loading screens
042F9AC0 60000000
(Ep3 USA) Replace loading screen A button sounds with random sounds
042F9B18 4804BB19
042F9B1C 5463063E
042F9B20 60631400
042F9B24 64630005
042F9B28 38800000
(Ep3 USA) Change color of loading screens
(Replace AA, RR, GG, BB appropriately)
042FA704 3CC0AARR
042FA708 60C6GGBB
(Ep3 USA) Use 16:9 aspect ratio
04383DC8 4BC87F99
0400BD60 C042DED0
@@ -49,7 +61,7 @@
(Ep3 USA) Disable lobby event music (but keep the visuals)
040B705C 38000000
(Ep3 USA) Enable unused fourth Pinz's Shop choice
(Ep3 USA) Enable Pinz's Shop Super Card Capsule Machine as a fourth option
043101C0 38800004
04310238 2C1D0004
04487E8C 000000C8
@@ -172,5 +184,83 @@ TODO: Figure out more debug message conditionals (vars/functions) and add them h
(Ep3 USA) Dressing room always accessible
041A16FC 38600001
(Ep3 USA) Full dressing room v1
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
(Ep3 USA) Full dressing room v2
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
(Ep3 USA) Replace Options menu with debug menu
04149E70 38600019
(Ep3 USA) Jukebox is free
0430D1DC 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
(Ep3 USA) Disable chat smut filter
0412F8B8 7D0802A6
0412F8BC 7C661B78
0412F8C0 7C872378
0412F8C4 48217285
0412F8C8 38A30001
0412F8CC 7CE33B78
0412F8D0 7CC43378
0412F8D4 7D0803A6
0412F8D8 4BEDEBF4
(Ep3 USA) Metal tiles don't appear in Simulator map
04296904 4E800020
(Ep3 USA) 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
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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
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): ???
-4
View File
@@ -1,4 +0,0 @@
./newserv decrypt-gci-save --sys=8P-GPSE-PSO3_SYSTEM.gci 8P-GPSE-PSO3_CHARACTER.gci
./newserv decrypt-gci-save --sys=8P-GPSE-PSO3_SYSTEM.gci 8P-GPSE-PSO3_GUILDCARD.gci
./newserv decrypt-gci-save --sys=8P-GPOE-PSO_SYSTEM.gci 8P-GPOE-PSO_CHARACTER.gci
./newserv decrypt-gci-save --sys=8P-GPOE-PSO_SYSTEM.gci 8P-GPOE-PSO_GUILDCARD.gci
-29
View File
@@ -1,29 +0,0 @@
N1, N2, N3, N4 => use 8041F800 table
R1, R2, R3, R4 => use 8041F8A0 table
(Episode 3 USA) Able to find VIP cards offline (but still very rare)
042C0B20 4800000C
P(activate) is the probability that any transformation is attempted at all
P(f/success) defines the probability range: so the actual probability is a
uniform random number between P(activate) and P(activate) * P(f/success)
count P(activate) P(f/success) P(vip)
0-4 0.0 0.0 0.0
5-10 0.01923077 0.55 0.005
11-16 0.021276595 0.6 0.0045454544
17-24 0.023809524 0.7 0.004347826
25-32 0.027027028 0.7 0.004
33-40 0.03125 0.8 0.0038461538
41-52 0.037037037 0.8 0.0035714286
53-99 0.05 0.9 0.0033333334
0-4 0.0 0.0 0.0
5-10 0.020408163 0.55 0.005
11-16 0.022727273 0.6 0.004761905
17-24 0.025641026 0.7 0.0045454544
25-32 0.029411765 0.7 0.005
33-40 0.03448276 0.7 0.005
41-52 0.041666668 0.8 0.0045454544
53-99 0.05263158 0.9 0.004347826
+692 -692
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+3
View File
@@ -0,0 +1,3 @@
.\data\help2-0-ja.png
.\data\help0-4-ja.png
.\data\help0-5-ja.png
+6
View File
@@ -0,0 +1,6 @@
.\data\help2-0-ja.png
.\data\help0-0-ja.png
.\data\help0-1-ja.png
.\data\help0-2-ja.png
.\data\help0-3-ja.png
.\data\help0-7-ja.png
+1
View File
@@ -0,0 +1 @@
.\data\help1-1-ja.png
+1
View File
@@ -0,0 +1 @@
.\data\help1-0-ja.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+39
View File
@@ -0,0 +1,39 @@
PSOBB SUPPORT FILES, NOTES & RESOURCES
--------------------------------------------------------------------------------
CLIENT LOCALIZATION
By default PSOBB loads everything in Japanese so it requires some extra files
to properly implement the English localization from SOA, these files are offered
here inside the usbb-resources folder for your convenience they are the same ones
from the old official USBB client
To use them, you just need to drag and drop all its contents into your client's
data folder. Then if the client's internal lang flag is set correctly to English
will load all the correct texts from these files.
In case you want to play in Japanese, just use the default Tethealla client and
delete all the files including _e or _eng in the names and then the game will
default everything to its original Japanese language.
Just in case, there's the jpbb-resources folder with the latest localization
changes made on the official JPBB for an extra backup.
---------------------------------------------------------------------------------
PSOBB EP1,2,4 ORIGINAL VANILLA DROP TABLES/RATES
Included in the vanilla-tables folder I placed the original files I created for the
Schtserv vanilla for backup purposes as they are already implemented into the main
newserv logic.
These tables will offer you the experience as close as possible to the original SEGA
servers for PSOBB JP up to the latest patch before the servers shutdown, so besides a
fully functional Episode IV experience, the tables also include the latest special items
which where added to some Episode 1 and Episode 2 in Ultimate for certain section ID's
Vanilla Tables and rates are the same ones as the Schtserv Wiki for reference:
https://bbwiki.schtserv.com/index.php/Drops-ep1
https://bbwiki.schtserv.com/index.php/Drops-ep2
https://bbwiki.schtserv.com/index.php/Drops-ep4
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.
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+3
View File
@@ -0,0 +1,3 @@
.\data\help2-0-en.png
.\data\help0-4-en.png
.\data\help0-5-en.png
+6
View File
@@ -0,0 +1,6 @@
.\data\help2-0-en.png
.\data\help0-0-en.png
.\data\help0-1-en.png
.\data\help0-2-en.png
.\data\help0-3-en.png
.\data\help0-7-en.png
+1
View File
@@ -0,0 +1 @@
.\data\help1-1-en.png
+1
View File
@@ -0,0 +1 @@
.\data\help1-0-en.png
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.
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.
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.
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.
+1538
View File
File diff suppressed because it is too large Load Diff
+86
View File
@@ -0,0 +1,86 @@
#include "AFSArchive.hh"
#include <stdio.h>
#include <string.h>
#include <phosg/Encoding.hh>
#include <phosg/Filesystem.hh>
#include <phosg/Strings.hh>
using namespace std;
AFSArchive::AFSArchive(shared_ptr<const string> data)
: data(data) {
struct FileHeader {
be_uint32_t magic;
le_uint32_t num_files;
} __attribute__((packed));
struct FileEntry {
le_uint32_t offset;
le_uint32_t size;
} __attribute__((packed));
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");
}
while (this->entries.size() < header.num_files) {
const auto& entry = r.get<FileEntry>();
this->entries.emplace_back(Entry{.offset = entry.offset, .size = entry.size});
}
}
pair<const void*, size_t> AFSArchive::get(size_t index) const {
const auto& entry = this->entries.at(index);
if (entry.offset > this->data->size()) {
throw out_of_range("entry begins beyond end of archive");
}
if (entry.offset + entry.size > this->data->size()) {
throw out_of_range("entry extends beyond end of archive");
}
return make_pair(this->data->data() + entry.offset, entry.size);
}
string AFSArchive::get_copy(size_t index) const {
auto ret = this->get(index);
return string(reinterpret_cast<const char*>(ret.first), ret.second);
}
StringReader AFSArchive::get_reader(size_t index) const {
auto ret = this->get(index);
return 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>
string AFSArchive::generate_t(const vector<string>& files) {
using U32T = typename std::conditional<IsBigEndian, be_uint32_t, le_uint32_t>::type;
StringWriter w;
w.put_u32b(0x41465300); // 'AFS\0'
w.put<U32T>(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());
data_offset = (data_offset + file.size() + 0x7FF) & (~0x7FF);
}
w.extend_to(0x80000);
for (const auto& file : files) {
w.write(file);
w.extend_to((w.size() + 0x7FF) & (~0x7FF));
}
return std::move(w.str());
}
+36
View File
@@ -0,0 +1,36 @@
#pragma once
#include <stdint.h>
#include <memory>
#include <phosg/Filesystem.hh>
#include <phosg/Strings.hh>
#include <string>
#include <unordered_map>
class AFSArchive {
public:
AFSArchive(std::shared_ptr<const std::string> data);
~AFSArchive() = default;
struct Entry {
uint64_t offset;
uint32_t size;
};
inline const std::vector<Entry>& all_entries() const {
return this->entries;
}
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;
static std::string generate(const std::vector<std::string>& files, bool big_endian);
private:
template <bool IsBigEndian>
static std::string generate_t(const std::vector<std::string>& files);
std::shared_ptr<const std::string> data;
std::vector<Entry> entries;
};
+8
View File
@@ -0,0 +1,8 @@
#pragma once
#include <stdexcept>
#include <string>
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");
}
+154
View File
@@ -0,0 +1,154 @@
#include "ARCodeTranslator.hh"
#include <phosg/Filesystem.hh>
#include <phosg/Strings.hh>
#include <resource_file/ExecutableFormats/DOLFile.hh>
using namespace std;
void run_ar_code_translator(const std::string& initial_directory, const std::string& use_file, const std::string& command) {
string directory = initial_directory;
while (ends_with(directory, "/")) {
directory.resize(directory.size() - 1);
}
PrefixedLogger log("[ar-trans] ");
unordered_map<string, shared_ptr<DOLFile>> files;
for (const auto& filename : list_directory(directory)) {
if (ends_with(filename, ".dol")) {
string name = filename.substr(0, filename.size() - 4);
string path = directory + "/" + filename;
files.emplace(name, new DOLFile(path.c_str()));
log.info("Loaded %s", name.c_str());
}
}
string source_filename;
shared_ptr<DOLFile> source_file;
auto find_match = [&](std::shared_ptr<DOLFile> target_file, uint32_t source_address) -> uint32_t {
const DOLFile::Section* source_section = nullptr;
for (const auto& sec : source_file->sections) {
if (source_address >= sec.address && source_address < sec.address + sec.data.size()) {
source_section = &sec;
break;
}
}
if (!source_section) {
throw runtime_error("source address not within any section");
}
size_t source_offset = source_address - source_section->address;
size_t source_bytes_available_after = source_section->data.size() - source_offset;
log.info("(find_match) Source offset = %08zX with %08zX bytes available after", source_offset, source_bytes_available_after);
for (size_t match_length = 4;
match_length < min<size_t>(source_bytes_available_after, 0x100);
match_length += 4) {
size_t num_matches = 0;
size_t last_match_address = 0;
StringReader source_r(source_section->data.data() + source_offset, match_length);
for (const auto& target_section : target_file->sections) {
for (size_t target_section_offset = 0;
target_section_offset + match_length <= target_section.data.size();
target_section_offset += 4) {
source_r.go(0);
StringReader target_r(target_section.data.data() + target_section_offset, match_length);
size_t z;
for (z = 0; z < match_length; z += 4) {
if (source_section->is_text) {
uint32_t source_opcode = source_r.get_u32b();
uint32_t target_opcode = target_r.get_u32b();
uint32_t source_class = source_opcode & 0xFC000000;
if (source_class != (target_opcode & 0xFC000000)) {
break;
}
if (source_class == 0x48000000) {
source_opcode &= 0xFC000003;
target_opcode &= 0xFC000003;
} else if (source_class == 0x40000000) {
source_opcode &= 0xFFFF0003;
target_opcode &= 0xFFFF0003;
}
if (source_opcode != target_opcode) {
break;
}
} else {
if (source_r.get_u32l() != target_r.get_u32l()) {
break;
}
}
}
if (z == match_length) {
num_matches++;
last_match_address = target_section.address + target_section_offset;
}
}
}
log.info("(find_match) For match length %zX, %zu 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");
}
}
throw runtime_error("scan field too long; too many matches");
};
auto handle_command = [&](const string& command) -> void {
auto tokens = split(command, ' ');
if (tokens.empty()) {
throw runtime_error("no command given");
}
strip_trailing_whitespace(tokens[tokens.size() - 1]);
if (tokens[0] == "use") {
source_filename = tokens.at(1);
source_file = files.at(source_filename);
} else if (tokens[0] == "match") {
if (!source_file) {
throw runtime_error("no source file selected");
}
uint32_t source_addr = stoul(tokens.at(1), nullptr, 16);
for (const auto& it : files) {
if (it.second == source_file) {
log.info("(%s) %08" PRIX32, it.first.c_str(), source_addr);
} else {
try {
uint32_t match_addr = find_match(it.second, source_addr);
log.info("(%s) %08" PRIX32, it.first.c_str(), match_addr);
} catch (const exception& e) {
log.error("(%s) failed: %s", it.first.c_str(), e.what());
}
}
}
} else if (!tokens[0].empty()) {
throw runtime_error("unknown command");
}
};
if (!use_file.empty()) {
source_filename = use_file;
source_file = files.at(source_filename);
}
if (!command.empty()) {
handle_command(command);
} else {
while (!feof(stdin)) {
if (!source_filename.empty()) {
fprintf(stdout, "ar-trans:%s/%s> ", directory.c_str(), source_filename.c_str());
} else {
fprintf(stdout, "ar-trans:%s> ", directory.c_str());
}
fflush(stdout);
string command = fgets(stdin);
try {
handle_command(command);
} catch (const exception& e) {
log.error("Failed: %s", e.what());
}
}
fputc('\n', stdout);
}
}
+5
View File
@@ -0,0 +1,5 @@
#pragma once
#include <string>
void run_ar_code_translator(const std::string& initial_directory, const std::string& use_file, const std::string& command);
+2 -2
View File
@@ -21,7 +21,7 @@ template <bool IsBigEndian>
struct BMLHeaderEntry {
using U32T = typename std::conditional<IsBigEndian, be_uint32_t, le_uint32_t>::type;
ptext<char, 0x20> filename;
pstring<TextEncoding::ASCII, 0x20> filename;
U32T compressed_size;
parray<uint8_t, 0x04> unknown_a1;
U32T decompressed_size;
@@ -52,7 +52,7 @@ void BMLArchive::load_t() {
size_t gvm_offset = offset;
offset = (offset + entry.compressed_gvm_size + 0x1F) & (~0x1F);
this->entries.emplace(entry.filename, Entry{data_offset, entry.compressed_size, gvm_offset, entry.compressed_gvm_size});
this->entries.emplace(entry.filename.decode(), Entry{data_offset, entry.compressed_size, gvm_offset, entry.compressed_gvm_size});
}
}

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