Visual Pinball X
Visual Pinball X emulates Visual Pinball tables. It reads 11 files, none of them required: it starts games without them.
About this profile
Install this emulator's files
With Batocera, Recalbox or RetroBat: the installer finds Batocera, Recalbox or RetroBat and its BIOS folder, then downloads only the files Visual Pinball X reads there and checks each one.
Open Start. Type PowerShell, press Enter. Click Copy. Right-click to paste. Press Enter.
&([scriptblock]::Create((irm https://abdess.github.io/retrobios/i.ps1))) --emulator visual-pinballOpen a terminal on the device. Or connect from a computer with SSH, a terminal over the network. Paste the line. Press Enter.
curl -fsSL https://abdess.github.io/retrobios/i | sh -s -- --emulator visual-pinballTechnical notes
Pinball table simulator. The table is the content: .vpx and .vpt files are
OLE Compound Documents holding the geometry, textures, sounds and a VBScript
program, read through POLE (src/), and a .vpz
pack, a zip or a plain folder of JSON part files, is read through the JSON
serializer instead (src/parts/pintable.cpp:1459,
src/). Every build other than the Windows
editor compiles the shared source set with STANDALONE and links
libwinevbs, Wine's VBScript engine with its COM and ATL headers, beside SDL3,
SDL3_ttf, FreeImage, hidapi, opusfile with opus and ogg, libspatialaudio and
libmysofa with zlib (make/,655-668, make/).
AlphaDMD, AltSound, B2S, BAM (Windows only), DMDUtil, DOF, FlexDMD,
HelloScript, HelloWorld, Inspector, Nixie, PinMAME, PUP, RemoteControl, Serum,
UpscaleDMD, VNI and WMP are plugins staged in plugins/ next to the binary, ../PlugIns on macOS
(make/,55-72). The player scans that folder, then
plugins/ under the preferences folder when it exists, the first plugin found
for an id winning, and loads every subfolder whose plugin.cfg names a
library for the running platform (src/core/player.cpp:198-199,
src/, src/,
plugins/).
ES-DE finds VPinballX_BGFX or VPinballX_GL and
runs <binary> -play <rom>, Batocera builds the standalone tree at
3ec37c7f9a into /usr/bin/vpinball and runs VPinballX_GL -PrefPath <dir> -Ini <dir>/, RetroBat drives the Windows build with its
registered VPinMAME COM server.
File location sits in one class. FileLocator holds m_appPath, the
read-only installation folder, and m_prefPath, the preferences folder that
-PrefPath overrides, and it works in one of two layout modes: AppPrefData
splits static data, settings and table files across the three, AppOnly keeps
everything in the application folder, which is the legacy Windows 9x
behaviour. Which one applies is decided by where VPinballX.ini is found: in
the preferences folder gives AppPrefData, else beside the executable gives
AppOnly, else AppPrefData (src/core/FileLocator.h:12-26,67,73-76,
src/). The preferences folder is the SDL
preference path for VPinballX with a major.minor subfolder
(src/core/FileLocator.cpp:52-59). Batocera's 001-default-path.patch
redirects the PinMAME root from $HOME/.pinmame to <prefpath>/pinmame.
Table scripts pull their libraries through SearchScript, which walks ten
locations in order, each case-insensitively: the table's own folder, then
user/ and scripts/ beside it, then the installation folder with user/,
scripts/ and tables/ under it, then the preferences folder with user/ and
scripts/ under it (src/,
src/). The
scripts/ directory the build ships carries the 73 .vbs files tables include
by name, core.vbs and controller.vbs beside the per-manufacturer machine
scripts (WPC.vbs, sam.vbs, s11.vbs, zac.vbs and the rest), copied from
src/scripts (make/). The Windows editor's
completion parser asks for core.vbs through the same search without a table,
so in the seven installation and preferences locations, and shows a warning
box when none holds it (src/,
src/).
Table scripts also read four directory properties. UserDirectory is the
table's user folder, created on demand, TablesDirectory the system documents
folder or the installation folder when SDL reports none, MusicDirectory the
table's music folder with an optional subfolder, ScriptsDirectory scripts/
under the installation folder. MusicDirectory falls back to the folders
10.8 searched, listed under table music below. Each fails when its
directory does not exist (src/, 427-480,
src/).
In AppPrefData mode user/, music/, cache/<table name>/ and autosave/ sit
beside the table. A folder missing there on a read is looked up the AppOnly
way, where user/ hangs off the installation folder, the cache sits under
Cache/<table name> in the preferences folder and music/ is tried under the
installation folder, the table folder, then the preferences folder
(src/).
The rest of the install tree is read the same way and ships with the binary:
assets/ holds BallEnv.exr, AODither.webp and EnvMap.webp, the first two
loaded with no fallback (src/),
the bumper and kicker textures (src/parts/bumper.cpp:150,162,171,186,
src/parts/kicker.cpp:200-241), the segment display textures, each with a
<name>-cov.png coverage atlas loaded beside it and dropped when its width is
not twice the texture's (src/,1068-1111),
TableSizes.csv, the table size
database (src/core/TableDB.cpp:16), vpinball.png for the window icon
(src/renderer/Window.cpp:287), LiberationSans-Regular.ttf, the font textboxes
and decals fall back to when neither the table folder, as
<FontName>-<Style>.ttf, nor the table file carries the font, nor on builds
with the Windows SDK an installed font matches
(src/), and which PUP adds after the fonts
of a pack's FONTS folder (plugins/),
fabian-hrir.sofa, listed below, the editor/ part icons
(src/) and four starter tables, the
.vpz folder packs blankTable.vpz, exampleTable.vpz, lightSeqTable.vpz and
strippedTable.vpz: the live editor loads blankTable.vpz when started without a table or when
the requested one fails to load, and its New Table menu loads any of the
four (src/, src/).
OpenGL builds also get shaders-10.8.1/, the .glfx and .fxh sources parsed at
runtime (src/core/FileLocator.cpp:237, src/,2052-2055,
make/), and the directory is not copied for the BGFX
renderer. Four plugins carry resources of their own: plugins/flexdmd/assets/
holds the bitmap fonts UltraDMD asks for by resource name, the
FlexDMD.Resources. prefix being stripped before the lookup
(plugins/,32-34,
plugins/,262-282),
plugins/nixie/layouts/ the default .nix layouts and the glass textures they
name (plugins/, plugins/nixie/Nixie.cpp:45-65,104-129),
plugins/inspector/assets/ the pages of the inspector's web server
(plugins/), and plugins/pinmame/ the
memmaps/ and gamedefs/ trees the platform scripts fetch from
tomlogic/pinball-memory-maps at f0c4220 and vpinball/pinmame-game-defs at
3ae4115 (make/, platforms/config.sh:11-13,
platforms/,757-760).
Two parts of that tree ship without a reader on the desktop targets.
docs/Changelog.txt is read by the About dialog
(src/), which only the Windows editor
build reaches, the editor being compiled out of every STANDALONE build
(src/core/stdafx.h:36-40, src/core/AppCommands.cpp:14-18,
make/CMakeLists_app.txt:78-80), and assets/web/, vpx.html with its scripts
and style sheets, is served by the web server that only the iOS and Android
library build compiles (lib/src/WebServer.cpp:92-99,
make/, make/CMakeLists_app.txt:730).
PinMAME is where the emulation happens. Tables that recreate a real solid
state machine hand a ROM name to the controller, which resolves its root as
the pinmame folder beside the table when that folder holds roms/, else the
PinMAMEPath setting, else $HOME/.pinmame on Linux and macOS, <prefpath>/pinmame
on iOS and Android, and the registered Visual PinMAME install folder with its
registry folder settings on Windows
(plugins/,295-315,458-530). libpinmame then hangs
roms, nvram, samples, cfg, hi, inp, memcard and sta off that root
(pinmame src/libpinmame/libpinmame.cpp:88-94,1326-1331) and reads alias.txt
from it, a list that renames a requested game before the driver lookup
(pinmame src/libpinmame/libpinmame.cpp:366-399,405-408). A memmaps folder,
beside roms/ in the table's pinmame folder, under the PinMAMEPath setting or
shipped in the plugin folder, is scanned for an index.json that maps the ROM
name to an NVRAM memory map, loaded with the platforms/<platform>.json it
names, and a gamedefs folder found the same way supplies
catalog/pinmame.json, which maps the driver to a game definition naming the
machine's inputs and outputs (plugins/,
plugins/).
A ROM set is one zip per machine, and every ROM is looked up in the game's zip first, then up its parent chain (pinmame src/common.c:1379-1386). PinMAME carries neither GAME_IS_BIOS_ROOT nor ROM_SYSTEM_BIOS. What it has are nine container sets flagged NOT_A_DRIVER, gts1, gts1s, gts80, gts80s, gts80a, gts80as, allied, gp_110 and recel, each the parent of its family's games and holding the family's system ROMs. A game declares its system ROMs in its own set as well, so they are read from the game zip when it carries them and from the container zip otherwise. The Allied Leisure and Game Plan 110 games declare nothing else. The nine are listed below.
Two shared data files sit outside that ROM content and are listed below as
well. Two more that the MAME lineage would suggest are unreachable here. The
mechanical sample set named by pinmame_sample_names, "*pinmame" followed by
eighteen .wav members (pinmame src/wpc/wpcsam.c:31-57), is dead twice over:
readsamples returns before opening anything unless options.use_samples is set
(pinmame src/common.c:276), the two files that register that option live in
src/windows/config.c and src/unix/sound.c and neither is in the libpinmame
source list, and PinmameSetConfig zeroes the whole options struct
(pinmame src/libpinmame/libpinmame.cpp:1317). Independently, SAMPLESINTERFACE
is defined in the PinMAME tree (pinmame src/wpc/wpcsam.h:23) and no driver
references it. history.dat and mameinfo.dat (pinmame src/datafile.c:619-623,
649-653) are read only by displayhistory, a page of the MAME on-screen menu
(pinmame src/usrintrf.c:2846-2851), and by the listing path in
pinmame src/info.c:820 which libpinmame never calls. VPX passes NULL for
fn_IsKeyPressed, the thirteenth member of PinmameConfig
(plugins/, pinmame src/libpinmame/libpinmame.h:483-499),
so osd_is_key_pressed always answers 0
(pinmame src/libpinmame/libpinmame.cpp:584-590) and the menu cannot be opened.
The pinmame observations were read at 20a1d01ab83c5f5571bf0304ae45971bf6220a27,
the revision the build scripts fetch (platforms/config.sh:11-13), and the libdof
ones at 5c54ef784ddc31738a9b2a422380f170bd63121b (platforms/config.sh:20).
11 files: 0 required, 11 optional. 4 more files come with the app.
By kind: 4 BIOS, 9 BIOS ZIPs and 2 game data.
In this collection: 11 in repo and 0 missing.
Optional
Section titled “Optional”| File | Contents | Status |
|---|---|---|
gts1.zipGottlieb System 1 system ROMs
Source and 2 members
| 2 | in repo BIOS ZIP |
gts1s.zipGottlieb System 1 with sound board, system ROMs
Source and 2 members
| 2 | in repo BIOS ZIP |
gts80.zipGottlieb System 80 with speech board, system ROMs
Source and 2 members
| 2 | in repo BIOS ZIP |
gts80s.zipGottlieb System 80, system ROMs
Source and 2 members
| 2 | in repo BIOS ZIP |
gts80a.zipGottlieb System 80A with speech board, system ROMs
Source and 2 members
| 2 | in repo BIOS ZIP |
gts80as.zipGottlieb System 80A, system ROMs
Source and 2 members
| 2 | in repo BIOS ZIP |
allied.zipAllied Leisure system ROMs
Source and 3 members
| 3 | in repo BIOS ZIP |
gp_110.zipGame Plan Model 110 system ROMs
Source and 2 members
| 2 | in repo BIOS ZIP |
recel.zipRecel System III shared program
Source and 2 members
| 2 | in repo BIOS ZIP |
Game data
Section titled “Game data”| File | Status |
|---|---|
hiscore.datMAME high score memory map database, read once per machine start
Source
| optional in repo game data |
cheat.datMAME cheat database, read when the PinMAME plugin's Cheat setting is on
Source
| optional in repo game data |
Comes with the app
Section titled “Comes with the app”| File | Status | Hash |
|---|---|---|
fabian-hrir.sofaFABIAN full-sphere HRIR set, the HRTF of the binaural spatial audio renderer
Hashes and source
| - | MD5 b98b60a050e3 |
plugins/nixie/layouts/Nixie default score display layouts, twelve .nix files and the four glass textures they name
| directory | - |
plugins/pinmame/memmaps/NVRAM memory maps, index.json with the maps/ and platforms/ files it names
| directory | - |
plugins/pinmame/gamedefs/PinMAME game definitions, catalog/pinmame.json, the machines/ files it names and the controllers/ files those reference
| directory | - |
Profile data
Section titled “Profile data”Source analysis
-
shipped with the binary:
-
note: Copied into the build output next to the executable and installed as one unit by every distribution, so they arrive with the emulator rather than being sourced separately.
-
source ref:
make/CMakeLists_app.txt:684-688 -
entries:
- what: scripts/, the .vbs library tables include, source ref:
src/,core/ FileLocator.cpp:414-447 src/,core/ ScriptGlobalTable.cpp:396-425 src/ui/ win/ codeview.cpp:2053-2061 - what: assets/, textures, segment display maps, TableSizes.csv, the window icon, the fallback font, the editor icons, source ref:
src/,renderer/ Renderer.cpp:165-177 src/,renderer/ Renderer.cpp:968-983 src/,renderer/ Renderer.cpp:1068-1111 src/parts/bumper.cpp:150,src/parts/bumper.cpp:162,src/parts/bumper.cpp:171,src/parts/bumper.cpp:186,src/parts/kicker.cpp:200-241,src/core/TableDB.cpp:16,src/renderer/Window.cpp:287,src/,renderer/ TextRenderer.cpp:186-187 plugins/,pup/ PUPManager.cpp:480-482 src/ui/live/EditorUI.cpp:1934-1965 - what: assets/blankTable.vpz, exampleTable.vpz, lightSeqTable.vpz, strippedTable.vpz, folder packs of JSON part files, source ref:
src/core/AppCommands.cpp:302-308,src/ui/live/EditorUI.cpp:439-458, note: The live editor's default table and its four New Table templates. - what: shaders-10.8.1/, .glfx and .fxh parsed at runtime by the OpenGL renderer, source ref:
src/core/FileLocator.cpp:237,src/renderer/Shader.cpp:1807-1808,src/renderer/Shader.cpp:2211-2214,make/CMakeLists_app.txt:690-700 - what: plugins/<name>/plugin.cfg, the descriptor naming each plugin's library, source ref:
src/core/player.cpp:198,plugins/plugins/MsgPluginManager.cpp:425-436 - what: plugins/flexdmd/assets/, the bitmap fonts UltraDMD names as FlexDMD.Resources.*, source ref:
plugins/flexdmd/UltraDMD.cpp:20-24,plugins/flexdmd/UltraDMD.cpp:32-34,plugins/flexdmd/resources/AssetManager.cpp:103-109,plugins/flexdmd/resources/AssetManager.cpp:262-282,make/CMakeLists_plugin_FlexDMD.txt:179-182 - what: plugins/nixie/layouts/, the default .nix score display layouts and their glass textures, source ref:
plugins/nixie/NixiePlugin.cpp:96-110,plugins/nixie/Nixie.cpp:45-65,plugins/nixie/Nixie.cpp:104-129,make/CMakeLists_plugin_Nixie.txt:92-95, note: The last source each of the backglass, score view and topper windows falls back to. Every .nix file in the folder is parsed, and a file is kept only when it parses completely. - what: plugins/inspector/assets/, the inspector web pages, source ref:
plugins/inspector/InspectorPlugin.cpp:618-626,make/CMakeLists_plugin_Inspector.txt:96 - what: plugins/pinmame/memmaps/ and plugins/pinmame/gamedefs/, the NVRAM memory maps and game definitions, source ref:
make/CMakeLists_plugin_PinMAME.txt:115-122,plugins/pinmame/PinMAMEPlugin.cpp:486-493,platforms/config.sh:11-13,platforms/linux-x64/external.sh:271-277,platforms/linux-x64/external.sh:757-760, note: Copied only when the platform script has fetched them into third-party/: index.json, maps/ and platforms/ from tomlogic/pinball-memory-maps, catalog/, machines/ and controllers/ from vpinball/pinmame-game-defs. A table's own pinmame folder or the PinMAMEPath setting takes precedence.
- what: scripts/, the .vbs library tables include, source ref:
-
-
shipped without a reader:
-
note: Copied into the build output but unreachable in the desktop standalone binary
-
entries:
- what: docs/Changelog.txt, source ref:
src/ui/win/dialogs/AboutDialog.cpp:34,src/core/stdafx.h:36-40,src/core/AppCommands.cpp:14-18,make/CMakeLists_app.txt:687, note: The About dialog belongs to the Windows editor, compiled out of every standalone build. - what: assets/web/, vpx.html and the files it pulls, source ref:
lib/src/WebServer.cpp:92-99,make/CMakeLists_sources.txt:862-870, note: The web server is compiled into the iOS and Android library build only.
- what: docs/Changelog.txt, source ref:
-
-
user supplied paths:
-
note: Per table, keyed on the table folder or the ROM name
-
entries:
- what: PinMAME ROM sets, <pinmame root>/roms/<romname>.zip, source ref:
plugins/pinmame/PinMAMEPlugin.cpp:458-530,pinmame src/libpinmame/libpinmame.cpp:89,pinmame src/libpinmame/libpinmame.cpp:1326-1328, note: One zip per machine. The root is the pinmame folder beside the table when it holds roms/, else the PinMAMEPath setting, else $HOME/.pinmame on Linux and macOS and <prefpath>/pinmame on iOS and Android. Batocera patches the Linux fallback to <prefpath>/pinmame. On Windows the last resort is the registered Visual PinMAME install folder, whose rompath, nvram, samples, cfg and hiscore registry settings replace the default subfolders. - what: PinMAME game aliases, <pinmame root>/alias.txt, source ref:
pinmame src/libpinmame/libpinmame.cpp:366-399,pinmame src/libpinmame/libpinmame.cpp:405-408, note: Optional. Each line pairs a requested game name with the ROM set loaded in its place. - what: NVRAM memory maps, memmaps/index.json and the map files it names, source ref:
plugins/pinmame/PinMAMEPlugin.cpp:469,plugins/pinmame/PinMAMEPlugin.cpp:480-481,plugins/pinmame/PinMAMEPlugin.cpp:489-490,plugins/pinmame/Controller.cpp:196-254, note: Optional. index.json maps the ROM name to a map file, whose _metadata.platform names the platforms/<platform>.json loaded with it. - what: game definitions, gamedefs/catalog/pinmame.json and the definition it names, source ref:
plugins/pinmame/PinMAMEPlugin.cpp:470,plugins/pinmame/PinMAMEPlugin.cpp:482-483,plugins/pinmame/PinMAMEPlugin.cpp:491-492,plugins/pinmame/Controller.cpp:256-296, note: Optional. The catalog's drivers array maps the ROM name to a definition file under gamedefs/. - what: backglass, <table basename>.directb2s, else <table folder name>.directb2s, source ref:
plugins/b2s/B2SServer.cpp:321-327,plugins/b2s/B2SServer.cpp:450-467,plugins/b2s/B2SServer.cpp:491-495,plugins/b2s/B2SPlugin.cpp:76, note: Looked up in the table folder, or in the WorkingDir a table script sets. Edits made in the plugin's backglass editor are written back to the file through a temporary file renamed over it (plugins/b2s/B2SServer.cpp:111-113). - what: Serum colorizations, <table folder>/serum/<rom>/<rom>.cROMc or .cRZ, else the SerumPath setting, source ref:
plugins/serum/serum.cpp:51,plugins/serum/serum.cpp:743-787, note: A namespace folder may sit above the ROM folder, and PinMAME games are also looked up in <table folder>/pinmame/altcolor. - what: VNI colorizations, <table folder>/vni/<rom>/<rom>.pal with an optional .vni, else the VniPath setting, source ref:
plugins/vni/vni.cpp:39,plugins/vni/vni.cpp:326-376, note: pin2dmd.pal and pin2dmd.vni are accepted in the same folder, and PinMAME games are also looked up in <table folder>/pinmame/altcolor. - what: alternative sound packages, <table folder>/altsound/<rom>, else <table folder>/pinmame/altsound/<rom>, else the plugin's Folder setting, source ref:
plugins/altsound/AltSoundPlugin.cpp:28,plugins/altsound/AltSoundPlugin.cpp:114-151, note: The library appends altsound/<rom> to the parent of the folder found, so that folder must be named altsound with this exact case. - what: PUP video packs, <table folder>/pupvideos/<rom>, else pupvideos/ under the PUPFolder setting, source ref:
plugins/pup/PUPManager.cpp:132-160,plugins/pup/PUPPlugin.cpp:64,plugins/pup/PUPPlugin.cpp:295-306, note: A namespace folder may sit above the ROM folder. - what: PUP pack sounds, every .wav in PUPSOUNDS/ inside the PUP video pack, source ref:
plugins/pup/PUPSound.cpp:23-66,plugins/pup/PUPManager.cpp:175, note: The pack's PuPSound triggers play these by name. ballroll0.wav to ballroll9.wav loop as ball rolling sounds. - what: Nixie layouts, <table basename>.nix, else <table folder name>.nix, else the LayoutFolder setting, source ref:
plugins/nixie/NixiePlugin.cpp:23,plugins/nixie/NixiePlugin.cpp:60-113,plugins/nixie/Nixie.cpp:45-65,plugins/nixie/Nixie.cpp:104-129, note: The setting names one .nix file or a folder of them. Each window walks the chain on its own and stops at the first source with a layout targeting it. Glass and picture images are read relative to the layout file. - what: DOF configuration, <prefpath>/directoutputconfig/GlobalConfig_B2SServer.xml, else ./directoutputconfig/ under the working directory, source ref:
plugins/dof/DOFPlugin.cpp:288-293,libdof src/DOF.cpp:36-45, note: The global configuration names the cabinet and table configuration files libdof reads next. - what: table music, music/ beside the table, source ref:
src/core/ScriptGlobalTable.cpp:120-148,src/core/ScriptGlobalTable.cpp:150-190,src/core/FileLocator.cpp:281-412, note: An absolute path passed by the script is tried first. In the legacy layout, music/ under the installation folder, then the table folder, then the preferences folder. When neither finds the file, the folders 10.8 searched are tried: music/ under the installation folder, the table folder, music/ under it, then C:\Visual Pinball\music and music/ under %APPDATA%\VPinballX on Windows, ~/.vpinball/music elsewhere. - what: textbox and decal fonts, <table folder>/<FontName>-<Style>.ttf, source ref:
src/renderer/TextRenderer.cpp:116-155,src/parts/textbox.cpp:603,src/parts/decal.cpp:135, note: A font embedded in the table file is tried next. - what: table sidecars, the .vbs script override, the per-table .ini and the legacy .pov, source ref:
src/parts/pintable.cpp:1507-1523,src/parts/pintable.cpp:1070-1122,src/parts/pintable.h:603-617, note: The .vbs is searched like a script library under the table's name, then beside the table under its folder's name. The .ini takes the table's name, then its folder's name, a settings profile variant of each being tried first. The .pov is imported only when no .ini exists, else autopov.pov when present.
- what: PinMAME ROM sets, <pinmame root>/roms/<romname>.zip, source ref:
-
-
generated files:
- what: VPinballX.ini, the settings file, source ref:
src/core/VPApp.cpp:297-311,src/core/AppCommands.cpp:624-630, note: Looked up in the preferences folder, then beside the binary. When neither holds one the preferences path is kept. -Ini names another file. Batocera seeds it from the assets/Default_VPinballX.ini its pinned tree carries and rewrites it before every launch. - what: VPReg.ini, values saved by table scripts in the table's user folder, and vpinball.log in the preferences folder, source ref:
src/core/ScriptGlobalTable.cpp:583-616,src/utils/Logger.cpp:160-161 - what: <table>.info, the frontend information file beside the table, source ref:
src/parts/pintable.cpp:1125-1136,src/parts/pintable.cpp:1202-1227,src/parts/pintable.h:619-620,src/core/player.cpp:1054,src/core/player.cpp:1068, note: Only its VPX section is written, with the run count, the last run date and the play time. - what: PinMAME state: nvram/, cfg/, hi/, inp/, memcard/ and sta/, source ref:
pinmame src/libpinmame/libpinmame.cpp:90,pinmame src/libpinmame/libpinmame.cpp:92-93,pinmame src/libpinmame/libpinmame.cpp:1329-1331, note: Written by PinMAME as the machine runs.
- what: VPinballX.ini, the settings file, source ref:
Next steps
Section titled “Next steps”- Get the files, for the setup in use
- Every system, and the files each one needs
- When a game does not start