Welcome to MorphOS-Storage, a webserver dedicated to MorphOS users. ©2016-2026 Meta-MorphOS.org
Description:CDT/TZX tape image to WAV converter + Reggae Class
Developer/Porter:Lastic
Homepage:https://github.com/lastic/CDTconvert
Readme:
Short: CDT/TZX tape image to WAV converter
Author: Lastic (lasticppc@gmail.com)
Uploader: Lastic (lasticppc@gmail.com)
Type: misc/emu
Version: 1.0
Architecture: ppc-morphos
Requires: MorphOS 3.x
URL: https://github.com/lastic/CDTconvert
License: MIT

CDTconvert
==========

Version 1.0 (9.11.2026)
Amstrad CPC tape images to WAV, plus a Reggae class for MorphOS.


OVERVIEW
========

CDTconvert turns Amstrad CPC tape images (.CDT, also Spectrum .TZX)
into WAV audio files. Play the WAV into a real CPC through an optional
audio-in input (a DIY modification, see "Playing into a real CPC"
below), record it to cassette, or load it into an emulator that reads
audio.

The archive also contains cdt.demuxer, a Reggae class. With it,
programs that open sound through Reggae, such as the ACE CPC
emulator, can open .CDT files directly, with no WAV conversion first.

CDTconvert is plain C with no libraries beyond the C library, so it
also builds on macOS and Linux (see SOURCE below).


REQUIREMENTS
============

- MorphOS 3.x on PowerPC. Tested on MorphOS 3.21 (PowerBook G4 and
iBook G4). Built with the MorphOS 3.20 SDK.
- cdt.demuxer needs Reggae, which is part of MorphOS.


INSTALLATION
============

CDTconvert
Copy the drawer anywhere you like. To run it from any Shell
without a path, also copy the program to C:

Copy CDTconvert C:

cdt.demuxer
1. Copy the class into the Reggae folder for added classes:

Copy cdt.demuxer SYS:Classes/Multimedia/

2. Reboot. Reggae reads its list of classes when the system
starts, so the class is only known after a reboot.

3. Optional check:

Version SYS:Classes/Multimedia/cdt.demuxer

shows "cdt.demuxer 51.1 (9.11.2026)". The version number 51
follows the demuxers that come with MorphOS.

To remove it, delete SYS:Classes/Multimedia/cdt.demuxer and
reboot.


USING
=====

Convert a tape image to WAV:

CDTconvert game.cdt

This writes game.wav next to it. List the blocks of a tape image,
with the decoded CPC file headers (name, block, type, load address):

CDTconvert -l game.cdt

With cdt.demuxer installed, choose the .CDT file in ACE where you
would normally choose a WAV tape, type RUN" on the CPC and start the
tape. Seeking is supported, so rewind and the tape counter should
behave as with a WAV.

Playing into a real CPC
The CPC 464 has no audio input from the factory: it only reads its
built-in cassette deck. Playing a WAV straight into the machine
needs an optional audio-in input, a DIY modification that has to be
soldered in. The procedure is explained step by step in this video:

https://www.youtube.com/watch?v=-cacZqQf4Go

With the audio-in fitted, connect the headphone output of your
MorphOS machine to the CPC's audio-in input. In the AHI
preferences, switch off effects (echo, reverb) for the unit your
player uses, run it at the WAV's sample rate (44100 Hz by default)
and start with a volume of about 80 %. If loading fails, try a few
percent of stretch (-d 3 to -d 10) or invert the polarity (-i).

Without the modification, record the WAV onto a cassette and load
it with the 464's own tape deck.


COMMAND LINE
============

CDTconvert [options] input.cdt [output.wav]

-r <rate> sample rate in Hz (default 44100)
-b <8|16> bits per sample (default 8)
-a <1-100> amplitude in percent (default 90)
-d <pct> stretch timing, -50..+50 percent (default 0)
-i invert polarity
-g <ms> gap for "stop the tape" blocks (default 2000)
-l list the blocks only, write no WAV
-q quiet, no warnings or summary
-v show version
-h show help

Without an output name, the input name with .wav is used. The WAV has
0.5 s of silence at the start and 1 s at the end.

Examples:
CDTconvert pic.cdt
CDTconvert -l pic.cdt
CDTconvert -d 5 -r 48000 game.cdt game.wav


CDT.DEMUXER
===========

input the .CDT file, recognised by its "ZXTape!" header (the file
name and extension don't matter)
output 16-bit signed big-endian PCM, mono, 44100 Hz
MIME audio/x-cdt

When a program opens a .CDT file, the class reads the whole file into
memory, renders the tape once and then delivers samples from any
position, so seeking works.

Limits
- Fixed output: 44100 Hz, 16-bit, mono. There are no options for
stretch or polarity; use CDTconvert for those.
- "Stop the tape" blocks become a 2 s gap.
- The rendered tape stays in memory while the file is open: about
1.5 MB for a 16K file at 1000 baud. Files over 64 MB are refused.
- Spectrum .TZX files are recognised too, so every Reggae program
can play them as sound.


SUPPORTED TZX BLOCKS
====================

&10 standard speed data &20 pause / stop the tape
&11 turbo speed data &21 &22 group start / end
&12 pure tone &23 jump to block
&13 pulse sequence &24 &25 loop start / end
&14 pure data &26 &27 call sequence / return
&15 direct recording &2B set signal level
&18 CSW recording (RLE) &30-&35, &5A info blocks (skipped)
&19 generalized data unknown blocks are skipped by length

Not supported: CSW with Z-RLE compression (skipped with a warning) and
the C64 blocks &16 and &17.


CONTENTS
========

CDTconvert the converter (Shell program)
cdt.demuxer the Reggae class, for SYS:Classes/Multimedia/
ReadMe.txt this file
LICENSE.txt the MIT licence


SOURCE
======

The complete source (C, with makefiles for MorphOS, macOS and Linux)
is available on GitHub:

https://github.com/lastic/CDTconvert


CREDITS AND LICENCE
===================

CDTconvert and cdt.demuxer were written by
Lastic (lasticppc@gmail.com),
made with the help of Claude Code (Anthropic's AI coding assistant).
Building, testing and guidance on real hardware by
Lastic
on a PowerBook G4 15" 1.5 GHz (A1106) and an iBook G4 12" 1.33 GHz
(A1133), and with a real Amstrad CPC 464.

The tape format follows the TZX specification 1.20. The layout of the
Reggae class was worked out from the MorphOS SDK headers and autodocs
and from the structure of the demuxers that come with MorphOS. No code
from other projects is included.

Released under the MIT licence, see LICENSE.txt. The software is
provided "as is", without warranty of any kind.

Upload Date:Nov 21 2026
Category:Emulation/Misc
Download:CDTconvert_1.0.lha
Md5:4aabf793d270303e829220675d64f3a7
Size:65 KB
Downloads:1

Screenshot(s)
History
Last Comments
Add comment