http://fileformats.archiveteam.org/api.php?action=feedcontributions&user=Kyz&feedformat=atomJust Solve the File Format Problem - User contributions [en]2024-03-29T12:10:19ZUser contributionsMediaWiki 1.19.2http://fileformats.archiveteam.org/wiki/Oktalyzer_moduleOktalyzer module2021-06-30T23:55:57Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|okt}}, {{ext|okta}}<br />
|pronom={{PRONOM|fmt/722}}<br />
}}<br />
== Description ==<br />
<br />
Oktalyzer is a tracker for the Commodore Amiga. The format spec linked below notes that there are two different Oktalyzer formats - one [[IFF]]-like and one following a memory dump model - and that the [[IFF]]-like format is the most popular. It seems that the '''.okt''' extension is most commonly used for the older memory dump format and the '''.okta''' format for the [[IFF]]-like format.<br />
<br />
== Information ==<br />
<br />
* [http://textfiles.com/music/FORMATS/okt-frm2.txt Oktalyzer(tm) Modules] (.okt)<br />
* [ftp://ftp.modland.com/pub/documents/format_documentation/Oktalyzer%20(.okta).txt Oktalyzer format spec] (.okta)<br />
* [http://www.textfiles.com/programming/FORMATS/okt-form.txt Another copy of spec]<br />
<br />
== Software ==<br />
* [http://xmp.sourceforge.net/ Extended Module Player]<br />
* [https://ftp.modland.com/pub/software/trackers/Amiga/Oktalyzer/ Oktalyzer]<br />
* [https://zxtune.bitbucket.io/ zxtune]<br />
<br />
== Sample files ==<br />
* https://telparia.com/fileFormatSamples/music/okt/<br />
* [https://ftp.modland.com/pub/modules/Oktalyzer/ Example .okta files]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Extended_ModuleExtended Module2021-06-30T22:47:45Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|xm}}<br />
|pronom={{PRONOM|fmt/323}}<br />
}}<br />
<br />
:''Not to be confused with the Sirius XM satellite radio service, with which it has nothing to do.''<br />
<br />
'''XM''' (extended module) is an audio format introduced by (and primarily produced by) FastTracker 2, a now defunct tracker for [[MS-DOS]]. The format is also used by other trackers, such as [[DigiTracker]] and [[MilkyTracker]].<br />
<br />
== Information ==<br />
<br />
The tracker which produced the file can be identified by means of the 20-byte string at offset 38 (0x26):<br />
<br />
{| class="wikitable" style="text-align:center; width:200px; height:200px;"<br />
|+ Tracker / Identifying string<br />
|-<br />
!<br />
! String<br />
|-<br />
! DigiTracker<br />
| Composer's name<br />
|-<br />
! FastTracker 2<br />
| "FastTracker II"<br />
|-<br />
! OpenMPT<br />
| "OpenMPT " and then the version number<br />
|-<br />
! AmigaMML<br />
| By default, "AmigaMML " and the version number; can be changed<br />
|-<br />
! MilkyTracker<br />
| "MilkyTracker " (with 8 padding spaces)<br />
|}<br />
<br />
* [https://pastebin.com/F5S0Nbn9 Original file format documentation by Mr.H of Triton (1994), included with the FT2 distribution as "Xm.txt"]<br />
* [http://16-bits.org/xm/ The above, with a number of corrections and additions] (link seems to be dead?)<br />
* [https://ftp.modland.com/pub/documents/format_documentation/FastTracker%202%20(.xm)%20%232.txt Errors in the XM format documentation]<br />
* [https://ftp.modland.com/pub/documents/format_documentation/FastTracker%202%20v2.04%20%28.xm%29.html Mr.H documentation with corrections by Guru and Alfred of Sahara Surfers (1995)] ([https://pastebin.com/FP8XXgVu pastebin mirror])<br />
* [http://zzo38computer.org/textfile/music/xm-form.txt Further corrected version of the above] ([https://pastebin.com/pEi8Ehzd pastebin mirror])<br />
* [http://jss.sourceforge.net/moddoc/xm-form.txt A more complete file format documentation, by ccr@tnsp (2001)] ([https://pastebin.com/rFWAhEEr pastebin mirror])<br />
* [https://sourceforge.net/projects/ufmod/files/XM%20file%20format%20specification/XM_file_format.pdf "The Unofficial XM File Format Specification: FastTracker II, ADPCM and StrippedModule Subformats"], ''Quantum'', 2006<br />
<br />
== Software ==<br />
<br />
* [https://ftp.modland.com/pub/software/trackers/DOS/FastTracker%202/ FastTracker 2]<br />
* [https://archive.org/details/msdos_Fast_Tracker_2_1994 FastTracker 2 in-browser emulation]<br />
* [http://xmp.sourceforge.net/ Extended Module Player]<br />
* [http://zzo38computer.org/prog/amigamml.zip AmigaMML]<br />
* [https://ufmod.sourceforge.io/ uFMOD]<br />
* [https://zxtune.bitbucket.io/ zxtune]<br />
<br />
== Sample files ==<br />
* https://telparia.com/fileFormatSamples/music/xm/<br />
* [ftp://ftp.modland.com/pub/modules/Fasttracker%202/ Example .xm files]<br />
<br />
== Links ==<br />
* [http://www.textfiles.com/programming/FORMATS/xmformat.mus Format info]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Scream_Tracker_1_%26_2_moduleScream Tracker 1 & 2 module2021-06-30T22:43:46Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|stm}}<br />
|pronom={{PRONOM|fmt/717}}<br />
}}<br />
== Description ==<br />
<br />
'''.stm''' (Scream Tracker Module) files are modules created by versions of Scream Tracker prior to v3.0, where the format switched to the better known [[Scream Tracker 3 module]].<br />
<br />
It appears there may be more than one version of the STM format (or possibly just some confusion surrounding it). The format specification given below states "The ScreamTracker 1.0 format was the module format used by the ScreamTracker before version 2.0". Wikipedia notes that "Versions prior to 3.0 created STM (Scream Tracker Module) files" and MultimediaWiki lists STM solely as the Scream Tracker 2 module format (the Modland FTP also categorises .stm files solely as Scream Tracker 2 modules).<br />
<br />
== Information ==<br />
<br />
* [https://ftp.modland.com/pub/documents/format_documentation/Scream%20Tracker%20v1.0%20(.stm).txt STM Format]<br />
<br />
== Software ==<br />
<br />
* [https://ftp.modland.com/pub/software/trackers/DOS/Scream%20Tracker%202/ Scream Tracker 2]<br />
<br />
== Links ==<br />
<br />
* [https://ftp.modland.com/pub/modules/Screamtracker%202/ Example .stm files]<br />
<br />
== See Also ==<br />
<br />
* [[Scream Tracker 3 module]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Imago_Orpheus_moduleImago Orpheus module2021-06-30T22:43:03Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|imf}}<br />
}}<br />
<br />
== Description ==<br />
<br />
'''.imf''' files are modules produced by Imago Orpheus, a tracker for [[MS-DOS]]. Orpheus was developed by Lutz Roeder in the early 90s as part of Project IMAGO, with the aim of producing soundtracks for videogames and media presentations. Its counterpart program, Imago Wave, was a sample editor supporting [[IIF]], [[DP3]], [[RAW]] and [[WAV]] samples.<br />
<br />
== Information ==<br />
<br />
* [ftp://ftp.modland.com/pub/documents/format_documentation/Imago%20Orpheus%20Music%20Editor%20v1.0%20(.imf).txt IMAGO Orpheus Module Format (IMF) Version 1.00 - File format specification]<br />
<br />
== Software ==<br />
<br />
* [http://www.lutzroeder.com/imago/ Imago Orpheus (Lutz Roeder's homepage)]<br />
* [https://ftp.modland.com/pub/software/trackers/DOS/IMAGO%20Orpheus%20Music%20Editor/ Imago Orpheus (Modland FTP)]<br />
<br />
== Links ==<br />
<br />
* [https://ftp.modland.com/pub/modules/Imago%20Orpheus/Karsten%20Koch/ Example .imf files]<br />
* [https://soundcloud.com/imagoorpheus/ Some recorded versions of Imago Orpheus songs can be heard here]<br />
* [https://amp.dascene.net/detail.php?view=3980&detail=interview An interview with Karsten Koch, who created music with Imago Orpheus]<br />
<br />
== Note ==<br />
<br />
For other files with the extension '''.imf''' see [[IMF]].</div>Kyzhttp://fileformats.archiveteam.org/wiki/XMS-Tracker_moduleXMS-Tracker module2021-06-30T22:36:17Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|xms}}<br />
}}<br />
<br />
== Description ==<br />
<br />
'''.xms''' files are produced by XMS-Tracker. The format appears to be similar to [[AMusic module|AMD]] modules produced by AMusic. The [http://adlib.wave460.net/trackers.html Malfunction's FM Synthesis Heaven] site notes that XMS-Tracker looks like "unfinished, cracked Amusic" and the format documentation on the [ftp://ftp.modland.com/ Modland FTP] is labeled "AMusic ripp-off (.xms).txt"<br />
<br />
== Information ==<br />
<br />
* [https://ftp.modland.com/pub/documents/format_documentation/AMusic%20ripp-off%20(.xms).txt XMS Format FAQ]<br />
<br />
== Software ==<br />
<br />
* [https://ftp.modland.com/pub/software/trackers/DOS/XMS%20Tracker/ XMS-Tracker]<br />
<br />
== Links ==<br />
<br />
* [https://ftp.modland.com/pub/modules/Ad%20Lib/AMusic%20XMS/ Example .xms files]</div>Kyzhttp://fileformats.archiveteam.org/wiki/AMOS_BASIC_tokenized_fileAMOS BASIC tokenized file2019-01-18T02:29:41Z<p>Kyz: /* Specially sized tokens */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
|released=1990<br />
|extensions={{ext|amos}}<br />
}}<br />
AMOS BASIC is a family of [[BASIC]] dialects for the Amiga computer. They were written by François Lionet, who also wrote AMOS's predecessor, STOS BASIC for the Atari ST (see [[STOS memory bank]]).<br />
<br />
There are several versions of AMOS published: ''AMOS The Creator'', ''Easy AMOS'' and ''AMOS Professional''.<br />
<br />
AMOS has its own integrated development environment, and it uses its own custom file formats for everything, from source code to graphics and sound.<br />
<br />
== Overview ==<br />
<br />
AMOS is an interpreted BASIC dialect where code is edited and run in an integrated development environment. Every time the programmer finishes editing a line of code, it is immediately parsed into tokens. For example, typing <code>procedure foobar</code> and pressing the return key will change the line into <code>Procedure FOOBAR</code>.<br />
<br />
Before a program can run, it will be ''tested'' to ensure it is free of syntax errors. Source code can be saved even if it is untested or fails testing, but AMOS includes a ''tested'' flag in the saved file. This is used by external software, for example the AMOS Compiler will refuse to compile an untested source code file.<br />
<br />
=== Extensions ===<br />
AMOS tokens are split between instructions in the core language and instructions in ''extensions''.<br />
<br />
Extensions are external files, written in 68000 assembler, which begin with a ''token table'' listing all the instructions they add to the language.<br />
<br />
Each extension is intended to be loaded into a specific ''slot''. AMOS has 25 slots for extensions. The configuration of extensions and their slots are saved in AMOS's global config file.<br />
<br />
To load other people's source code, AMOS needs to be configured with the same versions of the same extensions that they used, in the same slots.<br />
<br />
=== Banks ===<br />
In order to work with multimedia such as pictures and music, AMOS has the concept of a ''bank'' or ''memory bank'' (see [[AMOS Memory Bank#Disambiguation]] for a note about terminology). An AMOS program can have up to 15 banks. For example, you can load several pieces of music into different banks, and then identify which one you want to play by a number: <code>Track Play 5</code> will play music in bank 5. Or you could load a packed picture into bank 4 and say <code>Unpack 4 to 0</code>, which will unpack the picture onto screen 0.<br />
<br />
While you can load anything into any bank, some instructions can only take their data from specific bank numbers. Bank 1 is used for Sprites, which are controlled with instructions beginning <code>Sprite</code> or <code>Bob</code>. Bank 2 is for Icons, which are controlled with instructions beginning <code>Icon</code>. Bank 3 is used for music in AMOS's native music format.<br />
<br />
If banks are in use while saving source code, the contents of the banks are included in the saved source code. This makes it easy to bundle code with the data it works on. The exception to this rule is banks created using the <code>Reserve As Work</code> instruction.<br />
<br />
== AMOS source code ==<br />
All multi-byte integer values are in big-[[Endianness|endian]] (Motorola) format.<br />
<br />
AMOS source code is stored in a file with the extension <samp>.AMOS</samp>. It has the following structure:<br />
<br />
{|class="wikitable"<br />
!colspan="2"| Section<br />
!Length<br />
|-<br />
|colspan="2"| Header identifying which version of AMOS saved the file<br />
*"<samp>AMOS Pro111V</samp>" and 4 more bytes (AMOS Professional, source tested)<br />
*"<samp>AMOS Pro111v</samp>" and 4 more bytes (AMOS Professional, source not tested)<br />
*"<samp>AMOS Pro101V</samp>" and 4 more bytes (AMOS Professional, source tested)<br />
*"<samp>AMOS Pro101v</samp>" and 4 more bytes (AMOS Professional, source not tested)<br />
*"<samp>AMOS Basic V134 </samp>" (AMOS Pro compatible with AMOS 1.3, source tested)<br />
*"<samp>AMOS Basic v134 </samp>" (AMOS Pro compatible with AMOS 1.3, source not tested)<br />
*"<samp>AMOS Basic V1.3 </samp>" (AMOS The Creator v1.3, source tested)<br />
*"<samp>AMOS Basic v1.3 </samp>" (AMOS The Creator v1.3, source not tested)<br />
*"<samp>AMOS Basic V1.23</samp>" (AMOS The Creator v1.2, source tested)<br />
*"<samp>AMOS Basic v1.23</samp>" (AMOS The Creator v1.2, source not tested)<br />
*"<samp>AMOS Basic V1.00</samp>" (AMOS The Creator v1.0 – v1.1, source tested)<br />
*"<samp>AMOS Basic v1.00</samp>" (AMOS The Creator v1.0 – v1.1, source not tested)<br />
|16 bytes<br />
|-<br />
|colspan="2"| Length in bytes of tokenized BASIC code to follow<br />
|4 bytes<br />
|-<br />
|colspan="2"| Tokenized BASIC code<br />
|varies<br />
|-<br />
|rowspan="3"| [[AMOS AmBs]] segment<br />
|ASCII identifier "<samp>AmBs</samp>"<br />
|4 bytes<br />
|-<br />
|Count of AMOS banks to follow (0–16)<br />
|2 bytes<br />
|-<br />
|AMOS banks. Each bank's length must be individually determined.<br />
|varies<br />
|}<br />
<br />
=== Tokenised BASIC code ===<br />
<br />
Tokenised BASIC code is a sequence of tokenised lines. Each tokenised line has the following format:<br />
<br />
{|class="wikitable"<br />
!Field!!Length<br />
|-<br />
|Length of this line in words (2 bytes), including this byte. To get the length of the line in bytes, double this value<br />
|1 byte<br />
|-<br />
|Indent level of this line. Prefix <var>indent level</var> + 1 spaces at the beginning of the line, or no spaces if the value is less than 2<br />
|1 byte<br />
|-<br />
|Sequence of tokens. Each token is at least two bytes, and all tokens are rounded to to a multiple of two bytes. Each token is individually sized. The tokens always end with a compulsory null token<br />
|varies<br />
|}<br />
<br />
Some tokens have special size rules, but most are exactly 2 bytes in size.<br />
<br />
Each token starts with a signed 16-bit number. Token values between 0x0000 and 0x004E have special printing and size rules, all other tokens are a signed offset into AMOS's internal token table. The instruction name in the internal token table is what should be printed.<br />
<br />
=== Specially printed tokens ===<br />
{|class="wikitable"<br />
!Token!!Type!!Interpretation<br />
|-<br />
|0x0000<br />
|null token<br />
|Marks the end of line. Always 2 bytes long.<br />
|-<br />
|0x0006<br />
|Variable reference, e.g. <code>Print '''XYZ'''</code><br />
| rowspan="4" |<br />
* 2 bytes: token<br />
* 2 bytes: unknown purpose<br />
* 1 byte: length of [[ISO 8859-1|ISO-8859-1]] string for the variable or label name<br />
* 1 byte: flags, for tokens 0x0006, 0x0012 and 0x0018:<br />
**bit 1 set: this is a floating point reference, e.g. <code>XYZ#</code><br />
**bit 2 set: this is a string reference, e.g. <code>XYZ$</code><br />
* variable length: ISO-8859-1 string, with the above given length. The string is null terminated and its length is rounded up to a multiple of two bytes.<br />
|-<br />
|0x000C<br />
|Label, e.g. <code>'''XYZ''':</code> or <code>'''190'''</code> at the start of a line<br />
|-<br />
|0x0012<br />
|Procedure call reference, e.g. <code>'''XYZ'''["hello"]</code><br />
|-<br />
|0x0018<br />
|Label reference, e.g. <code>Goto '''XYZ'''</code><br />
|-<br />
|0x0026<br />
|String with double quotes, e.g. <code>"'''XYZ'''"</code><br />
| rowspan="2" |<br />
* 2 bytes: token<br />
* 2 bytes: length of ISO-8859-1 string to follow<br />
* variable length: ISO-8859-1 string, with the above given length, rounded up to a multiple of two. The string should be null-terminated, but sometimes isn't.<br />
|-<br />
|0x002E<br />
|String with single quotes, e.g. <code><nowiki>'</nowiki>'''XYZ'''<nowiki>'</nowiki></code><br />
|-<br />
|0x001E<br />
|Binary integer value, e.g. <code>%'''100101'''</code><br />
| rowspan="3" |<br />
* 2 bytes: token<br />
* 4 bytes: the integer value<br />
|-<br />
|0x0036<br />
|Hexidecimal integer value, e.g. <code>$'''80FAA010'''</code><br />
|-<br />
|0x003E<br />
|Decimal integer value, e.g. <code>'''1234567890'''</code><br />
|-<br />
|0x0046<br />
|Floating point value, e.g. <code>'''3.1452'''</code><br />
|<br />
* 2 bytes: token<br />
* 4 bytes: a single-precision floating point value<br />
** bits 31-8: mantissa (24 bits), most significant bit is always set<br />
** bit 7: ignore (should be sign bit, but all AMOS floats are positive)<br />
** bits 6-0: exponent (from 0x00 to 0x7F)<br />
<br />
An exponent of 0 means 0.0, regardless of mantissa.<br />
<br />
Each set bit in the mantissa has the value 2<sup>''m''+''e''-88</sup> where ''m'' is from 23 (MSB) to 0 (LSB) and ''e'' is the exponent<br />
|-<br />
|0x2B6A<br />
|Double-precision float, e.g. <code>'''3.1415926543'''</code><br />
|<br />
* 2 bytes: token<br />
* 8 bytes: a double-precision floating point value<br />
** bit 63: ignore (should be sign bit, but all AMOS floats are positive)<br />
** bits 62-51: exponent (from 0x000 to 0x7FF)<br />
** bits 50-0: mantissa (52 bits), most significant bit is not stored but implicitly set<br />
<br />
An exponent of 0 means 0.0, regardless of mantissa.<br />
<br />
Each set bit in the mantissa has the value 2<sup>''m''+''e''-1074</sup> where ''m'' is from 51 (implicit MSB) to 0 (LSB) and ''e'' is the exponent<br />
|-<br />
|0x004E<br />
|Extension instruction<br />
|<br />
* 2 bytes: token<br />
* 1 byte: extension slot (1 to 26)<br />
* 1 byte: unused<br />
* 2 bytes: signed 16-bit offset into extension's token table<br />
|}<br />
<br />
=== Specially sized tokens ===<br />
{|class="wikitable"<br />
!Token!!Type!!Interpretation<br />
|-<br />
|0x064A<br />
|<code>Rem</code><br />
| rowspan="2" |<br />
* 2 bytes: token (0x064A or 0x0652)<br />
* 1 byte: unused<br />
* 1 byte: length of ISO-8859-1 string to follow<br />
* variable length: ISO-8859-1 string, with the above-given length.<br />
<br />
The string is null terminated and its length is rounded up to a multiple of two.<br />
<br />
The string should be printed after the remark token.<br />
|-<br />
|0x0652<br />
|<code>'</code><br />
|-<br />
|0x023C<br />
|<code>For</code><br />
| rowspan="8" |<br />
* 2 bytes: token<br />
* 2 bytes: unknown purpose<br />
|-<br />
|0x0250||<code>Repeat</code><br />
|-<br />
|0x0268||<code>While</code><br />
|-<br />
|0x027E||<code>Do</code><br />
|-<br />
|0x02BE||<code>If</code><br />
|-<br />
|0x02D0||<code>Else</code><br />
|-<br />
|0x0404||<code>Data</code><br />
|-<br />
|0x25A4||<code>Else If</code><br />
|-<br />
|0x0290<br />
|<code>Exit If</code><br />
| rowspan="3" |<br />
* 2 bytes: token<br />
* 4 bytes: unknown purpose<br />
|-<br />
|0x029E||<code>Exit</code><br />
|-<br />
|0x0316||<code>On</code><br />
|-<br />
|0x0376||<code>Procedure</code>||<br />
* 2 bytes: token<br />
* 4 bytes: number of bytes to corresponding <code>End Proc</code> line<br />
:(start of line + 8 + above = start of <code>End Proc</code> line)<br />
:(start of line + 8 + 6 + above = line after <code>End Proc</code> line)<br />
* 2 bytes: part of seed for encryption<br />
* 1 byte: flags<br />
** bit 7: if set, procedure is folded<br />
** bit 6: if set, procedure is locked and shouldn't be unfolded<br />
** bit 5: if set, procedure is currently encrypted<br />
** bit 4: if set, procedure contains compiled code and not tokens<br />
* 1 byte: part of seed for encryption<br />
|-<br />
|0x2A40||<code>Equ</code><br />
| rowspan="4"|<br />
* 2 bytes: token<br />
* 4 bytes: stored equate value<br />
* 1 byte: equate type (0-7)<br />
* 1 byte: unknown purpose<br />
|-<br />
|0x2A40||<code>Lvo</code><br />
|-<br />
|0x2A54||<code>Struc</code><br />
|-<br />
|0x2A64||<code>Struct</code><br />
|}<br />
<br />
==== Encrypted procedures ====<br />
If you should find a procedure (0x0376) token with the "is encrypted" bit set, run this C function on the code and it will decrypt the contents of the procedure.<br />
<br />
/* read 16-bit big-endian word from unsigned char[] */<br />
#define amos_deek(a) ((((a)[0])<<8)|((a)[1]))<br />
/* read 32-bit big-endian word from unsigned char[] */<br />
#define amos_leek(a) ((((a)[0])<<24)|(((a)[1])<<16)|(((a)[2])<<8)|((a)[3]))<br />
<br />
void AMOS_decrypt_procedure(unsigned char *src) {<br />
unsigned char *line, *next, *endline;<br />
unsigned int key, key2, key3, size;<br />
<br />
/* src should be a pointer to a line with the PROCEDURE token on it */<br />
if (amos_deek(&src[2]) != 0x0376) return;<br />
<br />
/* do not operate on compiled procedures */<br />
if (src[10] & 0x10) return;<br />
<br />
size = amos_leek(&src[4]);<br />
line = next = &src[src[0] * 2]; /* the line after PROCEDURE */<br />
endline = &src[size + 8 + 6]; /* the start of the line after END PROC */<br />
<br />
/* initialise keys */<br />
key = (size << 8) | src[11];<br />
key2 = 1;<br />
key3 = amos_deek(&src[8]);<br />
<br />
while (line < endline) {<br />
line = next; next = &line[line[0] * 2];<br />
for (line += 4; line < next;) {<br />
*line++ ^= (key >> 8) & 0xFF;<br />
*line++ ^= key & 0xFF;<br />
key += key2;<br />
key2 += key3;<br />
key = (key >> 1) | (key << 31); /* rotate right one bit */<br />
}<br />
}<br />
src[10] ^= 0x20; /* toggle "is encrypted" bit */<br />
}<br />
<br />
== AMOS Banks ==<br />
AMOS banks can be found either included with AMOS source code, saved individually on disk, where they typically have the file extension <samp>.ABK</samp>.<br />
<br />
AMOS allows for 15 banks in an program. Each bank can be located in "chip" memory, which is accessible to the Amiga's custom graphics and sound processors, or it can be located in "fast" memory, which is only accessible to the CPU.<br />
<br />
Banks are identified by their first four bytes. They are either Sprite/Icon banks (using the ASCII identifier <samp>AmSp</samp> or <samp>AmIc</samp>), or they are "normal" memory banks, which covers all other possible bank formats (using the identifier <samp>AmBk</samp>).<br />
<br />
=== AMOS Sprite/Icon Bank format ===<br />
Refer to [[AMOS Sprite Bank]]. See also [[AMOS Icon Bank]].<br />
<br />
=== AMOS Memory Bank format ===<br />
Refer to the main article: [[AMOS Memory Bank]].<br />
<br />
== Software ==<br />
* [https://github.com/kyz/amostools/ amostools]<br />
<br />
== Sample files ==<br />
* http://cd.textfiles.com/amospd/SourceCode/<br />
<br />
== Links and references ==<br />
* [https://www.exotica.org.uk/wiki/AMOS_file_formats AMOS file formats - ExoticA]<br />
* [http://www.amigacoding.com/index.php/AMOS:Extensions AMOS Extensions - Amiga Coding wiki]<br />
* [http://www.triumphoverchallenges.com/stos-and-amos-game-creators/ STOS and AMOS publishing history]<br />
<br />
[[Category:Amiga]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/AMOS_BASIC_tokenized_fileAMOS BASIC tokenized file2019-01-18T02:28:45Z<p>Kyz: /* AMOS source code */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
|released=1990<br />
|extensions={{ext|amos}}<br />
}}<br />
AMOS BASIC is a family of [[BASIC]] dialects for the Amiga computer. They were written by François Lionet, who also wrote AMOS's predecessor, STOS BASIC for the Atari ST (see [[STOS memory bank]]).<br />
<br />
There are several versions of AMOS published: ''AMOS The Creator'', ''Easy AMOS'' and ''AMOS Professional''.<br />
<br />
AMOS has its own integrated development environment, and it uses its own custom file formats for everything, from source code to graphics and sound.<br />
<br />
== Overview ==<br />
<br />
AMOS is an interpreted BASIC dialect where code is edited and run in an integrated development environment. Every time the programmer finishes editing a line of code, it is immediately parsed into tokens. For example, typing <code>procedure foobar</code> and pressing the return key will change the line into <code>Procedure FOOBAR</code>.<br />
<br />
Before a program can run, it will be ''tested'' to ensure it is free of syntax errors. Source code can be saved even if it is untested or fails testing, but AMOS includes a ''tested'' flag in the saved file. This is used by external software, for example the AMOS Compiler will refuse to compile an untested source code file.<br />
<br />
=== Extensions ===<br />
AMOS tokens are split between instructions in the core language and instructions in ''extensions''.<br />
<br />
Extensions are external files, written in 68000 assembler, which begin with a ''token table'' listing all the instructions they add to the language.<br />
<br />
Each extension is intended to be loaded into a specific ''slot''. AMOS has 25 slots for extensions. The configuration of extensions and their slots are saved in AMOS's global config file.<br />
<br />
To load other people's source code, AMOS needs to be configured with the same versions of the same extensions that they used, in the same slots.<br />
<br />
=== Banks ===<br />
In order to work with multimedia such as pictures and music, AMOS has the concept of a ''bank'' or ''memory bank'' (see [[AMOS Memory Bank#Disambiguation]] for a note about terminology). An AMOS program can have up to 15 banks. For example, you can load several pieces of music into different banks, and then identify which one you want to play by a number: <code>Track Play 5</code> will play music in bank 5. Or you could load a packed picture into bank 4 and say <code>Unpack 4 to 0</code>, which will unpack the picture onto screen 0.<br />
<br />
While you can load anything into any bank, some instructions can only take their data from specific bank numbers. Bank 1 is used for Sprites, which are controlled with instructions beginning <code>Sprite</code> or <code>Bob</code>. Bank 2 is for Icons, which are controlled with instructions beginning <code>Icon</code>. Bank 3 is used for music in AMOS's native music format.<br />
<br />
If banks are in use while saving source code, the contents of the banks are included in the saved source code. This makes it easy to bundle code with the data it works on. The exception to this rule is banks created using the <code>Reserve As Work</code> instruction.<br />
<br />
== AMOS source code ==<br />
All multi-byte integer values are in big-[[Endianness|endian]] (Motorola) format.<br />
<br />
AMOS source code is stored in a file with the extension <samp>.AMOS</samp>. It has the following structure:<br />
<br />
{|class="wikitable"<br />
!colspan="2"| Section<br />
!Length<br />
|-<br />
|colspan="2"| Header identifying which version of AMOS saved the file<br />
*"<samp>AMOS Pro111V</samp>" and 4 more bytes (AMOS Professional, source tested)<br />
*"<samp>AMOS Pro111v</samp>" and 4 more bytes (AMOS Professional, source not tested)<br />
*"<samp>AMOS Pro101V</samp>" and 4 more bytes (AMOS Professional, source tested)<br />
*"<samp>AMOS Pro101v</samp>" and 4 more bytes (AMOS Professional, source not tested)<br />
*"<samp>AMOS Basic V134 </samp>" (AMOS Pro compatible with AMOS 1.3, source tested)<br />
*"<samp>AMOS Basic v134 </samp>" (AMOS Pro compatible with AMOS 1.3, source not tested)<br />
*"<samp>AMOS Basic V1.3 </samp>" (AMOS The Creator v1.3, source tested)<br />
*"<samp>AMOS Basic v1.3 </samp>" (AMOS The Creator v1.3, source not tested)<br />
*"<samp>AMOS Basic V1.23</samp>" (AMOS The Creator v1.2, source tested)<br />
*"<samp>AMOS Basic v1.23</samp>" (AMOS The Creator v1.2, source not tested)<br />
*"<samp>AMOS Basic V1.00</samp>" (AMOS The Creator v1.0 – v1.1, source tested)<br />
*"<samp>AMOS Basic v1.00</samp>" (AMOS The Creator v1.0 – v1.1, source not tested)<br />
|16 bytes<br />
|-<br />
|colspan="2"| Length in bytes of tokenized BASIC code to follow<br />
|4 bytes<br />
|-<br />
|colspan="2"| Tokenized BASIC code<br />
|varies<br />
|-<br />
|rowspan="3"| [[AMOS AmBs]] segment<br />
|ASCII identifier "<samp>AmBs</samp>"<br />
|4 bytes<br />
|-<br />
|Count of AMOS banks to follow (0–16)<br />
|2 bytes<br />
|-<br />
|AMOS banks. Each bank's length must be individually determined.<br />
|varies<br />
|}<br />
<br />
=== Tokenised BASIC code ===<br />
<br />
Tokenised BASIC code is a sequence of tokenised lines. Each tokenised line has the following format:<br />
<br />
{|class="wikitable"<br />
!Field!!Length<br />
|-<br />
|Length of this line in words (2 bytes), including this byte. To get the length of the line in bytes, double this value<br />
|1 byte<br />
|-<br />
|Indent level of this line. Prefix <var>indent level</var> + 1 spaces at the beginning of the line, or no spaces if the value is less than 2<br />
|1 byte<br />
|-<br />
|Sequence of tokens. Each token is at least two bytes, and all tokens are rounded to to a multiple of two bytes. Each token is individually sized. The tokens always end with a compulsory null token<br />
|varies<br />
|}<br />
<br />
Some tokens have special size rules, but most are exactly 2 bytes in size.<br />
<br />
Each token starts with a signed 16-bit number. Token values between 0x0000 and 0x004E have special printing and size rules, all other tokens are a signed offset into AMOS's internal token table. The instruction name in the internal token table is what should be printed.<br />
<br />
=== Specially printed tokens ===<br />
{|class="wikitable"<br />
!Token!!Type!!Interpretation<br />
|-<br />
|0x0000<br />
|null token<br />
|Marks the end of line. Always 2 bytes long.<br />
|-<br />
|0x0006<br />
|Variable reference, e.g. <code>Print '''XYZ'''</code><br />
| rowspan="4" |<br />
* 2 bytes: token<br />
* 2 bytes: unknown purpose<br />
* 1 byte: length of [[ISO 8859-1|ISO-8859-1]] string for the variable or label name<br />
* 1 byte: flags, for tokens 0x0006, 0x0012 and 0x0018:<br />
**bit 1 set: this is a floating point reference, e.g. <code>XYZ#</code><br />
**bit 2 set: this is a string reference, e.g. <code>XYZ$</code><br />
* variable length: ISO-8859-1 string, with the above given length. The string is null terminated and its length is rounded up to a multiple of two bytes.<br />
|-<br />
|0x000C<br />
|Label, e.g. <code>'''XYZ''':</code> or <code>'''190'''</code> at the start of a line<br />
|-<br />
|0x0012<br />
|Procedure call reference, e.g. <code>'''XYZ'''["hello"]</code><br />
|-<br />
|0x0018<br />
|Label reference, e.g. <code>Goto '''XYZ'''</code><br />
|-<br />
|0x0026<br />
|String with double quotes, e.g. <code>"'''XYZ'''"</code><br />
| rowspan="2" |<br />
* 2 bytes: token<br />
* 2 bytes: length of ISO-8859-1 string to follow<br />
* variable length: ISO-8859-1 string, with the above given length, rounded up to a multiple of two. The string should be null-terminated, but sometimes isn't.<br />
|-<br />
|0x002E<br />
|String with single quotes, e.g. <code><nowiki>'</nowiki>'''XYZ'''<nowiki>'</nowiki></code><br />
|-<br />
|0x001E<br />
|Binary integer value, e.g. <code>%'''100101'''</code><br />
| rowspan="3" |<br />
* 2 bytes: token<br />
* 4 bytes: the integer value<br />
|-<br />
|0x0036<br />
|Hexidecimal integer value, e.g. <code>$'''80FAA010'''</code><br />
|-<br />
|0x003E<br />
|Decimal integer value, e.g. <code>'''1234567890'''</code><br />
|-<br />
|0x0046<br />
|Floating point value, e.g. <code>'''3.1452'''</code><br />
|<br />
* 2 bytes: token<br />
* 4 bytes: a single-precision floating point value<br />
** bits 31-8: mantissa (24 bits), most significant bit is always set<br />
** bit 7: ignore (should be sign bit, but all AMOS floats are positive)<br />
** bits 6-0: exponent (from 0x00 to 0x7F)<br />
<br />
An exponent of 0 means 0.0, regardless of mantissa.<br />
<br />
Each set bit in the mantissa has the value 2<sup>''m''+''e''-88</sup> where ''m'' is from 23 (MSB) to 0 (LSB) and ''e'' is the exponent<br />
|-<br />
|0x2B6A<br />
|Double-precision float, e.g. <code>'''3.1415926543'''</code><br />
|<br />
* 2 bytes: token<br />
* 8 bytes: a double-precision floating point value<br />
** bit 63: ignore (should be sign bit, but all AMOS floats are positive)<br />
** bits 62-51: exponent (from 0x000 to 0x7FF)<br />
** bits 50-0: mantissa (52 bits), most significant bit is not stored but implicitly set<br />
<br />
An exponent of 0 means 0.0, regardless of mantissa.<br />
<br />
Each set bit in the mantissa has the value 2<sup>''m''+''e''-1074</sup> where ''m'' is from 51 (implicit MSB) to 0 (LSB) and ''e'' is the exponent<br />
|-<br />
|0x004E<br />
|Extension instruction<br />
|<br />
* 2 bytes: token<br />
* 1 byte: extension slot (1 to 26)<br />
* 1 byte: unused<br />
* 2 bytes: signed 16-bit offset into extension's token table<br />
|}<br />
<br />
=== Specially sized tokens ===<br />
{|class="wikitable"<br />
!Token!!Type!!Interpretation<br />
|-<br />
|0x064A<br />
|<code>Rem</code><br />
| rowspan="2" |<br />
* 2 bytes: token (0x064A or 0x0652)<br />
* 1 byte: unused<br />
* 1 byte: length of ISO-8859-1 string to follow<br />
* variable length: ISO-8859-1 string, with the above-given length. The string is null terminated and its length is rounded up to a multiple of two. The string should be printed after the remark token<br />
|-<br />
|0x0652<br />
|<code>'</code><br />
|-<br />
|0x023C<br />
|<code>For</code><br />
| rowspan="8" |<br />
* 2 bytes: token<br />
* 2 bytes: unknown purpose<br />
|-<br />
|0x0250||<code>Repeat</code><br />
|-<br />
|0x0268||<code>While</code><br />
|-<br />
|0x027E||<code>Do</code><br />
|-<br />
|0x02BE||<code>If</code><br />
|-<br />
|0x02D0||<code>Else</code><br />
|-<br />
|0x0404||<code>Data</code><br />
|-<br />
|0x25A4||<code>Else If</code><br />
|-<br />
|0x0290<br />
|<code>Exit If</code><br />
| rowspan="3" |<br />
* 2 bytes: token<br />
* 4 bytes: unknown purpose<br />
|-<br />
|0x029E||<code>Exit</code><br />
|-<br />
|0x0316||<code>On</code><br />
|-<br />
|0x0376||<code>Procedure</code>||<br />
* 2 bytes: token<br />
* 4 bytes: number of bytes to corresponding <code>End Proc</code> line<br />
:(start of line + 8 + above = start of <code>End Proc</code> line)<br />
:(start of line + 8 + 6 + above = line after <code>End Proc</code> line)<br />
* 2 bytes: part of seed for encryption<br />
* 1 byte: flags<br />
** bit 7: if set, procedure is folded<br />
** bit 6: if set, procedure is locked and shouldn't be unfolded<br />
** bit 5: if set, procedure is currently encrypted<br />
** bit 4: if set, procedure contains compiled code and not tokens<br />
* 1 byte: part of seed for encryption<br />
|-<br />
|0x2A40||<code>Equ</code><br />
| rowspan="4"|<br />
* 2 bytes: token<br />
* 4 bytes: stored equate value<br />
* 1 byte: equate type (0-7)<br />
* 1 byte: unknown purpose<br />
|-<br />
|0x2A40||<code>Lvo</code><br />
|-<br />
|0x2A54||<code>Struc</code><br />
|-<br />
|0x2A64||<code>Struct</code><br />
|}<br />
<br />
==== Encrypted procedures ====<br />
If you should find a procedure (0x0376) token with the "is encrypted" bit set, run this C function on the code and it will decrypt the contents of the procedure.<br />
<br />
/* read 16-bit big-endian word from unsigned char[] */<br />
#define amos_deek(a) ((((a)[0])<<8)|((a)[1]))<br />
/* read 32-bit big-endian word from unsigned char[] */<br />
#define amos_leek(a) ((((a)[0])<<24)|(((a)[1])<<16)|(((a)[2])<<8)|((a)[3]))<br />
<br />
void AMOS_decrypt_procedure(unsigned char *src) {<br />
unsigned char *line, *next, *endline;<br />
unsigned int key, key2, key3, size;<br />
<br />
/* src should be a pointer to a line with the PROCEDURE token on it */<br />
if (amos_deek(&src[2]) != 0x0376) return;<br />
<br />
/* do not operate on compiled procedures */<br />
if (src[10] & 0x10) return;<br />
<br />
size = amos_leek(&src[4]);<br />
line = next = &src[src[0] * 2]; /* the line after PROCEDURE */<br />
endline = &src[size + 8 + 6]; /* the start of the line after END PROC */<br />
<br />
/* initialise keys */<br />
key = (size << 8) | src[11];<br />
key2 = 1;<br />
key3 = amos_deek(&src[8]);<br />
<br />
while (line < endline) {<br />
line = next; next = &line[line[0] * 2];<br />
for (line += 4; line < next;) {<br />
*line++ ^= (key >> 8) & 0xFF;<br />
*line++ ^= key & 0xFF;<br />
key += key2;<br />
key2 += key3;<br />
key = (key >> 1) | (key << 31); /* rotate right one bit */<br />
}<br />
}<br />
src[10] ^= 0x20; /* toggle "is encrypted" bit */<br />
}<br />
<br />
== AMOS Banks ==<br />
AMOS banks can be found either included with AMOS source code, saved individually on disk, where they typically have the file extension <samp>.ABK</samp>.<br />
<br />
AMOS allows for 15 banks in an program. Each bank can be located in "chip" memory, which is accessible to the Amiga's custom graphics and sound processors, or it can be located in "fast" memory, which is only accessible to the CPU.<br />
<br />
Banks are identified by their first four bytes. They are either Sprite/Icon banks (using the ASCII identifier <samp>AmSp</samp> or <samp>AmIc</samp>), or they are "normal" memory banks, which covers all other possible bank formats (using the identifier <samp>AmBk</samp>).<br />
<br />
=== AMOS Sprite/Icon Bank format ===<br />
Refer to [[AMOS Sprite Bank]]. See also [[AMOS Icon Bank]].<br />
<br />
=== AMOS Memory Bank format ===<br />
Refer to the main article: [[AMOS Memory Bank]].<br />
<br />
== Software ==<br />
* [https://github.com/kyz/amostools/ amostools]<br />
<br />
== Sample files ==<br />
* http://cd.textfiles.com/amospd/SourceCode/<br />
<br />
== Links and references ==<br />
* [https://www.exotica.org.uk/wiki/AMOS_file_formats AMOS file formats - ExoticA]<br />
* [http://www.amigacoding.com/index.php/AMOS:Extensions AMOS Extensions - Amiga Coding wiki]<br />
* [http://www.triumphoverchallenges.com/stos-and-amos-game-creators/ STOS and AMOS publishing history]<br />
<br />
[[Category:Amiga]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/AMOS_Memory_BankAMOS Memory Bank2018-10-13T17:52:10Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Resources<br />
|extensions={{ext|abk}}<br />
}}<br />
'''AMOS Memory Bank''' is a resource data format and file format associated with AMOS. See [[AMOS BASIC tokenized file]] for more information about AMOS.<br />
<br />
Multiple memory banks may be combined, along with [[AMOS Sprite Bank|sprite]] and [[AMOS Icon Bank|icon]] banks, using the [[AMOS AmBs]] container format. This format is used in [[AMOS BASIC tokenized file]]s.<br />
<br />
== Disambiguation ==<br />
"AMOS Memory Bank" can mean just "AmBk"-tagged banks, or it can be an umbrella term that also includes [[AMOS Sprite Bank]] ("AmSp") and [[AMOS Icon Bank]] ("AmIc"). Careful writers may prefer the term "AMOS Bank", instead of "AMOS Memory Bank", when referring to all types of AMOS banks.<br />
<br />
== Format details ==<br />
<br />
{|class="wikitable"<br />
!Field!!Length<br />
|-<br />
|ASCII identifier <samp>AmBk</samp><br />
|4 bytes<br />
|-<br />
|Bank number (1-15)<br />
|2 bytes<br />
|-<br />
|Memory type: 0 for chip memory, 1 for fast memory<br />
|2 bytes<br />
|-<br />
|Bank length (bits 27-0). Bits 28 and 29 are undefined, not part of the length field. Bit 30 means "try chip memory", bit 31 means "try fast memory" if set<br />
|4 bytes<br />
|-<br />
|Bank name. Unterminated ASCII text padded with spaces<br />
|8 bytes<br />
|-<br />
|Bank data<br />
|<var>bank length</var> - 8 bytes<br />
|}<br />
<br />
=== AMOS Music Bank ===<br />
:''Main article: [[AMOS Music Bank]]<br />
<br />
This bank has the name "<samp>Music&nbsp;&nbsp;&nbsp;</samp>" and is created with various conversion utilities shipped with AMOS. It is played back with the Music extension.<br />
<br />
=== AMOS AMAL Bank ===<br />
<br />
This bank has the name "<samp>Amal&nbsp;&nbsp;&nbsp;&nbsp;</samp>". It contains instructions in AMOS Animation Language format.<br />
<br />
=== AMOS Menu Bank ===<br />
<br />
This bank has the name "<samp>Menu&nbsp;&nbsp;&nbsp;&nbsp;</samp>". It contains pull-down menu definitions.<br />
<br />
=== AMOS Data Bank ===<br />
<br />
This bank has the name "<samp>Datas&nbsp;&nbsp;&nbsp;</samp>". It is created in AMOS using the <code>Reserve As Data</code> instruction, and has no specific format.<br />
<br />
=== AMOS Work Bank ===<br />
<br />
This bank has the name "<samp>Work&nbsp;&nbsp;&nbsp;&nbsp;</samp>". It is created in AMOS using the <code>Reserve As Work</code> instruction, and has no specific format. As a Work bank, it is not saved as part of the source code, unlike normal data banks.<br />
<br />
=== AMOS Asm Bank ===<br />
<br />
This bank has the name "<samp>Asm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</samp>". It contains Amiga machine code that was loaded into a bank using the <code>Pload</code> instruction and has no specific format, other than containing MC680x0 binary code.<br />
<br />
The <code>Pload</code> instruction takes the first code hunk out of an Amiga executable and copies it into the bank, without even applying its relocations, therefore all code needs to use PC-relative addressing. The <code>Call</code> instruction jumps directly to the start of the bank. The registers (A0, A1, D0, D1, ...) can be set in preparation for a call by setting the <code>Areg()</code> and <code>Dreg()</code> arrays. Extra parameters can also be included with the <code>Call</code> instruction, these are made available to the called function via a stack pointed to by the A3 register.<br />
<br />
=== AMOS Picture Bank ===<br />
:''Main article: [[AMOS Picture Bank]]''<br />
<br />
This bank has the name "<samp>Pac.Pic.</samp>" and is created with the Compact extension's <code>Pack</code> instruction.<br />
<br />
=== AMOS Samples Bank ===<br />
<br />
This bank has the name "<samp>Samples </samp>" and is created with the Sample Bank Editor shipped with AMOS. The samples can be played back with the Music extension. The format of the bank data is as follows:<br />
<br />
{|class="wikitable"<br />
!Field!!Length<br />
|-<br />
|Count of samples<br />
|2 bytes<br />
|-<br />
|32-bit offset to each sample, relative to the <var>count of samples</var> field above<br />
|<var>count of samples</var> * 4 bytes<br />
|}<br />
<br />
The format of each sample is as follows:<br />
<br />
{|class="wikitable"<br />
!Field!!Length<br />
|-<br />
|Sample name, in ISO-8859-1<br />
|8 bytes<br />
|-<br />
|Sample frequency in Hertz<br />
|2 bytes<br />
|-<br />
|Sample length in bytes<br />
|4 bytes<br />
|-<br />
|Sample data: twos complement 8-bit signed PCM samples<br />
|varies<br />
|}<br />
<br />
== Specifications ==<br />
* [https://www.exotica.org.uk/wiki/AMOS_file_formats#Regular_memory_bank_format AMOS file formats &rarr; Regular memory bank format]<br />
<br />
== Software ==<br />
* [https://github.com/dschwen/amosbank amosbank] - Can convert "Samples Bank" to [[WAV]] format (among other things)<br />
* [https://github.com/kyz/amostools amostools] - can convert Pac.Pic., Sprites and Icons to IFF ILBM, and convert Samples to IFF 8SVX format<br />
<br />
== Sample files ==<br />
* [http://cd.textfiles.com/amospd/076-100/APD082/amal.abk amal.abk] (AMAL)<br />
* [http://cd.textfiles.com/amospd/001-025/APD002/Raw_Samples/Feet_Sample.Abk Feet_Sample.Abk] (Data)<br />
* [http://cd.textfiles.com/zoom2/graphics/misc/procad/profiles/zoom.abk zoom.abk] (Asm)<br />
* [http://cd.textfiles.com/amigaformat/aformat-13-199704/-ScreenPlay-/Shareware/Checkers1.1/Sound.abk Sound.abk], [http://cd.textfiles.com/amospd/001-025/APD009/DEMO_SAM.ABK DEMO_SAM.ABK] (Samples)<br />
<br />
[[Category:Amiga]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/AMOS_AmBsAMOS AmBs2018-10-13T17:49:03Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Resources<br />
|extensions={{ext|abs}}, {{ext|abk}}<br />
}}<br />
AMOS '''AmBs''' format is a resource container format that combines zero or more "AMOS Banks" ([[AMOS Memory Bank|memory]], [[AMOS Sprite Bank|sprite]], and/or [[AMOS Icon Bank|icon]] banks) into a single file or data segment. The official name of this format, if it has one, is unknown.<br />
<br />
It is typically used as part of [[AMOS BASIC tokenized file]] format, but may be stored in a file by itself.<br />
<br />
Although AmBs is a very simple format, it is not trivial to parse. You need to know how to compute the length of every type of bank.<br />
<br />
== Identification ==<br />
AmBs data begins with the ASCII signature "{{magic|AmBs}}".<br />
<br />
== Sample files ==<br />
* http://cd.textfiles.com/amospd/501-525/APD503/Fabrizio_Bazzo/ABK/<br />
* [http://cd.textfiles.com/zoom2/graphics/misc/procad/profiles/defaultlib_3.abk defaultlib_3.abk]<br />
* [http://cd.textfiles.com/amospd/001-025/APD019/axelf.abk axelf.abk]<br />
<br />
See also [[AMOS BASIC tokenized file#Sample files]], for files that contain embedded AmBs files.<br />
<br />
== Links ==<br />
* [http://www.ultimateamiga.co.uk/HostedProjects/AMOSFactory/AMOSProManual/14/1429.html Memory Bank Structures], "Saving several Banks at once" section<br />
<br />
[[Category:Amiga]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/AMOS_Picture_BankAMOS Picture Bank2018-10-13T17:48:27Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Graphics<br />
|extensions={{ext|abk}}<br />
}}<br />
'''AMOS Picture Bank''' (also called '''AMOS Pac.Pic.''') is a raster graphics format associated with AMOS. See [[AMOS BASIC tokenized file]] for more information about AMOS.<br />
<br />
It is a subtype [[AMOS Memory Bank]], identified by the name "<code>Pac.Pic.</code>". It may appear in a file by itself, or be contained in [[AMOS BASIC tokenized file]] or [[AMOS AmBs]] format.<br />
<br />
It is not the same as [[AMOS Sprite Bank]] or [[AMOS Icon Bank]].<br />
<br />
== Identification ==<br />
Files begin with ASCII "<code>AmBk</code>", and have "<code>Pac.Pic.</code>" at offset 12.<br />
<br />
== Specifications ==<br />
* [https://www.exotica.org.uk/wiki/AMOS_Pac.Pic._format AMOS Pac.Pic. format]<br />
* [http://www.amigacoding.com/index.php/AMOS:Picture_Bank_format AMOS:Picture Bank format]<br />
<br />
== Software ==<br />
* [https://github.com/dschwen/amosbank amosbank]<br />
* [https://github.com/kyz/amostools amostools]<br />
* {{Deark}}<br />
<br />
== Sample files ==<br />
* http://cd.textfiles.com/globalamiga/Development/Programming/AMOS_PRO/Pictures/<br />
* [http://cd.textfiles.com/amospd/Sprites/Amos.Abk Amos.Abk]<br />
* [http://cd.textfiles.com/amospd/076-100/APD082/piccy.abk piccy.abk]<br />
* [http://cd.textfiles.com/amospd/001-025/APD022/Extra_Bits/Available_For.Abk Available_For.Abk]<br />
<br />
[[Category:Amiga]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/AMOS_BASIC_tokenized_fileAMOS BASIC tokenized file2018-10-13T17:47:25Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
|released=1990<br />
|extensions={{ext|amos}}<br />
}}<br />
AMOS BASIC is a family of [[BASIC]] dialects for the Amiga computer. They were written by François Lionet, who also wrote AMOS's predecessor, STOS BASIC for the Atari ST (see [[STOS memory bank]]).<br />
<br />
There are several versions of AMOS published: ''AMOS The Creator'', ''Easy AMOS'' and ''AMOS Professional''.<br />
<br />
AMOS has its own integrated development environment, and it uses its own custom file formats for everything, from source code to graphics and sound.<br />
<br />
== Overview ==<br />
<br />
AMOS is an interpreted BASIC dialect where code is edited and run in an integrated development environment. Every time the programmer finishes editing a line of code, it is immediately parsed into tokens. For example, typing <code>procedure foobar</code> and pressing the return key will change the line into <code>Procedure FOOBAR</code>.<br />
<br />
Before a program can run, it will be ''tested'' to ensure it is free of syntax errors. Source code can be saved even if it is untested or fails testing, but AMOS includes a ''tested'' flag in the saved file. This is used by external software, for example the AMOS Compiler will refuse to compile an untested source code file.<br />
<br />
=== Extensions ===<br />
AMOS tokens are split between instructions in the core language and instructions in ''extensions''.<br />
<br />
Extensions are external files, written in 68000 assembler, which begin with a ''token table'' listing all the instructions they add to the language.<br />
<br />
Each extension is intended to be loaded into a specific ''slot''. AMOS has 25 slots for extensions. The configuration of extensions and their slots are saved in AMOS's global config file.<br />
<br />
To load other people's source code, AMOS needs to be configured with the same versions of the same extensions that they used, in the same slots.<br />
<br />
=== Banks ===<br />
In order to work with multimedia such as pictures and music, AMOS has the concept of a ''bank'' or ''memory bank'' (see [[AMOS Memory Bank#Disambiguation]] for a note about terminology). An AMOS program can have up to 15 banks. For example, you can load several pieces of music into different banks, and then identify which one you want to play by a number: <code>Track Play 5</code> will play music in bank 5. Or you could load a packed picture into bank 4 and say <code>Unpack 4 to 0</code>, which will unpack the picture onto screen 0.<br />
<br />
While you can load anything into any bank, some instructions can only take their data from specific bank numbers. Bank 1 is used for Sprites, which are controlled with instructions beginning <code>Sprite</code> or <code>Bob</code>. Bank 2 is for Icons, which are controlled with instructions beginning <code>Icon</code>. Bank 3 is used for music in AMOS's native music format.<br />
<br />
If banks are in use while saving source code, the contents of the banks are included in the saved source code. This makes it easy to bundle code with the data it works on. The exception to this rule is banks created using the <code>Reserve As Work</code> instruction.<br />
<br />
== AMOS source code ==<br />
All multi-byte integer values are in big-[[Endianness|endian]] (Motorola) format.<br />
<br />
AMOS source code is stored in a file with the extension <samp>.AMOS</samp>. It has the following structure:<br />
<br />
{|class="wikitable"<br />
!colspan="2"| Section<br />
!Length<br />
|-<br />
|colspan="2"| Header identifying which version of AMOS saved the file<br />
*"<samp>AMOS Pro111v\0\0\0\0</samp>"<br />
*"<samp>AMOS Pro101V\0\0\0\0</samp>" (AMOS Professional, source tested)<br />
*"<samp>AMOS Pro101v\0\0\0\0</samp>" (AMOS Professional, source not tested)<br />
*"<samp>AMOS Basic V134 </samp>" (AMOS Pro compatible with AMOS 1.3, source tested)<br />
*"<samp>AMOS Basic v134 </samp>" (AMOS Pro compatible with AMOS 1.3, source not tested)<br />
*"<samp>AMOS Basic V1.3 </samp>" (AMOS The Creator v1.3, source tested)<br />
*"<samp>AMOS Basic v1.3 </samp>" (AMOS The Creator v1.3, source not tested)<br />
*"<samp>AMOS Basic V1.23</samp>"<br />
*"<samp>AMOS Basic V1.00</samp>" (AMOS The Creator v1.0 – v1.2, source tested)<br />
*"<samp>AMOS Basic v1.00</samp>" (AMOS The Creator v1.0 – v1.2, source not tested)<br />
|16 bytes<br />
|-<br />
|colspan="2"| Length in bytes of tokenized BASIC code to follow<br />
|4 bytes<br />
|-<br />
|colspan="2"| Tokenized BASIC code<br />
|varies<br />
|-<br />
|rowspan="3"| [[AMOS AmBs]] segment<br />
|ASCII identifier "<samp>AmBs</samp>"<br />
|4 bytes<br />
|-<br />
|Count of AMOS banks to follow (0–16)<br />
|2 bytes<br />
|-<br />
|AMOS banks. Each bank's length must be individually determined.<br />
|varies<br />
|}<br />
<br />
=== Tokenised BASIC code ===<br />
<br />
Tokenised BASIC code is a sequence of tokenised lines. Each tokenised line has the following format:<br />
<br />
{|class="wikitable"<br />
!Field!!Length<br />
|-<br />
|Length of this line in words (2 bytes), including this byte. To get the length of the line in bytes, double this value<br />
|1 byte<br />
|-<br />
|Indent level of this line. Prefix <var>indent level</var> + 1 spaces at the beginning of the line, or no spaces if the value is less than 2<br />
|1 byte<br />
|-<br />
|Sequence of tokens. Each token is at least two bytes, and all tokens are rounded to to a multiple of two bytes. Each token is individually sized. The tokens always end with a compulsory null token<br />
|varies<br />
|}<br />
<br />
Some tokens have special size rules, but most are exactly 2 bytes in size.<br />
<br />
Each token starts with a signed 16-bit number. Token values between 0x0000 and 0x004E have special printing and size rules, all other tokens are a signed offset into AMOS's internal token table. The instruction name in the internal token table is what should be printed.<br />
<br />
==== Specially printed tokens ====<br />
{|class="wikitable"<br />
!Token!!Type!!Interpretation<br />
|-<br />
|0x0000<br />
|null token<br />
|Marks the end of line. Always 2 bytes long<br />
|-<br />
|0x0006<br />
|Variable reference, e.g. <code>Print '''XYZ'''</code><br />
| rowspan="4" |<br />
* 2 bytes: token<br />
* 2 bytes: unknown purpose<br />
* 1 byte: length of [[ISO 8859-1|ISO-8859-1]] string for the variable or label name<br />
* 1 byte: flags, for tokens 0x0006, 0x0012 and 0x0018:<br />
**bit 1 set: this is a floating point reference, e.g. <code>XYZ#</code><br />
**bit 2 set: this is a string reference, e.g. <code>XYZ$</code><br />
* variable length: ISO-8859-1 string, with the above given length. The string is null terminated and its length is rounded up to a multiple of two<br />
|-<br />
|0x000C<br />
|Label, e.g. <code>'''XYZ''':</code> or <code>'''190'''</code> at the start of a line<br />
|-<br />
|0x0012<br />
|Procedure call reference, e.g. <code>'''XYZ'''["hello"]</code><br />
|-<br />
|0x0018<br />
|Label reference, e.g. <code>Goto '''XYZ'''</code><br />
|-<br />
|0x0026<br />
|String with double quotes, e.g. <code>"'''XYZ'''"</code><br />
| rowspan="2" |<br />
* 2 bytes: token<br />
* 2 bytes: length of ISO-8859-1 string to follow<br />
* variable length: ISO-8859-1 string, with the above given length. The string is null terminated and its length is rounded up to a multiple of two<br />
|-<br />
|0x002E<br />
|String with single quotes, e.g. <code><nowiki>'</nowiki>'''XYZ'''<nowiki>'</nowiki></code><br />
|-<br />
|0x001E<br />
|Binary integer value, e.g. <code>%'''100101'''</code><br />
| rowspan="3" |<br />
* 2 bytes: token<br />
* 4 bytes: the integer value<br />
|-<br />
|0x0036<br />
|Hexidecimal integer value, e.g. <code>$'''80FAA010'''</code><br />
|-<br />
|0x003E<br />
|Decimal integer value, e.g. <code>'''1234567890'''</code><br />
|-<br />
|0x0046<br />
|Floating point value, e.g. <code>'''3.1452'''</code><br />
|<br />
* 2 bytes: token<br />
* 4 bytes: the single-precision floating point value.<br />
**bits 31–8: mantissa (24 bits)<br />
**bit 7: sign bit. Positive if 0, negative if 1<br />
**bits 6–0: exponent<br />
<br />
An exponent of 0 means 0.0, regardless of mantissa. Counting from MSB (23) to LSB (0), each bit set in the mantissa is 2^(<var>mantissa bit</var> + <var>exponent</var> − 88)<br />
|-<br />
|0x004E<br />
|Extension instruction<br />
|<br />
* 2 bytes: token<br />
* 1 byte: extension slot (1 to 26)<br />
* 1 byte: unused<br />
* 2 bytes: signed 16-bit offset into extension's token table<br />
|}<br />
<br />
==== Specially sized tokens ====<br />
{|class="wikitable"<br />
!Token!!Type!!Interpretation<br />
|-<br />
|0x064A<br />
|<code>Rem</code><br />
| rowspan="2" |<br />
* 2 bytes: token (0x064A or 0x0652)<br />
* 1 byte: unused<br />
* 1 byte: length of ISO-8859-1 string to follow<br />
* variable length: ISO-8859-1 string, with the above-given length. The string is null terminated and its length is rounded up to a multiple of two. The string should be printed after the remark token.<br />
|-<br />
|0x0652<br />
|<code>'</code><br />
|-<br />
|0x023C<br />
|<code>For</code><br />
| rowspan="7" |<br />
* 2 bytes: token<br />
* 2 bytes: unknown purpose<br />
|-<br />
|0x0250||<code>Repeat</code><br />
|-<br />
|0x0268||<code>While</code><br />
|-<br />
|0x027E||<code>Do</code><br />
|-<br />
|0x02BE||<code>If</code><br />
|-<br />
|0x02D0||<code>Else</code><br />
|-<br />
|0x0404||<code>Data</code><br />
|-<br />
|0x0290<br />
|<code>Exit If</code><br />
| rowspan="3" |<br />
* 2 bytes: token<br />
* 4 bytes: unknown purpose<br />
|-<br />
|0x029E||<code>Exit</code><br />
|-<br />
|0x0316||<code>On</code><br />
|-<br />
|0x0376||<code>Procedure</code>||<br />
* 2 bytes: token<br />
* 4 bytes: number of bytes to corresponding <code>End Proc</code> line<br />
:(start of line + 8 + above = start of <code>End Proc</code> line)<br />
:(start of line + 8 + 6 + above = line after <code>End Proc</code> line)<br />
* 2 bytes: part of seed for encryption<br />
* 1 byte: flags<br />
** bit 7: if set, procedure is folded<br />
** bit 6: if set, procedure is locked and shouldn't be unfolded<br />
** bit 5: if set, procedure is currently encrypted<br />
** bit 4: if set, procedure contains compiled code and not tokens<br />
* 1 byte: part of seed for encryption<br />
|}<br />
<br />
==== Encrypted procedures ====<br />
If you should find a procedure (0x0376) token with the "is encrypted" bit set, run this C function on the code and it will decrypt the contents of the procedure.<br />
<br />
void decrypt_procedure(unsigned char *src) {<br />
unsigned char *line, *next, *endline;<br />
unsigned int key, key2, key3, size;<br />
<br />
/* ensure src is a pointer to a line with the PROCEDURE token on it */<br />
if (src[2] != 0x03 || src[3] != 0x76) return;<br />
<br />
/* do not operate on compiled procedures */<br />
if (src[10] & 0x10) return;<br />
<br />
/* size + 8 + 6 is the start of the line after END PROC */<br />
size = (src[4] << 24) | (src[5] << 16) | (src[6] << 8) | src[7];<br />
endline = &src[size + 8 + 6];<br />
line = next = &src[src[0] * 2];<br />
<br />
/* initialise encryption keys */<br />
key = (size << 8) | src[11];<br />
key2 = 1;<br />
key3 = (src[8] << 8) | src[9];<br />
<br />
while (line < endline) {<br />
line = next;<br />
next = &line[line[0] * 2];<br />
<br />
/* decrypt one line */<br />
for (line += 4; line < next;) {<br />
*line++ ^= (key >> 8) & 0xFF;<br />
*line++ ^= key & 0xFF;<br />
key = (key & 0xFFFF0000) | ((key+key2) & 0x0000FFFF);<br />
key2 += key3;<br />
key = (key >> 1) | (key << 31);<br />
}<br />
}<br />
src[10] ^= 0x20; /* toggle "is encrypted" bit */<br />
}<br />
<br />
== AMOS Banks ==<br />
AMOS banks can be found either included with AMOS source code, saved individually on disk, where they typically have the file extension <samp>.ABK</samp>.<br />
<br />
AMOS allows for 15 banks in an program. Each bank can be located in "chip" memory, which is accessible to the Amiga's custom graphics and sound processors, or it can be located in "fast" memory, which is only accessible to the CPU.<br />
<br />
Banks are identified by their first four bytes. They are either Sprite/Icon banks (using the ASCII identifier <samp>AmSp</samp> or <samp>AmIc</samp>), or they are "normal" memory banks, which covers all other possible bank formats (using the identifier <samp>AmBk</samp>).<br />
<br />
=== AMOS Sprite/Icon Bank format ===<br />
Refer to [[AMOS Sprite Bank]]. See also [[AMOS Icon Bank]].<br />
<br />
=== AMOS Memory Bank format ===<br />
Refer to the main article: [[AMOS Memory Bank]].<br />
<br />
== Software ==<br />
* [https://github.com/kyz/amostools/ amostools]<br />
<br />
== Sample files ==<br />
* http://cd.textfiles.com/amospd/SourceCode/<br />
<br />
== Links and references ==<br />
* [https://www.exotica.org.uk/wiki/AMOS_file_formats AMOS file formats - ExoticA]<br />
* [http://www.amigacoding.com/index.php/AMOS:Extensions AMOS Extensions - Amiga Coding wiki]<br />
* [http://www.triumphoverchallenges.com/stos-and-amos-game-creators/ STOS and AMOS publishing history]<br />
<br />
[[Category:Amiga]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/AMOS_Sprite_BankAMOS Sprite Bank2018-10-13T17:43:51Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Graphics<br />
|extensions={{ext|abk}}<br />
}}<br />
'''AMOS Sprite Bank''' is a raster image file format associated with AMOS. See [[AMOS BASIC tokenized file]] for more information about AMOS. The format may also be known as '''Object Bank''' or '''Bob Bank'''.<br />
<br />
[[AMOS Icon Bank]] is a very similar format. See also [[AMOS Picture Bank]].<br />
<br />
Note that other types of AMOS files also use '''.abk''' filename extension.<br />
<br />
== Identification ==<br />
Files begin with ASCII characters "<code>AmSp</code>".<br />
<br />
== AMOS Sprite/Icon Bank format ==<br />
A sprite bank and an icon bank share very similar attributes. They define graphic data which can be drawn onscreen. They have this format:<br />
<br />
{|class="wikitable"<br />
!Field!!Length<br />
|-<br />
|Bank identifier: <samp>AmSp</samp> for sprites (bank 1) or <samp>AmIc</samp> for icons (bank 2)<br />
|4 bytes<br />
|-<br />
|Count of sprites/icons to follow<br />
|2 bytes<br />
|-<br />
|Sprites/Icons. Each sprite or icon has this format:<br />
* 2 bytes: <var>width</var>, in 16-bit words (multiply by 16 to get width in pixels)<br />
* 2 bytes: <var>height</var>, in raster lines (pixels)<br />
* 2 bytes: <var>depth</var>, in bitplanes (1 to 5)<br />
* 2 bytes: hot-spot X co-ordinate<br />
* 2 bytes: hot-spot Y co-ordinate<br />
* <var>width</var> * <var>height</var> * <var>depth</var> * 2 bytes: Amiga planar graphic data<br />
|-<br />
|Color palette: 32 16-bit colors in 0x0RGB form, the Amiga COLORx hardware register format<br />
|64 bytes<br />
|}<br />
<br />
== Specifications ==<br />
* [https://www.exotica.org.uk/wiki/AMOS_file_formats#AMOS_Sprite_and_Icon_bank_formats AMOS Sprite and Icon bank formats]<br />
* [http://www.ultimateamiga.co.uk/HostedProjects/AMOSFactory/AMOSProManual/ AMOS Pro User Guide] → [http://www.ultimateamiga.co.uk/HostedProjects/AMOSFactory/AMOSProManual/14/1431.html Memory Bank Structures]<br />
<br />
== Software ==<br />
* [https://github.com/dschwen/amosbank amosbank]<br />
* [https://github.com/kyz/amostools amostools]<br />
* [[Konvertor]]<br />
* [http://sourceforge.net/projects/javaamosabk/ Java AMOS Sprite Bank Viewer]<br />
* {{Deark}}<br />
<br />
== Sample files ==<br />
* Most of the files at http://cd.textfiles.com/amospd/Sprites/<br />
* http://sourceforge.net/projects/javaamosabk/files/abk/ (e.g. Mouse.Abk)<br />
* [http://cd.textfiles.com/zoom2/graphics/misc/procad/brushes/teletube_h.abk teletube_h.abk]<br />
<br />
== Links ==<br />
* [[Wikipedia:AMOS (programming language)|Wikipedia: AMOS]]<br />
<br />
[[Category:Amiga]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/AMOS_Music_BankAMOS Music Bank2018-10-13T17:36:38Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|abk}}<br />
}}<br />
'''AMOS Music Bank''' is a subtype of [[AMOS Memory Bank]].<br />
<br />
== Identification ==<br />
Files begin with ASCII "<code>AmBk</code>", and have "<code>Music&nbsp;&nbsp;&nbsp;</code>" at offset 12.<br />
<br />
== Specifications ==<br />
* [https://www.exotica.org.uk/wiki/AMOS_Music_Bank_format AMOS Music Bank format]<br />
<br />
== Software ==<br />
* [http://aminet.net/package/dev/amos/Abk2Mod-II Abk2Mod] will convert AMOS Music Banks (back) to Protracker<br />
* [[Konvertor]]<br />
<br />
== Sample files ==<br />
* http://cd.textfiles.com/amospd/Music/<br />
<br />
[[Category:Amiga]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-13T09:32:21Z<p>Kyz: /* BASIC Variables Table */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <code>F0O</code> or <code>BAR</code>. Names are case-insensitive and whitespace insensitive (<code>hello world</code> is the same variable as <code>HeLlOwOrL d</code>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 to 0x7A)<br />
* 5 bytes: numeric value <br />
|<br />
* {{magic|61 00 00 01 00 00}} &rarr; <code>LET a=1</code><br />
* {{magic|69 00 FF 02 00 00}} &rarr; <code>LET i=-65534</code><br />
* {{magic|6A 00 00 FE FF 00}} &rarr; <code>LET j=65534</code><br />
* {{magic|62 93 3C 61 4E 00}} &rarr; <code>LET b=12345678</code><br />
** 12345678 = 0xBC614E<br />
* {{magic|63 93 BC 61 4E 00}} &rarr; <code>LET c=-12345678</code> <br />
* {{magic|65 82 2D F8 4C AD}} &rarr; <code>LET e=2.71828</code><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 to 0xBA)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* {{magic|B0 69 E5 82 49 4A F0 41}} &rarr; <code>LET pie=3.1452</code><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 to 0x5A)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* {{magic|41 04 00 54 45 53 54}} &rarr; <code>LET a$="TEST"</code><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 to 0x9A)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <code>DIM a(2,3,4)</code> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*{{magic|81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00}} &rarr; <code>DIM a(5)</code><br />
*{{magic|81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00}} &rarr; <code>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</code><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 to 0xDA)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <code>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</code> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* {{magic|C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20}} &rarr; <code>DIM h$(15); LET h$="hello, world"</code><br />
* {{magic|D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64}} &rarr; <code>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</code><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 to 0xFA)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started<br />
* 1 byte: statement number within line where the FOR loop was started<br />
|<br />
* {{magic|E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (before loop has run)<br />
* {{magic|E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (after loop has run)<br />
* {{magic|E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 10 STEP 2</code><br />
* {{magic|E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02}} &rarr; <code>FOR i=1.1 TO 7.7 STEP .1</code> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65536 from this if number is flagged as negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Floating point examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|91 00 00 00 00}}||65536<br />
|-<br />
|{{magic|A0 07 65 43 21}}||2271560481 (0x87654321)<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|{{magic|91 80 00 00 00}}||-65536<br />
|-<br />
|{{magic|A0 87 65 43 21}}||-2271560481 (-0x87654321)<br />
|}<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Integral examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T15:01:13Z<p>Kyz: /* 5-byte numeric format */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <code>F0O</code> or <code>BAR</code>. Names are case-insensitive and whitespace insensitive (<code>hello world</code> is the same variable as <code>HeLlOwOrL d</code>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <code>a</code> to 0x7A <code>z</code>)<br />
* 5 bytes: numeric value <br />
|<br />
* {{magic|61 00 00 01 00 00}} &rarr; <code>LET a=1</code><br />
* {{magic|69 00 FF 02 00 00}} &rarr; <code>LET i=-65534</code><br />
* {{magic|6A 00 00 FE FF 00}} &rarr; <code>LET j=65534</code><br />
* {{magic|62 93 3C 61 4E 00}} &rarr; <code>LET b=12345678</code><br />
** 12345678 = 0xBC614E<br />
* {{magic|63 93 BC 61 4E 00}} &rarr; <code>LET c=-12345678</code> <br />
* {{magic|65 82 2D F8 4C AD}} &rarr; <code>LET e=2.71828</code><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <code>a</code> to 0xBA <code>z</code>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* {{magic|B0 69 E5 82 49 4A F0 41}} &rarr; <code>LET pie=3.1452</code><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <code>a$</code> to 0x5A <code>z$</code>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* {{magic|41 04 00 54 45 53 54}} &rarr; <code>LET a$="TEST"</code><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <code>a</code> to 0x9A <code>z</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <code>DIM a(2,3,4)</code> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*{{magic|81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00}} &rarr; <code>DIM a(5)</code><br />
*{{magic|81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00}} &rarr; <code>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</code><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <code>a$</code> to 0xDA <code>z$</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <code>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</code> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* {{magic|C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20}} &rarr; <code>DIM h$(15); LET h$="hello, world"</code><br />
* {{magic|D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64}} &rarr; <code>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</code><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <code>a</code> to 0xFA <code>z</code>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* {{magic|E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (before loop has run)<br />
* {{magic|E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (after loop has run)<br />
* {{magic|E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 10 STEP 2</code><br />
* {{magic|E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02}} &rarr; <code>FOR i=1.1 TO 7.7 STEP .1</code> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65536 from this if number is flagged as negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Floating point examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|91 00 00 00 00}}||65536<br />
|-<br />
|{{magic|A0 07 65 43 21}}||2271560481 (0x87654321)<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|{{magic|91 80 00 00 00}}||-65536<br />
|-<br />
|{{magic|A0 87 65 43 21}}||-2271560481 (-0x87654321)<br />
|}<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Integral examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:59:04Z<p>Kyz: /* 5-byte numeric format */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <code>F0O</code> or <code>BAR</code>. Names are case-insensitive and whitespace insensitive (<code>hello world</code> is the same variable as <code>HeLlOwOrL d</code>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <code>a</code> to 0x7A <code>z</code>)<br />
* 5 bytes: numeric value <br />
|<br />
* {{magic|61 00 00 01 00 00}} &rarr; <code>LET a=1</code><br />
* {{magic|69 00 FF 02 00 00}} &rarr; <code>LET i=-65534</code><br />
* {{magic|6A 00 00 FE FF 00}} &rarr; <code>LET j=65534</code><br />
* {{magic|62 93 3C 61 4E 00}} &rarr; <code>LET b=12345678</code><br />
** 12345678 = 0xBC614E<br />
* {{magic|63 93 BC 61 4E 00}} &rarr; <code>LET c=-12345678</code> <br />
* {{magic|65 82 2D F8 4C AD}} &rarr; <code>LET e=2.71828</code><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <code>a</code> to 0xBA <code>z</code>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* {{magic|B0 69 E5 82 49 4A F0 41}} &rarr; <code>LET pie=3.1452</code><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <code>a$</code> to 0x5A <code>z$</code>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* {{magic|41 04 00 54 45 53 54}} &rarr; <code>LET a$="TEST"</code><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <code>a</code> to 0x9A <code>z</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <code>DIM a(2,3,4)</code> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*{{magic|81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00}} &rarr; <code>DIM a(5)</code><br />
*{{magic|81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00}} &rarr; <code>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</code><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <code>a$</code> to 0xDA <code>z$</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <code>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</code> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* {{magic|C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20}} &rarr; <code>DIM h$(15); LET h$="hello, world"</code><br />
* {{magic|D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64}} &rarr; <code>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</code><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <code>a</code> to 0xFA <code>z</code>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* {{magic|E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (before loop has run)<br />
* {{magic|E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (after loop has run)<br />
* {{magic|E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 10 STEP 2</code><br />
* {{magic|E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02}} &rarr; <code>FOR i=1.1 TO 7.7 STEP .1</code> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65535 if number is negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Floating point examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|91 00 00 00 00}}||65536<br />
|-<br />
|{{magic|A0 07 65 43 21}}||2271560481 (0x87654321)<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|{{magic|91 80 00 00 00}}||-65536<br />
|-<br />
|{{magic|A0 87 65 43 21}}||-2271560481 (-0x87654321)<br />
|}<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Integral examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:53:23Z<p>Kyz: /* 5-byte numeric format */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <code>F0O</code> or <code>BAR</code>. Names are case-insensitive and whitespace insensitive (<code>hello world</code> is the same variable as <code>HeLlOwOrL d</code>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <code>a</code> to 0x7A <code>z</code>)<br />
* 5 bytes: numeric value <br />
|<br />
* {{magic|61 00 00 01 00 00}} &rarr; <code>LET a=1</code><br />
* {{magic|69 00 FF 02 00 00}} &rarr; <code>LET i=-65534</code><br />
* {{magic|6A 00 00 FE FF 00}} &rarr; <code>LET j=65534</code><br />
* {{magic|62 93 3C 61 4E 00}} &rarr; <code>LET b=12345678</code><br />
** 12345678 = 0xBC614E<br />
* {{magic|63 93 BC 61 4E 00}} &rarr; <code>LET c=-12345678</code> <br />
* {{magic|65 82 2D F8 4C AD}} &rarr; <code>LET e=2.71828</code><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <code>a</code> to 0xBA <code>z</code>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* {{magic|B0 69 E5 82 49 4A F0 41}} &rarr; <code>LET pie=3.1452</code><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <code>a$</code> to 0x5A <code>z$</code>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* {{magic|41 04 00 54 45 53 54}} &rarr; <code>LET a$="TEST"</code><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <code>a</code> to 0x9A <code>z</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <code>DIM a(2,3,4)</code> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*{{magic|81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00}} &rarr; <code>DIM a(5)</code><br />
*{{magic|81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00}} &rarr; <code>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</code><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <code>a$</code> to 0xDA <code>z$</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <code>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</code> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* {{magic|C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20}} &rarr; <code>DIM h$(15); LET h$="hello, world"</code><br />
* {{magic|D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64}} &rarr; <code>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</code><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <code>a</code> to 0xFA <code>z</code>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* {{magic|E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (before loop has run)<br />
* {{magic|E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (after loop has run)<br />
* {{magic|E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 10 STEP 2</code><br />
* {{magic|E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02}} &rarr; <code>FOR i=1.1 TO 7.7 STEP .1</code> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65535 if number is negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Floating point examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|91 00 00 00 00}}||65536<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|{{magic|91 80 00 00 00}}||-65536<br />
|-<br />
|}<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Integral examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:49:58Z<p>Kyz: /* BASIC Variables Table */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <code>F0O</code> or <code>BAR</code>. Names are case-insensitive and whitespace insensitive (<code>hello world</code> is the same variable as <code>HeLlOwOrL d</code>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <code>a</code> to 0x7A <code>z</code>)<br />
* 5 bytes: numeric value <br />
|<br />
* {{magic|61 00 00 01 00 00}} &rarr; <code>LET a=1</code><br />
* {{magic|69 00 FF 02 00 00}} &rarr; <code>LET i=-65534</code><br />
* {{magic|6A 00 00 FE FF 00}} &rarr; <code>LET j=65534</code><br />
* {{magic|62 93 3C 61 4E 00}} &rarr; <code>LET b=12345678</code><br />
** 12345678 = 0xBC614E<br />
* {{magic|63 93 BC 61 4E 00}} &rarr; <code>LET c=-12345678</code> <br />
* {{magic|65 82 2D F8 4C AD}} &rarr; <code>LET e=2.71828</code><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <code>a</code> to 0xBA <code>z</code>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* {{magic|B0 69 E5 82 49 4A F0 41}} &rarr; <code>LET pie=3.1452</code><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <code>a$</code> to 0x5A <code>z$</code>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* {{magic|41 04 00 54 45 53 54}} &rarr; <code>LET a$="TEST"</code><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <code>a</code> to 0x9A <code>z</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <code>DIM a(2,3,4)</code> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*{{magic|81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00}} &rarr; <code>DIM a(5)</code><br />
*{{magic|81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00}} &rarr; <code>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</code><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <code>a$</code> to 0xDA <code>z$</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <code>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</code> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* {{magic|C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20}} &rarr; <code>DIM h$(15); LET h$="hello, world"</code><br />
* {{magic|D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64}} &rarr; <code>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</code><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <code>a</code> to 0xFA <code>z</code>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* {{magic|E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (before loop has run)<br />
* {{magic|E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (after loop has run)<br />
* {{magic|E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 10 STEP 2</code><br />
* {{magic|E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02}} &rarr; <code>FOR i=1.1 TO 7.7 STEP .1</code> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65535 if number is negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Floating point examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|}<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Integral examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:49:21Z<p>Kyz: /* BASIC Variables Table */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <code>F0O</code> or <code>BAR</code>. Names are case-insensitive and whitespace insensitive (<code>hello world</code> is the same variable as <code>HeLlOwOrL d</code>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <code>a</code> to 0x7A <code>z</code>)<br />
* 5 bytes: numeric value <br />
|<br />
* {{magic|61 00 00 01 00 00}} &rarr; <code>LET a=1</code><br />
* {{magic|69 00 FF 02 00 00}} &rarr; <code>LET i=-65534</code><br />
* {{magic|6A 00 00 FE FF 00}} &rarr; <code>LET j=65534</code><br />
* {{magic|62 93 3C 61 4E 00}} &rarr; <code>LET b=12345678</code><br />
** 12345678 = 0xBC614E<br />
* {{magic|63 93 BC 61 4E 00}} &rarr; <code>LET c=-12345678</code> <br />
* {{magic|65 82 2D F8 4C AD}} &rarr; <code>LET e=2.71828</code><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <code>a</code> to 0xBA <code>z</code>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* {{magic|B0 69 E5 82 49 4A F0 41}} &rarr; <code>LET pie=3.1452</code><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <code>a$</code> to 0x5A <code>z$</code>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* {{magic|41 04 00 54 45 53 54}} &rarr; <code>LET a$="TEST"</code><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <code>a</code> to 0x9A <code>z</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <code>DIM a(2,3,4)</code> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*{{magic|81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00}} &rarr; <code>DIM a(5)</code><br />
*{{magic|81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00}} &rarr; <code>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</code><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <code>a$</code> to 0xDA <code>z$</code>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <code>0A 00</code> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <code>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</code> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* {{magic|C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20</code>; &rarr; <code>DIM h$(15); LET h$="hello, world"</code><br />
* {{magic|D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64}} &rarr; <code>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</code><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <code>a</code> to 0xFA <code>z</code>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* {{magic|E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (before loop has run)<br />
* {{magic|E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 5</code> (after loop has run)<br />
* {{magic|E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02}} &rarr; <code>FOR i=1 TO 10 STEP 2</code><br />
* {{magic|E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02}} &rarr; <code>FOR i=1.1 TO 7.7 STEP .1</code> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65535 if number is negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Floating point examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|}<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Integral examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:46:22Z<p>Kyz: /* 5-byte numeric format */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <tt>F0O</tt> or <tt>BAR</tt>. Names are case-insensitive and whitespace insensitive (<tt>hello world</tt> is the same variable as <tt>HeLlOwOrL d</tt>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <tt>a</tt> to 0x7A <tt>z</tt>)<br />
* 5 bytes: numeric value <br />
|<br />
* <tt>61 00 00 01 00 00</tt> &rarr; <tt>LET a=1</tt><br />
* <tt>69 00 FF 02 00 00</tt> &rarr; <tt>LET i=-65534</tt><br />
* <tt>6A 00 00 FE FF 00</tt> &rarr; <tt>LET j=65534</tt><br />
* <tt>62 93 3C 61 4E 00</tt> &rarr; <tt>LET b=12345678</tt><br />
** 12345678 = 0xBC614E<br />
* <tt>63 93 BC 61 4E 00</tt> &rarr; <tt>LET c=-12345678</tt> <br />
* <tt>65 82 2D F8 4C AD</tt> &rarr; <tt>LET e=2.71828</tt><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <tt>a</tt> to 0xBA <tt>z</tt>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* <tt>B0 69 E5 82 49 4A F0 41</tt> &rarr; <tt>LET pie=3.1452</tt><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <tt>a$</tt> to 0x5A <tt>z$</tt>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* <tt>41 04 00 54 45 53 54</tt> &rarr; <tt>LET a$="TEST"</tt><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <tt>a</tt> to 0x9A <tt>z</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <tt>DIM a(2,3,4)</tt> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*<tt>81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</tt> &rarr; <tt>DIM a(5)</tt><br />
*<tt>81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00</tt> &rarr; <tt>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</tt><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <tt>a$</tt> to 0xDA <tt>z$</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <tt>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</tt> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* <tt>C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20</tt>; &rarr; <tt>DIM h$(15); LET h$="hello, world"</tt><br />
* <tt>D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64</tt> &rarr; <tt>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</tt><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <tt>a</tt> to 0xFA <tt>z</tt>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* <tt>E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (before loop has run)<br />
* <tt>E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (after loop has run)<br />
* <tt>E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 10 STEP 2</tt><br />
* <tt>E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02</tt> &rarr; <tt>FOR i=1.1 TO 7.7 STEP .1</tt> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65535 if number is negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Floating point examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|}<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Integral examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:45:53Z<p>Kyz: /* 5-byte numeric format */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <tt>F0O</tt> or <tt>BAR</tt>. Names are case-insensitive and whitespace insensitive (<tt>hello world</tt> is the same variable as <tt>HeLlOwOrL d</tt>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <tt>a</tt> to 0x7A <tt>z</tt>)<br />
* 5 bytes: numeric value <br />
|<br />
* <tt>61 00 00 01 00 00</tt> &rarr; <tt>LET a=1</tt><br />
* <tt>69 00 FF 02 00 00</tt> &rarr; <tt>LET i=-65534</tt><br />
* <tt>6A 00 00 FE FF 00</tt> &rarr; <tt>LET j=65534</tt><br />
* <tt>62 93 3C 61 4E 00</tt> &rarr; <tt>LET b=12345678</tt><br />
** 12345678 = 0xBC614E<br />
* <tt>63 93 BC 61 4E 00</tt> &rarr; <tt>LET c=-12345678</tt> <br />
* <tt>65 82 2D F8 4C AD</tt> &rarr; <tt>LET e=2.71828</tt><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <tt>a</tt> to 0xBA <tt>z</tt>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* <tt>B0 69 E5 82 49 4A F0 41</tt> &rarr; <tt>LET pie=3.1452</tt><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <tt>a$</tt> to 0x5A <tt>z$</tt>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* <tt>41 04 00 54 45 53 54</tt> &rarr; <tt>LET a$="TEST"</tt><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <tt>a</tt> to 0x9A <tt>z</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <tt>DIM a(2,3,4)</tt> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*<tt>81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</tt> &rarr; <tt>DIM a(5)</tt><br />
*<tt>81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00</tt> &rarr; <tt>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</tt><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <tt>a$</tt> to 0xDA <tt>z$</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <tt>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</tt> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* <tt>C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20</tt>; &rarr; <tt>DIM h$(15); LET h$="hello, world"</tt><br />
* <tt>D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64</tt> &rarr; <tt>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</tt><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <tt>a</tt> to 0xFA <tt>z</tt>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* <tt>E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (before loop has run)<br />
* <tt>E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (after loop has run)<br />
* <tt>E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 10 STEP 2</tt><br />
* <tt>E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02</tt> &rarr; <tt>FOR i=1.1 TO 7.7 STEP .1</tt> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65535 if number is negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Floating examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|}<br />
|valign="top"|<br />
{|class="wikitable"<br />
|+Integral examples<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:45:10Z<p>Kyz: /* 5-byte numeric format */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <tt>F0O</tt> or <tt>BAR</tt>. Names are case-insensitive and whitespace insensitive (<tt>hello world</tt> is the same variable as <tt>HeLlOwOrL d</tt>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <tt>a</tt> to 0x7A <tt>z</tt>)<br />
* 5 bytes: numeric value <br />
|<br />
* <tt>61 00 00 01 00 00</tt> &rarr; <tt>LET a=1</tt><br />
* <tt>69 00 FF 02 00 00</tt> &rarr; <tt>LET i=-65534</tt><br />
* <tt>6A 00 00 FE FF 00</tt> &rarr; <tt>LET j=65534</tt><br />
* <tt>62 93 3C 61 4E 00</tt> &rarr; <tt>LET b=12345678</tt><br />
** 12345678 = 0xBC614E<br />
* <tt>63 93 BC 61 4E 00</tt> &rarr; <tt>LET c=-12345678</tt> <br />
* <tt>65 82 2D F8 4C AD</tt> &rarr; <tt>LET e=2.71828</tt><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <tt>a</tt> to 0xBA <tt>z</tt>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* <tt>B0 69 E5 82 49 4A F0 41</tt> &rarr; <tt>LET pie=3.1452</tt><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <tt>a$</tt> to 0x5A <tt>z$</tt>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* <tt>41 04 00 54 45 53 54</tt> &rarr; <tt>LET a$="TEST"</tt><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <tt>a</tt> to 0x9A <tt>z</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <tt>DIM a(2,3,4)</tt> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*<tt>81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</tt> &rarr; <tt>DIM a(5)</tt><br />
*<tt>81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00</tt> &rarr; <tt>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</tt><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <tt>a$</tt> to 0xDA <tt>z$</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <tt>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</tt> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* <tt>C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20</tt>; &rarr; <tt>DIM h$(15); LET h$="hello, world"</tt><br />
* <tt>D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64</tt> &rarr; <tt>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</tt><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <tt>a</tt> to 0xFA <tt>z</tt>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* <tt>E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (before loop has run)<br />
* <tt>E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (after loop has run)<br />
* <tt>E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 10 STEP 2</tt><br />
* <tt>E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02</tt> &rarr; <tt>FOR i=1.1 TO 7.7 STEP .1</tt> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65535 if number is negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
{|<br />
|<br />
{|class="wikitable"<br />
|+Floating point examples<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|}<br />
|<br />
{|class="wikitable"<br />
|+Integral examples<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:44:03Z<p>Kyz: /* 5-byte numeric format */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <tt>F0O</tt> or <tt>BAR</tt>. Names are case-insensitive and whitespace insensitive (<tt>hello world</tt> is the same variable as <tt>HeLlOwOrL d</tt>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <tt>a</tt> to 0x7A <tt>z</tt>)<br />
* 5 bytes: numeric value <br />
|<br />
* <tt>61 00 00 01 00 00</tt> &rarr; <tt>LET a=1</tt><br />
* <tt>69 00 FF 02 00 00</tt> &rarr; <tt>LET i=-65534</tt><br />
* <tt>6A 00 00 FE FF 00</tt> &rarr; <tt>LET j=65534</tt><br />
* <tt>62 93 3C 61 4E 00</tt> &rarr; <tt>LET b=12345678</tt><br />
** 12345678 = 0xBC614E<br />
* <tt>63 93 BC 61 4E 00</tt> &rarr; <tt>LET c=-12345678</tt> <br />
* <tt>65 82 2D F8 4C AD</tt> &rarr; <tt>LET e=2.71828</tt><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <tt>a</tt> to 0xBA <tt>z</tt>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* <tt>B0 69 E5 82 49 4A F0 41</tt> &rarr; <tt>LET pie=3.1452</tt><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <tt>a$</tt> to 0x5A <tt>z$</tt>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* <tt>41 04 00 54 45 53 54</tt> &rarr; <tt>LET a$="TEST"</tt><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <tt>a</tt> to 0x9A <tt>z</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <tt>DIM a(2,3,4)</tt> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*<tt>81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</tt> &rarr; <tt>DIM a(5)</tt><br />
*<tt>81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00</tt> &rarr; <tt>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</tt><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <tt>a$</tt> to 0xDA <tt>z$</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <tt>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</tt> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* <tt>C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20</tt>; &rarr; <tt>DIM h$(15); LET h$="hello, world"</tt><br />
* <tt>D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64</tt> &rarr; <tt>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</tt><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <tt>a</tt> to 0xFA <tt>z</tt>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* <tt>E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (before loop has run)<br />
* <tt>E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (after loop has run)<br />
* <tt>E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 10 STEP 2</tt><br />
* <tt>E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02</tt> &rarr; <tt>FOR i=1.1 TO 7.7 STEP .1</tt> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535. Subtract 65535 if number is negative<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
<br />
Examples<br />
<br />
{|class="wikitable"<br />
!Representation!!Value<br />
|-<br />
|{{magic|7F 7F FF FF FF}}||0.5<br />
|-<br />
|{{magic|7E 7F FF FF FF}}||0.25<br />
|-<br />
|{{magic|7D 7F FF FF FF}}||0.125<br />
|-<br />
|{{magic|7F FF FF FF FF}}||-0.5<br />
|-<br />
|{{magic|7E FF FF FF FF}}||-0.25<br />
|-<br />
|{{magic|7D FF FF FF FF}}||-0.125<br />
|-<br />
|{{magic|00 FF 01 00 00}}||-65535<br />
|-<br />
|{{magic|00 FF 02 00 00}}||-65534<br />
|-<br />
|{{magic|00 FF FE FF 00}}||-2<br />
|-<br />
|{{magic|00 FF FF FF 00}}||-1<br />
|-<br />
|{{magic|00 00 00 00 00}}||0<br />
|-<br />
|{{magic|00 00 00 00 00}}||1<br />
|-<br />
|{{magic|00 00 00 00 00}}||2<br />
|-<br />
|{{magic|00 00 FE FF 00}}||65534<br />
|-<br />
|{{magic|00 00 FF FF 00}}||65535<br />
|-<br />
|}<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_fileSinclair BASIC tokenized file2018-05-12T14:23:09Z<p>Kyz: /* BASIC Variables Table */</p>
<hr />
<div>{{FormatInfo<br />
|subcat=Source code<br />
|subcat2=Tokenized BASIC<br />
}}<br />
<br />
'''Sinclair BASIC''' is a dialect of the BASIC programming language created by Nine Tiles Networks Ltd and used in the 8-bit home computers from Sinclair Research and Timex Sinclair.<br />
<br />
The original 4KB version was developed for the Sinclair ZX80, followed by an 8KB version for the ZX81 and 16KB version for ZX Spectrum.<br />
<br />
Some unusual features of the Sinclair BASIC:<br />
* There were keys on the keyboard for each BASIC keyword. For example, pressing P caused the entire command PRINT to appear. Some commands needed multiple keypresses to enter, For example, BEEP was keyed by pressing CAPS SHIFT plus SYMBOL SHIFT to access extended mode, keeping SYMBOL SHIFT held down and pressing Z. <br />
* When programs were SAVEd, the file written to disk or tape contained all of BASIC's internal state information, including the values of any defined basic variables, as well as the BASIC tokens. <br />
<br />
=== BASIC File Layout ===<br />
On a ZX81, a saved BASIC file is a snapshot of the computer memory from memory location 16393 through to the end of the variable table. There is no header.<br />
<br />
{| class="wikitable"<br />
! title="Memory Address" | Address<br />
! title="Name" | Name<br />
! title="Description" |Description<br />
|-<br />
<br />
|16393||VERSN ||0 Identifies ZX81 BASIC in saved programs.<br />
|-<br />
|16394||E_PPC||Number of current line (with program cursor).<br />
|-<br />
|16396||D_FILE||Pointer to the start of the 'Display file', i.e. what is being displayed on screen<br />
|-<br />
|16398||DF_CC||Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.<br />
|-<br />
|16400||VARS||Pointer to start of BASIC Variable table<br />
|-<br />
|16402||DEST||Address of variable in assignment.<br />
|-<br />
|16404||E_LINE||Pointer to line currently being entered<br />
|-<br />
|16406||CH_ADD||Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.<br />
|-<br />
|16408||X_PTR||Address of the character preceding the marker.<br />
|-<br />
|16410||STKBOT||pointer to start (bottom) of stack<br />
|-<br />
|16412||STKEND||pointer to end (top) of stack<br />
|-<br />
|16414||BERG||Calculator's b register.<br />
|-<br />
|16415||MEM||Address of area used for calculator's memory. (Usually MEMBOT, but not always.)<br />
|-<br />
|16417|| ||not used <br />
|-<br />
|16418||DF_SZ||The number of lines (including one blank line) in the lower part of the screen.<br />
|-<br />
|16419||S_TOP||The number of the top program line in automatic listings.<br />
|-<br />
|16421||LAST_K||Shows which keys pressed.<br />
|- <br />
|16423|| || Debounce status of keyboard.<br />
|-<br />
|16424||MARGIN||Number of blank lines above or below picture: 55 in Britain, 31 in America.<br />
|-<br />
|16425||NXTLIN||Address of next program line to be executed.<br />
|-<br />
|16427||OLDPPC||Line number of which CONT jumps.<br />
|-<br />
|16429||FLAGX||Various flags.<br />
|-<br />
|16430||STRLEN||Length of string type destination in assignment.<br />
|-<br />
|16432||T_ADDR||Address of next item in syntax table (very unlikely to be useful).<br />
|-<br />
|16434||SEED||The seed for RND. This is the variable that is set by RAND.<br />
|-<br />
|16436||FRAMES||Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame set to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets to 0 bit 15, & puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops. If the pause stops because of a key depression, bit 15 is set to 1 again.<br />
|-<br />
|16438||COORDS||x-coordinate of last point PLOTted.<br />
|-<br />
|16439|| || y-coordinate of last point PLOTted.<br />
|-<br />
|16440||PR_CC||Less significant byte of address of next position for LPRINT to print as (in PRBUFF).<br />
|-<br />
|16441||S_POSN||Column number for PRINT position.<br />
|-<br />
|16442|| ||Line number for PRINT position.<br />
|-<br />
|16443||CDFLAG||Various flags. Bit 7 is on (1) during compute & display mode.<br />
|-<br />
|16444||PRBUFF||Printer buffer (33rd character is NEWLINE).<br />
|-<br />
|16477||MEMBOT||Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.<br />
|-<br />
|16507|| || not used<br />
|-<br />
|16509|| || First BASIC line.<br />
|}<br />
<br />
=== BASIC lines ===<br />
<br />
Each BASIC line is stored as:<br />
<br />
* 2 byte line number (in [[Endianness|big-endian]] format)<br />
* 2 byte length of text including NEWLINE (in little endian format, length "excludes" the line number and length, i.e. to skip between lines you add "length of text" +4 bytes.<br />
* text (BASIC tokens)<br />
* NEWLINE (0x76)<br />
<br />
When a numeric constant is included in the text of a BASIC line, an ASCII string displaying the constant value will be inserted, followed by the token 0x7E, and the next 5 bytes are the value of the constant in floating point format.<br />
<br />
=== BASIC Variables Table ===<br />
Following the last BASIC line comes the variables table. Each entry in this table is of varying length and format.<br />
<br />
The first byte in each entry is the variable name, of which the upper 3 bits indicate the variable type.<br />
<br />
Most types of variables can only have a one-character name: A to Z for numerics, A$ to Z$ for strings. Numeric variables can have a multi-character names beginning with A-Z and continuing with A-Z or 0-9, e.g. <tt>F0O</tt> or <tt>BAR</tt>. Names are case-insensitive and whitespace insensitive (<tt>hello world</tt> is the same variable as <tt>HeLlOwOrL d</tt>). Numeric variables and FOR-NEXT control variables share the same namespace, but no other types do. Numeric variable A, string variable A$, numeric array A(10) and string array A$(10) can all coexist under the name "A"<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap7.html</ref><br />
<br />
{| class="wikitable"<br />
!First byte!!Format!!Examples<br />
|-<br />
|011nnnnn<br />
|numeric variable<br />
* 1 byte: variable name (0x61 <tt>a</tt> to 0x7A <tt>z</tt>)<br />
* 5 bytes: numeric value <br />
|<br />
* <tt>61 00 00 01 00 00</tt> &rarr; <tt>LET a=1</tt><br />
* <tt>69 00 FF 02 00 00</tt> &rarr; <tt>LET i=-65534</tt><br />
* <tt>6A 00 00 FE FF 00</tt> &rarr; <tt>LET j=65534</tt><br />
* <tt>62 93 3C 61 4E 00</tt> &rarr; <tt>LET b=12345678</tt><br />
** 12345678 = 0xBC614E<br />
* <tt>63 93 BC 61 4E 00</tt> &rarr; <tt>LET c=-12345678</tt> <br />
* <tt>65 82 2D F8 4C AD</tt> &rarr; <tt>LET e=2.71828</tt><br />
|-<br />
|101nnnnn<br />
|numeric variable with multi-character name<br />
* 1 byte: first character of variable name (0xA1 <tt>a</tt> to 0xBA <tt>z</tt>)<br />
* n bytes: remainder of name (A-Z, a-z, 0-9 allowed, final character has high bit set)<br />
* 5 bytes: numeric value<br />
|<br />
* <tt>B0 69 E5 82 49 4A F0 41</tt> &rarr; <tt>LET pie=3.1452</tt><br />
** "p"=0x10 ORed with 0xA0<br />
** "i" is regular ASCII (0x69)<br />
** "e" is regular ASCII (0x65) ORed with 0x80 to indicate the end of the variable name<br />
|-<br />
|010nnnnn<br />
|string variable<br />
* 1 byte: variable name (0x41 <tt>a$</tt> to 0x5A <tt>z$</tt>)<br />
* 2 bytes: little-endian string length (''n'')<br />
* ''n'' bytes: string value (the character set is mostly ASCII)<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanappa.html</ref><br />
|<br />
* <tt>41 04 00 54 45 53 54</tt> &rarr; <tt>LET a$="TEST"</tt><br />
|-<br />
|100nnnnn<br />
|numeric array<br />
* 1 byte: array name (0x81 <tt>a</tt> to 0x9A <tt>z</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 5-byte number) in C-style order, iterating rightmost index first and the leftmost index last, e.g. <tt>DIM a(2,3,4)</tt> will store values in this order: a(1,1,1), a(1,1,2), a(1,1,3), (1,1,4), a(1,2,1), a(1,2,2), a(1,2,3), a(1,2,4), a(1,3,1), a(1,3,2), a(1,3,3), a(1,3,4), a(2,1,1), ...<br />
|<br />
*<tt>81 1C 00 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</tt> &rarr; <tt>DIM a(5)</tt><br />
*<tt>81 19 00 02 02 00 02 00 00 00 01 00 00 00 00 02 00 00 00 00 03 00 00 00 00 04 00 00</tt> &rarr; <tt>DIM a(2,2); LET a(1,1)=1; LET a(1,2)=2; LET a(2,1)=3; LET a(2,2)=4</tt><br />
|<br />
|-<br />
|110nnnnn<br />
|character array<br />
* 1 byte: array name (0xC1 <tt>a$</tt> to 0xDA <tt>z$</tt>)<br />
* 2 bytes: little-endian size of data to follow in bytes, so you can easily skip to the next variable without computing full array size<br />
* 1 byte: number of dimensions in the array (1-255?)<br />
* 2 bytes: little-endian valid range of first dimension e.g. <tt>0A 00</tt> is valid range 1-10<br />
* ... 2 bytes more for every other dimension to declare the rest of the dimension ranges<br />
* ... array values (each a 1-byte character) in C-style order, iterating rightmost index first and the leftmost index last<br />
<br />
A single-dimensional character array acts like a string, but has a fixed length. If it is set to a shorter string, the remaining space in the array will be padded with spaces (0x20). In general, an ''n'' dimensional character array where n>1 acts like an ''n''-1 dimensional string array, e.g. <tt>DIM a$(5,10); LET a$(1)="FOO"; LET a$(2)="BAR"</tt> is valid, and sets a$(1,1) to a$(1,10) to "FOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", and sets a$(2,1) to a$(2,10) to "BAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<br />
|<br />
* <tt>C8 12 00 01 0F 00 68 65 6C 6C 6F 2C 20 77 6F 72 6C 64 20 20 20</tt>; &rarr; <tt>DIM h$(15); LET h$="hello, world"</tt><br />
* <tt>D7 0F 00 02 02 00 05 00 68 65 6C 6C 6F 77 6F 72 6C 64</tt> &rarr; <tt>DIM w$(2,5); LET w$(1)="hello"; LET w$(2)="world"</tt><br />
|-<br />
|111nnnnnn<br />
|control variable of a FOR-NEXT loop.<br />
* 1 byte: variable name (0xE1 <tt>a</tt> to 0xFA <tt>z</tt>)<br />
* 5 bytes: current value (number)<br />
* 5 bytes: loop end limit (number)<br />
* 5 bytes: loop step increment (number)<br />
* 2 bytes: little-endian line number where the FOR loop was started (or 0xFEFF if started from the command line)<br />
* 1 byte: unknown purpose, usually 2?<br />
|<br />
* <tt>E9 00 00 01 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (before loop has run)<br />
* <tt>E9 00 00 06 00 00 00 00 05 00 00 00 00 01 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 5</tt> (after loop has run)<br />
* <tt>E9 00 00 01 00 00 00 00 0A 00 00 00 00 02 00 00 FF FE 02</tt> &rarr; <tt>FOR i=1 TO 10 STEP 2</tt><br />
* <tt>E9 81 0C CC CC CD 83 76 66 66 66 7D 4C CC CC CC FE FF 02</tt> &rarr; <tt>FOR i=1.1 TO 7.7 STEP .1</tt> <br />
|}<br />
<br />
==== 5-byte numeric format ====<br />
Numbers have one of two formats:<ref>http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html</ref> integers between -65535 and +65535 (inclusive) are in an "integral" format, while all other numbers are in "floating point" format. The value 0 can't be represented by the floating point format, so is always stored as an integral.<br />
<br />
With "integral" format:<br />
* 1 byte: always 0<br />
* 1 byte: 0 if the number is positive or -1 (0xFF) if the number is negative<br />
* 2 bytes: little-endian unsigned integer from 0 to 65535<br />
* 1 byte: always 0<br />
<br />
With "floating point" format:<br />
* 1 byte: exponent + 128 (0 &rarr; e=-128, 255 &rarr; e=127)<br />
* 4 bytes: big-endian mantissa<br />
<br />
The number has to be normalised so that its most significant mantissa bit is ''always'' 1. This bit is then assumed to be 1 and is overwritten with a sign bit: cleared to 0 for positive numbers and set to 1 for negative numbers<br />
<br />
=== ZX81 BASIC Tokens ===<br />
{|<br />
{| class="wikitable"<br />
! title="Token" | Token (Decimal)<br />
! title="Description" |Description<br />
<br />
|-<br />
|0||<br />
|-<br />
|11||"<br />
|-<br />
|12||£<br />
|-<br />
|13||$<br />
|-<br />
|14||:<br />
|-<br />
|15||?<br />
|-<br />
|16||(<br />
|-<br />
|17||)<br />
|-<br />
|18||><br />
|-<br />
|19||<<br />
|-<br />
|20||=<br />
|-<br />
|21||+<br />
|-<br />
|22||-<br />
|-<br />
|23||*<br />
|-<br />
|24||/<br />
|-<br />
|25||;<br />
|-<br />
|26||,<br />
|-<br />
|27||.<br />
|-<br />
|28||0<br />
|-<br />
|29||1<br />
|-<br />
|30||2<br />
|-<br />
|31||3<br />
|-<br />
|32||4<br />
|-<br />
|33||5<br />
|-<br />
|34||6<br />
|-<br />
|35||7<br />
|-<br />
|36||8<br />
|-<br />
|37||9<br />
|-<br />
|38||A<br />
|-<br />
|39||B<br />
|-<br />
|40||C<br />
|-<br />
|41||D<br />
|-<br />
|42||E<br />
|-<br />
|43||F<br />
|-<br />
|44||G<br />
|-<br />
|45||H<br />
|-<br />
|46||I<br />
|-<br />
|47||J<br />
|-<br />
|48||K<br />
|-<br />
|49||L<br />
|-<br />
|50||M<br />
|-<br />
|51||N<br />
|-<br />
|52||O<br />
|-<br />
|53||P<br />
|-<br />
|54||Q<br />
|-<br />
|55||R<br />
|-<br />
|56||S<br />
|-<br />
|57||T<br />
|-<br />
|58||U<br />
|-<br />
|59||V<br />
|-<br />
|60||W<br />
|-<br />
|61||X<br />
|-<br />
|62||Y<br />
|-<br />
|63||Z<br />
|-<br />
|64||RND<br />
|-<br />
|65||INKEY$<br />
|-<br />
|66||PI<br />
|-<br />
|112||<cursor up><br />
|-<br />
|113||<cursor down><br />
|-<br />
|114||<cursor left><br />
|-<br />
|115||<cursor right><br />
|-<br />
|116||GRAPHICS<br />
|-<br />
|117||EDIT<br />
|-<br />
|118||NEWLINE<br />
|-<br />
|119||RUBOUT<br />
|-<br />
|120||/<br />
|-<br />
|121||FUNCTION<br />
|-<br />
|127||cursor<br />
|-<br />
|128||<br />
|-<br />
|139||"<br />
|-<br />
|140||£<br />
|-<br />
|141||$<br />
|-<br />
|142||:<br />
|-<br />
|143||?<br />
|-<br />
|144||(<br />
|-<br />
|145||)<br />
|-<br />
|146||><br />
|-<br />
|147||<<br />
|-<br />
|148||=<br />
|-<br />
|149||+<br />
|-<br />
|150||-<br />
|-<br />
|151||*<br />
|-<br />
|152||/<br />
|-<br />
|153||;<br />
|-<br />
|154|||-<br />
|-<br />
|155||.<br />
|-<br />
|156||0<br />
|-<br />
|157||1<br />
|-<br />
|158||2<br />
|-<br />
|159||3<br />
|-<br />
|160||4<br />
|-<br />
|161||5<br />
|-<br />
|162||6<br />
|-<br />
|163||7<br />
|-<br />
|164||8<br />
|-<br />
|165||9<br />
|-<br />
|166||A<br />
|-<br />
|167||B<br />
|-<br />
|168||C<br />
|-<br />
|169||D<br />
|-<br />
|170||E<br />
|-<br />
|171||F<br />
|-<br />
|172||G<br />
|-<br />
|173||H<br />
|-<br />
|174||I<br />
|-<br />
|175||J<br />
|-<br />
|176||K<br />
|-<br />
|177||L<br />
|-<br />
|178||M<br />
|-<br />
|179||N<br />
|-<br />
|180||O<br />
|-<br />
|181||P<br />
|-<br />
|182||Q<br />
|-<br />
|183||R<br />
|-<br />
|184||S<br />
|-<br />
|185||T<br />
|-<br />
|186||U<br />
|-<br />
|187||V<br />
|-<br />
|188||W<br />
|-<br />
|189||X<br />
|-<br />
|190||Y<br />
|-<br />
|191||Z<br />
|-<br />
|192||""<br />
|-<br />
|193||AT<br />
|-<br />
|194||TAB<br />
|-<br />
|195||?<br />
|-<br />
|196||CODE<br />
|-<br />
|197||VAL<br />
|-<br />
|198||LEN<br />
|-<br />
|199||SIN<br />
|-<br />
|200||COS<br />
|-<br />
|201||TAN<br />
|-<br />
|202||ASN<br />
|-<br />
|203||ACS<br />
|-<br />
|204||ATN<br />
|-<br />
|205||LN<br />
|-<br />
|206||EXP<br />
|-<br />
|207||INT<br />
|-<br />
|208||SQR<br />
|-<br />
|209||SGN<br />
|-<br />
|210||ABS<br />
|-<br />
|211||PEEK<br />
|-<br />
|212||USR<br />
|-<br />
|213||STR$<br />
|-<br />
|214||CHR$<br />
|-<br />
|215||NOT<br />
|-<br />
|216||**<br />
|-<br />
|217||OR<br />
|-<br />
|218||AND<br />
|-<br />
|219||<=<br />
|-<br />
|220||>=<br />
|-<br />
|221||<><br />
|-<br />
|222||THEN<br />
|-<br />
|223||TO<br />
|-<br />
|224||STEP<br />
|-<br />
|225||LPRINT<br />
|-<br />
|226||LLIST<br />
|-<br />
|227||STOP<br />
|-<br />
|228||SLOW<br />
|-<br />
|229||FAST<br />
|-<br />
|230||NEW<br />
|-<br />
|231||SCROLL<br />
|-<br />
|232||CONT<br />
|-<br />
|233||DIM<br />
|-<br />
|234||REM<br />
|-<br />
|235||FOR<br />
|-<br />
|236||GOTO<br />
|-<br />
|237||GOSUB<br />
|-<br />
|238||INPUT<br />
|-<br />
|239||LOAD<br />
|-<br />
|240||LIST<br />
|-<br />
|241||LET<br />
|-<br />
|242||PAUSE<br />
|-<br />
|243||NEXT<br />
|-<br />
|244||POKE<br />
|-<br />
|245||PRINT<br />
|-<br />
|246||PLOT<br />
|-<br />
|247||RUN<br />
|-<br />
|248||SAVE<br />
|-<br />
|249||RAND<br />
|-<br />
|250||IF<br />
|-<br />
|251||CLS<br />
|-<br />
|252||UNPLOT<br />
|-<br />
|253||CLEAR<br />
|-<br />
|254||RETURN<br />
|-<br />
|255||COPY<br />
<br />
|}<br />
<br />
=== Links and references ===<br />
* [http://www.worldofspectrum.org/ZX81BasicProgramming/ ZX81 BASIC Programming]<br />
* [http://www.trustedreviews.com/sinclair-zx81_Desktop-PC_review Sinclair ZX81 review (2012)]<br />
* [http://www.old-computers.com/museum/docs.asp?c=263 Sinclair ZX81 BASIC Programming Manual]<br />
<references/><br />
<br />
[[Category:ZX Spectrum]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-12T11:16:47Z<p>Kyz: /* Loadable format */</p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Structure ==<br />
=== Loadable format ===<br />
Hunks themselves can contain optional ''blocks'', for code relocations and debug symbols.<br />
<br />
All Amiga programs share the same address space and are loaded to wherever there is free memory. They cannot be loaded to specific absolute addresses. This means code must either be written in a position-independent fashion, or it can use ''relocation'' blocks to specify where the loader has to fix up absolute address references.<br />
<br />
Amiga programs do their own dynamic linking with OS functions such as <tt>OpenLibrary</tt>, which loads and returns a pointer to a shared library, whose functions can then be executed by jumping to specific offsets from the pointer. This is unlike Windows and UNIX where the loader is expected to fetch and link in other libraries while loading the program.<br />
<br />
The loadable format is limited compared to the object code format. Many types of hunk and block are intentionally unrecognised by the AmigaOS <tt>LoadSeg()</tt> function in order to keep the core OS complexity low. The format is as follows:<br />
<br />
* A fixed header (HUNK_HEADER) including a count of all hunks to follow and their lengths<br />
* One or more HUNK_CODE, HUNK_DATA or HUNK_BSS hunks, each of which comprises:<br />
** The code/data for a code/data hunk<br />
** Zero or more blocks for this hunk: all can have HUNK_SYMBOL or HUNK_DEBUG blocks. Code/data can also have HUNK_RELOC32, HUNK_RELOC32SHORT, HUNK_DREL32 or HUNK_ABSRELOC16 relocation blocks<br />
** Hunks always end with a HUNK_END block<br />
<br />
The load format also supports ''overlays'' (HUNK_OVERLAY and HUNK_BREAK), where the file is not fully loaded, but control is passed to an ''overlay manager'', which can then decide to load or unload hunks at any time, allowing a program to be much larger than would fit in memory, provided the program can keep track of which of its parts need to be in RAM at any given them. There is a "standard" overlay manager and overlay format, but programs do not have to use it.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-12T11:14:39Z<p>Kyz: /* Structure */</p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Structure ==<br />
=== Loadable format ===<br />
Hunks themselves can contain optional ''blocks'', for code relocations and debug symbols.<br />
<br />
All Amiga programs share the same address space and are loaded to wherever there is free memory. They cannot be loaded to specific absolute addresses. This means code must either be written in a position-independent fashion, or it can use ''relocation'' blocks to specify where the loader has to fix up absolute address references.<br />
<br />
Amiga programs do their own dynamic linking with OS functions such as <tt>OpenLibrary</tt>, which loads and returns a pointer to a shared library, whose functions can then be executed by jumping to specific offsets from the pointer. This is unlike Windows and UNIX where the loader is expected to fetch and link in other libraries while loading the program.<br />
<br />
The loadable format is limited compared to the object code format. Many types of hunk and block are intentionally unrecognised by the AmigaOS <tt>LoadSeg()</tt> function in order to keep the core OS complexity low. The format is as follows:<br />
<br />
* A fixed header (HUNK_HEADER) including a count of all hunks to follow and their lengths<br />
* One or more HUNK_CODE, HUNK_DATA or HUNK_BSS hunks, each of which comprises:<br />
** The code/data for a code/data hunk<br />
** Zero or more blocks for this hunk: all can have HUNK_SYMBOL, HUNK_DEBUG. Code/data can also have HUNK_RELOC32, HUNK_RELOC32SHORT, HUNK_DREL32, HUNK_ABSRELOC16 relocations<br />
** Hunks always end with a HUNK_END block<br />
<br />
The load format also supports ''overlays'' (HUNK_OVERLAY and HUNK_BREAK), where the file is not fully loaded, but control is passed to an ''overlay manager'', which can then decide to load or unload hunks at any time, allowing a program to be much larger than would fit in memory, provided the program can keep track of which of its parts need to be in RAM at any given them. There is a "standard" overlay manager and overlay format, but programs do not have to use it.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T13:16:37Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Structure ==<br />
The loadable format begins with a fixed header, followed by a series of ''hunks''. each one of which is considered an independent ''segment'' by AmigaDOS. These hunks can either be code, data, or zeroed memory (BSS).<br />
<br />
Hunks themselves can contain optional ''blocks'', including code relocations and debug symbols.<br />
<br />
All Amiga programs share the same address space and are loaded to wherever there is free memory. They cannot be loaded to specific absolute addresses. This means code must either be written in a position-independent fashion, or it can use ''relocation'' blocks to specify where the loader has to fix up absolute address references.<br />
<br />
Amiga programs do their own dynamic linking with OS functions such as <tt>OpenLibrary</tt>, which loads and returns a pointer to a shared library, whose functions can then be executed by jumping to specific offsets from the pointer. This is unlike Windows and UNIX where the loader is expected to fetch and link in other libraries while loading the program.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T13:09:37Z<p>Kyz: /* Structure */</p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Structure ==<br />
The loadable format begins with a fixed header, followed by a series of ''hunks''. each one of which is considered an independent ''segment'' by AmigaDOS. These hunks can either be code, data, or uninitialised memory (BSS).<br />
<br />
Hunks themselves can contain optional ''blocks'', including code relocations and debug symbols.<br />
<br />
All Amiga programs share the same address space and are loaded to wherever there is free memory. They cannot be loaded to specific absolute addresses. This means code must either be written in a position-independent fashion, or it can use ''relocation'' blocks to specify where the loader has to fix up absolute address references to other parts of the code.<br />
<br />
Amiga programs do their own dynamic linking with OS functions such as <tt>OpenLibrary</tt>, which loads and returns a pointer to a shared library, whose functions can then be executed by jumping to specific offsets from the pointer. This is unlike Windows and UNIX where the loader is expected to fetch and link in other libraries while loading the program.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T13:00:32Z<p>Kyz: /* Structure */</p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Structure ==<br />
The format begins with a fixed header, followed by a series of ''hunks'' which can contain different types of data, such as code, data, uninitialised memory reservations (BSS), code relocations, debug symbols and so on.<br />
<br />
All Amiga programs share the same address space and are loaded to wherever there is free memory. They cannot be loaded to specific absolute addresses. This means code must either be written in a position-independent fashion, or it can use ''relocation'' hunks to specify where the loader has to fix up absolute address references to other parts of the code.<br />
<br />
Amiga programs do their own dynamic linking with OS functions such as <tt>OpenLibrary</tt>, which loads and returns a pointer to a shared library, whose functions can then be executed by jumping to specific offsets from the pointer. This is unlike Windows and UNIX where the loader is expected to fetch and link in other libraries while loading the program.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Atari_SoundHeaderAtari SoundHeader2018-05-10T12:52:32Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|sndh}}<br />
}}<br />
<br />
== Description ==<br />
<br />
The SNDH / Atari SoundHeader format was created by Jochen Knaus, aka BDC of the Atari ST demo group Aura, in an attempt to standardise chip music formats and playback for the Atari ST. A '''.sndh''' file consists of the original song, a replayer for that format and a header containing a unified calling interface and metadata about the music.<br />
<br />
== Information ==<br />
<br />
* [ftp://ftp.modland.com/pub/documents/format_documentation/Atari%20SoundHeader%20(.sndh).txt SNDH file structure, Revision 2.00]<br />
* [http://sndh.atari.org/fileformat.php SNDH file structure, Revision 2.10]<br />
<br />
Note that SNDH files are often compressed with [[Pack-Ice]].<br />
<br />
== Software ==<br />
<br />
=== Conversion ===<br />
<br />
* [http://sndh.atari.org/files/sndhconv.zip SNDHconv] ([[Xlr8 module|Xlr8]], [[Sid Sound Designer module|Sid Sound Designer]], [[Music Mon module|Music Mon]], [[Triplex module|Triplex]] and [[Trisound module|Trisound]] to [[Atari SoundHeader|SNDH]] - [[ZIP]] file, Atari ST/TT/Falcon)<br />
* [http://files.dhs.nu/files_msx/qua2sndh.zip Quartet-2-SNDH] ([[Quartet]] to [[Atari SoundHeader|SNDH]] - [[ZIP]] file, Atari ST/TT/Falcon)<br />
<br />
=== Editing ===<br />
<br />
* [http://sndh.atari.org/files/sndh111.zip SNDH-Editor] ([[ZIP]] file, Atari ST/TT/Falcon)<br />
<br />
=== Playback ===<br />
<br />
* [http://mahen.free.fr/plugins/index-en.htm AmiNetRadio] (Amiga MorphOS)<br />
* [http://www.bannister.org/software/ao.htm Audio Overload] (cross-platform)<br />
* [http://www.exotica.org.uk/wiki/DeliPlayer DeliPlayer] (Windows)<br />
* [http://yescrew.atari.org/eng/products.htm#gemplay GemPLAY] (Atari ST/TT/Falcon)<br />
* [http://creamhq.de/jam.php Jam] (Atari ST/TT/Falcon & Windows)<br />
* [http://sndh.atari.org/files/krap14.zip KrapSNDH] ([[ZIP]] file, Atari ST/TT/Falcon)<br />
* [http://bulba.untergrund.net/ayplayer_e.htm MicroST] (Windows)<br />
* [http://sc68.atari.org/ SC68] (UNIX / Windows)<br />
* [http://mahen.free.fr/sc68/ sc68mui] (Amiga MorphOS)<br />
* [https://itunes.apple.com/app/sc68-player/id295290413?mt=8 SC68 Player] (iPhone / iPod Touch)<br />
* [http://sndplayer.atari.org/ SND Player] (Atari ST/TT/Falcon)<br />
* [http://www.preromanbritain.com/stj/ STj] (Atari ST/TT/Falcon)<br />
* [http://www.nocrew.org/software-stsndplay.html STsndplay] (UNIX)<br />
* [http://xsc.atari.org/ XSC] (Mac OS X)<br />
<br />
== Links ==<br />
<br />
* [http://sndh.atari.org/ Atari ST YM2149 Archive]<br />
<br />
[[Category:Atari computers]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T12:50:08Z<p>Kyz: /* Structure */</p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Structure ==<br />
The format begins with a fixed header, followed by a series of ''hunks'' which can contain different types of data, such as code, data, uninitialised memory reservations (BSS), code relocations, debug symbols and so on.<br />
<br />
All Amiga programs share the same address space and are loaded to wherever there is free memory. They cannot be loaded to specific absolute addresses. This means code must either be written in a position-independent fashion, or it can use ''relocation'' hunks to specify where the loader has to fix up absolute address references to other parts of the code. Once loaded, they cannot be relocated again, only unloaded and reloaded.<br />
<br />
Amiga programs do their own dynamic linking with OS functions such as <tt>OpenLibrary</tt>, which loads and returns a pointer to a shared library, whose functions can then be executed by jumping to specific offsets from the pointer. This is unlike Windows and UNIX where the loader is expected to fetch and link in other libraries while loading the program, and programs have "import" and "export" symbols. Amiga programs do not have to list any symbols or name any other libraries, even if they depend on them to run. Amiga programs can include a list of their own "symbols" for use by debuggers, but aren't required to do so.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T12:49:15Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Structure ==<br />
The format begins with a fixed header, followed by a series of ''hunks'' which can contain different types of data, such as code, data, uninitialised memory reservations (BSS), code relocations, debug symbols and so on.<br />
<br />
All Amiga programs share the same address space and are loaded to wherever there is free memory. They cannot be loaded to specific absolute addresses. This means code must either be written in a position-independent fashion, or it can use ''relocation'' hunks to specify where the loader has to fix up absolute address references to other parts of the code. Once loaded, they cannot be relocated again, only unloaded and reloaded.<br />
<br />
Amiga programs do their own dynamic linking with OS functions such as <tt>OpenLibrary</tt>, which loads and returns a pointer to a shared library, whose functions can then be executed by jumping to specific offsets from the pointer. This is unlike Windows and UNIX where the loader is expected to fetch and link in other libraries at loading the program, and programs have "import" and "export" symbols. Amiga programs do not have to list any symbols or name any other libraries, even if they depend on them to run. Amiga programs can include a list of their own "symbols" for use by debuggers, but aren't required to do so.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T12:28:25Z<p>Kyz: /* Identification */</p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T12:28:00Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The '''Amiga Hunk''' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and most other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T12:27:41Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|library}}, {{ext|device}}, {{ext|datatype}}, {{ext|o}}, {{ext|lib}}<br />
}}<br />
<br />
The ''Amiga Hunk'' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and most other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Amiga_HunkAmiga Hunk2018-05-10T12:26:45Z<p>Kyz: Created page with "{{FormatInfo |subcat = Executables |extensions = {{noext}}, {{ext|o}}, {{ext|a}} }} The ''Amiga Hunk'' format is the native file format of AmigaOS for loadable files (includi..."</p>
<hr />
<div>{{FormatInfo<br />
|subcat = Executables<br />
|extensions = {{noext}}, {{ext|o}}, {{ext|a}}<br />
}}<br />
<br />
The ''Amiga Hunk'' format is the native file format of AmigaOS for loadable files (including all executable files), object code and link libraries.<br />
<br />
== Identification ==<br />
Loadable files begin with the magic ID {{magic|00 00 03 F3}}. "Loadable" includes all directly executable files, as well as shared libraries, device drivers, filesystem handlers, datatypes and most other "plugins".<br />
<br />
Object code and link libraries begin with the magic ID {{magic|00 00 03 E7}}. These files have to be combined into a loadable file using a linker to get an executable program.<br />
<br />
== Format specification ==<br />
* Commodore-Amiga Inc. "Amiga Binary File Structure" ''The AmigaDOS Manual'', Bantam Books, 1986, ISBN 0-553-34294-0, p243-262<br />
* Ralph Babel. "The Format of Load and Object Modules" ''The Amiga Guru Book'', self-published, 1993, p657-682<br />
* http://amiga-dev.wikidot.com/file-format:hunk</div>Kyzhttp://fileformats.archiveteam.org/wiki/Custom_Amiga_ModuleCustom Amiga Module2018-05-10T11:56:04Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
}}<br />
<br />
The '''Custom''' format is an Amiga music format created by Frank Riffel and Peter Kunath for their Amiga music player ''DeliTracker''.<br />
<br />
DeliTracker supports hundreds of Amiga music formats through ''DeliPlayers''; plugins with the code to recognise and play a specific music format.<br />
<br />
For music formats that DeliTracker ''doesn't'' have a DeliPlayer for, there is the catch-all ''Custom'' format, which is simply another DeliPlayer written exclusively for that music, combining the music's replay code and data in the same file.<br />
<br />
The Custom format is also supported by DeliTracker's main rival, EaglePlayer, and UADE which emulates them both.<br />
<br />
All DeliTracker plugins and Custom files are [[Amiga Hunk]] files. The first hunk must be a code hunk that begins with these values:<br />
# {{magic|70 FF 4E 75 44 45 4C 49 52 49 55 4D}}: 680x0 code to immediately exit if this file was run as a normal executable, followed by "DELIRIUM" in ASCII<br />
# a 32-bit relocated (absolute) pointer to a ''tag list''<br />
<br />
The ''tag list'' is a list of 32-bit key/value pairs. Tags are a [http://wiki.amigaos.net/wiki/Tags standard idiom in Amiga software] for variable lists of parameters. The tags that DeliTracker supports are listed in the development kit supplied with DeliTracker.<br />
<br />
A Custom file distinguishes itself from a DeliPlayer plugin by using the <tt>DTP_CustomPlayer</tt> (0x80004455) tag instead of the <tt>DTP_InternalPlayer</tt> (0x80004454) tag.<br />
<br />
The contents of a custom file is usually music replay code and data ripped directly from a game that takes over the Amiga hardware and does not use the operating system. Unlike the [[SID]] or [[Portable Sound Format|PSF]] formats, which also bundle ripped code and data in an identifying format, DeliTracker does not run the code in an ''emulated'' virtual machine, it executes it directly! It's contingent on the author of the Custom file to remove all Amiga hardware access from the player code (except for the audio hardware, obviously), and make it "play nice" with the running OS. The most common "dirty" accesses by replay code are to set up vertical blank timing interrupts or to use the CIA timers and their interrupts. DeliTracker provides callback functions to the custom file to allow them to set up equivalent timing interrupts in a system-friendly way.<br />
<br />
Custom files are sometimes replaced with a combination of a new DeliPlayer/EaglePlayer and data files that they recognise. One of the advantages of this is the programmer can go to great effort and support DeliTracker's "NotePlayer" or EaglePlayer's "Amplifier" APIs, which play sounds independently of the Amiga hardware and can thus support playing audio mixed to 14-bit quality on the original Amiga hardware or even higher quality through third party sound cards, and also allow DeliTracker/EaglePlayer to pass the audio through visualisation plugins.<br />
<br />
Custom files that remain today are usually because their replay code was unique, there is little advantage in creating a standalone plugin that only recognises a single data file.<br />
<br />
== Software ==<br />
* [http://aminet.net/package/mus/play/DeliTracker232 DeliTracker 2.32], the last release of DeliTracker in August 2000, including the developer kit for creating DeliPlayers / Custom files<br />
* [http://aminet.net/package/mus/play/Eagleplayer_2.05 EaglePlayer 2.05], the main rival to DeliTracker on the Amiga<br />
* [http://zakalwe.fi/uade/ UADE], the Unix Amiga DeliTracker Emulator which runs all DeliPlayers and EaglePlayers on an emulated Amiga, so it can play all Amiga music on platforms other than the Amiga<br />
<br />
== Examples ==<br />
* [http://old.exotica.org.uk/tunes/pages/CUST-Custom.html ExoticA's old collection of Custom files]<br />
* [https://www.exotica.org.uk/wiki/Custom ExoticA's new collection of Custom files]<br />
* [http://wt.exotica.org.uk/customs.html Custom files created by the Wanted Team]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Custom_Amiga_ModuleCustom Amiga Module2018-05-10T11:55:08Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
}}<br />
<br />
The '''Custom''' format is an Amiga music format created by Frank Riffel and Peter Kunath for their Amiga music player ''DeliTracker''.<br />
<br />
DeliTracker supports hundreds of Amiga music formats through ''DeliPlayers''; plugins with the code to recognise and play a specific music format.<br />
<br />
For music formats that DeliTracker ''doesn't'' have a DeliPlayer for, there is the catch-all ''Custom'' format, which is simply another DeliPlayer written exclusively for that music, combining the music's replay code and data in the same file.<br />
<br />
The Custom format is also supported by DeliTracker's main rival, EaglePlayer, and UADE which emulates them both.<br />
<br />
All DeliTracker plugins and Custom files are [[Amiga Hunk]] files. The first hunk must be a code hunk that begins with these values:<br />
# {{magic|70 FF 4E 75}}: This is 680x0 code (<tt>moveq #-1,d0 / rts</tt>) to immediately exit if this file was run as a normal executable<br />
# {{magic|44 45 4C 49 52 49 55 4D}}: "DELIRIUM" -- magic ID for DeliTracker by Delirium Softworks<br />
# a 32-bit relocated (absolute) pointer to a ''tag list''<br />
<br />
The ''tag list'' is a list of 32-bit key/value pairs. Tags are a [http://wiki.amigaos.net/wiki/Tags standard idiom in Amiga software] for variable lists of parameters. The tags that DeliTracker supports are listed in the development kit supplied with DeliTracker.<br />
<br />
A Custom file distinguishes itself from a DeliPlayer plugin by using the <tt>DTP_CustomPlayer</tt> (0x80004455) tag instead of the <tt>DTP_InternalPlayer</tt> (0x80004454) tag.<br />
<br />
The contents of a custom file is usually music replay code and data ripped directly from a game that takes over the Amiga hardware and does not use the operating system. Unlike the [[SID]] or [[Portable Sound Format|PSF]] formats, which also bundle ripped code and data in an identifying format, DeliTracker does not run the code in an ''emulated'' virtual machine, it executes it directly! It's contingent on the author of the Custom file to remove all Amiga hardware access from the player code (except for the audio hardware, obviously), and make it "play nice" with the running OS. The most common "dirty" accesses by replay code are to set up vertical blank timing interrupts or to use the CIA timers and their interrupts. DeliTracker provides callback functions to the custom file to allow them to set up equivalent timing interrupts in a system-friendly way.<br />
<br />
Custom files are sometimes replaced with a combination of a new DeliPlayer/EaglePlayer and data files that they recognise. One of the advantages of this is the programmer can go to great effort and support DeliTracker's "NotePlayer" or EaglePlayer's "Amplifier" APIs, which play sounds independently of the Amiga hardware and can thus support playing audio mixed to 14-bit quality on the original Amiga hardware or even higher quality through third party sound cards, and also allow DeliTracker/EaglePlayer to pass the audio through visualisation plugins.<br />
<br />
Custom files that remain today are usually because their replay code was unique, there is little advantage in creating a standalone plugin that only recognises a single data file.<br />
<br />
== Software ==<br />
* [http://aminet.net/package/mus/play/DeliTracker232 DeliTracker 2.32], the last release of DeliTracker in August 2000, including the developer kit for creating DeliPlayers / Custom files<br />
* [http://aminet.net/package/mus/play/Eagleplayer_2.05 EaglePlayer 2.05], the main rival to DeliTracker on the Amiga<br />
* [http://zakalwe.fi/uade/ UADE], the Unix Amiga DeliTracker Emulator which runs all DeliPlayers and EaglePlayers on an emulated Amiga, so it can play all Amiga music on platforms other than the Amiga<br />
<br />
== Examples ==<br />
* [http://old.exotica.org.uk/tunes/pages/CUST-Custom.html ExoticA's old collection of Custom files]<br />
* [https://www.exotica.org.uk/wiki/Custom ExoticA's new collection of Custom files]<br />
* [http://wt.exotica.org.uk/customs.html Custom files created by the Wanted Team]</div>Kyzhttp://fileformats.archiveteam.org/wiki/ExecutablesExecutables2018-05-10T11:47:50Z<p>Kyz: /* Directly executable */</p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|thiscat=Executables<br />
|image=Application x executable.png<br />
}}<br />
<br />
Container formats for machine executable code. These often define different sections to be loaded into memory. Some formats may be compatible with different CPU architectures.<br />
<br />
== Directly executable ==<br />
<br />
* [[a.out]]<br />
* [[Amiga Hunk]]<br />
* [[Atari ST executable]] (.prg)<br />
* [[COFF]] — The Common Object File Format, an executable format originally designed for use in UNIX System V<br />
* [[Commodore 64 binary executable]] (.prg)<br />
* [[DOS executable (.com)]] — 16 bit DOS executable<br />
* [[EXE]] — MS-DOS, MS Windows, and others<br />
** [[MS-DOS EXE]]<br />
** [[New Executable]] (NE)<br />
** [[Linear Executable]]<br />
** [[Portable Executable]] (PE, actually a [[COFF]] variant)<br />
* [[Executable and Linkable Format]] (ELF)<br />
* [[Intel HEX]]<br />
* [[iOS app]] (.app) (see also [[IPA]] for archived version, and [[Mobile Provision file]] for provision file accompanying apps)<br />
* [[Mach-O]]<br />
* [[Multiboot]]<br />
* [[PRC (Palm OS)]]<br />
* [[Psion IMG/APP]]<br />
* [[Psion OPO/OPA]]<br />
<br />
== Shared libraries, chained files, etc. ==<br />
(can't be run by themselves, but are used at runtime by other executables)<br />
<br />
* [[Borland Graphics Interface]] (.bgi)<br />
* [[DOS device driver]] (.sys)<br />
* [[Dynamic library (OS X or iOS)]] (.dylib)<br />
* [[Dynamic-link library (Windows)]] (.dll)<br />
* [[Turbo Pascal chain file]] (.chn)<br />
<br />
== Resource data used by executables and sometimes embedded in them ==<br />
See [[Resources]].<br />
<br />
== Meta-info files used in execution of programs/packages ==<br />
<br />
* [[Assembly manifest (Windows)]] (.manifest)<br />
* [[Mobile Provision file]]<br />
* [[Program information file]] (PIF)<br />
<br />
== Virtual machine code ==<br />
(see [[Wikipedia:UVC-based preservation]] for use of virtual machines in archival preservation)<br />
* [[ART (Android Runtime)]]<br />
* [[BEAM]] (Erlang)<br />
* [[Bytecode]] (or p-code) — programs "compiled" into machine-independent code that loads or runs more quickly than raw interpreted source code; runs in an interpreter<br />
* [[Dalvik Executable]] (DEX; virtual machine used in Android)<br />
* [[Java bytecode]] (aka 'class file')<br />
* [[Lingo bytecode]]<br />
* [[Olive]] (executable archive embedding a virtual machine emulating original environment)<br />
* [[PYC]] ([[Python]] bytecode)<br />
* [[Universal Machine (ICFP programming contest 2006)]]<br />
* [[WebAssembly]]<br />
* [[Z-code]]<br />
<br />
== Macros or automated scripting ==<br />
* [[ActiveMime]]<br />
* [[Batch file]]<br />
* [[Bourne shell script]]<br />
* [[C shell script]]<br />
* [[DoItAgain]]<br />
* [[Photoshop Action File]] (.atn)<br />
* [[Sikuli]]<br />
* [[Windows Script File]]<br />
<br />
For additional formats, see [[Programming Languages]].<br />
<br />
== Executable compression ==<br />
* [[UPX]]<br />
See also [[Wikipedia:Executable compression]].<br />
<br />
== See also ==<br />
<br />
* [[Source code]], for code in a higher-level [[Programming Languages|programming language]] that needs to be compiled, assembled, or interpreted<br />
* [[Programming Languages]]<br />
* [[Development]], for other files used in the development process, including object and library files that get linked into a finished executable<br />
* [[Archiving]], for some forms of self-extracting archives and installer packages<br />
<br />
== Links ==<br />
<br />
* [http://www.hanselman.com/blog/DownloadWrappersAndUnwantedSoftwareArePureEvil.aspx Download Wrappers and Unwanted Software are pure evil]<br />
* [http://boingboing.net/2014/02/24/flappy-bird-demakes.html Flappy Bird implementations for various classic platforms]<br />
* [http://www.loc.gov/preservation/resources/rfs/softgame.html Library of Congress Recommended Format Specifications: Software/Gaming]<br />
* [http://blog.trailofbits.com/2014/02/23/semantic-analysis-of-native-programs-introducing-codereason/ Semantic Analysis of Native Programs, introducing CodeReason]<br />
* [https://github.com/MattPD/cpplinks/blob/master/executables.md C++ links: executables]<br />
<br />
[[Category:Executables| ]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Audio_and_MusicAudio and Music2018-05-10T11:45:43Z<p>Kyz: /* Emulated music */</p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|thiscat=Audio and Music<br />
|image=Music.jpg<br />
|caption=Musical notation<br />
}}<br />
<br />
== Introduction ==<br />
[[Electronic_File_Formats|Electronic Formats]] concerned with audio and musical data, including sound recording, instrument control, musical notation, etc.<br />
<br />
* For an excellent introduction to the issues around audio and video formats, see [http://www.avpreserve.com/blog/a-primer-on-codecs-for-moving-image-and-sound-archives-2/ A Primer on Codecs for Moving Image and Sound Archives - and 10 Recommendations for Codec Selection & Management] [http://www.avpreserve.com/wp-content/uploads/2010/04/AVPS_Codec_Primer.pdf PDF version]<br />
* [http://www.garymcgath.com/streamingprotocols.html Basics of streaming protocols]<br />
<br />
== Audio and sequencer software ==<br />
<br />
* Ableton<br />
** [[Ableton Live]]<br />
* Aldrin<br />
** [[Creative Commons Module]] (.ccm)<br />
* [[Audacity Project Format]] (.aup)<br />
* Cakewalk<br />
** [[Cakewalk Project (CWP)]] (.cwp)<br />
** [[Cakewalk Project (WRK)]] (.wrk)<br />
** [[Cakewalk Sample Definition File]] (.sfz)<br />
* [[Cool Edit / Audition Multi Track Session file]] (.sss)<br />
* [[CPS project]] (.cps)<br />
* FruityLoops / FL Studio<br />
** [[DrumSynth Preset]] (.ds)<br />
** [[FL Studio Score File]] (.fsc)<br />
** [[FL Studio State File]] (.fst)<br />
** [[Humanize Preset]] (.fpr)<br />
** [[Raw FL Studio Project]] (.flp)<br />
** [[SimSynth Preset]] (.syn)<br />
** [[Speech Preset]] (.speech)<br />
* GarageBand (Mac)<br />
** [[GarageBand project]] (.band, .gbproj)<br />
** [[Magic GarageBand template]] (.wand)<br />
** [[GarageBand MagicMentor template]] (.mwand)<br />
* [[Hydrogen]] (.h2song, .h2pattern)<br />
* [[Jacker song]]<br />
* Jeskola Buzz<br />
** [[Jeskola Buzz machine]] (.dll)<br />
** [[Jeskola Buzz machine preset]] (.prs)<br />
** [[Jeskola Buzz song]] (.bmx)<br />
* [[LMMS]] (Linux MultiMedia Studio) (.mmp, .mmpz)<br />
* [[LOGIC]] (Logic)<br />
* [[Maestro]] (RISC OS)<br />
* [[Make-A-Melody]] (''Big Blue Disk'' #42) (.mus)<br />
* Piston Collage<br />
** [[Piston Collage noise]] (.ptnoise)<br />
** [[Piston Collage song]] (.ptcop, .pttune)<br />
** [[Piston Collage voice]] (.ptvoice)<br />
* Pro Tools<br />
** [[PTS]] (Pro Tools 7-9) <br />
** [[PTX]] (Pro Tools 10)<br />
* Propellerhead Reason<br />
** [[Propellerhead Reason NN-XT Patch File]] (.sx2)<br />
** [[Propellerhead Reason Reason Project File]] (.rsn)<br />
** [[Propellerhead Reason Reason Song File]](.rns)<br />
** [[Propellerhead Reason REX2 Audio File]] (.rx2)<br />
** [[Propellerhead Reason ReCycle Loop File]] (.rex)<br />
** [[Propellerhead Reason ReFill Sound Bank]] (.rfl)<br />
* [[Renoise]]<br />
** [[Renoise song]] (.xrns)<br />
** [[Renoise instrument]] (.xrni)<br />
** [[Renoise DSP device-chain]] (.xrnt)<br />
* SeaTone<br />
** [[SeaTone song]] (.pxt)<br />
* Steinberg<br />
** [[CUBASE]]<br />
*** [[ALL]] - A Steinberg [[CUBASE]] VST file for saving songs (pre 2002).<br />
*** [[ARR]] - A Steinberg [[CUBASE]] VST file for saving arrangements (pre 2002). <br />
*** [[CPR]] - A Steinberg [[CUBASE]] SX file for saving projects (2002 - ).<br />
*** [[NPR]] - A Steinberg [[NUENDO]] file for saving arrangements (2002 - ).<br />
** Wavelab<br />
*** [[MON]] (Audio montage)<br />
* [[(Super) Studio Session song]] (.sss)<br />
<br />
== Audio recording and sound waves ==<br />
<br />
* Lossless compression<br />
** [[ATRAC Advanced Lossless]] (.aal)<br />
** [[ADA]] (Advanced Digital Audio)<br />
** [[ALAC]] (Apple Lossless Audio Codec)<br />
** [[APAC]] (Marian's A-pac)<br />
** [[Dakx Wav]]<br />
** [[Dolby TrueHD]]<br />
** [[DTS-HD]] (Lossless variant of DTS- DTS-HD Master Audio)<br />
** [[FLAC]] (Free Lossless Audio Codec)<br />
** [[Kexis]] (.kxs)<br />
** [[LA]] (Lossless Audio)<br />
** [[LiteWave]]<br />
** [[LPAC]] (Lossless Predictive Audio Coding)<br />
** [[MKW]]<br />
** [[MLP]] (Meridian Lossless Packing Audio)<br />
** [[Monkey's Audio]] (.ape)<br />
** [[MPEG-4 ALS]] (MPEG-4 Audio Lossless Coding)<br />
** [[MPEG-4 SLS]] (MPEG-4 Scalable lossless coding mode)<br />
** [[MQA]] (Master Quality Authenticated)<br />
** [[OptimFROG]] (.ofr, .ofs)<br />
** [[Perfect Clarity Audio]] (.pca)<br />
** [[RALF]] (Real Lossless Audio Codec)<br />
** [[RK Audio]] (.rka)<br />
** [[Shorten]] (.shn)<br />
** [[Sonarc]]<br />
** [[Split2000]]<br />
** [[TAK]] (.tak)<br />
** [[True Audio]] (.tta)<br />
** [[VocPack]]<br />
** [[WavArc]]<br />
** [[WavPack]] (.wv)<br />
** [[WMA Lossless]] (Windows Media Audio 9 Lossless)<br />
* Lossy compression<br />
** [[AAC]] (Advanced Audio Coding)<br />
** Adaptive differential pulse-code modulation<br />
*** [[ACT]]<br />
*** [[MNF]] (Yamaha ADPCM)<br />
*** [[SPB]] (Yamaha ADPCM)<br />
*** [[VOX]]<br />
** [[Adaptive Multi-Rate WideBand Audio]]<br />
** ATRAC or [[Adaptive Transform Acoustic Coding]] (.aa3, .oma, .at3)<br />
** [[Audible Audiobook]] (.aa, .aax)<br />
** [[CELT]] (.ogg)<br />
** [[Dolby Digital]] (AC-3 or ATSC A/52)<br />
** [[Digital Theater Systems]] (.dts)<br />
** [[GSM]] (GSM 6.10 RPE-LTP)<br />
** [[MPEG-4 Audio]] (.m4a, .m4b, .m4p, .m4r, .mp4)<br />
** [[M4B]] (iTunes Audio Book)<br />
** [[M4P]] (Fairplay DRM Encrypted [[M4A]])<br />
** [[MPC (Musepack)|MP+]] (MPEGplus Audio)<br />
** [[MP1]] (MPEG Audio Layer 1)<br />
** [[MP2]] (MPEG-1 Audio Layer II)<br />
** [[MP3]] (MPEG-1 / MPEG-2 Audio Layer III)<br />
*** [[packMP3]]<br />
** [[MPA]] (MPEG Audio)<br />
** [[Musepack Audio]] (.mpc)<br />
** [[Opus]] (.opus)<br />
** [[RealAudio]] (.ra)<br />
** [[Speex]] (.spx)<br />
** [[Vorbis]] (.logg, .oga, .ogg)<br />
** [[WMA]] (Windows Media Audio)<br />
* Proprietary<br />
** [[DCT]] (Dictation format by NCH Software)<br />
** [[Digital Speech Standard]] (.dss)<br />
** [[Digital Voice File]] (.dvf)<br />
** [[IC Sound]] (.ics)<br />
** [[IKLAX]] (iKlax Media)<br />
** [[Memory Stick Voice]] (.msv)<br />
** [[Pono]]<br />
* Separated parts of tracks<br />
** [[Stems]]<br />
* Uncompressed audio<br />
** [[AIFF|AIF / AIFF]] (Audio Interchange File Format)<br />
** [[Berkeley/IRCAM/Carl Sound Format]] (.sf)<br />
** [[BWF]] (Broadcast Wave Format; variant of WAV)<br />
** [[DSD]] (Direct Stream Digital) (.dsf)<br />
** [[RAW (Audio)|RAW]] (.raw, .pcm)<br />
** [[RF64]] (extended variant of BWF)<br />
** [[Sony Wave64]] (.w64)<br />
** [[WAV]] (Waveform Audio File Format)<br />
* Various encodings<br />
** [[AIFC]] ([[AIFF]] Compressed)<br />
** [[AU]] (Sun Microsystems audio format)<br />
** [[Computerized Speech Lab NSP]] (.nsp)<br />
** [[Bonk]] (lossy/lossless audio compression)<br />
** [[INRS-Telecom file]] (.aud)<br />
** [[SPPACK]] (.d)<br />
** [[WVE (Psion)]]<br />
<br />
== Chiptune ==<br />
<br />
* [[SAM Coupé song]] (.cop, .sng)<br />
<br />
== Configuration files ==<br />
<br />
* [[X2A]] (Yamaha S70xs/S90xs keyboard workstations)<br />
<br />
== Container formats ==<br />
<br />
* [[ASF]] (Advanced Systems Format)<br />
* [[Core Audio Format]] (.caf)<br />
* [[Extensible Music Format]] (.xmf)<br />
* [[Matroska Audio]] (.mka)<br />
* [[MP4]] (MPEG-4 Part 14 media container)<br />
* [[Ogg]] (.ogg, .oga, .ogx, .spx, .opus)<br />
* [[Rich Music Format]] (.rmf)<br />
* [[RealMedia]] (.rm)<br />
* [[WebM]] (.webm) (also used for video)<br />
<br />
== Converters ==<br />
<br />
* [[Konvertor]]<br />
<br />
== Emulated music ==<br />
<br />
* [[2SF]] (Nintendo DS [[PSF]])<br />
* [[3G2]] (3GPP, also a video format)<br />
* [[3GP]] (3GPP, also a video format)<br />
* [[Atari SoundHeader]] (SNDH)<br />
* [[AY]] (Amstrad CPC / ZX Spectrum)<br />
* [[Custom Amiga Module]] (CUST)<br />
* [[DSF]] (Dreamcast [[Portable Sound Format|PSF]])<br />
* [[EPSGMOD]] (.epsgmod, Mod2PSG)<br />
* [[Fuxoft AY Language]] (.fmx)<br />
* [[GBR]] (Game Boy Sound)<br />
* [[Game Boy Sound]] (.gbs)<br />
* [[GSF]] (Game Boy Advance [[PSF]])<br />
* [[GSR]] (Gens Sound Record)<br />
* [[HES]] (Hudson Entertainment System)<br />
* [[KSS]] (MSX)<br />
* [[KSSX]] (Possible expansion of [[KSS]])<br />
* [[MDX]] (Sharp X68000 / MXDRV)<br />
* [[NES Sound Format]] (.nsf)<br />
* [[NES Sound Format Extended]] (.nsfe)<br />
* [[Portable Sound Format|PSF]] (Portable Sound Format)<br />
* [[PSF1]] (Playstation [[PSF]])<br />
* [[PSF2]] (Playstation 2 [[PSF]])<br />
* [[QSF]] (Capcom Q-Sound [[PSF]])<br />
* [[SC68]] (Atari ST / Atari STE / Amiga)<br />
* [[SGC]] (Sega Master System / Game Gear / Colecovision)<br />
* [[SID]] (Commodore 64)<br />
* [[SPC (Audio)|SPC]] (Super Nintendo SPC700)<br />
* [[SSF]] (Sega Saturn [[Portable Sound Format|PSF]])<br />
* [[USF]] (Nintendo 64 [[Portable Sound Format|PSF]])<br />
* [[YM]] (Amstrad CPC / Spectrum ZX / Atari ST)<br />
* [[ZXAYEMUL Sound]] (.cpc)<br />
<br />
== Game audio and music ==<br />
<br />
(see also [[Game data files]])<br />
<br />
* [[4X IMA ADPCM]]<br />
* Accolade<br />
** [[Accolade MIDI File Format]]<br />
* Adept Software<br />
** [[God of Thunder Music Format]]<br />
* [[AFC]] (AFX Audio File) -- used in Mass Effect 2<br />
* Apogee<br />
** [[Crystal Caves Sound format]]<br />
* Atari<br />
** [[Slight Atari Player]] (Atari POKEY)<br />
* [[BAF]] (Blur ADPCM)<br />
* [[BAKA]] (PCM 16 bit)<br />
* Bandai<br />
** [[WSR]] (WonderSwan / WonderSwan Color)<br />
* [[BH2PCM]]<br />
* [[BNSF]] (G.722.1)<br />
* Cave Story<br />
** [[Organya]]<br />
* Commodore Amiga<br />
** [[A.M. Composer v1.2]] (.amc)<br />
** [[AC1D-DC1A Packer]] (.ac1d)<br />
** [[Actionamics Sound Tool]] (.ast)<br />
** [[AMOS Music Bank]] (.abk)<br />
** [[AMOS Memory Bank#AMOS Samples Bank|AMOS Samples Bank]] (.abk)<br />
** [[Amos Basic Konverter]] (.ambk)<br />
** [[Art & Magic]] (.aam)<br />
** [[Audio Sculpture]] (.as)<br />
** [[Beathoven Synthesiser]] (.bss)<br />
** [[Ben Replay]] (.ben)<br />
** [[Benn Daglish]] (.bd)<br />
** [[Benn Daglish SID]] (.bds)<br />
** [[Channel Players]] (.chan)<br />
** [[Cinemaware]] (.cin)<br />
** [[Core Design]] (.core)<br />
** [[CustomMade]] (.cm)<br />
** [[Darius Zendeh]] (.dz)<br />
** [[Dave Lowe]] (.dl)<br />
** [[Dave Lowe New]] (.dln)<br />
** [[David Hanney]] (.dh)<br />
** [[David Whittaker]] (.dw)<br />
** [[Desire]] (.dsr)<br />
** [[Digital Illusions]] (.di)<br />
** [[Digital Sonix & Chrome]] (.dsc)<br />
** [[Digital Sound Creations]] (.han)<br />
** [[Dirk Bialluch]] (.tpu)<br />
** [[Dynamic Synthesizer]] (.dns)<br />
** [[Editeur Musical Sequentiel]] (.ems)<br />
** [[Follin Player II]] (.tf)<br />
** [[Fred Editor]] (.fred)<br />
** [[Fred Gray]] (.fg)<br />
** [[Future Player]] (.fp)<br />
** [[FWMP]] (.fw)<br />
** [[Game Music Creator]] (.gmc)<br />
** [[Gnu Player]] (.gp)<br />
** [[Hippel]] (.hip)<br />
** [[Hippel-COSO]] (.hipc)<br />
** [[Hornet Packer]] (.hrt)<br />
** [[Howie Davies]] (.hd)<br />
** [[IFF-MAUD]]<br />
** [[Images Music System]] (.ims)<br />
** [[Infogrames INS]] (.ins)<br />
** [[Janko Mrsic-Flogel]] (.jmf)<br />
** [[Jason Brooke]] (.jcb)<br />
** [[Jason Page]] (.jp)<br />
** [[Jeroen Tel]] (.jt)<br />
** [[Jesper Olsen]] (.jo)<br />
** [[Jochen Hippel]] (.hip)<br />
** [[Kefrens Sound Machine]] (.ksm)<br />
** [[Kris Hatlelid]] (.kh)<br />
** [[Leggless Music Editor]] (.lme)<br />
** [[Magnetic Fields Packer]] (.mfp)<br />
** [[Maniacs of Noise]] (.mon, .jt)<br />
** [[Mark Cooksey]] (.mc)<br />
** [[Mark II Sound-System]] (.mii, .mk2, .mkii)<br />
** [[Martin Walker]] (.mw)<br />
** [[MaxTrax]] (.mxtx)<br />
** [[Mike Davies]] (.md)<br />
** [[MMDC]] (Module packer)<br />
** [[Mugician]] (.mug)<br />
** [[Mugician II]] (.mug2)<br />
** [[NoiseRunner]] (.nr)<br />
** [[NovoTrade Packer]] (.ntp)<br />
** [[Pierre Adane Packer]] (.pap)<br />
** [[Power Music]] (.pm)<br />
** [[Professional Sound Artists]] (.psa)<br />
** [[Promizer 0.1]] (.pm01)<br />
** [[Promizer 1.0c]] (.pm10)<br />
** [[Promizer 1.8a]] (.pm18)<br />
** [[Promizer 2.0]] (.pm20)<br />
** [[Promizer 4.0]] (.pm40)<br />
** [[ProPacker 1.0]] (.pp10)<br />
** [[ProPacker 2.1]] (.pp21)<br />
** [[ProPacker 3.0]] (.pp30)<br />
** [[Prorunner 1.0]] (.prun1)<br />
** [[Prorunner 2.0]] (.prun2)<br />
** [[Richard Joseph]] or Vectordean (.rjp)<br />
** [[Rob Hubbard]] (.rh, .rho)<br />
** [[Ron Klaren]] (.rk)<br />
** [[Sean Connolly]] (.scn)<br />
** [[Sean Conran]] (.scr)<br />
** [[Sidmon]] (.sid)<br />
** [[Sidmon II]] (.sid2)<br />
** [[Silmarils]] (.mok)<br />
** [[SKYT Packer]] (.skyt)<br />
** [[Sonic Arranger]] (.sa)<br />
** [[Sound Images]] (.tw)<br />
** [[Sound Master]] (.sm)<br />
** [[Sound Programming Language]] (.spl)<br />
** [[Soundcontrol]] (.sct)<br />
** [[Soundfactory]] (.psf)<br />
** [[SoundPlayer]] (.sjs)<br />
** [[Special FX]] (.jd)<br />
** [[Speedy System]] (.ss)<br />
** [[Steve Barrett]] (.sb)<br />
** [[Jason Page|Steve Turner]] (.jpo)<br />
* [[Star Trekker Packer]] (.stpk)<br />
** [[Synth Dream]] (.sdr)<br />
** [[Synth Pack]] (.osp)<br />
** [[The Musical Enlightenment]] (.tme)<br />
** [[The Player 2.2a]] (.p22a)<br />
** [[The Player 3.0a]] (.p30a)<br />
** [[The Player 4.0a]] (.p40a)<br />
** [[The Player 4.0b]] (.p40b)<br />
** [[The Player 5.0a]] (.p50a)<br />
** [[The Player 6.0a]] (.p60a)<br />
** [[The Player 6.1a]] (.p61a)<br />
** [[Titanics Player]] (.ttp)<br />
** [[Tracker Packer 1]] (.tp1)<br />
** [[Tracker Packer 2]] (.tp2)<br />
** [[Tracker Packer 3]] (.tp3)<br />
** [[Thomas Hermann]] (.thm)<br />
** [[Wally Beben]] (.wb)<br />
** [[Wanton Packer]] (.wn)<br />
** [[XANN Packer]] (.xann)<br />
** [[Zen Packer]] (.zen)<br />
* CRI Middleware<br />
** [[ADX]]<br />
** [[AFS]] (container format for [[ADX]] / [[AHX (CRI)]])<br />
** [[AHX (CRI)]]<br />
** [[AIX]]<br />
* [[DCS]] (ADPCM)<br />
* [[Death Rally Archive]] (.bpa)<br />
* [[DMSG]] (PCM 16 bit)<br />
* [[EACS IMA ADPCM]] (.kcey)<br />
* Electronic Arts<br />
** [[8-Bit Sampled Voice]] (.8svx, .iff)<br />
** [[Asylum Music Format]] (.amf, used in Crusader: No Remorse / Crusader: No Regret)<br />
** [[Electronic Arts AS4 / ASF Music]] (.as4, .asf)<br />
** [[Electronic Arts KSF Music]] (.ksf)<br />
** [[Electronic Arts MUS]] (.mus)<br />
** [[Electronic Arts SCxl]]<br />
** [[Electronic Arts Sound Effects]] (.bnk, .crd)<br />
** [[Electronic Arts Sound / Speech Files]] (.eas, .sph)<br />
** [[IFF]] (Amiga 8SVX)<br />
*** [[IFF-MAUD]]<br />
** [[Sonix Music Driver]] (.smus)<br />
* [[EMFF]] (ADPCM)<br />
* Epic Megagames<br />
** [[Epic Megagames MASI]] (.masi, .psm)<br />
* [[Final Fantasy XI Music file]] (.bgw)<br />
* [[FMOD Sample Bank]] (.fsb)<br />
* [[Funcom ISS]]<br />
* Galaxy Music System<br />
** [[Galaxy Music System v4.0]]<br />
** [[Galaxy Music System v5.0]] (.j2b)<br />
* [[GCW]] (PCM 16 bit)<br />
* [[Generic Header]] (.genh, Generic Header Creator)<br />
* Herad Music System<br />
** [[Herad Music System AGD]] (.agd)<br />
** [[Herad Music System SDB]] (.sdb)<br />
** [[Herad Music System SQX]] (.sqx)<br />
* [[HIS]] (PCM 8 bit)<br />
* id Software<br />
** [[Doom MUS]]<br />
** [[id Software DNF]] (.dnf)<br />
** [[id Software Music Format]] (.imf)<br />
** [[id Software WLF]] (.wlf)<br />
* [[IMA ADPCM]] (.bar, .dvi, .hwas, .idvi, .ivaud, .myspd, .stma, .strm)<br />
* [[Interplay ACM]] (.acm)<br />
* [[Inverse Frequency Sound format]]<br />
* [[iXMF]] (Interactive [[Extensible Music Format]])<br />
* Ken Silverman<br />
** [[Ken's Adlib Music]] (.ksm)<br />
** [[Ken's Digital Music]] (.kdm)<br />
** [[SM (Ken Silverman)]] (.sm)<br />
** [[SND (Ken Silverman)]] (.snd)<br />
* [[LOUDNESS Sound System]] (.lds)<br />
* LucasArts<br />
** [[LucasArts Adlib Audio]] (.laa)<br />
** [[SCUMM]] (SCUMM)<br />
* [[Martin Fernandez]] (.adlib)<br />
* Microsoft<br />
** [[0x0069]] (Xbox ADPCM)<br />
** [[2DX]]<br />
** [[2DX9]] (ADPCM)<br />
** [[DE2]] (ADPCM)<br />
** [[Xbox IMA ADPCM]] (.matx, .wavm, .wvs, .xmu, .xvas, .xwav)<br />
* Nintendo<br />
** [[Advanced Mario Sequencer file]] (.mss)<br />
** [[BRSTMPSM]] (Super Paper Mario)<br />
** [[Donkey Konga 2 DSP]] (Donkey Konga 2)<br />
** [[Mario Paint Composer]] (MPC)<br />
** [[Mario Sequencer file]] (.msq)<br />
** [[Nintendo GameCube / Wii AAAP]]<br />
** [[Nintendo GameCube / Wii ADP]] (Nintendo Gamecube) (.adp)<br />
** [[Nintendo GameCube / Wii AFC]] (Nintendo Gamecube)<br />
** [[Nintendo GameCube / Wii AGSC]] (.agsc)<br />
** [[Nintendo GameCube / Wii AMTS]]<br />
** [[Nintendo GameCube / Wii ASN]] (Nintendo Gamecube)<br />
** [[Nintendo GameCube / Wii ASR]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii AST]] (Nintendo Wii sound format)<br />
** [[Nintendo GameCube / Wii BNS]]<br />
** [[Nintendo GameCube / Wii BO2]]<br />
** [[Nintendo GameCube / Wii BRSTM]] (Nintendo Wii streaming format)<br />
** [[Nintendo GameCube / Wii CAPDSP]]<br />
** [[Nintendo GameCube / Wii CFN]]<br />
** [[Nintendo GameCube / Wii DDSP]]<br />
** [[Nintendo GameCube / Wii DSP]]<br />
** [[Nintendo GameCube / Wii GCA]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii GCM]]<br />
** [[Nintendo GameCube / Wii GSP]]<br />
** [[Nintendo GameCube / Wii HPS]]<br />
** [[Nintendo GameCube / Wii IDSP]]<br />
** [[Nintendo GameCube / Wii ISD]]<br />
** [[Nintendo GameCube / Wii ISH]]<br />
** [[Nintendo GameCube / Wii KRAW]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii LPS]]<br />
** [[Nintendo GameCube / Wii MPDS]]<br />
** [[Nintendo GameCube / Wii MPDSP]]<br />
** [[Nintendo GameCube / Wii MSS]]<br />
** [[Nintendo GameCube / Wii MUS]]<br />
** [[Nintendo GameCube / Wii PDT]]<br />
** [[Nintendo GameCube / Wii SDT]]<br />
** [[Nintendo GameCube / Wii SMP]]<br />
** [[Nintendo GameCube / Wii SNS]]<br />
** [[Nintendo GameCube / Wii SPD]]<br />
** [[Nintendo GameCube / Wii SPT]]<br />
** [[Nintendo GameCube / Wii SSM]]<br />
** [[Nintendo GameCube / Wii STM]]<br />
** [[Nintendo GameCube / Wii STR]]<br />
** [[Nintendo GameCube / Wii STS]]<br />
** [[Nintendo GameCube / Wii SWD]]<br />
** [[Nintendo GameCube / Wii THP]]<br />
** [[Nintendo GameCube / Wii TYDSP]]<br />
** [[Nintendo GameCube / Wii VJDSP]]<br />
** [[Nintendo GameCube / Wii WAS]]<br />
** [[Nintendo GameCube / Wii WSD]]<br />
** [[Nintendo GameCube / Wii WSI]]<br />
** [[Nintendo GameCube / Wii YDSP]]<br />
** [[Nintendo GameCube / Wii YMF]]<br />
** [[Nintendo GameCube / Wii ZWDSP]]<br />
** [[SHI]] ([http://battleofthebits.org/lyceum/View/ShroomTool ShroomTool] Instrument, used for Mario Paint instruments)<br />
** [[SHO]] (ShroomTool, used for Mario Paint sounds)<br />
* Origin Software<br />
** [[Ultima 6 Music]] (.m)<br />
* Pixel<br />
** [[PMD (Pixel)]]<br />
* [[Pixel Painters]] (.fmf)<br />
* [[Ragnarok Online 2 RMP]]<br />
* [[Shadowlands]] (.cal)<br />
* Sierra<br />
** [[Sierra AGI]] (Sierra AGI)<br />
** [[Sierra SCI]] (Used in Sierra PC games)<br />
* Sony<br />
** [[Sony Playstation ADS]] (Sony Playstation)<br />
** [[Sony Playstation ASS]] (Sony Playstation)<br />
** [[Sony Playstation AST]]<br />
** [[Sony Playstation BG00]]<br />
** [[Sony Playstation BMDX]]<br />
** [[Sony Playstation CCC]] (Sony Playstation)<br />
** [[Sony Playstation CNK]]<br />
** [[Sony Playstation DXH]] (Sony Playstation)<br />
** [[Sony Playstation ENTH]]<br />
** [[Sony Playstation FAG]] (Sony Playstation)<br />
** [[Sony Playstation FILP]]<br />
** [[Sony Playstation FSB]] (Sony Playstation)<br />
** [[Sony Playstation GCM]]<br />
** [[Sony Playstation GMS]] (Sony Playstation)<br />
** [[Sony Playstation HGC1]]<br />
** [[Sony Playstation I100]] (Sony Playstation)<br />
** [[Sony Playstation I400]] (Sony Playstation)<br />
** [[Sony Playstation I80]] (Sony Playstation)<br />
** [[Sony Playstation IKM]]<br />
** [[Sony Playstation ILD]] (Sony Playstation)<br />
** [[Sony Playstation IVB]]<br />
** [[Sony Playstation JOE]]<br />
** [[Sony Playstation KCES]] (Sony Playstation)<br />
** [[Sony Playstation KHV]] (Sony Playstation)<br />
** [[Sony Playstation LEG]] (Sony Playstation)<br />
** [[Sony Playstation MCG]]<br />
** [[Sony Playstation MI4]] (Sony Playstation)<br />
** [[Sony Playstation MIB]] (Sony Playstation)<br />
** [[Sony Playstation MIC]] (Sony Playstation)<br />
** [[Sony Playstation MIH]]<br />
** [[Sony Playstation MIHB]] (merged [[Sony Playstation MIB|MIB]] & [[Sony Playstation MIH|MIH]])<br />
** [[Sony Playstation MSA]]<br />
** [[Sony Playstation MSVP]]<br />
** [[Sony Playstation MUSC]]<br />
** [[Sony Playstation NPSF]]<br />
** [[Sony Playstation PNB]]<br />
** [[Sony Playstation PSH]]<br />
** [[Sony Playstation RKV]]<br />
** [[Sony Playstation RND]]<br />
** [[Sony Playstation RSTM]]<br />
** [[Sony Playstation RWS]]<br />
** [[Sony Playstation SFS]]<br />
** [[Sony Playstation SIR]]<br />
** [[Sony Playstation SL3]]<br />
** [[Sony Playstation SMPL]]<br />
** [[Sony Playstation SND]]<br />
** [[Sony Playstation SPU]] (Sony Playstation)<br />
** [[Sony Playstation STER]]<br />
** [[Sony Playstation STH]]<br />
** [[Sony Playstation STR]]<br />
** [[Sony Playstation STS]]<br />
** [[Sony Playstation SVAG]]<br />
** [[Sony Playstation SVS]]<br />
** [[Sony Playstation TEC]]<br />
** [[Sony Playstation TK5]]<br />
** [[Sony Playstation VAS]]<br />
** [[Sony Playstation VAG]]<br />
** [[Sony Playstation VB2]] (Playstation / PS2)<br />
** [[Sony Playstation VGS]]<br />
** [[Sony Playstation VIG]]<br />
** [[Sony Playstation VPK]]<br />
** [[Sony Playstation VS]]<br />
** [[Sony Playstation VSF]]<br />
** [[Sony Playstation WP2]]<br />
** [[Sony Playstation XA2]]<br />
** [[Sony Playstation XA30]]<br />
** [[Sony Playstation 2 MI2]] (Sony Playstation 2)<br />
* [[Sound Images Generation 2]] (.sig)<br />
* [[Sound Interface System]] (.lem)<br />
* [[STOS memory bank]] (.mbk)<br />
* [[Unreal Music Format]] (.umx)<br />
* Union Logic Software Publishing<br />
** [[Vinyl Goddess From Mars Instrument Format]]<br />
** [[Vinyl Goddess From Mars Music Format]]<br />
* [[Unique Development Studios]] (.uds)<br />
* [[Video Game Music]] (.vgm, .vgz)<br />
* Westwood Studios<br />
** [[Westwood Studios ADL]] (.adl)<br />
** [[Westwood Studios AUD]] (.aud)<br />
* [[Whacky Wheels]] (.klm)<br />
* [[XMP Game Module]] (.j2b)<br />
<br />
== Metadata formats and related data ==<br />
<br />
* [[APE tag]]<br />
* Cue Sheet - See [[CUE and BIN]]<br />
* [[Exif]]<br />
* [[ID3]]<br />
* [[ISRC]] (International Standard Recording Code)<br />
* [[MDZ]] - strictly not itself a music format, but a metadata file for other music files used by Open Cubic Player. See http://www.cubic.org/player/doc/node72.htm<br />
* [[Monkey's Audio metadata]] (.apl)<br />
* [[Vorbis comment]]<br />
<br />
== Music trackers ==<br />
<br />
* [[1tracker module]] (.1tm)<br />
* [[AHX (Abyss)]] (Abyss Highest eXperience)<br />
* [[Aley's Module]] (.alm)<br />
* [[All Sound Tracker module]] (.ast)<br />
* [[Amiga Module]] (.mod)<br />
* [[AProSys module]] (.aps)<br />
* [[Archimedes Tracker module]] (.musx)<br />
* [[Arkos Tracker]] (.aks)<br />
* [[Art of Noise module]] (.aon)<br />
* [[ASC Sound Master module]] (.asc)<br />
* [[B's Pro Tracker module]] (.bpm, .bps)<br />
* [[Beepola song]] (.bbsong)<br />
* [[BeRoTracker module]] (.br)<br />
* [[BoyScout Tracker module]] (.bsf)<br />
* Brian Postma SoundMon<br />
** [[Brian Postma SoundMon v1.x module]] (.bp)<br />
** [[Brian Postma SoundMon v2.x & v3.x module]] (.bp3)<br />
** [[BS]]<br />
* Buzzic<br />
** [[Buzzic v1.x]] (.buz)<br />
** [[Buzzic v2.0]] (.buz2)<br />
* Chaos Music Composer<br />
** [[CM3]] ([[CMC]] "3/4")<br />
** [[CMC]] (Chaos Music Composer)<br />
** [[CMR]] ([[CMC]] "Rzog")<br />
** [[CMS]] (Stereo Double [[CMC]])<br />
** [[DMC]] (Double ChaosMusicComposer)<br />
* [[Chuck Biscuits/Black Artist module]] (.cba)<br />
* [[Coconizer module]]<br />
* [[Composer 669 module]] (.669)<br />
* [[craptracker ii module]] (.ct2)<br />
* [[Custom Amiga Module]] (.cus. .custom)<br />
* CyberTracker<br />
** [[CyberTracker instrument]] (.ci)<br />
** [[CyberTracker module]] (.ct)<br />
* [[DeliTracker custom]] (.cust)<br />
* [[DeltaMusic module]] (.dta)<br />
* Delta Music Composer<br />
** [[Delta Music Composer module]] (.dlt)<br />
** [[Delta Music 2.0 module]] (.dl2)<br />
* [[Desktop Tracker module]] (.dtt)<br />
* DigiBooster / DigiBooster PRO<br />
** [[DigiBooster v1.x module]] (.digi)<br />
** [[DigiBooster PRO v2.x / DigiBooster 3 module]] (.dbm)<br />
* [[Digital Symphony module]] (.dsym)<br />
* Digitrakker<br />
** [[Digitrakker instrument]] (.ist)<br />
** [[Digitrakker module]] (.mdl)<br />
** [[Digitrakker sample]] (.spl)<br />
* [[DigiTrekker module]] (.dtm)<br />
* [[Digital Tracker module]] (.dtm)<br />
* [[DisorderTracker 2 module]] (.plm)<br />
* [[Dual Module Player DSMI]] (.amf)<br />
* [[Eureka Packer module]] (.eu)<br />
* [[Extended MOD]] (.emd)<br />
* [[Extreme's Tracker module]] (.ams)<br />
* [[FAC Soundtracker]] (MSX, extension unknown)<br />
* [[Face the Music module]] (.ftm)<br />
* Famitracker<br />
** [[FamiTracker module]] (.ftm)<br />
** [[FamiTracker instrument]] (.fti)<br />
* Farandole Composer<br />
** [[Farandole Form 2.0]] (.f2r)<br />
** [[Farandole Composer module]] (.far)<br />
** [[Farandole Composer pattern]] (.fpt)<br />
** [[Farandole Composer sample]] (.fsm, .usm)<br />
* [[Fashion Tracker module]] (.ex)<br />
* FastTracker / FastTracker 2<br />
** [[FastTracker module]] (.ft, .ftc)<br />
** [[Extended instrument]] (.xi)<br />
** [[Extended Module]] (.xm)<br />
* [[FC-M Packer module]] (.fcm)<br />
* [[Flash Tracker module]] (.fls)<br />
* [[Flex Tracker module]] (.flx)<br />
* [[Fuchs Tracker]] (.fchs)<br />
* [[FunkTracker module]] (.fnk)<br />
* Future Composer<br />
** [[Future Composer v1.x module]] (.fc)<br />
** [[Future Composer v1.3 module]] (.fc13)<br />
** [[Future Composer v1.4 module]] (.fc14)<br />
* Future Composer (BSI)<br />
** [[Future Composer (BSI) module]]<br />
* [[Fuzzac Packer module]] (.fuzz)<br />
* [[General Digital Music module]] (.gdm)<br />
* [[GoatTracker module]] (.sng)<br />
* [[Grave Composer module]] (.wow)<br />
* Graoumf Tracker<br />
** [[Graoumf Tracker module]] (.gtk)<br />
** [[Graoumf Tracker 2 module]] (.gt2)<br />
* [[Global Tracker v1.x module]] (.gtr)<br />
* [[HeatSeeker Module Cruncher v1.0]] (.crb)<br />
* [[Hively Tracker module]] (.hvl)<br />
* [[Ice Tracker module]]<br />
* [[Imago Orpheus module]] (.imf)<br />
* Impulse Tracker<br />
** [[Impulse Tracker module]] (.it, .itbz, .itgz, .itr, .itz)<br />
** [[Impulse Tracker sample]] (.its)<br />
* [[JAMCracker Pro module]] (.jam)<br />
* klystrack<br />
** [[klystrack instrument]] (.ki)<br />
** [[klystrack module]] (.kt)<br />
* [[KRIS Packer / ChipTracker module]] (.kris)<br />
* Liquid Tracker<br />
** [[Liquid Digitized Sample]] (.lds)<br />
** [[Liquid Tracker module]] (.liq)<br />
* MadTracker 2<br />
** [[MadTracker 2 envelope]] (.mte)<br />
** [[MadTracker 2 extension]] (.mtx)<br />
** [[MadTracker 2 instrument]] (.mti)<br />
** [[MadTracker 2 module]] (.mt2)<br />
** [[MadTracker 2 pattern]] (.mtp)<br />
** [[MadTracker 2 sample]] (.mts)<br />
* maxYMiser<br />
** [[maxYMiser instrument]] (.myi)<br />
** [[maxYMiser module]] (.snd)<br />
* [[Megatracker module]] (.mgt)<br />
* [[MO3]] (MP3 / Vorbis compressed module)<br />
* [[MOD Edit sample]] (.sam)<br />
* [[Module Protector + noID]] (.mp)<br />
* Moonblaster (MSX)<br />
** [[Moonblaster music]] (.mbm)<br />
** [[Moonblaster sample kit]] (.mbk)<br />
* [[Multi Track Module]] (.mtm)<br />
* Muse Tracker / Pornotracker<br />
** [[Musetracker / Pornotracker instrument]] (.poi)<br />
** [[Musetracker / Pornotracker module]] (.pom)<br />
* Music Pro Tracker<br />
** [[Music Pro Tracker DoublePlay]] (.mpd)<br />
** [[Music Pro Tracker module (MD1)]] (.md1)<br />
** [[Music Pro Tracker module (MD2)]] (.md2)<br />
** [[Music Pro Tracker module (MPT)]] (.mpt)<br />
* [[Nerdtracker II module]] (.ned)<br />
* [[NesTracker module]] (.nest)<br />
* NoisePacker<br />
** [[NoisePacker 2.x]] (.np2)<br />
** [[NoisePacker 3.x]] (.np3)<br />
* [[NoiseTracker module]] (.mod)<br />
* [[Noisetrekker module]] (.ntk)<br />
* OctaMED<br />
** [[OctaMED module (MED)]] (.med)<br />
** [[OctaMED module (MMD1)]] (.mmd1)<br />
** [[OctaMED v2.00 module]] (.med3)<br />
** [[OctaMED v2.10 module (MED4)]] (.med4)<br />
** [[OctaMED v2.10 module (MMD0)]] (.mmd0)<br />
** [[OctaMED v5 module]] (.mmd2)<br />
** [[OctaMED SS module]] (.mmd3)<br />
** [[MED Packer]] (.mmdc)<br />
* Oktalyzer<br />
** [[Oktalyzer module]] (.okt, .okta)<br />
* [[Onyx Music File]] (.omf)<br />
* [[Open MODPlug Tracker module]] (.mptm)<br />
* [[Oracle module]] (.orc)<br />
* [[Pha Packer]] (.pha)<br />
* PlayerPRO<br />
** [[Extended PlayerPRO module]] (.madx)<br />
** [[PlayerPRO module]] (.mad)<br />
* [[Polly Tracker module]]<br />
* [[Pro Sound Creator v1.xx]] (.psc, ZX Spectrum)<br />
* [[Pro Sound Maker]] (.psm)<br />
* Pro Tracker<br />
** [[Pro Tracker v1.xx module]] (.pt1)<br />
** [[Pro Tracker v2.xx module]] (.pt2)<br />
** [[Pro Tracker v3.xx module]] (.pt3) <br />
* [[Pro Tracker (MSX)]] (MSX-Music, extension unknown)<br />
* [[Poly Tracker module]] (.ptm)<br />
* [[Pumatracker module]] (.puma)<br />
* [[Quadra Composer module]] (.emod)<br />
* [[RASTER Music Tracker module]] (.rmt)<br />
* Real Tracker<br />
** [[Real Tracker instrument]] (.rti)<br />
** [[Real Tracker module]] (.rtm)<br />
** [[Real Tracker sample]] (.rts)<br />
* [[Renoise]]<br />
** [[Renoise|Renoise song (XRNS)]] (.xrns)<br />
** [[Renoise|Renoise instrument (XRNS)]] (.xrni)<br />
** [[Renoise|Renoise effect chain (XRNT)]] (.xrnt)<br />
** [[Renoise Song (NTK)]] (.ntk)<br />
** [[Renoise Song (PTK)]] (.ptk)<br />
** [[Renoise Song (RNS)]] (.rns)<br />
* [[SBStudio module]] (.pac, .son, .sou)<br />
* SCC Blaffer NT<br />
** [[SCC Blaffer NT music]] (.sbm, MSX)<br />
** [[SCC Blaffer NT instrument kit]] (.sbk)<br />
* Scream Tracker<br />
** [[Scream Tracker Music Interface Kit module]]<br />
** [[Scream Tracker 1 & 2 module]] (.stm)<br />
** [[Scream Tracker 3 Adlib module]] (.as3m)<br />
** [[Scream Tracker 3 module]] (.s3m)<br />
** [[Scream Tracker 3 / DigiTracker sample]] (.s31)<br />
** [[Scream Tracker 3 / DigiTracker sample]] (.smp)<br />
* [[SoundFX module]] (.sfx, .sfx2)<br />
* Sound Tracker<br />
** [[Soundtracker v2.6 / Ice Tracker module]] (.mtn)<br />
** [[SoundTracker v2.6 module]] (.st26)<br />
** [[Sound Tracker / Super Sonic module]] (.stc)<br />
** [[Sound Tracker Pro module]] (.stp)<br />
* [[SoundSmith module]] (.mtp)<br />
* Soundtrakker<br />
** [[Soundtrakker 128 instrument]] (.ins)<br />
** [[Soundtrakker 128 module]] (.128)<br />
** [[Soundtrakker v1.x instrument]] (.ins)<br />
** [[Soundtrakker v1.x module]] (.sng)<br />
* [[SQ-Tracker module]] (.sqt)<br />
* [[Starkos Tracker module]] (.sks)<br />
* [[StarTrekker / Star Tracker module]] (.mod, .nt, .flt4)<br />
* [[SunVox module]] (.sunvox)<br />
* TFMX<br />
** [[TFMX pattern data]] (.mdat)<br />
** [[TFMX 7V pattern data]] (.mdat)<br />
** [[TFMX Pro pattern data]] (.mdat)<br />
** [[TFMX sample data]] (.smpl)<br />
* Theta Music Composer<br />
** [[Theta Music Composer 8-channel stereo module]] (.tm8)<br />
** [[Theta Music Composer v1.x module]] (.tmc)<br />
** [[Theta Music Composer v2.x module]] (.tm2)<br />
* [[Trackerpacker 3 module]] (.tp3)<br />
* [[Unic Tracker 1.0]] (.unic1)<br />
* [[Unic Tracker 2.0]] (.unic2)<br />
* [[Ultra Tracker]] (.ult)<br />
* [[Velvet Studio AMS v1.x module]] (.ams)<br />
* [[VIC-TRACKER module]] (.vt)<br />
* [[Vortex Tracker module]] (.vtx)<br />
* X-Tracker<br />
** [[D-Lusion Music File]] (.dmf)<br />
** [[D-Lusion Sound File]] (.dms)<br />
<br />
== Musical instrument control ==<br />
<br />
* [[ELECTONE]] - For Yamaha Electone Range Electronic Organs<br />
** [[BOO]] - Part of the [[ELECTONE]] format. <br />
** [[EVT]] - Part of the [[ELECTONE]] format.<br />
* MIDI & Clones<br />
** [[Compact MIDI]]<br />
** [[GMD]] ([[MIDI]] clone)<br />
** [[Gravis Ultrasound patch]] (used by MIDI synthesizers)<br />
** [[HMI]] ([[MIDI]] clone)<br />
** [[HMP]] ([[MIDI]] clone)<br />
** [[HMZ]] (Compressed [[MIDI]])<br />
** [[KAR]] ([[MIDI]] Audio)<br />
** [[MIDI]] (Musical Instrument Digital Interface)<br />
** [[MIDS]] ([[MIDI]] clone)<br />
** [[MIZ]] (Compressed [[MIDI]])<br />
** [[MSS (MIDI)|MSS]] ([[MIDI]] Clone)<br />
** [[RIFF MIDI]]<br />
** [[Scalable Polyphony MIDI]]<br />
** [[SFARK]] (SoundFont archive compressed file)<br />
** [[SoundFont 1.0]]<br />
** [[SoundFont 2.0]] (.sf2)<br />
** [[Synthetic Music Application Format]]<br />
** [[XMI (Extended MIDI)]]<br />
** [[ZIPI]] (proposed MIDI replacement)<br />
* Hardware specific<br />
** AdLib Sound Cards<br />
*** [[AdLib instrument]] (.ins)<br />
*** [[AdLib instrument bank]] (.bnk)<br />
*** [[AdLib MSCplay]] (.msc)<br />
*** [[AdLib music]] (.mus)<br />
*** Adlib Tracker<br />
**** [[Adlib Tracker instrument]] (.ins)<br />
**** [[Adlib Tracker module]] (.sng)<br />
**** [[Adlib Tracker II instrument]] (.a2i)<br />
**** [[Adlib Tracker II instrument|Adlib Tracker II instrument with fm-register macro]] (.a2f)<br />
**** [[Adlib Tracker II instrument bank]] (.a2b)<br />
**** [[Adlib Tracker II instrument bank|Adlib Tracker II instrument bank with macros]] (.a2w)<br />
**** [[Adlib Tracker II module]] (.a2m)<br />
**** [[Adlib Tracker II pattern]] (.a2p)<br />
**** [[Adlib Tracker II module|Adlib Tracker II tiny module]] (.a2t)<br />
*** [[AdLib Visual Composer / Roland Synthesizer song]] (.rol)<br />
*** AMusic<br />
**** [[AMusic module]] (.amd)<br />
**** [[AMusic XMS]] (.xms)<br />
*** [[Beni Tracker module]] (.pis)<br />
*** [[Bob's Adlib Music]] (.bam)<br />
*** Boom Tracker v4.0<br />
**** [[Boom Tracker v4.0 instrument]] (.cif)<br />
**** [[Boom Tracker v4.0 module]] (.cff)<br />
*** [[DeFy Adlib Tracker module]] (.dtm)<br />
*** [[Digital FM module]] (.dfm)<br />
*** [[Drum Traker module]] (.dtl)<br />
*** [[EdLib packed module]] (.d00)<br />
*** [[Exotic AdLib module]] (.xad)<br />
*** [[Extra Simple Music]] (.xsm)<br />
*** [[Faust Music Creator module]] (.sng)<br />
*** [[FM Tracker module]] (.fmt)<br />
*** FM-Kingtracker<br />
**** [[FM-Kingtracker bank]] (.fib)<br />
**** [[FM-Kingtracker instrument]] (.fin)<br />
**** [[FM-Kingtracker module]] (.fmk)<br />
*** HSC AdLib Composer / HSC-Tracker<br />
**** [[HSC AdLib Composer / HSC-Tracker module]] (.hsc)<br />
**** [[HSC AdLib Composer / HSC-Tracker packed module]] (.hsp)<br />
*** [[JBM Adlib Music]] (.jbl)<br />
*** JCH<br />
**** [[JCH-D00]] (.d00)<br />
**** [[JCH-D01]] (.d01)<br />
*** [[Johannes Bjerregård module]] (.jbm)<br />
*** [[Master Tracker module]] (.mtr)<br />
*** [[MK-Jamz audio]] (.mkj)<br />
*** [[Mlat Adlib Tracker module]] (.mad)<br />
*** [[MPU-401 Trakker module]] (.mtk)<br />
*** [[Palladix module]] (.plx)<br />
*** [[RAW (Adlib)|RAW]] (AdLib Sound Card)<br />
*** [[Reality AdLib Tracker module]] (.rad)<br />
*** [[SNG Player module]] (.sng)<br />
*** Surprise! Adlib Tracker<br />
**** [[Surprise! AdLib Tracker v1, 5, 6 module]] (.sat)<br />
**** [[Surprise! Adlib Tracker v2.0]] (.sa2)<br />
*** [[Twin TrackPlayer module]] (.dmo)<br />
*** [[Vibrants module]] (.vib)<br />
*** [[XMS-Tracker module]] (.xms)<br />
** Akai<br />
*** [[Akai S-series MESA multi file]] (.mlt)<br />
*** [[Akai S-series MESA I program]] (.prg)<br />
*** [[Akai S-series MESA II program]] (.s3p)<br />
** [[Codisk Audio File]]<br />
** Creative Labs<br />
*** [[Creative Music Format]] (.cmf)<br />
*** [[Creative Voice File]]<br />
*** [[Sound Blaster Instrument]] (.sbi)<br />
** [[Disney Sound Source]]<br />
** [[DOSBox Raw OPL]] (.dro)<br />
** [[Downloadable Sounds Banks]] (.dls)<br />
** Gravis Ultrasound<br />
*** [[UltraSound GF1 patch]] (.pat)<br />
** [[Instrument Bank]] (Instrument Bank)<br />
** [[Software Music Synthesis System]] (for 8080/Z-80 systems with S-100 bus)<br />
** [[TRS-80 Orchestra-90]] (.orc)<br />
** [[Voice Sequence]] (.vsq)<br />
** Yamaha sound chips<br />
*** [[Callus OPL Register Log]] (YM2151, .cym)<br />
*** [[GYM]] (YM2612 / Sega Genesis)<br />
* Software Synthesizers<br />
** [[Farbrausch BR404 music]] (.bmf)<br />
** [[iZotope iDrum]] (.idrum)<br />
** Native Instruments<br />
*** [[Native Instruments Reaktor ensemble]] (.ens)<br />
** Steinberg VST Presets<br />
*** [[FXB]] (Bank of presets)<br />
*** [[FXP]] (single preset)<br />
<br />
== Musical notation ==<br />
<br />
* [[Drum tablature]]<br />
* [[Guitar tablatures]]<br />
** [[ASCII tab]] (.tab, .btab, .txt)<br />
** [[Guitar Pro]] (.gtp)<br />
*** [[Guitar Pro 3]] (.gp3)<br />
*** [[Guitar Pro 4]] (.gp4)<br />
*** [[Guitar Pro 5]] (.gp5)<br />
*** [[Guitar Pro 6]] (.gp6)<br />
** [[KGuitar]] (.kg)<br />
** [[Power Tab]] (.ptb)<br />
** [[Progression]]<br />
** [[Rich MIDI Tablature Format]] (.rmtf)<br />
** [[TablEdit]] (.tef)<br />
** [[VexTab]]<br />
<br />
* [[Musical notation]]<br />
** [[ABC (musical notation)]]<br />
** [[ANSI Music]]<br />
** Capella<br />
*** [[CAP]]<br />
*** [[CapXML]] (.capx)<br />
** [[ChordML]]<br />
** Copyist<br />
*** [[CP4]]<br />
*** [[CP6]]<br />
** [[Encore]] (.enc)<br />
** [[Extensible Music Notation Markup Language]]<br />
** [[Finale]] (.mus)<br />
** [[Forte]] (.fnf)<br />
** Guido<br />
*** [[GUIDO]]<br />
*** [[GUIDO XML]]<br />
** JMSL<br />
*** [[JMSL]]<br />
*** [[JMSL Score]]<br />
** [[JScoreML]]<br />
** [[LilyPond]]<br />
** [[MEI]]<br />
** [[MHTML]]<br />
** [[MidiXML]]<br />
** [[minimusic]]<br />
** [[MPEG4-SMR]]<br />
** [[Mup]]<br />
** [[MuseScore]]<br />
*** [[MSC]] -(old file format)<br />
*** [[MSCX]] - [[XML file format]]<br />
*** [[MSCZ]] - [[GZIP]] compressed [[MSCX]]<br />
** [[Music Description Language]]<br />
** [[Music Markup Language]]<br />
** [[Music Time]] (.mus)<br />
** [[Music Time Pro]] (.mts)<br />
** [[Musical Notation Markup Language]]<br />
** [[MusicML]]<br />
** [[MusicWrite]] (.mwk)<br />
** [[MusicXML]]<br />
** [[MusicXML compressed]] (.mxl)<br />
** [[Musink]] (.musink)<br />
** [[MusiqueXML]]<br />
** [[MusiXML]]<br />
** [[Myriad Software]] (.msf)<br />
** [[NeumesXML]]<br />
** [[Neuratron Photoscore Format]] (.opt)<br />
** [[Notation Interchange File Format]]<br />
** [[NoteAbility Pro]]<br />
** [[Noteworthy Composer and Music Publisher]] (.nwc)<br />
** [[NoteWriter]]<br />
** [[Notion]]<br />
** [[NtEd]]<br />
** [[Overture]] (.ove)<br />
** [[PriMus]]<br />
** [[Rhapsody Notation Program File]] (.rhp)<br />
** [[Rhapsody 2/3]] (RISC OS. Unrelated to the above "Rhapsody Notation Program File")<br />
** [[Rhapsody 4]] (RISC OS, .c00)<br />
** [[Rosegarden]] (.rg)<br />
** [[QuickScore Elite]] (.qsd)<br />
** [[SCORE]] (.mus)<br />
** [[Score Perfect]] (.spp)<br />
** [[ScoreML]]<br />
** [[ScoreWriter]] (.scw)<br />
** [[Sibelius]]<br />
** [[SMDL]]<br />
** [[SongWrite]]<br />
** [[Studio Session Song]] (.sss)<br />
** [[Theta]]<br />
** [[Tilia]]<br />
** [[VexTab]]<br />
** [[Virtual Musician Markup Language]]<br />
** [[WEDELMUSIC]]<br />
** [[XMF]]<br />
** [[XMusic]]<br />
** [[XScore]] (eXtensible Score Language)<br />
<br />
== Playlists, music libraries, music store downloaders ==<br />
<br />
* [[Amazon downloader file]] (.amz)<br />
* [[B4S]] (Winamp 3 playlist)<br />
* [[FPL]] (foobar2000 playlist)<br />
* [[iTunes Music Library]]<br />
* [[Kapsule]] (Kazaa XML Manifest)<br />
* [[KPL]] (Kazaa Playlist Format)<br />
* [[M3U]] (Multimedia Playlist Format)<br />
* [[MAGMA]] ([[Magnet URI]])<br />
* [[MOD4WIN Module List]] (.mol)<br />
* [[PLS]] (Multimedia Playlist)<br />
* [[RAM (RealAudio)]]<br />
* [[SMIL]] (W3C open standard)<br />
* [[WPL]] (Windows Media Playlist)<br />
* [[XML Sharable Playlist]]<br />
<br />
== Programming languages and APIs (audio/music-specific) ==<br />
<br />
* [[ChucK]] (.ck)<br />
* [[Csound]] (.csd, .orc, .sco)<br />
* Cycling 74 [[Max]] (.maxpat, .max)<br />
* [[FAUST]] (.dsp)<br />
* [[Music Macro Language]]<br />
* Native Instruments [[Reaktor]] (.rkplr)<br />
* [[Pure Data]] (.pd)<br />
* [[Scala (music software)]] (.kbm, .scl, .cmd)<br />
* [[SuperCollider]] (.scd, .sc)<br />
* [[WaveGL]]<br />
* [[Web Audio API]]<br />
<br />
== Ringtones ==<br />
<br />
* [[i Melody]]<br />
* [[M4R]] (Apple iPhone Ringtones - see [[M4A]])<br />
* [[Polyphonic ringtone]]<br />
* [[RTTTL]]<br />
<br />
== Signal processing ==<br />
<br />
These aren't specific file formats, but generic mathematical methods used by other file formats.<br />
<br />
* [[A-law]]<br />
* [[ADPCM]]<br />
* [[DPCM]]<br />
* [[LPCM]]<br />
* [[Pulse code modulation]]<br />
* [[µ-law]] (u-law)<br />
<br />
== Sound card related formats ==<br />
<br />
* [[CMS (Creative Music System)]]<br />
<br />
== Speech synthesis ==<br />
<br />
* [[Speech Synthesis Markup Language]] (SSML)<br />
* [[VoiceDescription]] (OS X)<br />
<br />
== Unclassified (need to move to other categories) ==<br />
<br />
* [[ACM]] (Audio Compression Manager)<br />
* [[ADM]] (ADM Audio File)<br />
* [[B1S]]<br />
* [[BDSP]] (BotDetect Sound Package)<br />
* [[BVG]]<br />
* [[CBD2]]<br />
* [[DSM]] (DSIK Internal)<br />
* [[DSPW]]<br />
* [[DTK]]<br />
* [[FFW]]<br />
* [[First Rate Music Hall]] (.pck, MSX-Music song editor using [[Music Macro Language]])<br />
* [[GBTS]]<br />
* [[GCUB]]<br />
* [[GSB]]<br />
* [[HLWAV]]<br />
* [[IAB]]<br />
* [[IADP]]<br />
* [[INT]] (RAW File)<br />
* [[ISWS]]<br />
* [[JSTM]]<br />
* [[KOVS]]<br />
* [[MA]] (Music Assembler)<br />
* [[MNSTR]]<br />
* [[MSF]]<br />
* [[MTAF]]<br />
* [[S98]] (NEC PC-98)<br />
* [[SD]] (ESPS sampled data file)<br />
* [[SGI]] (Sound Generator 3.0 instrument)<br />
* [[SNG (SCC Musixx)|SNG]] (SCC Musixx)<br />
* [[Sound Effect Editor]] (.see, MSX)<br />
* [[TFMX]] (TFMX)<br />
* [[Vivaldi]] (RISC OS)<br />
<br />
See the Open Cubic Player homepage for a list of demo formats: http://www.cubic.org/player/features.html<br />
<br />
See also [[Piano Rolls]] (which is under the [[Physical File Formats]]).<br />
<br />
== Links ==<br />
* [http://boingboing.net/2013/09/20/kickstarting-free-open-record.html Kickstarting free, open recordings of Bach's "Well-Tempered Clavier, Book 1"]<br />
* [http://mpc-hc.org/ MPC-HC: media player for Windows handling just about all video/audio formats]<br />
* [http://boingboing.net/2013/09/27/david-byrnes-how-music-wor.html How Music Works]<br />
* [http://www.textfiles.com/programming/FORMATS/admusfmt.pro Some discussion of "advanced music formats" from 1994]<br />
* [http://www.textfiles.com/programming/FORMATS/audiof23.txt FAQ on audio file formats (1992-07-09)]<br />
* [http://boingboing.net/2013/11/03/this-must-be-the-8-bit-place.html Chiptune version of Talking Heads song]<br />
* [http://www.youtube.com/watch?v=3Z2vU8M6CYI Beatles 3000: humorous video of how the future might misunderstand 20th century pop culture if artifacts decay as happened in the past]<br />
* [http://publicdomainreview.tumblr.com/post/76437123224/chaoscontrolled123-luke-and-i-were-looking-at The Music Written on This Dude's Butt]<br />
* [http://vimeo.com/58200103 "Eye of the tiger" played on a modified dot matrix printer]<br />
* [http://chipflip.wordpress.com/2014/03/09/a-short-history-of-hardcore-chipmusic/ A Short History of Hardcore Chipmusic]<br />
* [https://medium.com/message/you-need-to-hear-this-extremely-rare-recording-27619411e077 You Need to Hear This Extremely Rare Recording]<br />
* [http://www.loc.gov/preservation/resources/rfs/audio.html Library of Congress Recommended Format Specifications: Audio Works]<br />
* [http://betaboston.com/news/2014/07/17/in-a-bid-for-more-emotional-snacking-frito-lay-patents-culinary-theme-songs/ In a bid for more emotional snacking, Frito-Lay patents culinary theme songs]<br />
* [http://www.theverge.com/2014/8/4/5968243/mit-turns-recorded-vibrations-back-into-speech-and-music Scientists reconstruct speech through soundproof glass by watching a bag of potato chips]<br />
* [http://www.palmbeachpost.com/ap/ap/business/apple-releases-tool-to-remove-free-u2-album/nhNG9/ Apple releases tool to remove free U2 album] (which they gave you whether you wanted it or not)<br />
* [https://github.com/AyrA/ExcelPlayer Excel sheet that plays video and audio]<br />
* [http://webaudio.github.io/web-audio-api/ Web Audio API (W3C)]<br />
* [http://www.wonderingsound.com/feature/why-collecting-music-matters/ Why Collecting Matters: Citizen Archivists and the Battle for Future Pasts]<br />
* [http://mediaarea.net/en/MediaInfo MediaInfo: software that shows metadata for audio/video files]<br />
* [http://www.bl.uk/projects/save-our-sounds Save our Sounds]<br />
* [http://www.davidsystems.com/#tools David Systems tools: includes online loudness analysis of sound files]<br />
* [http://createdigitalmusic.com/2015/07/next-web-standard-music-notation/ The next Web standard could be music notation]<br />
* [https://www.youtube.com/watch?v=q_3d1x2VPxk How Oldschool Sound/Music worked] (video)<br />
* [http://www.crutchfield.com/S-ulligiNLBZf/learn/learningcenter/home/hometheater_surround.html Understanding surround sound formats]<br />
* [http://www.righto.com/2017/04/reverse-engineering-76477-space.html Reverse engineering the 76477 "Space Invaders" sound effect chip from die photos]<br />
<br />
[[Category:Audio and Music| ]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Audio_and_MusicAudio and Music2018-05-10T11:44:28Z<p>Kyz: /* Emulated music */</p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|thiscat=Audio and Music<br />
|image=Music.jpg<br />
|caption=Musical notation<br />
}}<br />
<br />
== Introduction ==<br />
[[Electronic_File_Formats|Electronic Formats]] concerned with audio and musical data, including sound recording, instrument control, musical notation, etc.<br />
<br />
* For an excellent introduction to the issues around audio and video formats, see [http://www.avpreserve.com/blog/a-primer-on-codecs-for-moving-image-and-sound-archives-2/ A Primer on Codecs for Moving Image and Sound Archives - and 10 Recommendations for Codec Selection & Management] [http://www.avpreserve.com/wp-content/uploads/2010/04/AVPS_Codec_Primer.pdf PDF version]<br />
* [http://www.garymcgath.com/streamingprotocols.html Basics of streaming protocols]<br />
<br />
== Audio and sequencer software ==<br />
<br />
* Ableton<br />
** [[Ableton Live]]<br />
* Aldrin<br />
** [[Creative Commons Module]] (.ccm)<br />
* [[Audacity Project Format]] (.aup)<br />
* Cakewalk<br />
** [[Cakewalk Project (CWP)]] (.cwp)<br />
** [[Cakewalk Project (WRK)]] (.wrk)<br />
** [[Cakewalk Sample Definition File]] (.sfz)<br />
* [[Cool Edit / Audition Multi Track Session file]] (.sss)<br />
* [[CPS project]] (.cps)<br />
* FruityLoops / FL Studio<br />
** [[DrumSynth Preset]] (.ds)<br />
** [[FL Studio Score File]] (.fsc)<br />
** [[FL Studio State File]] (.fst)<br />
** [[Humanize Preset]] (.fpr)<br />
** [[Raw FL Studio Project]] (.flp)<br />
** [[SimSynth Preset]] (.syn)<br />
** [[Speech Preset]] (.speech)<br />
* GarageBand (Mac)<br />
** [[GarageBand project]] (.band, .gbproj)<br />
** [[Magic GarageBand template]] (.wand)<br />
** [[GarageBand MagicMentor template]] (.mwand)<br />
* [[Hydrogen]] (.h2song, .h2pattern)<br />
* [[Jacker song]]<br />
* Jeskola Buzz<br />
** [[Jeskola Buzz machine]] (.dll)<br />
** [[Jeskola Buzz machine preset]] (.prs)<br />
** [[Jeskola Buzz song]] (.bmx)<br />
* [[LMMS]] (Linux MultiMedia Studio) (.mmp, .mmpz)<br />
* [[LOGIC]] (Logic)<br />
* [[Maestro]] (RISC OS)<br />
* [[Make-A-Melody]] (''Big Blue Disk'' #42) (.mus)<br />
* Piston Collage<br />
** [[Piston Collage noise]] (.ptnoise)<br />
** [[Piston Collage song]] (.ptcop, .pttune)<br />
** [[Piston Collage voice]] (.ptvoice)<br />
* Pro Tools<br />
** [[PTS]] (Pro Tools 7-9) <br />
** [[PTX]] (Pro Tools 10)<br />
* Propellerhead Reason<br />
** [[Propellerhead Reason NN-XT Patch File]] (.sx2)<br />
** [[Propellerhead Reason Reason Project File]] (.rsn)<br />
** [[Propellerhead Reason Reason Song File]](.rns)<br />
** [[Propellerhead Reason REX2 Audio File]] (.rx2)<br />
** [[Propellerhead Reason ReCycle Loop File]] (.rex)<br />
** [[Propellerhead Reason ReFill Sound Bank]] (.rfl)<br />
* [[Renoise]]<br />
** [[Renoise song]] (.xrns)<br />
** [[Renoise instrument]] (.xrni)<br />
** [[Renoise DSP device-chain]] (.xrnt)<br />
* SeaTone<br />
** [[SeaTone song]] (.pxt)<br />
* Steinberg<br />
** [[CUBASE]]<br />
*** [[ALL]] - A Steinberg [[CUBASE]] VST file for saving songs (pre 2002).<br />
*** [[ARR]] - A Steinberg [[CUBASE]] VST file for saving arrangements (pre 2002). <br />
*** [[CPR]] - A Steinberg [[CUBASE]] SX file for saving projects (2002 - ).<br />
*** [[NPR]] - A Steinberg [[NUENDO]] file for saving arrangements (2002 - ).<br />
** Wavelab<br />
*** [[MON]] (Audio montage)<br />
* [[(Super) Studio Session song]] (.sss)<br />
<br />
== Audio recording and sound waves ==<br />
<br />
* Lossless compression<br />
** [[ATRAC Advanced Lossless]] (.aal)<br />
** [[ADA]] (Advanced Digital Audio)<br />
** [[ALAC]] (Apple Lossless Audio Codec)<br />
** [[APAC]] (Marian's A-pac)<br />
** [[Dakx Wav]]<br />
** [[Dolby TrueHD]]<br />
** [[DTS-HD]] (Lossless variant of DTS- DTS-HD Master Audio)<br />
** [[FLAC]] (Free Lossless Audio Codec)<br />
** [[Kexis]] (.kxs)<br />
** [[LA]] (Lossless Audio)<br />
** [[LiteWave]]<br />
** [[LPAC]] (Lossless Predictive Audio Coding)<br />
** [[MKW]]<br />
** [[MLP]] (Meridian Lossless Packing Audio)<br />
** [[Monkey's Audio]] (.ape)<br />
** [[MPEG-4 ALS]] (MPEG-4 Audio Lossless Coding)<br />
** [[MPEG-4 SLS]] (MPEG-4 Scalable lossless coding mode)<br />
** [[MQA]] (Master Quality Authenticated)<br />
** [[OptimFROG]] (.ofr, .ofs)<br />
** [[Perfect Clarity Audio]] (.pca)<br />
** [[RALF]] (Real Lossless Audio Codec)<br />
** [[RK Audio]] (.rka)<br />
** [[Shorten]] (.shn)<br />
** [[Sonarc]]<br />
** [[Split2000]]<br />
** [[TAK]] (.tak)<br />
** [[True Audio]] (.tta)<br />
** [[VocPack]]<br />
** [[WavArc]]<br />
** [[WavPack]] (.wv)<br />
** [[WMA Lossless]] (Windows Media Audio 9 Lossless)<br />
* Lossy compression<br />
** [[AAC]] (Advanced Audio Coding)<br />
** Adaptive differential pulse-code modulation<br />
*** [[ACT]]<br />
*** [[MNF]] (Yamaha ADPCM)<br />
*** [[SPB]] (Yamaha ADPCM)<br />
*** [[VOX]]<br />
** [[Adaptive Multi-Rate WideBand Audio]]<br />
** ATRAC or [[Adaptive Transform Acoustic Coding]] (.aa3, .oma, .at3)<br />
** [[Audible Audiobook]] (.aa, .aax)<br />
** [[CELT]] (.ogg)<br />
** [[Dolby Digital]] (AC-3 or ATSC A/52)<br />
** [[Digital Theater Systems]] (.dts)<br />
** [[GSM]] (GSM 6.10 RPE-LTP)<br />
** [[MPEG-4 Audio]] (.m4a, .m4b, .m4p, .m4r, .mp4)<br />
** [[M4B]] (iTunes Audio Book)<br />
** [[M4P]] (Fairplay DRM Encrypted [[M4A]])<br />
** [[MPC (Musepack)|MP+]] (MPEGplus Audio)<br />
** [[MP1]] (MPEG Audio Layer 1)<br />
** [[MP2]] (MPEG-1 Audio Layer II)<br />
** [[MP3]] (MPEG-1 / MPEG-2 Audio Layer III)<br />
*** [[packMP3]]<br />
** [[MPA]] (MPEG Audio)<br />
** [[Musepack Audio]] (.mpc)<br />
** [[Opus]] (.opus)<br />
** [[RealAudio]] (.ra)<br />
** [[Speex]] (.spx)<br />
** [[Vorbis]] (.logg, .oga, .ogg)<br />
** [[WMA]] (Windows Media Audio)<br />
* Proprietary<br />
** [[DCT]] (Dictation format by NCH Software)<br />
** [[Digital Speech Standard]] (.dss)<br />
** [[Digital Voice File]] (.dvf)<br />
** [[IC Sound]] (.ics)<br />
** [[IKLAX]] (iKlax Media)<br />
** [[Memory Stick Voice]] (.msv)<br />
** [[Pono]]<br />
* Separated parts of tracks<br />
** [[Stems]]<br />
* Uncompressed audio<br />
** [[AIFF|AIF / AIFF]] (Audio Interchange File Format)<br />
** [[Berkeley/IRCAM/Carl Sound Format]] (.sf)<br />
** [[BWF]] (Broadcast Wave Format; variant of WAV)<br />
** [[DSD]] (Direct Stream Digital) (.dsf)<br />
** [[RAW (Audio)|RAW]] (.raw, .pcm)<br />
** [[RF64]] (extended variant of BWF)<br />
** [[Sony Wave64]] (.w64)<br />
** [[WAV]] (Waveform Audio File Format)<br />
* Various encodings<br />
** [[AIFC]] ([[AIFF]] Compressed)<br />
** [[AU]] (Sun Microsystems audio format)<br />
** [[Computerized Speech Lab NSP]] (.nsp)<br />
** [[Bonk]] (lossy/lossless audio compression)<br />
** [[INRS-Telecom file]] (.aud)<br />
** [[SPPACK]] (.d)<br />
** [[WVE (Psion)]]<br />
<br />
== Chiptune ==<br />
<br />
* [[SAM Coupé song]] (.cop, .sng)<br />
<br />
== Configuration files ==<br />
<br />
* [[X2A]] (Yamaha S70xs/S90xs keyboard workstations)<br />
<br />
== Container formats ==<br />
<br />
* [[ASF]] (Advanced Systems Format)<br />
* [[Core Audio Format]] (.caf)<br />
* [[Extensible Music Format]] (.xmf)<br />
* [[Matroska Audio]] (.mka)<br />
* [[MP4]] (MPEG-4 Part 14 media container)<br />
* [[Ogg]] (.ogg, .oga, .ogx, .spx, .opus)<br />
* [[Rich Music Format]] (.rmf)<br />
* [[RealMedia]] (.rm)<br />
* [[WebM]] (.webm) (also used for video)<br />
<br />
== Converters ==<br />
<br />
* [[Konvertor]]<br />
<br />
== Emulated music ==<br />
<br />
* [[2SF]] (Nintendo DS [[PSF]])<br />
* [[3G2]] (3GPP, also a video format)<br />
* [[3GP]] (3GPP, also a video format)<br />
* [[AY]] (Amstrad CPC / ZX Spectrum)<br />
* [[Custom Amiga Module|Cust]] (Amiga)<br />
* [[DSF]] (Dreamcast [[Portable Sound Format|PSF]])<br />
* [[EPSGMOD]] (.epsgmod, Mod2PSG)<br />
* [[Fuxoft AY Language]] (.fmx)<br />
* [[GBR]] (Game Boy Sound)<br />
* [[Game Boy Sound]] (.gbs)<br />
* [[GSF]] (Game Boy Advance [[PSF]])<br />
* [[GSR]] (Gens Sound Record)<br />
* [[HES]] (Hudson Entertainment System)<br />
* [[KSS]] (MSX)<br />
* [[KSSX]] (Possible expansion of [[KSS]])<br />
* [[MDX]] (Sharp X68000 / MXDRV)<br />
* [[NES Sound Format]] (.nsf)<br />
* [[NES Sound Format Extended]] (.nsfe)<br />
* [[Portable Sound Format|PSF]] (Portable Sound Format)<br />
* [[PSF1]] (Playstation [[PSF]])<br />
* [[PSF2]] (Playstation 2 [[PSF]])<br />
* [[QSF]] (Capcom Q-Sound [[PSF]])<br />
* [[SC68]] (Atari ST / Atari STE / Amiga)<br />
* [[SGC]] (Sega Master System / Game Gear / Colecovision)<br />
* [[SID]] (Commodore 64)<br />
* [[Atari SoundHeader|SNDH]] (Atari SoundHeader)<br />
* [[SPC (Audio)|SPC]] (Super Nintendo SPC700)<br />
* [[SSF]] (Sega Saturn [[Portable Sound Format|PSF]])<br />
* [[USF]] (Nintendo 64 [[Portable Sound Format|PSF]])<br />
* [[YM]] (Amstrad CPC / Spectrum ZX / Atari ST)<br />
* [[ZXAYEMUL Sound]] (.cpc)<br />
<br />
== Game audio and music ==<br />
<br />
(see also [[Game data files]])<br />
<br />
* [[4X IMA ADPCM]]<br />
* Accolade<br />
** [[Accolade MIDI File Format]]<br />
* Adept Software<br />
** [[God of Thunder Music Format]]<br />
* [[AFC]] (AFX Audio File) -- used in Mass Effect 2<br />
* Apogee<br />
** [[Crystal Caves Sound format]]<br />
* Atari<br />
** [[Slight Atari Player]] (Atari POKEY)<br />
* [[BAF]] (Blur ADPCM)<br />
* [[BAKA]] (PCM 16 bit)<br />
* Bandai<br />
** [[WSR]] (WonderSwan / WonderSwan Color)<br />
* [[BH2PCM]]<br />
* [[BNSF]] (G.722.1)<br />
* Cave Story<br />
** [[Organya]]<br />
* Commodore Amiga<br />
** [[A.M. Composer v1.2]] (.amc)<br />
** [[AC1D-DC1A Packer]] (.ac1d)<br />
** [[Actionamics Sound Tool]] (.ast)<br />
** [[AMOS Music Bank]] (.abk)<br />
** [[AMOS Memory Bank#AMOS Samples Bank|AMOS Samples Bank]] (.abk)<br />
** [[Amos Basic Konverter]] (.ambk)<br />
** [[Art & Magic]] (.aam)<br />
** [[Audio Sculpture]] (.as)<br />
** [[Beathoven Synthesiser]] (.bss)<br />
** [[Ben Replay]] (.ben)<br />
** [[Benn Daglish]] (.bd)<br />
** [[Benn Daglish SID]] (.bds)<br />
** [[Channel Players]] (.chan)<br />
** [[Cinemaware]] (.cin)<br />
** [[Core Design]] (.core)<br />
** [[CustomMade]] (.cm)<br />
** [[Darius Zendeh]] (.dz)<br />
** [[Dave Lowe]] (.dl)<br />
** [[Dave Lowe New]] (.dln)<br />
** [[David Hanney]] (.dh)<br />
** [[David Whittaker]] (.dw)<br />
** [[Desire]] (.dsr)<br />
** [[Digital Illusions]] (.di)<br />
** [[Digital Sonix & Chrome]] (.dsc)<br />
** [[Digital Sound Creations]] (.han)<br />
** [[Dirk Bialluch]] (.tpu)<br />
** [[Dynamic Synthesizer]] (.dns)<br />
** [[Editeur Musical Sequentiel]] (.ems)<br />
** [[Follin Player II]] (.tf)<br />
** [[Fred Editor]] (.fred)<br />
** [[Fred Gray]] (.fg)<br />
** [[Future Player]] (.fp)<br />
** [[FWMP]] (.fw)<br />
** [[Game Music Creator]] (.gmc)<br />
** [[Gnu Player]] (.gp)<br />
** [[Hippel]] (.hip)<br />
** [[Hippel-COSO]] (.hipc)<br />
** [[Hornet Packer]] (.hrt)<br />
** [[Howie Davies]] (.hd)<br />
** [[IFF-MAUD]]<br />
** [[Images Music System]] (.ims)<br />
** [[Infogrames INS]] (.ins)<br />
** [[Janko Mrsic-Flogel]] (.jmf)<br />
** [[Jason Brooke]] (.jcb)<br />
** [[Jason Page]] (.jp)<br />
** [[Jeroen Tel]] (.jt)<br />
** [[Jesper Olsen]] (.jo)<br />
** [[Jochen Hippel]] (.hip)<br />
** [[Kefrens Sound Machine]] (.ksm)<br />
** [[Kris Hatlelid]] (.kh)<br />
** [[Leggless Music Editor]] (.lme)<br />
** [[Magnetic Fields Packer]] (.mfp)<br />
** [[Maniacs of Noise]] (.mon, .jt)<br />
** [[Mark Cooksey]] (.mc)<br />
** [[Mark II Sound-System]] (.mii, .mk2, .mkii)<br />
** [[Martin Walker]] (.mw)<br />
** [[MaxTrax]] (.mxtx)<br />
** [[Mike Davies]] (.md)<br />
** [[MMDC]] (Module packer)<br />
** [[Mugician]] (.mug)<br />
** [[Mugician II]] (.mug2)<br />
** [[NoiseRunner]] (.nr)<br />
** [[NovoTrade Packer]] (.ntp)<br />
** [[Pierre Adane Packer]] (.pap)<br />
** [[Power Music]] (.pm)<br />
** [[Professional Sound Artists]] (.psa)<br />
** [[Promizer 0.1]] (.pm01)<br />
** [[Promizer 1.0c]] (.pm10)<br />
** [[Promizer 1.8a]] (.pm18)<br />
** [[Promizer 2.0]] (.pm20)<br />
** [[Promizer 4.0]] (.pm40)<br />
** [[ProPacker 1.0]] (.pp10)<br />
** [[ProPacker 2.1]] (.pp21)<br />
** [[ProPacker 3.0]] (.pp30)<br />
** [[Prorunner 1.0]] (.prun1)<br />
** [[Prorunner 2.0]] (.prun2)<br />
** [[Richard Joseph]] or Vectordean (.rjp)<br />
** [[Rob Hubbard]] (.rh, .rho)<br />
** [[Ron Klaren]] (.rk)<br />
** [[Sean Connolly]] (.scn)<br />
** [[Sean Conran]] (.scr)<br />
** [[Sidmon]] (.sid)<br />
** [[Sidmon II]] (.sid2)<br />
** [[Silmarils]] (.mok)<br />
** [[SKYT Packer]] (.skyt)<br />
** [[Sonic Arranger]] (.sa)<br />
** [[Sound Images]] (.tw)<br />
** [[Sound Master]] (.sm)<br />
** [[Sound Programming Language]] (.spl)<br />
** [[Soundcontrol]] (.sct)<br />
** [[Soundfactory]] (.psf)<br />
** [[SoundPlayer]] (.sjs)<br />
** [[Special FX]] (.jd)<br />
** [[Speedy System]] (.ss)<br />
** [[Steve Barrett]] (.sb)<br />
** [[Jason Page|Steve Turner]] (.jpo)<br />
* [[Star Trekker Packer]] (.stpk)<br />
** [[Synth Dream]] (.sdr)<br />
** [[Synth Pack]] (.osp)<br />
** [[The Musical Enlightenment]] (.tme)<br />
** [[The Player 2.2a]] (.p22a)<br />
** [[The Player 3.0a]] (.p30a)<br />
** [[The Player 4.0a]] (.p40a)<br />
** [[The Player 4.0b]] (.p40b)<br />
** [[The Player 5.0a]] (.p50a)<br />
** [[The Player 6.0a]] (.p60a)<br />
** [[The Player 6.1a]] (.p61a)<br />
** [[Titanics Player]] (.ttp)<br />
** [[Tracker Packer 1]] (.tp1)<br />
** [[Tracker Packer 2]] (.tp2)<br />
** [[Tracker Packer 3]] (.tp3)<br />
** [[Thomas Hermann]] (.thm)<br />
** [[Wally Beben]] (.wb)<br />
** [[Wanton Packer]] (.wn)<br />
** [[XANN Packer]] (.xann)<br />
** [[Zen Packer]] (.zen)<br />
* CRI Middleware<br />
** [[ADX]]<br />
** [[AFS]] (container format for [[ADX]] / [[AHX (CRI)]])<br />
** [[AHX (CRI)]]<br />
** [[AIX]]<br />
* [[DCS]] (ADPCM)<br />
* [[Death Rally Archive]] (.bpa)<br />
* [[DMSG]] (PCM 16 bit)<br />
* [[EACS IMA ADPCM]] (.kcey)<br />
* Electronic Arts<br />
** [[8-Bit Sampled Voice]] (.8svx, .iff)<br />
** [[Asylum Music Format]] (.amf, used in Crusader: No Remorse / Crusader: No Regret)<br />
** [[Electronic Arts AS4 / ASF Music]] (.as4, .asf)<br />
** [[Electronic Arts KSF Music]] (.ksf)<br />
** [[Electronic Arts MUS]] (.mus)<br />
** [[Electronic Arts SCxl]]<br />
** [[Electronic Arts Sound Effects]] (.bnk, .crd)<br />
** [[Electronic Arts Sound / Speech Files]] (.eas, .sph)<br />
** [[IFF]] (Amiga 8SVX)<br />
*** [[IFF-MAUD]]<br />
** [[Sonix Music Driver]] (.smus)<br />
* [[EMFF]] (ADPCM)<br />
* Epic Megagames<br />
** [[Epic Megagames MASI]] (.masi, .psm)<br />
* [[Final Fantasy XI Music file]] (.bgw)<br />
* [[FMOD Sample Bank]] (.fsb)<br />
* [[Funcom ISS]]<br />
* Galaxy Music System<br />
** [[Galaxy Music System v4.0]]<br />
** [[Galaxy Music System v5.0]] (.j2b)<br />
* [[GCW]] (PCM 16 bit)<br />
* [[Generic Header]] (.genh, Generic Header Creator)<br />
* Herad Music System<br />
** [[Herad Music System AGD]] (.agd)<br />
** [[Herad Music System SDB]] (.sdb)<br />
** [[Herad Music System SQX]] (.sqx)<br />
* [[HIS]] (PCM 8 bit)<br />
* id Software<br />
** [[Doom MUS]]<br />
** [[id Software DNF]] (.dnf)<br />
** [[id Software Music Format]] (.imf)<br />
** [[id Software WLF]] (.wlf)<br />
* [[IMA ADPCM]] (.bar, .dvi, .hwas, .idvi, .ivaud, .myspd, .stma, .strm)<br />
* [[Interplay ACM]] (.acm)<br />
* [[Inverse Frequency Sound format]]<br />
* [[iXMF]] (Interactive [[Extensible Music Format]])<br />
* Ken Silverman<br />
** [[Ken's Adlib Music]] (.ksm)<br />
** [[Ken's Digital Music]] (.kdm)<br />
** [[SM (Ken Silverman)]] (.sm)<br />
** [[SND (Ken Silverman)]] (.snd)<br />
* [[LOUDNESS Sound System]] (.lds)<br />
* LucasArts<br />
** [[LucasArts Adlib Audio]] (.laa)<br />
** [[SCUMM]] (SCUMM)<br />
* [[Martin Fernandez]] (.adlib)<br />
* Microsoft<br />
** [[0x0069]] (Xbox ADPCM)<br />
** [[2DX]]<br />
** [[2DX9]] (ADPCM)<br />
** [[DE2]] (ADPCM)<br />
** [[Xbox IMA ADPCM]] (.matx, .wavm, .wvs, .xmu, .xvas, .xwav)<br />
* Nintendo<br />
** [[Advanced Mario Sequencer file]] (.mss)<br />
** [[BRSTMPSM]] (Super Paper Mario)<br />
** [[Donkey Konga 2 DSP]] (Donkey Konga 2)<br />
** [[Mario Paint Composer]] (MPC)<br />
** [[Mario Sequencer file]] (.msq)<br />
** [[Nintendo GameCube / Wii AAAP]]<br />
** [[Nintendo GameCube / Wii ADP]] (Nintendo Gamecube) (.adp)<br />
** [[Nintendo GameCube / Wii AFC]] (Nintendo Gamecube)<br />
** [[Nintendo GameCube / Wii AGSC]] (.agsc)<br />
** [[Nintendo GameCube / Wii AMTS]]<br />
** [[Nintendo GameCube / Wii ASN]] (Nintendo Gamecube)<br />
** [[Nintendo GameCube / Wii ASR]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii AST]] (Nintendo Wii sound format)<br />
** [[Nintendo GameCube / Wii BNS]]<br />
** [[Nintendo GameCube / Wii BO2]]<br />
** [[Nintendo GameCube / Wii BRSTM]] (Nintendo Wii streaming format)<br />
** [[Nintendo GameCube / Wii CAPDSP]]<br />
** [[Nintendo GameCube / Wii CFN]]<br />
** [[Nintendo GameCube / Wii DDSP]]<br />
** [[Nintendo GameCube / Wii DSP]]<br />
** [[Nintendo GameCube / Wii GCA]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii GCM]]<br />
** [[Nintendo GameCube / Wii GSP]]<br />
** [[Nintendo GameCube / Wii HPS]]<br />
** [[Nintendo GameCube / Wii IDSP]]<br />
** [[Nintendo GameCube / Wii ISD]]<br />
** [[Nintendo GameCube / Wii ISH]]<br />
** [[Nintendo GameCube / Wii KRAW]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii LPS]]<br />
** [[Nintendo GameCube / Wii MPDS]]<br />
** [[Nintendo GameCube / Wii MPDSP]]<br />
** [[Nintendo GameCube / Wii MSS]]<br />
** [[Nintendo GameCube / Wii MUS]]<br />
** [[Nintendo GameCube / Wii PDT]]<br />
** [[Nintendo GameCube / Wii SDT]]<br />
** [[Nintendo GameCube / Wii SMP]]<br />
** [[Nintendo GameCube / Wii SNS]]<br />
** [[Nintendo GameCube / Wii SPD]]<br />
** [[Nintendo GameCube / Wii SPT]]<br />
** [[Nintendo GameCube / Wii SSM]]<br />
** [[Nintendo GameCube / Wii STM]]<br />
** [[Nintendo GameCube / Wii STR]]<br />
** [[Nintendo GameCube / Wii STS]]<br />
** [[Nintendo GameCube / Wii SWD]]<br />
** [[Nintendo GameCube / Wii THP]]<br />
** [[Nintendo GameCube / Wii TYDSP]]<br />
** [[Nintendo GameCube / Wii VJDSP]]<br />
** [[Nintendo GameCube / Wii WAS]]<br />
** [[Nintendo GameCube / Wii WSD]]<br />
** [[Nintendo GameCube / Wii WSI]]<br />
** [[Nintendo GameCube / Wii YDSP]]<br />
** [[Nintendo GameCube / Wii YMF]]<br />
** [[Nintendo GameCube / Wii ZWDSP]]<br />
** [[SHI]] ([http://battleofthebits.org/lyceum/View/ShroomTool ShroomTool] Instrument, used for Mario Paint instruments)<br />
** [[SHO]] (ShroomTool, used for Mario Paint sounds)<br />
* Origin Software<br />
** [[Ultima 6 Music]] (.m)<br />
* Pixel<br />
** [[PMD (Pixel)]]<br />
* [[Pixel Painters]] (.fmf)<br />
* [[Ragnarok Online 2 RMP]]<br />
* [[Shadowlands]] (.cal)<br />
* Sierra<br />
** [[Sierra AGI]] (Sierra AGI)<br />
** [[Sierra SCI]] (Used in Sierra PC games)<br />
* Sony<br />
** [[Sony Playstation ADS]] (Sony Playstation)<br />
** [[Sony Playstation ASS]] (Sony Playstation)<br />
** [[Sony Playstation AST]]<br />
** [[Sony Playstation BG00]]<br />
** [[Sony Playstation BMDX]]<br />
** [[Sony Playstation CCC]] (Sony Playstation)<br />
** [[Sony Playstation CNK]]<br />
** [[Sony Playstation DXH]] (Sony Playstation)<br />
** [[Sony Playstation ENTH]]<br />
** [[Sony Playstation FAG]] (Sony Playstation)<br />
** [[Sony Playstation FILP]]<br />
** [[Sony Playstation FSB]] (Sony Playstation)<br />
** [[Sony Playstation GCM]]<br />
** [[Sony Playstation GMS]] (Sony Playstation)<br />
** [[Sony Playstation HGC1]]<br />
** [[Sony Playstation I100]] (Sony Playstation)<br />
** [[Sony Playstation I400]] (Sony Playstation)<br />
** [[Sony Playstation I80]] (Sony Playstation)<br />
** [[Sony Playstation IKM]]<br />
** [[Sony Playstation ILD]] (Sony Playstation)<br />
** [[Sony Playstation IVB]]<br />
** [[Sony Playstation JOE]]<br />
** [[Sony Playstation KCES]] (Sony Playstation)<br />
** [[Sony Playstation KHV]] (Sony Playstation)<br />
** [[Sony Playstation LEG]] (Sony Playstation)<br />
** [[Sony Playstation MCG]]<br />
** [[Sony Playstation MI4]] (Sony Playstation)<br />
** [[Sony Playstation MIB]] (Sony Playstation)<br />
** [[Sony Playstation MIC]] (Sony Playstation)<br />
** [[Sony Playstation MIH]]<br />
** [[Sony Playstation MIHB]] (merged [[Sony Playstation MIB|MIB]] & [[Sony Playstation MIH|MIH]])<br />
** [[Sony Playstation MSA]]<br />
** [[Sony Playstation MSVP]]<br />
** [[Sony Playstation MUSC]]<br />
** [[Sony Playstation NPSF]]<br />
** [[Sony Playstation PNB]]<br />
** [[Sony Playstation PSH]]<br />
** [[Sony Playstation RKV]]<br />
** [[Sony Playstation RND]]<br />
** [[Sony Playstation RSTM]]<br />
** [[Sony Playstation RWS]]<br />
** [[Sony Playstation SFS]]<br />
** [[Sony Playstation SIR]]<br />
** [[Sony Playstation SL3]]<br />
** [[Sony Playstation SMPL]]<br />
** [[Sony Playstation SND]]<br />
** [[Sony Playstation SPU]] (Sony Playstation)<br />
** [[Sony Playstation STER]]<br />
** [[Sony Playstation STH]]<br />
** [[Sony Playstation STR]]<br />
** [[Sony Playstation STS]]<br />
** [[Sony Playstation SVAG]]<br />
** [[Sony Playstation SVS]]<br />
** [[Sony Playstation TEC]]<br />
** [[Sony Playstation TK5]]<br />
** [[Sony Playstation VAS]]<br />
** [[Sony Playstation VAG]]<br />
** [[Sony Playstation VB2]] (Playstation / PS2)<br />
** [[Sony Playstation VGS]]<br />
** [[Sony Playstation VIG]]<br />
** [[Sony Playstation VPK]]<br />
** [[Sony Playstation VS]]<br />
** [[Sony Playstation VSF]]<br />
** [[Sony Playstation WP2]]<br />
** [[Sony Playstation XA2]]<br />
** [[Sony Playstation XA30]]<br />
** [[Sony Playstation 2 MI2]] (Sony Playstation 2)<br />
* [[Sound Images Generation 2]] (.sig)<br />
* [[Sound Interface System]] (.lem)<br />
* [[STOS memory bank]] (.mbk)<br />
* [[Unreal Music Format]] (.umx)<br />
* Union Logic Software Publishing<br />
** [[Vinyl Goddess From Mars Instrument Format]]<br />
** [[Vinyl Goddess From Mars Music Format]]<br />
* [[Unique Development Studios]] (.uds)<br />
* [[Video Game Music]] (.vgm, .vgz)<br />
* Westwood Studios<br />
** [[Westwood Studios ADL]] (.adl)<br />
** [[Westwood Studios AUD]] (.aud)<br />
* [[Whacky Wheels]] (.klm)<br />
* [[XMP Game Module]] (.j2b)<br />
<br />
== Metadata formats and related data ==<br />
<br />
* [[APE tag]]<br />
* Cue Sheet - See [[CUE and BIN]]<br />
* [[Exif]]<br />
* [[ID3]]<br />
* [[ISRC]] (International Standard Recording Code)<br />
* [[MDZ]] - strictly not itself a music format, but a metadata file for other music files used by Open Cubic Player. See http://www.cubic.org/player/doc/node72.htm<br />
* [[Monkey's Audio metadata]] (.apl)<br />
* [[Vorbis comment]]<br />
<br />
== Music trackers ==<br />
<br />
* [[1tracker module]] (.1tm)<br />
* [[AHX (Abyss)]] (Abyss Highest eXperience)<br />
* [[Aley's Module]] (.alm)<br />
* [[All Sound Tracker module]] (.ast)<br />
* [[Amiga Module]] (.mod)<br />
* [[AProSys module]] (.aps)<br />
* [[Archimedes Tracker module]] (.musx)<br />
* [[Arkos Tracker]] (.aks)<br />
* [[Art of Noise module]] (.aon)<br />
* [[ASC Sound Master module]] (.asc)<br />
* [[B's Pro Tracker module]] (.bpm, .bps)<br />
* [[Beepola song]] (.bbsong)<br />
* [[BeRoTracker module]] (.br)<br />
* [[BoyScout Tracker module]] (.bsf)<br />
* Brian Postma SoundMon<br />
** [[Brian Postma SoundMon v1.x module]] (.bp)<br />
** [[Brian Postma SoundMon v2.x & v3.x module]] (.bp3)<br />
** [[BS]]<br />
* Buzzic<br />
** [[Buzzic v1.x]] (.buz)<br />
** [[Buzzic v2.0]] (.buz2)<br />
* Chaos Music Composer<br />
** [[CM3]] ([[CMC]] "3/4")<br />
** [[CMC]] (Chaos Music Composer)<br />
** [[CMR]] ([[CMC]] "Rzog")<br />
** [[CMS]] (Stereo Double [[CMC]])<br />
** [[DMC]] (Double ChaosMusicComposer)<br />
* [[Chuck Biscuits/Black Artist module]] (.cba)<br />
* [[Coconizer module]]<br />
* [[Composer 669 module]] (.669)<br />
* [[craptracker ii module]] (.ct2)<br />
* [[Custom Amiga Module]] (.cus. .custom)<br />
* CyberTracker<br />
** [[CyberTracker instrument]] (.ci)<br />
** [[CyberTracker module]] (.ct)<br />
* [[DeliTracker custom]] (.cust)<br />
* [[DeltaMusic module]] (.dta)<br />
* Delta Music Composer<br />
** [[Delta Music Composer module]] (.dlt)<br />
** [[Delta Music 2.0 module]] (.dl2)<br />
* [[Desktop Tracker module]] (.dtt)<br />
* DigiBooster / DigiBooster PRO<br />
** [[DigiBooster v1.x module]] (.digi)<br />
** [[DigiBooster PRO v2.x / DigiBooster 3 module]] (.dbm)<br />
* [[Digital Symphony module]] (.dsym)<br />
* Digitrakker<br />
** [[Digitrakker instrument]] (.ist)<br />
** [[Digitrakker module]] (.mdl)<br />
** [[Digitrakker sample]] (.spl)<br />
* [[DigiTrekker module]] (.dtm)<br />
* [[Digital Tracker module]] (.dtm)<br />
* [[DisorderTracker 2 module]] (.plm)<br />
* [[Dual Module Player DSMI]] (.amf)<br />
* [[Eureka Packer module]] (.eu)<br />
* [[Extended MOD]] (.emd)<br />
* [[Extreme's Tracker module]] (.ams)<br />
* [[FAC Soundtracker]] (MSX, extension unknown)<br />
* [[Face the Music module]] (.ftm)<br />
* Famitracker<br />
** [[FamiTracker module]] (.ftm)<br />
** [[FamiTracker instrument]] (.fti)<br />
* Farandole Composer<br />
** [[Farandole Form 2.0]] (.f2r)<br />
** [[Farandole Composer module]] (.far)<br />
** [[Farandole Composer pattern]] (.fpt)<br />
** [[Farandole Composer sample]] (.fsm, .usm)<br />
* [[Fashion Tracker module]] (.ex)<br />
* FastTracker / FastTracker 2<br />
** [[FastTracker module]] (.ft, .ftc)<br />
** [[Extended instrument]] (.xi)<br />
** [[Extended Module]] (.xm)<br />
* [[FC-M Packer module]] (.fcm)<br />
* [[Flash Tracker module]] (.fls)<br />
* [[Flex Tracker module]] (.flx)<br />
* [[Fuchs Tracker]] (.fchs)<br />
* [[FunkTracker module]] (.fnk)<br />
* Future Composer<br />
** [[Future Composer v1.x module]] (.fc)<br />
** [[Future Composer v1.3 module]] (.fc13)<br />
** [[Future Composer v1.4 module]] (.fc14)<br />
* Future Composer (BSI)<br />
** [[Future Composer (BSI) module]]<br />
* [[Fuzzac Packer module]] (.fuzz)<br />
* [[General Digital Music module]] (.gdm)<br />
* [[GoatTracker module]] (.sng)<br />
* [[Grave Composer module]] (.wow)<br />
* Graoumf Tracker<br />
** [[Graoumf Tracker module]] (.gtk)<br />
** [[Graoumf Tracker 2 module]] (.gt2)<br />
* [[Global Tracker v1.x module]] (.gtr)<br />
* [[HeatSeeker Module Cruncher v1.0]] (.crb)<br />
* [[Hively Tracker module]] (.hvl)<br />
* [[Ice Tracker module]]<br />
* [[Imago Orpheus module]] (.imf)<br />
* Impulse Tracker<br />
** [[Impulse Tracker module]] (.it, .itbz, .itgz, .itr, .itz)<br />
** [[Impulse Tracker sample]] (.its)<br />
* [[JAMCracker Pro module]] (.jam)<br />
* klystrack<br />
** [[klystrack instrument]] (.ki)<br />
** [[klystrack module]] (.kt)<br />
* [[KRIS Packer / ChipTracker module]] (.kris)<br />
* Liquid Tracker<br />
** [[Liquid Digitized Sample]] (.lds)<br />
** [[Liquid Tracker module]] (.liq)<br />
* MadTracker 2<br />
** [[MadTracker 2 envelope]] (.mte)<br />
** [[MadTracker 2 extension]] (.mtx)<br />
** [[MadTracker 2 instrument]] (.mti)<br />
** [[MadTracker 2 module]] (.mt2)<br />
** [[MadTracker 2 pattern]] (.mtp)<br />
** [[MadTracker 2 sample]] (.mts)<br />
* maxYMiser<br />
** [[maxYMiser instrument]] (.myi)<br />
** [[maxYMiser module]] (.snd)<br />
* [[Megatracker module]] (.mgt)<br />
* [[MO3]] (MP3 / Vorbis compressed module)<br />
* [[MOD Edit sample]] (.sam)<br />
* [[Module Protector + noID]] (.mp)<br />
* Moonblaster (MSX)<br />
** [[Moonblaster music]] (.mbm)<br />
** [[Moonblaster sample kit]] (.mbk)<br />
* [[Multi Track Module]] (.mtm)<br />
* Muse Tracker / Pornotracker<br />
** [[Musetracker / Pornotracker instrument]] (.poi)<br />
** [[Musetracker / Pornotracker module]] (.pom)<br />
* Music Pro Tracker<br />
** [[Music Pro Tracker DoublePlay]] (.mpd)<br />
** [[Music Pro Tracker module (MD1)]] (.md1)<br />
** [[Music Pro Tracker module (MD2)]] (.md2)<br />
** [[Music Pro Tracker module (MPT)]] (.mpt)<br />
* [[Nerdtracker II module]] (.ned)<br />
* [[NesTracker module]] (.nest)<br />
* NoisePacker<br />
** [[NoisePacker 2.x]] (.np2)<br />
** [[NoisePacker 3.x]] (.np3)<br />
* [[NoiseTracker module]] (.mod)<br />
* [[Noisetrekker module]] (.ntk)<br />
* OctaMED<br />
** [[OctaMED module (MED)]] (.med)<br />
** [[OctaMED module (MMD1)]] (.mmd1)<br />
** [[OctaMED v2.00 module]] (.med3)<br />
** [[OctaMED v2.10 module (MED4)]] (.med4)<br />
** [[OctaMED v2.10 module (MMD0)]] (.mmd0)<br />
** [[OctaMED v5 module]] (.mmd2)<br />
** [[OctaMED SS module]] (.mmd3)<br />
** [[MED Packer]] (.mmdc)<br />
* Oktalyzer<br />
** [[Oktalyzer module]] (.okt, .okta)<br />
* [[Onyx Music File]] (.omf)<br />
* [[Open MODPlug Tracker module]] (.mptm)<br />
* [[Oracle module]] (.orc)<br />
* [[Pha Packer]] (.pha)<br />
* PlayerPRO<br />
** [[Extended PlayerPRO module]] (.madx)<br />
** [[PlayerPRO module]] (.mad)<br />
* [[Polly Tracker module]]<br />
* [[Pro Sound Creator v1.xx]] (.psc, ZX Spectrum)<br />
* [[Pro Sound Maker]] (.psm)<br />
* Pro Tracker<br />
** [[Pro Tracker v1.xx module]] (.pt1)<br />
** [[Pro Tracker v2.xx module]] (.pt2)<br />
** [[Pro Tracker v3.xx module]] (.pt3) <br />
* [[Pro Tracker (MSX)]] (MSX-Music, extension unknown)<br />
* [[Poly Tracker module]] (.ptm)<br />
* [[Pumatracker module]] (.puma)<br />
* [[Quadra Composer module]] (.emod)<br />
* [[RASTER Music Tracker module]] (.rmt)<br />
* Real Tracker<br />
** [[Real Tracker instrument]] (.rti)<br />
** [[Real Tracker module]] (.rtm)<br />
** [[Real Tracker sample]] (.rts)<br />
* [[Renoise]]<br />
** [[Renoise|Renoise song (XRNS)]] (.xrns)<br />
** [[Renoise|Renoise instrument (XRNS)]] (.xrni)<br />
** [[Renoise|Renoise effect chain (XRNT)]] (.xrnt)<br />
** [[Renoise Song (NTK)]] (.ntk)<br />
** [[Renoise Song (PTK)]] (.ptk)<br />
** [[Renoise Song (RNS)]] (.rns)<br />
* [[SBStudio module]] (.pac, .son, .sou)<br />
* SCC Blaffer NT<br />
** [[SCC Blaffer NT music]] (.sbm, MSX)<br />
** [[SCC Blaffer NT instrument kit]] (.sbk)<br />
* Scream Tracker<br />
** [[Scream Tracker Music Interface Kit module]]<br />
** [[Scream Tracker 1 & 2 module]] (.stm)<br />
** [[Scream Tracker 3 Adlib module]] (.as3m)<br />
** [[Scream Tracker 3 module]] (.s3m)<br />
** [[Scream Tracker 3 / DigiTracker sample]] (.s31)<br />
** [[Scream Tracker 3 / DigiTracker sample]] (.smp)<br />
* [[SoundFX module]] (.sfx, .sfx2)<br />
* Sound Tracker<br />
** [[Soundtracker v2.6 / Ice Tracker module]] (.mtn)<br />
** [[SoundTracker v2.6 module]] (.st26)<br />
** [[Sound Tracker / Super Sonic module]] (.stc)<br />
** [[Sound Tracker Pro module]] (.stp)<br />
* [[SoundSmith module]] (.mtp)<br />
* Soundtrakker<br />
** [[Soundtrakker 128 instrument]] (.ins)<br />
** [[Soundtrakker 128 module]] (.128)<br />
** [[Soundtrakker v1.x instrument]] (.ins)<br />
** [[Soundtrakker v1.x module]] (.sng)<br />
* [[SQ-Tracker module]] (.sqt)<br />
* [[Starkos Tracker module]] (.sks)<br />
* [[StarTrekker / Star Tracker module]] (.mod, .nt, .flt4)<br />
* [[SunVox module]] (.sunvox)<br />
* TFMX<br />
** [[TFMX pattern data]] (.mdat)<br />
** [[TFMX 7V pattern data]] (.mdat)<br />
** [[TFMX Pro pattern data]] (.mdat)<br />
** [[TFMX sample data]] (.smpl)<br />
* Theta Music Composer<br />
** [[Theta Music Composer 8-channel stereo module]] (.tm8)<br />
** [[Theta Music Composer v1.x module]] (.tmc)<br />
** [[Theta Music Composer v2.x module]] (.tm2)<br />
* [[Trackerpacker 3 module]] (.tp3)<br />
* [[Unic Tracker 1.0]] (.unic1)<br />
* [[Unic Tracker 2.0]] (.unic2)<br />
* [[Ultra Tracker]] (.ult)<br />
* [[Velvet Studio AMS v1.x module]] (.ams)<br />
* [[VIC-TRACKER module]] (.vt)<br />
* [[Vortex Tracker module]] (.vtx)<br />
* X-Tracker<br />
** [[D-Lusion Music File]] (.dmf)<br />
** [[D-Lusion Sound File]] (.dms)<br />
<br />
== Musical instrument control ==<br />
<br />
* [[ELECTONE]] - For Yamaha Electone Range Electronic Organs<br />
** [[BOO]] - Part of the [[ELECTONE]] format. <br />
** [[EVT]] - Part of the [[ELECTONE]] format.<br />
* MIDI & Clones<br />
** [[Compact MIDI]]<br />
** [[GMD]] ([[MIDI]] clone)<br />
** [[Gravis Ultrasound patch]] (used by MIDI synthesizers)<br />
** [[HMI]] ([[MIDI]] clone)<br />
** [[HMP]] ([[MIDI]] clone)<br />
** [[HMZ]] (Compressed [[MIDI]])<br />
** [[KAR]] ([[MIDI]] Audio)<br />
** [[MIDI]] (Musical Instrument Digital Interface)<br />
** [[MIDS]] ([[MIDI]] clone)<br />
** [[MIZ]] (Compressed [[MIDI]])<br />
** [[MSS (MIDI)|MSS]] ([[MIDI]] Clone)<br />
** [[RIFF MIDI]]<br />
** [[Scalable Polyphony MIDI]]<br />
** [[SFARK]] (SoundFont archive compressed file)<br />
** [[SoundFont 1.0]]<br />
** [[SoundFont 2.0]] (.sf2)<br />
** [[Synthetic Music Application Format]]<br />
** [[XMI (Extended MIDI)]]<br />
** [[ZIPI]] (proposed MIDI replacement)<br />
* Hardware specific<br />
** AdLib Sound Cards<br />
*** [[AdLib instrument]] (.ins)<br />
*** [[AdLib instrument bank]] (.bnk)<br />
*** [[AdLib MSCplay]] (.msc)<br />
*** [[AdLib music]] (.mus)<br />
*** Adlib Tracker<br />
**** [[Adlib Tracker instrument]] (.ins)<br />
**** [[Adlib Tracker module]] (.sng)<br />
**** [[Adlib Tracker II instrument]] (.a2i)<br />
**** [[Adlib Tracker II instrument|Adlib Tracker II instrument with fm-register macro]] (.a2f)<br />
**** [[Adlib Tracker II instrument bank]] (.a2b)<br />
**** [[Adlib Tracker II instrument bank|Adlib Tracker II instrument bank with macros]] (.a2w)<br />
**** [[Adlib Tracker II module]] (.a2m)<br />
**** [[Adlib Tracker II pattern]] (.a2p)<br />
**** [[Adlib Tracker II module|Adlib Tracker II tiny module]] (.a2t)<br />
*** [[AdLib Visual Composer / Roland Synthesizer song]] (.rol)<br />
*** AMusic<br />
**** [[AMusic module]] (.amd)<br />
**** [[AMusic XMS]] (.xms)<br />
*** [[Beni Tracker module]] (.pis)<br />
*** [[Bob's Adlib Music]] (.bam)<br />
*** Boom Tracker v4.0<br />
**** [[Boom Tracker v4.0 instrument]] (.cif)<br />
**** [[Boom Tracker v4.0 module]] (.cff)<br />
*** [[DeFy Adlib Tracker module]] (.dtm)<br />
*** [[Digital FM module]] (.dfm)<br />
*** [[Drum Traker module]] (.dtl)<br />
*** [[EdLib packed module]] (.d00)<br />
*** [[Exotic AdLib module]] (.xad)<br />
*** [[Extra Simple Music]] (.xsm)<br />
*** [[Faust Music Creator module]] (.sng)<br />
*** [[FM Tracker module]] (.fmt)<br />
*** FM-Kingtracker<br />
**** [[FM-Kingtracker bank]] (.fib)<br />
**** [[FM-Kingtracker instrument]] (.fin)<br />
**** [[FM-Kingtracker module]] (.fmk)<br />
*** HSC AdLib Composer / HSC-Tracker<br />
**** [[HSC AdLib Composer / HSC-Tracker module]] (.hsc)<br />
**** [[HSC AdLib Composer / HSC-Tracker packed module]] (.hsp)<br />
*** [[JBM Adlib Music]] (.jbl)<br />
*** JCH<br />
**** [[JCH-D00]] (.d00)<br />
**** [[JCH-D01]] (.d01)<br />
*** [[Johannes Bjerregård module]] (.jbm)<br />
*** [[Master Tracker module]] (.mtr)<br />
*** [[MK-Jamz audio]] (.mkj)<br />
*** [[Mlat Adlib Tracker module]] (.mad)<br />
*** [[MPU-401 Trakker module]] (.mtk)<br />
*** [[Palladix module]] (.plx)<br />
*** [[RAW (Adlib)|RAW]] (AdLib Sound Card)<br />
*** [[Reality AdLib Tracker module]] (.rad)<br />
*** [[SNG Player module]] (.sng)<br />
*** Surprise! Adlib Tracker<br />
**** [[Surprise! AdLib Tracker v1, 5, 6 module]] (.sat)<br />
**** [[Surprise! Adlib Tracker v2.0]] (.sa2)<br />
*** [[Twin TrackPlayer module]] (.dmo)<br />
*** [[Vibrants module]] (.vib)<br />
*** [[XMS-Tracker module]] (.xms)<br />
** Akai<br />
*** [[Akai S-series MESA multi file]] (.mlt)<br />
*** [[Akai S-series MESA I program]] (.prg)<br />
*** [[Akai S-series MESA II program]] (.s3p)<br />
** [[Codisk Audio File]]<br />
** Creative Labs<br />
*** [[Creative Music Format]] (.cmf)<br />
*** [[Creative Voice File]]<br />
*** [[Sound Blaster Instrument]] (.sbi)<br />
** [[Disney Sound Source]]<br />
** [[DOSBox Raw OPL]] (.dro)<br />
** [[Downloadable Sounds Banks]] (.dls)<br />
** Gravis Ultrasound<br />
*** [[UltraSound GF1 patch]] (.pat)<br />
** [[Instrument Bank]] (Instrument Bank)<br />
** [[Software Music Synthesis System]] (for 8080/Z-80 systems with S-100 bus)<br />
** [[TRS-80 Orchestra-90]] (.orc)<br />
** [[Voice Sequence]] (.vsq)<br />
** Yamaha sound chips<br />
*** [[Callus OPL Register Log]] (YM2151, .cym)<br />
*** [[GYM]] (YM2612 / Sega Genesis)<br />
* Software Synthesizers<br />
** [[Farbrausch BR404 music]] (.bmf)<br />
** [[iZotope iDrum]] (.idrum)<br />
** Native Instruments<br />
*** [[Native Instruments Reaktor ensemble]] (.ens)<br />
** Steinberg VST Presets<br />
*** [[FXB]] (Bank of presets)<br />
*** [[FXP]] (single preset)<br />
<br />
== Musical notation ==<br />
<br />
* [[Drum tablature]]<br />
* [[Guitar tablatures]]<br />
** [[ASCII tab]] (.tab, .btab, .txt)<br />
** [[Guitar Pro]] (.gtp)<br />
*** [[Guitar Pro 3]] (.gp3)<br />
*** [[Guitar Pro 4]] (.gp4)<br />
*** [[Guitar Pro 5]] (.gp5)<br />
*** [[Guitar Pro 6]] (.gp6)<br />
** [[KGuitar]] (.kg)<br />
** [[Power Tab]] (.ptb)<br />
** [[Progression]]<br />
** [[Rich MIDI Tablature Format]] (.rmtf)<br />
** [[TablEdit]] (.tef)<br />
** [[VexTab]]<br />
<br />
* [[Musical notation]]<br />
** [[ABC (musical notation)]]<br />
** [[ANSI Music]]<br />
** Capella<br />
*** [[CAP]]<br />
*** [[CapXML]] (.capx)<br />
** [[ChordML]]<br />
** Copyist<br />
*** [[CP4]]<br />
*** [[CP6]]<br />
** [[Encore]] (.enc)<br />
** [[Extensible Music Notation Markup Language]]<br />
** [[Finale]] (.mus)<br />
** [[Forte]] (.fnf)<br />
** Guido<br />
*** [[GUIDO]]<br />
*** [[GUIDO XML]]<br />
** JMSL<br />
*** [[JMSL]]<br />
*** [[JMSL Score]]<br />
** [[JScoreML]]<br />
** [[LilyPond]]<br />
** [[MEI]]<br />
** [[MHTML]]<br />
** [[MidiXML]]<br />
** [[minimusic]]<br />
** [[MPEG4-SMR]]<br />
** [[Mup]]<br />
** [[MuseScore]]<br />
*** [[MSC]] -(old file format)<br />
*** [[MSCX]] - [[XML file format]]<br />
*** [[MSCZ]] - [[GZIP]] compressed [[MSCX]]<br />
** [[Music Description Language]]<br />
** [[Music Markup Language]]<br />
** [[Music Time]] (.mus)<br />
** [[Music Time Pro]] (.mts)<br />
** [[Musical Notation Markup Language]]<br />
** [[MusicML]]<br />
** [[MusicWrite]] (.mwk)<br />
** [[MusicXML]]<br />
** [[MusicXML compressed]] (.mxl)<br />
** [[Musink]] (.musink)<br />
** [[MusiqueXML]]<br />
** [[MusiXML]]<br />
** [[Myriad Software]] (.msf)<br />
** [[NeumesXML]]<br />
** [[Neuratron Photoscore Format]] (.opt)<br />
** [[Notation Interchange File Format]]<br />
** [[NoteAbility Pro]]<br />
** [[Noteworthy Composer and Music Publisher]] (.nwc)<br />
** [[NoteWriter]]<br />
** [[Notion]]<br />
** [[NtEd]]<br />
** [[Overture]] (.ove)<br />
** [[PriMus]]<br />
** [[Rhapsody Notation Program File]] (.rhp)<br />
** [[Rhapsody 2/3]] (RISC OS. Unrelated to the above "Rhapsody Notation Program File")<br />
** [[Rhapsody 4]] (RISC OS, .c00)<br />
** [[Rosegarden]] (.rg)<br />
** [[QuickScore Elite]] (.qsd)<br />
** [[SCORE]] (.mus)<br />
** [[Score Perfect]] (.spp)<br />
** [[ScoreML]]<br />
** [[ScoreWriter]] (.scw)<br />
** [[Sibelius]]<br />
** [[SMDL]]<br />
** [[SongWrite]]<br />
** [[Studio Session Song]] (.sss)<br />
** [[Theta]]<br />
** [[Tilia]]<br />
** [[VexTab]]<br />
** [[Virtual Musician Markup Language]]<br />
** [[WEDELMUSIC]]<br />
** [[XMF]]<br />
** [[XMusic]]<br />
** [[XScore]] (eXtensible Score Language)<br />
<br />
== Playlists, music libraries, music store downloaders ==<br />
<br />
* [[Amazon downloader file]] (.amz)<br />
* [[B4S]] (Winamp 3 playlist)<br />
* [[FPL]] (foobar2000 playlist)<br />
* [[iTunes Music Library]]<br />
* [[Kapsule]] (Kazaa XML Manifest)<br />
* [[KPL]] (Kazaa Playlist Format)<br />
* [[M3U]] (Multimedia Playlist Format)<br />
* [[MAGMA]] ([[Magnet URI]])<br />
* [[MOD4WIN Module List]] (.mol)<br />
* [[PLS]] (Multimedia Playlist)<br />
* [[RAM (RealAudio)]]<br />
* [[SMIL]] (W3C open standard)<br />
* [[WPL]] (Windows Media Playlist)<br />
* [[XML Sharable Playlist]]<br />
<br />
== Programming languages and APIs (audio/music-specific) ==<br />
<br />
* [[ChucK]] (.ck)<br />
* [[Csound]] (.csd, .orc, .sco)<br />
* Cycling 74 [[Max]] (.maxpat, .max)<br />
* [[FAUST]] (.dsp)<br />
* [[Music Macro Language]]<br />
* Native Instruments [[Reaktor]] (.rkplr)<br />
* [[Pure Data]] (.pd)<br />
* [[Scala (music software)]] (.kbm, .scl, .cmd)<br />
* [[SuperCollider]] (.scd, .sc)<br />
* [[WaveGL]]<br />
* [[Web Audio API]]<br />
<br />
== Ringtones ==<br />
<br />
* [[i Melody]]<br />
* [[M4R]] (Apple iPhone Ringtones - see [[M4A]])<br />
* [[Polyphonic ringtone]]<br />
* [[RTTTL]]<br />
<br />
== Signal processing ==<br />
<br />
These aren't specific file formats, but generic mathematical methods used by other file formats.<br />
<br />
* [[A-law]]<br />
* [[ADPCM]]<br />
* [[DPCM]]<br />
* [[LPCM]]<br />
* [[Pulse code modulation]]<br />
* [[µ-law]] (u-law)<br />
<br />
== Sound card related formats ==<br />
<br />
* [[CMS (Creative Music System)]]<br />
<br />
== Speech synthesis ==<br />
<br />
* [[Speech Synthesis Markup Language]] (SSML)<br />
* [[VoiceDescription]] (OS X)<br />
<br />
== Unclassified (need to move to other categories) ==<br />
<br />
* [[ACM]] (Audio Compression Manager)<br />
* [[ADM]] (ADM Audio File)<br />
* [[B1S]]<br />
* [[BDSP]] (BotDetect Sound Package)<br />
* [[BVG]]<br />
* [[CBD2]]<br />
* [[DSM]] (DSIK Internal)<br />
* [[DSPW]]<br />
* [[DTK]]<br />
* [[FFW]]<br />
* [[First Rate Music Hall]] (.pck, MSX-Music song editor using [[Music Macro Language]])<br />
* [[GBTS]]<br />
* [[GCUB]]<br />
* [[GSB]]<br />
* [[HLWAV]]<br />
* [[IAB]]<br />
* [[IADP]]<br />
* [[INT]] (RAW File)<br />
* [[ISWS]]<br />
* [[JSTM]]<br />
* [[KOVS]]<br />
* [[MA]] (Music Assembler)<br />
* [[MNSTR]]<br />
* [[MSF]]<br />
* [[MTAF]]<br />
* [[S98]] (NEC PC-98)<br />
* [[SD]] (ESPS sampled data file)<br />
* [[SGI]] (Sound Generator 3.0 instrument)<br />
* [[SNG (SCC Musixx)|SNG]] (SCC Musixx)<br />
* [[Sound Effect Editor]] (.see, MSX)<br />
* [[TFMX]] (TFMX)<br />
* [[Vivaldi]] (RISC OS)<br />
<br />
See the Open Cubic Player homepage for a list of demo formats: http://www.cubic.org/player/features.html<br />
<br />
See also [[Piano Rolls]] (which is under the [[Physical File Formats]]).<br />
<br />
== Links ==<br />
* [http://boingboing.net/2013/09/20/kickstarting-free-open-record.html Kickstarting free, open recordings of Bach's "Well-Tempered Clavier, Book 1"]<br />
* [http://mpc-hc.org/ MPC-HC: media player for Windows handling just about all video/audio formats]<br />
* [http://boingboing.net/2013/09/27/david-byrnes-how-music-wor.html How Music Works]<br />
* [http://www.textfiles.com/programming/FORMATS/admusfmt.pro Some discussion of "advanced music formats" from 1994]<br />
* [http://www.textfiles.com/programming/FORMATS/audiof23.txt FAQ on audio file formats (1992-07-09)]<br />
* [http://boingboing.net/2013/11/03/this-must-be-the-8-bit-place.html Chiptune version of Talking Heads song]<br />
* [http://www.youtube.com/watch?v=3Z2vU8M6CYI Beatles 3000: humorous video of how the future might misunderstand 20th century pop culture if artifacts decay as happened in the past]<br />
* [http://publicdomainreview.tumblr.com/post/76437123224/chaoscontrolled123-luke-and-i-were-looking-at The Music Written on This Dude's Butt]<br />
* [http://vimeo.com/58200103 "Eye of the tiger" played on a modified dot matrix printer]<br />
* [http://chipflip.wordpress.com/2014/03/09/a-short-history-of-hardcore-chipmusic/ A Short History of Hardcore Chipmusic]<br />
* [https://medium.com/message/you-need-to-hear-this-extremely-rare-recording-27619411e077 You Need to Hear This Extremely Rare Recording]<br />
* [http://www.loc.gov/preservation/resources/rfs/audio.html Library of Congress Recommended Format Specifications: Audio Works]<br />
* [http://betaboston.com/news/2014/07/17/in-a-bid-for-more-emotional-snacking-frito-lay-patents-culinary-theme-songs/ In a bid for more emotional snacking, Frito-Lay patents culinary theme songs]<br />
* [http://www.theverge.com/2014/8/4/5968243/mit-turns-recorded-vibrations-back-into-speech-and-music Scientists reconstruct speech through soundproof glass by watching a bag of potato chips]<br />
* [http://www.palmbeachpost.com/ap/ap/business/apple-releases-tool-to-remove-free-u2-album/nhNG9/ Apple releases tool to remove free U2 album] (which they gave you whether you wanted it or not)<br />
* [https://github.com/AyrA/ExcelPlayer Excel sheet that plays video and audio]<br />
* [http://webaudio.github.io/web-audio-api/ Web Audio API (W3C)]<br />
* [http://www.wonderingsound.com/feature/why-collecting-music-matters/ Why Collecting Matters: Citizen Archivists and the Battle for Future Pasts]<br />
* [http://mediaarea.net/en/MediaInfo MediaInfo: software that shows metadata for audio/video files]<br />
* [http://www.bl.uk/projects/save-our-sounds Save our Sounds]<br />
* [http://www.davidsystems.com/#tools David Systems tools: includes online loudness analysis of sound files]<br />
* [http://createdigitalmusic.com/2015/07/next-web-standard-music-notation/ The next Web standard could be music notation]<br />
* [https://www.youtube.com/watch?v=q_3d1x2VPxk How Oldschool Sound/Music worked] (video)<br />
* [http://www.crutchfield.com/S-ulligiNLBZf/learn/learningcenter/home/hometheater_surround.html Understanding surround sound formats]<br />
* [http://www.righto.com/2017/04/reverse-engineering-76477-space.html Reverse engineering the 76477 "Space Invaders" sound effect chip from die photos]<br />
<br />
[[Category:Audio and Music| ]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Audio_and_MusicAudio and Music2018-05-10T11:42:02Z<p>Kyz: /* Emulated music */ SND is just a synonym for SNDH which is already included as Atari SoundHeader</p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|thiscat=Audio and Music<br />
|image=Music.jpg<br />
|caption=Musical notation<br />
}}<br />
<br />
== Introduction ==<br />
[[Electronic_File_Formats|Electronic Formats]] concerned with audio and musical data, including sound recording, instrument control, musical notation, etc.<br />
<br />
* For an excellent introduction to the issues around audio and video formats, see [http://www.avpreserve.com/blog/a-primer-on-codecs-for-moving-image-and-sound-archives-2/ A Primer on Codecs for Moving Image and Sound Archives - and 10 Recommendations for Codec Selection & Management] [http://www.avpreserve.com/wp-content/uploads/2010/04/AVPS_Codec_Primer.pdf PDF version]<br />
* [http://www.garymcgath.com/streamingprotocols.html Basics of streaming protocols]<br />
<br />
== Audio and sequencer software ==<br />
<br />
* Ableton<br />
** [[Ableton Live]]<br />
* Aldrin<br />
** [[Creative Commons Module]] (.ccm)<br />
* [[Audacity Project Format]] (.aup)<br />
* Cakewalk<br />
** [[Cakewalk Project (CWP)]] (.cwp)<br />
** [[Cakewalk Project (WRK)]] (.wrk)<br />
** [[Cakewalk Sample Definition File]] (.sfz)<br />
* [[Cool Edit / Audition Multi Track Session file]] (.sss)<br />
* [[CPS project]] (.cps)<br />
* FruityLoops / FL Studio<br />
** [[DrumSynth Preset]] (.ds)<br />
** [[FL Studio Score File]] (.fsc)<br />
** [[FL Studio State File]] (.fst)<br />
** [[Humanize Preset]] (.fpr)<br />
** [[Raw FL Studio Project]] (.flp)<br />
** [[SimSynth Preset]] (.syn)<br />
** [[Speech Preset]] (.speech)<br />
* GarageBand (Mac)<br />
** [[GarageBand project]] (.band, .gbproj)<br />
** [[Magic GarageBand template]] (.wand)<br />
** [[GarageBand MagicMentor template]] (.mwand)<br />
* [[Hydrogen]] (.h2song, .h2pattern)<br />
* [[Jacker song]]<br />
* Jeskola Buzz<br />
** [[Jeskola Buzz machine]] (.dll)<br />
** [[Jeskola Buzz machine preset]] (.prs)<br />
** [[Jeskola Buzz song]] (.bmx)<br />
* [[LMMS]] (Linux MultiMedia Studio) (.mmp, .mmpz)<br />
* [[LOGIC]] (Logic)<br />
* [[Maestro]] (RISC OS)<br />
* [[Make-A-Melody]] (''Big Blue Disk'' #42) (.mus)<br />
* Piston Collage<br />
** [[Piston Collage noise]] (.ptnoise)<br />
** [[Piston Collage song]] (.ptcop, .pttune)<br />
** [[Piston Collage voice]] (.ptvoice)<br />
* Pro Tools<br />
** [[PTS]] (Pro Tools 7-9) <br />
** [[PTX]] (Pro Tools 10)<br />
* Propellerhead Reason<br />
** [[Propellerhead Reason NN-XT Patch File]] (.sx2)<br />
** [[Propellerhead Reason Reason Project File]] (.rsn)<br />
** [[Propellerhead Reason Reason Song File]](.rns)<br />
** [[Propellerhead Reason REX2 Audio File]] (.rx2)<br />
** [[Propellerhead Reason ReCycle Loop File]] (.rex)<br />
** [[Propellerhead Reason ReFill Sound Bank]] (.rfl)<br />
* [[Renoise]]<br />
** [[Renoise song]] (.xrns)<br />
** [[Renoise instrument]] (.xrni)<br />
** [[Renoise DSP device-chain]] (.xrnt)<br />
* SeaTone<br />
** [[SeaTone song]] (.pxt)<br />
* Steinberg<br />
** [[CUBASE]]<br />
*** [[ALL]] - A Steinberg [[CUBASE]] VST file for saving songs (pre 2002).<br />
*** [[ARR]] - A Steinberg [[CUBASE]] VST file for saving arrangements (pre 2002). <br />
*** [[CPR]] - A Steinberg [[CUBASE]] SX file for saving projects (2002 - ).<br />
*** [[NPR]] - A Steinberg [[NUENDO]] file for saving arrangements (2002 - ).<br />
** Wavelab<br />
*** [[MON]] (Audio montage)<br />
* [[(Super) Studio Session song]] (.sss)<br />
<br />
== Audio recording and sound waves ==<br />
<br />
* Lossless compression<br />
** [[ATRAC Advanced Lossless]] (.aal)<br />
** [[ADA]] (Advanced Digital Audio)<br />
** [[ALAC]] (Apple Lossless Audio Codec)<br />
** [[APAC]] (Marian's A-pac)<br />
** [[Dakx Wav]]<br />
** [[Dolby TrueHD]]<br />
** [[DTS-HD]] (Lossless variant of DTS- DTS-HD Master Audio)<br />
** [[FLAC]] (Free Lossless Audio Codec)<br />
** [[Kexis]] (.kxs)<br />
** [[LA]] (Lossless Audio)<br />
** [[LiteWave]]<br />
** [[LPAC]] (Lossless Predictive Audio Coding)<br />
** [[MKW]]<br />
** [[MLP]] (Meridian Lossless Packing Audio)<br />
** [[Monkey's Audio]] (.ape)<br />
** [[MPEG-4 ALS]] (MPEG-4 Audio Lossless Coding)<br />
** [[MPEG-4 SLS]] (MPEG-4 Scalable lossless coding mode)<br />
** [[MQA]] (Master Quality Authenticated)<br />
** [[OptimFROG]] (.ofr, .ofs)<br />
** [[Perfect Clarity Audio]] (.pca)<br />
** [[RALF]] (Real Lossless Audio Codec)<br />
** [[RK Audio]] (.rka)<br />
** [[Shorten]] (.shn)<br />
** [[Sonarc]]<br />
** [[Split2000]]<br />
** [[TAK]] (.tak)<br />
** [[True Audio]] (.tta)<br />
** [[VocPack]]<br />
** [[WavArc]]<br />
** [[WavPack]] (.wv)<br />
** [[WMA Lossless]] (Windows Media Audio 9 Lossless)<br />
* Lossy compression<br />
** [[AAC]] (Advanced Audio Coding)<br />
** Adaptive differential pulse-code modulation<br />
*** [[ACT]]<br />
*** [[MNF]] (Yamaha ADPCM)<br />
*** [[SPB]] (Yamaha ADPCM)<br />
*** [[VOX]]<br />
** [[Adaptive Multi-Rate WideBand Audio]]<br />
** ATRAC or [[Adaptive Transform Acoustic Coding]] (.aa3, .oma, .at3)<br />
** [[Audible Audiobook]] (.aa, .aax)<br />
** [[CELT]] (.ogg)<br />
** [[Dolby Digital]] (AC-3 or ATSC A/52)<br />
** [[Digital Theater Systems]] (.dts)<br />
** [[GSM]] (GSM 6.10 RPE-LTP)<br />
** [[MPEG-4 Audio]] (.m4a, .m4b, .m4p, .m4r, .mp4)<br />
** [[M4B]] (iTunes Audio Book)<br />
** [[M4P]] (Fairplay DRM Encrypted [[M4A]])<br />
** [[MPC (Musepack)|MP+]] (MPEGplus Audio)<br />
** [[MP1]] (MPEG Audio Layer 1)<br />
** [[MP2]] (MPEG-1 Audio Layer II)<br />
** [[MP3]] (MPEG-1 / MPEG-2 Audio Layer III)<br />
*** [[packMP3]]<br />
** [[MPA]] (MPEG Audio)<br />
** [[Musepack Audio]] (.mpc)<br />
** [[Opus]] (.opus)<br />
** [[RealAudio]] (.ra)<br />
** [[Speex]] (.spx)<br />
** [[Vorbis]] (.logg, .oga, .ogg)<br />
** [[WMA]] (Windows Media Audio)<br />
* Proprietary<br />
** [[DCT]] (Dictation format by NCH Software)<br />
** [[Digital Speech Standard]] (.dss)<br />
** [[Digital Voice File]] (.dvf)<br />
** [[IC Sound]] (.ics)<br />
** [[IKLAX]] (iKlax Media)<br />
** [[Memory Stick Voice]] (.msv)<br />
** [[Pono]]<br />
* Separated parts of tracks<br />
** [[Stems]]<br />
* Uncompressed audio<br />
** [[AIFF|AIF / AIFF]] (Audio Interchange File Format)<br />
** [[Berkeley/IRCAM/Carl Sound Format]] (.sf)<br />
** [[BWF]] (Broadcast Wave Format; variant of WAV)<br />
** [[DSD]] (Direct Stream Digital) (.dsf)<br />
** [[RAW (Audio)|RAW]] (.raw, .pcm)<br />
** [[RF64]] (extended variant of BWF)<br />
** [[Sony Wave64]] (.w64)<br />
** [[WAV]] (Waveform Audio File Format)<br />
* Various encodings<br />
** [[AIFC]] ([[AIFF]] Compressed)<br />
** [[AU]] (Sun Microsystems audio format)<br />
** [[Computerized Speech Lab NSP]] (.nsp)<br />
** [[Bonk]] (lossy/lossless audio compression)<br />
** [[INRS-Telecom file]] (.aud)<br />
** [[SPPACK]] (.d)<br />
** [[WVE (Psion)]]<br />
<br />
== Chiptune ==<br />
<br />
* [[SAM Coupé song]] (.cop, .sng)<br />
<br />
== Configuration files ==<br />
<br />
* [[X2A]] (Yamaha S70xs/S90xs keyboard workstations)<br />
<br />
== Container formats ==<br />
<br />
* [[ASF]] (Advanced Systems Format)<br />
* [[Core Audio Format]] (.caf)<br />
* [[Extensible Music Format]] (.xmf)<br />
* [[Matroska Audio]] (.mka)<br />
* [[MP4]] (MPEG-4 Part 14 media container)<br />
* [[Ogg]] (.ogg, .oga, .ogx, .spx, .opus)<br />
* [[Rich Music Format]] (.rmf)<br />
* [[RealMedia]] (.rm)<br />
* [[WebM]] (.webm) (also used for video)<br />
<br />
== Converters ==<br />
<br />
* [[Konvertor]]<br />
<br />
== Emulated music ==<br />
<br />
* [[2SF]] (Nintendo DS [[PSF]])<br />
* [[3G2]] (3GPP, also a video format)<br />
* [[3GP]] (3GPP, also a video format)<br />
* [[Atari SoundHeader]] (.sndh)<br />
* [[AY]] (Amstrad CPC / ZX Spectrum)<br />
* [[DSF]] (Dreamcast [[Portable Sound Format|PSF]])<br />
* [[EPSGMOD]] (.epsgmod, Mod2PSG)<br />
* [[Fuxoft AY Language]] (.fmx)<br />
* [[GBR]] (Game Boy Sound)<br />
* [[Game Boy Sound]] (.gbs)<br />
* [[GSF]] (Game Boy Advance [[PSF]])<br />
* [[GSR]] (Gens Sound Record)<br />
* [[HES]] (Hudson Entertainment System)<br />
* [[KSS]] (MSX)<br />
* [[KSSX]] (Possible expansion of [[KSS]])<br />
* [[MDX]] (Sharp X68000 / MXDRV)<br />
* [[NES Sound Format]] (.nsf)<br />
* [[NES Sound Format Extended]] (.nsfe)<br />
* [[Portable Sound Format|PSF]] (Portable Sound Format)<br />
* [[PSF1]] (Playstation [[PSF]])<br />
* [[PSF2]] (Playstation 2 [[PSF]])<br />
* [[QSF]] (Capcom Q-Sound [[PSF]])<br />
* [[SGC]] (Sega Master System / Game Gear / Colecovision)<br />
* [[SID]] (Commodore)<br />
* [[SPC (Audio)|SPC]] (Super Nintendo SPC700)<br />
* [[SSF]] (Sega Saturn [[Portable Sound Format|PSF]])<br />
* [[USF]] (Nintendo 64 [[Portable Sound Format|PSF]])<br />
* [[YM]] (Amstrad CPC / Spectrum ZX / Atari ST)<br />
* [[ZXAYEMUL Sound]] (.cpc)<br />
<br />
== Game audio and music ==<br />
<br />
(see also [[Game data files]])<br />
<br />
* [[4X IMA ADPCM]]<br />
* Accolade<br />
** [[Accolade MIDI File Format]]<br />
* Adept Software<br />
** [[God of Thunder Music Format]]<br />
* [[AFC]] (AFX Audio File) -- used in Mass Effect 2<br />
* Apogee<br />
** [[Crystal Caves Sound format]]<br />
* Atari<br />
** [[Slight Atari Player]] (Atari POKEY)<br />
* [[BAF]] (Blur ADPCM)<br />
* [[BAKA]] (PCM 16 bit)<br />
* Bandai<br />
** [[WSR]] (WonderSwan / WonderSwan Color)<br />
* [[BH2PCM]]<br />
* [[BNSF]] (G.722.1)<br />
* Cave Story<br />
** [[Organya]]<br />
* Commodore Amiga<br />
** [[A.M. Composer v1.2]] (.amc)<br />
** [[AC1D-DC1A Packer]] (.ac1d)<br />
** [[Actionamics Sound Tool]] (.ast)<br />
** [[AMOS Music Bank]] (.abk)<br />
** [[AMOS Memory Bank#AMOS Samples Bank|AMOS Samples Bank]] (.abk)<br />
** [[Amos Basic Konverter]] (.ambk)<br />
** [[Art & Magic]] (.aam)<br />
** [[Audio Sculpture]] (.as)<br />
** [[Beathoven Synthesiser]] (.bss)<br />
** [[Ben Replay]] (.ben)<br />
** [[Benn Daglish]] (.bd)<br />
** [[Benn Daglish SID]] (.bds)<br />
** [[Channel Players]] (.chan)<br />
** [[Cinemaware]] (.cin)<br />
** [[Core Design]] (.core)<br />
** [[CustomMade]] (.cm)<br />
** [[Darius Zendeh]] (.dz)<br />
** [[Dave Lowe]] (.dl)<br />
** [[Dave Lowe New]] (.dln)<br />
** [[David Hanney]] (.dh)<br />
** [[David Whittaker]] (.dw)<br />
** [[Desire]] (.dsr)<br />
** [[Digital Illusions]] (.di)<br />
** [[Digital Sonix & Chrome]] (.dsc)<br />
** [[Digital Sound Creations]] (.han)<br />
** [[Dirk Bialluch]] (.tpu)<br />
** [[Dynamic Synthesizer]] (.dns)<br />
** [[Editeur Musical Sequentiel]] (.ems)<br />
** [[Follin Player II]] (.tf)<br />
** [[Fred Editor]] (.fred)<br />
** [[Fred Gray]] (.fg)<br />
** [[Future Player]] (.fp)<br />
** [[FWMP]] (.fw)<br />
** [[Game Music Creator]] (.gmc)<br />
** [[Gnu Player]] (.gp)<br />
** [[Hippel]] (.hip)<br />
** [[Hippel-COSO]] (.hipc)<br />
** [[Hornet Packer]] (.hrt)<br />
** [[Howie Davies]] (.hd)<br />
** [[IFF-MAUD]]<br />
** [[Images Music System]] (.ims)<br />
** [[Infogrames INS]] (.ins)<br />
** [[Janko Mrsic-Flogel]] (.jmf)<br />
** [[Jason Brooke]] (.jcb)<br />
** [[Jason Page]] (.jp)<br />
** [[Jeroen Tel]] (.jt)<br />
** [[Jesper Olsen]] (.jo)<br />
** [[Jochen Hippel]] (.hip)<br />
** [[Kefrens Sound Machine]] (.ksm)<br />
** [[Kris Hatlelid]] (.kh)<br />
** [[Leggless Music Editor]] (.lme)<br />
** [[Magnetic Fields Packer]] (.mfp)<br />
** [[Maniacs of Noise]] (.mon, .jt)<br />
** [[Mark Cooksey]] (.mc)<br />
** [[Mark II Sound-System]] (.mii, .mk2, .mkii)<br />
** [[Martin Walker]] (.mw)<br />
** [[MaxTrax]] (.mxtx)<br />
** [[Mike Davies]] (.md)<br />
** [[MMDC]] (Module packer)<br />
** [[Mugician]] (.mug)<br />
** [[Mugician II]] (.mug2)<br />
** [[NoiseRunner]] (.nr)<br />
** [[NovoTrade Packer]] (.ntp)<br />
** [[Pierre Adane Packer]] (.pap)<br />
** [[Power Music]] (.pm)<br />
** [[Professional Sound Artists]] (.psa)<br />
** [[Promizer 0.1]] (.pm01)<br />
** [[Promizer 1.0c]] (.pm10)<br />
** [[Promizer 1.8a]] (.pm18)<br />
** [[Promizer 2.0]] (.pm20)<br />
** [[Promizer 4.0]] (.pm40)<br />
** [[ProPacker 1.0]] (.pp10)<br />
** [[ProPacker 2.1]] (.pp21)<br />
** [[ProPacker 3.0]] (.pp30)<br />
** [[Prorunner 1.0]] (.prun1)<br />
** [[Prorunner 2.0]] (.prun2)<br />
** [[Richard Joseph]] or Vectordean (.rjp)<br />
** [[Rob Hubbard]] (.rh, .rho)<br />
** [[Ron Klaren]] (.rk)<br />
** [[Sean Connolly]] (.scn)<br />
** [[Sean Conran]] (.scr)<br />
** [[Sidmon]] (.sid)<br />
** [[Sidmon II]] (.sid2)<br />
** [[Silmarils]] (.mok)<br />
** [[SKYT Packer]] (.skyt)<br />
** [[Sonic Arranger]] (.sa)<br />
** [[Sound Images]] (.tw)<br />
** [[Sound Master]] (.sm)<br />
** [[Sound Programming Language]] (.spl)<br />
** [[Soundcontrol]] (.sct)<br />
** [[Soundfactory]] (.psf)<br />
** [[SoundPlayer]] (.sjs)<br />
** [[Special FX]] (.jd)<br />
** [[Speedy System]] (.ss)<br />
** [[Steve Barrett]] (.sb)<br />
** [[Jason Page|Steve Turner]] (.jpo)<br />
* [[Star Trekker Packer]] (.stpk)<br />
** [[Synth Dream]] (.sdr)<br />
** [[Synth Pack]] (.osp)<br />
** [[The Musical Enlightenment]] (.tme)<br />
** [[The Player 2.2a]] (.p22a)<br />
** [[The Player 3.0a]] (.p30a)<br />
** [[The Player 4.0a]] (.p40a)<br />
** [[The Player 4.0b]] (.p40b)<br />
** [[The Player 5.0a]] (.p50a)<br />
** [[The Player 6.0a]] (.p60a)<br />
** [[The Player 6.1a]] (.p61a)<br />
** [[Titanics Player]] (.ttp)<br />
** [[Tracker Packer 1]] (.tp1)<br />
** [[Tracker Packer 2]] (.tp2)<br />
** [[Tracker Packer 3]] (.tp3)<br />
** [[Thomas Hermann]] (.thm)<br />
** [[Wally Beben]] (.wb)<br />
** [[Wanton Packer]] (.wn)<br />
** [[XANN Packer]] (.xann)<br />
** [[Zen Packer]] (.zen)<br />
* CRI Middleware<br />
** [[ADX]]<br />
** [[AFS]] (container format for [[ADX]] / [[AHX (CRI)]])<br />
** [[AHX (CRI)]]<br />
** [[AIX]]<br />
* [[DCS]] (ADPCM)<br />
* [[Death Rally Archive]] (.bpa)<br />
* [[DMSG]] (PCM 16 bit)<br />
* [[EACS IMA ADPCM]] (.kcey)<br />
* Electronic Arts<br />
** [[8-Bit Sampled Voice]] (.8svx, .iff)<br />
** [[Asylum Music Format]] (.amf, used in Crusader: No Remorse / Crusader: No Regret)<br />
** [[Electronic Arts AS4 / ASF Music]] (.as4, .asf)<br />
** [[Electronic Arts KSF Music]] (.ksf)<br />
** [[Electronic Arts MUS]] (.mus)<br />
** [[Electronic Arts SCxl]]<br />
** [[Electronic Arts Sound Effects]] (.bnk, .crd)<br />
** [[Electronic Arts Sound / Speech Files]] (.eas, .sph)<br />
** [[IFF]] (Amiga 8SVX)<br />
*** [[IFF-MAUD]]<br />
** [[Sonix Music Driver]] (.smus)<br />
* [[EMFF]] (ADPCM)<br />
* Epic Megagames<br />
** [[Epic Megagames MASI]] (.masi, .psm)<br />
* [[Final Fantasy XI Music file]] (.bgw)<br />
* [[FMOD Sample Bank]] (.fsb)<br />
* [[Funcom ISS]]<br />
* Galaxy Music System<br />
** [[Galaxy Music System v4.0]]<br />
** [[Galaxy Music System v5.0]] (.j2b)<br />
* [[GCW]] (PCM 16 bit)<br />
* [[Generic Header]] (.genh, Generic Header Creator)<br />
* Herad Music System<br />
** [[Herad Music System AGD]] (.agd)<br />
** [[Herad Music System SDB]] (.sdb)<br />
** [[Herad Music System SQX]] (.sqx)<br />
* [[HIS]] (PCM 8 bit)<br />
* id Software<br />
** [[Doom MUS]]<br />
** [[id Software DNF]] (.dnf)<br />
** [[id Software Music Format]] (.imf)<br />
** [[id Software WLF]] (.wlf)<br />
* [[IMA ADPCM]] (.bar, .dvi, .hwas, .idvi, .ivaud, .myspd, .stma, .strm)<br />
* [[Interplay ACM]] (.acm)<br />
* [[Inverse Frequency Sound format]]<br />
* [[iXMF]] (Interactive [[Extensible Music Format]])<br />
* Ken Silverman<br />
** [[Ken's Adlib Music]] (.ksm)<br />
** [[Ken's Digital Music]] (.kdm)<br />
** [[SM (Ken Silverman)]] (.sm)<br />
** [[SND (Ken Silverman)]] (.snd)<br />
* [[LOUDNESS Sound System]] (.lds)<br />
* LucasArts<br />
** [[LucasArts Adlib Audio]] (.laa)<br />
** [[SCUMM]] (SCUMM)<br />
* [[Martin Fernandez]] (.adlib)<br />
* Microsoft<br />
** [[0x0069]] (Xbox ADPCM)<br />
** [[2DX]]<br />
** [[2DX9]] (ADPCM)<br />
** [[DE2]] (ADPCM)<br />
** [[Xbox IMA ADPCM]] (.matx, .wavm, .wvs, .xmu, .xvas, .xwav)<br />
* Nintendo<br />
** [[Advanced Mario Sequencer file]] (.mss)<br />
** [[BRSTMPSM]] (Super Paper Mario)<br />
** [[Donkey Konga 2 DSP]] (Donkey Konga 2)<br />
** [[Mario Paint Composer]] (MPC)<br />
** [[Mario Sequencer file]] (.msq)<br />
** [[Nintendo GameCube / Wii AAAP]]<br />
** [[Nintendo GameCube / Wii ADP]] (Nintendo Gamecube) (.adp)<br />
** [[Nintendo GameCube / Wii AFC]] (Nintendo Gamecube)<br />
** [[Nintendo GameCube / Wii AGSC]] (.agsc)<br />
** [[Nintendo GameCube / Wii AMTS]]<br />
** [[Nintendo GameCube / Wii ASN]] (Nintendo Gamecube)<br />
** [[Nintendo GameCube / Wii ASR]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii AST]] (Nintendo Wii sound format)<br />
** [[Nintendo GameCube / Wii BNS]]<br />
** [[Nintendo GameCube / Wii BO2]]<br />
** [[Nintendo GameCube / Wii BRSTM]] (Nintendo Wii streaming format)<br />
** [[Nintendo GameCube / Wii CAPDSP]]<br />
** [[Nintendo GameCube / Wii CFN]]<br />
** [[Nintendo GameCube / Wii DDSP]]<br />
** [[Nintendo GameCube / Wii DSP]]<br />
** [[Nintendo GameCube / Wii GCA]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii GCM]]<br />
** [[Nintendo GameCube / Wii GSP]]<br />
** [[Nintendo GameCube / Wii HPS]]<br />
** [[Nintendo GameCube / Wii IDSP]]<br />
** [[Nintendo GameCube / Wii ISD]]<br />
** [[Nintendo GameCube / Wii ISH]]<br />
** [[Nintendo GameCube / Wii KRAW]] (Nintendo Wii)<br />
** [[Nintendo GameCube / Wii LPS]]<br />
** [[Nintendo GameCube / Wii MPDS]]<br />
** [[Nintendo GameCube / Wii MPDSP]]<br />
** [[Nintendo GameCube / Wii MSS]]<br />
** [[Nintendo GameCube / Wii MUS]]<br />
** [[Nintendo GameCube / Wii PDT]]<br />
** [[Nintendo GameCube / Wii SDT]]<br />
** [[Nintendo GameCube / Wii SMP]]<br />
** [[Nintendo GameCube / Wii SNS]]<br />
** [[Nintendo GameCube / Wii SPD]]<br />
** [[Nintendo GameCube / Wii SPT]]<br />
** [[Nintendo GameCube / Wii SSM]]<br />
** [[Nintendo GameCube / Wii STM]]<br />
** [[Nintendo GameCube / Wii STR]]<br />
** [[Nintendo GameCube / Wii STS]]<br />
** [[Nintendo GameCube / Wii SWD]]<br />
** [[Nintendo GameCube / Wii THP]]<br />
** [[Nintendo GameCube / Wii TYDSP]]<br />
** [[Nintendo GameCube / Wii VJDSP]]<br />
** [[Nintendo GameCube / Wii WAS]]<br />
** [[Nintendo GameCube / Wii WSD]]<br />
** [[Nintendo GameCube / Wii WSI]]<br />
** [[Nintendo GameCube / Wii YDSP]]<br />
** [[Nintendo GameCube / Wii YMF]]<br />
** [[Nintendo GameCube / Wii ZWDSP]]<br />
** [[SHI]] ([http://battleofthebits.org/lyceum/View/ShroomTool ShroomTool] Instrument, used for Mario Paint instruments)<br />
** [[SHO]] (ShroomTool, used for Mario Paint sounds)<br />
* Origin Software<br />
** [[Ultima 6 Music]] (.m)<br />
* Pixel<br />
** [[PMD (Pixel)]]<br />
* [[Pixel Painters]] (.fmf)<br />
* [[Ragnarok Online 2 RMP]]<br />
* [[Shadowlands]] (.cal)<br />
* Sierra<br />
** [[Sierra AGI]] (Sierra AGI)<br />
** [[Sierra SCI]] (Used in Sierra PC games)<br />
* Sony<br />
** [[Sony Playstation ADS]] (Sony Playstation)<br />
** [[Sony Playstation ASS]] (Sony Playstation)<br />
** [[Sony Playstation AST]]<br />
** [[Sony Playstation BG00]]<br />
** [[Sony Playstation BMDX]]<br />
** [[Sony Playstation CCC]] (Sony Playstation)<br />
** [[Sony Playstation CNK]]<br />
** [[Sony Playstation DXH]] (Sony Playstation)<br />
** [[Sony Playstation ENTH]]<br />
** [[Sony Playstation FAG]] (Sony Playstation)<br />
** [[Sony Playstation FILP]]<br />
** [[Sony Playstation FSB]] (Sony Playstation)<br />
** [[Sony Playstation GCM]]<br />
** [[Sony Playstation GMS]] (Sony Playstation)<br />
** [[Sony Playstation HGC1]]<br />
** [[Sony Playstation I100]] (Sony Playstation)<br />
** [[Sony Playstation I400]] (Sony Playstation)<br />
** [[Sony Playstation I80]] (Sony Playstation)<br />
** [[Sony Playstation IKM]]<br />
** [[Sony Playstation ILD]] (Sony Playstation)<br />
** [[Sony Playstation IVB]]<br />
** [[Sony Playstation JOE]]<br />
** [[Sony Playstation KCES]] (Sony Playstation)<br />
** [[Sony Playstation KHV]] (Sony Playstation)<br />
** [[Sony Playstation LEG]] (Sony Playstation)<br />
** [[Sony Playstation MCG]]<br />
** [[Sony Playstation MI4]] (Sony Playstation)<br />
** [[Sony Playstation MIB]] (Sony Playstation)<br />
** [[Sony Playstation MIC]] (Sony Playstation)<br />
** [[Sony Playstation MIH]]<br />
** [[Sony Playstation MIHB]] (merged [[Sony Playstation MIB|MIB]] & [[Sony Playstation MIH|MIH]])<br />
** [[Sony Playstation MSA]]<br />
** [[Sony Playstation MSVP]]<br />
** [[Sony Playstation MUSC]]<br />
** [[Sony Playstation NPSF]]<br />
** [[Sony Playstation PNB]]<br />
** [[Sony Playstation PSH]]<br />
** [[Sony Playstation RKV]]<br />
** [[Sony Playstation RND]]<br />
** [[Sony Playstation RSTM]]<br />
** [[Sony Playstation RWS]]<br />
** [[Sony Playstation SFS]]<br />
** [[Sony Playstation SIR]]<br />
** [[Sony Playstation SL3]]<br />
** [[Sony Playstation SMPL]]<br />
** [[Sony Playstation SND]]<br />
** [[Sony Playstation SPU]] (Sony Playstation)<br />
** [[Sony Playstation STER]]<br />
** [[Sony Playstation STH]]<br />
** [[Sony Playstation STR]]<br />
** [[Sony Playstation STS]]<br />
** [[Sony Playstation SVAG]]<br />
** [[Sony Playstation SVS]]<br />
** [[Sony Playstation TEC]]<br />
** [[Sony Playstation TK5]]<br />
** [[Sony Playstation VAS]]<br />
** [[Sony Playstation VAG]]<br />
** [[Sony Playstation VB2]] (Playstation / PS2)<br />
** [[Sony Playstation VGS]]<br />
** [[Sony Playstation VIG]]<br />
** [[Sony Playstation VPK]]<br />
** [[Sony Playstation VS]]<br />
** [[Sony Playstation VSF]]<br />
** [[Sony Playstation WP2]]<br />
** [[Sony Playstation XA2]]<br />
** [[Sony Playstation XA30]]<br />
** [[Sony Playstation 2 MI2]] (Sony Playstation 2)<br />
* [[Sound Images Generation 2]] (.sig)<br />
* [[Sound Interface System]] (.lem)<br />
* [[STOS memory bank]] (.mbk)<br />
* [[Unreal Music Format]] (.umx)<br />
* Union Logic Software Publishing<br />
** [[Vinyl Goddess From Mars Instrument Format]]<br />
** [[Vinyl Goddess From Mars Music Format]]<br />
* [[Unique Development Studios]] (.uds)<br />
* [[Video Game Music]] (.vgm, .vgz)<br />
* Westwood Studios<br />
** [[Westwood Studios ADL]] (.adl)<br />
** [[Westwood Studios AUD]] (.aud)<br />
* [[Whacky Wheels]] (.klm)<br />
* [[XMP Game Module]] (.j2b)<br />
<br />
== Metadata formats and related data ==<br />
<br />
* [[APE tag]]<br />
* Cue Sheet - See [[CUE and BIN]]<br />
* [[Exif]]<br />
* [[ID3]]<br />
* [[ISRC]] (International Standard Recording Code)<br />
* [[MDZ]] - strictly not itself a music format, but a metadata file for other music files used by Open Cubic Player. See http://www.cubic.org/player/doc/node72.htm<br />
* [[Monkey's Audio metadata]] (.apl)<br />
* [[Vorbis comment]]<br />
<br />
== Music trackers ==<br />
<br />
* [[1tracker module]] (.1tm)<br />
* [[AHX (Abyss)]] (Abyss Highest eXperience)<br />
* [[Aley's Module]] (.alm)<br />
* [[All Sound Tracker module]] (.ast)<br />
* [[Amiga Module]] (.mod)<br />
* [[AProSys module]] (.aps)<br />
* [[Archimedes Tracker module]] (.musx)<br />
* [[Arkos Tracker]] (.aks)<br />
* [[Art of Noise module]] (.aon)<br />
* [[ASC Sound Master module]] (.asc)<br />
* [[B's Pro Tracker module]] (.bpm, .bps)<br />
* [[Beepola song]] (.bbsong)<br />
* [[BeRoTracker module]] (.br)<br />
* [[BoyScout Tracker module]] (.bsf)<br />
* Brian Postma SoundMon<br />
** [[Brian Postma SoundMon v1.x module]] (.bp)<br />
** [[Brian Postma SoundMon v2.x & v3.x module]] (.bp3)<br />
** [[BS]]<br />
* Buzzic<br />
** [[Buzzic v1.x]] (.buz)<br />
** [[Buzzic v2.0]] (.buz2)<br />
* Chaos Music Composer<br />
** [[CM3]] ([[CMC]] "3/4")<br />
** [[CMC]] (Chaos Music Composer)<br />
** [[CMR]] ([[CMC]] "Rzog")<br />
** [[CMS]] (Stereo Double [[CMC]])<br />
** [[DMC]] (Double ChaosMusicComposer)<br />
* [[Chuck Biscuits/Black Artist module]] (.cba)<br />
* [[Coconizer module]]<br />
* [[Composer 669 module]] (.669)<br />
* [[craptracker ii module]] (.ct2)<br />
* [[Custom Amiga Module]] (.cus. .custom)<br />
* CyberTracker<br />
** [[CyberTracker instrument]] (.ci)<br />
** [[CyberTracker module]] (.ct)<br />
* [[DeliTracker custom]] (.cust)<br />
* [[DeltaMusic module]] (.dta)<br />
* Delta Music Composer<br />
** [[Delta Music Composer module]] (.dlt)<br />
** [[Delta Music 2.0 module]] (.dl2)<br />
* [[Desktop Tracker module]] (.dtt)<br />
* DigiBooster / DigiBooster PRO<br />
** [[DigiBooster v1.x module]] (.digi)<br />
** [[DigiBooster PRO v2.x / DigiBooster 3 module]] (.dbm)<br />
* [[Digital Symphony module]] (.dsym)<br />
* Digitrakker<br />
** [[Digitrakker instrument]] (.ist)<br />
** [[Digitrakker module]] (.mdl)<br />
** [[Digitrakker sample]] (.spl)<br />
* [[DigiTrekker module]] (.dtm)<br />
* [[Digital Tracker module]] (.dtm)<br />
* [[DisorderTracker 2 module]] (.plm)<br />
* [[Dual Module Player DSMI]] (.amf)<br />
* [[Eureka Packer module]] (.eu)<br />
* [[Extended MOD]] (.emd)<br />
* [[Extreme's Tracker module]] (.ams)<br />
* [[FAC Soundtracker]] (MSX, extension unknown)<br />
* [[Face the Music module]] (.ftm)<br />
* Famitracker<br />
** [[FamiTracker module]] (.ftm)<br />
** [[FamiTracker instrument]] (.fti)<br />
* Farandole Composer<br />
** [[Farandole Form 2.0]] (.f2r)<br />
** [[Farandole Composer module]] (.far)<br />
** [[Farandole Composer pattern]] (.fpt)<br />
** [[Farandole Composer sample]] (.fsm, .usm)<br />
* [[Fashion Tracker module]] (.ex)<br />
* FastTracker / FastTracker 2<br />
** [[FastTracker module]] (.ft, .ftc)<br />
** [[Extended instrument]] (.xi)<br />
** [[Extended Module]] (.xm)<br />
* [[FC-M Packer module]] (.fcm)<br />
* [[Flash Tracker module]] (.fls)<br />
* [[Flex Tracker module]] (.flx)<br />
* [[Fuchs Tracker]] (.fchs)<br />
* [[FunkTracker module]] (.fnk)<br />
* Future Composer<br />
** [[Future Composer v1.x module]] (.fc)<br />
** [[Future Composer v1.3 module]] (.fc13)<br />
** [[Future Composer v1.4 module]] (.fc14)<br />
* Future Composer (BSI)<br />
** [[Future Composer (BSI) module]]<br />
* [[Fuzzac Packer module]] (.fuzz)<br />
* [[General Digital Music module]] (.gdm)<br />
* [[GoatTracker module]] (.sng)<br />
* [[Grave Composer module]] (.wow)<br />
* Graoumf Tracker<br />
** [[Graoumf Tracker module]] (.gtk)<br />
** [[Graoumf Tracker 2 module]] (.gt2)<br />
* [[Global Tracker v1.x module]] (.gtr)<br />
* [[HeatSeeker Module Cruncher v1.0]] (.crb)<br />
* [[Hively Tracker module]] (.hvl)<br />
* [[Ice Tracker module]]<br />
* [[Imago Orpheus module]] (.imf)<br />
* Impulse Tracker<br />
** [[Impulse Tracker module]] (.it, .itbz, .itgz, .itr, .itz)<br />
** [[Impulse Tracker sample]] (.its)<br />
* [[JAMCracker Pro module]] (.jam)<br />
* klystrack<br />
** [[klystrack instrument]] (.ki)<br />
** [[klystrack module]] (.kt)<br />
* [[KRIS Packer / ChipTracker module]] (.kris)<br />
* Liquid Tracker<br />
** [[Liquid Digitized Sample]] (.lds)<br />
** [[Liquid Tracker module]] (.liq)<br />
* MadTracker 2<br />
** [[MadTracker 2 envelope]] (.mte)<br />
** [[MadTracker 2 extension]] (.mtx)<br />
** [[MadTracker 2 instrument]] (.mti)<br />
** [[MadTracker 2 module]] (.mt2)<br />
** [[MadTracker 2 pattern]] (.mtp)<br />
** [[MadTracker 2 sample]] (.mts)<br />
* maxYMiser<br />
** [[maxYMiser instrument]] (.myi)<br />
** [[maxYMiser module]] (.snd)<br />
* [[Megatracker module]] (.mgt)<br />
* [[MO3]] (MP3 / Vorbis compressed module)<br />
* [[MOD Edit sample]] (.sam)<br />
* [[Module Protector + noID]] (.mp)<br />
* Moonblaster (MSX)<br />
** [[Moonblaster music]] (.mbm)<br />
** [[Moonblaster sample kit]] (.mbk)<br />
* [[Multi Track Module]] (.mtm)<br />
* Muse Tracker / Pornotracker<br />
** [[Musetracker / Pornotracker instrument]] (.poi)<br />
** [[Musetracker / Pornotracker module]] (.pom)<br />
* Music Pro Tracker<br />
** [[Music Pro Tracker DoublePlay]] (.mpd)<br />
** [[Music Pro Tracker module (MD1)]] (.md1)<br />
** [[Music Pro Tracker module (MD2)]] (.md2)<br />
** [[Music Pro Tracker module (MPT)]] (.mpt)<br />
* [[Nerdtracker II module]] (.ned)<br />
* [[NesTracker module]] (.nest)<br />
* NoisePacker<br />
** [[NoisePacker 2.x]] (.np2)<br />
** [[NoisePacker 3.x]] (.np3)<br />
* [[NoiseTracker module]] (.mod)<br />
* [[Noisetrekker module]] (.ntk)<br />
* OctaMED<br />
** [[OctaMED module (MED)]] (.med)<br />
** [[OctaMED module (MMD1)]] (.mmd1)<br />
** [[OctaMED v2.00 module]] (.med3)<br />
** [[OctaMED v2.10 module (MED4)]] (.med4)<br />
** [[OctaMED v2.10 module (MMD0)]] (.mmd0)<br />
** [[OctaMED v5 module]] (.mmd2)<br />
** [[OctaMED SS module]] (.mmd3)<br />
** [[MED Packer]] (.mmdc)<br />
* Oktalyzer<br />
** [[Oktalyzer module]] (.okt, .okta)<br />
* [[Onyx Music File]] (.omf)<br />
* [[Open MODPlug Tracker module]] (.mptm)<br />
* [[Oracle module]] (.orc)<br />
* [[Pha Packer]] (.pha)<br />
* PlayerPRO<br />
** [[Extended PlayerPRO module]] (.madx)<br />
** [[PlayerPRO module]] (.mad)<br />
* [[Polly Tracker module]]<br />
* [[Pro Sound Creator v1.xx]] (.psc, ZX Spectrum)<br />
* [[Pro Sound Maker]] (.psm)<br />
* Pro Tracker<br />
** [[Pro Tracker v1.xx module]] (.pt1)<br />
** [[Pro Tracker v2.xx module]] (.pt2)<br />
** [[Pro Tracker v3.xx module]] (.pt3) <br />
* [[Pro Tracker (MSX)]] (MSX-Music, extension unknown)<br />
* [[Poly Tracker module]] (.ptm)<br />
* [[Pumatracker module]] (.puma)<br />
* [[Quadra Composer module]] (.emod)<br />
* [[RASTER Music Tracker module]] (.rmt)<br />
* Real Tracker<br />
** [[Real Tracker instrument]] (.rti)<br />
** [[Real Tracker module]] (.rtm)<br />
** [[Real Tracker sample]] (.rts)<br />
* [[Renoise]]<br />
** [[Renoise|Renoise song (XRNS)]] (.xrns)<br />
** [[Renoise|Renoise instrument (XRNS)]] (.xrni)<br />
** [[Renoise|Renoise effect chain (XRNT)]] (.xrnt)<br />
** [[Renoise Song (NTK)]] (.ntk)<br />
** [[Renoise Song (PTK)]] (.ptk)<br />
** [[Renoise Song (RNS)]] (.rns)<br />
* [[SBStudio module]] (.pac, .son, .sou)<br />
* SCC Blaffer NT<br />
** [[SCC Blaffer NT music]] (.sbm, MSX)<br />
** [[SCC Blaffer NT instrument kit]] (.sbk)<br />
* Scream Tracker<br />
** [[Scream Tracker Music Interface Kit module]]<br />
** [[Scream Tracker 1 & 2 module]] (.stm)<br />
** [[Scream Tracker 3 Adlib module]] (.as3m)<br />
** [[Scream Tracker 3 module]] (.s3m)<br />
** [[Scream Tracker 3 / DigiTracker sample]] (.s31)<br />
** [[Scream Tracker 3 / DigiTracker sample]] (.smp)<br />
* [[SoundFX module]] (.sfx, .sfx2)<br />
* Sound Tracker<br />
** [[Soundtracker v2.6 / Ice Tracker module]] (.mtn)<br />
** [[SoundTracker v2.6 module]] (.st26)<br />
** [[Sound Tracker / Super Sonic module]] (.stc)<br />
** [[Sound Tracker Pro module]] (.stp)<br />
* [[SoundSmith module]] (.mtp)<br />
* Soundtrakker<br />
** [[Soundtrakker 128 instrument]] (.ins)<br />
** [[Soundtrakker 128 module]] (.128)<br />
** [[Soundtrakker v1.x instrument]] (.ins)<br />
** [[Soundtrakker v1.x module]] (.sng)<br />
* [[SQ-Tracker module]] (.sqt)<br />
* [[Starkos Tracker module]] (.sks)<br />
* [[StarTrekker / Star Tracker module]] (.mod, .nt, .flt4)<br />
* [[SunVox module]] (.sunvox)<br />
* TFMX<br />
** [[TFMX pattern data]] (.mdat)<br />
** [[TFMX 7V pattern data]] (.mdat)<br />
** [[TFMX Pro pattern data]] (.mdat)<br />
** [[TFMX sample data]] (.smpl)<br />
* Theta Music Composer<br />
** [[Theta Music Composer 8-channel stereo module]] (.tm8)<br />
** [[Theta Music Composer v1.x module]] (.tmc)<br />
** [[Theta Music Composer v2.x module]] (.tm2)<br />
* [[Trackerpacker 3 module]] (.tp3)<br />
* [[Unic Tracker 1.0]] (.unic1)<br />
* [[Unic Tracker 2.0]] (.unic2)<br />
* [[Ultra Tracker]] (.ult)<br />
* [[Velvet Studio AMS v1.x module]] (.ams)<br />
* [[VIC-TRACKER module]] (.vt)<br />
* [[Vortex Tracker module]] (.vtx)<br />
* X-Tracker<br />
** [[D-Lusion Music File]] (.dmf)<br />
** [[D-Lusion Sound File]] (.dms)<br />
<br />
== Musical instrument control ==<br />
<br />
* [[ELECTONE]] - For Yamaha Electone Range Electronic Organs<br />
** [[BOO]] - Part of the [[ELECTONE]] format. <br />
** [[EVT]] - Part of the [[ELECTONE]] format.<br />
* MIDI & Clones<br />
** [[Compact MIDI]]<br />
** [[GMD]] ([[MIDI]] clone)<br />
** [[Gravis Ultrasound patch]] (used by MIDI synthesizers)<br />
** [[HMI]] ([[MIDI]] clone)<br />
** [[HMP]] ([[MIDI]] clone)<br />
** [[HMZ]] (Compressed [[MIDI]])<br />
** [[KAR]] ([[MIDI]] Audio)<br />
** [[MIDI]] (Musical Instrument Digital Interface)<br />
** [[MIDS]] ([[MIDI]] clone)<br />
** [[MIZ]] (Compressed [[MIDI]])<br />
** [[MSS (MIDI)|MSS]] ([[MIDI]] Clone)<br />
** [[RIFF MIDI]]<br />
** [[Scalable Polyphony MIDI]]<br />
** [[SFARK]] (SoundFont archive compressed file)<br />
** [[SoundFont 1.0]]<br />
** [[SoundFont 2.0]] (.sf2)<br />
** [[Synthetic Music Application Format]]<br />
** [[XMI (Extended MIDI)]]<br />
** [[ZIPI]] (proposed MIDI replacement)<br />
* Hardware specific<br />
** AdLib Sound Cards<br />
*** [[AdLib instrument]] (.ins)<br />
*** [[AdLib instrument bank]] (.bnk)<br />
*** [[AdLib MSCplay]] (.msc)<br />
*** [[AdLib music]] (.mus)<br />
*** Adlib Tracker<br />
**** [[Adlib Tracker instrument]] (.ins)<br />
**** [[Adlib Tracker module]] (.sng)<br />
**** [[Adlib Tracker II instrument]] (.a2i)<br />
**** [[Adlib Tracker II instrument|Adlib Tracker II instrument with fm-register macro]] (.a2f)<br />
**** [[Adlib Tracker II instrument bank]] (.a2b)<br />
**** [[Adlib Tracker II instrument bank|Adlib Tracker II instrument bank with macros]] (.a2w)<br />
**** [[Adlib Tracker II module]] (.a2m)<br />
**** [[Adlib Tracker II pattern]] (.a2p)<br />
**** [[Adlib Tracker II module|Adlib Tracker II tiny module]] (.a2t)<br />
*** [[AdLib Visual Composer / Roland Synthesizer song]] (.rol)<br />
*** AMusic<br />
**** [[AMusic module]] (.amd)<br />
**** [[AMusic XMS]] (.xms)<br />
*** [[Beni Tracker module]] (.pis)<br />
*** [[Bob's Adlib Music]] (.bam)<br />
*** Boom Tracker v4.0<br />
**** [[Boom Tracker v4.0 instrument]] (.cif)<br />
**** [[Boom Tracker v4.0 module]] (.cff)<br />
*** [[DeFy Adlib Tracker module]] (.dtm)<br />
*** [[Digital FM module]] (.dfm)<br />
*** [[Drum Traker module]] (.dtl)<br />
*** [[EdLib packed module]] (.d00)<br />
*** [[Exotic AdLib module]] (.xad)<br />
*** [[Extra Simple Music]] (.xsm)<br />
*** [[Faust Music Creator module]] (.sng)<br />
*** [[FM Tracker module]] (.fmt)<br />
*** FM-Kingtracker<br />
**** [[FM-Kingtracker bank]] (.fib)<br />
**** [[FM-Kingtracker instrument]] (.fin)<br />
**** [[FM-Kingtracker module]] (.fmk)<br />
*** HSC AdLib Composer / HSC-Tracker<br />
**** [[HSC AdLib Composer / HSC-Tracker module]] (.hsc)<br />
**** [[HSC AdLib Composer / HSC-Tracker packed module]] (.hsp)<br />
*** [[JBM Adlib Music]] (.jbl)<br />
*** JCH<br />
**** [[JCH-D00]] (.d00)<br />
**** [[JCH-D01]] (.d01)<br />
*** [[Johannes Bjerregård module]] (.jbm)<br />
*** [[Master Tracker module]] (.mtr)<br />
*** [[MK-Jamz audio]] (.mkj)<br />
*** [[Mlat Adlib Tracker module]] (.mad)<br />
*** [[MPU-401 Trakker module]] (.mtk)<br />
*** [[Palladix module]] (.plx)<br />
*** [[RAW (Adlib)|RAW]] (AdLib Sound Card)<br />
*** [[Reality AdLib Tracker module]] (.rad)<br />
*** [[SNG Player module]] (.sng)<br />
*** Surprise! Adlib Tracker<br />
**** [[Surprise! AdLib Tracker v1, 5, 6 module]] (.sat)<br />
**** [[Surprise! Adlib Tracker v2.0]] (.sa2)<br />
*** [[Twin TrackPlayer module]] (.dmo)<br />
*** [[Vibrants module]] (.vib)<br />
*** [[XMS-Tracker module]] (.xms)<br />
** Akai<br />
*** [[Akai S-series MESA multi file]] (.mlt)<br />
*** [[Akai S-series MESA I program]] (.prg)<br />
*** [[Akai S-series MESA II program]] (.s3p)<br />
** [[Codisk Audio File]]<br />
** Creative Labs<br />
*** [[Creative Music Format]] (.cmf)<br />
*** [[Creative Voice File]]<br />
*** [[Sound Blaster Instrument]] (.sbi)<br />
** [[Disney Sound Source]]<br />
** [[DOSBox Raw OPL]] (.dro)<br />
** [[Downloadable Sounds Banks]] (.dls)<br />
** Gravis Ultrasound<br />
*** [[UltraSound GF1 patch]] (.pat)<br />
** [[Instrument Bank]] (Instrument Bank)<br />
** [[Software Music Synthesis System]] (for 8080/Z-80 systems with S-100 bus)<br />
** [[TRS-80 Orchestra-90]] (.orc)<br />
** [[Voice Sequence]] (.vsq)<br />
** Yamaha sound chips<br />
*** [[Callus OPL Register Log]] (YM2151, .cym)<br />
*** [[GYM]] (YM2612 / Sega Genesis)<br />
* Software Synthesizers<br />
** [[Farbrausch BR404 music]] (.bmf)<br />
** [[iZotope iDrum]] (.idrum)<br />
** Native Instruments<br />
*** [[Native Instruments Reaktor ensemble]] (.ens)<br />
** Steinberg VST Presets<br />
*** [[FXB]] (Bank of presets)<br />
*** [[FXP]] (single preset)<br />
<br />
== Musical notation ==<br />
<br />
* [[Drum tablature]]<br />
* [[Guitar tablatures]]<br />
** [[ASCII tab]] (.tab, .btab, .txt)<br />
** [[Guitar Pro]] (.gtp)<br />
*** [[Guitar Pro 3]] (.gp3)<br />
*** [[Guitar Pro 4]] (.gp4)<br />
*** [[Guitar Pro 5]] (.gp5)<br />
*** [[Guitar Pro 6]] (.gp6)<br />
** [[KGuitar]] (.kg)<br />
** [[Power Tab]] (.ptb)<br />
** [[Progression]]<br />
** [[Rich MIDI Tablature Format]] (.rmtf)<br />
** [[TablEdit]] (.tef)<br />
** [[VexTab]]<br />
<br />
* [[Musical notation]]<br />
** [[ABC (musical notation)]]<br />
** [[ANSI Music]]<br />
** Capella<br />
*** [[CAP]]<br />
*** [[CapXML]] (.capx)<br />
** [[ChordML]]<br />
** Copyist<br />
*** [[CP4]]<br />
*** [[CP6]]<br />
** [[Encore]] (.enc)<br />
** [[Extensible Music Notation Markup Language]]<br />
** [[Finale]] (.mus)<br />
** [[Forte]] (.fnf)<br />
** Guido<br />
*** [[GUIDO]]<br />
*** [[GUIDO XML]]<br />
** JMSL<br />
*** [[JMSL]]<br />
*** [[JMSL Score]]<br />
** [[JScoreML]]<br />
** [[LilyPond]]<br />
** [[MEI]]<br />
** [[MHTML]]<br />
** [[MidiXML]]<br />
** [[minimusic]]<br />
** [[MPEG4-SMR]]<br />
** [[Mup]]<br />
** [[MuseScore]]<br />
*** [[MSC]] -(old file format)<br />
*** [[MSCX]] - [[XML file format]]<br />
*** [[MSCZ]] - [[GZIP]] compressed [[MSCX]]<br />
** [[Music Description Language]]<br />
** [[Music Markup Language]]<br />
** [[Music Time]] (.mus)<br />
** [[Music Time Pro]] (.mts)<br />
** [[Musical Notation Markup Language]]<br />
** [[MusicML]]<br />
** [[MusicWrite]] (.mwk)<br />
** [[MusicXML]]<br />
** [[MusicXML compressed]] (.mxl)<br />
** [[Musink]] (.musink)<br />
** [[MusiqueXML]]<br />
** [[MusiXML]]<br />
** [[Myriad Software]] (.msf)<br />
** [[NeumesXML]]<br />
** [[Neuratron Photoscore Format]] (.opt)<br />
** [[Notation Interchange File Format]]<br />
** [[NoteAbility Pro]]<br />
** [[Noteworthy Composer and Music Publisher]] (.nwc)<br />
** [[NoteWriter]]<br />
** [[Notion]]<br />
** [[NtEd]]<br />
** [[Overture]] (.ove)<br />
** [[PriMus]]<br />
** [[Rhapsody Notation Program File]] (.rhp)<br />
** [[Rhapsody 2/3]] (RISC OS. Unrelated to the above "Rhapsody Notation Program File")<br />
** [[Rhapsody 4]] (RISC OS, .c00)<br />
** [[Rosegarden]] (.rg)<br />
** [[QuickScore Elite]] (.qsd)<br />
** [[SCORE]] (.mus)<br />
** [[Score Perfect]] (.spp)<br />
** [[ScoreML]]<br />
** [[ScoreWriter]] (.scw)<br />
** [[Sibelius]]<br />
** [[SMDL]]<br />
** [[SongWrite]]<br />
** [[Studio Session Song]] (.sss)<br />
** [[Theta]]<br />
** [[Tilia]]<br />
** [[VexTab]]<br />
** [[Virtual Musician Markup Language]]<br />
** [[WEDELMUSIC]]<br />
** [[XMF]]<br />
** [[XMusic]]<br />
** [[XScore]] (eXtensible Score Language)<br />
<br />
== Playlists, music libraries, music store downloaders ==<br />
<br />
* [[Amazon downloader file]] (.amz)<br />
* [[B4S]] (Winamp 3 playlist)<br />
* [[FPL]] (foobar2000 playlist)<br />
* [[iTunes Music Library]]<br />
* [[Kapsule]] (Kazaa XML Manifest)<br />
* [[KPL]] (Kazaa Playlist Format)<br />
* [[M3U]] (Multimedia Playlist Format)<br />
* [[MAGMA]] ([[Magnet URI]])<br />
* [[MOD4WIN Module List]] (.mol)<br />
* [[PLS]] (Multimedia Playlist)<br />
* [[RAM (RealAudio)]]<br />
* [[SMIL]] (W3C open standard)<br />
* [[WPL]] (Windows Media Playlist)<br />
* [[XML Sharable Playlist]]<br />
<br />
== Programming languages and APIs (audio/music-specific) ==<br />
<br />
* [[ChucK]] (.ck)<br />
* [[Csound]] (.csd, .orc, .sco)<br />
* Cycling 74 [[Max]] (.maxpat, .max)<br />
* [[FAUST]] (.dsp)<br />
* [[Music Macro Language]]<br />
* Native Instruments [[Reaktor]] (.rkplr)<br />
* [[Pure Data]] (.pd)<br />
* [[Scala (music software)]] (.kbm, .scl, .cmd)<br />
* [[SuperCollider]] (.scd, .sc)<br />
* [[WaveGL]]<br />
* [[Web Audio API]]<br />
<br />
== Ringtones ==<br />
<br />
* [[i Melody]]<br />
* [[M4R]] (Apple iPhone Ringtones - see [[M4A]])<br />
* [[Polyphonic ringtone]]<br />
* [[RTTTL]]<br />
<br />
== Signal processing ==<br />
<br />
These aren't specific file formats, but generic mathematical methods used by other file formats.<br />
<br />
* [[A-law]]<br />
* [[ADPCM]]<br />
* [[DPCM]]<br />
* [[LPCM]]<br />
* [[Pulse code modulation]]<br />
* [[µ-law]] (u-law)<br />
<br />
== Sound card related formats ==<br />
<br />
* [[CMS (Creative Music System)]]<br />
<br />
== Speech synthesis ==<br />
<br />
* [[Speech Synthesis Markup Language]] (SSML)<br />
* [[VoiceDescription]] (OS X)<br />
<br />
== Unclassified (need to move to other categories) ==<br />
<br />
* [[ACM]] (Audio Compression Manager)<br />
* [[ADM]] (ADM Audio File)<br />
* [[B1S]]<br />
* [[BDSP]] (BotDetect Sound Package)<br />
* [[BVG]]<br />
* [[CBD2]]<br />
* [[DSM]] (DSIK Internal)<br />
* [[DSPW]]<br />
* [[DTK]]<br />
* [[FFW]]<br />
* [[First Rate Music Hall]] (.pck, MSX-Music song editor using [[Music Macro Language]])<br />
* [[GBTS]]<br />
* [[GCUB]]<br />
* [[GSB]]<br />
* [[HLWAV]]<br />
* [[IAB]]<br />
* [[IADP]]<br />
* [[INT]] (RAW File)<br />
* [[ISWS]]<br />
* [[JSTM]]<br />
* [[KOVS]]<br />
* [[MA]] (Music Assembler)<br />
* [[MNSTR]]<br />
* [[MSF]]<br />
* [[MTAF]]<br />
* [[S98]] (NEC PC-98)<br />
* [[SD]] (ESPS sampled data file)<br />
* [[SGI]] (Sound Generator 3.0 instrument)<br />
* [[SNG (SCC Musixx)|SNG]] (SCC Musixx)<br />
* [[Sound Effect Editor]] (.see, MSX)<br />
* [[TFMX]] (TFMX)<br />
* [[Vivaldi]] (RISC OS)<br />
<br />
See the Open Cubic Player homepage for a list of demo formats: http://www.cubic.org/player/features.html<br />
<br />
See also [[Piano Rolls]] (which is under the [[Physical File Formats]]).<br />
<br />
== Links ==<br />
* [http://boingboing.net/2013/09/20/kickstarting-free-open-record.html Kickstarting free, open recordings of Bach's "Well-Tempered Clavier, Book 1"]<br />
* [http://mpc-hc.org/ MPC-HC: media player for Windows handling just about all video/audio formats]<br />
* [http://boingboing.net/2013/09/27/david-byrnes-how-music-wor.html How Music Works]<br />
* [http://www.textfiles.com/programming/FORMATS/admusfmt.pro Some discussion of "advanced music formats" from 1994]<br />
* [http://www.textfiles.com/programming/FORMATS/audiof23.txt FAQ on audio file formats (1992-07-09)]<br />
* [http://boingboing.net/2013/11/03/this-must-be-the-8-bit-place.html Chiptune version of Talking Heads song]<br />
* [http://www.youtube.com/watch?v=3Z2vU8M6CYI Beatles 3000: humorous video of how the future might misunderstand 20th century pop culture if artifacts decay as happened in the past]<br />
* [http://publicdomainreview.tumblr.com/post/76437123224/chaoscontrolled123-luke-and-i-were-looking-at The Music Written on This Dude's Butt]<br />
* [http://vimeo.com/58200103 "Eye of the tiger" played on a modified dot matrix printer]<br />
* [http://chipflip.wordpress.com/2014/03/09/a-short-history-of-hardcore-chipmusic/ A Short History of Hardcore Chipmusic]<br />
* [https://medium.com/message/you-need-to-hear-this-extremely-rare-recording-27619411e077 You Need to Hear This Extremely Rare Recording]<br />
* [http://www.loc.gov/preservation/resources/rfs/audio.html Library of Congress Recommended Format Specifications: Audio Works]<br />
* [http://betaboston.com/news/2014/07/17/in-a-bid-for-more-emotional-snacking-frito-lay-patents-culinary-theme-songs/ In a bid for more emotional snacking, Frito-Lay patents culinary theme songs]<br />
* [http://www.theverge.com/2014/8/4/5968243/mit-turns-recorded-vibrations-back-into-speech-and-music Scientists reconstruct speech through soundproof glass by watching a bag of potato chips]<br />
* [http://www.palmbeachpost.com/ap/ap/business/apple-releases-tool-to-remove-free-u2-album/nhNG9/ Apple releases tool to remove free U2 album] (which they gave you whether you wanted it or not)<br />
* [https://github.com/AyrA/ExcelPlayer Excel sheet that plays video and audio]<br />
* [http://webaudio.github.io/web-audio-api/ Web Audio API (W3C)]<br />
* [http://www.wonderingsound.com/feature/why-collecting-music-matters/ Why Collecting Matters: Citizen Archivists and the Battle for Future Pasts]<br />
* [http://mediaarea.net/en/MediaInfo MediaInfo: software that shows metadata for audio/video files]<br />
* [http://www.bl.uk/projects/save-our-sounds Save our Sounds]<br />
* [http://www.davidsystems.com/#tools David Systems tools: includes online loudness analysis of sound files]<br />
* [http://createdigitalmusic.com/2015/07/next-web-standard-music-notation/ The next Web standard could be music notation]<br />
* [https://www.youtube.com/watch?v=q_3d1x2VPxk How Oldschool Sound/Music worked] (video)<br />
* [http://www.crutchfield.com/S-ulligiNLBZf/learn/learningcenter/home/hometheater_surround.html Understanding surround sound formats]<br />
* [http://www.righto.com/2017/04/reverse-engineering-76477-space.html Reverse engineering the 76477 "Space Invaders" sound effect chip from die photos]<br />
<br />
[[Category:Audio and Music| ]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Custom_Amiga_ModuleCustom Amiga Module2018-05-10T11:37:42Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
}}<br />
<br />
The '''Custom''' format is an Amiga music format created by Frank Riffel and Peter Kunath for their Amiga music player ''DeliTracker''.<br />
<br />
DeliTracker supports hundreds of Amiga music formats through ''DeliPlayers''; plugins with the code to recognise and play a specific music format.<br />
<br />
For music formats that DeliTracker ''doesn't'' have a DeliPlayer for, there is the catch-all ''Custom'' format, which is simply another DeliPlayer written exclusively for that music, combining the music's replay code and data in the same file.<br />
<br />
The Custom format is also supported by DeliTracker's main rival, EaglePlayer, and UADE which emulates them both.<br />
<br />
All DeliTracker plugins and Custom files are [[Amiga Hunk]] files. The first hunk must be a code hunk that begins with these 32-bit big-endian values:<br />
# 0x70FF4E75: This is 680x0 code (<tt>moveq #-1,d0 / rts</tt>) to immediately exit if this file was run as a normal executable<br />
# 0x44454C49: "DELI"<br />
# 0x5249554D: "RIUM" -- two part magic ID for DeliTracker by Delirium Softworks<br />
# a relocated (absolute) pointer to a ''tag list''<br />
<br />
The ''tag list'' is a list of 32-bit key/value pairs. Tags are a [http://wiki.amigaos.net/wiki/Tags standard idiom in Amiga software] for variable lists of parameters. The tags that DeliTracker supports are listed in the development kit supplied with DeliTracker.<br />
<br />
A Custom file distinguishes itself from a DeliPlayer plugin by using the <tt>DTP_CustomPlayer</tt> (0x80004455) tag instead of the <tt>DTP_InternalPlayer</tt> (0x80004454) tag.<br />
<br />
The contents of a custom file is usually music replay code and data ripped directly from a game that takes over the Amiga hardware and does not use the operating system. Unlike the [[SID]] or [[Portable Sound Format|PSF]] formats, which also bundle ripped code and data in an identifying format, DeliTracker does not run the code in an ''emulated'' virtual machine, it executes it directly! It's contingent on the author of the Custom file to remove all Amiga hardware access from the player code (except for the audio hardware, obviously), and make it "play nice" with the running OS. The most common "dirty" accesses by replay code are to set up vertical blank timing interrupts or to use the CIA timers and their interrupts. DeliTracker provides callback functions to the custom file to allow them to set up equivalent timing interrupts in a system-friendly way.<br />
<br />
Custom files are sometimes replaced with a combination of a new DeliPlayer/EaglePlayer and data files that they recognise. One of the advantages of this is the programmer can go to great effort and support DeliTracker's "NotePlayer" or EaglePlayer's "Amplifier" APIs, which play sounds independently of the Amiga hardware and can thus support playing audio mixed to 14-bit quality on the original Amiga hardware or even higher quality through third party sound cards, and also allow DeliTracker/EaglePlayer to pass the audio through visualisation plugins.<br />
<br />
Custom files that remain today are usually because their replay code was unique, there is little advantage in creating a standalone plugin that only recognises a single data file.<br />
<br />
== Software ==<br />
* [http://aminet.net/package/mus/play/DeliTracker232 DeliTracker 2.32], the last release of DeliTracker in August 2000, including the developer kit for creating DeliPlayers / Custom files<br />
* [http://aminet.net/package/mus/play/Eagleplayer_2.05 EaglePlayer 2.05], the main rival to DeliTracker on the Amiga<br />
* [http://zakalwe.fi/uade/ UADE], the Unix Amiga DeliTracker Emulator which runs all DeliPlayers and EaglePlayers on an emulated Amiga, so it can play all Amiga music on platforms other than the Amiga<br />
<br />
== Examples ==<br />
* [http://old.exotica.org.uk/tunes/pages/CUST-Custom.html ExoticA's old collection of Custom files]<br />
* [https://www.exotica.org.uk/wiki/Custom ExoticA's new collection of Custom files]<br />
* [http://wt.exotica.org.uk/customs.html Custom files created by the Wanted Team]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Custom_Amiga_ModuleCustom Amiga Module2018-05-10T11:36:06Z<p>Kyz: /* Links */</p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
}}<br />
<br />
The '''Custom''' format is an Amiga music format created by Frank Riffel and Peter Kunath for their Amiga music player ''DeliTracker''.<br />
<br />
DeliTracker supports hundreds of Amiga music formats through ''DeliPlayers''; plugins with the code to recognise and play a specific music format.<br />
<br />
For music formats that DeliTracker ''doesn't'' have a DeliPlayer for, there is the catch-all ''Custom'' format, which is simply another DeliPlayer written exclusively for that music, combining the music's replay code and data in the same file.<br />
<br />
The Custom format is also supported by DeliTracker's main rival, EaglePlayer, and UADE which emulates them both.<br />
<br />
All DeliTracker plugins and Custom files are [[Amiga Hunk]] files. The first hunk must be a code hunk that begins with these 32-bit big-endian values:<br />
# 0x70FF4E75: This is 680x0 code (<tt>moveq #-1,d0 / rts</tt>) to immediately exit if this file was run as a normal executable<br />
# 0x44454C49: "DELI"<br />
# 0x5249554D: "RIUM" -- two part magic ID for DeliTracker by Delirium Softworks<br />
# a relocated (absolute) pointer to a ''tag list''<br />
<br />
The ''tag list'' is a list of 32-bit key/value pairs. Tags are a [http://wiki.amigaos.net/wiki/Tags standard idiom in Amiga software] for variable lists of parameters. The tags that DeliTracker supports are listed in the development kit supplied with DeliTracker.<br />
<br />
A Custom file distinguishes itself from a DeliPlayer plugin by using the <tt>DTP_CustomPlayer</tt> (0x80004455) tag instead of the <tt>DTP_InternalPlayer</tt> (0x80004454) tag.<br />
<br />
The contents of a custom file is usually music replay code and data ripped directly from a game that takes over the Amiga hardware and does not use the operating system. Unlike the [[SID]], [[Portable Sound Format|PSF]] or [[SC68]] formats, which also bundle ripped code and data in an identifying format, DeliTracker does not run the code in an ''emulated'' virtual machine, it executes it directly! It's contingent on the author of the Custom file to remove all Amiga hardware register access from the player code (except for the audio hardware, obviously), and make it "play nice" with the running OS. The most common "dirty" accesses by replay code are to set up vertical blank timing interrupts or to use the CIA timers and their interrupts. DeliTracker provides callback functions to the custom file to allow them to set up equivalent timing interrupts in a system-friendly way.<br />
<br />
Custom files are sometimes replaced with a combination of a new DeliPlayer/EaglePlayer and data files that they recognise. One of the advantages of this is the programmer can go to great effort and support DeliTracker's "NotePlayer" or EaglePlayer's "Amplifier" APIs, which play sounds independently of the Amiga hardware and can thus support playing audio mixed to 14-bit quality on the original Amiga hardware or even higher quality through third party sound cards, and also allow DeliTracker/EaglePlayer to pass the audio through visualisation plugins.<br />
<br />
Custom files that remain today are usually because their replay code was unique, there is little advantage in creating a standalone plugin that only recognises a single data file.<br />
<br />
== Software ==<br />
* [http://aminet.net/package/mus/play/DeliTracker232 DeliTracker 2.32], the last release of DeliTracker in August 2000, including the developer kit for creating DeliPlayers / Custom files<br />
* [http://aminet.net/package/mus/play/Eagleplayer_2.05 EaglePlayer 2.05], the main rival to DeliTracker on the Amiga<br />
* [http://zakalwe.fi/uade/ UADE], the Unix Amiga DeliTracker Emulator which runs all DeliPlayers and EaglePlayers on an emulated Amiga, so it can play all Amiga music on platforms other than the Amiga<br />
<br />
== Examples ==<br />
* [http://old.exotica.org.uk/tunes/pages/CUST-Custom.html ExoticA's old collection of Custom files]<br />
* [https://www.exotica.org.uk/wiki/Custom ExoticA's new collection of Custom files]<br />
* [http://wt.exotica.org.uk/customs.html Custom files created by the Wanted Team]</div>Kyzhttp://fileformats.archiveteam.org/wiki/Custom_Amiga_ModuleCustom Amiga Module2018-05-10T11:35:50Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
}}<br />
<br />
The '''Custom''' format is an Amiga music format created by Frank Riffel and Peter Kunath for their Amiga music player ''DeliTracker''.<br />
<br />
DeliTracker supports hundreds of Amiga music formats through ''DeliPlayers''; plugins with the code to recognise and play a specific music format.<br />
<br />
For music formats that DeliTracker ''doesn't'' have a DeliPlayer for, there is the catch-all ''Custom'' format, which is simply another DeliPlayer written exclusively for that music, combining the music's replay code and data in the same file.<br />
<br />
The Custom format is also supported by DeliTracker's main rival, EaglePlayer, and UADE which emulates them both.<br />
<br />
All DeliTracker plugins and Custom files are [[Amiga Hunk]] files. The first hunk must be a code hunk that begins with these 32-bit big-endian values:<br />
# 0x70FF4E75: This is 680x0 code (<tt>moveq #-1,d0 / rts</tt>) to immediately exit if this file was run as a normal executable<br />
# 0x44454C49: "DELI"<br />
# 0x5249554D: "RIUM" -- two part magic ID for DeliTracker by Delirium Softworks<br />
# a relocated (absolute) pointer to a ''tag list''<br />
<br />
The ''tag list'' is a list of 32-bit key/value pairs. Tags are a [http://wiki.amigaos.net/wiki/Tags standard idiom in Amiga software] for variable lists of parameters. The tags that DeliTracker supports are listed in the development kit supplied with DeliTracker.<br />
<br />
A Custom file distinguishes itself from a DeliPlayer plugin by using the <tt>DTP_CustomPlayer</tt> (0x80004455) tag instead of the <tt>DTP_InternalPlayer</tt> (0x80004454) tag.<br />
<br />
The contents of a custom file is usually music replay code and data ripped directly from a game that takes over the Amiga hardware and does not use the operating system. Unlike the [[SID]], [[Portable Sound Format|PSF]] or [[SC68]] formats, which also bundle ripped code and data in an identifying format, DeliTracker does not run the code in an ''emulated'' virtual machine, it executes it directly! It's contingent on the author of the Custom file to remove all Amiga hardware register access from the player code (except for the audio hardware, obviously), and make it "play nice" with the running OS. The most common "dirty" accesses by replay code are to set up vertical blank timing interrupts or to use the CIA timers and their interrupts. DeliTracker provides callback functions to the custom file to allow them to set up equivalent timing interrupts in a system-friendly way.<br />
<br />
Custom files are sometimes replaced with a combination of a new DeliPlayer/EaglePlayer and data files that they recognise. One of the advantages of this is the programmer can go to great effort and support DeliTracker's "NotePlayer" or EaglePlayer's "Amplifier" APIs, which play sounds independently of the Amiga hardware and can thus support playing audio mixed to 14-bit quality on the original Amiga hardware or even higher quality through third party sound cards, and also allow DeliTracker/EaglePlayer to pass the audio through visualisation plugins.<br />
<br />
Custom files that remain today are usually because their replay code was unique, there is little advantage in creating a standalone plugin that only recognises a single data file.<br />
<br />
== Software ==<br />
* [http://aminet.net/package/mus/play/DeliTracker232 DeliTracker 2.32], the last release of DeliTracker in August 2000, including the developer kit for creating DeliPlayers / Custom files<br />
* [http://aminet.net/package/mus/play/Eagleplayer_2.05 EaglePlayer 2.05], the main rival to DeliTracker on the Amiga<br />
* [http://zakalwe.fi/uade/ UADE], the Unix Amiga DeliTracker Emulator which runs all DeliPlayers and EaglePlayers on an emulated Amiga, so it can play all Amiga music on platforms other than the Amiga<br />
<br />
== Links ==<br />
* [http://old.exotica.org.uk/tunes/pages/CUST-Custom.html ExoticA's old collection of Custom files]<br />
* [https://www.exotica.org.uk/wiki/Custom ExoticA's new collection of Custom files]<br />
* [http://wt.exotica.org.uk/customs.html Custom files created by the Wanted Team]</div>Kyzhttp://fileformats.archiveteam.org/wiki/SC68SC682018-05-10T11:31:28Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|sc68}}<br />
}}<br />
<br />
'''SC68''' is a file format for replaying Atari ST, Atari STE or Amiga music, created by Benjamin Gerard.<br />
<br />
It is a similar design to the [[SID]] format, where the music replayer code music data and metadata are all bundled into one file, and are played by running the replayer code in an emulated environment. No music is natively created in this format, it exists to preserve "ripped" music extracted from games and demos.<br />
<br />
There have not been many new files created in the SC68 format since 2003. The [[Atari SoundHeader]] format is now more popular for Atari music and the [[Custom Amiga Module]] format is more popular as a catch-all format for Amiga music.<br />
<br />
== Links ==<br />
* [http://sc68.atari.org/ SC68 home page] including player software and example files</div>Kyzhttp://fileformats.archiveteam.org/wiki/SC68SC682018-05-10T11:30:44Z<p>Kyz: </p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|sc68}}<br />
}}<br />
<br />
'''SC68''' is a file format for replaying Atari ST, Atari STE or Amiga music, created by Benjamin Gerard.<br />
<br />
It is a similar design to the [[SID]] format, where the music replayer code music data and metadata are all bundled into one file, and are played by running the replayer code in an emulated environment. No music is natively created in this format, it exists to preserve "ripped" music extracted from games and demos.<br />
<br />
There have not been many new files created in the SC68 format since 2003. The [[Atari SoundHeader]] format is now more popular for Atari music and the [[Custom Amiga Module]] format is more popular as a catch-all format for Amiga music.<br />
<br />
== External links ==<br />
* [http://sc68.atari.org/ SC68 home page]</div>Kyzhttp://fileformats.archiveteam.org/wiki/SNDHSNDH2018-05-10T11:30:25Z<p>Kyz: Redirected page to Atari SoundHeader</p>
<hr />
<div>#REDIRECT [[Atari SoundHeader]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/SNDHSNDH2018-05-10T11:30:10Z<p>Kyz: Replaced content with "#REDIRECT Atari SoundHeader"</p>
<hr />
<div>[[#REDIRECT Atari SoundHeader]]</div>Kyzhttp://fileformats.archiveteam.org/wiki/SNDHSNDH2018-05-10T11:28:46Z<p>Kyz: Created page with "{{FormatInfo |formattype=electronic |subcat=Audio and Music |extensions={{ext|sndh}} }} '''SNDH''' is a file format for replaying Atari ST music, created by Jochen Knaus aka ..."</p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|sndh}}<br />
}}<br />
<br />
'''SNDH''' is a file format for replaying Atari ST music, created by Jochen Knaus aka BDC of AURA Crew.<br />
<br />
It is a very light metadata format placed above what is otherwise unmodified 680x0 machine code intended to be run on real or emulated Atari ST hardware.<br />
<br />
== External links ==<br />
* [http://sndh.atari.org/ SNDH home page]</div>Kyzhttp://fileformats.archiveteam.org/wiki/SC68SC682018-05-10T11:20:36Z<p>Kyz: Created page with "{{FormatInfo |formattype=electronic |subcat=Audio and Music |extensions={{ext|sc68}} }} '''SC68''' is a file format for replaying Atari ST, Atari STE or Amiga music, created ..."</p>
<hr />
<div>{{FormatInfo<br />
|formattype=electronic<br />
|subcat=Audio and Music<br />
|extensions={{ext|sc68}}<br />
}}<br />
<br />
'''SC68''' is a file format for replaying Atari ST, Atari STE or Amiga music, created by Benjamin Gerard.<br />
<br />
It is a similar design to the [[SID]] format, where the music replayer code music data and metadata are all bundled into one file, and are played by running the replayer code in an emulated environment. No music is natively created in this format, it exists to preserve "ripped" music extracted from games and demos.<br />
<br />
There have not been many new files created in the SC68 format since 2003. The [[SNDH]] format is now more popular for Atari music and the [[Custom Amiga Module]] format is more popular as a catch-all format for Amiga music.<br />
<br />
== External links ==<br />
* [http://sc68.atari.org/ SC68 home page]</div>Kyz