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

  • plugins for Linux players: XMMS, MOC

  • 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

This table summarizes differences between the above versions.

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:

Using asapconv

Run the program from the command line to see the syntax. The -o/--output option selects the output format and is mandatory.

Using libasap

The library is documented in the asap.h header file. Be warned there might be breaking changes in the future versions of the library.

Compilation instructions

Required tools

For all builds you will need:

GNU Make

On Linux this program is called make. On other systems it may be called gmake (if this is the case, type gmake instead of make in the following instructions). On Windows you may install GNU Make from Cygwin or MinGW.

Standard Unix tools

I mean sh, cat, cp, rm, mkdir. On Windows you can find them in Cygwin.

xasm and MADS

If you are compiling latest source code from Git, install xasm and MADS.

Ć Translator

The core of ASAP is written in the Ć programming language. You’ll need cito. For your convenience, this is not needed for most of the C and C++ ports.

Make sure these tools are on your PATH.

Getting officially released source code

If you want to compile an official release of ASAP, download a source distribution (asap-*.tar.gz) and uncompress it to a directory of your choice.

On Unix-like systems:

tar zxf asap-*.tar.gz

On Windows you may use 7-Zip.

Getting latest source code

Alternatively you may get the latest version from the Git repository. To do this using a command-line Git client:

git clone git://git.code.sf.net/p/asap/code asap-code

This will fetch the latest code into a new directory called asap-code.

Building asapconv and libasap on Unix-like systems

From your shell prompt navigate to the directory which contains asap.c.

To compile and install, run the following commands:

make
sudo make install

The latter command installs the command-line converter and the C library in /usr/local.

Building the Audacious plugin on Unix-like systems

Install audacious-dev or audacious-devel. To compile, run the following command:

make asap-audacious

To install:

sudo make install-audacious

Building the GStreamer plugin on Unix-like systems

To compile, run the following command:

make asap-gstreamer

To install in /usr/lib/gstreamer-0.10:

sudo make install-gstreamer

Building the MOC plugin on Unix-like systems

You need source code of MOC. The plugin is compatible with MOC 2.4.x and MOC 2.5.0 alpha.

Check MOC_INCLUDE and MOC_PLUGIN_DIR in the moc/moc.mk file. These should be the directory with MOC sources and the directory with the installed MOC plugins, respectively.

If the defaults are correct, use the following commands:

make asap-moc
sudo make install-moc

If you need to specify different directories, use:

make asap-moc MOC_INCLUDE=path/to/moc/sources
sudo make install-moc MOC_PLUGIN_DIR=/path/to/moc/plugins

Building the VLC plugin on Linux

Install vlc-devel. Verify paths at the top of vlc/vlc.mk. To compile, run the following command:

make asap-vlc

To install:

sudo make install-vlc

Building the VLC plugin on OS X

Install Xcode Command Line Tools.

You need vlc_plugin.h and other header files. Unfortunately they are not installed with the VLC on Mac. You can find them in VLC source code. I copied them from my Windows VLC (C:\Program Files (x86)\VideoLAN\VLC\sdk\include\vlc\plugins). ;) Make sure VLC_OSX_CFLAGS in vlc/vlc.mk points to the directory with these header files.

To compile, run the following command:

make asap-vlc-osx

To install:

make install-vlc-osx

Building the XBMC plugin on Linux

Your XBMC must include support for ASAP. Unfortunately it’s disabled in the official Linux build.

Anyway, to build the ASAP plugin, run:

make asap-xbmc

You should get xbmc_asap-i486-linux.so.

Building the XMMS plugin on Unix-like systems

You need xmms and xmms-devel packages.

To compile, run the following command:

make asap-xmms

If the compilation finished successfully, you can install the plugin in your home directory:

make install-xmms-user

or for all users:

sudo make install-xmms

If you have another XMMS plugin that supports Atari 8-bit music, remove it in order to avoid conflicts.

Building asapconv, WASAP, Winamp/GSPlayer/Apollo/XMPlay/BASS/XBMC plugins, RMT DLL, asapscan, shell extension and libasap on Windows

Install the C and C++ compilers from MinGW.

Open the command prompt in the root directory of ASAP sources and run:

make mingw

You should get asapconv.exe, wasap.exe, in_asap.dll, gspasap.dll, ASAP_Apollo.dll, xmp-asap.dll, bass_asap.dll, xbmc_asap.dll, apokeysnd.dll, asapscan.exe, ASAPShellEx.dll and libasap.a.

Building Windows Media Player plugin and asap.lib on Windows

You additionally need Windows SDK (install native C++ compiler, headers, libraries and samples). Set Path, INCLUDE and LIB environment variables to point to the right locations in the Windows SDK. Make sure DSHOW_BASECLASSES_DIR is set correctly in win32\win32.mk.

Open the command prompt in the root directory of ASAP sources and run:

make win32/asap_dsf.dll win32/asap.lib

You will get asap_dsf.dll and asap.lib.

Building the GStreamer plugin on Windows

Install GStreamer SDK 32-bit development files.

Open the command prompt in the root directory of ASAP sources and run:

make win32/libgstasapdec.dll

Building the Audacious plugin on Windows

Too bad Audacious doesn’t provide an SDK for Windows.

Unpack GTK+ 2 bundle and make sure GTK_DIR in win32/win32.mk points to it.

