Unified Emulator Format
   HOME

TheInfoList



OR:

Unified Emulator Format (UEF) is a
container format A container format (informally, sometimes called a wrapper) or metafile is a file format that allows multiple data streams to be embedded into a single file, usually along with metadata for identifying and further detailing those streams. Notab ...
for the compressed storage of
audio tape An audio tape recorder, also known as a tape deck, tape player or tape machine or simply a tape recorder, is a sound recording and reproduction device that records and plays back sounds usually using magnetic tape for storage. In its present- ...
s,
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * R ...
s, floppy discs and machine state snapshots for the 8-bit range of computers manufactured by
Acorn Computers Acorn Computers Ltd. was a British computer company established in Cambridge, England, in 1978. The company produced a number of computers which were especially popular in the United Kingdom, UK, including the Acorn Electron and the Acorn Archi ...
. First implemented by Thomas Harte's ElectrEm emulator and related tools, it is now supported by major emulators of Acorn machines and carried by two online archives of Acorn software numbering thousands of titles. UEF attempts to concisely reproduce media borne signals rather than simply the data represented by them, the intention being an accurate
archive An archive is an accumulation of historical records or materials – in any medium – or the physical facility in which they are located. Archives contain primary source documents that have accumulated over the course of an individual or ...
of original media rather than merely a capability to reproduce files stored on them. A selection of
metadata Metadata is "data that provides information about other data", but not the content of the data, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive metadata – the descriptive ...
can be included, such as compatibility ratings, position markers, images of packaging and the text of instruction manuals. The Acorn machines implement the
Kansas City standard The Kansas City standard (KCS), or ''Byte'' standard, is a data storage protocol for standard cassette tapes at . It originated in a symposium sponsored by Byte (magazine), ''Byte'' magazine in November 1975 in Kansas City, Missouri to develop a ...
(KCS) for tape data encoding and as a result the file format is suitable for creating
backup In information technology, a backup, or data backup is a copy of computer data taken and stored elsewhere so that it may be used to restore the original after a data loss event. The verb form, referring to the process of doing so, is "back up", w ...
s of original media for several non-Acorn machines. As of version 0.10 the file format carries
BASICODE BASICODE was a computer project intended to create a unified standard for the BASIC programming language. BASIC was available on many popular home computers, but there were countless variants that were mostly computer compatibility, incompatible w ...
signals as well. TZX is a chunked format with similar scope for the
ZX Spectrum The ZX Spectrum () is an 8-bit computing, 8-bit home computer that was developed by Sinclair Research. It was released in the United Kingdom on 23 April 1982, and became Britain's best-selling microcomputer. Referred to during development as t ...
series.


History

Before the development of the UEF, archives of Acorn computer software on the
World Wide Web The World Wide Web (WWW), commonly known as the Web, is an information system enabling documents and other web resources to be accessed over the Internet. Documents and downloadable media are made available to the network through web se ...
had adopted a convention of hosting
ZIP Zip, Zips or ZIP may refer to: Common uses * ZIP Code, USPS postal code * Zipper or zip, clothing fastener Science and technology Computing * ZIP (file format), a compressed archive file format ** zip, a command-line program from Info-ZIP * Zi ...
archives of the raw files on a tape, each raw file accompanied by a
sidecar file Sidecar files, also known as buddy files or connected files, are computer files that store data (often metadata) which is not supported by the format of a source file. There may be one or more sidecar files for each source file. There may also be ...
, with extension .inf, carrying the load and execution addresses from the file header. The INF convention, described and implemented by Wouter Scholten in ''bbcim'' (1995), extends the output format of the *INFO command (built into Acorn DFS and ADFS, which lists file lengths and other metadata attached to files on disc) to cover CRCs and the order of files on tape. While it works adequately for storing user files, it does not preserve the
baud In telecommunication and electronics, baud (; symbol: Bd) is a common unit of measurement of symbol rate, which is one of the components that determine the speed of communication over a data channel. It is the unit for symbol rate or modulatio ...
rate of the recording, precise timing information or the non-standard data streams used in copy protected titles. In the case of disc-based software, it became increasingly convenient to send a sector dump of the disc instead, and by the time of the UEF's introduction the file extensions .ssd and .dsd were already established for single-sided and double-sided raw images of DFS discs, respectively. Distributed bare or in a ZIP archive, they remain popular on archive sites.


Aims

In a 2010 post to the Stardot forum, Harte explained at length his reasons for creating the format: being the first to address emulation of the Acorn Electron and its primary medium, tape, Harte wanted a fine-grained and technically optimal representation of media, compared to existing ad hoc formats; and to package the multiple media elements of a software release into a single file, so that downloading a UEF is "more like obtaining the original product". He went on to observe that it was the tools in use, and "user need", that determined the actual uses to which the UEF had been put.


Structure

