[Project Diva Arcade] Strange random button press behaviour if using physical Aime Card Reader (happen after restarting the game a few times) #18

Closed
opened 2024-06-02 18:05:02 +00:00 by dsync · 2 comments

When using a physical Aime card reader, sometimes the game will just randomly press any button after I start the game. See https://youtu.be/IrZJtamXej0 for illustration. Note: I didn't press any button, it just register and press itself at certain interval.

On clean PC restart, it will work fine the first time, but most other times it just doesn't work. See https://youtu.be/4oK-pZMc3mc for when it works perfectly.

P/S: The Aime card reader is run on Raspberry Pi Zero using the firmware from https://github.com/whowechina/aic_pico. This issue doesn't happen on Konami eamusement game.

Following is the segatools.ini config I use. Really puzzle as to why this happen after restarting the game a couple of times.

; -----------------------------------------------------------------------------
; Path settings
; -----------------------------------------------------------------------------

[vfs]
; Insert the path to the game AMFS directory here (contains ICF1 and ICF2)
amfs=.\amfs
; Insert the path to the game Option directory here (contains Axxx directories)
option=.\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=.\appdata

; -----------------------------------------------------------------------------
; Device settings
; -----------------------------------------------------------------------------

[aime]
; Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime
; reader.
enable=0
aimePath=DEVICE\aime.txt

; -----------------------------------------------------------------------------
; 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=192.168.1.29

[netenv]
; Simulate an ideal LAN environment. This may interfere with head-to-head play.
; Chunithm is extremely picky about its LAN environment, so leaving this
; setting enabled is strongly recommended.
enable=1

; -----------------------------------------------------------------------------
; Board settings
; -----------------------------------------------------------------------------

[gpio]
; Emulated Nu DIP switch for Distribution Server setting.
;
; 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

