Repository navigation
Source machine definitions from the PinMAME machine reference - #40
Merged
Merged
Conversation
VPE no longer depends on a Visual PinMAME installation. NVRAM, config and high scores live in PinMAME's folder below VPE's data root, and ROMs are searched in the host's ROM folder (GamelogicPaths.RomFolder). The editor stores that folder per machine and falls back to VPM's ROM folder. A game's NVRAM, high scores and config are copied from VPM the first time VPE runs it. Needs PinMame 1.1.0 (SetPath/GetPath, FindVpmPath).
Runtime:
- One PinMAME output now drives every mapping row it resolves to, e.g. coil
19 and the c_game_on alias. Before, the last row won and the others never
fired. Several numeric spellings of one output ("1", "01") go out once.
- Mech switches that aren't PinMAME switches are skipped instead of aborting
mech setup.
- Unresolved mapping IDs warn at runtime only, without suggesting a
repopulate that would wipe the mappings.
- Fix legacy machine IDs for Flash Gordon and the Stern Star Trek, Tron and
Walking Dead variants.
- The ROM check before start only warns, since PinMAME's audit reports
clones with the parent's files as missing.
Catalog conversion:
- normally_closed is the physical contact, which PinMAME already inverts for
optos. Only the coin door is normally closed for VPE now.
- Switches 111-114 follow PinMAME's numbering (odd EOS, even button), and
win over matrix flipper switches, which PinMAME only mirrors.
- Keep virtual devices with a public role or virtual inputs, e.g. flipper
buttons outside the matrix and synthetic flipper coils.
- Default to the parent ROM instead of the alphabetically first one.
Editor:
- Changing machine or ROM refreshes the hardware candidates instead of
clearing them.
- Spatial assignment is disabled when the mappings belong to another
machine, and no longer links a second device to hardware that already has
one per position.
- Import VPM's NVRAM before Create Displays runs the ROM.
- The picker's None row no longer wins searches for other machines.
- The editor service records Undo and prefab overrides.
The editor's ROM folder is now GamelogicPaths.HostRomFolder, and a player app's own folder only overrides it for its play session: the override is cleared when the editor returns to edit mode, so editor actions like Create Displays use the editor's folder again. Folder lists are normalized.
They provide the path API the data folder needs (SetPath/GetPath, FindVpmPath) and keep a ROM folder override across PinmameSetConfig().
Validated against a table's actual mapping, about half of its lamps were rejected and a few matched wrongly. Now: - Items are paired with targets in order of increasing cost, so each item goes to the target that fits it best. A target whose item isn't on the table no longer takes a neighbour's item and pushes that one away. - A match is only ambiguous when another item fits about as well and is free, or its owner could just as well swap. A row of inserts that's slightly offset now matches instead of being rejected as a whole. - A match is only contested by a target that fits the item about as well, not by any target that merely wants it. - Items at the same position, like the switches of a mech, are told apart by name. - Devices whose positions the definition marks as conflicted, and cabinet inputs, get no playfield positions.
|
- Undo and redo reload the inspector's selection from the component, so it never keeps the other machine's definition. Spatial assignment also requires the loaded definition to be the component's machine. - Loading the component's machine fills the hardware candidates when the component has none (older or unpacked tables), and Refresh updates them. The selection and the mappings stay as they are. - A cabinet input that rests active (initial_active), like the coin door, is normally closed for VPE. One that nothing operates, like a playfield glass or memory-protect switch, becomes constant. - Tests for the default ROM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Machine definitions no longer come from hard-coded C# game classes. The editor loads them from the PinMAME machine reference (pinmame-game-defs), and a table's hardware is populated from the selected machine and ROM. PinMAME also no longer depends on a Visual PinMAME installation: it keeps its data in VPE's own folder and reads ROMs from a configurable ROM folder.
Catalog definitions
s_flipper_lower_left,c_game_on, …). Player builds only receive the mappings, never the catalog.normally_closedis the physical contact. PinMAME already inverts optos per game (invSw), so only the coin door is passed on as normally closed.Assignment by position
The catalog's playfield positions are matched against the table's items to link hardware that isn't linked yet. Existing links are kept.
Validated against the Terminator 2 table, starting from empty mappings:
The remaining switch differences come from disagreements between the catalog and the table, not from the matching itself.
How it matches:
Runtime
c_game_onalias. Before, only the last row fired.Data folder and ROM folder
GamelogicPaths.RomFolder:Dependencies
GamelogicPathsis on VisualPinball.Enginemaster.package.jsonstill depends onorg.visualpinball.engine.unity0.0.1-preview.119 and needs the first release that contains it.Known gaps
normally_closed.Testing