forked from TeamTofuShop/segatools
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>
152 lines
4.8 KiB
INI
152 lines
4.8 KiB
INI
; -----------------------------------------------------------------------------
|
|
; Path settings
|
|
; -----------------------------------------------------------------------------
|
|
|
|
[vfs]
|
|
; Insert the path to the game AMFS directory here (contains ICF1 and ICF2)
|
|
amfs=
|
|
; Insert the path to the game Option directory here (contains Axxx directories)
|
|
option=
|
|
; Create an empty directory somewhere and insert the path here.
|
|
; This directory may be shared between multiple SEGA games.
|
|
; NOTE: This has nothing to do with Windows %APPDATA%.
|
|
appdata=
|
|
|
|
; -----------------------------------------------------------------------------
|
|
; Device settings
|
|
; -----------------------------------------------------------------------------
|
|
|
|
[aime]
|
|
; Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime
|
|
; reader.
|
|
enable=1
|
|
aimePath=DEVICE\aime.txt
|
|
|
|
[vfd]
|
|
; Enable VFD emulation. Disable to use a real VFD
|
|
; GP1232A02A FUTABA assembly.
|
|
enable=1
|
|
|
|
; -----------------------------------------------------------------------------
|
|
; Network settings
|
|
; -----------------------------------------------------------------------------
|
|
|
|
[dns]
|
|
; Insert the hostname or IP address of the server you wish to use here.
|
|
; Note that 127.0.0.1, localhost etc are specifically rejected.
|
|
default=127.0.0.1
|
|
|
|
[netenv]
|
|
; Simulate an ideal LAN environment. This may interfere with head-to-head play.
|
|
; SEGA games are somewhat picky about its LAN environment, so leaving this
|
|
; setting enabled is recommended.
|
|
enable=1
|
|
; The final octet of the local host's IP address on the virtualized subnet (so,
|
|
; if the keychip subnet is `192.168.32.0` and this value is set to `11`, then the
|
|
; local host's virtualized LAN IP is `192.168.32.11`).
|
|
addrSuffix=11
|
|
|
|
; -----------------------------------------------------------------------------
|
|
; Board settings
|
|
; -----------------------------------------------------------------------------
|
|
|
|
[keychip]
|
|
; The /24 LAN subnet that the emulated keychip will tell the game to expect.
|
|
; If you disable netenv then you must set this to your LAN's IP subnet, and
|
|
; that subnet must start with 192.168.
|
|
subnet=192.168.172.0
|
|
|
|
[system]
|
|
; Enable ALLS system settings.
|
|
enable=1
|
|
|
|
; Enable freeplay mode. This will disable the coin slot and set the game to
|
|
; freeplay. Keep in mind that some game modes (e.g. Freedom/Time Modes) will not
|
|
; allow you to start a game in freeplay mode.
|
|
freeplay=0
|
|
|
|
; LAN Install: If multiple machines are present on the same LAN then set
|
|
; this to 1 on exactly one machine and set this to 0 on all others.
|
|
dipsw1=1
|
|
|
|
; -----------------------------------------------------------------------------
|
|
; Misc. hook settings
|
|
; -----------------------------------------------------------------------------
|
|
|
|
[unity]
|
|
; Enable Unity hook. This will allow you to run custom .NET code before the game
|
|
enable=1
|
|
|
|
; Path to a .NET DLL that should run before the game. Useful for loading
|
|
; modding frameworks such as BepInEx.
|
|
targetAssembly=
|
|
|
|
; -----------------------------------------------------------------------------
|
|
; Custom IO settings
|
|
; -----------------------------------------------------------------------------
|
|
|
|
[aimeio]
|
|
; To use a custom card reader IO DLL enter its path here.
|
|
; Leave empty if you want to use Segatools built-in keyboard input.
|
|
path=
|
|
|
|
[mai2io]
|
|
; To use a custom maimai DX IO DLL enter its path here.
|
|
; Leave empty if you want to use Segatools built-in keyboard input.
|
|
path=
|
|
|
|
; -----------------------------------------------------------------------------
|
|
; Input settings
|
|
; -----------------------------------------------------------------------------
|
|
|
|
; Keyboard bindings are specified as hexadecimal (prefixed with 0x) or decimal
|
|
; (not prefixed with 0x) virtual-key codes, a list of which can be found here:
|
|
;
|
|
; https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
|
|
;
|
|
; This is, admittedly, not the most user-friendly configuration method in the
|
|
; world. An improved solution will be provided later.
|
|
|
|
[io4]
|
|
; Test button virtual-key code. Default is the F1 key.
|
|
test=0x70
|
|
; Service button virtual-key code. Default is the F2 key.
|
|
service=0x71
|
|
; Keyboard button to increment coin counter. Default is the F3 key.
|
|
coin=0x72
|
|
|
|
; Key bindings for buttons around screen. The default key map, depicted
|
|
; in clockwise order, is as follows:
|
|
;
|
|
; Player 1 Ring buttons: WEDCXZAQ, Select button: 3
|
|
; Player 2 Ring buttons: (Numpad) 89632147, Select button: (Numpad) *
|
|
;
|
|
; Select buttons are considered as button 9.
|
|
;
|
|
; Uncomment and complete the following sequence of settings to configure a
|
|
; custom keybinding.
|
|
[button]
|
|
enable=1
|
|
;p1Btn1=0x53
|
|
;p1Btn2=0x53
|
|
;p1Btn3=0x53
|
|
; ... etc ...
|
|
;p2Btn1=0x53
|
|
;p2Btn2=0x53
|
|
;p2Btn3=0x53
|
|
; ... etc ...
|
|
|
|
[touch]
|
|
p1Enable=1
|
|
;p1DebugInput=0
|
|
p2Enable=1
|
|
;p2DebugInput=0
|
|
;p1TouchA1=0x53
|
|
;p1TouchA2=0x53
|
|
; ... etc ...
|
|
;p1TouchE8=0x53
|
|
|
|
[led15070]
|
|
; Enable emulation of the 837-15070-02 controlled lights, which handle the
|
|
; cabinet and seat LEDs.
|
|
enable=1 |