mirror of
https://gitea.tendokyu.moe/Hay1tsme/segatools.git
synced 2026-05-06 13:25:35 -05: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>
73 lines
2.6 KiB
C
73 lines
2.6 KiB
C
#pragma once
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <windows.h>
|
|
|
|
#define PRINTER_DATA_VERSION 1
|
|
|
|
struct printer_cx_config {
|
|
bool enable;
|
|
wchar_t printer_out_path[MAX_PATH];
|
|
wchar_t printer_data_path[MAX_PATH];
|
|
char printer_firm_version[8];
|
|
char printer_camera_version[8];
|
|
char printer_config_version[8];
|
|
char printer_table_version[8];
|
|
};
|
|
|
|
struct printer_cx_data {
|
|
uint8_t version;
|
|
uint64_t print_counter;
|
|
uint64_t print_counter_since_clean;
|
|
bool is_transport;
|
|
};
|
|
|
|
enum {
|
|
CX_OK = 0,
|
|
CX_ERROR_FATAL_3301 = -1,
|
|
CX_ERROR_USB_COM_3201 = -2,
|
|
CX_ERROR_PRINT_INTERRUPT_6805_4 = -4,
|
|
CX_ERROR_CODE_UNREADABLE_3303 = -5,
|
|
CX_ERROR_INK_LOW_3202 = -6,
|
|
CX_ERROR_PRINT_INTERRUPT_6805_3 = -7,
|
|
CX_ERROR_NO_CARD_6801 = -16961536,
|
|
CX_ERROR_DOOR_OPEN_6808 = -16961792,
|
|
CX_ERROR_6831 = -16963328,
|
|
CX_ERROR_6810 = -16964864,
|
|
CX_ERROR_CLEAN_PRINTER_3999 = -16973056,
|
|
CX_ERROR_JAM_6805_1 = -17010688,
|
|
CX_ERROR_REVERSE_JAM_6805_2 = -17010944,
|
|
CX_ERROR_CAMERA_JAM_6805_3 = -17011200,
|
|
CX_ERROR_TRANSPORT_JAM_6805_4 = -17011456,
|
|
CX_ERROR_PAPER_SENSOR_JAM_6805_5 = -17011712,
|
|
CX_ERROR_RETRANSFER_JAM_6805_6 = -17011968,
|
|
CX_ERROR_PAPER_RIPPED_6813_3 = -17015040,
|
|
CX_ERROR_CODE_READ_6811 = -17018112,
|
|
CX_ERROR_UNAUTHORIZED_INK_6803_1 = -17018880,
|
|
CX_ERROR_INK_EMPTY_6813_1 = -17019136,
|
|
CX_ERROR_PRINT_TIMEOUT_6810_3 = -17056768,
|
|
CX_ERROR_CAMERA_HARDWARE_FAULT_6810_5 = -17083136,
|
|
CX_ERROR_CAMERA_COM_6810_6 = -17083392,
|
|
CX_ERROR_ROLLER_6810_15 = -17088768,
|
|
CX_ERROR_OVER_TEMPERATURE_6810_16 = -17089024,
|
|
CX_ERROR_POWER_INTERRUPT_6810_1 = -17089280,
|
|
CX_ERROR_INITIALIZATION_6810_2 = -17094656,
|
|
CX_ERROR_OVER_TEMPERATURE_6810_10 = -17100800,
|
|
CX_ERROR_RETRANSFER_ROLLER_6810_11 = -17101056,
|
|
CX_ERROR_THERMOSTAT_6810_12 = -17101312,
|
|
CX_ERROR_OVER_TEMPERATURE_6810_20 = -17101568,
|
|
CX_ERROR_STRAIGHTEN_ROLLER_6810_21 = -17101824,
|
|
CX_ERROR_THERMOSTAT_6810_22 = -17102080,
|
|
CX_ERROR_PRINTER_TOO_COLD_6833_1 = -16971264,
|
|
CX_ERROR_OVER_TEMPERATURE_6810_25 = -17102848,
|
|
CX_ERROR_CAMERA_NOT_FOUND_6810_7 = -17116672,
|
|
CX_ERROR_RETRANSFER_ROLL_EMPTY_6802_3 = -21144064,
|
|
CX_ERROR_INK_ROLL_EMPTY_6802_1 = -21148160,
|
|
CX_ERROR_NOT_CONNECTED_6804 = -33554432,
|
|
CX_ERROR_CAMERA_JAM_6805_7 = -17012224,
|
|
CX_ERROR_INVALID_CLEANING_CARD_6832_1 = -16965376,
|
|
CX_ERROR_TEMPERATURE_RESOLVED_6833_2 = -16971520,
|
|
};
|
|
|
|
void printer_cx_hook_init(const struct printer_cx_config *cfg, HINSTANCE self);
|
|
void printer_cx_hook_insert_hooks(HMODULE target); |