Skip to content

Wpc configs add#335

Merged
mullinmax merged 34 commits intomainfrom
WPC-configs-add
Apr 10, 2026
Merged

Wpc configs add#335
mullinmax merged 34 commits intomainfrom
WPC-configs-add

Conversation

@paulmullin
Copy link
Copy Markdown
Contributor

@paulmullin paulmullin commented Apr 4, 2026

Description

  1. Building out more WPC game configuration files.

  2. Adding a method to link a game ROM version to another version, allows for game ROM alias essentially without duplicating the entire JSON.

  3. Removing unused data form all WPC configs ("Memory", some ball in play data, "Definition")

  4. Edited config validation functions for removed sections

  5. Updated the CI JSON validation script (dev/ci/validate_json_configs.py) to correctly handle LinkTo configs — these lightweight alias configs are now detected and validated separately (checking that GameInfo.GameName exists and the linked target config file exists in the same directory) instead of applying the full schema validation.

Related Issues

Motivation and Context

Testing

Validating on WPC.
Added 10 new unit tests for LinkTo detection, validation, and end-to-end flows in dev/tests/test_validate_json_configs.py. All 27 tests pass. CI JSON validation script runs clean against the repo.

Screenshots (if applicable)

Types of Changes

  • Bug fix (non-breaking change to resolve an issue)
  • New feature (non-breaking change to add functionality)
  • Breaking change (alters existing functionality)
  • Documentation update required

Checklist

  • My code follows the project's style guidelines.
  • I have updated documentation as needed.
  • I have read the CONTRIBUTING.md document.
  • I have added or updated tests.
  • All new and existing tests pass.

Additional Notes

Copilot AI review requested due to automatic review settings April 4, 2026 15:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

Developer build links:
Sys11

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-335/sys11-update.json

Sys11 (Tiny)

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-335/sys11-tiny-update.json

WPC

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-335/wpc-update.json

EM

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-335/em-update.json

WhiteStar

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-335/whitestar-update.json

DataEast

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-335/data-east-update.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands the WPC game configuration catalog and introduces a lightweight ROM-alias mechanism (GameInfo.LinkTo) to reuse an existing config for another ROM version without duplicating the full JSON.

Changes:

  • Add GameInfo.LinkTo support when loading game configs, plus build-time validation for LinkTo references.
  • Add/refresh multiple WPC JSON config files (new switch maps, flippers, and format adjustments).
  • Bump WPC SystemVersion and common VectorVersion.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/wpc/systemConfig.py Bumps WPC firmware SystemVersion to 1.7.7.
src/wpc/config/JunkYard_12.json Adds a full config definition for Junk Yard ROM 1.2.
src/wpc/config/JunkYard_10.json Converts Junk Yard ROM 1.0 config into a LinkTo alias.
src/wpc/config/JackBot_10R.json Removes OneBall format entry.
src/wpc/config/Hurricane_L2.json Removes OneBall format entry.
src/wpc/config/FunHouse_L9.json Removes OneBall format entry.
src/wpc/config/FishTales_L4.json Removes OneBall format entry.
src/wpc/config/FishTales_L5.json Reorganizes/updates config sections (modes/formats placement) and checksum range change.
src/wpc/config/AttackMars_10.json Removes OneBall format entry.
src/wpc/config/HarleyDavidson_L4.json Deletes the L4 config file.
src/wpc/config/HarleyDavidson_L3.json Adds an updated Harley Davidson L3 config (incl. switches).
src/wpc/config/Dracula_L1.json Adds switches section and expands config detail.
src/wpc/config/DoctorWho_L2.json Adds switches section and expands config detail.
src/wpc/config/DirtyHarry_L2.json Adds switches + flippers sections and updates player-up address.
src/wpc/config/DemoMan_H6.json Adds switches section and updates checksum range.
src/wpc/config/AddamsFam_L2.json Adds switches section and adjusts ball-in-play address.
src/wpc/config/AddamsFam_H2.json Adds switches + flippers sections.
src/common/SharedState.py Bumps common VectorVersion to 1.11.12.
src/common/GameDefsLoad.py Implements runtime LinkTo resolution and adds temporary debug prints.
dev/build.py Adds build-time validation for LinkTo references before combining JSON configs.

Comment thread src/common/GameDefsLoad.py Outdated
Comment thread src/common/GameDefsLoad.py Outdated
Comment thread src/wpc/config/DoctorWho_L2.json Outdated
@mullinmax
Copy link
Copy Markdown
Contributor

