`c2t` is a command line tool that can convert binary code/data and/or Apple-1/II Monitor text, as well as 140K disk images, into audio files suitable for use with the Apple-1 and II (II, II+, //e) cassette interface.
`c2t` offers three high-speed options for the 64K Apple II+ and Apple //e: 8000 bps, 8820 bps, and 9600 bps. The `c2t` compression option may be used to speedup the delivery of data with all three as well as the native 1333 bps cassette interface ROM routines.
> 8820 bps and 1333 bps is not an option for disk images.
High-speed and compression options require `c2t`'s custom loader, and at this time that limits you to a single segment. You can overcome this limitation by concatenating all your code together and creating your own code to shuffle your data around, or, pad each segment with enough zeros to align subsequent segments with their target address and then use the compress option to minimize this overhead.
I created this because I needed a convenient way to get data loaded into my //e without dragging my computer out of my office (2nd floor) to my retro man cave (basement). IOW, I needed an iPhone/iPad/mobile solution. That, and CFFA3000 was sold out--at the time.
Both the archive and the repo `bin` directory contain OS/X 64-bit (`c2t`) and Windows 32-bit (`c2t.exe`) binaries. Just copy to any directory in your path.
To cross build for Windows from OS/X, first install <http://crossgcc.rts-software.org/download/gcc-4.8.0-qt-4.8.4-win32/gcc-4.8.0-qt-4.8.4-for-mingw32.dmg>, then type:
`c2t-96h` is a hacked up version of `c2t` that fixes a few bugs (e.g. `.po` files) and adds better universal (should work on all Apple IIs) 9600 BPS code. Both `-8` and `-f` activate this new 9600 BPS code.
`c2t-96h` will eventually replace `c2t`. IOW, use `c2t-96h` for now.
To create an audio file that can auto extract to disk type:
`c2t-96h diskimage.dsk audiofilename.aif` or use `.wav`.
> `c2t-96h` supports `.dsk`, `.do`, and `.po` extensions.
> The disk image must be exactly 143360 bytes (140K). 800K disks are not supported.
> Use the `-n` option, e.g. `c2t-96h -n diskimage.dsk audiofilename.aif` if the disk ][ is emulated (e.g. CFFA3000, SDISK //, etc...)
To create an audio file for a single load binary than can auto extract and execute type:
`c2t-96h -2bc8 super_puckman,800 audiofilename.wav` or use `.aif`.
> The input image must be an Apple II binary with or without a 4-byte header. The 4-byte header is the standard DOS header that defines the binary size and memory location. Depending on how you extracted the single load binary you may or may not have this header. If this header is missing you'll have to append to the binary name `,memorylocation` e.g. `,800`.
> A *Single Load Binary* is defined as a self contained executable that has no disk dependancies (e.g. data, overlays, game save data, high scores, etc...). The binary must be 100% stateless or it will fail to function properly. <http://asciiexpress.net/gameserver> has many examples.
In both cases you'll have a `.aif` or `.wav` formatted audio file. It is critical that they file not be compress to MP3 or other format. Read <https://github.com/datajerk/c2t/raw/master/article/article.pdf> for details.
To load up your disk or binary to a physical Apple //e or ][+:
* Connect an audio patch code from your phone, tablet, computer, etc... to the cassette-in port of the Apple II.
> I just use Dropbox to quickly get these audio files to my iPhone. I also play them from the Dropbox app.
* From the Apple II:
* Remove any disks
* Reboot or power on
* CTRL-RESET to get to a `]` prompt
* *Optionally* insert a blank disk if loading a disk image
* At the `]` prompt type `LOAD` and press *RETURN*
* From your phone, tablet, computer *play* the audio file
Single load binaries will auto extract and execute. Disk images will auto extract and expand to disk.
* Wine (<http://winehq.org>) installed in `~/wine` (extract the tarball in `~/wine` and move the contents of `~/wine/usr` to `~/wine`, or change the path to `wine` in `tests/test.sh`).
> If Virtual ][ crashes while testing, just `make test` again to restart failed test and continue where it left off. Do not type `make testclean` again unless you want to start over.