RetroPlatform "Now Playing" Data
This document explains how to access and use the file-based "Now Playing" status information exposed by RetroPlatform implementations like Amiga Forever and C64 Forever.
Version 2.1 of the RetroPlatform engine, as used in "2009.1" versions of Amiga Forever and C64 Forever, introduced "now playing" status information written as XML and plain tex tto a local file.
Version 3.2 of the RetroPlatform engine, as used in "2012.2" versions of Amiga Forever and C64 Forever, added support for direct posting to popular platforms such as Facebook, Twitter, Windows Live and Skype. However, some applications may still prefer to access the file-based data.
When the player starts a session, it writes or updates a "NowPlaying.xml" file (example). When a session is closed, the file is deleted. Although the status may get "garbled" if multiple instances are executed, it is generally safe to assume that if the file exists there is a "now playing" in progress.
Applications are encouraged to monitor the file for changes without locking it. Applications that can publish the "now playing" status of different players (Windows Media Player, Winamp, iTunes, etc.) may want to show RetroPlatform Player information if present, or else fall back to music (which is more of a "background" activity compared to the more prominent playing session).
The directory containing the file is referenced by the following registry value:
On a Windows Vista or Windows 7 system the full path would be something like "C:\ProgramData\Cloanto\RetroPlatform\NowPlaying.xml".
After installation of Amiga Forever or C64 Forever 2009.1 or higher on a Windows system, the directory is also referenced by the %RETROPLATFORMDATA% environment variable. Because this variable is new and is set only by the installer, and not by automatic updates, it is most prudent to access the path via the registry key.
For tools that are not able to parse XML data, the file includes non-XML data nested inside an XML comment in lines 4-11. For a non-XML parser it is therefore sufficient to skip lines 1-3, and import the desired fields from lines 4-11. If fields are added in the future, they will follow line 11. Lines may be terminated by CR, LF or CR+LF. If a field is empty, the line is present, but empty (no text before line terminator). To ease parsing even by the simplest applications, the comment data is guaranteed to be encoded as "windows-1252", and the file does not have a BOM header.
The XML data and the non-XML data include a meaningful complete status line (e.g. "Playing Asteroid Invader II by Acme Games on Amiga Forever"), followed by a series of individual fields that may be used for custom applications. The data appears in the following order:
- Status (sentence-like status line)
- Player (name of the player instance)
- Title (title of the game, demoscene production, etc.)
- Entity (name of the publisher, demo group, etc.)
- System (Amiga, C64, Plus/4, etc.)
- OID (RetroPlatform Object ID, can be used to load game graphics, etc.)
- Title URL
|Additional Keywords:||Twitter, Skype, MSN, Messenger|
It is safe to link to this page.