## Link to GitHub Issue or related Pull Request, if one exists N/A ## Description of change I am developing [spice.nimabe.net](https://spice.nimabe.net), a static frontend for SpiceAPI. It already supports generating and inserting new card IDs, but SpiceAPI does not provide a way to discover cards already configured on the game machine. This makes the frontend inconvenient for existing users who generated and saved their card IDs locally. They currently have to open each card file on the game machine and manually copy its ID into the frontend. This change adds a `card.get_cards` API function that enumerates the current cards for readers supported by the running game. Each entry contains: - reader index - canonical 16-character card ID - `source`, set to `file` or `override` - `file_name` for file-backed cards File-backed cards expose only the save-file basename. Active `-card0` and `-card1` values are returned with `source: "override"` and no `file_name`, instead of representing an override as a file. spicefe derives the useful default import names `card0` and `card1` from the reader index. Reader enumeration uses `eamuse_get_game_keypads()` so games with only one reader do not expose a second card. This allows spicefe and other API clients to offer one-click import for existing cards, without requiring users to manually find and copy their card IDs. Because card IDs are sensitive, `card.get_cards` can only be used when the operator has configured an API password. No full filesystem path is exposed. Missing, unreadable, and invalid cards are omitted. The existing `card.insert` function remains unchanged. To avoid requiring a password for the whole card module, this change adds support for password requirements on individual API functions while preserving existing module-wide password behavior. Access to configured card paths and runtime card overrides is synchronized because API requests may read them concurrently with configuration updates. The Python and Dart API wrappers and README documentation have been updated for the new function and source metadata. ## Testing - Ran the complete `src/spice2x/build_docker.sh` build successfully. - Built all required 32-bit and 64-bit targets. - Built the Windows XP-compatible 32-bit targets. - Passed static import checks. - Passed Windows 7 and Windows XP compatibility checks. - Completed release packaging successfully. - Verified both updated Dart wrappers are correctly formatted. - Ran all 106 spicefe tests successfully. - `git diff --check` passes. *This implementation was prepared with assistance from OpenAI Codex.*
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.
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.