Hi!

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 two batch files, which convert
*.ym files to *.bin files.
These *.bin files are 'playable' vectrex binaries (no graphic, just sound).

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 batch ('C_best.bat file.ym') does also convert files, but 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!

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.
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
  dictionary)
- Shannon/Fanno bit coding (huffman is implemented to, but for some reason or
  another I use Shannon/Fanno)
- RLE

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

Enjoy...

Chris

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

