Benchmarking z80 compression schemes
I've been doing a lot of VideoBeast development recently, which involves much writing of large graphical assets directly into video memory using SLIDE in VideoBeast mode. This is great DX, but it can be quite slow. I have a 256KB background bitmap (all the same colour) that takes nearly two minutes to transfer on its own. Every time I watch it load I think "....really should add compression to SLIDE...".
But which compressor? Which has the most efficient compression scheme? Which has the smallest and most efficient z80 decompression routine? Which copes best with the relatively slow serial port speed, and which ones can handle memory banking?
This kind of donkey work is ideal for Claude. I collected a bunch of test files from my recent transfer history, and set Claude up with the pre-release 4.7 of the BMAD framework. It's pretty different from the stable 4.6 that I'm used to, so this was a useful test of the new capabilities.
For this work I'm using the bmad-deep-recon skill. I've left all the BMAD files in situ in case anyone wants to follow along: skills are in .agents/skills, BMAD framework is in bmad, planning documentation and interim reports are in bmad_output.
I asked it to simulate the serial line, and to build banked and unbanked variants, then to present its findings in the README.md listing the pros and cons of each scheme and making final recommendations.
The repo is here:
TL;DR: which is the best scheme?
Overall, salvador wins, using the dzx0_mega decoder. It's the largest decoder in terms of byte size, but it's the most robust. Salvador's bundled decompression routines were a bit crashy. Salvador was top tier if not the leader for compression on every candidate file, and its compressor code is fast and easy to read, which is good because I'll need to rewrite it in rust.
So salvador/dzx0_mega are the final picks for SLIDE, watch this space for updates...

Comments