Biduleman c59d399ab8 Automated PIN Macro after auto-inserting a card (#698)
## Description of change
Adds a way to automatically use the PIN Macro for P1, P2 or both when
Auto Card Insert is used.

### Launcher changes: 
 - Added a checkbox to enable/disable the feature
 - Added a textbox for each player to set what to look for in the logs.

### How it works:
The feature requires Auto Card Insert and PIN Macro to be enabled and
set.
It uses the Auto Card Insert value to enable the feature for P1, P2 or
both, with a "master" checkbox to completely disable the feature. It
then relies on the current PIN Macro code to send the PIN to the games.

The games logs send a message when a new scene is loaded with the name
of the scene. By hooking on the logs, we can see when a PIN is required
and send the relevant macro. Games have different scene names, and
sometimes one for each player, so the field is configurable per game per
player. These could be hard-coded in a lookup table but I didn't want to
recompile the project every time I wanted to test, and I don't have all
the games to get this info from.

The PIN Macro thread is used to hook to the logs and check if the
defined string appears, which triggers the PIN macro just like a button
press would.

Setting nothing for the log trigger disables the feature for that
player. It's useful if someone wants to have Auto Card Insert enabled
for both players but only Auto Pin on 1 player, but is mainly there so
the check won't happen if nothing is set.

## Testing
I used SDVX and DDR to have a single and a two player test with the
feature both enabled and disabled. I also tested multiple combinations
of PIN Macro settings and Auto Card Insert settings with no apparent
issues. The PIN is automatically entered as soon as the game requests
it.

## Discussion

I know that hooking to the logs might not be the best solution. I'm very
open to discussions about this, and understand that this might be a deal
breaker for this feature. I made this to use with my setup and thought
I'd try opening this PR to see if the feature would be useful for
others.

I haven't found another way to make sure we're on the correct screen to
launch the PIN Macro, and sending the macro every time the Auto Card
Insert finishes had sync issues where the end of the PIN would actually
be registered by the game.

It would also be much more convenient for the users to hardcode a lookup
table for every games' log-trigger but I don't have the games currently
so I can't check the logs to see what would be best.

---------

Co-authored-by: Maxime St-Pierre <maxime.stpierre@ticketmaster.com>
2026-05-25 16:00:06 -07:00
2025-04-04 17:51:40 -07:00
2026-03-19 02:59:55 -07:00
2023-12-15 19:50:06 -08:00
2025-06-25 01:03:39 -07:00









This is the GitHub page for code development. If you just want to download the latest spice2x EXE, visit the homepage instead:

🌶️🌶️ https://spice2x.github.io/ 🌶️🌶️

If you have problems, read Known Issues (FAQ) wiki page first, most of your questions are already answered.









spice2x

Overview

spice2x is a continuation of SpiceTools project. Original development of SpiceTools has stalled in 2022; spice2x is led by a new group of developers.

spice2x team does not provide any tools to circumvent software copy protection, nor distribute any copyright-protected game data.

Features

List of supported games

How do I set up game data & start playing?

By policy,

  • we do NOT provide links on where to acquire game data
  • we do NOT provide tools or instructions on decrypting data
  • we do NOT provide guides on setting up & basic troubleshooting

please do not ask for these, as it will never happen here.

Submitting to the Issue Tracker

Please file bugs if you find them! If you just complain about something in Discord servers, we can't see them, so they'll never be fixed.

Rules for filing a new issue or adding comments to existing issues in the tracker:

  • Low effort submissions will be simply deleted, and repeated attempts will get you banned.
  • Check the known issues page first before reporting a new issue. If you have some new information or workarounds for a known issue, you can file a documentation bug as well.
  • Use the search function and see if there is an existing issue.
  • This is not the place to obtain a guide or receive basic troubleshooting.
  • Don't file a bug demanding game XYZ to be supported.
  • Do not upload game data - any part of it, XML files included!
  • Do not mention or link to external websites that distribute game data!
  • Do not link to external websites that provide guides on how to run games!

New GitHub accounts are prevented from creating new issues to prevent spam. Maintainers of this project reserve the right to close or delete any issues that violate the rules above, or any low effort issues. If you ask for very basic troubleshooting help with setting up a game, we'll just delete them without warning.

Contributing

We encourage the community to submit bugs and suggestions via the issue tracker, and to contribute code changes by opening pull requests

If you want to resolve any reported (or not reported) bugs, implement features, add support for new games, or fix a known issue - feel free to reach out via the Issue tracker or by opening a Pull Request. All submitted code is assumed to be GPLv3 compliant.

We explicitly do NOT have a Discord server for dicussions - we try to do everything out in the open on this GitHub repo. That being said we haven't opened a Discussions tab here because we know it's going to be immediately filled with support requests.

Please see CONTRIBUTING page for a full list of guidelines when submitting code.

Additional information

Please read README.md inside src/spice2x.

S
Description
No description provided
Readme GPL-3.0 13 MiB
Languages
C++ 86.5%
C 11%
CMake 0.8%
Python 0.7%
Dart 0.6%
Other 0.3%