• skip to content

RetroPlatform

by Cloanto


  • Contact

  • Overview
  • Reference
  • Skins
  • Affiliates
  • Links
  • Change Log


RetroPlatform "Now Playing" Data

TOPIC

This document explains how to access and use the "Now Playing" status information exposed by RetroPlatform implementations like Amiga Forever and C64 Forever

DISCUSSION

Version 2.1 of the RetroPlatform engine, as used in "2009.1" versions of Amiga Forever and C64 Forever, introduced "now playing" status information for use by third-party utilities that can post this data in dynamic status contexts (Messenger, Skype, Twitter, etc.)

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 can get "garbled" when 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:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Cloanto\RetroPlatform\DataPath

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-10. For a non-XML parser it is therefore sufficient to skip lines 1-3, and import the desired fields from lines 4-10. If fields are added in the future, they will follow line 10. 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 C64 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.)
  • year
  • id (RetroPlatform object ID, can be used to load game graphics, etc.)

ARTICLE INFORMATION

Article ID:19-104
Platform:All
Products: RetroPlatform Player
Additional Keywords:Twitter, Skype, MSN, Messenger
Last Update:2009-11-18

It is safe to link to this page.


© 1997-2010 Cloanto Italia srl | Legal | Privacy