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: TeamTofuShop/segatools#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
2021-08-15 11:11:06 +02:00
2023-09-19 10:33:30 -04:00
2019-11-06 21:02:49 -05:00
2018-11-20 20:58:51 -05:00
2024-12-16 11:09:38 +08:00
2018-10-07 21:58:14 -04:00
2024-06-20 01:22:01 +01:00
2021-12-27 20:56:30 -05:00
2023-04-23 16:13:51 +02:00
2023-02-13 03:08:41 -05:00
2019-11-06 21:02:49 -05:00
2021-12-27 20:55:20 -05:00
2024-07-01 19:28:23 +01:00
2024-12-16 11:09:38 +08:00
2024-09-12 13:29:17 +02:00

Segatools

Version: 2024-09-30

Loaders and hardware emulators for SEGA games that run on the Nu and ALLS platforms.

List of supported games

  • Card Maker
    • starting from Card Maker
  • CHUNITHM
  • crossbeats REV.
    • up to crossbeats REV. SUNRISE
  • Fate/Grand Order
    • Fate/Grand Order Arcade
  • Hatsune Miku: Project DIVA Arcade
    • up to Future Tone
  • Initial D
  • maimai DX
    • starting from maimai DX
  • Mario & Sonic
    • Mario & Sonic at the Tokyo 2020 Olympics Arcade
  • O.N.G.E.K.I.
    • starting from O.N.G.E.K.I.
  • SEGA World Drivers Championship
    • SEGA World Drivers Championship 2019
  • WACCA
    • starting from WACCA
  • Kemono Friends
    • Kemono Friends 3: Planet Tours

End-users

For setup and configuration guides, refer to the dedicated documents available for each game, see the links in the previous section.

Contributors

If you are/want to be a contributor of any kind, e.g. new features, bug fixes, documentation improvements, ..., please read the contributing documentation, first.

Developers

For development setup and instructions how to build the project, refer to the dedicated development documentation.

Description
No description provided
Readme 1.3 MiB
Languages
C 96.5%
Meson 2%
Makefile 0.9%
Batchfile 0.3%
PowerShell 0.2%
Other 0.1%