PinballY automatically displays the "live" high score information for the currently selected game. The high scores are displayed in the video DMD window and on the real DMD device, if you have one.
Scores are displayed in rotation with the game's regular background media for the DMD window or device. If you've supplied a static image for the DMD, the image will be displayed for about 7 seconds at a time, and then the high scores will be displayed, then the image will be displayed again, etc. If the game has a DMD video, the video will be displayed all the way through, then the scores will be displayed, then the video will play again, and so on.
For most games, PinballY uses a separate program called PINemHi, written by vpforums member DnaDisturber. (PINemHi is included in the PinballY distribution with the author's permission, so there's no need to install it separately.)
PINemHi reads special files known as NVRAM (for Non-Volatile RAM) files. These are created by Visual Pinball (more technically, by VPinMAME) and by Future Pinball when you play games through those systems, and they store information that the simulated pinball machines would have stored in real life in their on-board memory chips. The stored information includes things like operator settings (for example, whether or not the game is in Free Play mode, how many balls per game it's configured to use, and so on) and audit counts (how many times the game has been played, how many coins it's collected), as well as the latest high scores. PINemHi is programmed to parse the NVRAM files for almost all of the VPinMAME and Future Pinball games in existence to pick out the high score information and format it for display.
PINemHi works with almost all games that use VPinMAME to play back original ROMs, and with almost all Future Pinball games. PINemHi doesn't work with Visual Pinball games that don't use ROMs, such as original VP creations, and VP re-creations of games from the electromechanical (EM) era. PINemHi also doesn't work for games based on other player systems, such as commercial games.
For games that PINemHi doesn't work with, PinballY provides its own supplemental way to provide the high scores, using ad hoc score files. This requires specific code to be added to each table to write the ad hoc file, so it will only work with tables that have been specifically programmed to support it.
Here's how this works:
For the video DMD window, PinballY offers three display styles for generated high score graphics, to cover the three main display styles used in real pinball machines over the decades:
By default, the program picks the display style for each game automatically based on the table's metadata, as stored in the XML table database. (You can edit this information via the Game Details dialog.)
You can override the default style on a game-by-game basis in the Edit Game Details dialog. That lets you fix any games that the rules above classify in the wrong category, or any that you just want to change for other reasons.
The display styles only apply to a video DMD window - that is, a regular video monitor that's showing a simulated DMD image in a window. If you're using a real DMD device (a physical DMD, such as a PinDMD or a Pin2DMD), PinballY just uses a plain "dots" font for high score displays, since the dot resolution on those devices is too low to simulate the other styles effectively.
The Typewriter style normally uses an image of an index card as the background, with black text in the Courier New font to display the score information. You can customize both of these aspects of the display:
If you're creating your own DMD video for a game based on captured video from the game's "live" DMD, you can get the best effect in PinballY by editing the captured video to clip out the portion that shows the high scores.
Most electronic games from the late 1980s onward display a series of "attract mode" messages between games, and these usually include the high scores. So if you capture video from the DMD during the game's attract mode, it will probably include the high scores. Those high scores will be the ones that were current at the time you captured the video, though! If you leave them in the video, the video playback will forever show those same scores, even if you beat them on later games. That's why it's best to edit them out.
Since PinballY automatically generates graphics with the latest high scores from the NVRAM files, and interleaves them with the captured DMD video, you can create an almost seamless effect showing the live scores. The trick is to edit the captured video so that it starts just after the high scores are displayed in the video, and ends just before the high scores are displayed again on the next cycle. That way, PinballY will insert the live high score screens at just the right point in the video, simulating the original rotation, but always up to date with the latest high scores saved on disk.
The Javascript system includes an event class, HighScoresEvent, that lets you intercept PinballY's communications with PINemHi to supplement or replace the high scores that PINemHi provides. This could be used to change the format of the high scores for certain games, for example, or to provide your own external source of high scores for games that PINemHi doesn't work with. See the event class documentation for more details.
Javascript can also access the high score information that the system has retrieved for a game, via gameInfo.getHighScores(). For example, you could use that to create custom graphics that incorporate a list of high scores.