Ym2Mym
Description
The Oric computers are equiped with a AY-3-8912 sound chip.
This component can be found in multiple variants in many other systems such as the MSX, Amstrad CPC, Atari ST, some of the Sinclair Spectrum machines, among other.
It is an unfortunate fact that only very few Oric games had music back in the 80ies, but this can be fortunately fixed today thanks to the huge catalog of available musics on the other machines!
YM Files
The YM file format was originally designed by Arnaud Carré as a way to record Atari ST musics to make them replayable on a PC.
Technically a YM file is simply a register dump of the music: A program captured 50 times per second the content of the values sent to the YM chip.
With 14 registers to record, 50 times per second, it means that one second of music takes 700 bytes, so roughly 42kbytes per minute of music.
The chosen solution was to store the data sorted by register number, and then compress the whole file with the LHA compressor, which typically reduces the music files to less than 10kb even for very long musics.
Unfortunatelly this means that the music file must be entirelly decompressed before it can be used, which makes it unusable on 8bit machines. That's where the MYM format comes in.
MYM Files
The MYM files are basically YM files that have been uncompressed and recompressed in a way that allows for partial decompression over time. The efficiency is not as good, but at least it works.
Ym2MYm can be used to perform this conversion. It will work only on YM files that do not use special timer effects such as digidrums or sid.
Utilisation
To transform a binary file as a texte file:
%OSDK%\bin\Ym2Mym [switches] source.ym destination.mym [load adress] [header name]
Switches
- -tn Tuning
The Atari ST soundchip has a 2mhz frequency, while most 8bit machines (including the Oric) have a 1mhz soundchip.
This means that in order to replay correctly an Atari ST music on the Oric we have to double the value of the frequency registers else the music will play too low which will result in ugly waveforms and low notes.
- -t0 => No retune
- -t1 => Double frequency [default]
- -vn Verbosity
Enables or disable the printing of informative messages.
- -v0 => Silent [default]
- -v1 => Shows information about what Ym2Mym is doing
- -hn Header
Adds a tape compatible header
- -h0 => No tape header [default]
- -h1 => Use tape header (requires a start address and a name)
- -mn Max size
The MYM replay routine generally is provided with a limited size for the music. Using this switch you can force Ym2Mym to refuse to convert a music and output an error message if the final compressed file gets larger than the specified number.
- -m0 => No size limit [default]
- -m1234 => Outputs an error if the exported size is too large
History
Version 1.5
- The verbose mode (-v1) now display the embedded informations such as author name, song name, and extra comments
- Interleave register format is now also supported
Version 1.4
- Fixed a stupid bug of signed data added in version 1.2
Version 1.3 (Broken!)
- Added a -m flag to check if the exported file fits a maximum size
Version 1.2 (Broken!)
- Added a -v flag to enable/disable verbosity
- Added a -h flag to add a tape compatible header
Version 1.1
- The tool is now able to extract LHA compressed YM files directly, should make the process much easier :)
Version 1.0
- Added support for retuning (Atari ST songs are at 2mhz, Amstrad ones at 1mhz)
- Added rude support for YM6 format (also skips most of the header)
Version 0.2
- Added a rude YM5 loader. Skips most of the header.
Version 0.1
- First version by Marq/Lieves!Tuore & Fit (marq@iki.fi)