Top 10k strings from csw.html.orig in <root> / doc / technical / specifications /
Back to the directory listing
20 <tr bgcolor="#c0f0ff">
12 <td align="center">-</td>
11 <td align="center">BYTE</td>
6 <td align="center" bgcolor="#ff7848" width="10%"><font color="white" size="+2"><b>
6 <p><table bbgcolor="#ffff90" border="0" cellpadding="0" cellspacing="12" width="100%"><tbody><tr>
6 </font></td></tr></tbody></table>
6 </b></font></td><td><font size="+2">
5 <table border="0" width="100%"><tbody><tr><td width="10%"> </td><td>
4 <td align="center">0x00</td>
4 </td></tr></tbody></table></p>
4 </tbody></table>
3 <td align="center">0x01</td>
3 <div align="center">
2 <tr bgcolor="#fff000">
2 <tr bgcolor="#ffdf90">
2 <td>Terminator code</td>
2 <td>Sample rate</td>
2 <td>Flags<br>
2 <td>CSW minor revision number</td>
2 <td>CSW major revision number</td>
2 <td>CSW data.</td>
2 <td>"Compressed Square Wave" signature</td>
2 <td colspan="4" align="center"><font color="#606060" size="-2">CSW global file header - <strong> status: <font color="#ff6060">required</font></strong></font><strong></strong></td>
2 <td align="center">DWORD</td>
2 <td align="center">ASCII[22]</td>
2 <td align="center"><strong>Value</strong></td>
2 <td align="center"><strong>Type</strong></td>
2 <td align="center"><strong>Offset</strong></td>
2 <td align="center"><strong>Description</strong></td>
2 <td align="center">0x1D</td>
2 <td align="center">0x1A</td>
2 <td align="center">0x19</td>
2 <td align="center">0x18</td>
2 <td align="center">0x17</td>
2 <td align="center">0x16</td>
2 <td align="center">(note)</td>
2 <tbody><tr bgcolor="#80a0ff">
2 <table bgcolor="#000000" border="0" cellpadding="2" cellspacing="1" width="70%">
2 <font size="1">b0: initial polarity; if set, the signal starts at logical high</font></td>
2 }
1 written to disk anyway, so the maximum recording time is limited by the
1 with the standard PC archivers such as RAR and ZIP. The packed CSW
1 we recommend you to read it too.
1 way, CSW may also act like a sampler!
1 vu-meter is shown again.
1 various aspects of its behaviour. In the manual of MakeTZX you will
1 value for a 22 KHz one. The typical gain for a 44 KHz turbo tape is
1 typically taking 1/10th of an ordinary VOC. It is used internally by
1 to DMA buffer size quantums (a few 1/10ths of sec). Note: Like MakeTZX,
1 through MakeTZX's internal digital filter which reduces noise and
1 this case, the default extensions will be appended in turn to match an
1 the output filename is left out, the input file name with extension
1 that CSWs are intended for use with square waves only (such as computer
1 tapes)! The compression ratio depends on many factors; in general, the
1 supporting CSW 1.00 will also work fine with CSW 1.01 without
1 specify fractions of seconds, the effective recording time is subject
1 something goes wrong and you don't want to repeat the sample. In this
1 some utility or emulator (if so, please let us know). The file format
1 simply CSW for help. At the moment, CSW.EXE accepts only uncompressed
1 signal helps too. The ratio for a 44 KHz file will usually be twice the
1 signal distortions very efficiently. Make a backup copy of the original
1 should compress even better. Finally, CSW files are highly compressable
1 recording time (in seconds, e.g. -t60.0 for one minute); in this case,
1 read it carefully. Note: In order to run the CSW utility under plain
1 press 'P', followed by any key to resume. During the pause, the
1 of conversion and save them in a WAV file (switch -k), just in case
1 most cases the CSW will be a lot better than the original file. Note
1 mono 8-bit sample files. Extensions in filenames can be omitted; in
1 modifications.
1 meaning of the polarity flag, please refer to the notes for version
1 library (RFC 1151 and 1152). In fact the compression is equivalent to
1 lengths greater than 0xFF (255) are represented as byte 0x00 followed
1 is very simple and the compression scheme used is somewhat based on the
1 is the format specification for the old CSW v1.01. It is reported here
1 is full), so you can start it and go away to do better things :)
1 into MakeTZX's manual. Please read it. Note: Although it is possible to
1 input. When converting to the CSW format, the sample file is processed
1 initial signal polarity, which is not important in the Spectrum world
1 implicitly assumed. <br><br>
1 higher the sample rate, the higher the ratio. A clean and regular
1 future revisions of this format and it is not meant to store
1 find lots of explanations, tips and FAQ that are not reported here, so
1 files. It can compress VOC, WAV, IFF and OUT files to CSW and
1 files, digital filter and the other features are extensively described
1 files are usually smaller than the zipped original VOCs. You will be
1 file if you will need the original samples later, but remeber that in
1 file format.
1 extensively covered in MakeTZX's manual, DirectMode section; please
1 exits after two seconds with an error message. All this stuff is
1 existing file. The search order is VOC, WAV, IFF and OUT for last. If
1 exactly as in method 1, but the generated byte-stream is further
1 ends with the extension .CSW, then the switch -d (decompression) is
1 driver also performs a preliminary stability check; if this fails, CSW
1 details here]
1 decompress CSW files back to VOC format (switch -d). Enter CSW -? or
1 converters can safely ignore this bit (like MakeTZX does), so any tool
1 conversion is performed on-the-fly in true realtime. You can stop the
1 conversion by pressing any key at any time. To pause the recording
1 compression routines we used is the same as in our RZX SDK. [more tech
1 compressed with the standard deflate() algorithm as defined by the <a href="http://www.gzip.org/zlib/">ZLIB</a>
1 compatible soundcards. If you are experiencing problems, try option
1 can also do programmed recordings using switch -t and specifying the
1 bytes (the current default value is 0). However, this is designed for
1 by your VOC/WAV files. The CSW utility can handle CSW conversion in
1 by the duration represented on 4 bytes, e.g. 0xCDE9 is stored as 00 E9
1 but it is for other platforms such as C64. All the Spectrum TZX
1 both ways (see below). Of course, MakeTZX itself accepts CSW files for
1 because it is not necessary, since we are dealing with discrete
1 because a lot of existing tools support the original version of the
1 available disk space. If you want, you can keep this samples at the end
1 application-specific data.
1 about 93%, which means a 12:1 compression factor! Normal speed tapes
1 able to RAR a 40 MB sample file down to a few hundreds KB. </td></tr></tbody></table></p>
1 You can set the sampling frequency with switch -s (e.g. -s44100). You
1 This small program is intended to provide a basic support for CSW
1 This document describes the CSW file format and the CSW.EXE utility.
1 The latest version of this document can be found at:
1 The data is stored as a sequence of pulse lengths (1 byte per pulse). Consider the following scenario (each dot is a sample):
1 The CSW utility
1 The 5 pulses shown will be represented with the following bytes:<br>
1 Revision history
1 RLE algorithm.
1 Old CSW v1.01 file format
1 Note that, due to MakeTZX's engine requirements, the samples are
1 MakeTZX, but it is also very useful to keep down the disk space taken
1 MS-DOS you need a DPMI host (such as CWSDPMI.EXE) Note: DirectMode, OUT
1 Introduction
1 Here is the CSW implementation chart for anyone who wants to use it in
1 E-mails concerning the CSW specifications should be directed to:
1 Contact information
1 CSW-2 file format
1 CSW will automatically stop when the time has elapsed (or when the disk
1 CSW supports long filenames under Windows 9x </td></tr></tbody></table></p>
1 CSW is strongly based upon the MakeTZX engine and it shares with it
1 CSW can also work in <strong>DirectMode</strong> (switch
1 All the headers fields must be filled in; blank values are not allowed.</font></td></tr>
1 All <em>reserved</em> or undefined bits must be set to zero.
1 <ul><li><a href="mailto:[email protected]?subject=CSW">[email protected]</a></li></ul>
1 <ul><li><a href=""></a></li></ul>
1 <tr bgcolor="#f7f7ff"><td align="center">DWORD</td><td>4 bytes</td></tr>
1 <tr bgcolor="#f7f7ff"><td align="center">BYTE[N]</td><td>N bytes</td></tr>
1 <tr bgcolor="#f7f7ff"><td align="center">ASCII[N]</td><td>N ASCII characters</td></tr>
1 <tr bgcolor="#f7f7ff"><td align="center">ASCIIZ[N]</td><td>ASCII string with zero-padding to N bytes total</td></tr>
1 <tr bgcolor="#f7f7ff"><td align="center" width="30%">WORD</td><td>2 bytes</td></tr>
1 <tr bgcolor="#8080d0"><td colspan="2"><font color="#ffffff">All multi-byte values are stored in Intel byte order (little-endian).<br>
1 <title>WWR - CSW technical specifications</title>
1 <td>Total number of pulses (after decompression)</td>
1 <td>Reserved.</td>
1 <td>Header extension length in bytes (0x00)<br>
1 <td>Header extension data (if present)</td>
1 <td>Encoding application description<br>
1 <td>Compression type<br>
1 <td>Compression type (see notes below)<br>
1 <td colspan="4" align="center"><strong><font color="#ffffff" size="+2">CSW-2 Header</font></strong></td>
1 <td colspan="4" align="center"><strong><font color="#ffffff" size="+2">CSW-1 Header</font></strong></td>
1 <td align="center">WORD</td>
1 <td align="center">HDR</td>
1 <td align="center">BYTE[HDR]</td>
1 <td align="center">BYTE[3]</td>
1 <td align="center">ASCIIZ[16]</td>
1 <td align="center">0x34</td>
1 <td align="center">0x34+HDR</td>
1 <td align="center">0x24</td>
1 <td align="center">0x23</td>
1 <td align="center">0x22</td>
1 <td align="center">0x21</td>
1 <td align="center">0x20</td>
1 <td align="center">0x1C</td>
1 <td align="center">0x1B</td>
1 <td align="center">0x02</td>
1 <tbody><tr><td align="center"><font color="#ffff40" size="+4"><strong>CSW FORMAT</strong></font></td></tr>
1 <tbody><tr><td align="LEFT"><ol>
1 <tbody><tr bgcolor="#8080d0"><td colspan="2" align="center"><font color="#ffffff" size="+1"><b>Legenda</b></font></td></tr>
1 <table width="40%">
1 <table border="0" width="100%"><tbody><tr><td width="10%"> </td><td>This
1 <table bgcolor="#8080d0" border="1" cellpadding="4" cellspacing="2" width="50%">
1 <table bgcolor="#0040ff" border="0" width="50%">
1 <strong>Note about Header Extensions:</strong>
1 <strong>Compression types:</strong>
1 <script language="Javascript">
1 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
1 <li>Introduced the polarity bit (b0 in Flags)</li>
1 <li>Introduced CSW revision 2.00.</li>
1 <li>Cleared up the document a bit.</li>
1 <li><strong>0x02: Z-RLE (CSW v2.xx only)</strong><br>Pulses are encoded
1 <li><strong>0x01: RLE (Run Length Encoding)</strong><br>
1 <li><b><a href="#INTRODUCTION">Introduction</a></b></li>
1 <li><b><a href="#HISTORY">Revision history</a></b></li>
1 <li><b><a href="#CSWUTIL">The CSW utility</a></b></li>
1 <li><b><a href="#CSW2FORMAT">CSW file format</a></b></li>
1 <li><b><a href="#CSW1FORMAT">Old CSW 1.01 file format</a></b></li>
1 <li><b><a href="#CONTACT">Contact information</a></b></li>
1 <img src="wave.gif" border="0">
1 <html><head>
1 <font><strong>Format revision: v2.00 (August 1st 2003)</strong></font>
1 <font size="1">Information about the tool which created the file (e.g. name and version)</font></td>
1 <font size="1">For future expansions only, see note below.</font></td>
1 <font size="1">0x01: RLE<br>
1 <font size="1">0x01: RLE</font>
1 <font size="+1"><strong>Compressed Square Wave</strong></font><br>
1 <em><font size="-1">Created by Ramsoft ZX Spectrum demogroup</font></em>
1 <br>In format revision 1.01 we have introduced a bit to represent the
1 <br><br>The DirectMode SoundBlaster driver has been written for 100%
1 <br><br>Note that no info about the pulse amplitude is represented
1 <br><br>For information about the RLE compression method (0x01) and the
1 <br><br>CSW-2 allows to extend the header size by a certain amount of
1 <br><br>CSW files are a way of storing sample data in a compact form,
1 <b>The CSW file format</b>
1 <b>Revision 2.00 (August 1st 2003)</b>
1 <b>Revision 1.01 (July 13th 1999)</b>
1 <a name="INTRODUCTION"></a>
1 <a name="HISTORY"></a>
1 <a name="CSWUTIL"></a>
1 <a name="CSW2FORMAT"></a>
1 <a name="CSW1FORMAT"></a>
1 <a name="CONTACT"></a>
1 </tr><tr bgcolor="#c0f0ff">
1 </ol></td></tr></tbody></table>
1 </head><body alink="#ff0000" bgcolor="#ffffff" link="#0000ff" text="#000000" vlink="#800080">
1 </div><br><br>
1 </body></html>
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1 <!-- base href="http://www.ramsoft.bbk.org.wstub.archive.org/csw.html" -->
1 2-values amplitude scales.
1 0x02: Z-RLE</font>
1 03 05 01 04 07<br>Pulse
1 // SECTION 108(a)(3)).
1 // JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
1 // INTERNET ARCHIVE ON 20091111130046.
1 // FILE ARCHIVED ON 20080317074653 AND RETRIEVED FROM THE
1 // ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
1 .CSW (or .VOC if decompressing) will be used. If the input filename
1 -r), in which case the input is taken from your soundcard and
1 "gzip -9" (without the magic signature); the source code of the
1 "-c" which will attempt to access the hardware in a different way. The
1 xLateUrl(document.getElementsByTagName("TD"),"background");
1 xLateUrl(document.getElementsByTagName("OBJECT"),"data");
1 xLateUrl(document.getElementsByTagName("OBJECT"),"codebase");
1 xLateUrl(document.getElementsByTagName("INPUT"),"src");
1 xLateUrl(document.getElementsByTagName("IMG"),"src");
1 xLateUrl(document.getElementsByTagName("EMBED"),"src");
1 xLateUrl(document.getElementsByTagName("BODY"),"background");
1 xLateUrl(document.getElementsByTagName("AREA"),"href");
1 xLateUrl(document.getElementsByTagName("APPLET"),"codebase");
1 xLateUrl(document.getElementsByTagName("APPLET"),"archive");
1 xLateUrl(document.getElementsByTagName("A"),"href");
1 var sWayBackCGI = "";
1 var forms = document.getElementsByTagName("FORM");
1 if (forms) {
1 function xResolveUrl(url) {
1 function xLateUrl(aCollection, sProp) {
1 <meta name="keywords" content="CSW, Ramsoft, ZX Spectrum, TZX, tapes">
1 var image = new Image();
1 var i = 0;
1 return image.src;
1 image.src = url;
1 for(i = 0; i < aCollection.length; i++) {
1 var j = 0;
1 for (j = 0; j < forms.length; j++) {
1 var url = aCollection[i][sProp]; if (typeof(url) == "string") {
1 if (url.indexOf("mailto:") == -1 &&
1 }
1 url = url.replace('.wstub.archive.org','');
1 if(url.indexOf("http") != 0) {
1 aCollection[i][sProp] = sWayBackCGI + url;
1 url.indexOf("javascript:") == -1
1 && url.length > 0) {
1 }
1 if (typeof(f.action) == "string") {
1 f = forms[j];
1 url = xResolveUrl(url);
1 if(typeof(f.method) == "string") {
1 }
1 }
1 if(typeof(f.method) != "post") {
1 f.action = sWayBackCGI + f.action;