djhackersdev / bemanitools

Runs recent Konami arcade games and emulates various arcade hardware.
The Unlicense
84 stars 16 forks source link

aciodrv: Update aciodrv_device_init to properly reset the device - [merged] #194

Closed icex2 closed 1 year ago

icex2 commented 3 years ago

In GitLab by @xyen on May 1, 2021, 19:35

_Merges aciodrvreset -> master

When testing PANB, @shtokopep noticed that starting the game was able to recover the device from the auto-poll state, but trying to do so from aciotest (using aciodrv) would fail.

This is important, due to use cases such as SGL, where upon quitting the game, and trying to use SGL again, the device would not be opened correctly (due to not being reset, and still spewing auto poll messages, hence leading to checksum/packet errors as we're not expecting those messages at this point).

This MR properly resets the ACIO device, by sending 525 NULL bytes, followed by a break for 1450ms.

icex2 commented 3 years ago

This is important, due to use cases such as SGL...

I am really happy to read that others seem to be interested in that project

icex2 commented 3 years ago

Nit: That function is already quite large and the whole reset part might be worth moving to a separate static function to make this whole thing more digestable for future readers.

icex2 commented 3 years ago

In GitLab by @xyen on May 1, 2021, 19:43

added 1 commit

Compare with previous version

icex2 commented 3 years ago

In GitLab by @xyen on May 1, 2021, 19:43

resolved all threads

icex2 commented 3 years ago

approved this merge request