ASAP is a player of Atari 8-bit music for modern computers and mobile devices. It emulates the POKEY sound chip and the 6502 processor. The project was initially based on the routines from the Atari800 emulator, but the current version has original emulation core.
Input formats
ASAP supports the following file formats:
- SAP (Slight Atari Player)
-
Designed for playing Atari 8-bit music on PCs. All other formats can be converted to SAP. Atari SAP Music Archive (ASMA) is a single big collection of SAP files.
- CMC (Chaos Music Composer)
-
Atari music editor from early 1990s.
- CM3 (CMC "3/4")
-
CMC with modified pattern length.
- CMR (CMC "Rzog")
-
CMC with modified bass sounds.
- CMS (Stereo Double CMC)
-
Stereo CMC.
- DMC (DoublePlay CMC)
-
CMC with 6502 routine executed at double rate of the original CMC.
- DLT (Delta Music Composer)
-
Atari music editor from 1990s.
- FC (Future Composer)
-
Atari music editor from 1990s.
- MPT (Music ProTracker)
-
Atari music editor from 1990s.
- MPD (MPT DoublePlay)
-
MPT with 6502 routine executed at double rate of the original MPT.
- RMT (Raster Music Tracker)
-
Modern Atari music editor running on Windows.
- TMC, TM8 (Theta Music Composer 1.x)
-
Atari music editor from late 1990s. The two file extensions are treated identically and played in stereo. TM8 means it’s stereo (8-channel) music while TMC can be either mono or stereo.
- TM2 (Theta Music Composer 2.x)
-
Modern Atari music editor.
- STIL (SAP Tune Information List)
-
This isn’t a music format. It’s a text file that contains cover information and comments for many music files. This format is identical to C64 STIL. STIL.txt is distributed with ASMA (see above).
You can find some example files in examples.zip.
For viewing Atari pictures check out our sister project RECOIL.
Ports
ASAP runs on Windows, Linux, in web browsers and mobile devices. This remarkable portability is possible thanks to the Ć programming language.
ASAP includes the following programs:
-
plugins for Windows/Linux players: Audacious, VLC, XBMC, GStreamer
-
plugins for Windows players: Windows Media Player, Winamp, foobar2000, XMPlay, Apollo, GSPlayer
-
add-on for Windows library BASS (for AIMP and other players)
-
asapconv - portable command-line converter
-
WASAP - tiny player for Windows (desktop and mobile)
-
POKEY sound emulation DLL for Raster Music Tracker
-
Windows Explorer extension - shows and edits metadata
-
AIRASAP - simple desktop player in the Adobe AIR technology
-
AndroidASAP - player for mobile devices
-
Java midlet - player for mobile phones
-
Flash player - for web pages
-
Java applet - for web pages
-
JavaScript player - for web pages
-
Silverlight player - for web pages
-
MetroASAP - experimental player for Windows 8
-
ASAP2WAV - command-line converters to WAV files implemented in Java, C#, JavaScript, Perl and D
-
simple command-line players implemented in C/SDL, C# and D
To play the music on an Atari 8-bit, convert the music to an Atari program (XEX) using asapconv, WASAP, Winamp, Apollo or XMPlay.
There are other projects which use ASAP:
-
mmSAP - standalone player for GNU/Linux and Windows with GTK+ user interface
-
Rockbox - open source firmware for MP3 players
-
BZR Player - player for Windows
-
Game Music Gear MX - player for PlayStation Portable
-
Modizer - player for iPhone, iPod and iPad
-
Chipamp - bundle of plugins for Winamp
-
Atari Sounds For The Masses - GUI frontend to asapconv for Mac OS X
-
Atari POKEY 8-bit Computer Sound on PIC32 - ASAP on a microcontroller
-
mxPlay - audio player for Atari Falcon
-
enotracker - POKEY music editor for PC
How to embed ASAP on your website
There are four independent web-enabled versions of ASAP:
-
Flash Player (asap.swf)
-
Java applet (asap_applet.jar)
-
Silverlight (SilverASAP.xap)
-
JavaScript (asap.js and asapweb.js)
Flash Player is the most likely one to work in today’s web browsers. Java and Silverlight use least processor time, however many of your visitors may have no Java nor Silverlight installed. JavaScript seems to be the future and even now works fine if you have a modern browser and a powerful processor. Choose for yourself. :)
All four versions were tested against Internet Explorer 6 and 9, Firefox 13, Chrome 19.
You can embed Atari music using just HTML markup. For more control: pause, stop, changing music without reloading the page, displaying titles, you need some JavaScript code.
Flash Player
To embed the player in your web page, use the following XHTML syntax:
<object width="0" height="0" type="application/x-shockwave-flash" data="asap.swf"> <param name="movie" value="asap.swf" /> <param name="wmode" value="transparent" /> <param name="FlashVars" value="file=File.sap" /> </object>
The player will play the specified file. It doesn’t display anything. The wmove parameter prevents a single white pixel in Internet Explorer.
The player understands the following parameters (in ampersand-separated FlashVars):
-
file - URL of the file to play.
-
song - zero-based subsong number.
-
onLoad - JavaScript code or function name to be executed when file is loaded. This is a safe place to call getTitle() etc - see below. Playback starts after the JavaScript code returns.
-
onPlaybackEnd - JavaScript code or function name to be executed when song playback ends. Will not be called as a result of asapStop().
All the above parameters are optional.
The player contains the following methods that can be called from JavaScript:
-
asapPlay(filename : String, song : int = -1) : void - plays the specified song (-1 for the default)
-
asapStop() : void - stops playback
-
asapPause() : Boolean - toggles pause and returns true if pause has been enabled
-
getAuthor() : String - returns the AUTHOR tag of the playing song
-
getTitle() : String - returns the NAME tag of the playing song
-
getDate() : String - returns the DATE tag of the playing song
Java applet
To embed the applet in a web page, use the following HTML syntax:
<applet width="40" height="45" archive="asap_applet.jar" code="ASAPApplet"> <param name="file" value="File.sap" /> </applet>
or the following XHTML:
<object width="40" height="45" type="application/x-java-applet"> <param name="archive" value="asap_applet.jar" /> <param name="code" value="ASAPApplet" /> <param name="file" value="File.sap" /> </object>
The applet will play the specified file and display POKEY channel volume meters scaled to the applet area (you can specify a different size). There are four volume meters for mono music and eight for stereo.
The applet understands the following parameters:
-
file - URL of the file to play.
-
song - zero-based subsong number.
-
background - background color specified as six hexadecimal digits ("rrggbb").
-
foreground - volume bars color specified as six hexadecimal digits ("rrggbb").
-
onLoad - JavaScript code to be executed when file is loaded. This is a safe place to call getTitle() etc - see below. Playback starts after the JavaScript code returns.
-
onPlaybackEnd - JavaScript code to be executed when playback ends. Will not be called as a result of stop().
All the above parameters are optional. For onLoad and onPlaybackEnd to work, add the mayscript attribute to the applet element.
The applet contains the following methods that can be called from JavaScript:
-
void play(String filename, int song) - plays the specified song (-1 for default)
-
void stop() - stops playback
-
boolean togglePause() - toggles pause and returns true if pause has been enabled
-
String getAuthor() - returns the AUTHOR tag of the playing song
-
String getTitle() - returns the NAME tag of the playing song
-
String getDate() - returns the DATE tag of the playing song
Silverlight
To embed the player in your web page, use the following XHTML syntax:
<object width="0" height="0" type="application/x-silverlight-2" data="data:application/x-silverlight-2,"> <param name="source" value="SilverASAP.xap" /> <param name="initParams" value="file=File.sap" /> <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"> <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /> </a> </object>
The player will play the specified file. It doesn’t display anything.
The player understands the following parameters (in ampersand-separated initParams):
-
file - URL of the file to play.
-
song - zero-based subsong number.
-
onLoad - JavaScript code to be executed when file is loaded. This is a safe place to access Title etc - see below. Playback starts after the JavaScript code returns.
-
onPlaybackEnd - JavaScript code to be executed when song playback ends. Will not be called as a result of Stop().
All the above parameters are optional.
The player contains the following methods that can be called from JavaScript:
-
void Play(string filename, int song) - plays the specified song (-1 for the default)
-
void Stop() - stops playback
-
bool Pause() - toggles pause and returns true if pause has been enabled
and the following properties:
-
string Author - returns the AUTHOR tag of the playing song
-
string Title - returns the NAME tag of the playing song
-
string Date - returns the DATE tag of the playing song
The above methods and properties are available in the ASAP object. That is, for Silverlight you need JavaScript code such as:
`document.getElementById('asap').Content.ASAP.Stop()`.
JavaScript
To embed the player in your web page, use the following XHTML syntax:
<script type="text/javascript" src="resampler.js"> </script> <script type="text/javascript" src="swfobject.js"> </script> <script type="text/javascript" src="XAudioServer.js"> </script> <script type="text/javascript" src="asap.js"> </script> <script type="text/javascript" src="asapweb.js"> </script> <script type="text/javascript" src="binaryHttpRequest.js"> </script> <input type="button" value="Play" onclick="binaryHttpRequest('File.sap', asap.play)" /> <input type="button" value="Stop" onclick="asap.stop()" /><br />
The <script> elements are best placed inside the <head> element. resampler.js, swfobject.js and XAudioServer.js should come from XAudioJS. Also take XAudioJS.swf and XAudioServerMediaStreamWorker.js from this project.
The player has the following JavaScript API:
-
asap.play(filename, module, song) - plays the specified song (omit for the default). module is the file contents as an array of unsigned bytes. You may download it from the server using binaryHttpRequest as in the above example, make a JavaScript array with the file contents or even use HTML 5 local file access (see online demo).
-
asap.stop() - stops playback.
-
asap.onLoad = function() { ... } - code to be executed just before the playback is started. Safe place to access asap.title etc - see below.
-
asap.onPlaybackEnd = function() { ... } - code to be executed when song playback ends. Will not be called as a result of asap.stop().
-
asap.author - contains the AUTHOR tag of the playing song
-
asap.title - contains the NAME tag of the playing song
-
asap.date - contains the DATE tag of the playing song
Authors
Piotr Fusik <fox@scene.pl>
|
Creator and main developer. |
Atari800 Emulator Developers (http://atari800.sourceforge.net)
|
6502 and POKEY emulation used in 0.x.y versions of ASAP. |
Zdenek Eisenhammer <pg@pinknet.cz>
|
Testing. |
Maciej Grzybek <grzybson@pigwa.net>
|
Fixed an overflow in the Silverlight port. |
Jakub Husak <jakub.husak@gmail.com>
|
SAP fingerprint calculation. asapscan fixes. |
Henryk Karpowicz <henkar@poczta.tygrys.net>
|
CMC routine modified for the CM3 format. |
Maciek Konecki <maciusk1@wp.pl>
|
Porting to C#. |
Marek Konopka <konop11@poczta.onet.pl>
|
6502 routine for playing DLT. |
Daniel Kozminski <daniel.kozminski@gmail.com>
|
Ideas. |
Jerzy Kut <mono@atari.pl>
|
FC format. |
Marcin Lewandowski <jaskier@atari8.info>
|
6502 routines for playing CMC, MPT, TMC and TM2. |
Ian Luck <il@un4seen.com>
|
Guided development of XMPlay and BASS plugins. |
MarOk <marok7@os.pl>
|
CMS routine fix. |
Adrian Matoga <epi@atari8.info>
|
COVOX information and test files. Testing. Porting to D. |
Perry McFarlane <perry_m@fastmail.fm>
|
POKEY reverse-engineering. |
Kostas Nakos <knakos@gmail.com>
|
Windows CE testing. |
Mariusz Rozwadowski <ramosc64@o2.pl>
|
Suggested CMS, CM3, DLT and STIL format support. |
Slawomir Sledz <slaves@scene.pl>
|
Windows Mobile setup. Thorough testing. |
David Spilka
|
6502 routine for playing CMS. |
Radek Sterba
|
6502 routine for playing RMT. Testing. |
Lukasz Sychowicz <xray@scene.pl>
|
Windows icons. Testing. |
Pawel Szewczyk <ripek@op.pl>
|
Windows setup graphics. |
Michal Szpilowski <miker@atari.pl>
|
Testing. |
Grzegorz Zyla <gsunr@poczta.onet.pl>
|
XBMC plugin testing. |
Feedback
If you are interested in the ASAP project, please subscribe its mailing list. This list is for users and developers. Once you subscribe, you can post comments, ideas and questions about ASAP. They will be answered ASAP. ;-)
Use tracker to submit bug reports, feature requests and small code patches.