@copilot update the script used in .github/workflows/validate-json-configs.yml so it correctly handles the LinkTo. In cases where we're linking to another config we just need to make sure that the linked config exists and is also valid.

currently it's outputting:

Run python dev/ci/validate_json_configs.py
JSON validation failed:

  • src/wpc/config/AddamsFam_H4.json [standard-game-config]: missing required field 'GameInfo.System'
  • src/wpc/config/AddamsFam_H4.json [standard-game-config]: missing required object 'Memory'
  • src/wpc/config/AddamsFam_H4.json [standard-game-config]: missing required object 'BallInPlay'
  • src/wpc/config/AddamsFam_H4.json [standard-game-config]: missing required object 'DisplayMessage'
  • src/wpc/config/AddamsFam_H4.json [standard-game-config]: missing required object 'Adjustments'
  • src/wpc/config/AddamsFam_H4.json [standard-game-config]: missing required object 'HighScores'
  • src/wpc/config/AddamsFam_L5.json [standard-game-config]: missing required field 'GameInfo.System'
  • src/wpc/config/AddamsFam_L5.json [standard-game-config]: missing required object 'Memory'
  • src/wpc/config/AddamsFam_L5.json [standard-game-config]: missing required object 'BallInPlay'
  • src/wpc/config/AddamsFam_L5.json [standard-game-config]: missing required object 'DisplayMessage'
  • src/wpc/config/AddamsFam_L5.json [standard-game-config]: missing required object 'Adjustments'
  • src/wpc/config/AddamsFam_L5.json [standard-game-config]: missing required object 'HighScores'
  • src/wpc/config/DirtyHarry_LX2.json [standard-game-config]: missing required field 'GameInfo.System'
  • src/wpc/config/DirtyHarry_LX2.json [standard-game-config]: missing required object 'Memory'
  • src/wpc/config/DirtyHarry_LX2.json [standard-game-config]: missing required object 'BallInPlay'
  • src/wpc/config/DirtyHarry_LX2.json [standard-game-config]: missing required object 'DisplayMessage'
  • src/wpc/config/DirtyHarry_LX2.json [standard-game-config]: missing required object 'Adjustments'
  • src/wpc/config/DirtyHarry_LX2.json [standard-game-config]: missing required object 'HighScores'
  • src/wpc/config/JohnnyM_11R.json [standard-game-config]: missing required field 'GameInfo.System'
  • src/wpc/config/JohnnyM_11R.json [standard-game-config]: missing required object 'Memory'
  • src/wpc/config/JohnnyM_11R.json [standard-game-config]: missing required object 'BallInPlay'
  • src/wpc/config/JohnnyM_11R.json [standard-game-config]: missing required object 'DisplayMessage'
  • src/wpc/config/JohnnyM_11R.json [standard-game-config]: missing required object 'Adjustments'
  • src/wpc/config/JohnnyM_11R.json [standard-game-config]: missing required object 'HighScores'
  • src/wpc/config/JunkYard_10.json [standard-game-config]: missing required field 'GameInfo.System'
  • src/wpc/config/JunkYard_10.json [standard-game-config]: missing required object 'Memory'
  • src/wpc/config/JunkYard_10.json [standard-game-config]: missing required object 'BallInPlay'
  • src/wpc/config/JunkYard_10.json [standard-game-config]: missing required object 'DisplayMessage'
  • src/wpc/config/JunkYard_10.json [standard-game-config]: missing required object 'Adjustments'
  • src/wpc/config/JunkYard_10.json [standard-game-config]: missing required object 'HighScores'
  • src/wpc/config/StarTrek_LX7.json [standard-game-config]: missing required field 'GameInfo.System'
  • src/wpc/config/StarTrek_LX7.json [standard-game-config]: missing required object 'Memory'
  • src/wpc/config/StarTrek_LX7.json [standard-game-config]: missing required object 'BallInPlay'
  • src/wpc/config/StarTrek_LX7.json [standard-game-config]: missing required object 'DisplayMessage'
  • src/wpc/config/StarTrek_LX7.json [standard-game-config]: missing required object 'Adjustments'
  • src/wpc/config/StarTrek_LX7.json [standard-game-config]: missing required object 'HighScores'
  • src/wpc/config/Terminator2_L84.json [standard-game-config]: missing required field 'GameInfo.System'
  • src/wpc/config/Terminator2_L84.json [standard-game-config]: missing required object 'Memory'
  • src/wpc/config/Terminator2_L84.json [standard-game-config]: missing required object 'BallInPlay'
  • src/wpc/config/Terminator2_L84.json [standard-game-config]: missing required object 'DisplayMessage'
  • src/wpc/config/Terminator2_L84.json [standard-game-config]: missing required object 'Adjustments'
  • src/wpc/config/Terminator2_L84.json [standard-game-config]: missing required object 'HighScores'
    Error: Process completed with exit code 1.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

