Vectrex: VecSound

Being allways fascinated by all stuff vectrex, some years ago, after getting some inspiration from other people (in this case namely: Ville Krumlinde and Ville Gustavsson) I wrote a software package that enabled “users” to play YM-files on the vectrex.

Here the original readme:


I tried to write a packer for YM files to be able to be
'runnable' on vectrex.

The idea to this came from two other people, namely:

        Ville Krumlinde and Ville Gustavsson

Thanks guys!

In this directory you find a couple batch files, which convert
*.ym files to *.bin files.
These *.bin files are 'playable' vectrex binaries (no graphic, just sound)
(well a title is displayed now).

For a quick pack use 'c_fast.bat file.ym'.
This converts an ym file to a binary quickly, it does however
produce fairly large files. They may even be to large for vectrex to
handle (> 32Kb).
The other batches also convert files, but (depending) much (much much much...
much...) slower (I think exponantially with the size...), but most of the
time considerably smaller.

Some example *.ym files are in the YM subdirectory... try them!
Samples in ym files are not supported, neither are loops or other
not simple things like drums... and and and

My packer does not come near the original ym-file size (the lharced once).
Perhaps another programmer wants to try to fiddle some more bytes out
of the files. But consider this: you must unpack them on a vectrex
with not much RAM.

Programmers point of view - vectrex side:
The unpack routines generally use about 2000-3000 cycles per 'round'
but there are peaks that reach about 5000-6000 (though 'seldom').
The unpacking is 'streamed' the routine uses constantly 161 bytes RAM.
The unpacker is a 'bit' optimimized, though there could probably
be done much more. The routine itself uses about 600 bytes.

The packer is a mixture of three schemes:
- First a dictionay scheme (this is what takes the time... finding a good
- Shannon/Fanno bit coding (huffman is implemented to, but for some reason or
  another I use Shannon/Fanno)

Listening to DVE... Adlib sound emulation sounds for some
reason MUCH better for this kind of music!



The code is not all that cleaned up... pitty... but right now - I
couldn't be bothered...

Here you can download the latest version:

Leave a Reply

Your email address will not be published. Required fields are marked *