[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.1.0
id=A69E-01A88888888
systemFlag=0

; -----------------------------------------------------------------------------
; 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=

[divaio]
; To use a custom Project DIVA Arcade IO DLL enter its path here.
; Leave empty if you want to use Segatools built-in gamepad/wheel 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.

[io3]

; 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 ; F3
coin=0x35 ; 5

[slider]
; default
; cell1=0x51
; cell2=0x57
; cell3=0x45
; cell4=0x52
; cell5=0x55
; cell6=0x49
; cell7=0x4F
; cell8=0x50

cell1=0x11 ; Slider Left
cell2=0x11 ; Slider Left
cell3=0x12 ; Slider Left
cell4=0x12 ; Slider Left
cell5=0x20 ; Slider Right
cell6=0x20 ; Slider Right
cell7=0x43 ; Slider Right
cell8=0x43 ; Slider Right

[buttons]
; default
; key1=0x27
; key2=0x28
; key3=0x25
; key4=0x26
; key5=0x20

key1=0x56 ; V (Circle)
key2=0x58 ; X (Cross)
key3=0x5A ; Z (Square)
key4=0x10 ; Shift (Triangle)

key5=0x31 ; 1 (Start)

; Sliders :	<- QWER UIOP ->
; Triangle :	Up arrow
; Square :	Left Arrow
; Cross :	Down Arrow
; Circle :	Right arrow
; Enter :	Space

Edit 2: On deeper inspection using Test Input service option I noticed the Square and Cross key keep on stickied and toggled between ON/OFF (see the attached GIF). Confirme that this is not because of the key map that I did.

Edit 3: Confirmed that this strange behaviour only happen if Aime card emulation is turned ON. With aime card emulation turned off, it will work sometimes, but most of the time this strange key press behaviour. But if I'm lucky it won't happen.

[aime]
; Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime
; reader.
enable=0
aimePath=DEVICE\aime.txt

Edit 4: Add video here (https://youtu.be/NdhMLm05fpQ) when entering Test Input service. Noticed how some of the keys kept on holding even if I didn't press any. I then manually press F1 and F2, but you can see it only blink real fast. It is 100% caused by aimeio when configured not to use emulation in segatools, as enable aimeio emulation will never yield this strange behaviour.

When using a physical Aime card reader, sometimes the game will just randomly press any button after I start the game. See https://youtu.be/IrZJtamXej0 for illustration. **Note: I didn't press any button, it just register and press itself at certain interval.** On clean PC restart, it will work fine the first time, but most other times it just doesn't work. See https://youtu.be/4oK-pZMc3mc for when it works perfectly. P/S: The Aime card reader is run on Raspberry Pi Zero using the firmware from https://github.com/whowechina/aic_pico. This issue doesn't happen on Konami eamusement game. Following is the `segatools.ini` config I use. Really puzzle as to why this happen after restarting the game a couple of times. ``` ; ----------------------------------------------------------------------------- ; Path settings ; ----------------------------------------------------------------------------- [vfs] ; Insert the path to the game AMFS directory here (contains ICF1 and ICF2) amfs=.\amfs ; Insert the path to the game Option directory here (contains Axxx directories) option=.\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=.\appdata ; ----------------------------------------------------------------------------- ; Device settings ; ----------------------------------------------------------------------------- [aime] ; Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime ; reader. enable=0 aimePath=DEVICE\aime.txt ; ----------------------------------------------------------------------------- ; 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=192.168.1.29 [netenv] ; Simulate an ideal LAN environment. This may interfere with head-to-head play. ; Chunithm is extremely picky about its LAN environment, so leaving this ; setting enabled is strongly recommended. enable=1 ; ----------------------------------------------------------------------------- ; Board settings ; ----------------------------------------------------------------------------- [gpio] ; Emulated Nu DIP switch for Distribution Server setting. ; ; 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 [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.1.0 id=A69E-01A88888888 systemFlag=0 ; ----------------------------------------------------------------------------- ; 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= [divaio] ; To use a custom Project DIVA Arcade IO DLL enter its path here. ; Leave empty if you want to use Segatools built-in gamepad/wheel 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. [io3] ; 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 ; F3 coin=0x35 ; 5 [slider] ; default ; cell1=0x51 ; cell2=0x57 ; cell3=0x45 ; cell4=0x52 ; cell5=0x55 ; cell6=0x49 ; cell7=0x4F ; cell8=0x50 cell1=0x11 ; Slider Left cell2=0x11 ; Slider Left cell3=0x12 ; Slider Left cell4=0x12 ; Slider Left cell5=0x20 ; Slider Right cell6=0x20 ; Slider Right cell7=0x43 ; Slider Right cell8=0x43 ; Slider Right [buttons] ; default ; key1=0x27 ; key2=0x28 ; key3=0x25 ; key4=0x26 ; key5=0x20 key1=0x56 ; V (Circle) key2=0x58 ; X (Cross) key3=0x5A ; Z (Square) key4=0x10 ; Shift (Triangle) key5=0x31 ; 1 (Start) ; Sliders : <- QWER UIOP -> ; Triangle : Up arrow ; Square : Left Arrow ; Cross : Down Arrow ; Circle : Right arrow ; Enter : Space ``` Edit 2: On deeper inspection using Test Input service option I noticed the Square and Cross key keep on stickied and toggled between ON/OFF (see the attached GIF). Confirme that this is not because of the key map that I did. Edit 3: Confirmed that this strange behaviour only happen if Aime card emulation is turned ON. With aime card emulation turned off, it will work sometimes, but most of the time this strange key press behaviour. But if I'm lucky it won't happen. ``` [aime] ; Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime ; reader. enable=0 aimePath=DEVICE\aime.txt ``` Edit 4: Add video here (https://youtu.be/NdhMLm05fpQ) when entering Test Input service. Noticed how some of the keys kept on holding even if I didn't press any. I then manually press F1 and F2, but you can see it only blink real fast. It is 100% caused by aimeio when configured not to use emulation in segatools, as enable aimeio emulation will never yield this strange behaviour.
Owner

Hello!

As soon as you disable the aime reader emulation there is nothing segatools can do about it as it disables the hook completely. The question would be why aic_pico actually triggers some buttons in the current firmware. That indeed seems really strange an so can only imagine that something light be weird with the COM ports.

Hello! As soon as you disable the aime reader emulation there is nothing segatools can do about it as it disables the hook completely. The question would be why aic_pico actually triggers some buttons in the current firmware. That indeed seems really strange an so can only imagine that something light be weird with the COM ports.
Owner

No further interactions. closing.

No further interactions. closing.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Dniel97/segatools#18
No description provided.