A UEF file consists of a fixed length ''header'' that identifies itself, followed by a
linked list In computer science, a linked list is a linear collection of data elements whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes whic ...
of ''chunks'' containing the data of interest. The header comprises the
magic Magic or Magick most commonly refers to: * Magic (supernatural), beliefs and actions employed to influence supernatural beings and forces * Ceremonial magic, encompasses a wide variety of rituals of magic * Magical thinking, the belief that unrela ...
string UEF File!, a terminating
null character The null character (also null terminator) is a control character with the value zero. It is present in many character sets, including those defined by the Baudot and ITA2 codes, ISO/IEC 646 (or ASCII), the C0 control code, the Universal Coded Ch ...
, and the two-byte version number of the UEF specification in use. A reading application needs to pay attention to the version number, as the unit of measurement in some chunks differs according to the specification version, and one chunk has been redefined between versions. Each chunk consists of a two-byte ''ID'' which determines its meaning, the ''length'' of the body in four bytes, and the ''body'' itself. An application can readily skip the bodies of chunks it does not need to process. After the last chunk the file simply ends. Currently, UEF chunks do not nest. The whole UEF file, including the header, may optionally be compressed in
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and in ...
format. By examining the start of the file for a gzip or UEF header, a decompression library can be invoked as appropriate.


Content

