segatools/dist
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
..
carol diva, fgo: added gfx, close #46 2024-11-03 23:00:43 +01:00
chuni diva, fgo: added gfx, close #46 2024-11-03 23:00:43 +01:00
chusan diva, fgo: added gfx, close #46 2024-11-03 23:00:43 +01:00
cm hide default vfd ports from configs 2024-08-24 11:14:13 +02:00
cxb diva, fgo: added gfx, close #46 2024-11-03 23:00:43 +01:00
diva diva, fgo: added gfx, close #46 2024-11-03 23:00:43 +01:00
fgo diva, fgo: added gfx, close #46 2024-11-03 23:00:43 +01:00
idac idz, idac, swdc: fixed rumble effect 2024-10-29 22:06:07 +01:00
idz idz, idac, swdc: fixed rumble effect 2024-10-29 22:06:07 +01:00
kemono printer: add the default waitTime setting to config 2024-10-04 11:43:34 +02:00
mai2 Mai2: Add touch and led15070 hook (#55) 2025-02-16 12:49:58 +00:00
mercury diva, fgo: added gfx, close #46 2024-11-03 23:00:43 +01:00
mu3 diva, fgo: added gfx, close #46 2024-11-03 23:00:43 +01:00
swdc idz, idac, swdc: fixed rumble effect 2024-10-29 22:06:07 +01:00
tokyo added support for tokyo 2024-08-20 13:32:35 +02:00