This adds two new config flags to re-enable master registry key access and rebooting. This is needed on real hardware if you want to be able to move to System Test Mode.
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/100
Reviewed-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe>
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
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>
As someone running several games on the same cabinet that share most of the hardware (like KCA and FGO), it's a bit of a hassle switching the COM ports of the hardware around all the time.
This commit adds the ability to place arbitary path redirections in segatools.ini, which is mostly useful for hardcoded serial ports.
Technically this would also allow you to redirect arbitary paths, but I haven't tested that yet.
An example that I personally use is:
```
[vfs]
amfs=amfs
appdata=.
option=option
; aime reader
redirection0from=\\.\COM10
redirection0to=\\.\COM3
; rfid reader
redirection1from=\\.\COM12
redirection1to=\\.\COM2
; POP led begone
redirection2from=\\.\COM9
redirection2to=\\.\COM90
; partition to pop
redirection3from=\\.\COM11
redirection3to=\\.\COM9
```
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/62
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
(Yeah, I know the OS may cache disk reads, but that wasn't the concern)
The ALLS series of cabs runs EWF to prevent anything from being written to C:\.
This PR adds another layer to iohook to redirect specific open/read/write/close operations to a virtual file table to prevent disk activity, and thus simulate the presence of EWF. This was mainly aimed at ALPB's billing files. Seriously, look at this - especially the timestamps, Sega wtf are you doing.
This does not affect other path hooks. It's turned off by default and will throw an error if the current executable resides on C:\.
Tested with FGO and APMv3.
![22bf755754[1].png](/attachments/31771aee-2e4d-4e4f-85e3-c5eec63c6f78)
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/84
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
This adds a setting to the global configuration to allow only input when the game is focused. This prevents issues, such as triggering game buttons or service buttons while being tabbed out. Turned off by default.
The implementation is not the best, but in the context how these games are structured, the most acceptable.
It will keep scanning if the foreground window title fully matches (some games partially match, like FGO because due to the revision number in the title), and if found, will grab the HWND of that window and compare that from then on, to not tank performance due to constant string operations.
Tested with FGO, chusan and ongeki.
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/83
Reviewed-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe>
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
This PR adds everything that's needed on the segatools side to add E-Money support regarding Thinca authentication cards.
I've also included set-up documentation (with a network side bonus which was as far as I could figure out so far, but I'm pretty certain no more changes to segatools will be needed)
Due to the nature of a custom protcol called TCAP that Thinca uses for networking (see docs), I can't fully test that everything works as I haven't yet bothered to figure that protocol out.
Tested with both APMv3 and FGO.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/35
Co-authored-by: Haruka <haruka@noreply.gitea.tendokyu.moe>
Co-committed-by: Haruka <haruka@noreply.gitea.tendokyu.moe>
Pretty simple, adds a new config setting to the gfx category, which defaults to enabled to disable DPI scaling if a scale higher than 100% is used, causing game windows to appear stretched and blurry.
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/64
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
- Added new aime generation: 837-15286 and 837-15396
- New config setting `[aime] gen=3` for 837-15396
- Updated LED information for card reader
- Updated all games with the needed reader generation?
- Configure separate pedals which are not part of the steering wheel (base)
- It is now possible to have a different steering wheel, pedal and shifter brand all connected to 3 different USB ports
- XInput does not have a deadzone at the end of the max steering anymore and the `restrict` setting works as intended