10 Commits
Author SHA1 Message Date
Dniel97 c92119b4c5 misc: fix path compiling, fix apm3 server detection 2026-07-23 21:25:49 +02:00
kyoubate-haruka d29a3926ab apm: Fix distribution server handling, abaas log symlinks, add extra buttons for dinput (#123)
Requires https://gitea.tendokyu.moe/TeamTofuShop/capnhook/pulls/8

This adds the following:

1. Fixes `am::abaas::FileSearchSuite::isAvailableAbsolutePath: Line259  ERROR: folder is unavailable (Y:\SDEM\log\\SDFU)` by hooking `DeviceIoControl` with `FSCTL_SET_REPARSE_POINT`.

Sega decided to use the most bizzare way possible of creating symbolic links. These are created in the AbaaS log directory inside SDEM and point to the appdata directories for the sub-games.

Magic numbers have been taken from amdaemon decompilation. That whole API is very sparsely documented on the Microsoft side.

2. Fixes distribution server settings not applying.

Unlike most other games, the daemon config files do not have dipswitch filters in them. Instead the distribution setting is determined by running `hwvalue.exe` twice and checking it's exit code. This has been added to `launch.bat` and requires the linked addition for inject.

3. Implemented `get_opbtns` and added extra buttons for dinput.

* `get_opbtns` existed but was never implemented. Added the ability to bind dinput buttons for test/service.
* DirectInput is weird. The controller I'm using is sending directional keys as buttons rather than a D-Pad, so I was unable to bind it. These extra directional buttons can be bound in addition to the bindings that exist for a D-Pad.

4. Fixes audio in Rolling Gunner by setting the CWD to the root of the C:\ drive before starting a game.

lol. lmao even.

5. Add a `DefineDosDevice` for Y:\ to fix Blazblue crashing

They hardcoded the damn path to appdata instead of retrieving it from the apm.dll...

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/123
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:25:54 +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
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 3f2cfb6a26 [apm3, idac] improved launch.bat, removed zinput 2025-08-01 17:58:21 +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
Dniel97 0006731536 [apm3] fix led hook, fix blocked reboot 2025-07-21 21:09:24 +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