59 Commits
Author SHA1 Message Date
Hay1tsme c929c85b1d add a few more keychip flags and descriptions 2026-09-15 21:52:01 -04:00
Haruka be2612b5c4 docs: keychip flags (#136)
I was wondering where "All.Net Slim: OFF" in the system program was coming from

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/136
Co-authored-by: Haruka <396+haruka@noreply.gitea.tendokyu.moe>
2026-09-13 19:22:31 +00:00
MikiraSora 31c184adf7 unity: support debugging (#99)
User can debug their Unity game with dnspy and other debugger, it needn't patch mono.dll.

most code is copied&modified from [UnityDoorstop](https://github.com/NeighTools/UnityDoorstop/blob/master/src/bootstrap.c#L328)

currently it work on SDEZ/SDDT

<details>
  <summary>How to debug and breakpoint Unity game (For example SDDT)</summary>

1.   Modify segatools.ini and set `enableDebug` and `debugAddress`
![image.png](/attachments/60a681ac-f050-4923-b955-6b3fdd93a75e)

2.   Inject mu3 with hook dll
![image.png](/attachments/b51391e8-92b4-4c6b-b531-f4171f2f4447)

3.   dnspy connect unity
![image.png](/attachments/513906d3-0f14-4e40-be9f-da87928eeaaf)

4.  open Modules tab and double click Assembly-CSharp.dll, yeah, now you can add breakpoints now.
![image.png](/attachments/5e2a1f0b-62fd-4e68-997f-c2c68efee9ef)

</details>

and make unity_config.target_assembly is optional if we just want to debug unity.

Now PR is ready to code review and merge into upstream.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/99
Co-authored-by: MikiraSora <mikirasora0409@126.com>
Co-committed-by: MikiraSora <mikirasora0409@126.com>
2026-08-10 15:42:41 +00:00
kyoubate-haruka fab190272c nusec: add data persistence (#124)
Adds an opt-in toggle to make keychip data (playcount, log, etc.) persistent into a file located in the DEVICE folder.

Now why you would want to do that, I don't know myself. But higher accurracy to the real thing is always cool.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/124
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
2026-07-19 08:21:03 +00:00
グローランプ 89bd77e306 IO: Resolve IO DLL paths from environment variables (#119)
## Summary

Adds a unified mechanism for locating third-party IO DLLs through environment
variables, on top of the existing per-game `[xxxio] path=` INI setting.

## Changes

For each IO DLL, the path is resolved in this order:

1. The section-specific INI value, e.g. `[mai2io] path=`.
2. The section-specific environment variable, e.g. `SEGATOOLS_MAI2IO_PATH`.
3. `SEGATOOLS_IO_ROOT` joined with the default IO DLL filename, e.g.
   `%SEGATOOLS_IO_ROOT%\mai2io.dll`.
4. Empty path, which keeps the built-in IO implementation (unchanged default).

INI and environment-variable paths are run through Windows environment-variable
expansion, so values such as `%SEGATOOLS_IO_ROOT%\mai2io.dll` are valid in the
INI directly.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/119
Co-authored-by: グローランプ <130208311+Gl0w1amp@users.noreply.github.com>
Co-committed-by: グローランプ <130208311+Gl0w1amp@users.noreply.github.com>
2026-07-08 20:23:08 +00:00
Hay1tsme e0d18cf5c2 Merge pull request 'nfc: add setting to change FeliCa PMm to read as FeliCa Mobile' (#118) from Haruka/segatools:mobile_felica into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/118
2026-06-23 00:48:41 +00:00
Gl0w1amp c3af3ced3a Merge branch 'develop' into feature/netenv-broadcast-toggle 2026-06-19 17:16:08 +00:00
kyoubate-haruka a8f75521d5 nfc: add setting to change FeliCa PMm to read as FeliCa Mobile 2026-06-12 11:44:31 +02:00
Hay1tsme 5d330238d8 Merge pull request 'Get amGfetcher working ("DownloadOrder")' (#112) from Haruka/segatools:gfetcher into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/112
2026-06-09 04:11:21 +00:00
kyoubate-haruka ffe569297e vfs: add toggle to intentionally break download process 2026-05-30 11:37:17 +02:00
kyoubate-haruka ad7f6bc800 misc: rename NextProcess.txt file setting 2026-05-30 10:20:09 +02:00
kyoubate-haruka 268f252d3e misc: add ability to write NextProcess to file 2026-05-28 11:15:01 +02:00
samnyan 5f818a4457 doc: add usage notes for [touch] config 2026-04-21 12:12:55 +08:00
グローランプ d0d470c679 netenv: add redirectBroadcast configuration option to control UDP broadcast redirection 2026-04-13 00:18:32 +10:00
Dniel97 e387f582a9 doc: region improvements and vfs corrected 2026-03-24 22:10:27 +01:00
kyoubate-haruka 85b8ae02fa misc: add ability to re-enable a few things (#100)
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>
2026-03-04 07:58:01 +00:00
kyoubate-harukaandDniel97 9c67f53902 Add support for Sangokushi Taisen and Eiketsu Taisen (#85)
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>
2026-02-26 19:31:45 +00:00
kyoubate-haruka a3ac466dba Vfs: Add ability to redirect arbitary paths (= serial ports) (#62)
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>
2026-02-08 11:12:02 +00:00
kyoubate-haruka d5bde32df7 ewf: implement EWF virtualization (#84)
(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>
2025-12-25 00:04:30 +01:00
kyoubate-haruka b86049034f Add setting to only allow game input in foreground (#83)
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>
2025-11-12 22:33:32 +00:00
Dniel97 19cd7cb8df common: add OpenSSL Intel SHA ext hook 2025-10-05 11:01:13 +02:00
Dniel97 bb01e131e9 [epay]: hook enabled by default 2025-07-27 18:06:58 +02:00
Dniel97 015097972a emoney: improce doc and add python script 2025-04-17 19:17:42 +02:00
Haruka 67eda7458b emoney: Add Thinca authentication card stuff (#35)
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.

![https://puu.sh/KeqVj/ccf4bcccbb.png](https://puu.sh/KeqVj/ccf4bcccbb.png)

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>
2025-04-17 17:01:38 +00:00
kyoubate-haruka 61f95c3f2e GFX: add dpi-awareness switch for all games (#64)
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>
2025-03-14 11:53:31 +00:00
Dniel97 e850346b79 renamed start.bat to launch.bat 2025-03-02 00:25:15 +01:00
Hay1tsme 004a2f6dcd docs: fix playformID and billingType config docs 2025-02-21 19:37:54 -05:00
Bottersnike 0c28765bdd Revert: Add automatically apply OpenSSL patch for Intel Gen 10+ CPUs 2024-12-27 14:12:58 +00:00
Dniel97 96bf8cab81 aime: add portNo to config 2024-12-23 21:49:24 +01:00
Dniel97 b4f5cdbe59 Merge pull request 'Add automatically apply OpenSSL patch for Intel Gen 10+ CPUs' (#43) from kagaminehaku/segatools:develop into develop
Reviewed-on: https://gitea.tendokyu.moe/Dniel97/segatools/pulls/43
2024-12-23 19:43:47 +00:00
KagamineHaku 25431a9db1 Add "openssl" config key doc 2024-12-24 02:34:44 +07:00
Dniel97 a705ae8748 Merge pull request 'Add changeable config path' (#53) from GEEKiDoS/segatools:develop into develop
Reviewed-on: https://gitea.tendokyu.moe/Dniel97/segatools/pulls/53
2024-12-23 18:04:12 +00:00
GEEKi 21bb965382 typo 2024-12-16 11:14:14 +08:00
GEEKi 11556a1332 add changeable config path 2024-12-16 11:09:38 +08:00
r0x5a d8202e1df4 dns: add port overriding support 2024-12-12 02:28:02 +08:00
SanheiandSanheiii ceb2b63e8b Modify host header in HTTP requests to bypass domain censorship in China. (#34)
Co-authored-by: Sanheiii <35133371+Sanheiii@users.noreply.github.com>
Reviewed-on: https://gitea.tendokyu.moe/Dniel97/segatools/pulls/34
Co-authored-by: Sanhei <sanhei@noreply.gitea.tendokyu.moe>
Co-committed-by: Sanhei <sanhei@noreply.gitea.tendokyu.moe>
2024-11-11 16:24:33 +00:00
kyoubate-haruka cc5b87b559 add vfd settings to docs 2024-08-23 17:23:59 +02:00
Dniel97 f3e31fc2ae improved doc 2024-06-30 19:37:04 +02:00
Dniel97 097b74d849 cxb: server support added, bugfixes, thanks @Midorica 2024-03-13 21:40:25 +01:00
Dniel97 451a7ec49d added VFD toggle to config 2024-02-06 12:34:11 +01:00
Dniel97 dae3018411 doc: added develop dongle hint 2024-01-27 23:10:59 +01:00
Dniel97 0affc96e3e small optimizations 2024-01-16 17:54:06 +01:00
Dniel97 793417e891 added new aime card reader generation
- 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?
2023-12-03 18:45:42 +01:00
Dniel97 3cf5cbb793 added LED 15093-06 credits and docs 2023-11-12 19:14:42 +01:00
Dniel97 d521eeb43e idz, idac, swdc: Added separate pedals config, better XInput controls
- 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
2023-10-05 00:46:54 +02:00
Dniel97 a4bd570cfc chusan, mai2, mu3, swdc: removed emoney config 2023-10-05 00:35:55 +02:00
Dniel97 51b11469d0 added aimeGen as default instead of feliciaGen 2023-08-29 22:57:04 +02:00
Dniel97 608c9ac1a6 chusan, cm, mai2, mu3: Added dipSw support and highBaudrate AiMe 2023-08-15 17:28:19 +02:00
Kevin Trocolli 8b58116f25 platform: make billing type configurable 2023-02-13 03:08:40 -05:00
Tau 9bbcac6536 Document IO DLL configuration 2021-12-27 20:55:10 -05:00