ASAP is a player of 8-bit Atari 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 a completely new original emulation core.
Input formats
ASAP supports the following file formats:
- SAP (Slight Atari Player)
-
Designed for playing 8-bit Atari 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 FAIL.
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:
-
asapconv - portable command-line converter
-
WASAP - tiny player for Windows
-
plugin for Apollo
-
plugin for Audacious
-
plugin for foobar2000
-
plugin for GSPlayer
-
plugin for GStreamer
-
plugin for MOC
-
plugin for VLC
-
plugin for Winamp
-
plugin for Windows Media Player
-
plugin for XBMC
-
plugin for XMMS
-
plugin for XMPlay
-
add-on for BASS (for AIMP and other players)
-
POKEY sound emulation DLL for Raster Music Tracker
-
Windows Explorer extension - shows metadata
-
Java version of ASAP2WAV - command-line converter to WAV files
-
Java applet - for web pages (included in this binary package)
-
Java midlet - for mobile devices
-
C# version of ASAP2WAV
-
JavaScript version of ASAP2WAV running in Windows Script Host, Rhino Shell, V8 Shell, JScript .NET, JaegerMonkey and DMDScript
-
JavaScript player - for web pages (included in this binary package)
-
Flash player - for web pages (included in this binary package)
-
asapplay - simple command-line player in C#
-
Silverlight player - for web pages (included in this binary package)
-
AndroidASAP - for mobile devices
-
AIRASAP - simple desktop player in the Adobe AIR technology
-
D version of ASAP2WAV
-
command-line player in D for Windows and Linux
To play the music on an 8-bit Atari, convert the music to an Atari program (XEX) using asapconv, WASAP, Winamp, Apollo or XMPlay.
There are other projects which use ASAP:
-
mmSAP 2 - standalone player for GNU/Linux 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
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
History
- ASAP 3.1.2 (2012-06-25)
-
-
Created VLC plugin (SAP format only).
-
The JavaScript player now works in Chrome, Firefox, Internet Explorer 9 and 6, using XAudioJS.
-
Flash Player, Java applet, Silverlight and JavaScript players were put in a single "web" package.
-
UTF-8 encoding is supported for STIL.
-
Author is no longer hidden in the converted XEX files.
-
Winamp plugin opens ATR disk images and plays files inside them.
-
Audacious plugin updated to Audacious 3.2 and compiled for Windows.
-
BASS add-on updated to be compatible with AIMP 3 (SAP format only).
-
Enabled title/author/year in the BASS add-on (only selected BASS-based players use it, for example EncoreBassing).
-
Windows Media Player codec supports subsongs, AUTHOR and NAME (this works at least with Media Player Classic Home Cinema).
-
JavaScript interface of the web players has been extended and now has same functionality.
-
New TortoiseSVN and TortoiseGit plugins show changes in SAP tags.
-
- ASAP 3.1.1 (2011-10-26)
-
-
Converted XEX files may optionally display information.
-
Fixed conversion of some TYPE D SAP files (e.g. Saturday_Demo.sap) to XEX.
-
Fixed time detection for some FC files.
-
- ASAP 3.1.0 (2011-09-24)
-
-
WASAP/Winamp/Apollo/XMPlay file information window now includes STIL (SAP Tune Information List) and technical data.
-
Added Future Composer (*.fc) format (contributed by Jerzy Kut).
-
Written specification of the SAP format.
-
XMPlay displays STIL, tracker name and RMT instrument names.
-
The 64-bit setup package now includes the Windows Media Player plugin (useful for the Vista/7 sidebar WMP gadget).
-
Java release now includes asap.jar for WUDSN IDE.
-
asapplay in the D programming language has been ported to Linux and 64-bit compilers (by Adrian Matoga).
-
- ASAP 3.0.1 (2011-07-15)
-
-
Uses linear interpolation for resampling (try Toxic_Cream.sap).
-
Displays titles of RMT, TMC and TM2 files.
-
The GSPlayer plugin now works on new Windows Mobile versions.
-
The Android player can play files directly from ZIP archives.
-
asapconv can auto-detect the native format (asapconv -o .%e *.sap).
-
asapconv can relocate modules (asapconv --address=a000 -o relocated.tmc original.tmc).
-
asapconv can write metadata to WAV files.
-
Created an experimental plugin for GStreamer (requires GStreamer with this bug fixed).
-
Converted XEX files disable the built-in BASIC.
-
Converted XEX files clear the I flag for the TYPE D PLAYER routine.
-
Doublequotes and pipes are now allowed characters in the AUTHOR and NAME tags.
-
- ASAP 3.0.0 (2011-05-24)
-
- New ports
-
-
Created a desktop player for the Adobe AIR platform.
-
Ported the Windows Media Player plugin to Windows CE.
-
Created a setup package with the Windows Explorer plugin for 64-bit Windows.
-
The Audacious plugin supports Audacious 2.5.
-
Created RPM packages with asapconv, ASAP C library and the XMMS plugin.
-
Created ASAP2WAV and a simple player in the D programming language.
-
JavaScript ASAP2WAV now runs in DMDScript and JScript.NET.
-
- Emulation accuracy
-
-
Corrected ANTIC and POKEY timings.
-
Implemented STIMER, NMIST and NMIRES hardware registers.
-
Made the CONSOL register readable.
-
Fixed and optimized undocumented 6502 instructions.
-
- Usability improvements
-
-
Conversion to Atari executables (XEX format, also known as COM).
-
RMT files can be extracted from SAP files created in Raster Music Tracker.
-
Implemented subsongs, seek bar and pause in the Android port.
-
Added a date picker in the WASAP/Winamp/Apollo/XMPlay file information window.
-
The FASTPLAY tag can be up to 32767 (previously 312).
-
Browser JavaScript player works on file:/// URLs.
-
asapscan uses a much faster length detection algorithm.
-
- Bug fixes
-
-
Many important fixes in the Audacious plugin.
-
Many fixes in the Android port.
-
- Cleanup
-
-
Rewritten ASAP core to the Ć programming language.
-
Removed defaultPlaybackTime and loopPlaybackTime parameters from applet, Flash Player and Silverlight interfaces.
-
- ASAP 2.1.2 (2010-11-03)
-
There are new ports: Android, Audacious plugin, Silverlight and a simple command-line player using SDL. WASAP has been ported to Windows CE. There’s a new CAB package for Windows CE. Re-running WASAP opens the file selector. JavaScript ASAP2WAV now works in Rhino Shell, Google V8 shell, JScript.NET and JaegerMonkey. A slight fix and an optimization have been applied to 6502 emulation. "Show information about the currently playing file" is now available in XMPlay and has been fixed in Winamp.
- ASAP 2.1.1 (2010-05-05)
-
The SAP file format has been extended with the "NTSC" tag. A BASS add-on (works in AIMP) has been created. A crash in XMPlay has been fixed. The XMMS plugin now works correctly on big endian machines. There’s a new Windows Explorer extension which displays metadata (title, author, year, duration, mono/stereo, number of subsongs, PAL/NTSC) and on Windows Vista/7 can edit them. A simple player in C# has been created.
- ASAP 2.1.0 (2010-02-02)
-
ASAP2WAV has been replaced with asapconv which can additionally convert native modules to and from the SAP format, edit SAP tags and write MP3 files using LAME. A plugin for XMPlay has been created. The foobar2000 plugin has been updated to foobar2000 1.0. Time detection of RMT files has been fixed. PLAYER tag is now optional for TYPE D SAP files. "File Information" window now includes a better validation. Windows Media Player’s "Open" now includes ASAP file types. WASAP has a progress bar for writing WAV files. Flash player uses DEFSONG. Source code has been improved and moved from CVS to Git repository.
- ASAP 2.0.0 (2009-12-10)
-
Windows setup has been created. ASAP has been ported to Flash Player and experimentally to JavaScript. New input formats: DLT, CMS and CM3 are supported. GTIA sound and COVOX are emulated. WASAP now includes "Save as WAV". JavaScript interface of the Java applet has been changed. There were huge changes in the build process: on Unix/Linux it no longer uses the "configure" script and on Windows it uses MinGW for almost all binaries (they are smaller than Visual C++ 2008’s, compatible with Windows 9x, wildcards work in ASAP2WAV).
- ASAP 1.2.1 (2009-05-08)
-
XBMC plugin and POKEY emulation DLL for RMT have been created. The midlet has a progress bar, tags display, subsong selection and better performance. SKCTL emulation has been slightly improved. Documentation has been converted from plain text to HTML.
- ASAP 1.2.0 (2008-03-29)
-
Plugins for Windows Media Player and Apollo have been created. RMT duration detection has been improved. A bug in TMC to SAP conversion has been fixed. ASAP can be compiled as C#.
- ASAP 1.1.0 (2008-02-17)
-
All formats supported by ASAP can be converted to and from the SAP format, using the file information window of WASAP or the Winamp plugin. Unlike SAP Maker, ASAP supports subsongs and TIME tags. POKEY emulation has improved a little. Bugs in the XMMS plugin, the foobar2000 plugin and the applet have been fixed.
- ASAP 1.0.2 (2007-11-02)
-
TIME tags can be edited in the file information window of WASAP and the Winamp plugin. A few emulation bugs have been fixed. Some user interface issues in WASAP have been fixed.
- ASAP 1.0.1 (2007-06-10)
-
Plugin for MOC (Music On Console) has been created. WASAP, Winamp plugin and foobar2000 plugin can edit AUTHOR, NAME and DATE tags in SAP files. Winamp and XMMS plugins format titles as specified by the player. TMC files are now played in stereo. A few minor bugs have been fixed.
- ASAP 1.0.0 (2007-05-28)
-
This release introduces completely new 6502 and POKEY emulation. SAP files with samples are supported. ASAP can be compiled as Java - an applet and an experimental midlet have been created. Winamp, foobar2000 and GSPlayer plugins support silence detection and muting selected POKEY channels. Winamp plugin supports subsongs and Winamp’s equalizer.
- ASAP 0.3.0 (2007-05-06)
-
This release adds support for AUTHOR, NAME, DATE and TIME tags in SAP files. Winamp, foobar2000 and the new GSPlayer plugin have configurable playback time for songs with no TIME tag and songs marked with LOOP. foobar2000 plugin has been updated for version 0.9 of foobar2000. XMMS plugin supports the TM8 extension.
- ASAP 0.2.1 (2006-01-28)
-
This release supports TM2 (Theta Music Composer 2.x) file format. Compilation and installation on Unix-like systems have been improved. foobar2000 plugin supports subsongs.
- ASAP 0.2.0 (2006-01-15)
-
This release supports stereo and 16-bit audio output (enabled by default). Compressed SAP files (for example Fractals.sap) are played correctly. Subsongs are supported in RMT files. There are new plugins: for XMMS and for foobar2000 version 0.8. WASAP supports Windows Explorer’s "Open with".
- ASAP 0.1.0 (2005-12-31)
-
This is the initial release of ASAP (Another Slight Atari Player) - a player/converter of 8-bit Atari music for modern computers. ASAP provides high-quality, identical to the popular Atari800 emulator, emulation of the POKEY sound chip and the 6502 processor.
This release includes: ASAP2WAV - portable command-line utility for converting 8-bit Atari music to WAV files, WASAP - a tiny player for Windows and in_asap - a Winamp plugin. Currently supported input formats are: SAP (except for samples and stereo), CMC, CMR, DMC, MPT (without samples), MPD, RMT (mono) and TMC (mono).
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.
- 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 support.
- 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.
- 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.