The Unified Emulator Format models software on ''cassette'' as a contiguous sequence of segments, which may be carrier tones, the modulated
asynchronous Asynchrony is the state of not being in synchronization. Asynchrony or asynchronous may refer to: Electronics and computing * Asynchrony (computer programming), the occurrence of events independent of the main program flow, and ways to deal with ...
signals of ordinary data blocks, ''security cycles'' (modulated synchronous signals, said to be an "identification feature") or ''gaps'' where no recognised signal is present. Tape UEF chunks are concatenated in the order they appear, to build up the representation of a whole recording. When generated from a real source tape, each waveform on the tape corresponds directly to a tape chunk, such that the source can be accurately reconstructed (with any non-encodable signals replaced by gaps of equal length.) Standard Acorn streams (chunk ID: 0x0100) are encoded so that their bytes reappear in the UEF chunk body. From version 0.10, direct support is extended to all asynchronous formats (0x0104) including the 8,N,2 format of BASICODE. Otherwise there is a generic chunk (0x0102) to accommodate any arbitrary sequence of bits. Security wave chunks (0x0114) also carry bit streams, encoded in a different form to allow the half-length one bits observed in commercial recordings to be represented. There are some modal variables affecting the interpretation of these chunks: the baud rate, 1200 baud for Acorn signals or 300 baud for KCS; the exact carrier frequency, which determines the playing time of the reconstructed tape; and the
phase Phase or phases may refer to: Science *State of matter, or phase, one of the distinct forms in which matter can exist *Phase (matter), a region of space throughout which all physical properties are essentially uniform * Phase space, a mathematic ...
of the signal. The latter two may change within a published recording, and their absolute values depend on the tape player, amplifier and sound card used to digitise the signal. A UEF file can contain markers to separate the tapes of a multiple-tape distribution, and the sides of each tape; positions of interest within each side can also be marked. ''Discs'' are stored as raw sector dumps of each surface, along with their
geometry Geometry (; ) is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space such as the distance, shape, size, and relative position of figures. A mathematician who works in the field of geometry is c ...
and a byte identifying the
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
. Previous versions of the specification had provisions to encode discs at the byte stream level, or the
magnetic domain A magnetic domain is a region within a magnetic material in which the magnetization is in a uniform direction. This means that the individual magnetic moments of the atoms are aligned with one another and they point in the same direction. When c ...
level. With SSD and DSD sector dumps serving standard BBC discs well, and the mature FDI format catering for copy-protected software, the disc image function of UEF is little used. ''
Sideways ''Sideways'' is a 2004 American comedy-drama road film directed by Alexander Payne and written by Jim Taylor and Payne. A film adaptation of Rex Pickett's 2004 novel of the same name, ''Sideways'' follows two men in their forties, Miles Raymo ...
ROMs'' are likewise stored as raw data, plus an indication of their purpose and a ROM slot recommendation. Again the user base prefers bare ROM dumps for archival. ''State snapshot'' UEF files include standardised chunks to store the major portions of an Acorn Electron or BBC Micro's state: main, shadow and expansion bus memory, the CPU and the WD1770 floppy drive controller; also the Electron ULA and the Slogger Master RAM Board, a common Electron add-on. A ''patch memory'' chunk rewrites a block of memory at any address, allowing the UEF format to package
pokes Poke may refer to: Arts, entertainment, and media * Poke (''Ender's Game''), a fictional character * Poke (game), a two-player card game * Poke, a fictional bar owner in the television series '' Treme'' * The Poke, a British satirical website Fo ...
. To store state elements not accommodated in the standard chunks, emulators can define their own chunks. A ''private use area'' of chunk IDs is reserved for this or any other purpose, although some emulators save state under invalid chunk IDs in the public space. ''Multiplexed data'' is an extension for emulators, used by ElectrEm but without a published specification: One salient application mentioned by Harte is to superimpose "new graphics on old games", and a single example, a 256-colour enhanced '' Daredevil Dennis'', is available from StairwayToHell.com to run in ElectrEm. Multiplexed data chunks are intended to follow ordinary data chunks in any of the above classes, supplementing the data. Their contents are not meant to be visible to the Acorn computer, whether real or emulated, but otherwise their meaning has not been specified. Chunks providing ''content information'' include the ''file origin'' chunk, which identifies the application that generated the UEF file. ''Inlay scan'' chunks, intended as a file preview, hold a raw bitmap of the
cover art Cover art is a type of artwork presented as an illustration or photograph on the outside of a published product such as a book (often on a dust jacket), magazine, newspaper ( tabloid), comic book, video game (box art), music album (album art), ...
although anything beyond a
thumbnail Thumbnails are reduced-size versions of pictures or videos, used to help in recognizing and organizing them, serving the same role for images as a normal text index does for words. In the age of digital images, visual search engines and image ...
can take up more data than a typical game. The UEF author can also provide the text of an ''instruction booklet'' or a URL for more information, a ''short title'' for display, ''minimum machine specification and keyboard mapping'' for the enclosed software; and where a game does not use the whole screen, the coordinates of the ''visible area'' can be given. A minority of UEF files available online contain anything in this class but an origin chunk. A UEF file can contain multiple classes of data at once, as Harte intended; it is not possible to know which classes it contains without scanning the whole file. In its file selection box ElectrEm displays an icon according to the first data class chunk it finds.


Applications


MakeUEF

MakeUEF is a Windows application written by Thomas Harte and expanded by Fraser Ross to convert audio samples into UEF files. Two grades are offered. An 'amateur' version reads
WAV Waveform Audio File Format (WAVE, or WAV due to its filename extension; pronounced "wave") is an audio file format standard, developed by IBM and Microsoft, for storing an audio bitstream on PCs. It is the main format used on Microsoft Win ...
files or a live signal played to the sound card, and transcribes only standard data blocks with accuracy. The 'professional' grade accepts only CSW files, which represent waves preprocessed into rectangular
pulse train A pulse wave or pulse train is a type of non-sinusoidal waveform that includes square waves (duty cycle of 50%) and similarly periodic but asymmetrical waves (duty cycles other than 50%). It is a term used in synthesizer programming, and is ...
s, but it encodes all audio information supported by the UEF specification. MakeUEF claims to have been the sole creator of all UEF files available on the Web before November 2004, the month of its version 1.0 release. Although the file format was more capable, supporting "gap lengths" since February 2001 at the latest, only "program data" was retained by MakeUEF prior to version 1.0. From November 2004 the fidelity of MakeUEF improved and the file spec was further refined, and an extension of .hq.uef ("high quality") was adopted to reflect this. The AcornPreservation.org archive only carries the HQ.UEF variety as well as the CSW source files. Its sister site StairwayToHell.com accepts 'amateur' UEF translations and files produced by pre-1.0 MakeUEF. the latter site hosts 1,494 transcriptions of BBC Micro cassette titles and at least 800 of Electron titles.


Others

* Several emulators of Acorn machines support UEF natively, to read and write tape data (at original speed or faster) and store state snapshots. Examples include ElectrEm, BeebEm and B-Em. * FreeUEF by Thomas Harte and the UEFReader Java Sound plugin convert a UEF file to a wave suitable for recording on tape or playing back to a physical computer. * UberCassette are cross-platform, multi-format encoders emitting UEF from samples of Acorn cassettes. * The UEFwalk
Perl Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was offici ...
script validates and extracts data from UEF files. * The XVUEF patch extends the Xv image editor to support the little-used inlay scan chunks of the UEF.


Use on real BBC Micros

The GoMMC and GoSDC hardware extensions, produced by John Kortink from 2004, provide a virtual cassette playing capability. The accompanying PC tools import the cassette data from UEF files and store the extracted cassette stream on a memory card. In February 2012, Martin Barr released version 5.0 of UPURS, a ROM based suite of utilities to aid data transfer to real BBC Microcomputers. As part of that release, the tool UPCFS saw its first release which enabled a claimed 86% compatibility rate with existing decompressed UEF filesRetro Kit
"Introducing UPCFS"
''UPCFS launched'', 19 February 2012. Retrieved 19 February 2012.
allowing them to be transferred to a real BBC Micro using a custom User Port cable that presents an RS-232 capable connection to a PC.


References

{{reflist


External links



Computer file formats