Install Audacious and make sure AUDACIOUS_LIB points inside it.

Unpack Audacious source code and make sure AUDACIOUS_INCLUDE points inside it.

Now comes the tricky part: configure Audacious for Windows. You’ll need to install gettext and libgnurx in MinGW (that’s probably not an exhaustive list, configure will complain about missing things). From the Audacious source directory run:

bash configure PKG_CONFIG=../gtk/bin/pkg-config

After it finishes with no errors (warnings are fine), go to ASAP and run:

make win32/asapplug.dll

Put the DLL in lib/audacious/Input of the Windows binary distribution of Audacious.

Building the foobar2000 plugin on Windows

In addition to the common prerequisites and Windows SDK you need foobar2000 SDK - extract it to a new directory called foobar2000_SDK next to (not inside!) the ASAP directory.

Open the command prompt in the root directory of ASAP sources and run:

make win32/foo_asap.dll

This should produce foo_asap.dll.

Building the VLC plugin on Windows

Install VLC as usual, it includes the SDK. VLC_DIR in win32/win32.mk is fine for the default installation directory on 64-bit Windows - edit it if necessary.

Open the command prompt in the root directory of ASAP sources and run:

make win32/libasap_plugin.dll

You will get libasap_plugin.dll.

Building WASAP, GSPlayer and Windows Media Player plugins for Windows CE

For WASAP and GSPlayer plugins you need CeGCC. For the Windows Media Player plugin you need Visual Studio 2008 (2005 might work, but wasn’t checked, 2010 won’t work).

Edit the WINCE_... paths at the top of win32/win32.mk so that they point to your installed tools. Open the command prompt in the root directory of ASAP sources and run:

make wince

This should produce wasap.exe, gspasap.dll and asap_dsf.dll in the win32/wince directory.

Building Java ASAP2WAV and Java applet

You need Java Development Kit (JDK).

If necessary, edit the paths at the top of java/java.mk so that they point to your installed tools. Open the command prompt in the root directory of ASAP sources and run:

make java/asap2wav.jar java/asap_applet.jar

This should produce asap2wav.jar and asap_applet.jar.

Building Java midlet

You need a Java ME SDK - I use Oracle Java ME SDK.

Edit the WTK path at the top of java/j2me/j2me.mk so that they point to your installed Java ME SDK. Open the command prompt in the root directory of ASAP sources and run:

make java/j2me/asap_midlet.jad

This should produce asap_midlet.jar and asap_midlet.jad.

Building AndroidASAP

Install Android SDK with an Android platform(s).

Edit the paths at the top of java/android/android.mk so that they point to your installed SDK. Open the command prompt in the root directory of ASAP sources and run:

make android-debug

This should produce AndroidASAP-debug.apk. AndroidASAP integrates with file managers. It reads phone state only to pause playback on incoming phone calls.

Building C# ASAP2WAV, asapplay and SilverASAP on Windows

You need the .NET Framework, of course. For SilverASAP you need Silverlight and 7-Zip.

Open the command prompt in the root directory of ASAP sources and run:

make csharp

This should produce asap2wav.exe, asapplay.exe and SilverASAP.xap.

Building MetroASAP for Windows 8

Note
Windows 8 is not yet generally available and this port is work in progress.

Install .NET Framework 4.5 (Windows 8 already has it). Install Windows SDK for Windows 8 or Visual Studio 2012 (any edition should be fine). Verify the paths at the top of csharp/winrt/winrt.mk.

Open the command prompt in the root directory of ASAP sources and run:

make csharp/winrt/MetroASAP.appx

If you’re not on Windows 8, the last step (creating the appx) will fail, but you’ll have the application in the csharp/winrt/obj directory. Copy it to Windows 8 and install from PowerShell:

Add-AppxPackage AppxManifest.xml -Register

Building JavaScript command-line ASAP2WAV and the web browser player

Open the command prompt in the root directory of ASAP sources and run:

make javascript

asap2wav.js is the command-line script. asapweb.js plus asap.js are the browser player (you’ll probably need binaryHttpRequest.js as well).

Building Flash player version of ASAP

You need Flex SDK. Add its bin directory to your PATH.

Open the command prompt in the root directory of ASAP sources and run:

make flash/asap.swf

You should get asap.swf.

Building Perl command-line ASAP2WAV

Open the command prompt in the root directory of ASAP sources and run:

make perl

asap2wav.pl is the Perl script which uses the Asap.pm module you have just built.

Building D ASAP2WAV and asapplay on Windows and Linux

You need DMD 2.054 or compatible D compiler. To build asapplay on Windows, you need D Windows API bindings. On Linux, you need ALSA development libraries (e.g. libasound2-dev package in Ubuntu). D bindings for ALSA are currently included in ASAP sources.

Open the command prompt in the root directory of ASAP sources and run:

make d

This should produce asap2wav.exe and asapplay.exe.

Building Android command-line asapconv

You need Android NDK.

Edit the paths at the top of java/android/android.mk so that they point to your installed NDK. Open the command prompt in the root directory of ASAP sources and run:

make java/android/asapconv

Now you need to put the binary (java/android/asapconv) on your device and make it executable. It’s not possible on a FAT-formatted SD card. I was able to do that in /data/local/tmp/. If you use USB debugging, make android-push-asapconv will copy the file, but you have to do the chmod part.

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.