diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25d2cb80..fd45b55c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,18 +19,14 @@ endif()
# Library search
-find_path (LIBEVENT_INCLUDE_DIR NAMES event.h)
-find_library (LIBEVENT_LIBRARY NAMES event)
-find_library (LIBEVENT_CORE NAMES event_core)
-find_library (LIBEVENT_PTHREADS NAMES event_pthreads)
-set (LIBEVENT_INCLUDE_DIRS ${LIBEVENT_INCLUDE_DIR})
-set (LIBEVENT_LIBRARIES
- ${LIBEVENT_LIBRARY}
- ${LIBEVENT_CORE}
- ${LIBEVENT_PTHREADS})
-
+find_path(ASIO_INCLUDE_DIR NAMES asio.hpp HINTS "${WINDOWS_ENV}/include" REQUIRED)
+if(WIN32)
+ find_path(Iconv_INCLUDE_DIRS NAMES iconv.h HINTS "${WINDOWS_ENV}/include" REQUIRED)
+ find_library(Iconv_LIBRARIES NAMES iconv HINTS "${WINDOWS_ENV}/lib" REQUIRED)
+else()
+ find_package(Iconv REQUIRED)
+endif()
find_package(phosg REQUIRED)
-find_package(Iconv REQUIRED)
find_package(resource_file REQUIRED)
@@ -54,10 +50,12 @@ add_custom_target(
set(SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/Revision.cc
src/Account.cc
+ src/AddressTranslator.cc
src/AFSArchive.cc
+ src/AsyncHTTPServer.cc
+ src/AsyncUtils.cc
src/BattleParamsIndex.cc
src/BMLArchive.cc
- src/CatSession.cc
src/Channel.cc
src/ChatCommands.cc
src/ChoiceSearch.cc
@@ -80,9 +78,9 @@ set(SOURCES
src/Episode3/RulerServer.cc
src/Episode3/Server.cc
src/Episode3/Tournament.cc
- src/EventUtils.cc
src/FileContentsCache.cc
src/FunctionCompiler.cc
+ src/GameServer.cc
src/GSLArchive.cc
src/HTTPServer.cc
src/ImageEncoder.cc
@@ -94,8 +92,8 @@ set(SOURCES
src/ItemData.cc
src/ItemNameIndex.cc
src/ItemParameterTable.cc
- src/ItemTranslationTable.cc
src/Items.cc
+ src/ItemTranslationTable.cc
src/LevelTable.cc
src/Lobby.cc
src/Loggers.cc
@@ -104,12 +102,11 @@ set(SOURCES
src/Menu.cc
src/NetworkAddresses.cc
src/PatchFileIndex.cc
- src/PatchServer.cc
src/PlayerFilesManager.cc
src/PlayerSubordinates.cc
src/PPKArchive.cc
src/ProxyCommands.cc
- src/ProxyServer.cc
+ src/ProxySession.cc
src/PSOEncryption.cc
src/PSOGCObjectGraph.cc
src/PSOProtocol.cc
@@ -119,10 +116,8 @@ set(SOURCES
src/ReceiveCommands.cc
src/ReceiveSubcommands.cc
src/ReplaySession.cc
- src/Revision.cc
src/SaveFileFormats.cc
src/SendCommands.cc
- src/Server.cc
src/ServerShell.cc
src/ServerState.cc
src/ShellCommands.cc
@@ -135,13 +130,13 @@ set(SOURCES
src/WordSelectTable.cc
)
-if(resource_file_FOUND)
- set(SOURCES ${SOURCES} src/AddressTranslator.cc)
-endif()
-
add_executable(newserv ${SOURCES})
-target_include_directories(newserv PUBLIC ${LIBEVENT_INCLUDE_DIR} ${Iconv_INCLUDE_DIRS})
-target_link_libraries(newserv phosg::phosg ${LIBEVENT_LIBRARIES} ${Iconv_LIBRARIES} pthread resource_file::resource_file)
+target_include_directories(newserv PUBLIC ${ASIO_INCLUDE_DIR} ${Iconv_INCLUDE_DIRS})
+target_link_libraries(newserv phosg::phosg ${Iconv_LIBRARIES} pthread resource_file::resource_file)
+if (WIN32)
+ target_compile_definitions(newserv PUBLIC -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00)
+ target_link_libraries(newserv ws2_32 mswsock bcrypt iphlpapi -static -static-libgcc -static-libstdc++)
+endif()
add_dependencies(newserv newserv-Revision-cc)
# target_compile_options(newserv PRIVATE -fsanitize=address)
@@ -163,15 +158,6 @@ foreach(LogTestCase IN ITEMS ${LogTestCases})
COMMAND ${CMAKE_BINARY_DIR}/newserv --replay-log=${LogTestCase} --config=${CMAKE_SOURCE_DIR}/tests/config.json)
endforeach()
-if(resource_file_FOUND)
- foreach(LogRDTestCase IN ITEMS ${LogRDTestCases})
- add_test(
- NAME ${LogRDTestCase}
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- COMMAND ${CMAKE_BINARY_DIR}/newserv --replay-log=${LogRDTestCase} --config=${CMAKE_SOURCE_DIR}/tests/config.json)
- endforeach()
-endif()
-
file(GLOB ScriptTestCases ${CMAKE_SOURCE_DIR}/tests/*.test.sh)
foreach(ScriptTestCase IN ITEMS ${ScriptTestCases})
diff --git a/README.md b/README.md
index 2edea95f..a4f58af6 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,8 @@ See TODO.md for a list of known issues and future work I've curated, or go to th
* Background
* [History](#history)
* [Other server projects](#other-server-projects)
- * [Developer information](#developer-information)
* [Using newserv in other projects](#using-newserv-in-other-projects)
+ * [Contributing to newserv](#contributing-to-newserv)
* [Compatibility](#compatibility)
* Setup
* [Server setup](#server-setup)
@@ -46,7 +46,7 @@ For a while it was essentially necessary to use a proxy to go online at all, so
Sometime in 2006 or 2007, I abandoned Khyller and rebuilt the entire thing from scratch, resulting in Aeon. Aeon was substantially cleaner in code than Khyller but still fairly hard to work with, and it lacked a few of the more arcane features I had originally written (for example, the ability to convert any quest into a download quest). In addition, the code still had some stability problems... it turns out that Aeon's concurrency primitives were simply incorrect. I had derived the concept of a mutex myself, before taking any real computer engineering classes, but had implemented it incorrectly. I made the race window as small as possible, but Aeon would still randomly crash after running seemingly fine for a few days.
-At the time of its inception, Aeon was also called newserv, and you may find some beta releases floating around the Internet with filenames like `newserv-b3.zip`. I had released betas 1, 2, and 3 before I released the entire source of beta 5 and stopped working on the project when I went to college. This was around the time when I switched from writing software primarily on Windows to primarily on macOS and Linux, so Aeon beta 5 was the last server I wrote that specifically targeted Windows. (newserv, which you're looking at now, is a bit tedious to compile on Windows but does work.)
+At the time of its inception, Aeon was also called newserv, and you may find some beta releases floating around the Internet with filenames like `newserv-b3.zip`. I had released betas 1, 2, and 3 before I released the entire source of beta 5 and stopped working on the project when I went to college. This was around the time when I switched from writing software primarily on Windows to primarily on macOS and Linux, so Aeon beta 5 was the last server I wrote that specifically targeted Windows. (newserv, which you're looking at now, is difficult to compile on Windows but does work.)
After a long hiatus from PSO and much professional and personal development in my technical abilities, I was reminiscing sometime in October 2018 by reading my old code archives. Somehow inspired when I came across Aeon, I spent a weekend and a couple more evenings rewriting the entire project again, cleaning up ancient patterns I had used eleven years ago, replacing entire modules with simple STL containers, and eliminating even more support files in favor of configuration autodetection. The code is now suitably modern and stable, and I'm not embarrassed by its existence, as I am by Aeon beta 5's source code and my archive of Khyller (which, thankfully, no one else ever saw).
@@ -67,9 +67,15 @@ Independently of this project, there are many other PSO servers out there. Those
* (2021) **[Phantasmal World](https://github.com/DaanVandenBosch/phantasmal-world)**: A set of PSO tools, including a web-based model viewer and quest builder, and a PSO server, written by Daan Vanden Bosch.
* (2021) **[Elseware](http://git.sharnoth.com/jake/elseware)**: A PSOBB server written in Rust by Jake.
-## Developer information
+## Using newserv in other projects
-There is a lot of code in this project that could be useful as a reference. Some of the more notable files are:
+You are free to use code from newserv in your own open-source projects; the only condition is that the contents of the LICENSE file must be included in your project if you use code from newserv. Your project does not also have to use the MIT license; you can use any license you want.
+
+If you want to use parts of newserv in your project, there are two easy ways to do so with proper licensing:
+* If you're using a lot of code from newserv, you can put a copy of newserv's LICENSE file in your repository alongside your own license file, or include the contents of newserv's license in your own license file.
+* If you're only using a few files from newserv, you can copy and paste the contents of the LICENSE file into a comment at the beginning of each copied file.
+
+Some of the more likely useful files are:
* **src/CommandFormats.hh**: Complete listing of all network commands used in all known versions of the game, and their formats
* **src/CommonItemSet.hh/cc**: Format of ItemPT files, shop definition files, and tekker adjustment tables
* **src/DCSerialNumbers.hh/cc**: PSO DC serial number validation algorithm and serial number generator
@@ -83,13 +89,13 @@ There is a lot of code in this project that could be useful as a reference. Some
* **src/Episode3/DataIndexes.hh**: Episode 3 file structures, including card definition format and map/quest format
* **system/item-tables/names-v4.json**: Names of all items, indexed by the first 3 bytes of data1
-## Using newserv in other projects
+## Contributing to newserv
-There is a fair amount of code in this project that could potentially be useful to other projects. You are free to use code from newserv in your own open-source projects; the only condition is that the contents of the LICENSE file must be included in your project if you use code from newserv. Your project does not also have to use the MIT license; you can use any license you want.
+The goals of this project are:
+* Build stable, extensible PSO server software that includes all vanilla functionality as well as optional modern conveniences, features, and cheats.
+* Document the internals of PSO's network protocol, file formats, and game mechanics. This is mainly done through comments in the code.
-If you want to use parts of newserv in your project, there are two easy ways to do so with proper licensing:
-* If you're using a lot of code from newserv, you can put a copy of newserv's LICENSE file in your repository alongside your own license file, or include the contents of newserv's license in your own license file.
-* If you're only using a few files from newserv, you can copy and paste the contents of the LICENSE file into a comment at the beginning of each copied file.
+This is a personal project; there is no official development team, official website, or official instance of newserv. Issues and pull requests are certainly welcome, but please only add content (e.g. quests or patches) that you've created, is already public, or you have permission to release publicly.
# Compatibility
@@ -97,14 +103,14 @@ newserv supports all known versions of PSO, including various development protot
| Version | Lobbies | Games | Proxy |
|-----------------|----------|----------|----------|
-| DC NTE | Yes | Yes | No |
-| DC 11/2000 | Yes | Yes | No |
+| DC NTE | Yes | Yes | Yes |
+| DC 11/2000 | Yes | Yes | Yes |
| DC 12/2000 | Yes | Yes | Yes |
| DC 01/2001 | Yes | Yes | Yes |
| DC V1 | Yes | Yes | Yes |
| DC 08/2001 | Yes | Yes | Yes |
| DC V2 | Yes | Yes | Yes |
-| PC NTE | Yes (1) | Yes | No |
+| PC NTE | Yes (1) | Yes | Yes |
| PC | Yes | Yes | Yes |
| GC Ep1&2 NTE | Yes | Yes | Yes |
| GC Ep1&2 | Yes | Yes | Yes |
@@ -138,18 +144,19 @@ If you're on an older version of Windows (before Windows 10), the Cygwin librari
### Linux
-There are currently no precompiled releases for Linux. To run newserv on Linux, you'll have to build it from source - see the "Building from source" section below.
+There are currently no precompiled releases for Linux. To run newserv on Linux, you'll have to build it from source - see the section below.
-### Building from source
+### Building from source (macOS/Linux)
-1. Install the packages newserv depends on.
- * If you're on Windows, install [Cygwin](https://www.cygwin.com/). While doing so, install the `cmake`, `gcc-core`, `gcc-g++`, `git`, `libevent2.1_7`, `libevent-devel`, `make`, `libiconv-devel`, and `zlib` packages. Do the rest of these steps inside a Cygwin shell (not a Windows cmd shell or PowerShell).
- * If you're on macOS, run `brew install cmake libevent libiconv`.
- * If you're on Linux, run `sudo apt-get install cmake libevent-dev` (or use your Linux distribution's package manager).
-3. Build and install [phosg](https://github.com/fuzziqersoftware/phosg) and [resource_dasm](https://github.com/fuzziqersoftware/resource_dasm).
-5. Run `cmake . && make` in the newserv directory.
+To build on macOS or Linux:
-After building newserv, edit system/config.example.json as needed **and rename it to system/config.json** (note that this step is not necessary for the precompiled releases!), set up [client patch directories](#client-patch-directories) if you're planning to play Blue Burst, then run `./newserv` in newserv's directory.
+1. Install the dependencies needed for your platform:
+ * macOS: `brew install cmake asio libiconv`
+ * Linux: `sudo apt-get install cmake libasio-dev` (or use your Linux distribution's package manager)
+2. Build and install [phosg](https://github.com/fuzziqersoftware/phosg) and [resource_dasm](https://github.com/fuzziqersoftware/resource_dasm).
+3. Run `cmake . && make` in the newserv directory.
+
+After building newserv, edit system/config.example.json as needed **and rename it to system/config.json** (note that this step is not necessary for the precompiled releases), set up [client patch directories](#client-patch-directories) if you're planning to play Blue Burst, then run `./newserv` in newserv's directory.
The server has an interactive shell which can be used to make changes, such as managing user accounts, updating the server's configuration, managing Episode 3 tournaments, and more. Type `help` and press Enter to see all the commands.
@@ -157,6 +164,10 @@ On Linux and macOS, the server also responds to SIGUSR1 and SIGUSR2. SIGUSR1 doe
To use newserv in other ways (e.g. for translating data), see the end of this document.
+### Building from source (Windows)
+
+The current version of newserv is cross-compiled using mingw-w64 on a macOS build machine, with the necessary libraries manually installed. Setting up such a build environment is tedious and not recommended; it's recommended to just use a release version instead.
+
## Client patch directories
newserv implements a patch server for PSO PC and PSO BB game data. Any file or directory you put in the system/patch-bb or system/patch-pc directories will be synced to clients when they connect to the patch server.
@@ -276,7 +287,8 @@ A license is a set of credentials that a player can use to log in. There are six
* *GC licenses* consist of a 10-digit decimal serial number, a 12-character access key, and a password of up to 8 characters.
* *XB licenses* consist of a gamertag of up to 16 characters, a 16-character hex user ID, and a 16-character hex account ID.
* *BB licenses* consist of a username of up to 16 characters and a password of up to 16 characters.
-Each account may have multiple licenses. To add a license to an account, use `add-license` in the shell.
+
+Each account may have multiple licenses. To add a license to an existing account, use `add-license` in the shell.
On BB, character data is scoped to the license, but system and Guild Card data is scoped to the account. That is, an account with multiple BB licenses can have more than 4 characters (up to 4 per license), but they will all share the same team membership and Guild Card lists.
@@ -374,7 +386,9 @@ newserv has the ability to save character data on the server side. For PSO BB, t
Each account has 4 BB character slots and 16 non-BB character file slots. The non-BB slots are independent of the BB slots, and can be accessed with the `$savechar ` and `$loadchar ` commands (slots are numbered 1 through 16). `$savechar` copies the character you're currently playing as and saves the data on the server, and `$loadchar` does the reverse, overwriting your current character with the data saved on the server. Note that you can load a character that was saved from a different version of PSO, which allows you to easily transfer characters between games. On v1 and v2, changes done by `$loadchar` will be undone if you join a game; to permanently save your changes, disconnect from the lobby after using the command.
-There is a third command, `$bbchar `, which behaves similarly to `$savechar` but writes the character data to a BB character slot in a different account instead (slots are numbered 1 through 4). This can be used to "upgrade" a character to BB from an earlier version.
+You can see basic information about a character saved on the server (without affecting your current character) by using `$checkchar `. You can delete a previously-saved character with `$deletechar `.
+
+There is also the command `$bbchar `, which behaves similarly to `$savechar` but writes the character data to a BB character slot in a different account instead (slots are numbered 1 through 4). This can be used to "upgrade" a character to BB from an earlier version.
Exactly which data is saved and loaded depends on the game version:
@@ -497,9 +511,9 @@ If you want to play online on remote servers rather than running your own server
To use the proxy for PSO DC, PC, or GC, add an entry to the corresponding ProxyDestinations dictionary in config.json, then run newserv and connect to it as normal (see below). You'll see a "Proxy server" option in the main menu, and you can pick which remote server to connect to.
-To use the proxy for PSO BB, set the ProxyDestination-BB entry in config.json. If this option is set, it essentially disables the game server for all PSO BB clients - all clients will be proxied to the specified destination instead. Unfortunately, because PSO BB uses a different set of handlers for the data server phase and character selection, there's no in-game way to present the player with a list of options, like there is on PSO PC and PSO GC.
+To use the proxy for PSO BB, set the ProxyDestination-BB entry in config.json. If this option is set, it essentially disables the game server for all BB clients - all BB clients will be proxied to the specified destination instead. Unfortunately, because PSO BB uses a different set of handlers for the data server phase and character selection, there's no in-game way to present the player with a list of options, like there is on PSO PC and PSO GC.
-When you're on PSO DC, PC, or GC and are connected to a remote server through newserv's proxy, choosing the Change Ship or Change Block action from the lobby counter will send you back to newserv's main menu instead of the remote server's ship or block select menu. You can go back to the server you were just on by choosing it from the proxy server menu again.
+When you're on PSO DC, PC, GC, or Xbox and are connected to a remote server through newserv's proxy, choosing the Change Ship or Change Block action from the lobby counter will send you back to newserv's main menu instead of the remote server's ship or block select menu. You can go back to the server you were just on by choosing it from the proxy server menu again.
There are many options available when starting a proxy session. All options are off by default unless otherwise noted. The options are:
* **Chat commands**: enables chat commands in the proxy session (on by default).
@@ -522,54 +536,54 @@ There are many options available when starting a proxy session. All options are
* Episode 3 card definitions (saved as .mnr files)
* Episode 3 media updates (saved as .gvm, .bml, or .bin files)
-The remote server will probably try to assign you a Guild Card number that doesn't match the one you have on newserv. On PSO DC, PC and GC, the proxy server rewrites the commands in transit to make it look like the remote server assigned you the same Guild Card number as you have on newserv, but if the remote server has some external integrations (e.g. forum or Discord bots), they will use the Guild Card number that the remote server believes it has assigned to you. The number assigned by the remote server is shown to you when you first connect to the remote server, and you can retrieve it in lobbies or during games with the `$li` command.
+The remote server will probably try to assign you a Guild Card number that doesn't match the one you have on newserv. The proxy rewrites the commands in transit to make it look like the remote server assigned you the same Guild Card number as you have on newserv, but if the remote server has some external integrations (e.g. forum or Discord bots), they will use the Guild Card number that the remote server believes it has assigned to you. The number assigned by the remote server is shown to you when you first connect to the remote server, and you can retrieve it in lobbies or during games with the `$li` command.
-Some chat commands (see below) have the same basic function on the proxy server but have different effects or conditions. In addition, there are some server shell commands that affect clients on the proxy (run `help` in the shell to see what they are). If there's only one proxy session open, the shell's proxy commands will affect that session. Otherwise, you'll have to specify which session to affect with the `on` prefix - to send a chat message in LinkedSession:17205AE4, for example, you would run `on 17205AE4 chat ...`.
+Some chat commands (see below) have the same basic function on the proxy but have different effects or conditions. In addition, there are some server shell commands that affect clients on the proxy (run `help` in the shell to see what they are). If there's only one proxy session open, the shell's proxy commands will affect that session. Otherwise, you'll have to specify which session to affect with the `on` prefix - to send a chat message in C-17's session, for example, you would run `on C-17 chat ...`.
## Chat commands
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.) On the DC 11/2000 prototype, `@` is used instead of `$` for all chat commands, since `$` does not appear on the English virtual keyboard.
-Some commands only work on the game server and not on the proxy server. The chat commands are:
+Some commands only work for clients not in proxy sessions. The chat commands are:
* Information commands
- * `$li`: Show basic information about the lobby or game you're in. If you're on the proxy server, show information about your connection instead (remote Guild Card number, client ID, etc.).
- * `$si` (game server only): Show basic information about the server.
- * `$ping`: Show round-trip ping time from the server to you. On the proxy server, show the ping time from you to the proxy and from the proxy to the server.
- * `$matcount` (game server only): Show how many of each type of material you've used.
- * `$killcount` (game server only): Show the kill count on your currently-equipped weapon. If you're in a game and not on BB, the value is only accurate at the time the item enters the game.
+ * `$li`: Show basic information about the lobby or game you're in. If you're on the proxy, show information about your connection instead (remote Guild Card number, client ID, etc.).
+ * `$si`: Show basic information about the server.
+ * `$ping`: Show round-trip ping time from the server to you. On the proxy, show the ping time from you to the proxy and from the proxy to the server.
+ * `$matcount` (non-proxy only): Show how many of each type of material you've used.
+ * `$killcount` (non-proxy only): Show the kill count on your currently-equipped weapon. If you're in a game and not on BB, the value is only accurate at the time the item enters the game.
* `$itemnotifs `: Enable item drop notification messages. If the game has private drops enabled, you will only see a notification if the dropped item is visible to you; you won't be notified of other players' drops. The modes are:
* `off`: No notifications are shown.
* `rare`: You are notified when a rare item drops.
* `on`: You are notified when any item drops, except Meseta.
* `every`: You are notified when any item drops, including Meseta.
* `$announcerares`: Enable or disable announcements for your rare item finds. This determines whether rare items you find will be announced to the game and server, not whether you will see announcements for others finding rare items.
- * `$what` (game server only): Show the type, name, and stats of the nearest item on the ground.
- * `$where` (game server only): Show your current floor number and coordinates. Mainly useful for debugging.
- * `$qfread ` (game server only): Show the value of a quest counter in your player data. The field names are defined in config.json.
+ * `$what` (non-proxy only): Show the type, name, and stats of the nearest item on the ground.
+ * `$where`: Show your current floor number and coordinates. Mainly useful for debugging.
+ * `$qfread ` (non-proxy only): Show the value of a quest counter in your player data. The field names are defined in config.json.
* Debugging commands
- * `$debug` (game server only): Enable or disable debug. You need the DEBUG flag in your user account to use this command. Enabling debug does several things:
+ * `$debug`: Enable or disable debug. You need the DEBUG flag in your user account to use this command. Enabling debug does several things:
* You'll see in-game messages from the server when you take some actions, like killing enemies, opening boxes, or flipping switches.
* You'll see the rare seed value and floor variations when you join a game.
* You'll be placed into the last available slot in lobbies and games instead of the first, unless you're joining a BB solo-mode game.
* You'll be able to join games with any PSO version, not only those for which cross-version play is normally enabled. See the "Cross-version play" section above for details on this.
* Most of the commands in this section are enabled. (A few of them are always enabled and don't require `$debug`.)
- * `$whatobj` and `$whatene` (game server only): Tells you what the closest object or enemy spawn point is to your position, along with its coordinates and object or enemy ID. The full definition is also printed to the server's log. These commands can be used without `$debug` enabled.
- * `$readmem ` (game server only): Read 4 bytes from the given address and show you the values.
- * `$writemem ` (game server only): Write data to the given address. Data is not required to be any specific size.
- * `$nativecall [arg1 ...]` (game server only, GC only): Call a native function on your client. Only arguments passed in registers are supported; calling functions that take many arguments is not supported.
- * `$quest ` (game server only): Load a quest by quest number. Can be used to load battle or challenge quests with only one player present. `$debug` is not required for this command if the specified quest has the AllowStartFromChatCommand field set in its metadata file.
+ * `$whatobj` and `$whatene` (non-proxy only): Tells you what the closest object or enemy spawn point is to your position, along with its coordinates and object or enemy ID. The full definition is also printed to the server's log. These commands can be used without `$debug` enabled.
+ * `$readmem `: Read 4 bytes from the given address and show you the values.
+ * `$writemem `: Write data to the given address. Data is not required to be any specific size.
+ * `$nativecall [arg1 ...]` (GC only): Call a native function on your client. Only arguments passed in registers are supported; calling functions that take many arguments is not supported.
+ * `$quest ` (non-proxy only): Load a quest by quest number. Can be used to load battle or challenge quests with only one player present. `$debug` is not required for this command if the specified quest has the AllowStartFromChatCommand field set in its metadata file.
* `$qcall `: Call a quest function on your client.
- * `$qcheck ` (game server only): Show the value of a quest flag. This command can be used without `$debug` enabled. If you're in a game, show the value of the flag in that game; if you're in the lobby, show the saved value of that quest flag for your character (BB only).
+ * `$qcheck ` (non-proxy only): Show the value of a quest flag. This command can be used without `$debug` enabled. If you're in a game, show the value of the flag in that game; if you're in the lobby, show the saved value of that quest flag for your character (BB only).
* `$qset ` or `$qclear `: Set or clear a quest flag for everyone in the game. If you're in the lobby and on BB, set or clear the saved value of a quest flag in your character file.
- * `$qgread ` (game server only): Show the value of a quest counter ("global flag"). This command can be used without `$debug` enabled.
- * `$qgwrite ` (game server only): Set the value of a quest counter ("global flag") for yourself.
+ * `$qgread ` (non-proxy only): Show the value of a quest counter ("global flag"). This command can be used without `$debug` enabled.
+ * `$qgwrite ` (non-proxy only): Set the value of a quest counter ("global flag") for yourself.
* `$qsync `: Set a quest register's value for yourself only. `` should be either rXX (e.g. r60) or fXX (e.g. f60); if the latter, `` is parsed as a floating-point value instead of as an integer.
* `$qsyncall `: Set a quest register's value for everyone in the game. `` should be either rXX (e.g. r60) or fXX (e.g. f60); if the latter, `` is parsed as a floating-point value instead of as an integer.
* `$swset [floor] ` and `$swclear [floor] `: Set or clear a switch flag. If floor is not given, sets or clears the flag on your current floor.
* `$swsetall`: Set all switch flags on your current floor. This unlocks all doors, disables all laser fences, triggers all light/poison switches, etc.
- * `$gc` (game server only): Send your own Guild Card to yourself.
+ * `$gc` (non-proxy only): Send your own Guild Card to yourself.
* `$sc `: Send a command to yourself.
* `$ss `: Send a command to the remote server (if in a proxy session) or to the game server.
* `$sb `: Send a command to yourself, and to the remote server or game server.
@@ -577,31 +591,33 @@ Some commands only work on the game server and not on the proxy server. The chat
* Personal state commands
* `$arrow `: Change your lobby arrow color. The color may be specified by number (0-12) or by name (red, blue, green, yellow, purple, cyan, orange, pink, white, white2, white3, or black).
- * `$secid `: Set 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. If you're in a game and you are the leader of the game, this also immediately changes the item tables used by the server when creating items. 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. If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing.
- * `$rand `: Set 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]`: Set 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.
+ * `$secid `: Set 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. If you're in a game and you are the leader of the game, this also immediately changes the item tables used by the server when creating items. To revert to your actual section id, run `$secid` with no name after it. On the proxy, this will not work if the remote server controls item drops. If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing.
+ * `$rand `: Set 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 and item drops. On the proxy, 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]`: Set 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, 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.
* `$swa`: Enable or disable switch assist. When enabled, the server will unlock two-player and four-player doors in non-quest games when you step on any of the required switches.
* `$exit`: If you're in a lobby, send you to the main menu (which ends your proxy session, if you're in one). If you're in a game or spectator team, send 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 `: Run a patch on your client. `` must exactly match the name of a patch on the server.
-* Character data commands (game server only)
+* Character data commands (non-proxy only)
* `$savechar `: Save your current character data on the server in the specified slot. See the [server-side saves section](#server-side-saves) for more details.
* `$loadchar `: Save your current character data on the server in the specified slot. See the [server-side saves section](#server-side-saves) for more details.
* `$bbchar `: Save your current character data on the server in a different account's BB character slots. See the [server-side saves section](#server-side-saves) for more details.
+ * `$checkchar `: Tells you basic information about a server-side character previously saved using `$savechar`.
+ * `$deletechar `: Deletes a server-side character previously saved using `$savechar`.
* `$edit `: Modify your character data. See the [using $edit](#using-edit) section for details.
-* Blue Burst player commands (game server only)
+* Blue Burst player commands (non-proxy only)
* `$bank [number]`: Switch your current bank, so you can access your other character's banks (if `number` is 1-4) or your shared account bank (if `number` is 0). If `number` is not given, switch back to your current character's bank.
* `$save`: Save 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)
+* Game state commands (non-proxy only)
* `$maxlevel `: Set 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 `: Set the minimum level for players to join the current game.
* `$password `: Set the game's join password. To unlock the game, run `$password` with nothing after it.
* `$dropmode [mode]`: Change the way item drops behave in the current game. `mode` can be `none`, `client`, `shared`, `private`, or `duplicate`. If `mode` is not given, tells you the current drop mode without changing it. See the [item tables and drop modes section](#item-tables-and-drop-modes) for more information.
* `$persist`: Enable or disable persistence for the current game. When persistence is on, the game will not be deleted when the last player leaves. The states of enemies, objects, and switches will be saved, and items left on the floor will not be deleted. (But if you're in the private or duplicate drop mode, items dropped by enemies are deleted - to make sure a certain item won't be deleted, you can pick it up and drop it again.) If the game is empty for too long (15 minutes by default), it is then deleted.
-* Episode 3 commands (game server only)
+* Episode 3 commands (non-proxy only)
* `$spec`: Toggle the allow spectators flag for Episode 3 games. If any players are spectating when this flag is disabled, they are sent back to the lobby.
* `$inftime`: Toggle infinite-time mode. Must be used before starting a battle. If infinite-time mode is on, the overall and per-phase time limits will be disabled regardless of the values chosen during battle rules 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).
* `$dicerange [d:L-H] [1:L-H] [a1:L-H] [d1:L-H]`: Set override dice ranges for the next battle. The min and max dice values from the rules setup menu always apply to the ATK dice, but you can specify a different range for the DEF dice with `d:2-4` (for example). The `1:` override applies to the 1-player team in a 2v1 game (so you would set the 2-player team's desired dice range in the rules menu). You can also specify the 1-player team's ATK and DEF ranges separately with the `a1:` and `d1:` overrides. Note that these ranges will only be used if the chosen map or quest does not override them.
@@ -611,22 +627,22 @@ Some commands only work on the game server and not on the proxy server. The chat
* `$playrec `: Play a battle recording. This command creates a spectator team immediately but the replay does not start automatically, to give other players a chance to join. To start the battle replay within the spectator team, run `$playrec` again (with no name). There is a bug in Dolphin that makes this command unstable in emulation (see the "Battle records" section above).
* Cheat mode commands
- * `$cheat` (game server only): Enable or disable 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. Cheat mode is always enabled on the proxy server, unless cheat mode is disabled on the entire server.
+ * `$cheat` (non-proxy only): Enable or disable 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. Cheat mode is always enabled on the proxy, unless cheat mode is disabled on the entire server.
* `$infhp`: Enable or disable infinite HP mode. Applies to only you; does not affect other players. When enabled, one-hit KO attacks will still kill you, but on most versions of the game (not DCv1, GC US 1.2, or GC JP 1.5), the server will automatically revive you if you die. On all versions except GC US 1.2 and GC JP 1.5, infinite HP also automatically cures status ailments.
* `$inftp`: Enable or disable infinite TP mode. Applies to only you; does not affect other players.
* `$warpme ` (or `$warp `): Warp yourself to the given floor.
- * `$warpall `: Warp everyone in the game to the given floor. You must be the leader to use this command, unless you're on the proxy server.
+ * `$warpall `: Warp everyone in the game to the given floor. You must be the leader to use this command, unless you're on the proxy.
* `$next`: Warp yourself to the next floor.
- * `$item ` (or `$i `): 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 ` (game server only): In an Episode 3 battle, removes one of your set cards from the field. `` 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.
- * `$dropmode [mode]` (proxy server): Change the way item drops behave in the current game, if you are not on BB. Unlike the game server version of this command, using this on the proxy server requires cheats to be enabled. This works by intercepting the drop requests sent to and from the leader. (So, if you are the leader and not using server drop mode on the remote server, it affects the entire game; otherwise, it affects only items generated by your actions.) `mode` can be `none` (no drops), `default` (normal drops), or `proxy` (use newserv's drop tables instead of the remote server's). If `mode` is not given, tells you the current drop mode without changing it.
+ * `$item ` (or `$i `): 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, you must not be using Blue Burst for this command to work. On the game server, this command works for all versions.
+ * `$unset ` (non-proxy only): In an Episode 3 battle, removes one of your set cards from the field. `` 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.
+ * `$dropmode [mode]` (proxy only): Change the way item drops behave in the current game, if you are not on BB. Unlike the game server version of this command, using this on the proxy requires cheats to be enabled. This works by intercepting the drop requests sent to and from the leader. (So, if you are the leader and not using server drop mode on the remote server, it affects the entire game; otherwise, it affects only items generated by your actions.) `mode` can be `none` (no drops), `default` (normal drops), or `proxy` (use newserv's drop tables instead of the remote server's). If `mode` is not given, tells you the current drop mode without changing it.
* Aesthetic commands
- * `$event `: Set 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.
- * `$allevent ` (game server only): Set the current holiday event in all lobbies.
+ * `$event `: Set 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, this applies to all lobbies and games you join, but only you will see the new event - other players will not.
+ * `$allevent ` (non-proxy only): Set the current holiday event in all lobbies.
* `$song ` (Episode 3 only): Play a specific song in the current lobby.
-* Administration commands (game server only)
+* Administration commands (non-proxy only)
* `$ann `: Send an announcement message. The message is sent as temporary on-screen text to all players in all games and lobbies. On BB, the message appears in the scrolling top bar.
* `$ann!`, `$ann?`, `$ann?!`: Same as `$ann`, but with `?`, omits the sender's name, and with `!`, sends the message as a Simple Mail message instead of on-screen text.
* `$silence `: Silence a player (remove their ability to chat) or unsilence a player. The identifier may be the player's name or Guild Card number.
@@ -690,7 +706,7 @@ The HTTP server has the following endpoints:
* `GET /y/data/config`: Returns the server's configuration file.
* `GET /y/accounts`: Returns information about all registered accounts.
* `GET /y/clients`: Returns information about all connected clients on the game server.
-* `GET /y/proxy-clients`: Returns information about all connected clients on the proxy server.
+* `GET /y/proxy-clients`: Returns information about all connected clients on the proxy.
* `GET /y/lobbies`: Returns information about all lobbies and games.
* `GET /y/server`: Returns information about the server.
* `GET /y/summary`: Returns a summary of the server's state, connected clients, active games, and proxy sessions.
@@ -718,7 +734,7 @@ Upon connecting, you'll get the message `{"ServerType": "newserv"}`. After that,
# Non-server features
-newserv has many CLI options, which can be used to access functionality other than the game and proxy server. Run `newserv help` to see a full list of the options and how to use each one.
+newserv has many CLI options, which can be used to access functionality other than the game server and proxy. Run `newserv help` to see a full list of the options and how to use each one.
The data formats that newserv can convert to/from are:
diff --git a/TODO.md b/TODO.md
index 91da148b..922aea30 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,13 +1,18 @@
## General
- Make UI strings localizable (e.g. entries in menus, welcome message, etc.)
-- Add an idle connection timeout for proxy sessions
- Clean up ItemParameterTable implementation (see comment at the top of the class definition)
-- Handle MeetUserExtensions properly in 41 and C4 commands on the proxy (rewrite the embedded 19 command and store a map of received destinations)
+- Handle MeetUserExtensions properly in 41 and C4 commands on the proxy (rewrite the embedded 19 command and put some metadata in the persistent config, perhaps)
+- Make a server patch version of story flag fixer quest
+- Make proxy server handle all login commands, including sending 9C when needed
+- Add $switchit command (activates switch flag(s) for nearest object, e.g. laser fence, door, fog collision)
+- Add a way to persist flags across connections, at least on v3, because of Meet User + B2 enable quest interactions - maybe update the quest to patch one of the login commands so the server can tell it's enabled
+- Handle items in crossplay - use the replacement table
## PSO DC
- Investigate if https://crates.io/crates/blaze-ssl-async can be used to implement the HL check server
+- v2 challenge data in $savechar/$loadchar doesn't work properly
## Episode 3
@@ -27,3 +32,5 @@
- Figure out why Pouilly Slime EXP doesn't work
- Make server-specified rare enemies work with maps loaded by the proxy
- Implement serialization for various table types (ItemPMT, ItemPT, etc.)
+- Record some BB tests
+- Add all necessary Guild Card number rewrites in BB commands on the proxy
diff --git a/notes/ar-codes.txt b/notes/ar-codes.txt
index 75ff32ee..54ac882f 100644
--- a/notes/ar-codes.txt
+++ b/notes/ar-codes.txt
@@ -719,3 +719,6 @@ Show extended item info when targeting a dropped item
04005188 38210020
0400518C 7C0803A6
04005190 4E800020
+
+All weapons can do 3-hit combos
+3OE1 => 041D3248 38000001
diff --git a/notes/ep3-nte-differences.txt b/notes/ep3-nte-differences.txt
index 0807ac7c..2a1801e6 100644
--- a/notes/ep3-nte-differences.txt
+++ b/notes/ep3-nte-differences.txt
@@ -1,4 +1,6 @@
List of differences in Ep3 NTE compared to Final:
+- COMs can play more than one defense card per turn
+- The battle setup menu allows 1v2 battles
- Assist cards
- - Dice Fever sets dice to 6, not 5, and there is no Dice Fever +
- - Rich + and Charity + also don't exist
diff --git a/notes/handler-tables.txt b/notes/handler-tables.txt
index 536cc294..12495056 100644
--- a/notes/handler-tables.txt
+++ b/notes/handler-tables.txt
@@ -504,7 +504,7 @@ Quest opcode dispatch
3SP0 => 8010A404
Quest opcode handlers (format: GET_ARGS EXEC_FUN)
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
00 8C13C19C-() 8C13C830 8C13F83C-() 8C13FF80 8C1501A4-??? 8C1508E8 8C151764-() 8C151EA8 8C16C6F0-() 8C16CE34 004E12C0-() 004E1A50 00590DD0-() 00595030 80242F44-() 80242304 801ED060-??? 801ECB70 801F2A10-() 801F2520 801F2B94-() 801F26A4 8010D308-() 8010CE18 80109CA8-() 801097B8 00218DF0-??? 002C9010 002190C0-??? 002F76A0 006B101C-() 0061CDB0 nop
01 8C13C19C-() 8C13C834 8C13F83C-() 8C13FF84 8C1501A4-??? 8C1508EC 8C151764-() 8C151EAC 8C16C6F0-() 8C16CE38 004E12C0-() 004E1A60 00590DD0-() 00591560 80242F44-() 802422C0 801ED060-??? 801ECB20 801F2A10-() 801F24D0 801F2B94-() 801F2654 8010D308-() 8010CDC8 80109CA8-() 80109768 00218DF0-??? 00219170 002190C0-??? 00219440 006B101C-() 006B16A0 ret
02 8C13C19C-() 8C13C870 8C13F83C-() 8C13FFC0 8C1501A4-??? 8C150928 8C151764-() 8C151EE8 8C16C6F0-() 8C16CE74 004E12C0-() 004E1AA0 00590DD0-() 005915A0 80242F44-() 802422A8 801ED060-??? 801ECB08 801F2A10-() 801F24B8 801F2B94-() 801F263C 8010D308-() 8010CDB0 80109CA8-() 80109750 00218DF0-??? 002191B0 002190C0-??? 00219480 006B101C-() 006B16E0 sync
@@ -519,7 +519,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
0B ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECE40-??? 801ECA70 801F27F0-BW 801F2420 801F2974-BW 801F25A4 8010D0E8-BW 8010CD18 80109A88-BW 801096B8 00218F00-??? 00219270 002191D0-??? 00219540 006B1120-BW 006B174C letw
0C ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801ECA58 801F2930-BB 801F2408 801F2AB4-BB 801F258C 8010D228-BB 8010CD00 80109BC8-BB 801096A0 00218E50-??? 00219290 00219120-??? 00219560 006B1058-BB 006B1760 leta
0D ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECE40-??? 801ECA3C 801F27F0-BW 801F23EC 801F2974-BW 801F2570 8010D0E8-BW 8010CCE4 80109A88-BW 80109684 00218F00-??? 002192B0 002191D0-??? 00219580 006B1120-BW 006B177C leto
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
10 8C13C1B0-B 8C13C8D4 8C13F850-B 8C140024 8C1501B8-??? 8C15098C 8C151778-B 8C151F4C 8C16C704-B 8C16CED8 004E12D0-B 004E1B50 00590DE0-B 00591650 80242EF8-B 8024220C 801ECFD8-??? 801ECA28 801F2988-B 801F23D8 801F2B0C-B 801F255C 8010D280-B 8010CCD0 80109C20-B 80109670 00218E20-??? 002192D0 002190F0-??? 002195A0 006B1040-B 006B179C set
11 8C13C1B0-B 8C13C8E8 8C13F850-B 8C140038 8C1501B8-??? 8C1509A0 8C151778-B 8C151F60 8C16C704-B 8C16CEEC 004E12D0-B 004E1B70 00590DE0-B 00591670 80242EF8-B 802421F8 801ECFD8-??? 801ECA14 801F2988-B 801F23C4 801F2B0C-B 801F2548 8010D280-B 8010CCBC 80109C20-B 8010965C 00218E20-??? 002192F0 002190F0-??? 002195C0 006B1040-B 006B17B0 clear
12 8C13C1B0-B 8C13C8FC 8C13F850-B 8C14004C 8C1501B8-??? 8C1509B4 8C151778-B 8C151F74 8C16C704-B 8C16CF00 004E12D0-B 004E1B90 00590DE0-B 00591690 80242EF8-B 802421DC 801ECFD8-??? 801EC9F8 801F2988-B 801F23A8 801F2B0C-B 801F252C 8010D280-B 8010CCA0 80109C20-B 80109640 00218E20-??? 00219310 002190F0-??? 002195E0 006B1040-B 006B17C4 rev
@@ -536,7 +536,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
1D 8C13C21C-BL 8C13CA5C 8C13F8BC-BL 8C1401AC 8C150224-??? 8C150B14 8C1517E4-BL 8C1520D4 8C16C770-BL 8C16D060 004E1350-BL 004E1D80 00590E60-BL 00591880 80242E1C-BL 80242000 801ECF28-??? 801EC81C 801F28D8-BL 801F21CC 801F2A5C-BL 801F2350 8010D1D0-BL 8010CAC4 80109B70-BL 80109464 00218E90-??? 002194B0 00219160-??? 00219780 006B107C-BL 006B1908 muli
1E 8C13C1DC-BB 8C13CA74 8C13F87C-BB 8C1401C4 8C1501E4-??? 8C150B2C 8C1517A4-BB 8C1520EC 8C16C730-BB 8C16D078 004E1300-BB 004E1DA0 00590E10-BB 005918A0 80242EA0-BB 80241FE0 801ECF80-??? 801EC7FC 801F2930-BB 801F21AC 801F2AB4-BB 801F2330 8010D228-BB 8010CAA4 80109BC8-BB 80109444 00218E50-??? 002194D0 00219120-??? 002197A0 006B1058-BB 006B1920 div
1F 8C13C21C-BL 8C13CAA0 8C13F8BC-BL 8C1401F0 8C150224-??? 8C150B58 8C1517E4-BL 8C152118 8C16C770-BL 8C16D0A4 004E1350-BL 004E1DD0 00590E60-BL 005918D0 80242E1C-BL 80241FC8 801ECF28-??? 801EC7E4 801F28D8-BL 801F2194 801F2A5C-BL 801F2318 8010D1D0-BL 8010CA8C 80109B70-BL 8010942C 00218E90-??? 002194F0 00219160-??? 002197C0 006B107C-BL 006B1944 divi
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
20 8C13C1DC-BB 8C13CAC4 8C13F87C-BB 8C140214 8C1501E4-??? 8C150B7C 8C1517A4-BB 8C15213C 8C16C730-BB 8C16D0C8 004E1300-BB 004E1DF0 00590E10-BB 005918F0 80242EA0-BB 80241FA8 801ECF80-??? 801EC7C4 801F2930-BB 801F2174 801F2AB4-BB 801F22F8 8010D228-BB 8010CA6C 80109BC8-BB 8010940C 00218E50-??? 00219510 00219120-??? 002197E0 006B1058-BB 006B1964 and
21 8C13C21C-BL 8C13CAE4 8C13F8BC-BL 8C140234 8C150224-??? 8C150B9C 8C1517E4-BL 8C15215C 8C16C770-BL 8C16D0E8 004E1350-BL 004E1E20 00590E60-BL 00591920 80242E1C-BL 80241F90 801ECF28-??? 801EC7AC 801F28D8-BL 801F215C 801F2A5C-BL 801F22E0 8010D1D0-BL 8010CA54 80109B70-BL 801093F4 00218E90-??? 00219530 00219160-??? 00219800 006B107C-BL 006B197C andi
22 8C13C1DC-BB 8C13CAFC 8C13F87C-BB 8C14024C 8C1501E4-??? 8C150BB4 8C1517A4-BB 8C152174 8C16C730-BB 8C16D100 004E1300-BB 004E1E40 00590E10-BB 00591940 80242EA0-BB 80241F70 801ECF80-??? 801EC78C 801F2930-BB 801F213C 801F2AB4-BB 801F22C0 8010D228-BB 8010CA34 80109BC8-BB 801093D4 00218E50-??? 00219550 00219120-??? 00219820 006B1058-BB 006B1990 or
@@ -553,7 +553,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
2D 8C13C48C-BLW 8C13CC5C 8C13FBDC-BLW 8C1403C8 8C150544-??? 8C150D80 8C151B04-BLW 8C152340 8C16CA90-BLW 8C16D2CC 004E15F0-BLW 004E2090 00591100-BLW 00591B90 802428C8-BLW 80241D94 801ECD78-??? 801EC5B8 801F2728-BLW 801F1F68 801F28AC-BLW 801F20EC 8010D020-BLW 8010C860 801099C0-BLW 80109200 00218F90-??? 00219730 00219260-??? 00219A00 006B1174-BLW 006B1B50 jmpi_eq
2E 8C13C420-BBW 8C13CC88 8C13FB70-BBW 8C1403F4 8C1504D8-??? 8C150DAC 8C151A98-BBW 8C15236C 8C16CA24-BBW 8C16D2F8 004E15A0-BBW 004E20D0 005910B0-BBW 00591BD0 80242980-BBW 80241D64 801ECDDC-??? 801EC588 801F278C-BBW 801F1F38 801F2910-BBW 801F20BC 8010D084-BBW 8010C830 80109A24-BBW 801091D0 00218F40-??? 00219760 00219210-??? 00219A30 006B1144-BBW 006B1B78 jmp_ne
2F 8C13C48C-BLW 8C13CCBC 8C13FBDC-BLW 8C140428 8C150544-??? 8C150DE0 8C151B04-BLW 8C1523A0 8C16CA90-BLW 8C16D32C 004E15F0-BLW 004E2110 00591100-BLW 00591C10 802428C8-BLW 80241D3C 801ECD78-??? 801EC560 801F2728-BLW 801F1F10 801F28AC-BLW 801F2094 8010D020-BLW 8010C808 801099C0-BLW 801091A8 00218F90-??? 00219790 00219260-??? 00219A60 006B1174-BLW 006B1BA4 jmpi_ne
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
30 8C13C420-BBW 8C13CCE8 8C13FB70-BBW 8C140454 8C1504D8-??? 8C150E0C 8C151A98-BBW 8C1523CC 8C16CA24-BBW 8C16D358 004E15A0-BBW 004E2150 005910B0-BBW 00591C50 80242980-BBW 80241D0C 801ECDDC-??? 801EC530 801F278C-BBW 801F1EE0 801F2910-BBW 801F2064 8010D084-BBW 8010C7D8 80109A24-BBW 80109178 00218F40-??? 002197C0 00219210-??? 00219A90 006B1144-BBW 006B1BCC ujmp_gt
31 8C13C48C-BLW 8C13CD1C 8C13FBDC-BLW 8C140488 8C150544-??? 8C150E40 8C151B04-BLW 8C152400 8C16CA90-BLW 8C16D38C 004E15F0-BLW 004E2190 00591100-BLW 00591C90 802428C8-BLW 80241CE4 801ECD78-??? 801EC508 801F2728-BLW 801F1EB8 801F28AC-BLW 801F203C 8010D020-BLW 8010C7B0 801099C0-BLW 80109150 00218F90-??? 002197F0 00219260-??? 00219AC0 006B1174-BLW 006B1BF8 ujmpi_gt
32 8C13C420-BBW 8C13CD48 8C13FB70-BBW 8C1404B4 8C1504D8-??? 8C150E6C 8C151A98-BBW 8C15242C 8C16CA24-BBW 8C16D3B8 004E15A0-BBW 004E21D0 005910B0-BBW 00591CD0 80242980-BBW 80241CB4 801ECDDC-??? 801EC4D8 801F278C-BBW 801F1E88 801F2910-BBW 801F200C 8010D084-BBW 8010C780 80109A24-BBW 80109120 00218F40-??? 00219820 00219210-??? 00219AF0 006B1144-BBW 006B1C20 jmp_gt
@@ -570,7 +570,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
3D 8C13C48C-BLW 8C13CF5C 8C13FBDC-BLW 8C1406C8 8C150544-??? 8C151080 8C151B04-BLW 8C152640 8C16CA90-BLW 8C16D5CC 004E15F0-BLW 004E2490 00591100-BLW 00591F90 802428C8-BLW 80241AD4 801ECD78-??? 801EC2F8 801F2728-BLW 801F1CA8 801F28AC-BLW 801F1E2C 8010D020-BLW 8010C5A0 801099C0-BLW 80108F40 00218F90-??? 00219A30 00219260-??? 00219D00 006B1174-BLW 006B1DF0 ujmpi_le
3E 8C13C420-BBW 8C13CF88 8C13FB70-BBW 8C1406F4 8C1504D8-??? 8C1510AC 8C151A98-BBW 8C15266C 8C16CA24-BBW 8C16D5F8 004E15A0-BBW 004E24D0 005910B0-BBW 00591FD0 80242980-BBW 80241AA4 801ECDDC-??? 801EC2C8 801F278C-BBW 801F1C78 801F2910-BBW 801F1DFC 8010D084-BBW 8010C570 80109A24-BBW 80108F10 00218F40-??? 00219A60 00219210-??? 00219D30 006B1144-BBW 006B1E18 jmp_le
3F 8C13C48C-BLW 8C13CFBC 8C13FBDC-BLW 8C140728 8C150544-??? 8C1510E0 8C151B04-BLW 8C1526A0 8C16CA90-BLW 8C16D62C 004E15F0-BLW 004E2510 00591100-BLW 00592010 802428C8-BLW 80241A7C 801ECD78-??? 801EC2A0 801F2728-BLW 801F1C50 801F28AC-BLW 801F1DD4 8010D020-BLW 8010C548 801099C0-BLW 80108EE8 00218F90-??? 00219A90 00219260-??? 00219D60 006B1174-BLW 006B1E44 jmpi_le
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
40 8C13C588-BW* 8C13CFE8 8C13FCD8-BW* 8C140754 8C150640-??? 8C15110C 8C151C00-BW* 8C1526CC 8C16CB8C-BW* 8C16D658 004E16C0-BW* 004E2550 005911D0-BW* 00592050 80242748-BW* 80241A40 801ECC6C-??? 801EC258 801F261C-BW* 801F1C08 801F27A0-BW* 801F1D8C 8010CF14-BW* 8010C500 801098B4-BW* 80108EA0 00219040-??? 00219AC0 00219310-??? 00219D90 006B1274-BW* 006B1E6C switch_jmp
41 8C13C588-BW* 8C13D020 8C13FCD8-BW* 8C14078C 8C150640-??? 8C151144 8C151C00-BW* 8C152704 8C16CB8C-BW* 8C16D690 004E16C0-BW* 004E2590 005911D0-BW* 00592090 80242748-BW* 802419E4 801ECC6C-??? 801EC210 801F261C-BW* 801F1BC0 801F27A0-BW* 801F1D44 8010CF14-BW* 8010C4B8 801098B4-BW* 80108E58 00219040-??? 00219B00 00219310-??? 00219DD0 006B1274-BW* 006B1EB0 switch_call
42 8C13C274-L 8C13D074 8C13F914-L 8C1407E0 8C15027C-??? 8C151198 8C15183C-L 8C152758 8C16C7C8-L 8C16D6E4 004E1390-L 004E1A50 00590EA0-L 00595030 80242DA8-L 802419E0 801ECFD8-??? 801EC1E4 801F2988-B 801F1B94 801F2B0C-B 801F1D18 8010D280-B 8010C48C 80109C20-B 80108E2C 00218E20-??? 00219B50 002190F0-??? 00219E20 006B1040-B 006B1F1C nop_42/stack_push
@@ -584,7 +584,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
4C ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E1054 801F2988-B 801E6F04 801F2B0C-B 801E6FC4 8010D280-B 80102B5C 80109C20-B 800FF4D0 00218E20-??? 002223D0 002190F0-??? 002226C0 006B1040-B 006B8B48 arg_pusha
4D ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECE98-??? 801E1028 801F2848-W 801E6ED8 801F29CC-W 801E6F98 8010D140-W 80102B30 80109AE0-W 800FF4A4 00219100-??? 00222400 002193D0-??? 002226F0 006B10E0-W 006B8B70 arg_pusho
4E ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECC14-??? 801E1008 801F25C4-S 801E6EB8 801F2748-S 801E6F78 8010CEBC-S 80102B10 8010985C-S 800FF484 002190B0-??? 00222430 00219380-??? 00222660 006B12E4-S 006B8AF4 arg_pushs
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
50 8C13C684-LS 8C13D078 8C13FDD4-LS 8C1407E4 8C15073C-??? 8C15119C 8C151CFC-LS 8C15275C 8C16CC88-LS 8C16D6E8 004E1810-LS 004E25F0 00591320-LS 005920F0 80242514-LS 802418E0 801ED020-??? 801EC010 801F29D0-... 801F19C0 801F2B54-... 801F1B44 8010D2C8-... 8010C2B8 80109C68-... 80108C58 00218E00-??? 00219C40 002190D0-??? 00219F10 006B1028-... 006B23F8 message
51 8C13C714-BS 8C13D11C 8C13FE64-BS 8C140888 8C1507CC-??? 8C151270 8C151D8C-BS 8C152868 8C16CD18-BS 8C16D7F4 004E18F0-BS 004E26B0 00591400-BS 005921B0 80242404-BS 80241798 801ED020-??? 801EBED8 801F29D0-... 801F1888 801F2B54-... 801F1A0C 8010D2C8-... 8010C180 80109C68-... 80108B20 00218E00-??? 00219D30 002190D0-??? 0021A000 006B1028-... 006B206C list
52 8C13C19C-() 8C13D258 8C13F83C-() 8C1409C4 8C1501A4-??? 8C1513C0 8C151764-() 8C1529B8 8C16C6F0-() 8C16D948 004E12C0-() 004E27E0 00590DD0-() 005922E0 80242F44-() 8024176C 801ED060-??? 801EBEAC 801F2A10-() 801F185C 801F2B94-() 801F19E0 8010D308-() 8010C154 80109CA8-() 80108AF4 00218DF0-??? 00219FB0 002190C0-??? 0021A280 006B101C-() 006B2250 fadein
@@ -600,7 +600,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
5C 8C13C19C-() 8C13D328 8C13F83C-() 8C140ADC 8C1501A4-??? 8C1515C8 8C151764-() 8C152BF8 8C16C6F0-() 8C16DB88 004E12C0-() 004E29D0 00590DD0-() 005924D0 80242F44-() 80241460 801ED060-??? 801EBBA0 801F2A10-() 801F1550 801F2B94-() 801F16D4 8010D308-() 8010BE48 80109CA8-() 801087E8 00218DF0-??? 0021A260 002190C0-??? 0021A530 006B101C-() 006B24F0 mesend
5D 8C13C1B0-B 8C13DCA0 8C13F850-B 8C1416D8 8C1501B8-??? 8C152418 8C151778-B 8C153AB0 8C16C704-B 8C16EA50 004E12D0-B 004E35F0 00590DE0-B 00593100 80242EF8-B 8023FE3C 801ECFD8-??? 801EA374 801F2988-B 801EFD64 801F2B0C-B 801EFE24 8010D280-B 8010A564 80109C20-B 80106ED8 00218E20-??? 0021B260 002190F0-??? 0021B530 006B1040-B 006B3390 gettime
5E 8C13C19C-() 8C13D3BC 8C13F83C-() 8C140B70 8C1501A4-??? 8C151674 8C151764-() 8C152CD8 8C16C6F0-() 8C16DC68 004E12C0-() 004E2A70 00590DD0-() 00592570 80242F44-() 80241404 801ED060-??? 801EBB58 801F2A10-() 801F1508 801F2B94-() 801F168C 8010D308-() 8010BE00 80109CA8-() 801087A0 00218DF0-??? 0021A310 002190C0-??? 0021A5E0 006B101C-() 006B25B0 winend
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
60 8C13C2BC-LL 8C13D3E0 8C13F95C-LL 8C140BB0 8C1502C4-??? 8C1516CC 8C151884-LL 8C152D64 8C16C810-LL 8C16DCF4 004E13C0-LL 004E2AC0 00590ED0-LL 005925C0 80242D00-LL 802413B0 801ED020-??? 801EBB20 801F29D0-... 801F14D0 801F2B54-... 801F1654 8010D2C8-... 8010BDC8 80109C68-... 80108768 00218E00-??? 0021A370 002190D0-??? 0021A640 006B1028-... 006B25F8 npc_crt
61 8C13C274-L 8C13D7B0 8C13F914-L 8C1410F4 8C15027C-??? 8C151D8C 8C15183C-L 8C153424 8C16C7C8-L 8C16E3B4 004E1390-L 004E2FB0 00590EA0-L 00592AC0 80242DA8-L 80240A70 801ED020-??? 801EB24C 801F29D0-... 801F0BFC 801F2B54-... 801F0D80 8010D2C8-... 8010B494 80109C68-... 80107E34 00218E00-??? 0021A900 002190D0-??? 0021ABD0 006B1028-... 006B9964 npc_stop
62 8C13C274-L 8C13D7BC 8C13F914-L 8C141100 8C15027C-??? 8C151D98 8C15183C-L 8C153430 8C16C7C8-L 8C16E3C0 004E1390-L 004E2FC0 00590EA0-L 00592AD0 80242DA8-L 80240A4C 801ED020-??? 801EB220 801F29D0-... 801F0BD0 801F2B54-... 801F0D54 8010D2C8-... 8010B468 80109C68-... 80107E08 00218E00-??? 0021A910 002190D0-??? 0021ABE0 006B1028-... 006B2CEC npc_play
@@ -615,7 +615,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
6C 8C13C19C-() 8C13DAC4 8C13F83C-() 8C1414F4 8C1501A4-??? 8C1521D4 8C151764-() 8C15386C 8C16C6F0-() 8C16E80C 004E12C0-() 004E33B0 00590DD0-() 00592EC0 80242F44-() 80240218 801ED060-??? 801EA778 801F2A10-() 801F0168 801F2B94-() 801F0228 8010D308-() 8010A968 80109CA8-() 801072DC 00218DF0-??? 0021AF80 002190C0-??? 0021B250 006B101C-() 006B31B0 p_enablewarp
6D 8C13C2BC-LL 8C13D97C 8C13F95C-LL 8C1413A4 8C1502C4-??? 8C15203C 8C151884-LL 8C1536D4 8C16C810-LL 8C16E674 004E13C0-LL 004E3240 00590ED0-LL 00592D50 80242D00-LL 80240434 801ECFD8-??? 801EA9E8 801F2988-B 801F0398 801F2B0C-B 801F0458 8010D280-B 8010ABD8 80109C20-B 8010754C 00218E20-??? 0021ADE0 002190F0-??? 0021B0B0 006B1040-B 006B3030 p_move
6E 8C13C274-L 8C13D8C8 8C13F914-L 8C14120C 8C15027C-??? 8C151EA4 8C15183C-L 8C15353C 8C16C7C8-L 8C16E4CC 004E1390-L 004E30E0 00590EA0-L 00592BF0 80242DA8-L 802407FC 801ED020-??? 801EAFA8 801F29D0-... 801F0958 801F2B54-... 801F0ADC 8010D2C8-... 8010B1F0 80109C68-... 80107B90 00218E00-??? 0021AB10 002190D0-??? 0021ADE0 006B1028-... 006B2DA8 p_look
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
70 8C13C19C-() 8C13DBC4 8C13F83C-() 8C1415FC 8C1501A4-??? 8C1522EC 8C151764-() 8C153984 8C16C6F0-() 8C16E924 004E12C0-() 004E34B0 00590DD0-() 00592FC0 80242F44-() 8024000C 801ED060-??? 801EA544 801F2A10-() 801EFF34 801F2B94-() 801EFFF4 8010D308-() 8010A734 80109CA8-() 801070A8 00218DF0-??? 0021B0C0 002190C0-??? 0021B390 006B101C-() 006B993C p_action_disable
71 8C13C19C-() 8C13DBD0 8C13F83C-() 8C141608 8C1501A4-??? 8C152320 8C151764-() 8C1539B8 8C16C6F0-() 8C16E958 004E12C0-() 004E34D0 00590DD0-() 00592FE0 80242F44-() 8023FFCC 801ED060-??? 801EA504 801F2A10-() 801EFEF4 801F2B94-() 801EFFB4 8010D308-() 8010A6F4 80109CA8-() 80107068 00218DF0-??? 0021B120 002190C0-??? 0021B3F0 006B101C-() 006B32A4 p_action_enable
72 8C13C274-L 8C13D898 8C13F914-L 8C1411DC 8C15027C-??? 8C151E74 8C15183C-L 8C15350C 8C16C7C8-L 8C16E49C 004E1390-L 004E30A0 00590EA0-L 00592BB0 80242DA8-L 80240884 801ED020-??? 801EB040 801F29D0-... 801F09F0 801F2B54-... 801F0B74 8010D2C8-... 8010B288 80109C68-... 80107C28 00218E00-??? 0021AA70 002190D0-??? 0021AD40 006B1028-... 006B2D78 disable_movement1
@@ -632,7 +632,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
7D 8C13C2BC-LL 8C13D4F4 8C13F95C-LL 8C140CD8 8C1502C4-??? 8C151970 8C151884-LL 8C153008 8C16C810-LL 8C16DF98 004E13C0-LL 004E2CC0 00590ED0-LL 005927C0 80242D00-LL 80240E8C 801ECFD8-??? 801EB630 801F2988-B 801F0FE0 801F2B0C-B 801F1164 8010D280-B 8010B8A8 80109C20-B 80108248 00218E20-??? 0021A5C0 002190F0-??? 0021A890 006B1040-B 006B2868 npc_crptalk
7E 8C13C2BC-LL 8C13D970 8C13F95C-LL 8C141398 8C1502C4-??? 8C152030 8C151884-LL 8C1536C8 8C16C810-LL 8C16E668 004E13C0-LL 004E3230 00590ED0-LL 00592D40 80242D00-LL 80240510 801ED020-??? 801EAACC 801F29D0-... 801F047C 801F2B54-... 801F053C 8010D2C8-... 8010ACBC 80109C68-... 80107630 00218E00-??? 0021ADC0 002190D0-??? 0021B090 006B1028-... 006B3014 p_look_at
7F 8C13C2BC-LL 8C13D6F4 8C13F95C-LL 8C141038 8C1502C4-??? 8C151CD0 8C151884-LL 8C153368 8C16C810-LL 8C16E2F8 004E13C0-LL 004E2F30 00590ED0-LL 00592A40 80242D00-LL 80240A94 801ECFD8-??? 801EB278 801F2988-B 801F0C28 801F2B0C-B 801F0DAC 8010D280-B 8010B4C0 80109C20-B 80107E60 00218E20-??? 0021A880 002190F0-??? 0021AB50 006B1040-B 006B2C38 npc_crp_id
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
80 8C13C19C-() 8C13D7C8 8C13F83C-() 8C14110C 8C1501A4-??? 8C151DA4 8C151764-() 8C15343C 8C16C6F0-() 8C16E3CC 004E12C0-() 004E2FD0 00590DD0-() 00592AE0 80242F44-() 80240A28 801ED060-??? 801EB1FC 801F2A10-() 801F0BAC 801F2B94-() 801F0D30 8010D308-() 8010B444 80109CA8-() 80107DE4 00218DF0-??? 0021A920 002190C0-??? 0021ABF0 006B101C-() 006B2CFC cam_quake
81 8C13C19C-() 8C13D868 8C13F83C-() 8C1411AC 8C1501A4-??? 8C151E44 8C151764-() 8C1534DC 8C16C6F0-() 8C16E46C 004E12C0-() 004E3060 00590DD0-() 00592B70 80242F44-() 8024090C 801ED060-??? 801EB0D8 801F2A10-() 801F0A88 801F2B94-() 801F0C0C 8010D308-() 8010B320 80109CA8-() 80107CC0 00218DF0-??? 0021A9F0 002190C0-??? 0021ACC0 006B101C-() 006B2D50 cam_adj
82 8C13C19C-() 8C13D7D4 8C13F83C-() 8C141118 8C1501A4-??? 8C151DB0 8C151764-() 8C153448 8C16C6F0-() 8C16E3D8 004E12C0-() 004E2FE0 00590DD0-() 00592AF0 80242F44-() 80240A08 801ED060-??? 801EB1DC 801F2A10-() 801F0B8C 801F2B94-() 801F0D10 8010D308-() 8010B424 80109CA8-() 80107DC4 00218DF0-??? 0021A950 002190C0-??? 0021AC20 006B101C-() 006B2D08 cam_zmin
@@ -649,7 +649,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
8D 8C13C1B0-B 8C13DD9C 8C13F850-B 8C1417D4 8C1501B8-??? 8C152514 8C151778-B 8C153BAC 8C16C704-B 8C16EB4C 004E12D0-B 004E36F0 00590DE0-B 00593210 80242EF8-B 8023FC1C 801ECFD8-??? 801EA1A4 801F2988-B 801EFB94 801F2B0C-B 801EFC54 8010D280-B 8010A394 80109C20-B 80106D08 00218E20-??? 0021B330 002190F0-??? 0021B600 006B1040-B 006B34BC at_coords_talk
8E 8C13C1B0-B 8C13DE5C 8C13F850-B 8C141894 8C1501B8-??? 8C1525D4 8C151778-B 8C153C6C 8C16C704-B 8C16EC0C 004E12D0-B 004E37B0 00590DE0-B 005932E0 80242EF8-B 8023FB0C 801ECFD8-??? 801EA0BC 801F2988-B 801EFAAC 801F2B0C-B 801EFB6C 8010D280-B 8010A2AC 80109C20-B 80106C20 00218E20-??? 0021B3C0 002190F0-??? 0021B690 006B1040-B 006B3528 col_npcin
8F 8C13C1B0-B 8C13DF1C 8C13F850-B 8C141954 8C1501B8-??? 8C152694 8C151778-B 8C153D2C 8C16C704-B 8C16ECCC 004E12D0-B 004E3870 00590DE0-B 005933B0 80242EF8-B 8023F9D8 801ECFD8-??? 801E9FAC 801F2988-B 801EF99C 801F2B0C-B 801EFA5C 8010D280-B 8010A19C 80109C20-B 80106B10 00218E20-??? 0021B450 002190F0-??? 0021B720 006B1040-B 006B3594 col_npcinr
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
90 8C13C274-L 8C13E2F0 8C13F914-L 8C141E8C 8C15027C-??? 8C152C5C 8C15183C-L 8C1542F4 8C16C7C8-L 8C16F280 004E1390-L 004E3DD0 00590EA0-L 00593940 80242DA8-L 8023F288 801ED020-??? 801E98AC 801F29D0-... 801EF29C 801F2B54-... 801EF35C 8010D2C8-... 80109A9C 80109C68-... 80106410 00218E00-??? 0021BA50 002190D0-??? 0021BD20 006B1028-... 006B39F0 switch_on
91 8C13C274-L 8C13E2FC 8C13F914-L 8C141E98 8C15027C-??? 8C152C68 8C15183C-L 8C154300 8C16C7C8-L 8C16F28C 004E1390-L 004E3DE0 00590EA0-L 00593950 80242DA8-L 8023F264 801ED020-??? 801E9880 801F29D0-... 801EF270 801F2B54-... 801EF330 8010D2C8-... 80109A70 80109C68-... 801063E4 00218E00-??? 0021BA60 002190D0-??? 0021BD30 006B1028-... 006B3A00 switch_off
92 8C13C274-L 8C13E308 8C13F914-L 8C141EA4 8C15027C-??? 8C152C74 8C15183C-L 8C15430C 8C16C7C8-L 8C16F298 004E1390-L 004E3DF0 00590EA0-L 00593960 80242DA8-L 8023F244 801ED020-??? 801E9854 801F29D0-... 801EF244 801F2B54-... 801EF304 8010D2C8-... 80109A44 80109C68-... 801063B8 00218E00-??? 0021BA70 002190D0-??? 0021BD40 006B1028-... 006B3A10 playbgm_epi
@@ -662,7 +662,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
99 8C13C19C-() 8C13E0FC 8C13F83C-() 8C141C80 8C1501A4-??? 8C1529D8 8C151764-() 8C154070 8C16C6F0-() 8C16F010 004E12C0-() 004E3BD0 00590DD0-() 00593730 80242F44-() 8023F630 801ED060-??? 801E9C48 801F2A10-() 801EF638 801F2B94-() 801EF6F8 8010D308-() 80109E38 80109CA8-() 801067AC 00218DF0-??? 0021B730 002190C0-??? 0021BA00 006B101C-() 006B3770 hud_show
9A 8C13C19C-() 8C13E130 8C13F83C-() 8C141CB4 8C1501A4-??? 8C152A1C 8C151764-() 8C1540B4 8C16C6F0-() 8C16F054 004E12C0-() 004E3C00 00590DD0-() 00593760 80242F44-() 8023F60C 801ED060-??? 801E9C24 801F2A10-() 801EF614 801F2B94-() 801EF6D4 8010D308-() 80109E14 80109CA8-() 80106788 00218DF0-??? 0021B780 002190C0-??? 0021BA50 006B101C-() 006B3784 cine_enable
9B 8C13C19C-() 8C13E13C 8C13F83C-() 8C141CC0 8C1501A4-??? 8C152A28 8C151764-() 8C1540C0 8C16C6F0-() 8C16F060 004E12C0-() 004E3C10 00590DD0-() 00593770 80242F44-() 8023F5E8 801ED060-??? 801E9C00 801F2A10-() 801EF5F0 801F2B94-() 801EF6B0 8010D308-() 80109DF0 80109CA8-() 80106764 00218DF0-??? 0021B7B0 002190C0-??? 0021BA80 006B101C-() 006B3790 cine_disable
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
A0 8C13C684-LS 8C13E148 8C13FDD4-LS 8C141CCC 8C15073C-??? 8C152A34 8C151CFC-LS 8C1540CC 8C16CC88-LS 8C16F06C 004E1810-LS 004E3C20 00591320-LS 00593780 80242514-LS 8023F544 801ED020-??? 801E9B50 801F29D0-... 801EF540 801F2B54-... 801EF600 8010D2C8-... 80109D40 80109C68-... 801066B4 00218E00-??? 0021B7E0 002190D0-??? 0021BAB0 006B1028-... 006B379C nop_A0_debug
A1 8C13C274-L 8C13E338 8C13F914-L 8C141ED4 8C15027C-??? 8C152D48 8C15183C-L 8C1543E0 8C16C7C8-L 8C16F38C 004E1390-L 004E3EB0 00590EA0-L 00593A40 80242DA8-L 8023F058 801ECE98-??? 801E95F8 801F2848-W 801EEFF0 801F29CC-W 801EF0B0 8010D140-W 801097E8 80109AE0-W 8010615C 00219100-??? 0021BC20 002193D0-??? 0021BEF0 006B10E0-W 006B9930 set_qt_failure
A2 8C13C274-L 8C13E344 8C13F914-L 8C141EE0 8C15027C-??? 8C152D54 8C15183C-L 8C1543EC 8C16C7C8-L 8C16F398 004E1390-L 004E3EC0 00590EA0-L 00593A50 80242DA8-L 8023F048 801ECE98-??? 801E95D4 801F2848-W 801EEFCC 801F29CC-W 801EF08C 8010D140-W 801097C4 80109AE0-W 80106138 00219100-??? 0021BC30 002193D0-??? 0021BF00 006B10E0-W 006B3ADC set_qt_success
@@ -671,7 +671,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
A5 8C13C274-L 8C13E350 8C13F914-L 8C141EEC 8C15027C-??? 8C152D60 8C15183C-L 8C1543F8 8C16C7C8-L 8C16F3A4 004E1390-L 004E3ED0 00590EA0-L 00593A60 80242DA8-L 8023F038 801ECE98-??? 801E95B0 801F2848-W 801EEFA8 801F29CC-W 801EF068 8010D140-W 801097A0 80109AE0-W 80106114 00219100-??? 0021BC40 002193D0-??? 0021BF10 006B10E0-W 006B3AE8 set_qt_cancel
A6 8C13C19C-() 8C13E36C 8C13F83C-() 8C141F08 8C1501A4-??? 8C152D84 8C151764-() 8C15441C 8C16C6F0-() 8C16F3C8 004E12C0-() 004E3F00 00590DD0-() 00593A90 80242F44-() 8023F000 801ED060-??? 801E9518 801F2A10-() 801EEF3C 801F2B94-() 801EEFFC 8010D308-() 80109708 80109CA8-() 8010607C 00218DF0-??? 0021BC70 002190C0-??? 0021BF40 006B101C-() 006B3B00 clr_qt_cancel
A8 8C13C2BC-LL 8C13D8D4 8C13F95C-LL 8C141218 8C1502C4-??? 8C151EB0 8C151884-LL 8C153548 8C16C810-LL 8C16E4D8 004E13C0-LL 004E30F0 00590ED0-LL 00592C00 80242D00-LL 802406B8 801ECFD8-??? 801EAEB8 801F2988-B 801F0868 801F2B0C-B 801F09EC 8010D280-B 8010B100 80109C20-B 80107AA0 00218E20-??? 0021AB20 002190F0-??? 0021ADF0 006B1040-B 006B2DB8 pl_walk
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
B0 8C13C2BC-LL 8C13E370 8C13F95C-LL 8C141F0C 8C1502C4-??? 8C152D90 8C151884-LL 8C154428 8C16C810-LL 8C16F3D4 004E13C0-LL 004E3F10 00590ED0-LL 00593AA0 80242D00-LL 8023EFC4 801ED020-??? 801E94D0 801F29D0-... 801EEEF4 801F2B54-... 801EEFB4 8010D2C8-... 801096C0 80109C68-... 80106034 00218E00-??? 0021BC80 002190D0-??? 0021BF50 006B1028-... 006B3B0C pl_add_meseta
B1 8C13C378-W 8C13C888 8C13FAC8-W 8C13FFD8 8C150430-??? 8C150940 8C1519F0-W 8C151F00 8C16C97C-W 8C16CE8C 004E1530-W 004E1AD0 00591040-W 005915D0 80242A98-W 80242260 801ECE98-??? 801ECAC0 801F2848-W 801F2470 801F29CC-W 801F25F4 8010D140-W 8010CD68 80109AE0-W 80109708 00219100-??? 00219200 002193D0-??? 002194D0 006B10E0-W 006B16FC thread_stg
B2 8C13C1B0-B 8C13E398 8C13F850-B 8C141F34 8C1501B8-??? 8C152DE8 8C151778-B 8C154480 8C16C704-B 8C16F42C 004E12D0-B 004E3F50 00590DE0-B 00593AE0 80242EF8-B 8023EF58 801ECFD8-??? 801E9460 801F2988-B 801EEE84 801F2B0C-B 801EEF44 8010D280-B 80109650 80109C20-B 80105FC4 00218E20-??? 0021BD20 002190F0-??? 0021BFF0 006B1040-B 006B3BA4 del_obj_param
@@ -685,7 +685,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
BA ------------ -------- 8C13F914-L 8C14268C 8C15027C-??? 8C15360C 8C15183C-L 8C154CA4 8C16C7C8-L 8C16FCC0 004E1390-L 004E4B40 00590EA0-L 005946D0 80242DA8-L 8023E518 801ECE98-??? 801E8A00 801F2848-W 801EE43C 801F29CC-W 801EE4FC 8010D140-W 80108BF0 80109AE0-W 80105564 00219100-??? 0021C730 002193D0-??? 0021CA00 006B10E0-W 006B9918 set_qt_exit
BB ------------ -------- 8C13F83C-() 8C142698 8C1501A4-??? 8C153618 8C151764-() 8C154CB0 8C16C6F0-() 8C16FCCC 004E12C0-() 004E4B50 00590DD0-() 005946E0 80242F44-() 8023E504 801ED060-??? 801E89CC 801F2A10-() 801EE418 801F2B94-() 801EE4D8 8010D308-() 80108BBC 80109CA8-() 80105530 00218DF0-??? 0021C740 002190C0-??? 0021CA10 006B101C-() 006B990C clr_qt_exit
BC ------------ -------- 8C13FD6C-S 8C1426A4 8C1506D4-??? 8C153624 8C151C94-S 8C154CBC 8C16CC20-S 8C16FCD8 004E1740-S 004E1A50 00591250-S 00595030 80242648-S 8023E500 801ECC14-??? 801E89C8 801F25C4-S 801EE414 801F2748-S 801EE4D4 8010CEBC-S 80108BB8 8010985C-S 8010552C 002190B0-??? 002C9010 00219380-??? 002F76A0 006B12E4-S 0061CDB0 nop_BC
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
C0 ------------ -------- 8C13F95C-LL 8C1412B4 8C1502C4-??? 8C151F4C 8C151884-LL 8C1535E4 8C16C810-LL 8C16E584 004E13C0-LL 004E3170 00590ED0-LL 00592C80 80242D00-LL 80240600 801ECFD8-??? 801EAD78 801F2988-B 801F0728 801F2B0C-B 801F08AC 8010D280-B 8010AFC0 80109C20-B 80107960 00218E20-??? 0021AC10 002190F0-??? 0021AEE0 006B1040-B 006B2EA8 particle
C1 ------------ -------- 8C13FDD4-LS 8C141D5C 8C15073C-??? 8C152AC4 8C151CFC-LS 8C15415C 8C16CC88-LS 8C16F108 004E1810-LS 004E3CA0 00591320-LS 00593810 80242514-LS 8023F524 801ED020-??? 801E9B20 801F29D0-... 801EF510 801F2B54-... 801EF5D0 8010D2C8-... 80109D10 80109C68-... 80106684 00218E00-??? 0021B8A0 002190D0-??? 0021BB70 006B1028-... 006B3898 npc_text
C2 ------------ -------- 8C13F83C-() 8C141C34 8C1501A4-??? 8C152974 8C151764-() 8C15400C 8C16C6F0-() 8C16EFAC 004E12C0-() 004E3B70 00590DD0-() 005936D0 80242F44-() 8023F6C0 801ED060-??? 801E9CD8 801F2A10-() 801EF6C8 801F2B94-() 801EF788 8010D308-() 80109EC8 80109CA8-() 8010683C 00218DF0-??? 0021B6A0 002190C0-??? 0021B970 006B101C-() 006B3744 npc_chkwarp
@@ -702,7 +702,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
CD ------------ -------- 8C13F95C-LL 8C14131C 8C1502C4-??? 8C151FB4 8C151884-LL 8C15364C 8C16C810-LL 8C16E5EC 004E13C0-LL 004E31C0 00590ED0-LL 00592CD0 80242D00-LL 80240538 801ECFD8-??? 801EABDC 801F2988-B 801F058C 801F2B0C-B 801F0710 8010D280-B 8010AE24 80109C20-B 801077C4 00218E20-??? 0021ACD0 002190F0-??? 0021AFA0 006B1040-B 006B2F38 particle_id
CE ------------ -------- 8C13F95C-LL 8C140E2C 8C1502C4-??? 8C151AC4 8C151884-LL 8C15315C 8C16C810-LL 8C16E0EC 004E13C0-LL 004E2DB0 00590ED0-LL 005928C0 80242D00-LL 80240CD4 801ECFD8-??? 801EB498 801F2988-B 801F0E48 801F2B0C-B 801F0FCC 8010D280-B 8010B6E0 80109C20-B 80108080 00218E20-??? 0021A6D0 002190F0-??? 0021A9A0 006B1040-B 006B29F4 npc_crptalk_id
CF ------------ -------- 8C13F83C-() 8C141D68 8C1501A4-??? 8C152B38 8C151764-() 8C1541D0 8C16C6F0-() 8C16F17C 004E12C0-() 004E3CF0 00590DD0-() 00593860 80242F44-() 8023F464 801ED060-??? 801E9AB0 801F2A10-() 801EF4A0 801F2B94-() 801EF560 8010D308-() 80109CA0 80109CA8-() 80106614 00218DF0-??? 0021B900 002190C0-??? 0021BBD0 006B101C-() 006B3918 npc_lang_clean
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
D0 ------------ -------- ------------ -------- 8C1501A4-??? 8C15298C 8C151764-() 8C154024 8C16C6F0-() 8C16EFC4 004E12C0-() 004E3B90 00590DD0-() 005936F0 80242F44-() 8023F680 801ED060-??? 801E9C98 801F2A10-() 801EF688 801F2B94-() 801EF748 8010D308-() 80109E88 80109CA8-() 801067FC 00218DF0-??? 0021B6D0 002190C0-??? 0021B9A0 006B101C-() 006B3754 pl_pkon
D1 ------------ -------- ------------ -------- 8C1501E4-??? 8C1533A0 8C1517A4-BB 8C154A38 8C16C730-BB 8C16FA44 004E1300-BB 004E4840 00590E10-BB 005943D0 80242EA0-BB 8023E778 801ECF80-??? 801E8C98 801F2930-BB 801EE6BC 801F2AB4-BB 801EE77C 8010D228-BB 80108E88 80109BC8-BB 801057FC 00218E50-??? 0021C3F0 00219120-??? 0021C6C0 006B1058-BB 006B41EC pl_chk_item2
D2 ------------ -------- ------------ -------- 8C1501A4-??? 8C153628 8C151764-() 8C154CC0 8C16C6F0-() 8C16FCDC 004E12C0-() 004E4B60 00590DD0-() 005946F0 80242F44-() 8023E4DC 801ED060-??? 801E89A4 801F2A10-() 801EE3F0 801F2B94-() 801EE4B0 8010D308-() 80108B94 80109CA8-() 80105508 00218DF0-??? 0021C750 002190C0-??? 0021CA20 006B101C-() 006B4448 enable_mainmenu
@@ -719,7 +719,7 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
DD ------------ -------- ------------ -------- 8C1501A4-??? 8C152B04 8C151764-() 8C15419C 8C16C6F0-() 8C16F148 004E12C0-() 004E3CD0 00590DD0-() 00593840 80242F44-() 8023F484 801ED060-??? 801E9AD0 801F2A10-() 801EF4C0 801F2B94-() 801EF580 8010D308-() 80109CC0 80109CA8-() 80106634 00218DF0-??? 0021B8E0 002190C0-??? 0021BBB0 006B101C-() 006B38E4 load_midi
DE ------------ -------- ------------ -------- 8C1501B8-??? 8C1537D8 8C151778-B 8C154E70 8C16C704-B 8C16FF24 004E12D0-B 004E4D70 00590DE0-B 00594900 80242EF8-B 8023E06C 801ECFD8-??? 801E8524 801F2988-B 801EDFFC 801F2B0C-B 801EE0BC 8010D280-B 80108714 80109C20-B 80105088 00218E20-??? 0021CA30 002190F0-??? 0021CD00 006B1040-B 006B45C8 item_detect_bank
DF ------------ -------- ------------ -------- 8C1502C4-??? 8C151700 8C151884-LL 8C152D98 8C16C810-LL 8C16DD28 004E13C0-LL 004E2AF0 00590ED0-LL 005925F0 80242D00-LL 802411BC 801ED020-??? 801EB91C 801F29D0-... 801F12CC 801F2B54-... 801F1450 8010D2C8-... 8010BBC4 80109C68-... 80108564 00218E00-??? 0021A3A0 002190D0-??? 0021A670 006B1028-... 006B2640 npc_param
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
E0 ------------ -------- ------------ -------- 8C1501A4-??? 8C15386C 8C151764-() 8C154F04 8C16C6F0-() 8C16FFB8 004E12C0-() 004E4E50 00590DD0-() 005949E0 80242F44-() 8023E04C 801ED060-??? 801E8504 801F2A10-() 801EDFDC 801F2B94-() 801EE09C 8010D308-() 80108710 80109CA8-() 80105084 00218DF0-??? 0021CAD0 002190C0-??? 0021CDA0 006B101C-() 006B4660 pad_dragon
E1 ------------ -------- ------------ -------- 8C15027C-??? 8C152C98 8C15183C-L 8C154330 8C16C7C8-L 8C16F2D0 004E1390-L 004E3E10 00590EA0-L 005939A0 80242DA8-L 8023F1D4 801ED020-??? 801E97B4 801F29D0-... 801EF1AC 801F2B54-... 801EF26C 8010D2C8-... 801099A4 80109C68-... 80106318 00218E00-??? 0021BB00 002190D0-??? 0021BDD0 006B1028-... 006B3A48 clear_mainwarp
E2 ------------ -------- ------------ -------- 8C15027C-??? 8C152CA4 8C15183C-L 8C15433C 8C16C7C8-L 8C16F2E8 004E1390-L 004E3E30 00590EA0-L 005939C0 80242DA8-L 8023F0A4 801ECFD8-??? 801E967C 801F2988-B 801EF074 801F2B0C-B 801EF134 8010D280-B 8010986C 80109C20-B 801061E0 00218E20-??? 0021BB40 002190F0-??? 0021BE10 006B1040-B 006B3A60 pcam_param
@@ -736,11 +736,11 @@ Quest opcode handlers (format: GET_ARGS EXEC_FUN)
ED ------------ -------- ------------ -------- 8C1501A4-??? 8C153944 8C151764-() 8C154FDC 8C16C6F0-() 8C170094 004E12C0-() 004E4F70 00590DD0-() 00594B00 80242F44-() 8023DEA8 801ED060-??? 801E838C 801F2A10-() 801EDE70 801F2B94-() 801EDF30 8010D308-() 80108598 80109CA8-() 80104F0C 00218DF0-??? 0021CC40 002190C0-??? 0021CF10 006B101C-() 006B473C create_bgmctrl
EE ------------ -------- ------------ -------- 8C15027C-??? 8C152DB8 8C15183C-L 8C154450 8C16C7C8-L 8C16F3FC 004E1390-L 004E3F30 00590EA0-L 00593AC0 80242DA8-L 8023EF84 801ED020-??? 801E948C 801F29D0-... 801EEEB0 801F2B54-... 801EEF70 8010D2C8-... 8010967C 80109C68-... 80105FF0 00218E00-??? 0021BCD0 002190D0-??? 0021BFA0 006B1028-... 006B3B64 pl_add_meseta2
EF ------------ -------- ------------ -------- 8C1502C4-??? 8C153758 8C151884-LL 8C154DF0 8C16C810-LL 8C16FE0C 004E13C0-LL 004E4C60 00590ED0-LL 005947F0 80242D00-LL 8023E308 801ED020-??? 801E8798 801F29D0-... 801EE270 801F2B54-... 801EE330 8010D2C8-... 80108988 80109C68-... 801052FC 00218E00-??? 0021C880 002190D0-??? 0021CB50 006B1028-... 006B44E0 sync_register2
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F0 ------------ -------- ------------ -------- 8C1502C4-??? 8C15378C 8C151884-LL 8C154E24 8C16C810-LL 8C16FE40 004E13C0-LL 004E4CA0 00590ED0-LL 00594830 80242D00-LL 8023E2C0 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- send_regwork
F1 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C16FE74 004E1390-L 004E4CE0 00590EA0-L 00594870 80242DA8-L 8023E1B8 801ECFD8-??? 801E8688 801F2988-B 801EE160 801F2B0C-B 801EE220 8010D280-B 80108878 80109C20-B 801051EC 00218E20-??? 0021C8F0 002190F0-??? 0021CBC0 006B1040-B 006B450C leti_fixed_camera
F2 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C16FF00 004E12C0-() 004E4D40 00590DD0-() 005948D0 80242F44-() 8023E198 801ED060-??? 801E8650 801F2A10-() 801EE128 801F2B94-() 801EE1E8 8010D308-() 80108840 80109CA8-() 801051B4 00218DF0-??? 0021C990 002190C0-??? 0021CC60 006B101C-() 006B4574 default_camera_pos1
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F800 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C1700C4 004E12C0-() 004E4F90 00590DD0-() 00594B20 80242F44-() 8023DE60 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- debug_F800
F801 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16CD18-BS 8C171E3C 004E18F0-BS 004E1A50 00591400-BS 00596AE0 80242404-BS 8023B008 801ED020-??? 801E4EE0 801F29D0-... 801EAC18 801F2B54-... 801EACD8 8010D2C8-... 801063AC 80109C68-... 80102D20 00218E00-??? 0021F130 002190D0-??? 0021F400 006B1028-... 006B6448 set_chat_callback
F808 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1700F4 004E12D0-B 004E4FB0 00590DE0-B 00594B40 80242EF8-B 8023DE34 801ECFD8-??? 801E8360 801F2988-B 801EDE44 801F2B0C-B 801EDF04 8010D280-B 8010856C 80109C20-B 80104EE0 00218E20-??? 0021CCA0 002190F0-??? 0021CF70 006B1040-B 006B47AC get_difficulty_level_v2
@@ -751,7 +751,7 @@ F80C ------------ -------- ------------ -------- ------------ -------- -----
F80D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1701C4 004E12D0-B 004E50C0 00590DE0-B 00594C50 80242EF8-B 8023DCE0 801ECFD8-??? 801E81D0 801F2988-B 801EDCBC 801F2B0C-B 801EDD7C 8010D280-B 801083DC 80109C20-B 80104D50 00218E20-??? 0021CD90 002190F0-??? 0021D060 006B1040-B 006B48C0 map_designate_ex
F80E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C17020C 004E1390-L 004E5130 00590EA0-L 00594CC0 80242DA8-L 8023DCB4 801ED020-??? 801E8198 801F29D0-... 801EDC84 801F2B54-... 801EDD44 8010D2C8-... 801083A4 80109C68-... 80104D18 00218E00-??? 0021CDE0 002190D0-??? 0021D0B0 006B1028-... 006B4964 disable_weapon_drop
F80F ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170230 004E1390-L 004E5150 00590EA0-L 00594CE0 80242DA8-L 8023DC88 801ED020-??? 801E8160 801F29D0-... 801EDC4C 801F2B54-... 801EDD0C 8010D2C8-... 8010836C 80109C68-... 80104CE0 00218E00-??? 0021CE10 002190D0-??? 0021D0E0 006B1028-... 006B497C enable_weapon_drop
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F810 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170254 004E1390-L 004E5170 00590EA0-L 00594D00 80242DA8-L 8023DC08 801ED020-??? 801E80EC 801F29D0-... 801EDBD8 801F2B54-... 801EDC98 8010D2C8-... 801082F8 80109C68-... 80104C6C 00218E00-??? 0021CE40 002190D0-??? 0021D110 006B1028-... 006B4994 ba_initial_floor
F811 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C17029C 004E12C0-() 004E5250 00590DD0-() 00594DE0 80242F44-() 8023DBD8 801ED060-??? 801E80BC 801F2A10-() 801EDBA8 801F2B94-() 801EDC68 8010D308-() 801082C8 80109CA8-() 80104C3C 00218DF0-??? 0021CF20 002190C0-??? 0021D1F0 006B101C-() 006B98E4 set_ba_rules
F812 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C1702B0 004E1390-L 004E5270 00590EA0-L 00594E00 80242DA8-L 8023DB9C 801ED020-??? 801E8078 801F29D0-... 801EDB64 801F2B54-... 801EDC24 8010D2C8-... 80108284 80109C68-... 80104BF8 00218E00-??? 0021CF40 002190D0-??? 0021D210 006B1028-... 006B4A70 ba_set_tech_disk_mode
@@ -767,7 +767,7 @@ F81B ------------ -------- ------------ -------- ------------ -------- -----
F81C ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16CC20-S 8C170418 004E1740-S 004E1A50 00591250-S 00594F40 80242648-S 8023D92C 801ED020-??? 801E7D8C 801F29D0-... 801ED878 801F2B54-... 801ED938 8010D2C8-... 80107FF0 80109C68-... 80104964 00218E00-??? 0021D080 002190D0-??? 0021D350 006B1028-... 006B4BB4 ba_start
F81D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170C48 004E1390-L 004E5CB0 00590EA0-L 00595870 80242DA8-L 8023C994 801ED020-??? 801E6D48 801F29D0-... 801EC87C 801F2B54-... 801EC93C 8010D2C8-... 801078A4 80109C68-... 80104218 00218E00-??? 0021DA30 002190D0-??? 0021DD00 006B1028-... 006B52EC death_lvl_up
F81E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170C54 004E1390-L 004E5CC0 00590EA0-L 00595880 80242DA8-L 8023C96C 801ED020-??? 801E6D18 801F29D0-... 801EC84C 801F2B54-... 801EC90C 8010D2C8-... 80107874 80109C68-... 801041E8 00218E00-??? 0021DA40 002190D0-??? 0021DD10 006B1028-... 006B52F8 ba_set_meseta_drop_mode
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F820 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C17042C 004E1390-L 004E53B0 00590EA0-L 00594F60 80242DA8-L 8023D8C4 801ED020-??? 801E7D0C 801F29D0-... 801ED7F8 801F2B54-... 801ED8B8 8010D2C8-... 80107FEC 80109C68-... 80104960 00218E00-??? 0021D0C0 002190D0-??? 0021D390 006B1028-... 006B4BC8 cmode_stage
F821 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170450 004E12D0-B 004E53D0 00590DE0-B 00594F80 80242EF8-B 8023D824 801ECFD8-??? 801E7C00 801F2988-B 801ED6FC 801F2B0C-B 801ED7BC 8010D280-B 80107FE8 80109C20-B 8010495C 00218E20-??? 0021D120 002190F0-??? 0021D3F0 006B1040-B 006B4BF4 nop_F821
F822 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1704C8 004E12D0-B 004E1A50 00590DE0-B 00595030 80242EF8-B 8023D820 801ECFD8-??? 801E7B98 801F2988-B 801ED6A4 801F2B0C-B 801ED764 8010D280-B 80107FE4 80109C20-B 80104958 00218E20-??? 002C9010 002190F0-??? 002F76A0 006B1040-B 0061CDB0 nop_F822
@@ -783,7 +783,7 @@ F82B ------------ -------- ------------ -------- ------------ -------- -----
F82C ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C810-LL 8C1706E0 004E13C0-LL 004E56C0 00590ED0-LL 00595280 80242D00-LL 8023D38C 801ED020-??? 801E772C 801F29D0-... 801ED240 801F2B54-... 801ED300 8010D2C8-... 80107DB4 80109C68-... 80104728 00218E00-??? 0021D480 002190D0-??? 0021D750 006B1028-... 006B4E30 lock_door2
F82D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170724 004E12D0-B 004E5710 00590DE0-B 005952D0 80242EF8-B 8023D33C 801ECFD8-??? 801E76DC 801F2988-B 801ED1F0 801F2B0C-B 801ED2B0 8010D280-B 80107D64 80109C20-B 801046D8 00218E20-??? 0021D500 002190F0-??? 0021D7D0 006B1040-B 006B4E7C if_switch_not_pressed
F82E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170758 004E12D0-B 004E5740 00590DE0-B 00595300 80242EF8-B 8023D2E8 801ECFD8-??? 801E7688 801F2988-B 801ED19C 801F2B0C-B 801ED25C 8010D280-B 80107D10 80109C20-B 80104684 00218E20-??? 0021D530 002190F0-??? 0021D800 006B1040-B 006B4EA4 if_switch_pressed
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F830 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C17056C 004E12D0-B 004E5530 00590DE0-B 005950F0 80242EF8-B 8023D5F8 801ECFD8-??? 801E7960 801F2988-B 801ED46C 801F2B0C-B 801ED52C 8010D280-B 80107FCC 80109C20-B 80104940 00218E20-??? 0021D2B0 002190F0-??? 0021D580 006B1040-B 006B4CE8 control_dragon
F831 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C170584 004E12C0-() 004E5550 00590DD0-() 00595110 80242F44-() 8023D5D8 801ED060-??? 801E7940 801F2A10-() 801ED44C 801F2B94-() 801ED50C 8010D308-() 80107FC8 80109CA8-() 8010493C 00218DF0-??? 0021D2E0 002190C0-??? 0021D5B0 006B101C-() 006B4D00 release_dragon
F838 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C17078C 004E12D0-B 004E5780 00590DE0-B 00595340 80242EF8-B 8023D2A0 801ECFD8-??? 801E7638 801F2988-B 801ED14C 801F2B0C-B 801ED20C 8010D280-B 80107CC0 80109C20-B 80104634 00218E20-??? 0021D560 002190F0-??? 0021D830 006B1040-B 006B4ED4 shrink
@@ -793,7 +793,7 @@ F83B ------------ -------- ------------ -------- ------------ -------- -----
F83C ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170990 004E12D0-B 004E5980 00590DE0-B 00595540 80242EF8-B 8023CF34 801ECFD8-??? 801E7338 801F2988-B 801ECE6C 801F2B0C-B 801ECF2C 8010D280-B 80107A14 80109C20-B 80104388 00218E20-??? 0021D750 002190F0-??? 0021DA20 006B1040-B 006B50D8 display_clock2
F83D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170C70 004E1390-L 004E5CE0 00590EA0-L 005958A0 80242DA8-L 8023C964 801ED020-??? 801E6CE4 801F29D0-... 801EC820 801F2B54-... 801EC8E0 8010D2C8-... 80107840 80109C68-... 801041B4 00218E00-??? 0021DA60 002190D0-??? 0021DD30 006B1028-... 006B5314 set_area_total
F83E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170C7C 004E1390-L 004E5CF0 00590EA0-L 005958B0 80242DA8-L 8023C95C 801ED020-??? 801E6CB0 801F29D0-... 801EC7F4 801F2B54-... 801EC8B4 8010D2C8-... 8010780C 80109C68-... 80104180 00218E00-??? 0021DA70 002190D0-??? 0021DD40 006B1028-... 006B5320 delete_area_title
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F840 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C17094C 004E12C0-() 004E5940 00590DD0-() 00595500 80242F44-() 8023D088 801ED060-??? 801E73C8 801F2A10-() 801ECEFC 801F2B94-() 801ECFBC 8010D308-() 80107A50 80109CA8-() 801043C4 00218DF0-??? 0021D710 002190C0-??? 0021D9E0 006B101C-() 006B98B8 load_npc_data
F841 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C97C-W 8C170958 004E1530-W 004E5950 00591040-W 00595510 80242A98-W 8023CF8C 801ECE98-??? 801E7390 801F2848-W 801ECEC4 801F29CC-W 801ECF84 8010D140-W 80107A18 80109AE0-W 8010438C 00219100-??? 0021D720 002193D0-??? 0021D9F0 006B10E0-W 006B5014 get_npc_data
F848 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1709A8 004E12D0-B 004E59A0 00590DE0-B 00595560 80242EF8-B 8023CEB4 801ECFD8-??? 801E72B4 801F2988-B 801ECDE8 801F2B0C-B 801ECEA8 8010D280-B 80107A10 80109C20-B 80104384 00218E20-??? 0021D7C0 002190F0-??? 0021DA90 006B1040-B 006B50EC give_damage_score
@@ -804,7 +804,7 @@ F84C ------------ -------- ------------ -------- ------------ -------- -----
F84D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170AC0 004E12D0-B 004E5AE0 00590DE0-B 005956A0 80242EF8-B 8023CC34 801ECFD8-??? 801E7020 801F2988-B 801ECB54 801F2B0C-B 801ECC14 8010D280-B 801079FC 80109C20-B 80104370 00218E20-??? 0021D8B0 002190F0-??? 0021DB80 006B1040-B 006B51C8 death_score
F84E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170AF8 004E12D0-B 004E5B20 00590DE0-B 005956E0 80242EF8-B 8023CBB4 801ECFD8-??? 801E6F9C 801F2988-B 801ECAD0 801F2B0C-B 801ECB90 8010D280-B 801079F8 80109C20-B 8010436C 00218E20-??? 0021D8E0 002190F0-??? 0021DBB0 006B1040-B 006B51F4 enemy_kill_score
F84F ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170B30 004E12D0-B 004E5B60 00590DE0-B 00595720 80242EF8-B 8023CB34 801ECFD8-??? 801E6F18 801F2988-B 801ECA4C 801F2B0C-B 801ECB0C 8010D280-B 801079F4 80109C20-B 80104368 00218E20-??? 0021D910 002190F0-??? 0021DBE0 006B1040-B 006B5220 enemy_death_score
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F850 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170B68 004E12D0-B 004E5BA0 00590DE0-B 00595760 80242EF8-B 8023CAB4 801ECFD8-??? 801E6E94 801F2988-B 801EC9C8 801F2B0C-B 801ECA88 8010D280-B 801079F0 80109C20-B 80104364 00218E20-??? 0021D940 002190F0-??? 0021DC10 006B1040-B 006B524C meseta_score
F851 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C170BA0 004E12D0-B 004E5BE0 00590DE0-B 005957A0 80242EF8-B 8023CA68 801ECFD8-??? 801E6E48 801F2988-B 801EC97C 801F2B0C-B 801ECA3C 8010D280-B 801079A4 80109C20-B 80104318 00218E20-??? 0021D970 002190F0-??? 0021DC40 006B1040-B 006B9888 ba_set_trap_count
F852 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170BD8 004E1390-L 004E5C20 00590EA0-L 005957E0 80242DA8-L 8023CA50 801ED020-??? 801E6E28 801F29D0-... 801EC95C 801F2B54-... 801ECA1C 8010D2C8-... 80107984 80109C68-... 801042F8 00218E00-??? 0021D9A0 002190D0-??? 0021DC70 006B1028-... 006B5278 ba_set_target
@@ -821,7 +821,7 @@ F85C ------------ -------- ------------ -------- ------------ -------- -----
F85D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170D80 004E1390-L 004E5E00 00590EA0-L 005959C0 80242DA8-L 8023C7D4 801ED020-??? 801E6A78 801F29D0-... 801EC5D4 801F2B54-... 801EC694 8010D2C8-... 8010761C 80109C68-... 80103F90 00218E00-??? 0021DBC0 002190D0-??? 0021DE90 006B1028-... 006B53F8 set_allow_item_flags
F85E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170D8C 004E1390-L 004E5E10 00590EA0-L 005959D0 80242DA8-L 8023C7B0 801ED020-??? 801E6A48 801F29D0-... 801EC5A4 801F2B54-... 801EC664 8010D2C8-... 801075EC 80109C68-... 80103F60 00218E00-??? 0021DBD0 002190D0-??? 0021DEA0 006B1028-... 006B5408 ba_enable_sonar
F85F ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170DAC 004E1390-L 004E5E30 00590EA0-L 005959F0 80242DA8-L 8023C7A0 801ED020-??? 801E6A30 801F29D0-... 801EC58C 801F2B54-... 801EC64C 8010D2C8-... 801075D4 80109C68-... 80103F48 00218E00-??? 0021DBF0 002190D0-??? 0021DEC0 006B1028-... 006B5424 ba_use_sonar
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F860 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C170DB8 004E12C0-() 004E5E40 00590DD0-() 00595A00 80242F44-() 8023C778 801ED060-??? 801E6A08 801F2A10-() 801EC564 801F2B94-() 801EC624 8010D308-() 801075D0 80109CA8-() 80103F44 00218DF0-??? 0021DC00 002190C0-??? 0021DED0 006B101C-() 006B5430 clear_score_announce
F861 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170DD8 004E1390-L 004E5E60 00590EA0-L 00595A20 80242DA8-L 8023C744 801ED020-??? 801E69C8 801F29D0-... 801EC524 801F2B54-... 801EC5E4 8010D2C8-... 801075CC 80109C68-... 80103F40 00218E00-??? 0021DC20 002190D0-??? 0021DEF0 006B1028-... 006B5464 set_score_announce
F862 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C878-LLS 8C170E00 004E1400-LLS 004E5E90 00590F10-LLS 00595A50 80242B98-LLS 8023C6A4 801ED020-??? 801E6924 801F29D0-... 801EC480 801F2B54-... 801EC540 8010D2C8-... 80107528 80109C68-... 80103E9C 00218E00-??? 0021DC50 002190D0-??? 0021DF20 006B1028-... 006B54F4 give_s_rank_weapon
@@ -838,7 +838,7 @@ F86C ------------ -------- ------------ -------- ------------ -------- -----
F86D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C1712C4 004E12C0-() 004E6410 00590DD0-() 00595FD0 80242F44-() 8023BFFC 801ED060-??? 801E6274 801F2A10-() 801EBDD0 801F2B94-() 801EBE90 8010D308-() 8010727C 80109CA8-() 80103BF0 00218DF0-??? 0021E4D0 002190C0-??? 0021E7A0 006B101C-() 006B5988 ba_set_trapself
F86E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C1712D0 004E12C0-() 004E6420 00590DD0-() 00595FE0 80242F44-() 8023BFF0 801ED060-??? 801E6250 801F2A10-() 801EBDAC 801F2B94-() 801EBE6C 8010D308-() 80107258 80109CA8-() 80103BCC 00218DF0-??? 0021E4E0 002190C0-??? 0021E7B0 006B101C-() 006B5994 ba_clear_trapself
F86F ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170BEC 004E1390-L 004E5C30 00590EA0-L 005957F0 80242DA8-L 8023CA34 801ED020-??? 801E6E04 801F29D0-... 801EC938 801F2B54-... 801EC9F8 8010D2C8-... 80107960 80109C68-... 801042D4 00218E00-??? 0021D9B0 002190D0-??? 0021DC80 006B1028-... 006B528C ba_set_lives
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F870 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170C00 004E1390-L 004E5C50 00590EA0-L 00595810 80242DA8-L 8023CA0C 801ED020-??? 801E6DD8 801F29D0-... 801EC90C 801F2B54-... 801EC9CC 8010D2C8-... 80107934 80109C68-... 801042A8 00218E00-??? 0021D9D0 002190D0-??? 0021DCA0 006B1028-... 006B52A0 ba_set_max_tech_level
F871 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170C18 004E1390-L 004E5C70 00590EA0-L 00595830 80242DA8-L 8023C9C8 801ED020-??? 801E6D90 801F29D0-... 801EC8C4 801F2B54-... 801EC984 8010D2C8-... 801078EC 80109C68-... 80104260 00218E00-??? 0021D9F0 002190D0-??? 0021DCC0 006B1028-... 006B52BC ba_set_char_level
F872 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C170C30 004E1390-L 004E5C90 00590EA0-L 00595850 80242DA8-L 8023C9A4 801ED020-??? 801E6D60 801F29D0-... 801EC894 801F2B54-... 801EC954 8010D2C8-... 801078BC 80109C68-... 80104230 00218E00-??? 0021DA10 002190D0-??? 0021DCE0 006B1028-... 006B52D8 ba_set_time_limit
@@ -855,7 +855,7 @@ F87C ------------ -------- ------------ -------- ------------ -------- -----
F87D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1716CC 004E12D0-B 004E6830 00590DE0-B 00596410 80242EF8-B 8023BAB0 801ECFD8-??? 801E5CD0 801F2988-B 801EB854 801F2B0C-B 801EB914 8010D280-B 80106DFC 80109C20-B 80103770 00218E20-??? 0021E910 002190F0-??? 0021EBE0 006B1040-B 006B5D88 kill_player
F87E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1716FC 004E12D0-B 004E6860 00590DE0-B 00596440 80242EF8-B 8023BA5C 801ECFD8-??? 801E5C7C 801F2988-B 801EB800 801F2B0C-B 801EB8C0 8010D280-B 80106DA8 80109C20-B 8010371C 00218E20-??? 0021E970 002190F0-??? 0021EC40 006B1040-B 006B5DA8 get_serial_number
F87F ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C730-BB 8C171740 004E1300-BB 004E68A0 00590E10-BB 00596480 80242EA0-BB 8023BA20 801ECF80-??? 801E5C18 801F2930-BB 801EB79C 801F2AB4-BB 801EB85C 8010D228-BB 80106D44 80109BC8-BB 801036B8 00218E50-??? 0021E9F0 00219120-??? 0021ECC0 006B1058-BB 006B5DD0 get_eventflag
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F880 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C171780 004E12D0-B 004E68E0 00590DE0-B 005964C0 80242EF8-B 8023B9A0 801ECFD8-??? 801E5B84 801F2988-B 801EB708 801F2B0C-B 801EB7C8 8010D280-B 80106CB0 80109C20-B 80103624 00218E20-??? 0021EA30 002190F0-??? 0021ED00 006B1040-B 006B5E04 set_trap_damage
F881 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1717BC 004E12D0-B 004E6920 00590DE0-B 00596500 80242EF8-B 8023B914 801ECFD8-??? 801E5AF8 801F2988-B 801EB67C 801F2B0C-B 801EB73C 8010D280-B 80106C24 80109C20-B 80103598 00218E20-??? 0021EA60 002190F0-??? 0021ED30 006B1040-B 006B5E30 get_pl_name
F882 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C17181C 004E12D0-B 004E6980 00590DE0-B 00596560 80242EF8-B 8023B890 801ECFD8-??? 801E5A74 801F2988-B 801EB5F8 801F2B0C-B 801EB6B8 8010D280-B 80106BA0 80109C20-B 80103514 00218E20-??? 0021EAD0 002190F0-??? 0021EDA0 006B1040-B 006B5E84 get_pl_job
@@ -872,7 +872,7 @@ F88C ------------ -------- ------------ -------- ------------ -------- -----
F88D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C171CD4 004E12D0-B 004E6DC0 00590DE0-B 005969A0 80242EF8-B 8023B3C8 801ECFD8-??? 801E52A8 801F2988-B 801EAFE0 801F2B0C-B 801EB0A0 8010D280-B 801064B4 80109C20-B 80102E28 00218E20-??? 0021EF90 002190F0-??? 0021F260 006B1058-BB 006B6370 chl_set_timerecord
F88E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C171CEC 004E12D0-B 004E6DE0 00590DE0-B 005969C0 80242EF8-B 8023B364 801ECFD8-??? 801E5250 801F2988-B 801EAF88 801F2B0C-B 801EB048 8010D280-B 801064B0 80109C20-B 80102E24 00218E20-??? 0021F000 002190F0-??? 0021F2D0 006B1040-B 006B6390 chl_get_timerecord
F88F ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C171D14 004E12D0-B 004E6E00 00590DE0-B 005969E0 80242EF8-B 8023B0FC 801ECFD8-??? 801E4FE0 801F2988-B 801EAD18 801F2B0C-B 801EADD8 8010D280-B 801064AC 80109C20-B 80102E20 00218E20-??? 0021F040 002190F0-??? 0021F310 006B1040-B 006B63A4 set_cmode_grave_rates
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F890 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C16F2DC 004E12C0-() 004E3E20 00590DD0-() 005939B0 80242F44-() 8023F1B4 801ED060-??? 801E9794 801F2A10-() 801EF18C 801F2B94-() 801EF24C 8010D308-() 80109984 80109CA8-() 801062F8 00218DF0-??? 0021BB30 002190C0-??? 0021BE00 006B101C-() 006B3A58 clear_mainwarp_all
F891 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C171ED0 004E1390-L 004E6F00 00590EA0-L 00596B80 80242DA8-L 8023AFE8 801ED020-??? 801E4EB4 801F29D0-... 801EABEC 801F2B54-... 801EACAC 8010D2C8-... 80106380 80109C68-... 80102CF4 00218E00-??? 0021F1D0 002190D0-??? 0021F4A0 006B1028-... 006B64C8 load_enemy_data
F892 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C97C-W 8C171EDC 004E1530-W 004E6F10 00591040-W 00596B90 80242A98-W 8023AF18 801ECE98-??? 801E4E50 801F2848-W 801EAB88 801F29CC-W 801EAC48 8010D140-W 8010631C 80109AE0-W 80102C90 00219100-??? 0021F1E0 002193D0-??? 0021F4B0 006B10E0-W 006B64D8 get_physical_data
@@ -889,7 +889,7 @@ F89C ------------ -------- ------------ -------- ------------ -------- -----
F89D ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C1721CC 004E12C0-() 004E71D0 00590DD0-() 00596E50 80242F44-() 8023A9B4 801ED060-??? 801E49CC 801F2A10-() 801EA758 801F2B94-() 801EA818 8010D308-() 80105F78 80109CA8-() 801028EC 00218DF0-??? 0021F520 002190C0-??? 0021F7F0 006B101C-() 006B6924 chl_reverser
F89E ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C7C8-L 8C1721D8 004E1390-L 004E71E0 00590EA0-L 00596E60 80242DA8-L 8023A990 801ED020-??? 801E499C 801F29D0-... 801EA728 801F2B54-... 801EA7E8 8010D2C8-... 80105F48 80109C68-... 801028BC 00218E00-??? 0021F590 002190D0-??? 0021F860 006B1028-... 006B692C ba_forbid_scape_dolls
F89F ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1721F8 004E12D0-B 004E7200 00590DE0-B 00596E80 80242EF8-B 8023A948 801ECFD8-??? 801E4954 801F2988-B 801EA6E0 801F2B0C-B 801EA7A0 8010D280-B 80105F00 80109C20-B 80102874 00218E20-??? 0021F5B0 002190F0-??? 0021F880 006B1040-B 006B6948 player_recovery
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F8A0 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C172234 004E12C0-() 004E7240 00590DD0-() 00596EC0 80242F44-() 8023A900 801ED060-??? 801E4918 801F2A10-() 801EA6A4 801F2B94-() 801EA764 8010D308-() 80105EFC 80109CA8-() 80102870 00218DF0-??? 0021F5F0 002190C0-??? 0021F8C0 006B101C-() 006B6974 disable_bosswarp_option
F8A1 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C172240 004E12C0-() 004E7250 00590DD0-() 00596ED0 80242F44-() 8023A8B8 801ED060-??? 801E48DC 801F2A10-() 801EA668 801F2B94-() 801EA728 8010D308-() 80105EF8 80109CA8-() 8010286C 00218DF0-??? 0021F640 002190C0-??? 0021F910 006B101C-() 006B6980 enable_bosswarp_option
F8A2 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C17224C 004E12D0-B 004E7260 00590DE0-B 00596EE0 80242EF8-B 8023A814 801ECFD8-??? 801E4844 801F2988-B 801EA5D0 801F2B0C-B 801EA690 8010D280-B 80105EF4 80109C20-B 80102868 00218E20-??? 0021F680 002190F0-??? 0021F950 006B1040-B 006B698C is_bosswarp_opt_disabled
@@ -906,7 +906,7 @@ F8AC ------------ -------- ------------ -------- ------------ -------- -----
F8AD ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1726B8 004E12D0-B 004E76B0 00590DE0-B 005973F0 80242EF8-B 8023A1FC 801ECFD8-??? 801E4210 801F2988-B 801E9F9C 801F2B0C-B 801EA05C 8010D280-B 80105A6C 80109C20-B 801023E0 00218E20-??? 0021FBC0 002190F0-??? 0021FE90 006B1040-B 006B6D18 get_number_of_players2
F8AE ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C1726D0 004E12D0-B 004E76D0 00590DE0-B 00597410 80242EF8-B 8023A198 801ECFD8-??? 801E41B0 801F2988-B 801E9F3C 801F2B0C-B 801E9FFC 8010D280-B 80105A68 80109C20-B 801023DC 00218E20-??? 0021FBE0 002190F0-??? 0021FEB0 006B1040-B 006B6D2C party_has_name
F8AF ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C172724 004E12D0-B 004E7720 00590DE0-B 00597460 80242EF8-B 8023A138 801ECFD8-??? 801E4150 801F2988-B 801E9EDC 801F2B0C-B 801E9F9C 8010D280-B 80105A08 80109C20-B 8010237C 00218E20-??? 0021FC20 002190F0-??? 0021FEF0 006B1040-B 006B6D64 someone_has_spoken
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F8B0 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C730-BB 8C17277C 004E1300-BB 004E7770 00590E10-BB 005974B0 80242EA0-BB 8023A118 801ED020-??? 801E4128 801F29D0-... 801E9EB4 801F2B54-... 801E9F74 8010D2C8-... 801059E0 80109C68-... 80102354 00218E00-??? 0021FC60 002190D0-??? 0021FF30 006B1028-... 006B6D9C read1
F8B1 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C730-BB 8C172798 004E1300-BB 004E77A0 00590E10-BB 005974E0 80242EA0-BB 8023A0FC 801ED020-??? 801E4104 801F29D0-... 801E9E90 801F2B54-... 801E9F50 8010D2C8-... 801059BC 80109C68-... 80102330 00218E00-??? 0021FC80 002190D0-??? 0021FF50 006B1028-... 006B6DB8 read2
F8B2 ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C730-BB 8C1727B4 004E1300-BB 004E77D0 00590E10-BB 00597510 80242EA0-BB 8023A0E0 801ED020-??? 801E40E0 801F29D0-... 801E9E6C 801F2B54-... 801E9F2C 8010D2C8-... 80105998 80109C68-... 8010230C 00218E00-??? 0021FCA0 002190D0-??? 0021FF70 006B1028-... 006B6DD4 read4
@@ -920,7 +920,7 @@ F8B9 ------------ -------- ------------ -------- ------------ -------- -----
F8BA ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C6F0-() 8C1728FC 004E12C0-() 004E7920 00590DD0-() 00597660 80242F44-() 80239EB4 801ED060-??? 801E3EA4 801F2A10-() 801E9C30 801F2B94-() 801E9CF0 8010D308-() 80105810 80109CA8-() 80102184 00218DF0-??? 0021FE30 002190C0-??? 00220100 006B101C-() 006B6EE0 load_guild_card_file_creation_time_to_flag_buf
F8BB ------------ -------- ------------ -------- ------------ -------- ------------ -------- 8C16C704-B 8C172924 004E12D0-B 004E7930 00590DE0-B 00597670 80242EF8-B 80239E5C 801ECFD8-??? 801E3E84 801F2988-B 801E9C10 801F2B0C-B 801E9CD0 8010D280-B 801057F0 80109C20-B 80102164 00218E20-??? 0021F7A0 002190F0-??? 0021FA70 006B1040-B 006B6F00 write_flag_buf_to_event_flags2
F8BC ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECEE0-??? 801E3E30 801F2890-L 801E9BBC 801F2A14-L 801E9C7C 8010D188-L 8010579C 80109B28-L 80102110 00218ED0-??? 0021FE50 002191A0-??? 00220120 006B10C8-L 006B6F44 set_episode
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F8C0 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E3DE8 801F29D0-... 801E9B80 801F2B54-... 801E9C40 8010D2C8-... 80105754 80109C68-... 801020C8 00218E00-??? 0021FE80 002190D0-??? 00220150 006B1028-... 0061CDB0 file_dl_req/nop_F8C0
F8C1 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E3D60 801F2988-B 801E9B08 801F2B0C-B 801E9BC8 8010D280-B 801056CC 80109C20-B 80102040 00218E20-??? 0021FEB0 002190F0-??? 00220180 006B1040-B 0061CDB0 get_dl_status/nop_F8C1
F8C2 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E3D30 801F2A10-() 801E9AD8 801F2B94-() 801E9B98 8010D308-() 8010569C 80109CA8-() 80102010 00218DF0-??? 002C9010 002190C0-??? 002F76A0 006B101C-() 0061CDB0 prepare_gba_rom_from_download/nop_F8C2
@@ -937,7 +937,7 @@ F8CC ------------ -------- ------------ -------- ------------ -------- -----
F8CD ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E3964 801F2988-B 801E9714 801F2B0C-B 801E97D4 8010D280-B 80105370 80109C20-B 80101CE4 00218E20-??? 00220230 002190F0-??? 00220500 006B1040-B 006B7064 set_slot_paralyze
F8CE ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E3934 801F2988-B 801E96E4 801F2B0C-B 801E97A4 8010D280-B 80105340 80109C20-B 80101CB4 00218E20-??? 00220260 002190F0-??? 00220530 006B1040-B 006B707C set_slot_shock
F8CF ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E3904 801F2988-B 801E96B4 801F2B0C-B 801E9774 8010D280-B 80105310 80109C20-B 80101C84 00218E20-??? 00220290 002190F0-??? 00220560 006B1040-B 006B7094 set_slot_freeze
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F8D0 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E38D4 801F2988-B 801E9684 801F2B0C-B 801E9744 8010D280-B 801052E0 80109C20-B 80101C54 00218E20-??? 002202C0 002190F0-??? 00220590 006B1040-B 006B70AC set_slot_slow
F8D1 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E38A4 801F2988-B 801E9654 801F2B0C-B 801E9714 8010D280-B 801052B0 80109C20-B 80101C24 00218E20-??? 002202F0 002190F0-??? 002205C0 006B1040-B 006B70C4 set_slot_confuse
F8D2 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E3874 801F2988-B 801E9624 801F2B0C-B 801E96E4 8010D280-B 80105280 80109C20-B 80101BF4 00218E20-??? 00220320 002190F0-??? 002205F0 006B1040-B 006B70DC set_slot_shifta
@@ -954,7 +954,7 @@ F8DC ------------ -------- ------------ -------- ------------ -------- -----
F8DD ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801E3534 801F2930-BB 801E92F4 801F2AB4-BB 801E93B4 8010D228-BB 80104F40 80109BC8-BB 801018B4 00218E50-??? 002206A0 00219120-??? 00220970 006B1058-BB 006B7298 get_pad_cond
F8DE ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801E3508 801F2930-BB 801E92C8 801F2AB4-BB 801E9388 8010D228-BB 80104F14 80109BC8-BB 80101888 00218E50-??? 00220700 00219120-??? 002209D0 006B1058-BB 006B73B0 get_button_cond
F8DF ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E3214 801F2A10-() 801E9018 801F2B94-() 801E90D8 8010D308-() 80104C20 80109CA8-() 80101594 00218DF0-??? 002208A0 002190C0-??? 00220B70 006B101C-() 006B76CC freeze_enemies
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F8E0 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E31E8 801F2A10-() 801E8FEC 801F2B94-() 801E90AC 8010D308-() 80104BF4 80109CA8-() 80101568 00218DF0-??? 002208B0 002190C0-??? 00220B80 006B101C-() 006B76E4 unfreeze_enemies
F8E1 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E31C0 801F2A10-() 801E8FC4 801F2B94-() 801E9084 8010D308-() 80104BCC 80109CA8-() 80101540 00218DF0-??? 002208C0 002190C0-??? 00220B90 006B101C-() 006B76FC freeze_everything
F8E2 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E3198 801F2A10-() 801E8F9C 801F2B94-() 801E905C 8010D308-() 80104BA4 80109CA8-() 80101518 00218DF0-??? 002208D0 002190C0-??? 00220BA0 006B101C-() 006B7708 unfreeze_everything
@@ -971,12 +971,12 @@ F8EC ------------ -------- ------------ -------- ------------ -------- -----
F8ED ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801E59C0 801F2930-BB 801EB544 801F2AB4-BB 801EB604 8010D228-BB 80106AEC 80109BC8-BB 80103460 00218E50-??? 0021EBA0 00219120-??? 0021EE70 006B1058-BB 006B5F10 animation_check
F8EE ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E5968 801F29D0-... 801EB4EC 801F2B54-... 801EB5AC 8010D2C8-... 80106A94 80109C68-... 80103408 00218E00-??? 0021EBE0 002190D0-??? 0021EEB0 006B1028-... 006B5F40 call_image_data
F8EF ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E5964 801F2A10-() 801EB4E8 801F2B94-() 801EB5A8 8010D308-() 80106A90 80109CA8-() 80103404 00218DF0-??? 002C9010 002190C0-??? 002F76A0 006B101C-() 0061CDB0 nop_F8EF
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F8F0 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E5944 801F2A10-() 801EB4C8 801F2B94-() 801EB588 8010D308-() 80106A70 80109CA8-() 801033E4 00218DF0-??? 0021EC20 002190C0-??? 0021EEF0 006B101C-() 006B5F7C turn_off_bgm_p2
F8F1 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E5924 801F2A10-() 801EB4A8 801F2B94-() 801EB568 8010D308-() 80106A50 80109CA8-() 801033C4 00218DF0-??? 0021EC50 002190C0-??? 0021EF20 006B101C-() 006B5F84 turn_on_bgm_p2
F8F2 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E3298 801F29D0-... 801E909C 801F2B54-... 801E915C 8010D2C8-... 80104CA4 80109C68-... 80101618 00218E00-??? 002207E0 002190D0-??? 00220AB0 006B1028-... 006B75A8 unknown_F8F2
F8F3 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801EAE3C 801F29D0-... 801F07EC 801F2B54-... 801F0970 8010D2C8-... 8010B084 80109C68-... 80107A24 00218E00-??? 0021ABB0 002190D0-??? 0021AE80 006B1028-... 006B2E34 particle2
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F901 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801E2A00 801F2930-BB 801E8828 801F2AB4-BB 801E88E8 8010D228-BB 8010440C 80109BC8-BB 80100D80 00218E50-??? 00220D40 00219120-??? 00221010 006B1058-BB 006B7A88 dec2float
F902 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801E29D4 801F2930-BB 801E87FC 801F2AB4-BB 801E88BC 8010D228-BB 801043E0 80109BC8-BB 80100D54 00218E50-??? 00220D60 00219120-??? 00221030 006B1058-BB 006B7AA8 float2dec
F903 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801ECAA8 801F2930-BB 801F2458 801F2AB4-BB 801F25DC 8010D228-BB 8010CD50 80109BC8-BB 801096F0 00218E50-??? 00219210 00219120-??? 002194E0 006B1058-BB 006B170C flet
@@ -989,7 +989,7 @@ F90C ------------ -------- ------------ -------- ------------ -------- -----
F90D ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF28-??? 801E289C 801F28D8-BL 801E86C4 801F2A5C-BL 801E8784 8010D1D0-BL 801042A8 80109B70-BL 80100C1C 00218E90-??? 00220E20 00219160-??? 002210F0 006B107C-BL 006B7B9C fmuli
F90E ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801E2868 801F2930-BB 801E8690 801F2AB4-BB 801E8750 8010D228-BB 80104274 80109BC8-BB 80100BE8 00218E50-??? 00220E40 00219120-??? 00221110 006B1058-BB 006B7BC0 fdiv
F90F ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF28-??? 801E2834 801F28D8-BL 801E865C 801F2A5C-BL 801E871C 8010D1D0-BL 80104240 80109B70-BL 80100BB4 00218E90-??? 00220E60 00219160-??? 00221130 006B107C-BL 006B7BE8 fdivi
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F910 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E2678 801F29D0-... 801E84A0 801F2B54-... 801E8560 8010D2C8-... 80104084 80109C68-... 801009F8 00218E00-??? 00220F50 002190D0-??? 00221220 006B1028-... 006B7CEC get_total_deaths
F911 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECF80-??? 801E25E8 801F2930-BB 801E8410 801F2AB4-BB 801E84D0 8010D228-BB 80103FF4 80109BC8-BB 80100968 00218E50-??? 00220FB0 00219120-??? 00221280 006B1058-BB 006B7D18 get_stackable_item_count
F912 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED060-??? 801E25AC 801F2A10-() 801E83E4 801F2B94-() 801E84A4 8010D308-() 80103FB8 80109CA8-() 8010092C 00218DF0-??? 00221030 002190C0-??? 00221300 006B101C-() 006B97D8 freeze_and_hide_equip
@@ -1006,7 +1006,7 @@ F91C ------------ -------- ------------ -------- ------------ -------- -----
F91D ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E1F58 801F2988-B 801E7D90 801F2B0C-B 801E7E50 8010D280-B 80103964 80109C20-B 801002D8 00218E20-??? 00221580 002190F0-??? 00221850 006B1040-B 006B80C4 get_time_played
F91E ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E1F20 801F2988-B 801E7D58 801F2B0C-B 801E7E18 8010D280-B 8010392C 80109C20-B 801002A0 00218E20-??? 002215C0 002190F0-??? 00221890 006B1040-B 006B80F8 get_guildcard_total
F91F ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E1E84 801F2988-B 801E7CBC 801F2B0C-B 801E7D7C 8010D280-B 80103890 80109C20-B 80100204 00218E20-??? 002215E0 002190F0-??? 002218B0 006B1040-B 006B810C get_slot_meseta
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F920 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E1E04 801F29D0-... 801E7C3C 801F2B54-... 801E7CFC 8010D2C8-... 80103810 80109C68-... 80100184 00218E00-??? 002216B0 002190D0-??? 00221980 006B1028-... 006B8180 get_player_level
F921 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E1D54 801F29D0-... 801E7B9C 801F2B54-... 801E7C5C 8010D2C8-... 80103760 80109C68-... 801000D4 00218E00-??? 00221730 002190D0-??? 00221A00 006B1028-... 006B81BC get_section_id
F922 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E1C5C 801F29D0-... 801E7AA4 801F2B54-... 801E7B64 8010D2C8-... 80103668 80109C68-... 800FFFDC 00218E00-??? 00221780 002190D0-??? 00221A50 006B1028-... 006B81F0 get_player_hp
@@ -1023,7 +1023,7 @@ F92C ------------ -------- ------------ -------- ------------ -------- -----
F92D ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E1690 801F29D0-... 801E7530 801F2B54-... 801E75F0 8010D2C8-... 8010309C 80109C68-... 800FFA10 00218E00-??? 00221E00 002190D0-??? 002220D0 006B1028-... 006B8574 color_change
F92E ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E0FD0 801F29D0-... 801E6E80 801F2B54-... 801E6F40 8010D2C8-... 80102AD8 80109C68-... 800FF44C 00218E00-??? 00222450 002190D0-??? 00222720 006B1028-... 006B8B98 send_statistic
F92F ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E1DC4 801F29D0-... 801E7C0C 801F2B54-... 801E7CCC 8010D2C8-... 801037D0 80109C68-... 80100144 00218E00-??? 00221710 002190D0-??? 002219E0 006B1028-... 0061CDB0 gba_write_identifiers/nop_F92F
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F930 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E1570 801F29D0-... 801E7410 801F2B54-... 801E74D0 8010D2C8-... 80102F7C 80109C68-... 800FF8F0 00218E00-??? 00221E60 002190D0-??? 00222130 006B1028-... 006B863C chat_box
F931 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E1498 801F29D0-... 801E7348 801F2B54-... 801E7408 8010D2C8-... 80102EA4 80109C68-... 800FF818 00218E00-??? 00221F90 002190D0-??? 00222260 006B1028-... 006B8740 chat_bubble
F932 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ECFD8-??? 801E1444 801F2988-B 801E72F4 801F2B0C-B 801E73B4 8010D280-B 80102E50 80109C20-B 800FF7C4 00218E20-??? 00222040 002190F0-??? 00222310 006B1040-B 006B87FC set_episode2
@@ -1040,7 +1040,7 @@ F93C ------------ -------- ------------ -------- ------------ -------- -----
F93D ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E1FB8 801F29D0-... 801E7DF0 801F2B54-... 801E7EB0 8010D2C8-... 801039C4 80109C68-... 80100338 00218E00-??? 00221560 002190D0-??? 00221830 006B1028-... 006B80AC get_lang_setting
F93E ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E0FAC 801F29D0-... 801E6E5C 801F2B54-... 801E6F1C 8010D2C8-... 80102AB4 80109C68-... 800FF428 00218E00-??? 00222480 002190D0-??? 00222750 006B1028-... 006B96F8 prepare_statistic
F93F ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E0F88 801F29D0-... 801E6E38 801F2B54-... 801E6EF8 8010D2C8-... 80102A90 80109C68-... 800FF404 00218E00-??? 002224B0 002190D0-??? 00222780 006B1028-... 006B8BC4 keyword_detect
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F940 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E0F18 801F29D0-... 801E6DC8 801F2B54-... 801E6E88 8010D2C8-... 80102A20 80109C68-... 800FF394 00218E00-??? 002224E0 002190D0-??? 002227B0 006B1028-... 006B8BD4 keyword
F941 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E0EB0 801F29D0-... 801E6D60 801F2B54-... 801E6E20 8010D2C8-... 801029B8 80109C68-... 800FF32C 00218E00-??? 00222530 002190D0-??? 00222800 006B1028-... 006B8C10 get_guildcard_num
F942 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801ED020-??? 801E0E54 801F29D0-... 801E6D04 801F2B54-... 801E6DC4 8010D2C8-... 8010295C 80109C68-... 800FF2D0 00218E00-??? 00222580 002190D0-??? 00222850 006B1028-... 006B8C44 get_recent_symbol_chat
@@ -1057,7 +1057,7 @@ F94C ------------ -------- ------------ -------- ------------ -------- -----
F94D ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 801F2B54-... 801F064C 8010D280-B 8010ACF4 80109C20-B 80107668 00218E00-??? 00221660 002190D0-??? 00221930 006B1028-... 0061CDB0 has_ep3_save_file/give_card/give_or_take_card/unknown_F94D/nop_F94D
F94E ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1028-... 0061CDB0 nop_F94E
F94F ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1028-... 0061CDB0 nop_F94F
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F950 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1028-... 006B8EA0 bb_p2_menu
F951 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B101C-!!! 006B4908 bb_map_designate
F952 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1040-B 006B8EB0 bb_get_number_in_pack
@@ -1074,7 +1074,7 @@ F95C ------------ -------- ------------ -------- ------------ -------- -----
F95D ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1028-... 006B93FC bb_exchange_pc
F95E ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1028-... 006B941C bb_box_create_bp
F95F ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1028-... 006B9104 bb_exchange_pt
- DC-NTE--------------- DC112000------------- DC122000---- -------- DCv1USA-------------- DCv2USA-------------- PC-NTE------ -------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
+ DC-NTE--------------- DC112000------------- DC122000------------- DCv1USA-------------- DCv2USA-------------- PC-NTE--------------- PC------------------- GC1&2NTE------------- GC-GJAM-------------- GC1&2v11------------- GC1&2v12------------- GCEp3NTE------------- GCEp3USA------------- XBOXBETA------------- XBOX-US0------------- BB-------------------
F960 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1028-... 006B915C bb_send_6xE2
F961 ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- ------------ -------- 006B1040-B 006B91F8 bb_get_6xE3_status
diff --git a/src/Account.cc b/src/Account.cc
index 02ecdba1..ef8f3b32 100644
--- a/src/Account.cc
+++ b/src/Account.cc
@@ -2,6 +2,7 @@
#include
#include
+#include
#include
#include
#include
@@ -292,7 +293,7 @@ phosg::JSON Account::json() const {
}
string Account::str() const {
- std::string ret = phosg::string_printf("Account: %010" PRIu32 "/%08" PRIX32 "\n", this->account_id, this->account_id);
+ std::string ret = std::format("Account: {:010}/{:08X}\n", this->account_id, this->account_id);
if (this->flags) {
string flags_str = "";
@@ -336,10 +337,10 @@ string Account::str() const {
}
if (flags_str.empty()) {
flags_str = "none";
- } else if (phosg::ends_with(flags_str, ",")) {
+ } else if (flags_str.ends_with(",")) {
flags_str.pop_back();
}
- ret += phosg::string_printf(" Flags: %08" PRIX32 " (%s)\n", this->flags, flags_str.c_str());
+ ret += std::format(" Flags: {:08X} ({})\n", this->flags, flags_str);
}
if (this->user_flags) {
@@ -349,56 +350,56 @@ string Account::str() const {
}
if (user_flags_str.empty()) {
user_flags_str = "none";
- } else if (phosg::ends_with(user_flags_str, ",")) {
+ } else if (user_flags_str.ends_with(",")) {
user_flags_str.pop_back();
}
- ret += phosg::string_printf(" User flags: %08" PRIX32 " (%s)\n", this->user_flags, user_flags_str.c_str());
+ ret += std::format(" User flags: {:08X} ({})\n", this->user_flags, user_flags_str);
}
if (this->ban_end_time) {
string time_str = phosg::format_time(this->ban_end_time);
- ret += phosg::string_printf(" Banned until: %" PRIu64 " (%s)\n", this->ban_end_time, time_str.c_str());
+ ret += std::format(" Banned until: {} ({})\n", this->ban_end_time, time_str);
}
if (this->ep3_current_meseta || this->ep3_total_meseta_earned) {
- ret += phosg::string_printf(" Episode 3 meseta: %" PRIu32 " (total earned: %" PRIu32 ")\n",
+ ret += std::format(" Episode 3 meseta: {} (total earned: {})\n",
this->ep3_current_meseta, this->ep3_total_meseta_earned);
}
if (!this->last_player_name.empty()) {
- ret += phosg::string_printf(" Last player name: \"%s\"\n", this->last_player_name.c_str());
+ ret += std::format(" Last player name: \"{}\"\n", this->last_player_name);
}
if (!this->auto_reply_message.empty()) {
- ret += phosg::string_printf(" Auto reply message: \"%s\"\n", this->auto_reply_message.c_str());
+ ret += std::format(" Auto reply message: \"{}\"\n", this->auto_reply_message);
}
if (this->bb_team_id) {
- ret += phosg::string_printf(" BB team ID: %08" PRIX32 "\n", this->bb_team_id);
+ ret += std::format(" BB team ID: {:08X}\n", this->bb_team_id);
}
if (this->is_temporary) {
- ret += phosg::string_printf(" Is temporary license: true\n");
+ ret += std::format(" Is temporary license: true\n");
}
for (const auto& it : this->dc_nte_licenses) {
- ret += phosg::string_printf(" DC NTE license: serial_number=%s access_key=%s\n",
- it.second->serial_number.c_str(), it.second->access_key.c_str());
+ ret += std::format(" DC NTE license: serial_number={} access_key={}\n",
+ it.second->serial_number, it.second->access_key);
}
for (const auto& it : this->dc_licenses) {
- ret += phosg::string_printf(" DC license: serial_number=%" PRIX32 " access_key=%s\n",
- it.second->serial_number, it.second->access_key.c_str());
+ ret += std::format(" DC license: serial_number={:X} access_key={}\n",
+ it.second->serial_number, it.second->access_key);
}
for (const auto& it : this->pc_licenses) {
- ret += phosg::string_printf(" PC license: serial_number=%" PRIX32 " access_key=%s\n",
- it.second->serial_number, it.second->access_key.c_str());
+ ret += std::format(" PC license: serial_number={:X} access_key={}\n",
+ it.second->serial_number, it.second->access_key);
}
for (const auto& it : this->gc_licenses) {
- ret += phosg::string_printf(" GC license: serial_number=%010" PRIu32 " access_key=%s password=%s\n",
- it.second->serial_number, it.second->access_key.c_str(), it.second->password.c_str());
+ ret += std::format(" GC license: serial_number={:010} access_key={} password={}\n",
+ it.second->serial_number, it.second->access_key, it.second->password);
}
for (const auto& it : this->xb_licenses) {
- ret += phosg::string_printf(" XB license: gamertag=%s user_id=%016" PRIX64 " account_id=%016" PRIX64 "\n",
- it.second->gamertag.c_str(), it.second->user_id, it.second->account_id);
+ ret += std::format(" XB license: gamertag={} user_id={:016X} account_id={:016X}\n",
+ it.second->gamertag, it.second->user_id, it.second->account_id);
}
for (const auto& it : this->bb_licenses) {
- ret += phosg::string_printf(" BB license: username=%s password=%s\n",
- it.second->username.c_str(), it.second->password.c_str());
+ ret += std::format(" BB license: username={} password={}\n",
+ it.second->username, it.second->password);
}
phosg::strip_trailing_whitespace(ret);
@@ -409,13 +410,13 @@ void Account::save() const {
if (!this->is_temporary) {
auto json = this->json();
string json_data = json.serialize(phosg::JSON::SerializeOption::FORMAT | phosg::JSON::SerializeOption::HEX_INTEGERS);
- string filename = phosg::string_printf("system/licenses/%010" PRIu32 ".json", this->account_id);
+ string filename = std::format("system/licenses/{:010}.json", this->account_id);
phosg::save_file(filename, json_data);
}
}
void Account::delete_file() const {
- string filename = phosg::string_printf("system/licenses/%010" PRIu32 ".json", this->account_id);
+ string filename = std::format("system/licenses/{:010}.json", this->account_id);
remove(filename.c_str());
}
@@ -440,24 +441,24 @@ uint64_t Login::proxy_session_id() const {
}
string Login::str() const {
- string ret = phosg::string_printf("Account:%08" PRIX32, this->account->account_id);
+ string ret = std::format("Account:{:08X}", this->account->account_id);
if (this->account_was_created) {
ret += " (new)";
}
if (this->dc_nte_license) {
- ret += phosg::string_printf(" via DC NTE serial number %s", this->dc_nte_license->serial_number.c_str());
+ ret += std::format(" via DC NTE serial number {}", this->dc_nte_license->serial_number);
} else if (this->dc_license) {
- ret += phosg::string_printf(" via DC serial number %08" PRIX32, this->dc_license->serial_number);
+ ret += std::format(" via DC serial number {:08X}", this->dc_license->serial_number);
} else if (this->pc_license) {
- ret += phosg::string_printf(" via PC serial number %08" PRIX32, this->pc_license->serial_number);
+ ret += std::format(" via PC serial number {:08X}", this->pc_license->serial_number);
} else if (this->gc_license) {
- ret += phosg::string_printf(" via GC serial number %010" PRIu32, this->gc_license->serial_number);
+ ret += std::format(" via GC serial number {:010}", this->gc_license->serial_number);
} else if (this->xb_license) {
- ret += phosg::string_printf(" via XB user ID %016" PRIX64, this->xb_license->user_id);
+ ret += std::format(" via XB user ID {:016X}", this->xb_license->user_id);
} else if (this->bb_license) {
- ret += phosg::string_printf(" via BB username %s", this->bb_license->username.c_str());
+ ret += std::format(" via BB username {}", this->bb_license->username);
} else {
- ret += phosg::string_printf(" artificially");
+ ret += std::format(" artificially");
}
return ret;
}
@@ -1043,16 +1044,17 @@ shared_ptr AccountIndex::create_temporary_account_for_shared_account(
AccountIndex::AccountIndex(bool force_all_temporary)
: force_all_temporary(force_all_temporary) {
if (!this->force_all_temporary) {
- if (!phosg::isdir("system/licenses")) {
- mkdir("system/licenses", 0755);
+ if (!std::filesystem::is_directory("system/licenses")) {
+ std::filesystem::create_directories("system/licenses");
} else {
- for (const auto& item : phosg::list_directory("system/licenses")) {
- if (phosg::ends_with(item, ".json")) {
+ for (const auto& item : std::filesystem::directory_iterator("system/licenses")) {
+ string filename = item.path().filename().string();
+ if (filename.ends_with(".json")) {
try {
- phosg::JSON json = phosg::JSON::parse(phosg::load_file("system/licenses/" + item));
+ phosg::JSON json = phosg::JSON::parse(phosg::load_file("system/licenses/" + filename));
this->add(make_shared(json));
} catch (const exception& e) {
- phosg::log_error("Failed to index account %s", item.c_str());
+ phosg::log_error_f("Failed to index account {}", filename);
throw;
}
}
diff --git a/src/AddressTranslator.cc b/src/AddressTranslator.cc
index 744b6553..c0cf60c0 100644
--- a/src/AddressTranslator.cc
+++ b/src/AddressTranslator.cc
@@ -1,6 +1,7 @@
#include "AddressTranslator.hh"
#include
+#include
#include
#include
#include
@@ -113,42 +114,43 @@ public:
AddressTranslator(const string& directory)
: log("[addr-trans] "),
directory(directory) {
- while (phosg::ends_with(this->directory, "/")) {
+ while (this->directory.ends_with("/")) {
this->directory.pop_back();
}
- for (const auto& filename : phosg::list_directory(this->directory)) {
+ for (const auto& item : std::filesystem::directory_iterator(this->directory)) {
+ string filename = item.path().filename().string();
if (filename.size() < 4) {
continue;
}
string name = filename.substr(0, filename.size() - 4);
string path = directory + "/" + filename;
- if (phosg::ends_with(filename, ".dol")) {
+ if (filename.ends_with(".dol")) {
ResourceDASM::DOLFile dol(path.c_str());
auto mem = make_shared();
dol.load_into(mem);
this->mems.emplace(name, mem);
this->ppc_mems.emplace(mem);
- this->log.info("Loaded %s", name.c_str());
- } else if (phosg::ends_with(filename, ".xbe")) {
+ this->log.info_f("Loaded {}", name);
+ } else if (filename.ends_with(".xbe")) {
ResourceDASM::XBEFile xbe(path.c_str());
auto mem = make_shared();
xbe.load_into(mem);
this->mems.emplace(name, mem);
- this->log.info("Loaded %s", name.c_str());
- } else if (phosg::ends_with(filename, ".exe")) {
+ this->log.info_f("Loaded {}", name);
+ } else if (filename.ends_with(".exe")) {
ResourceDASM::PEFile pe(path.c_str());
auto mem = make_shared();
pe.load_into(mem);
this->mems.emplace(name, mem);
- this->log.info("Loaded %s", name.c_str());
- } else if (phosg::ends_with(filename, ".bin")) {
+ this->log.info_f("Loaded {}", name);
+ } else if (filename.ends_with(".bin")) {
string data = phosg::load_file(path);
auto mem = make_shared();
mem->allocate_at(0x8C010000, data.size());
mem->memcpy(0x8C010000, data.data(), data.size());
this->mems.emplace(name, mem);
- this->log.info("Loaded %s", name.c_str());
+ this->log.info_f("Loaded {}", name);
}
}
}
@@ -202,14 +204,14 @@ public:
}
}
if (r2_low_found && r2_high_found) {
- fprintf(stderr, "(%s) r2 = %08" PRIX32 "\n", it.first.c_str(), r2);
+ phosg::fwrite_fmt(stderr, "({}) r2 = {:08X}\n", it.first, r2);
} else {
- fprintf(stderr, "(%s) r2 = __MISSING__\n", it.first.c_str());
+ phosg::fwrite_fmt(stderr, "({}) r2 = __MISSING__\n", it.first);
}
if (r13_low_found && r13_high_found) {
- fprintf(stderr, "(%s) r13 = %08" PRIX32 "\n", it.first.c_str(), r13);
+ phosg::fwrite_fmt(stderr, "({}) r13 = {:08X}\n", it.first, r13);
} else {
- fprintf(stderr, "(%s) r13 = __MISSING__\n", it.first.c_str());
+ phosg::fwrite_fmt(stderr, "({}) r13 = __MISSING__\n", it.first);
}
}
}
@@ -357,16 +359,16 @@ public:
}
for (const auto& [type, constructor_to_area_ranges] : table) {
- fprintf(stdout, "%04" PRIX32 " =>", type);
+ phosg::fwrite_fmt(stdout, "{:04X} =>", type);
for (const auto& [constructor, area_ranges] : constructor_to_area_ranges) {
- fprintf(stdout, " %08" PRIX32, constructor);
+ phosg::fwrite_fmt(stdout, " {:08X}", constructor);
bool is_first = true;
for (const auto& [start, end] : area_ranges) {
fputc(is_first ? ':' : ',', stdout);
if (start == end) {
- fprintf(stdout, "%02zX", start);
+ phosg::fwrite_fmt(stdout, "{:02X}", start);
} else {
- fprintf(stdout, "%02zX-%02zX", start, end);
+ phosg::fwrite_fmt(stdout, "{:02X}-{:02X}", start, end);
}
is_first = false;
}
@@ -403,17 +405,17 @@ public:
if (!cell_data.empty()) {
cell_data.push_back(' ');
}
- cell_data += phosg::string_printf("%08" PRIX32, constructor);
+ cell_data += std::format("{:08X}", constructor);
if (print_area_masks) {
- cell_data += phosg::string_printf(":%016" PRIX64, this->area_mask_for_ranges(area_ranges));
+ cell_data += std::format(":{:016X}", this->area_mask_for_ranges(area_ranges));
} else {
bool is_first = true;
for (const auto& [start, end] : area_ranges) {
cell_data.push_back(is_first ? ':' : ',');
if (start == end) {
- cell_data += phosg::string_printf("%02zX", start);
+ cell_data += std::format("{:02X}", start);
} else {
- cell_data += phosg::string_printf("%02zX-%02zX", start, end);
+ cell_data += std::format("{:02X}-{:02X}", start, end);
}
is_first = false;
}
@@ -438,7 +440,7 @@ public:
header_line += " NAME";
for (const auto& [type, formatted_cells] : formatted_cells_for_type) {
- string line = phosg::string_printf("%04" PRIX32 " =>", type);
+ string line = std::format("{:04X} =>", type);
for (const auto& spec : specs) {
size_t width = version_widths.at(spec.src_name);
try {
@@ -465,7 +467,7 @@ public:
for (auto& line : formatted_lines) {
phosg::strip_trailing_whitespace(line);
- fprintf(stdout, "%s\n", line.c_str());
+ phosg::fwrite_fmt(stdout, "{}\n", line);
}
}
@@ -500,7 +502,7 @@ public:
size_t src_offset = src_addr - src_section.first;
size_t src_bytes_available_before = src_offset;
size_t src_bytes_available_after = src_section.second - src_offset - 4;
- this->log.info("(find_match/%s) Source offset = %08zX with %zX/%zX bytes available before/after",
+ this->log.info_f("(find_match/{}) Source offset = {:08X} with {:X}/{:X} bytes available before/after",
method_token, src_offset, src_bytes_available_before, src_bytes_available_after);
size_t match_bytes_before = 0;
@@ -570,7 +572,7 @@ public:
}
}
}
- this->log.info("(find_match/%s) For match length %zX, %zu matches found", method_token, match_length, num_matches);
+ this->log.info_f("(find_match/{}) For match length {:X}, {} matches found", method_token, match_length, num_matches);
if (num_matches == 1) {
return last_match_address;
} else if (num_matches == 0) {
@@ -641,7 +643,7 @@ public:
map results;
for (const auto& it : this->mems) {
if (it.second == this->src_mem) {
- log.info("(%s) %08" PRIX32 " (from source)", it.first.c_str(), src_addr);
+ log.info_f("({}) {:08X} (from source)", it.first, src_addr);
results.emplace(it.first, src_addr);
} else {
@@ -673,24 +675,24 @@ public:
const char* method_name = this->name_for_expand_method(methods[z]);
try {
uint32_t ret = futures[z].get();
- log.info("(%s) (%s) %08" PRIX32, it.first.c_str(), method_name, ret);
+ log.info_f("({}) ({}) {:08X}", it.first, method_name, ret);
match_addrs.emplace(ret);
} catch (const exception& e) {
- log.error("(%s) (%s) failed: %s", it.first.c_str(), method_name, e.what());
+ log.error_f("({}) ({}) failed: {}", it.first, method_name, e.what());
}
}
if (match_addrs.empty()) {
- log.error("(%s) no match found", it.first.c_str());
+ log.error_f("({}) no match found", it.first);
} else if (match_addrs.size() > 1) {
- log.error("(%s) different matches found by different methods", it.first.c_str());
+ log.error_f("({}) different matches found by different methods", it.first);
} else {
results.emplace(it.first, *match_addrs.begin());
}
}
}
for (const auto& it : results) {
- fprintf(stdout, "%s => %08" PRIX32 "\n", it.first.c_str(), it.second);
+ phosg::fwrite_fmt(stdout, "{} => {:08X}\n", it.first, it.second);
}
}
@@ -749,7 +751,7 @@ public:
}
}
}
- this->log.info("... For match length %zX, %zu matches found", match_length, num_matches);
+ this->log.info_f("... For match length {:X}, {} matches found", match_length, num_matches);
if (num_matches == 1) {
return last_match_address;
} else if (num_matches == 0) {
@@ -778,27 +780,27 @@ public:
map results;
for (const auto& it : this->mems) {
if (it.second == this->src_mem) {
- log.info("(%s) %08" PRIX32 " (from source)", it.first.c_str(), src_addr);
+ log.info_f("({}) {:08X} (from source)", it.first, src_addr);
results.emplace(it.first, src_addr);
} else {
uint32_t ret = 0;
try {
ret = this->find_be_to_le_data_match(it.second, src_addr, src_size);
- log.info("(%s) %08" PRIX32, it.first.c_str(), ret);
+ log.info_f("({}) {:08X}", it.first, ret);
} catch (const exception& e) {
- log.error("(%s) failed: %s", it.first.c_str(), e.what());
+ log.error_f("({}) failed: {}", it.first, e.what());
}
if (ret == 0) {
- log.error("(%s) no match found", it.first.c_str());
+ log.error_f("({}) no match found", it.first);
} else {
results.emplace(it.first, ret);
}
}
}
for (const auto& it : results) {
- fprintf(stdout, "%s => %08" PRIX32 "\n", it.first.c_str(), it.second);
+ phosg::fwrite_fmt(stdout, "{} => {:08X}\n", it.first, it.second);
}
}
@@ -808,7 +810,7 @@ public:
uint32_t last_addr = sec_addr + sec_size - data.size();
for (uint32_t addr = sec_addr; addr < last_addr; addr++) {
if (!mem->memcmp(addr, data.data(), data.size())) {
- fprintf(stderr, "%s => %08" PRIX32 "\n", name.c_str(), addr);
+ phosg::fwrite_fmt(stderr, "{} => {:08X}\n", name, addr);
}
}
}
@@ -849,9 +851,9 @@ public:
void run_shell() {
while (!feof(stdin)) {
if (!this->src_filename.empty()) {
- fprintf(stdout, "addr-trans:%s/%s> ", this->directory.c_str(), this->src_filename.c_str());
+ phosg::fwrite_fmt(stdout, "addr-trans:{}/{}> ", this->directory, this->src_filename);
} else {
- fprintf(stdout, "addr-trans:%s> ", this->directory.c_str());
+ phosg::fwrite_fmt(stdout, "addr-trans:{}> ", this->directory);
}
fflush(stdout);
@@ -859,7 +861,7 @@ public:
try {
this->handle_command(command);
} catch (const exception& e) {
- this->log.error("Failed: %s", e.what());
+ this->log.error_f("Failed: {}", e.what());
}
}
fputc('\n', stdout);
diff --git a/src/AsyncHTTPServer.cc b/src/AsyncHTTPServer.cc
new file mode 100644
index 00000000..ea62645e
--- /dev/null
+++ b/src/AsyncHTTPServer.cc
@@ -0,0 +1,409 @@
+#include "AsyncHTTPServer.hh"
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include "AsyncUtils.hh"
+#include "Loggers.hh"
+#include "Revision.hh"
+#include "Server.hh"
+
+using namespace std;
+
+static const unordered_map explanation_for_response_code{
+ {100, "Continue"},
+ {101, "Switching Protocols"},
+ {102, "Processing"},
+ {200, "OK"},
+ {201, "Created"},
+ {202, "Accepted"},
+ {203, "Non-Authoritative Information"},
+ {204, "No Content"},
+ {205, "Reset Content"},
+ {206, "Partial Content"},
+ {207, "Multi-Status"},
+ {208, "Already Reported"},
+ {226, "IM Used"},
+ {300, "Multiple Choices"},
+ {301, "Moved Permanently"},
+ {302, "Found"},
+ {303, "See Other"},
+ {304, "Not Modified"},
+ {305, "Use Proxy"},
+ {307, "Temporary Redirect"},
+ {308, "Permanent Redirect"},
+ {400, "Bad Request"},
+ {401, "Unathorized"},
+ {402, "Payment Required"},
+ {403, "Forbidden"},
+ {404, "Not Found"},
+ {405, "Method Not Allowed"},
+ {406, "Not Acceptable"},
+ {407, "Proxy Authentication Required"},
+ {408, "Request Timeout"},
+ {409, "Conflict"},
+ {410, "Gone"},
+ {411, "Length Required"},
+ {412, "Precondition Failed"},
+ {413, "Request Entity Too Large"},
+ {414, "Request-URI Too Long"},
+ {415, "Unsupported Media Type"},
+ {416, "Requested Range Not Satisfiable"},
+ {417, "Expectation Failed"},
+ {418, "I\'m a Teapot"},
+ {420, "Enhance Your Calm"},
+ {422, "Unprocessable Entity"},
+ {423, "Locked"},
+ {424, "Failed Dependency"},
+ {426, "Upgrade Required"},
+ {428, "Precondition Required"},
+ {429, "Too Many Requests"},
+ {431, "Request Header Fields Too Large"},
+ {444, "No Response"},
+ {449, "Retry With"},
+ {451, "Unavailable For Legal Reasons"},
+ {500, "Internal Server Error"},
+ {501, "Not Implemented"},
+ {502, "Bad Gateway"},
+ {503, "Service Unavailable"},
+ {504, "Gateway Timeout"},
+ {505, "HTTP Version Not Supported"},
+ {506, "Variant Also Negotiates"},
+ {507, "Insufficient Storage"},
+ {508, "Loop Detected"},
+ {509, "Bandwidth Limit Exceeded"},
+ {510, "Not Extended"},
+ {511, "Network Authentication Required"},
+ {598, "Network Read Timeout Error"},
+ {599, "Network Connect Timeout Error"},
+};
+
+HTTPError::HTTPError(int code, const std::string& what)
+ : std::runtime_error(what), code(code) {}
+
+const std::string* HTTPRequest::get_header(const std::string& name) const {
+ auto its = this->headers.equal_range(name);
+ if (its.first == its.second) {
+ return nullptr;
+ }
+ const string* ret = &its.first->second;
+ its.first++;
+ if (its.first != its.second) {
+ throw std::out_of_range("Header appears multiple times: " + name);
+ }
+ return ret;
+}
+
+const std::string* HTTPRequest::get_query_param(const std::string& name) const {
+ auto its = this->query_params.equal_range(name);
+ if (its.first == its.second) {
+ return nullptr;
+ }
+ const string* ret = &its.first->second;
+ its.first++;
+ if (its.first != its.second) {
+ throw std::out_of_range("Query parameter appears multiple times: " + name);
+ }
+ return ret;
+}
+
+static void url_decode_inplace(string& s) {
+ size_t write_offset = 0, read_offset = 0;
+ for (; read_offset < s.size(); write_offset++) {
+ if ((s[read_offset] == '%') && (read_offset < s.size() - 2)) {
+ s[write_offset] =
+ static_cast(phosg::value_for_hex_char(s[read_offset + 1]) << 4) |
+ static_cast(phosg::value_for_hex_char(s[read_offset + 2]));
+ read_offset += 3;
+ } else if (s[write_offset] == '+') {
+ s[write_offset] = ' ';
+ read_offset++;
+ } else {
+ s[write_offset] = s[read_offset];
+ read_offset++;
+ }
+ }
+ s.resize(write_offset);
+}
+
+HTTPClient::HTTPClient(asio::ip::tcp::socket&& sock) : r(std::move(sock)) {}
+
+asio::awaitable HTTPClient::recv_http_request(size_t max_line_size, size_t max_body_size) {
+ HTTPRequest req;
+ std::string request_line = co_await this->r.read_line("\r\n", max_line_size);
+ auto line_tokens = phosg::split(request_line, ' ');
+ if (line_tokens.size() != 3) {
+ throw runtime_error("invalid HTTP request line");
+ }
+ const auto& method_token = line_tokens[0];
+ if (method_token == "GET") {
+ req.method = HTTPRequest::Method::GET;
+ } else if (method_token == "POST") {
+ req.method = HTTPRequest::Method::POST;
+ } else if (method_token == "DELETE") {
+ req.method = HTTPRequest::Method::DELETE;
+ } else if (method_token == "HEAD") {
+ req.method = HTTPRequest::Method::HEAD;
+ } else if (method_token == "PATCH") {
+ req.method = HTTPRequest::Method::PATCH;
+ } else if (method_token == "PUT") {
+ req.method = HTTPRequest::Method::PUT;
+ } else if (method_token == "UPDATE") {
+ req.method = HTTPRequest::Method::UPDATE;
+ } else if (method_token == "OPTIONS") {
+ req.method = HTTPRequest::Method::OPTIONS;
+ } else if (method_token == "CONNECT") {
+ req.method = HTTPRequest::Method::CONNECT;
+ } else if (method_token == "TRACE") {
+ req.method = HTTPRequest::Method::TRACE;
+ } else {
+ throw HTTPError(400, "unknown request method");
+ }
+
+ req.http_version = std::move(line_tokens[2]);
+
+ size_t fragment_start_offset = line_tokens[1].find('#');
+ if (fragment_start_offset != string::npos) {
+ req.fragment = line_tokens[1].substr(fragment_start_offset + 1);
+ line_tokens[1].resize(fragment_start_offset);
+ }
+
+ size_t query_start_offset = line_tokens[1].find('?');
+ string query;
+ if (query_start_offset != string::npos) {
+ query = line_tokens[1].substr(query_start_offset + 1);
+ line_tokens[1].resize(query_start_offset);
+ }
+
+ req.path = std::move(line_tokens[1]);
+ if (req.path.empty()) {
+ throw std::runtime_error("request path is missing");
+ }
+
+ auto query_tokens = phosg::split(query, '&');
+ for (auto& token : query_tokens) {
+ size_t equals_pos = token.find('=');
+ if (equals_pos == string::npos) {
+ url_decode_inplace(token);
+ req.query_params.emplace(std::move(token), "");
+ } else {
+ string key = token.substr(0, equals_pos);
+ string value = token.substr(equals_pos + 1);
+ url_decode_inplace(key);
+ url_decode_inplace(value);
+ req.query_params.emplace(std::move(key), std::move(value));
+ }
+ }
+
+ auto prev_header_it = req.headers.end();
+ for (;;) {
+ std::string line = co_await this->r.read_line("\r\n", max_line_size);
+ if (line.empty()) {
+ break;
+ }
+ if (line[0] == ' ' || line[0] == '\t') {
+ if (prev_header_it == req.headers.end()) {
+ throw std::runtime_error("received header continuation line before any header");
+ } else {
+ phosg::strip_whitespace(line);
+ prev_header_it->second.append(1, ' ');
+ prev_header_it->second += line;
+ }
+ } else {
+ size_t colon_pos = line.find(':');
+ if (colon_pos == string::npos) {
+ throw runtime_error("malformed header line");
+ }
+ string key = line.substr(0, colon_pos);
+ string value = line.substr(colon_pos + 1);
+ phosg::strip_whitespace(key);
+ phosg::strip_whitespace(value);
+ prev_header_it = req.headers.emplace(phosg::tolower(key), std::move(value));
+ }
+ }
+
+ auto transfer_encoding_header = req.get_header("transfer-encoding");
+ if (transfer_encoding_header && phosg::tolower(*transfer_encoding_header) == "chunked") {
+ deque chunks;
+ size_t total_data_bytes = 0;
+ for (;;) {
+ auto line = co_await this->r.read_line("\r\n", 0x20);
+ size_t parse_offset = 0;
+ size_t chunk_size = stoull(line, &parse_offset, 16);
+ if (parse_offset != line.size()) {
+ throw HTTPError(400, "invalid chunk header during chunked encoding");
+ }
+ if (chunk_size == 0) {
+ break;
+ }
+ total_data_bytes += chunk_size;
+ if (total_data_bytes > max_body_size) {
+ throw HTTPError(400, "request data size too large");
+ }
+ chunks.emplace_back(co_await this->r.read_data(chunk_size));
+ auto after_chunk_data = co_await this->r.read_line("\r\n", 0x20);
+ if (!after_chunk_data.empty()) {
+ throw HTTPError(400, "incorrect trailing sequence after chunk data");
+ }
+ }
+ } else {
+ auto content_length_header = req.get_header("content-length");
+ size_t content_length = content_length_header ? stoull(*content_length_header) : 0;
+ if (content_length > max_body_size) {
+ throw HTTPError(400, "request data size too large");
+ } else if (content_length > 0) {
+ req.data = co_await this->r.read_data(content_length);
+ }
+ }
+
+ co_return req;
+}
+
+asio::awaitable HTTPClient::send_http_response(const HTTPResponse& resp) {
+ AsyncWriteCollector w;
+ w.add(std::format("{} {} {}\r\n",
+ resp.http_version, resp.response_code, explanation_for_response_code.at(resp.response_code)));
+ for (const auto& it : resp.headers) {
+ w.add(it.first + ": " + it.second + "\r\n");
+ }
+ if (!resp.data.empty()) {
+ w.add(std::format("Content-Length: {}\r\n", resp.data.size()));
+ }
+ w.add("\r\n");
+ if (!resp.data.empty()) {
+ w.add_reference(resp.data.data(), resp.data.size());
+ }
+ co_await w.write(this->r.get_socket());
+}
+
+asio::awaitable HTTPClient::recv_websocket_message(size_t max_data_size) {
+ WebSocketMessage prev_msg;
+ bool prev_msg_present = false;
+
+ while (this->r.get_socket().is_open()) {
+ WebSocketMessage msg;
+
+ // We need at most 10 bytes to determine if there's a valid frame, or as
+ // little as 2
+ co_await this->r.read_data_into(msg.header, 2);
+
+ // Get the payload size
+ bool has_mask = msg.header[1] & 0x80;
+ size_t payload_size = msg.header[1] & 0x7F;
+ if (payload_size == 0x7F) {
+ phosg::be_uint64_t wire_size;
+ co_await this->r.read_data_into(&wire_size, sizeof(wire_size));
+ payload_size = wire_size;
+ } else if (payload_size == 0x7E) {
+ phosg::be_uint16_t wire_size;
+ co_await this->r.read_data_into(&wire_size, sizeof(wire_size));
+ payload_size = wire_size;
+ }
+
+ if (payload_size > max_data_size) {
+ throw runtime_error("Incoming WebSocket message exceeds size limit");
+ }
+
+ // Read the masking key if present
+ if (has_mask) {
+ co_await this->r.read_data_into(msg.mask_key, sizeof(msg.mask_key));
+ }
+
+ // Read and unmask message data
+ msg.data = co_await this->r.read_data(payload_size);
+ if (has_mask) {
+ for (size_t x = 0; x < msg.data.size(); x++) {
+ msg.data[x] ^= msg.mask_key[x & 3];
+ }
+ }
+
+ this->last_communication_time = phosg::now();
+
+ // If the current message is a control message, respond appropriately
+ // (these can be sent in the middle of fragmented messages)
+ uint8_t opcode = msg.header[0] & 0x0F;
+ if (opcode & 0x08) {
+ if (opcode == 0x0A) {
+ // Ping response; ignore it
+
+ } else if (opcode == 0x08) {
+ // Close message
+ co_await this->send_websocket_message(msg.data, msg.opcode);
+ this->r.get_socket().close();
+
+ } else if (opcode == 0x09) {
+ // Ping message
+ co_await this->send_websocket_message(msg.data, 0x0A);
+
+ } else {
+ // Unknown control message type
+ this->r.get_socket().close();
+ }
+ continue;
+ }
+
+ // If there's an existing fragment, the current message's opcode should be
+ // zero; if there's no pending message, it must not be zero
+ if (prev_msg_present == (opcode != 0)) {
+ this->r.get_socket().close();
+ continue;
+ }
+
+ // Save the message opcode, if present, and append the frame data
+ if (!prev_msg_present) {
+ prev_msg = std::move(msg);
+ } else {
+ prev_msg.header[0] = msg.header[0];
+ prev_msg.header[1] = msg.header[1];
+ if (opcode) {
+ prev_msg.opcode = msg.opcode;
+ }
+ if (has_mask) {
+ prev_msg.mask_key[0] = msg.mask_key[0];
+ prev_msg.mask_key[1] = msg.mask_key[1];
+ prev_msg.mask_key[2] = msg.mask_key[2];
+ prev_msg.mask_key[3] = msg.mask_key[3];
+ }
+ prev_msg.data += msg.data;
+ }
+
+ // If the FIN bit is set, then the frame is complete - append the payload
+ // to any pending payloads and call the message handler. If the FIN bit
+ // isn't set, we need to receive at least one continuation frame to
+ // complete the message.
+ if (prev_msg.header[0] & 0x80) {
+ co_return prev_msg;
+ }
+ }
+
+ throw logic_error("failed to receive websocket message");
+}
+
+asio::awaitable HTTPClient::send_websocket_message(const void* data, size_t size, uint8_t opcode) {
+ phosg::StringWriter w;
+ w.put_u8(0x80 | (opcode & 0x0F));
+ if (size > 0xFFFF) {
+ w.put_u8(0x7F);
+ w.put_u64b(size);
+ } else if (size > 0x7D) {
+ w.put_u8(0x7E);
+ w.put_u16b(size);
+ } else {
+ w.put_u8(size);
+ }
+
+ array bufs = {asio::const_buffer(w.data(), w.size()), asio::const_buffer(data, size)};
+ co_await asio::async_write(this->r.get_socket(), bufs, asio::use_awaitable);
+}
+
+asio::awaitable HTTPClient::send_websocket_message(const std::string& data, uint8_t opcode) {
+ return this->send_websocket_message(data.data(), data.size(), opcode);
+}
+
+const HTTPServerLimits DEFAULT_HTTP_LIMITS;
diff --git a/src/AsyncHTTPServer.hh b/src/AsyncHTTPServer.hh
new file mode 100644
index 00000000..8ded5cc0
--- /dev/null
+++ b/src/AsyncHTTPServer.hh
@@ -0,0 +1,228 @@
+#pragma once
+
+#include "WindowsPlatform.hh"
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "AsyncUtils.hh"
+#include "Server.hh"
+
+struct HTTPRequest {
+ enum class Method {
+ GET = 0,
+ POST,
+ DELETE,
+ HEAD,
+ PATCH,
+ PUT,
+ UPDATE,
+ OPTIONS,
+ CONNECT,
+ TRACE,
+ };
+ std::string http_version;
+ Method method;
+ std::string path;
+ std::string fragment;
+ std::unordered_multimap headers; // Header names converted to all lowercase
+ std::unordered_multimap query_params;
+ std::string data;
+
+ // Header name should be entirely lowercase for this function. Returns
+ // nullptr if the header doesn't exist; throws http_error(400) if multiple
+ // instances of it exist.
+ const std::string* get_header(const std::string& name) const;
+
+ const std::string* get_query_param(const std::string& name) const;
+};
+
+struct HTTPResponse {
+ std::string http_version;
+ int response_code = 200;
+ // Content-Length should NOT be specified in headers; it is automatically
+ // added in async_write() if data is not blank.
+ std::unordered_multimap headers;
+ std::string data;
+};
+
+struct WebSocketMessage {
+ uint8_t header[2] = {0, 0};
+ uint8_t opcode = 0x01;
+ uint8_t mask_key[4] = {0, 0, 0, 0};
+ std::string data;
+};
+
+class HTTPError : public std::runtime_error {
+public:
+ HTTPError(int code, const std::string& what);
+ int code;
+};
+
+struct HTTPClient {
+ AsyncSocketReader r;
+ uint64_t last_communication_time = 0;
+ bool is_websocket = false;
+
+ HTTPClient(asio::ip::tcp::socket&& sock);
+
+ asio::awaitable recv_http_request(size_t max_line_size, size_t max_body_size);
+ asio::awaitable send_http_response(const HTTPResponse& resp);
+
+ asio::awaitable recv_websocket_message(size_t max_data_size);
+ asio::awaitable send_websocket_message(const void* data, size_t size, uint8_t opcode = 0x01);
+ asio::awaitable send_websocket_message(const std::string& data, uint8_t opcode = 0x01);
+};
+
+struct HTTPServerLimits {
+ size_t max_http_request_line_size = 0x1000; // 4KB
+ size_t max_http_data_size = 0x200000; // 2MB
+ size_t max_http_keepalive_idle_usecs = 300 * 1000 * 1000; // 5 minutes (0 = no limit)
+ size_t max_websocket_message_size = 0x200000; // 2MB
+ size_t max_websocket_idle_usecs = 300 * 1000 * 1000; // 5 minutes (0 = no limit)
+};
+
+extern const HTTPServerLimits DEFAULT_HTTP_LIMITS;
+
+template
+class AsyncHTTPServer : public Server {
+public:
+ explicit AsyncHTTPServer(
+ std::shared_ptr io_context,
+ const std::string& log_prefix = "[AsyncHTTPServer] ",
+ const HTTPServerLimits& limits = DEFAULT_HTTP_LIMITS)
+ : Server(io_context, log_prefix), limits(limits) {}
+ AsyncHTTPServer(const AsyncHTTPServer&) = delete;
+ AsyncHTTPServer(AsyncHTTPServer&&) = delete;
+ AsyncHTTPServer& operator=(const AsyncHTTPServer&) = delete;
+ AsyncHTTPServer& operator=(AsyncHTTPServer&&) = delete;
+ virtual ~AsyncHTTPServer() = default;
+
+ void listen(const std::string& addr, int port) {
+ if (port == 0) {
+ throw std::runtime_error("Listening port cannot be zero");
+ }
+ asio::ip::address asio_addr = addr.empty() ? asio::ip::address_v4::any() : asio::ip::make_address(addr);
+ auto sock = std::make_shared();
+ sock->name = std::format("http:{}:{}", addr, port);
+ sock->endpoint = asio::ip::tcp::endpoint(asio_addr, port);
+ this->add_socket(std::move(sock));
+ }
+
+protected:
+ HTTPServerLimits limits;
+
+ // Attempts to switch the client to WebSockets. Returns true if this is done
+ // successfully (and the caller should then receive/send WebSocket messages),
+ // or false if this failed (and the caller should send an HTTP response).
+ asio::awaitable enable_websockets(std::shared_ptr c, const HTTPRequest& req) {
+ if (req.method != HTTPRequest::Method::GET) {
+ co_return false;
+ }
+
+ auto connection_header = req.get_header("connection");
+ if (!connection_header || phosg::tolower(*connection_header) != "upgrade") {
+ co_return false;
+ }
+ auto upgrade_header = req.get_header("upgrade");
+ if (!upgrade_header || phosg::tolower(*upgrade_header) != "websocket") {
+ co_return false;
+ }
+ auto sec_websocket_key_header = req.get_header("sec-websocket-key");
+ if (!sec_websocket_key_header) {
+ co_return false;
+ }
+
+ std::string sec_websocket_accept_data = *sec_websocket_key_header + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
+ std::string sec_websocket_accept = phosg::base64_encode(phosg::SHA1(sec_websocket_accept_data).bin());
+
+ HTTPResponse resp;
+ resp.http_version = req.http_version;
+ resp.response_code = 101;
+ resp.headers.emplace("Upgrade", "websocket");
+ resp.headers.emplace("Connection", "upgrade");
+ resp.headers.emplace("Sec-WebSocket-Accept", std::move(sec_websocket_accept));
+ co_await c->send_http_response(resp);
+
+ c->is_websocket = true;
+ co_return true;
+ }
+
+ [[nodiscard]] virtual std::shared_ptr create_client(
+ std::shared_ptr, asio::ip::tcp::socket&& client_sock) {
+ return std::make_shared(std::move(client_sock));
+ }
+
+ // handle_request must do one of the following three things:
+ // 1. Return an HTTP response.
+ // 2. Call enable_websockets, and if it returns true, return nullptr. After
+ // this point, handle_request will not be called again for this client;
+ // handle_websocket_message will be called instead when any WebSocket
+ // messages are received. If enable_websockets returns false,
+ // handle_request must still return an HTTP response.
+ // 3. Throw an exception. In this case, the client receives an HTTP 500
+ // response.
+ virtual asio::awaitable> handle_request(std::shared_ptr c, HTTPRequest&& req) = 0;
+ virtual asio::awaitable handle_websocket_message(std::shared_ptr, WebSocketMessage&&) {
+ co_return;
+ }
+
+ virtual asio::awaitable handle_client(std::shared_ptr c) {
+ asio::steady_timer idle_timer(*this->io_context);
+ while (c->r.get_socket().is_open()) {
+ if (c->is_websocket) {
+ WebSocketMessage msg = co_await c->recv_websocket_message(this->limits.max_websocket_message_size);
+ idle_timer.cancel();
+ try {
+ co_await this->handle_websocket_message(c, std::move(msg));
+ } catch (const std::exception& e) {
+ c->r.close();
+ }
+
+ } else {
+ HTTPRequest req = co_await c->recv_http_request(
+ this->limits.max_http_request_line_size, this->limits.max_http_data_size);
+ idle_timer.cancel();
+ std::unique_ptr resp;
+ try {
+ resp = co_await this->handle_request(c, std::move(req));
+ } catch (const std::exception& e) {
+ resp = std::make_unique();
+ resp->http_version = req.http_version;
+ resp->response_code = 500;
+ resp->headers.emplace("Content-Type", "text/plain");
+ resp->data = "Internal server error:\n";
+ resp->data += e.what();
+ }
+ if (resp) {
+ co_await c->send_http_response(*resp);
+ }
+ auto* conn_header = req.get_header("connection");
+ if (!conn_header || (*conn_header != "keep-alive")) {
+ c->r.close();
+ }
+ }
+
+ size_t idle_usecs_limit = c->is_websocket
+ ? this->limits.max_websocket_idle_usecs
+ : this->limits.max_http_keepalive_idle_usecs;
+ if (idle_usecs_limit && c->r.get_socket().is_open()) {
+ idle_timer.expires_after(std::chrono::microseconds(idle_usecs_limit));
+ idle_timer.async_wait([c](std::error_code ec) {
+ if (!ec) {
+ c->r.close();
+ }
+ });
+ }
+ }
+ idle_timer.cancel();
+ }
+};
diff --git a/src/AsyncUtils.cc b/src/AsyncUtils.cc
new file mode 100644
index 00000000..12171e8d
--- /dev/null
+++ b/src/AsyncUtils.cc
@@ -0,0 +1,160 @@
+#include "AsyncUtils.hh"
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+using namespace std;
+
+AsyncEvent::AsyncEvent(asio::any_io_executor ex)
+ : executor(ex), is_set(false) {}
+
+void AsyncEvent::set() {
+ lock_guard g(this->lock);
+ this->is_set = true;
+ for (auto& waiter : this->waiters) {
+ asio::post(this->executor,
+ [handler = std::move(waiter)]() mutable {
+ (*handler)();
+ });
+ }
+ this->waiters.clear();
+}
+
+void AsyncEvent::clear() {
+ lock_guard g(this->lock);
+ this->is_set = false;
+}
+
+asio::awaitable AsyncEvent::wait() {
+ auto token = asio::use_awaitable_t<>{};
+ co_await asio::async_initiate, void()>(
+ [this](auto&& handler) -> void {
+ lock_guard g(this->lock);
+ if (this->is_set) {
+ handler();
+ } else {
+ this->waiters.emplace_back(make_unique>(std::move(handler)));
+ }
+ },
+ token);
+}
+
+AsyncSocketReader::AsyncSocketReader(asio::ip::tcp::socket&& sock)
+ : sock(std::move(sock)) {}
+
+asio::awaitable AsyncSocketReader::read_line(const char* delimiter, size_t max_length) {
+ size_t delimiter_size = strlen(delimiter);
+ if (delimiter_size == 0) {
+ throw logic_error("delimiter is empty");
+ }
+ size_t delimiter_backup_bytes = delimiter_size - 1;
+
+ size_t delimiter_pos = this->pending_data.find(delimiter);
+ while ((delimiter_pos == string::npos) && (!max_length || (this->pending_data.size() < max_length))) {
+ size_t pre_size = this->pending_data.size();
+ this->pending_data.resize(min(max_length, this->pending_data.size() + 0x400));
+
+ auto buf = asio::buffer(this->pending_data.data() + pre_size, this->pending_data.size() - pre_size);
+ size_t bytes_read = co_await this->sock.async_read_some(buf, asio::use_awaitable);
+ this->pending_data.resize(pre_size + bytes_read);
+ delimiter_pos = this->pending_data.find(
+ delimiter,
+ (delimiter_backup_bytes > pre_size) ? 0 : (pre_size - delimiter_backup_bytes));
+ }
+
+ if (delimiter_pos == string::npos) {
+ throw runtime_error("line exceeds max length");
+ }
+
+ // TODO: It's not great that we copy the data here. There's probably a more
+ // idiomatic and efficient way to do this.
+ string ret = this->pending_data.substr(0, delimiter_pos);
+ this->pending_data = this->pending_data.substr(delimiter_pos + delimiter_size);
+ co_return ret;
+}
+
+asio::awaitable AsyncSocketReader::read_data(size_t size) {
+ string ret;
+ if (this->pending_data.size() == size) {
+ this->pending_data.swap(ret);
+ } else if (this->pending_data.size() > size) {
+ ret = this->pending_data.substr(0, size);
+ this->pending_data = this->pending_data.substr(size);
+ } else {
+ size_t bytes_to_read = size - this->pending_data.size();
+ this->pending_data.swap(ret);
+ ret.resize(size);
+ co_await asio::async_read(this->sock, asio::buffer(ret.data() + size - bytes_to_read, bytes_to_read), asio::use_awaitable);
+ }
+ co_return ret;
+}
+
+asio::awaitable AsyncSocketReader::read_data_into(void* data, size_t size) {
+ if (this->pending_data.size() == size) {
+ memcpy(data, this->pending_data.data(), size);
+ this->pending_data.clear();
+ } else if (this->pending_data.size() > size) {
+ memcpy(data, this->pending_data.data(), size);
+ this->pending_data = this->pending_data.substr(size);
+ } else {
+ memcpy(data, this->pending_data.data(), this->pending_data.size());
+ size_t bytes_to_read = size - this->pending_data.size();
+ this->pending_data.clear();
+ void* read_buf = reinterpret_cast(data) + size - bytes_to_read;
+ co_await asio::async_read(this->sock, asio::buffer(read_buf, bytes_to_read), asio::use_awaitable);
+ }
+}
+
+void AsyncWriteCollector::add(string&& data) {
+ const auto& item = this->owned_data.emplace_back(std::move(data));
+ bufs.emplace_back(asio::buffer(item.data(), item.size()));
+}
+
+void AsyncWriteCollector::add_reference(const void* data, size_t size) {
+ bufs.emplace_back(asio::buffer(data, size));
+}
+
+asio::awaitable AsyncWriteCollector::write(asio::ip::tcp::socket& sock) {
+ deque local_owned_data;
+ local_owned_data.swap(this->owned_data);
+ vector local_bufs;
+ local_bufs.swap(this->bufs);
+ co_await asio::async_write(sock, local_bufs, asio::use_awaitable);
+}
+
+asio::awaitable async_sleep(chrono::steady_clock::duration duration) {
+ asio::steady_timer timer(co_await asio::this_coro::executor, duration);
+ co_await timer.async_wait(asio::use_awaitable);
+}
+
+asio::awaitable async_connect_tcp(uint32_t ipv4_addr, uint16_t port) {
+ uint8_t octets[4] = {
+ static_cast(ipv4_addr >> 24),
+ static_cast(ipv4_addr >> 16),
+ static_cast(ipv4_addr >> 8),
+ static_cast(ipv4_addr)};
+ return async_connect_tcp(std::format("{}.{}.{}.{}", octets[0], octets[1], octets[2], octets[3]), port);
+}
+
+asio::awaitable async_connect_tcp(const std::string& host, uint16_t port) {
+ auto executor = co_await asio::this_coro::executor;
+
+ asio::ip::tcp::resolver resolver(executor);
+ auto endpoints = co_await resolver.async_resolve(host, std::format("{}", port), asio::use_awaitable);
+
+ asio::ip::tcp::socket sock(executor);
+ co_await asio::async_connect(sock, endpoints, asio::use_awaitable);
+
+ co_return sock;
+}
+
+asio::awaitable async_connect_tcp(const asio::ip::tcp::endpoint& ep) {
+ auto executor = co_await asio::this_coro::executor;
+ asio::ip::tcp::socket sock(executor);
+ co_await sock.async_connect(ep, asio::use_awaitable);
+ co_return sock;
+}
diff --git a/src/AsyncUtils.hh b/src/AsyncUtils.hh
new file mode 100644
index 00000000..53680283
--- /dev/null
+++ b/src/AsyncUtils.hh
@@ -0,0 +1,252 @@
+#pragma once
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+template
+class AsyncPromise {
+public:
+ AsyncPromise() = default;
+
+ asio::awaitable get() {
+ if (!this->exc && !this->val.has_value()) {
+ auto executor = co_await asio::this_coro::executor;
+ co_await asio::async_initiate(
+ [this, &executor](auto&& new_handler) {
+ this->resolver_ref.emplace(ResolverRef{.resolve = std::move(new_handler), .executor = &executor});
+ },
+ asio::use_awaitable);
+ }
+
+ if (this->exc) {
+ std::rethrow_exception(this->exc);
+ } else if (this->val.has_value()) {
+ co_return *this->val;
+ } else {
+ throw std::logic_error("AsyncPromise await resolved but did not have a value or exception");
+ }
+ }
+
+ void set_value(T&& result) {
+ if (this->exc || this->val.has_value()) {
+ throw std::logic_error("attempted to set value on completed promise");
+ }
+ this->val = result;
+ this->resolve();
+ }
+
+ void set_exception(std::exception_ptr ex) {
+ if (this->exc || this->val.has_value()) {
+ throw std::logic_error("attempted to set value on completed promise");
+ }
+ this->exc = ex;
+ this->resolve();
+ }
+
+ void cancel() {
+ this->set_exception(std::make_exception_ptr(std::runtime_error("AsyncPromise cancelled")));
+ }
+
+ bool done() const {
+ return this->exc || this->val.has_value();
+ }
+
+private:
+ struct ResolverRef {
+ asio::detail::awaitable_handler resolve;
+ asio::any_io_executor* executor;
+ };
+ std::optional val;
+ std::exception_ptr exc;
+ std::optional resolver_ref;
+
+ void resolve() {
+ if (this->resolver_ref.has_value()) {
+ auto* executor = this->resolver_ref->executor;
+ asio::post(*executor, [ref = std::move(this->resolver_ref)]() mutable -> void {
+ ref->resolve(std::error_code{});
+ });
+ this->resolver_ref.reset();
+ }
+ }
+};
+
+template <>
+class AsyncPromise {
+public:
+ AsyncPromise() = default;
+
+ asio::awaitable get() {
+ if (!this->exc && !this->returned) {
+ auto executor = co_await asio::this_coro::executor;
+ co_await asio::async_initiate(
+ [this, &executor](auto&& new_handler) {
+ this->resolver_ref.emplace(ResolverRef{.resolve = std::move(new_handler), .executor = &executor});
+ },
+ asio::use_awaitable);
+ }
+
+ if (this->exc) {
+ std::rethrow_exception(this->exc);
+ } else if (this->returned) {
+ co_return;
+ } else {
+ throw std::logic_error("AsyncPromise await resolved but did not have a value or exception");
+ }
+ }
+
+ void set_value() {
+ if (this->exc || this->returned) {
+ throw std::logic_error("attempted to set value on completed promise");
+ }
+ this->returned = true;
+ this->resolve();
+ }
+
+ void set_exception(std::exception_ptr ex) {
+ if (this->exc || this->returned) {
+ throw std::logic_error("attempted to set value on completed promise");
+ }
+ this->exc = ex;
+ this->resolve();
+ }
+
+ void cancel() {
+ this->set_exception(std::make_exception_ptr(std::runtime_error("AsyncPromise cancelled")));
+ }
+
+ bool done() const {
+ return this->exc || this->returned;
+ }
+
+private:
+ struct ResolverRef {
+ asio::detail::awaitable_handler resolve;
+ asio::any_io_executor* executor;
+ };
+ bool returned;
+ std::exception_ptr exc;
+ std::optional resolver_ref;
+
+ void resolve() {
+ if (this->resolver_ref.has_value()) {
+ auto* executor = this->resolver_ref->executor;
+ asio::post(*executor, [ref = std::move(this->resolver_ref)]() mutable -> void {
+ ref->resolve(std::error_code{});
+ });
+ this->resolver_ref.reset();
+ }
+ }
+};
+
+class AsyncEvent {
+public:
+ AsyncEvent(asio::any_io_executor ex);
+ AsyncEvent(const AsyncEvent&) = delete;
+ AsyncEvent(AsyncEvent&&) = delete;
+ AsyncEvent& operator=(const AsyncEvent&) = delete;
+ AsyncEvent& operator=(AsyncEvent&&) = delete;
+
+ void set();
+ void clear();
+ asio::awaitable wait();
+
+private:
+ asio::any_io_executor executor;
+ bool is_set;
+ std::mutex lock;
+ std::vector>> waiters;
+};
+
+class AsyncSocketReader {
+public:
+ explicit AsyncSocketReader(asio::ip::tcp::socket&& sock);
+ AsyncSocketReader(const AsyncSocketReader&) = delete;
+ AsyncSocketReader(AsyncSocketReader&&) = delete;
+ AsyncSocketReader& operator=(const AsyncSocketReader&) = delete;
+ AsyncSocketReader& operator=(AsyncSocketReader&&) = delete;
+ ~AsyncSocketReader() = default;
+
+ // Reads one line from the socket, buffering any extra data read. The
+ // delimiter is not included in the returned line. max_length = 0 means no
+ // maximum length is enforced.
+ asio::awaitable read_line(
+ const char* delimiter = "\n", size_t max_length = 0);
+ asio::awaitable read_data(size_t size);
+ asio::awaitable read_data_into(void* data, size_t size);
+
+ // The caller cannot know what the socket's read state is, so this should
+ // only be used when the caller intends to write to the socket, not read
+ inline asio::ip::tcp::socket& get_socket() {
+ return this->sock;
+ }
+
+ inline void close() {
+ this->sock.close();
+ }
+
+private:
+ std::string pending_data; // Data read but not yet returned to the caller
+ asio::ip::tcp::socket sock;
+};
+
+class AsyncWriteCollector {
+public:
+ AsyncWriteCollector() = default;
+ AsyncWriteCollector(const AsyncWriteCollector&) = delete;
+ AsyncWriteCollector(AsyncWriteCollector&&) = delete;
+ AsyncWriteCollector& operator=(const AsyncWriteCollector&) = delete;
+ AsyncWriteCollector& operator=(AsyncWriteCollector&&) = delete;
+ ~AsyncWriteCollector() = default;
+
+ void add(std::string&& data);
+
+ // When using add_reference, it is the caller's responsibility to ensure that
+ // the buffer is valid until *this is destroyed or write() returns.
+ void add_reference(const void* data, size_t size);
+
+ asio::awaitable write(asio::ip::tcp::socket& sock);
+
+private:
+ std::deque owned_data;
+ std::vector bufs;
+};
+
+asio::awaitable async_sleep(std::chrono::steady_clock::duration duration);
+
+inline asio::ip::tcp::endpoint make_endpoint_ipv4(uint32_t addr, uint16_t port) {
+ return asio::ip::tcp::endpoint(asio::ip::address_v4(addr), port);
+}
+
+inline std::string str_for_endpoint(const asio::ip::tcp::endpoint& ep) {
+ return ep.address().to_string() + std::format(":{}", ep.port());
+}
+
+inline uint32_t ipv4_addr_for_asio_addr(const asio::ip::address& addr) {
+ if (!addr.is_v4()) {
+ throw std::runtime_error("Address is not IPv4");
+ }
+ return ntohl(addr.to_v4().to_uint());
+}
+
+asio::awaitable async_connect_tcp(uint32_t ipv4_addr, uint16_t port);
+asio::awaitable async_connect_tcp(const std::string& host, uint16_t port);
+asio::awaitable async_connect_tcp(const asio::ip::tcp::endpoint& ep);
+
+template
+asio::awaitable> call_on_thread_pool(asio::thread_pool& pool, FnT&& f, ArgTs&&... args) {
+ using ReturnT = std::invoke_result_t;
+ auto bound = std::bind(std::forward(f), std::forward(args)...);
+ AsyncPromise promise;
+
+ asio::post(pool, [&promise, &bound]() -> void {
+ promise.set_value(bound());
+ });
+ co_return co_await promise.get();
+}
diff --git a/src/BattleParamsIndex.cc b/src/BattleParamsIndex.cc
index 4385e900..b05f8f9c 100644
--- a/src/BattleParamsIndex.cc
+++ b/src/BattleParamsIndex.cc
@@ -11,25 +11,25 @@ using namespace std;
void BattleParamsIndex::Table::print(FILE* stream) const {
auto print_entry = +[](FILE* stream, const PlayerStats& e) {
- fprintf(stream,
- "%5hu %5hu %5hu %5hu %5hu %5hu %5hu %5hu %5" PRIu32 " %5" PRIu32,
- e.char_stats.atp.load(),
- e.char_stats.mst.load(),
- e.char_stats.evp.load(),
- e.char_stats.hp.load(),
- e.char_stats.dfp.load(),
- e.char_stats.ata.load(),
- e.char_stats.lck.load(),
- e.esp.load(),
- e.experience.load(),
- e.meseta.load());
+ phosg::fwrite_fmt(stream,
+ "{:5} {:5} {:5} {:5} {:5} {:5} {:5} {:5} {:5} {:5}",
+ e.char_stats.atp,
+ e.char_stats.mst,
+ e.char_stats.evp,
+ e.char_stats.hp,
+ e.char_stats.dfp,
+ e.char_stats.ata,
+ e.char_stats.lck,
+ e.esp,
+ e.experience,
+ e.meseta);
};
for (size_t diff = 0; diff < 4; diff++) {
- fprintf(stream, "%c ZZ ATP PSV EVP HP DFP ATA LCK ESP EXP DIFF\n",
+ phosg::fwrite_fmt(stream, "{} ZZ ATP PSV EVP HP DFP ATA LCK ESP EXP DIFF\n",
abbreviation_for_difficulty(diff));
for (size_t z = 0; z < 0x60; z++) {
- fprintf(stream, " %02zX ", z);
+ phosg::fwrite_fmt(stream, " {:02X} ", z);
print_entry(stream, this->stats[diff][z]);
fputc('\n', stream);
}
@@ -54,8 +54,8 @@ BattleParamsIndex::BattleParamsIndex(
for (uint8_t episode = 0; episode < 3; episode++) {
auto& file = this->files[is_solo][episode];
if (file.data->size() < sizeof(Table)) {
- throw runtime_error(phosg::string_printf(
- "battle params table size is incorrect (expected %zX bytes, have %zX bytes; is_solo=%hhu, episode=%hhu)",
+ throw runtime_error(std::format(
+ "battle params table size is incorrect (expected {:X} bytes, have {:X} bytes; is_solo={}, episode={})",
sizeof(Table), file.data->size(), is_solo, episode));
}
file.table = reinterpret_cast(file.data->data());
diff --git a/src/CatSession.cc b/src/CatSession.cc
deleted file mode 100644
index a8e7cf23..00000000
--- a/src/CatSession.cc
+++ /dev/null
@@ -1,187 +0,0 @@
-#include "CatSession.hh"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "Loggers.hh"
-#include "PSOProtocol.hh"
-#include "ProxyCommands.hh"
-#include "ReceiveCommands.hh"
-#include "ReceiveSubcommands.hh"
-#include "SendCommands.hh"
-
-using namespace std;
-
-CatSession::exit_shell::exit_shell() : runtime_error("shell exited") {}
-
-CatSession::CatSession(
- shared_ptr base,
- const struct sockaddr_storage& remote,
- Version version,
- shared_ptr bb_key_file)
- : log(phosg::string_printf("[CatSession:%s] ", phosg::name_for_enum(version)), proxy_server_log.min_level),
- base(base),
- read_event(event_new(this->base.get(), 0, EV_READ | EV_PERSIST, CatSession::dispatch_read_stdin, this), event_free),
- channel(version, 1, CatSession::dispatch_on_channel_input, CatSession::dispatch_on_channel_error, this, "CatSession"),
- bb_key_file(bb_key_file) {
-
- if (remote.ss_family != AF_INET) {
- throw runtime_error("remote is not AF_INET");
- }
-
- string netloc_str = phosg::render_sockaddr_storage(remote);
- this->log.info("Connecting to %s", netloc_str.c_str());
-
- struct bufferevent* bev = bufferevent_socket_new(
- this->base.get(), -1, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_DEFER_CALLBACKS);
- if (!bev) {
- throw runtime_error(phosg::string_printf("failed to open socket (%d)", EVUTIL_SOCKET_ERROR()));
- }
- this->channel.set_bufferevent(bev, 0);
-
- if (bufferevent_socket_connect(this->channel.bev.get(),
- reinterpret_cast(&remote), sizeof(struct sockaddr_in)) != 0) {
- throw runtime_error(phosg::string_printf("failed to connect (%d)", EVUTIL_SOCKET_ERROR()));
- }
-
- event_add(this->read_event.get(), nullptr);
- this->poll.add(0, POLLIN);
-}
-
-void CatSession::execute_command(const std::string& command) {
- string full_cmd = phosg::parse_data_string(command, nullptr, phosg::ParseDataFlags::ALLOW_FILES);
- send_command_with_header(this->channel, full_cmd.data(), full_cmd.size());
-}
-
-void CatSession::dispatch_on_channel_input(
- Channel& ch, uint16_t command, uint32_t flag, std::string& data) {
- auto* session = reinterpret_cast(ch.context_obj);
- session->on_channel_input(command, flag, data);
-}
-
-void CatSession::on_channel_input(
- uint16_t command, uint32_t flag, std::string& data) {
- if (!uses_v4_encryption(this->channel.version)) {
- if (command == 0x02 || command == 0x17 || command == 0x91 || command == 0x9B) {
- const auto& cmd = check_size_t(data, 0xFFFF);
- if (uses_v3_encryption(this->channel.version)) {
- this->channel.crypt_in = make_shared(cmd.server_key);
- this->channel.crypt_out = make_shared(cmd.client_key);
- this->log.info("Enabled V3 encryption (server key %08" PRIX32 ", client key %08" PRIX32 ")",
- cmd.server_key.load(), cmd.client_key.load());
- } else { // PC, DC, or patch server
- this->channel.crypt_in = make_shared(cmd.server_key);
- this->channel.crypt_out = make_shared(cmd.client_key);
- this->log.info("Enabled V2 encryption (server key %08" PRIX32 ", client key %08" PRIX32 ")",
- cmd.server_key.load(), cmd.client_key.load());
- }
- }
- } else { // BB
- if (command == 0x03 || command == 0x9B) {
- if (!this->bb_key_file) {
- throw runtime_error("BB encryption requires a key file");
- }
- const auto& cmd = check_size_t(data, 0xFFFF);
- this->channel.crypt_in = make_shared(*this->bb_key_file, &cmd.server_key[0], sizeof(cmd.server_key));
- this->channel.crypt_out = make_shared(*this->bb_key_file, &cmd.client_key[0], sizeof(cmd.client_key));
- this->log.info("Enabled BB encryption");
- }
- }
-
- // TODO: Use the iovec form of print_data here instead of
- // prepend_command_header (which copies the string)
- string full_cmd = prepend_command_header(this->channel.version, this->channel.crypt_in.get(), command, flag, data);
- phosg::print_data(stdout, full_cmd, 0, nullptr, phosg::PrintDataFlags::PRINT_ASCII | phosg::PrintDataFlags::OFFSET_16_BITS);
-}
-
-void CatSession::dispatch_on_channel_error(Channel& ch, short events) {
- auto* session = reinterpret_cast(ch.context_obj);
- session->on_channel_error(events);
-}
-
-void CatSession::on_channel_error(short events) {
- if (events & BEV_EVENT_CONNECTED) {
- this->log.info("Channel connected");
- }
- if (events & BEV_EVENT_ERROR) {
- int err = EVUTIL_SOCKET_ERROR();
- this->log.warning("Error %d (%s) in unlinked client stream", err,
- evutil_socket_error_to_string(err));
- }
- if (events & (BEV_EVENT_ERROR | BEV_EVENT_EOF)) {
- this->log.info("Session endpoint has disconnected");
- this->channel.disconnect();
- event_base_loopexit(this->base.get(), nullptr);
- }
-}
-
-void CatSession::dispatch_read_stdin(evutil_socket_t, short, void* ctx) {
- reinterpret_cast(ctx)->read_stdin();
-}
-
-void CatSession::read_stdin() {
- bool any_command_read = false;
- for (;;) {
- auto poll_result = this->poll.poll();
- short fd_events = 0;
- try {
- fd_events = poll_result.at(0);
- } catch (const out_of_range&) {
- }
-
- if (!(fd_events & POLLIN)) {
- break;
- }
-
- string command(2048, '\0');
- if (!fgets(command.data(), command.size(), stdin)) {
- if (!any_command_read) {
- // ctrl+d probably; we should exit
- fputc('\n', stderr);
- event_base_loopexit(this->base.get(), nullptr);
- return;
- } else {
- break; // probably not EOF; just no more commands for now
- }
- }
-
- // trim the extra data off the string
- size_t len = strlen(command.c_str());
- if (len == 0) {
- break;
- }
- if (command[len - 1] == '\n') {
- len--;
- }
- command.resize(len);
- any_command_read = true;
-
- try {
- execute_command(command);
- } catch (const exit_shell&) {
- event_base_loopexit(this->base.get(), nullptr);
- return;
- } catch (const exception& e) {
- fprintf(stderr, "FAILED: %s\n", e.what());
- }
- }
-}
diff --git a/src/CatSession.hh b/src/CatSession.hh
deleted file mode 100644
index 6cd664c0..00000000
--- a/src/CatSession.hh
+++ /dev/null
@@ -1,54 +0,0 @@
-#pragma once
-
-#include
-
-#include