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. Nota ...
for the compressed storage of
audio tape Audiotape is magnetic tape used for storing audio. Information stored can be in the form of either an analog or digital signal. Audiotape can be used in various tape recorders including machines for reel-to-reel audio tape recording on open reels ...
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 * ...
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 by Hermann Hauser, Christopher Curry (businessman), Chris Curry and Andy Hopper. The company produced a number of computers during the 1980s with asso ...
. 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 organ ...
of original media rather than merely a capability to reproduce files stored on them. A selection of
metadata Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including: * 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 (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 "wikt:back ...
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 developed and marketed by Sinclair Research. One of the most influential computers ever made and one of the all-time bestselling British computers, over five million units were sold. ...
series.


History

Before the development of the UEF, archives of Acorn computer software on the
World Wide Web The World Wide Web (WWW or simply the Web) is an information system that enables Content (media), content sharing over the Internet through user-friendly ways meant to appeal to users beyond Information technology, IT specialists and hobbyis ...
had adopted a convention of hosting ZIP 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 b ...
, 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 telecommunications 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 modulat ...
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 whi ...
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 ** ''Magick'' (with ''-ck'') can specifically refer to ceremonial magic * Magic (illusion), also known as sta ...
string UEF File!, a terminating
null character The null character is a control character with the value zero. Many character sets include a code point for a null character including Unicode (Universal Coded Character Set), ASCII (ISO/IEC 646), Baudot, ITA2 codes, the C0 control code, and EB ...
, 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 ...
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 any dynamic far from synchronization. If and as parts of an asynchronous system become more synchronized, those parts or even the whole system can be said to be in sync. Asynchrony or asynchronous may refer to: Electronics and com ...
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 mathematica ...
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 a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
and a byte identifying the file system. 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 directed by Alexander Payne and written by Jim Taylor and Payne. A film adaptation of Rex Pickett's 2004 novel, ''Sideways'' follows two men in their forties, Miles Raymond ( Paul Giamatti), a de ...
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 * ...
. 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 ar ...
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-o ...
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 or ) is an audio file format standard for storing an audio bitstream on personal computers. The format was developed and published for the first time in 1991 ...
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 train is a sequence of discrete pulses occurring in a signal over time. Typically, these pulses are of similar shape and are evenly spaced in time, forming a periodic or near-periodic sequence. Pulse trains outputs are widely used in tach ...
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 high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Perl was developed ...
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