mirror of
https://gitea.tendokyu.moe/TeamTofuShop/segatools.git
synced 2026-10-10 02:28:10 +03:00
This adds full support for the Taisen series of games, namely Sangokushi Taisen and Eiketsu Taisen. Games added: * Sangokushi Taisen (SDDD) * Eiketsu Taisen (SDGY) Devices added: * CHC-320 printer (SGT) * "Printer camera" (SGT, unsure what this actually really is) * CX-7000 printer (EKT) * Y3CR BD SIE F720MM (SGT, EKT) Notable changes in the codebase: * Renamed everything printer specific to seperate between CHC and CX. * Many new function and registry hooks were added across the board. * An error is now logged when segatools.ini (or the path in `SEGATOOLS_CONFIG_PATH`) cannot be found. * Netenv now redirects UDP broadcasts targeted at the subnet that is specified in the keychip configuration. The terminal announces it's presence by broadcasting UDP to 192.168.189.255, this will be redirected to 255.255.255.255. * Vfs now seperates between absolute and relative paths in `vfs_fixup_path` via an environment variable called `SEGATOOLS_VFS_RELATIVE_PATH`. This is needed because amcapture accesses files as workingdirectory-relative. * The Y3 board emulation has support for external Y3 I/O dlls. The default implementation (y3ws) that comes with this is a websocket implementation. The docs are available under `doc\y3ws.txt` and a sample card player .html file is under `dist\ekt\card_player.html`. I already know one person that is hosting a massively improved version of it. * For websockets, my own websocket implementation is used as a subproject (MIT license): https://github.com/akechi-haruka/cwinwebsocket * For JSON, cJSON was embedded (MIT license): https://github.com/DaveGamble/cJSON * y3ws reads all printed cards from `DEVICE\print` by default including card back sides. It's up to the client to merge or skip them. Remarks: * SGT takes ~8 minutes to load. This seems to be intentional. * SGT uses some weird TCP network implementation like IDZ. I have not bothered reversing that yet and I have confirmed everything working from the test menu. * EKT will throw a network error if no terminal is found. You must run the terminal on another computer to be able to launch the satellite. * EKT has a very bizzare speed glitch that will speed up the ingame unit movement by several 1000% and also slows down cutscene animations by 90%. When this effect is active, you also take a ton more damage than usual. I do not know what causes this and it seems PC specific. * EKT is very stutter sensitive and will throw error 6401 (I/O timeout) at random when trying to alt+tab or have other things running. * EKT features a livestream system called Enbu (or "Dojo Upload"). While you are in a match, regardless of vs. AI or another player, the game will record your screen and live-stream it to the Enbu server as defined by the game server's startup response. The application responsible for that, "AM Capture" will not limit it's recording to the game window, but also anything that overlays the game window (notifications, popups, alt+tabbed windows, web browsers, etc). Since this is live-streamed, killing the process will have no effect afterwards, as the frames showing unwanted things will already have been transmitted. To make people aware of this, a one-time dialog message will pop up when starting EKT. The flag for that is stored in the DEVICE folder. Closes #25. Co-authored-by: Dniel97 <Dniel97@noreply.gitea.tendokyu.moe> Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/85 Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
107 lines
3.3 KiB
C
107 lines
3.3 KiB
C
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
enum {
|
|
EKT_IO_OPBTN_TEST = 0x01,
|
|
EKT_IO_OPBTN_SERVICE = 0x02,
|
|
EKT_IO_OPBTN_COIN = 0x04,
|
|
EKT_IO_OPBTN_SW1 = 0x08,
|
|
EKT_IO_OPBTN_SW2 = 0x10,
|
|
};
|
|
|
|
enum {
|
|
EKT_IO_GAMEBTN_MENU = 0x01,
|
|
EKT_IO_GAMEBTN_START = 0x02,
|
|
EKT_IO_GAMEBTN_STRATAGEM = 0x04,
|
|
EKT_IO_GAMEBTN_STRATAGEM_LOCK = 0x08,
|
|
EKT_IO_GAMEBTN_HOUGU = 0x10,
|
|
EKT_IO_GAMEBTN_RYUUHA = 0x20,
|
|
EKT_IO_GAMEBTN_NUMPAD_0 = 0x100,
|
|
EKT_IO_GAMEBTN_NUMPAD_1 = 0x200,
|
|
EKT_IO_GAMEBTN_NUMPAD_2 = 0x400,
|
|
EKT_IO_GAMEBTN_NUMPAD_3 = 0x800,
|
|
EKT_IO_GAMEBTN_NUMPAD_4 = 0x1000,
|
|
EKT_IO_GAMEBTN_NUMPAD_5 = 0x2000,
|
|
EKT_IO_GAMEBTN_NUMPAD_6 = 0x4000,
|
|
EKT_IO_GAMEBTN_NUMPAD_7 = 0x8000,
|
|
EKT_IO_GAMEBTN_NUMPAD_8 = 0x10000,
|
|
EKT_IO_GAMEBTN_NUMPAD_9 = 0x20000,
|
|
EKT_IO_GAMEBTN_NUMPAD_CLEAR = 0x40000,
|
|
EKT_IO_GAMEBTN_NUMPAD_ENTER = 0x80000,
|
|
EKT_IO_GAMEBTN_VOL_UP = 0x100000,
|
|
EKT_IO_GAMEBTN_VOL_DOWN = 0x200000,
|
|
EKT_IO_GAMEBTN_TERMINAL_LEFT = 0x400000,
|
|
EKT_IO_GAMEBTN_TERMINAL_UP = 0x800000,
|
|
EKT_IO_GAMEBTN_TERMINAL_RIGHT = 0x1000000,
|
|
EKT_IO_GAMEBTN_TERMINAL_DOWN = 0x2000000,
|
|
EKT_IO_GAMEBTN_TERMINAL_LEFT_2 = 0x4000000,
|
|
EKT_IO_GAMEBTN_TERMINAL_RIGHT_2 = 0x8000000,
|
|
EKT_IO_GAMEBTN_TERMINAL_DECIDE = 0x10000000,
|
|
EKT_IO_GAMEBTN_TERMINAL_CANCEL = 0x20000000,
|
|
};
|
|
|
|
/* Get the version of the Eiketsu Taisen IO API that this DLL supports. This
|
|
function should return a positive 16-bit integer, where the high byte is
|
|
the major version and the low byte is the minor version (as defined by the
|
|
Semantic Versioning standard).
|
|
|
|
The latest API version as of this writing is 0x0100. */
|
|
|
|
uint16_t ekt_io_get_api_version(void);
|
|
|
|
/* Initialize the IO DLL. This is the second function that will be called on
|
|
your DLL, after ekt_io_get_api_version.
|
|
|
|
All subsequent calls to this API may originate from arbitrary threads.
|
|
|
|
Minimum API version: 0x0100 */
|
|
|
|
HRESULT ekt_io_init(void);
|
|
|
|
/* Send any queued outputs (of which there are currently none, though this may
|
|
change in subsequent API versions) and retrieve any new inputs.
|
|
|
|
Minimum API version: 0x0100 */
|
|
|
|
HRESULT ekt_io_poll(void);
|
|
|
|
/* Get the state of the cabinet's operator buttons as of the last poll. See
|
|
EKT_IO_OPBTN enum above: this contains bit mask definitions for button
|
|
states returned in *opbtn. All buttons are active-high.
|
|
|
|
Minimum API version: 0x0100 */
|
|
|
|
void ekt_io_get_opbtns(uint8_t *opbtn);
|
|
|
|
/* Get the state of the cabinet's gameplay buttons as of the last poll. See
|
|
EKT_IO_GAMEBTN enum above: this contains bit mask definitions for button
|
|
states returned in *gamebtn. All buttons are active-high.
|
|
|
|
Minimum API version: 0x0100 */
|
|
|
|
void ekt_io_get_gamebtns(uint32_t *gamebtn);
|
|
|
|
/* Get the position of the trackball as of the last poll.
|
|
|
|
Minimum API version: 0x0100 */
|
|
|
|
void ekt_io_get_trackball_position(uint16_t *stick_x, uint16_t *stick_y);
|
|
|
|
/* Initialize LED emulation. This function will be called before any
|
|
other ekt_io_led_*() function calls.
|
|
|
|
All subsequent calls may originate from arbitrary threads and some may
|
|
overlap with each other. Ensuring synchronization inside your IO DLL is
|
|
your responsibility. */
|
|
|
|
HRESULT ekt_io_led_init(void);
|
|
|
|
/* Update the RGB LEDs.
|
|
|
|
Exact layout is TBD. */
|
|
|
|
void ekt_io_led_set_colors(uint8_t board, uint8_t *rgb);
|