Commit Graph

860 Commits

Author SHA1 Message Date
Dniel97
ce77d60905
mai2: fix memory leak and high CPU usage 2025-12-21 18:58:01 +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
af8d0bab7d
update readme version 2025-11-04 11:06:16 +01:00
goldfisher11
146550e68c spike_develop (#80)
Co-authored-by: goldfisher11 <goldfish1984@163.com>
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/80
Reviewed-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe>
Co-authored-by: goldfisher11 <goldfisher11@noreply.gitea.tendokyu.moe>
Co-committed-by: goldfisher11 <goldfisher11@noreply.gitea.tendokyu.moe>
2025-11-02 08:47:18 +00:00
Dniel97
d9075bbfce
Merge branch 'feature/openssl' into develop 2025-10-12 12:49:55 +02:00
Dniel97
6fe8744b0f
common: add OpenSSL patch comments, bump capnhook 2025-10-12 12:42:06 +02:00
Dniel97
19cd7cb8df
common: add OpenSSL Intel SHA ext hook 2025-10-05 11:01:13 +02:00
Dniel97
19c1a8e469 Merge pull request 'idac: Add configurable remapping for D-Pad Up/Down buttons.' (#77) from puniru/segatools:up_down into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/77
Reviewed-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe>
2025-08-27 20:39:40 +00:00
puniru
eb96660fdf idac: update config for up and down dpad buttons 2025-08-27 13:30:00 +09:00
puniru
83a9a49429 idac: allow changing up and down for custom boards 2025-08-22 15:03:19 +09:00
kyoubate-haruka
d423058cbd APM3: Fix amdaemon breakage when Unity Doorstop is present (#76)
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/76
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-08-10 16:04:01 +00:00
Dniel97
55a3859891
[swdc] fix magnitude calculation 2025-08-06 19:40:04 +02:00
Dniel97
3f2cfb6a26
[apm3, idac] improved launch.bat, removed zinput 2025-08-01 17:58:21 +02:00
Dniel97
e74e2a0d47
[apm3, swdc, idac] DInput8 cleanup 2025-07-29 18:06:10 +02:00
Dniel97
122034f922
[fgo] improve keyboard bindings 2025-07-27 22:05:07 +02:00
Dniel97
bb0b023ec0
[apm3] hook video loading, bug fixes 2025-07-27 19:22:57 +02:00
Dniel97
bb01e131e9
[epay]: hook enabled by default 2025-07-27 18:06:58 +02:00
kyoubate-haruka
ded1375e88 Vfs: Hook .ini reader functions to fix DLI reading (#75)
Pretty simple, DLI reading (more commonly known as DownloadOrder) calls GetPrivateProfile* with a file path with E:\tmpDli*.ini. This fails right now.

I have only hooked the functions that appear in the latest amdaemon.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/75
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-07-24 09:16:22 +00:00
Dniel97
0006731536
[apm3] fix led hook, fix blocked reboot 2025-07-21 21:09:24 +02:00
Dniel97
ae168cdaf9
Merge branch 'feature/apm3' into develop 2025-07-20 18:49:15 +02:00
Dniel97
e974a76fe6
[apm3] add DInput and XInput support 2025-07-20 18:13:29 +02:00
kyoubate-haruka
e2e4b37e3f APMv3: add hook (#73)
This adds support for APMv3 I/O, menus and the launcher.

* Added a apm3hook dll and I/O based on the usual layout.
* Added C:\Mount\Apm to vfs.
* Added the relevant .dlls to unityhook.
* Added a hook for apmmount.dll that uses `CreateDosDevice` to mount decrypted data to the locations the launcher and games expect files to be. This will conflict with anything that is already at W:\ and X:\, but I do not have better solutions for this.
* `launch.bat` is a bit more involved as it simulates the launcher loop. It can be broken by alt+f4ing or closing the launcher with "X".
* An extra export was added, so rundll32 can be used to get rid of the dosdevices after the launcher was killed.
* Since all the games do everything via `X:\lib\apm.dll`, no game hooks were needed in testing, therefore, `game.bat` files can be used as is.
* Path hooks are applied correctly, so you can go correctly between games, launcher, sub system test mode and game test modes.

A setup guide (some stuff specific to my server) can be found here:
https://gmg.hopto.org:82/gmg/wiki/index.php/All.Net_P-ras_Multi_Menu

Tested with the 2 APM sample apps, Blazblue, Puyo, Guilty Gear and some weird unity puzzle game whose name I forgot.

![Apmv3System_yLRityJVpm.png](/attachments/3d645e71-81e6-42e6-acd4-63c537cda59e)
![puyoe_hJNhnJGFnd.png](/attachments/01664049-71fe-4c38-9c99-39649ab21e56)

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/73
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-07-20 09:43:56 +00:00
Dniel97
f595af9686
[cm, mercury, mu3] update aime reader gen 2025-07-19 23:35:46 +02:00
Dniel97
03513e7b0c
add aime scan button to default segatools.ini 2025-07-16 15:44:05 +02:00
Dniel97
cdb6815c5a
add keychip id and pcbid to default segatools.ini 2025-06-19 19:28:10 +02:00
Dniel97
4644e36ccc
Merge branch 'feature/cleanup' into develop 2025-06-19 18:18:30 +02:00
Dniel97
dbfc62b5d4
platform: fix dipsw settings not applying 2025-06-19 18:17:20 +02:00
Hay1tsme
24e8bc87a3 remove reference to nonexistant files 2025-04-17 14:06:55 -04:00
Hay1tsme
a65b43fe1a Merge branch 'feature/cleanup' of https://gitea.tendokyu.moe/teamtofushop/segatools into feature/cleanup 2025-04-17 14:05:45 -04:00
Dniel97
66a53dd2de
refactor all common parts and games 2025-04-17 20:04:17 +02:00
Dniel97
ae3dd666f4
refactor all common parts and games 2025-04-17 19:40:40 +02:00
Dniel97
a6126bf290
Merge branch 'feature/thinca_auth' into develop 2025-04-17 19:18:03 +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
Hay1tsme
b37e1105d0 misc: added a showcursor counter to more accuratly replicate actual function behavior 2025-04-16 22:10:19 -04:00
Hay1tsme
9a6c4939c2 system: fix sysfile patches not applying when compiling with msvc 2025-04-16 22:09:48 -04:00
kyoubate-haruka
39711a994a FGO: add keyboard input (#61)
Probably self-explanatory :p

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/61
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-04-05 15:22:14 +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
kyoubate-haruka
70c3e2fe0f FGO: fix printer hook always being enabled (#60)
that moment when the printer says OK but it absolutely isn't supposed to be OK lmao

edit: I'm not sure why the msvc commits are also in all of these PRs, they have no effect though...
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/60
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-09 16:05:03 +00:00
Hay1tsme
369fe28687 disable excess logging for carol touchscreen hook 2025-03-02 04:10:35 -05:00
Hay1tsme
3371f3f437 fix msvc build by removing ntstatus include from platform/system.c 2025-03-02 01:45:23 -05:00
Dniel97
a57542c2d2
Merge branch 'feature/code-cleanup' into develop 2025-03-02 00:36:27 +01:00
Dniel97
27116a7a41
idac, tokyo: improve dipsw cabinet id config 2025-03-02 00:36:13 +01:00
Dniel97
e850346b79
renamed start.bat to launch.bat 2025-03-02 00:25:15 +01:00
Dniel97
4d0ef54279
system: add dip switch label configurations 2025-03-02 00:23:53 +01:00
Dniel97
b8af67377c
Merge branch 'feature/mai2-touch-led' into develop 2025-03-02 00:04:00 +01:00
Dniel97
4cb76dd1ee
mai2: update all LED boards to use two boards 2025-03-02 00:01:45 +01:00
kyoubate-haruka
efe01d92a6 Fix MSVC build again, add support for standalone MSVC compiler (#59)
After switching away from VS, I realized the buildscript wouldn't detect the standalone MSVC compiler, because for whatever genius reason, MS installs that in the x86 program files directory...

Also fixes some duplicate definitions and a missing library that MSVC doesn't like
ah compilers...

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/59
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-02-24 18:49:22 +00:00
Hay1tsme
004a2f6dcd docs: fix playformID and billingType config docs 2025-02-21 19:37:54 -05:00
Mahuyo
a1611afffc Mai2: Add touch and led15070 hook (#55)
In this PR, I have added the `mai2` touch and `led15070` hooks to provide an example for handling custom peripherals. This change allows users to implement the touch and `led15070` logic by writing appropriate `mai2io` scripts.

#### **Touch Hook**:
- The touch hook simulates touch points based on keyboard combinations. For example, to trigger the A1 touch point, the user must press the A and 1 keys on the keyboard. Input for the 1p requires Caps Lock to be off, while 2p requires Caps Lock to be on.
- The hook allows for independent control of whether device simulation is enabled for "1p" and "2p" and whether keyboard input mapping is enabled.
- **Note**: The current touch hook is not yet functional as it requires modifications to the `capnhook` for proper completion of the `sinmai` hook.

#### **LED15070 Hook**:
- This hook implements basic device simulation. Peripherals requiring lighting data should complete the logic as needed.
- **Note**: The LED data refresh can flood the console logs, so I’ve added a `DEBUG` flag to control whether the debug logging is enabled or not.

#### **Other Changes**:
- In certain versions of `sinmai`, key inputs for 1p and 2p can be directly read from the keyboard without requiring simulation via the `amdaemon io4` hook. I’ve added a switch to control this behavior to prevent redundant input.
- **Benefit**: This ensures that key input is only read when `sinmai` is in the foreground.

If you'd like to learn more about the touch and `led15070` features, my research findings are available here:
[Mai2Touch](https://github.com/Sucareto/Mai2Touch)

Co-authored-by: Sucareto <28331534+Sucareto@users.noreply.github.com>
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/55
Co-authored-by: Mahuyo <mahuyo@noreply.gitea.tendokyu.moe>
Co-committed-by: Mahuyo <mahuyo@noreply.gitea.tendokyu.moe>
2025-02-16 12:49:58 +00:00