pouët.net

Mackarel - make-a-rel tool for zx speccy

category: code [glöplog]
 
In my ongoing zx spectrum adventures I ended up making a simple tool to create "releases". Basically you take your compile output (ihx preferred, but binary will do), feed it to Mackarel, and it spits out a .tap file.

But that's not all!

First, the code image is compressed (a couple compression codecs are supported) before storing, and gets decompressed after loading.

Second, there's support for loading screens, and these are also compressed; and, if you don't give a loading screen, one is generated for you.

There's also a bunch of options for a little more exotic needs.

http://iki.fi/sol/zip/mackarel20.zip - latest windows binary
https://github.com/jarikomppa/speccy/tree/master/mackarel - sources
http://sol.gfxile.net/#SPECCYVOL5:MAKINGRELEASES - blog post with pretty graphs

And here's a fish.

BB Image
added on the 2016-01-11 12:06:53 by sol_hsa sol_hsa
pardon my ignorance - what is .ihx?
added on the 2016-01-11 13:21:38 by g0blinish g0blinish
Intel hex, some small device compilers puke that. Basically memory map in an ascii format. Mackarel prefers it because it can read the start address directly, without developer having to edit makefiles or whatnot, which you'd have to do with raw binaries.
added on the 2016-01-11 13:53:43 by sol_hsa sol_hsa
about compression: have you tested compress ratio with zx7 ?
added on the 2016-01-11 14:20:22 by g0blinish g0blinish
It uses zx7.
added on the 2016-01-11 14:41:55 by sol_hsa sol_hsa
Why not lz4, or is that too intensive for Spectrum?
added on the 2016-01-12 01:28:20 by mudlord mudlord
sol: thank you for the fish!
added on the 2016-01-12 04:15:54 by psenough psenough
There are z80 decompressors for lz4, but the thing is, lz4 is made for speed, zx7 for better compression, and speed isn't a factor here (after loading from tape for 60+ bloody seconds you can wait for half a second for the decompression).
added on the 2016-01-12 06:58:24 by sol_hsa sol_hsa
Oh and here's a link to the announce thread where I'm posting whenever I make a new version:

http://www.worldofspectrum.org/forums/discussion/51864/mackarel-one-exe-to-turn-ihx-scr-to-a-tap#latest
added on the 2016-01-12 07:00:20 by sol_hsa sol_hsa
Quote:
There are z80 decompressors for lz4, but the thing is, lz4 is made for speed, zx7 for better compression, and speed isn't a factor here (after loading from tape for 60+ bloody seconds you can wait for half a second for the decompression).


where to find lz4 packer+source decompressor? I have only 6502.
added on the 2016-01-12 07:09:08 by g0blinish g0blinish
Quote:
where to find lz4 packer+source decompressor? I have only 6502.


Well.. https://www.google.fi/search?q=lz4+z80 showed me the way to a couple implementations of z80 decompressors.
added on the 2016-01-12 07:33:06 by sol_hsa sol_hsa
For cutting on long loading times from tape, have you considered using OTLA?

And yes, thanks for all the fish!
added on the 2016-01-12 09:52:31 by elfh elfh
Quote:
Intel hex, some small device compilers puke that. Basically memory map in an ascii format.


The generally accepted extension for those files are just .hex, though (at least in the embedded world).
I've tried OTLA, didn't get it to work for some reason.. could consider replicating the idea though (custom loader + custom wave generation). My point was to primarily simplify my build process, though.

I've seen ihx files in a couple different circumstances (embedded and small device). Whatever the extension, the result is the same =)
added on the 2016-01-12 13:04:43 by sol_hsa sol_hsa

login