@copilot update the script used in .github/workflows/validate-json-configs.yml so it correctly handles the LinkTo. In cases where we're linking to another config we just need to make ...

Updated the validation script in c312723. LinkTo configs are now detected and validated separately — the script checks that GameInfo.GameName exists and that the linked target config file exists in the same directory, instead of applying the full schema validation. Added 10 new tests covering the LinkTo detection, validation, and end-to-end flows. All 27 tests pass and the validation script runs clean against the repo.

Copilot AI requested a review from mullinmax April 5, 2026 23:29
@mullinmax mullinmax added the enhancement New feature or request label Apr 6, 2026
@paulmullin
Copy link
Copy Markdown
Contributor Author

@copilot change the code that generates the dev/generated/special_features.csv file to ignore configuration json files that are LinkTo files. The LinkTo json files are currently creating extra entries in the special_features.csv with empty or default entries.

LinkTo config files are lightweight aliases that only contain GameInfo
with GameName and LinkTo fields. They have no System, feature data, or
other config sections, so including them produces UNKNOWN entries with
empty/default values. Skip them during CSV generation.

Agent-Logs-Url: https://github.com/warped-pinball/vector/sessions/6d045a1a-edb2-485b-9a83-13301c9c8eb6

Co-authored-by: paulmullin <18378908+paulmullin@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

@copilot change the code that generates the dev/generated/special_features.csv file to ignore configuration json files that are LinkTo files. The LinkTo json files are currently creating extra ent...

Fixed in 1455073. Added is_linkto_config() to dev/utilities/export_game_feature_csvs.py — LinkTo config files are now skipped during CSV generation so they no longer create UNKNOWN entries with empty/default values. The regenerated specialfeatures.csv no longer contains those 7 extra rows.

@mullinmax
Copy link
Copy Markdown
Contributor

@copilot make the special features github action trigger when the script is changed in addition to a config being changed. Also make the script add a new column that lists all ROM versions that we have a config for for each title. so the column should contain a list of ROM versions. you can get the ROM version from splitting the config file name by _ and taking the last segment BanzaiRun_L3.json -> L3

Copilot AI and others added 2 commits April 9, 2026 21:32
Adds rom_version_from_path() and collect_rom_versions() to extract ROM
versions from config filenames (e.g. BanzaiRun_L3.json -> L3) and
collect them per game title including LinkTo aliases. The new
rom_versions column is semicolon-delimited and sorted alphabetically.

Agent-Logs-Url: https://github.com/warped-pinball/vector/sessions/df93f358-d4d5-4b9c-b7d7-13a6c200ab5d

Co-authored-by: mullinmax <14000345+mullinmax@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

@copilot make the special features github action trigger when the script is changed in addition to a config being changed. Also make the script add a new column that lists all ROM versions that we hav...

Done in 7249e92. The workflow already triggers on script changes (was added in a prior commit). Added a rom_versions column to the CSV — it scans all config filenames (including LinkTo aliases), extracts the ROM version from the last _-delimited segment (e.g. BanzaiRun_L3.jsonL3), and lists them semicolon-delimited per game title. For example, Addams Family now shows H2;H4;L2;L5.

@mullinmax
Copy link
Copy Markdown
Contributor

@copilot add a manual trigger for the special features generation github action.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

@copilot add a manual trigger for the special features generation github action.

I've added workflow_dispatch: to the workflow triggers and updated the checkout/commit steps to use ${{ github.head_ref || github.ref_name }} so it works correctly for both PR and manual triggers. However, the push was blocked by a repository protection rule that restricts .github/workflows/ file modifications. You'll need to either apply the change manually or grant a bypass for workflow file pushes. Here's the change needed in .github/workflows/specialfeatures-on-pr.yml:

on:
  workflow_dispatch:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
    paths:
      - "src/*/config/*.json"
      - "dev/utilities/export_game_feature_csvs.py"

And update both ref: and BRANCH_NAME: to use ${{ github.head_ref || github.ref_name }} so manual dispatch resolves the correct branch.

mullinmax
mullinmax previously approved these changes Apr 9, 2026
@mullinmax mullinmax merged commit a71d5d8 into main Apr 10, 2026
@mullinmax mullinmax deleted the WPC-configs-add branch April 10, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants