CSW2CDT, new tool suite for tape encoding

Good evening. I'm much more active on the CPC than on the Spectrum, but today I released the first version of CSW2CDT, a set of three tools whose purpose is to filter and encode cassette samples into tape images. I developed these tools from scratch, after realising that writing a custom tool for each weird tape I found wasn't the way to go.

Right now the binaries are available for downloading at http://cngsoft.no-ip.org/csw2cdt.htm

While the CPC and the Spectrum share many traits and many tape encodings are the same in commercial games for both machines, my collection of Spectrum tapes is severely limited and I'm thus interested in sharing these tools with Spectrum users who can test them with cassettes and samples and tell me how CSW2CDT handles them.
Thanked by 2richl Andrew Barker

Comments

  • Thanks very much for this! I don't tend to need CSW files all that often but they can be really helpful when a tape is being really stubborn and refusing to load and/or convert. I have to use DOSBox to convert my WAV files to CSW as I haven't found anything that will run under 64-bit Windows before so this is really handy, especially since it's happy to take my original 16-bit stereo samples as a source as well so it saves even more time :)

    I've tried using the GUI with a few test conversions into TZX and had varying results. I may be using it incorrectly but I tend to get unwanted bits at the end of most of the blocks. I also had some strange results when trying some of the different loading scheme options such as Speedlock etc.

    Anyway, thanks again for producing this set of tools, much appreciated!
    Thanked by 1cngsoft
  • edited April 2017
    richl wrote: »
    Thanks very much for this! I don't tend to need CSW files all that often but they can be really helpful when a tape is being really stubborn and refusing to load and/or convert. I have to use DOSBox to convert my WAV files to CSW as I haven't found anything that will run under 64-bit Windows before so this is really handy, especially since it's happy to take my original 16-bit stereo samples as a source as well so it saves even more time :)
    You're welcome, thanks for noticing that this was indeed one of the goals: CSW files (especially V1) are useful both to archive (they compress quite well) and to analyse (their format is very simple) but the main tool that could create them was made for DOS only and had never been ported. It also had a couple of quirks that could get annoying at times but were never fixed. Does anyone know what happened to the Ramsoft crew?
    I've tried using the GUI with a few test conversions into TZX and had varying results. I may be using it incorrectly but I tend to get unwanted bits at the end of most of the blocks. I also had some strange results when trying some of the different loading scheme options such as Speedlock etc.
    My knowledge of pure Spectrum encodings is limited, as I originally stated. For example, while ago I tried to establish a formal list of Speedlock types, resulting in the table from http://cngsoft.no-ip.org/blog/blog71.htm that defines eight types according to the type of pilot tones, the baud (bit/s) rate and other particularities. But while I had a wealth of CPC tapes to examine and analyse, my Spectrum tapes were very few, and using the WoS archive wasn't always a safe bet because some of the extant dumps were visibly less than precise copies of their source tapes. So in the end my understanding of the Spectrum Speedlock tapes was way less representative of their CPC counterparts, and that's one of the things I'd like to find a solution for here. Is there any public research on the topic? A while ago, the website http://newton.sunderland.ac.uk/~specfreak/Schemes/schemes.html had some disassemblies and comments on the topic, but it's long gone; I kept a backup in http://cngsoft.no-ip.org/backups/specfreak/schemes/schemes.htm but it's ten years old.

    CSW2CDT also operates with relatively wide tolerance margins, resulting in extra bits when there's noise at the end of a block; hence the flags -0, -1, -4, -5 and -8 that (respectively) pad incomplete bytes with 0, pad them with 1, round the bit size to the nearest byte (clipping or padding with 0, or with 1) or clip them. Another way to fine tune the bit reading is to write fitting parameters for the flag "--custom A B C D E F G" but this one requires measuring the block timings beforehand and calculating safe margins. Sometimes it just a matter of opening the CSW file on a hex editor and examining the blocks: that's how I noticed in http://cngsoft.no-ip.org/blog/blog96.htm that "The Covenant", the sequel to "Xavior", needed "-p 600" to encode because the Novaload pilot was shorter than the default pilot length threshold of 1000.
    Anyway, thanks again for producing this set of tools, much appreciated!
    Thank YOU for providing the first formal feedback, and a technically valuable one indeed! :-)
    Post edited by cngsoft on
  • Hi cngsoft :)
    very interesting software:)
    i try and build one correct tzx file, but software is very sensitive and add extra bits and etc ... :)
    here is sample of highway encounter 5 different tapes, all samples loading well in emulators and generate tzx files with maketzx and samp2tzx .. with CSW2CDT i generate only from one of versions working tzx ... may be i need some different parameters for software ?
    If you need any samples for testing please tell me, i have really huge amount of titles in wav files.

    Greets.
    Gorski
  • I released a new version few days ago with fixes in the pilot and SYNC detection and new support for the Spectrum Hexagon encoding, whose carrier is different to its CPC counterpart.
    gorski wrote: »
    Hi cngsoft :)
    very interesting software:)
    i try and build one correct tzx file, but software is very sensitive and add extra bits and etc ... :)
    here is sample of highway encounter 5 different tapes, all samples loading well in emulators and generate tzx files with maketzx and samp2tzx .. with CSW2CDT i generate only from one of versions working tzx ... may be i need some different parameters for software ?
    If you need any samples for testing please tell me, i have really huge amount of titles in wav files.

    Greets.
    Gorski
    Thank you very much for sharing these samples, they're very valuable!

    I'm testing them at the moment, and I've already been able to make two valid TZX files: both samples (sides A and B) from the folder Highway Encounter (1985)(Vortex Software) - pefect - another - another - missing case [wrong from cpc version] were first made into CSW files with CSW0 -f 600 6100 and then into TZX images with CSW2CDT --speedlock1 ; FUSE 1.3.4 loaded both fine, although side B was visibly dirtier than side A and noise was misread as several extra bytes in the loader's blocks. Side A's dirt bits went away by adding -5 to the parameters. On the other hand, the samples in Highway Encounter (1985)(Vortex Software) - perfect are giving me trouble, I get seemingly valid Speedlock blocks but FUSE rejects them, so something's going wrong.

    Finding good values for the -f LOW HIGH flag requires trial and error. Yes, it's boring. However, if you find good values for a tape recorded with one method, other tapes made with that same method will benefit from those same values. But sometimes tapes aren't good enough and hours of testing go away without results :-(

    And speaking of hours, I'll keep examining the samples tomorrow, it's very late here. Good night.
  • Nice to see something new @gngsoft ! I'll give it a whirl and see what happens.
    Regarding my web site on Newton. That fileserver is long gone, but I had moved it a few times.
    I also more recently had it on my NAS and attached it to my domain name, but it expired and they wanted a lot of £££ to pay to keep the domain. I should probably think of a more appropriate url because I'm on a co.uk, I'm a mere tape monkey.

    I was using no-ip to redirect my hosting, but that suddenly wouldn't allow to redirect as my name expired. I got fed up and couldn't be bothered to fix it.

    Regarding the Ramsoft team, they just wanted to get on with their real life and retired on places such as this :-o.

    BTW, I see you've dumped many CPC disks for SPS. Did you ever get any IPFs back, or dumps verified ?
    I slipped into a deep sleep again due to lack of attention.

    Cheers for the util !
Sign In or Register to comment.