CPCWiki forum

General Category => Programming => Topic started by: m_dr_m on 00:24, 28 April 24

Title: What IFF? (De)Serialization on CPC?
Post by: m_dr_m on 00:24, 28 April 24
tl:dr; Do you know a (de)serialization library for Z80?

@Zik 's DMA Soundtracker's modules rely in an IFF-like system with size encoded on one or two bytes (?) rather than 4.
I believe it kind of defeats the purpose of using IFF, because no existing IFF tool will be able to parse those files.

On the other hand, yes, four bytes is frequently too much, on some rare cases too little, and was overall a questionable choice to have an hardware-inspired limitation for a serialization format.
The size only seems useful in order to skip unknown chunks. For mandatory chunks, that's an unnecessary pain in ass(embler), and I think it would be better to have them optional (e.g. 0 = unspecified length).

What I miss most in IFF is the ability to serialize basic types, like array of words (without having to repeat the type for each item), and be able to reference an arbitrary data (or at least chunk) in the whole structure.

IFF or not, I'm looking for existing Z80 code to (de)serialize containers and nested structures. I'm too slow and distracted to program that myself! Plus I needed to rant.
Powered by SMFPacks Menu Editor Mod