Apple II PT3 Vortex Tracker Library
Library for playing pt3 files generated by the
Vortex Tracker on an Apple II with Mockingboard.
Details
This is an attempt to play some complex chiptune files on an old Apple II
with a Mockingboard card.
The Mockingboard, introduced around 1981, was a sound card for the Apple II
series of computers. It has dual AY-3-8910 chips on it, providing a total
of 6 channels of square-wave sound, plus noise and envelope effects.
My previous Chiptune Player played YM5 files,
which are raw captures of the AY-3-8910 data stream. These are easy to play,
but the raw data takes up a huge amount of space (hundreds of kilobytes)
when uncompressed. The chiptune player did some clever tricks with LZ4
compression to make things fit, but in the end most of the 48k of RAM on
an Apple II+ was needed to hold the ym5 file and decompressed register
values.
This is coded in 6502 assembly language. And unlike my previous player,
you can drop properly named files onto the disk image and they should
play w/o any additional conversion.
Some technical details on the pt3 file format can be found here:
README_pt3.txt
Some info on using the library can be found here:
README.pt3_lib
Downloads
Apple II Code/Disk Images
Use in Other Projects
Feel free to use this in your project! The code is dual licensed GPL2/BSD.
Some projects known to be using the code:
6 Channel Player
The Mockingboard actually has two AY chips on it, for a total of 6 channels.
The Vortextracker supports creating 6-channel music, although it is
essentially two 3-channel PT3s played at once.
I did manage to hack togeter a proof-of-concept that can play 6 channel music.
It essentially puts two copies of the player in RAM so it has a lot of
overhead. In theory it's probably possible to combine shared code to reduce
the footprint a bit.
Some resources:
Development Log
17 January 2024
Released version 0.5
Fixed some things found when working on the Second Reality demo.
The biggest issue was music with more than 42 patterns would crash
(three channels times two bytes (16-bit) times 43 is bigger than
256). It's interesting this bug appeared on other implementations,
for example the 6809 version by the Demosplash
people (but for a different reason).
Also updated the notes on IIc and IIgs support.
There's also now a version that can play 6 channels
(two PT3 files) at once. It's not efficient, essentially just duplicating
the player twice. You can find it in the music/pt3_lib_ch6 directory
in the github repository.
15 May 2023
Released version 0.4
This adds the option of disabling the 1.77MHz frequency scaling at
compile time. This allows the player to be a bit smaller and also
a bit faster (I was trying to fit it in the 4550 cycle vblank interval).
Why is it scaling in the first place? VortexTracker assumes you are
making Atari ST PT3s with a 1.77MHz base clock, while the Apple II
Mockingboard uses 1MHz. If you disable scaling then the music
will play back lower than expected.
29 May 2021
Released version 0.3 which adds support for Apple IIc.
This does make the library slightly larger, so you can disable this
if constrained for space.
28 December 2019
Released version 0.2 which supports auto-detection of Mockingboard slot.
Other Apple2 Projects
Back to the VMW Software Productions Page