Commit Graph
923 Commits
Author SHA1 Message Date
Hay1tsme ea0efdc080 Merge pull request 'spike: add ability to change to hex rvas' (#117) from Haruka/segatools:spike_hex into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/117
2026-06-23 00:51:04 +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
Hay1tsme fb71dab20e Merge pull request 'netenv: add redirectBroadcast toggle and stop broadcast log spam' (#104) from Gl0w1amp/segatools:feature/netenv-broadcast-toggle into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/104
2026-06-23 00:45:43 +00:00
Hay1tsme 89cd55196f Merge pull request '[+] chusan fullscreen alt+tab crash fix' (#115) from azaneko/segatools:develop into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/115
2026-06-23 00:40:31 +00:00
Gl0w1amp c3af3ced3a Merge branch 'develop' into feature/netenv-broadcast-toggle 2026-06-19 17:16:08 +00:00
azaneko c1527df801 Merge branch 'develop' into develop 2026-06-18 02:18:35 +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
kyoubate-haruka 700efa8d85 spike: add ability to change to hex rvas 2026-06-11 10:25:42 +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
Azalea fd1e970b0a [+] chusan fullscreen alt+tab crash fix 2026-06-08 20:21:52 -04:00
Hay1tsme db85fe083e Merge pull request 'sekito: save infrared pattern to file' (#111) from Haruka/segatools:sgt_print_infrared into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/111
2026-05-31 00:13:08 +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 de82acf782 reg: allow opening keys multiple times 2026-05-29 12:06:27 +02:00
kyoubate-haruka 268f252d3e misc: add ability to write NextProcess to file 2026-05-28 11:15:01 +02:00
kyoubate-haruka 2a08e3f59f dns: forward AbaaS log server to configured server 2026-05-27 23:24:08 +02:00
kyoubate-haruka 31e5cdf76d reg: add various missing registry keys 2026-05-27 23:23:35 +02:00
kyoubate-haruka 6b1f494559 path: hook GetDiskFreeSpaceW for amGfetcher 2026-05-25 11:32:35 +02:00
kyoubate-haruka 0bb318f58c sekito: save infrared pattern to file 2026-05-25 11:30:35 +02:00
Dniel97 ed17331c7a misc: fix docker build with space in path 2026-05-13 18:36:23 +02:00
HaseoSoraandDniel97 31a6d3aacf Lowered sbringBoost (#103)
Lowered springBoost from 1.5x to 1.0x

Co-authored-by: Dniel97 <Dniel97@noreply.gitea.tendokyu.moe>
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/103
Co-authored-by: HaseoSora <haseosora@noreply.gitea.tendokyu.moe>
Co-committed-by: HaseoSora <haseosora@noreply.gitea.tendokyu.moe>
2026-05-12 08:02:16 +00:00
Dniel97 a21548d031 Merge pull request 'doc: add usage notes for [touch] config' (#105) from sam_nya/segatools:develop into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/105
2026-05-12 08:01:26 +00:00
Dniel97 e903f206a6 Merge pull request 'sekito: fix second page overwriting first page' (#108) from Haruka/segatools:fix_sgt_print into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/108
2026-05-12 07:59:59 +00:00
kyoubate-haruka abe1a9d77e sekito: fix second page overwriting first page 2026-05-06 11:28:15 +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
グローランプ f4841280e7 netenv: enhance broadcast logging to prevent log spamming by tracking unique source/destination pairs 2026-04-13 00:12:49 +10:00
Dniel97 54614224fd update readme 2026-04-06 14:25:43 +02:00
HaseoSora ddc969ff04 haseosora-springBoost-Integration (#102)
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/102
Reviewed-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe>
Co-authored-by: HaseoSora <haseosora@noreply.gitea.tendokyu.moe>
Co-committed-by: HaseoSora <haseosora@noreply.gitea.tendokyu.moe>
2026-04-06 12:22:00 +00:00
Gl0w1amp 2c2b8b11b4 Fix mai2 memory leak via LED 15070 rate-limiting and enhance touch handling (#101)
## Overview
This PR addresses the severe memory leak and performance issues observed in `mai2`, while also introducing improvements to the touch emulation logic.

## Root Cause Analysis
As discussed previously, the root cause of the `mai2` memory leak is not a global `segatools` buffer bug. Instead, the game aggressively spams overlapped empty reads specifically on the `LED 15070` UART. On real hardware, the serial driver naturally throttles this. Under emulation, without a throttle, it hits approximately **260kHz of empty async reads**, which causes the memory usage to explode.

## The Fix
Instead of introducing complex locking mechanisms and condition variables globally in `uart.c`, this PR applies a targeted fix:
* Added a local `Sleep(1)` directly in `common/board/led15070.c` to rate-limit empty reads on the LED path.
* Because this is isolated to LED communications, it completely resolves the memory leak without introducing any lag, livelocks, or overhead to other critical inputs.

## Additional Changes in this PR
Alongside the memory leak fix, this PR includes a few touch-related improvements (as touch emulation was reviewed during the debugging process):
* Enhanced touch input handling and improved auto-scan state management.
* Implemented IOCTL handling for touch input to properly manage communication status.

## Testing
* **mai2:** Tested successfully on multiple machines. The memory leak is completely gone, and the game runs smoothly.
* **chusan:** Tested to ensure no regressions. Sliders and inputs work flawlessly without the lag.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/101
Co-authored-by: Gl0w1amp <gl0w1amp@noreply.gitea.tendokyu.moe>
Co-committed-by: Gl0w1amp <gl0w1amp@noreply.gitea.tendokyu.moe>
2026-04-03 15:13:27 +00:00
Dniel97 ba6ec91cce idz: bypass size check 2026-04-03 16:00:15 +02:00
Dniel97 e387f582a9 doc: region improvements and vfs corrected 2026-03-24 22:10:27 +01:00
Dniel97 0b81ea38dd bump capnhook rev 2026-03-09 21:13: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
Dniel97 1c7531e45e ekt: add gfx hook, misc: bugfixes 2026-02-26 23:26:51 +01: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
Dniel97 b9e714dd1d touch: always show cursor if enabled 2026-02-11 23:39:09 +01:00
Dniel97 ef3fa640fd diva: small touch controller improvements 2026-02-09 21:29:36 +01:00
Dniel97 c24363b65d diva: add ELO touch support, thanks @emihiok 2026-02-08 18:17:53 +01:00
Dniel97 351188d285 change MAX_REDIRECTIONS from 64 to 8 2026-02-08 12:21:04 +01: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
グローランプ 21e5238b0a aimeio: Implement full aime reader function in aimeio (#94)
This PR implements the missing NFC, FeliCa, and Mifare command handlers in `aimeio`. This expands the reader's capability to support games and tools that utilize these specific radio functions.

**Changes:**
* Implemented NFC radio control functions.
* Added MIFARE and FeliCa command handling.
* Updated `aimeio` DLL exports and hook definitions.

**Testing Status:**
* I have verified the implementation using a virtual `aimeio` test environment, and the command handling works as expected.
   But I currently do not have access to a physical card reader, so haven't been able to verify the behavior on actual hardware yet.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/94
Co-authored-by: グローランプ <130208311+Gl0w1amp@users.noreply.github.com>
Co-committed-by: グローランプ <130208311+Gl0w1amp@users.noreply.github.com>
2026-02-08 11:01:01 +00:00
Dniel97 966eeeeb87 mercury: update mystery cmds, add fg detect, cleanup 2026-01-19 19:51:48 +01:00
Hay1tsme 196853bcfd Merge pull request 'mai2io: change 2p select button default key' (#95) from zaphkito/segatools:develop into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/95
2026-01-14 22:31:56 +00:00
Dniel97 3a8bde7ca8 mercury: fix left touch board, window focus, launch params 2026-01-14 23:30:00 +01:00
zaphkito b9233207f5 mai2io: change 2p select button default key
0x54 is "T", "*" should be VK_MULTIPLY aka 0X6A
tested work
2026-01-13 06:57:52 +00:00
Dniel97 2475b48ef3 misc: fix foreground window issues, enable by default 2026-01-09 2026-01-09 15:36:10 +01:00
Dniel97 a2bfd840d6 idac: improve DNS hooking 2026-01-09 15:34:30 +01:00
Dniel97andHaseoSora 1a7a53f328 Update deadzone in wheel center for IDAC/IDZ/SWDC (#93)
Original PR by @HaseoSora :https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/82

Co-authored-by: HaseoSora <haseosora@noreply.gitea.tendokyu.moe>
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/93
Co-authored-by: Dniel97 <Dniel97@noreply.gitea.tendokyu.moe>
Co-committed-by: Dniel97 <Dniel97@noreply.gitea.tendokyu.moe>
2026-01-09 13:32:35 +00:00
kyoubate-haruka 3182720890 ewf: dynamic allocation to shrink output binary size (#92)
as noted on discord

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/92
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-01-08 20:20:02 +00:00