Archive for December, 2025

These weeks in na_game_tool

Sunday, December 14th, 2025

Last time I talked about MVI formats, mentioning that I had one more equally German MVI format. Well, the official specification uses CauseWay DOS extender which compresses executables (and I still haven’t found a way to make DosBox debugger dump loaded 32-bit segments, otherwise I would’ve REd a bunch of Psygnosis formats too). Luckily the demo version did not use it and I was able to find how it is coded. Apparently they employed some non-standard LZW which for some reason shuffled low codes, so 0/1/2 are used as special signals—dictionary bump (followed by byte aligning for some reason; other implementations bump dictionary size implicitly and do not insert bits), dictionary reset and EOF correspondingly—while codes 3..257 are used to code bytes. Beside that it’s nothing special: intra frames are (optionally) LZW-compressed, inter frames consist of pixels and mask telling where on frame to update those pixels (both parts with optional LZW compression).

Speaking of LZW, there was this FLK format (apparently Italian) that also employed LZW to compress pixel data along with the command stream with rather simple commands like “repeat pixel N times, skip next M pixels, copy following P pixels” and additionally “restore Q pixels of the background”. As you can guess, the format is used for animations overlaid on something else in addition to video clips. In case of the latter command stream may be absent and you simply put decompressed pixels into a new frame.

Other codecs are Ascon SKS (which is essentially a collection of JPEGs with swapped chroma planes; I did it mostly as a test of JPEG decoder module that I plan to use in other decoders) and Interactive Pictures VID (which I encountered in .evd, .fvd and .gvd files—for files with English version of the video, French version, and general version without speech). This one is curious not only because its binary specification for some reason contains compression for it (which I encountered first) but for the format features itself. Images are split into 8×8 blocks that may be coded raw, with 2-16 colours and a pattern, and a custom-scan RLE I remember seeing in Bink (and XCF but like Bink there are 16 patterns here as well and not just four). Probably nobody cares about it but it was fun to discover.

In addition to that I’ve implemented support for a couple of well-known formats, namely HNM5 (aka UBB2—UBB is apparently the same but lacks headers) and RoQ. The former is a typical French format (you can tell it by the fact it uses crazy motion compensation modes with mirroring and transposing), I implemented it mostly for completeness sake (so I have support for all HNM flavours in my tool, all is left is HNM6). The latter has the same rationale as when I looked at it four years ago: its support in libavformat/libavcodec sucks i.e. it’s adequate for videos intended for id Tech 4 engine but not for the original Trilobyte games (not handling JPEG-compressed frames and not descending into 0x1030 chunk are two most glaring deficiencies). Plus there is a can of worms related to the fact that audio in Trilobyte games uses unsigned predictor while id Tech games use signed predictor and to the fact that for some files you need to scale motion vector twice (and for some files it should be done on a picture scaled twice vertically). I try my best to detect such situations but they do not offer work correctly (and if you wonder, in games engine may have a hard-coded list of files that should be treated differently).

And that is actually not all! I’m still working on supporting some game archives as well (for example, the majority of RoQ files I encountered were hidden in .gjd archives, same as VDX files). One interesting example is Escal compressor. One funny aspect of it is that it is employed in Pumuckl Klabauterjagd, a game for about 8-year olds, while the rest of titles using it are definitely 18+. From technical point it’s interesting as it seems to be inspired by the dynamic variant of deflate with some simplifications: instead of blocks you have codebook definition valid only for the next specified amount of symbols (which are still combined literals and copy symbols, with their codebook coded using code lengths packed with another codebook). Overall it’s distinct enough but the source of inspiration is obvious too.

Overall it means I have only four more original decoders to create plus some of the archive formats to support (like Coktel Vision STK/STK2 as well as the previously mentioned extractor/converter for Monty Python & the Quest for Holy Grail). Probably it will be the last release too as I’m not sure I’ll have enough game formats for another release. Well, there’s also na_eofdec which should get more Amiga formats before 0.1.0 release. And in theory there are console formats if Paul has not written decoders for them all

Being right for wrong reasons

Saturday, December 6th, 2025

I consider 2020 to be the cut-off point after which it was time for various idiots to shine and make impact on the world. And they’ve been doing an outstanding work since. Among their achievements is something I didn’t expect to see and yet here it is: being right (for completely wrong reasons).

Normally you see the opposite: somebody takes a sane idea and uses it as a pretext for some bad proposals (let’s not even touch all those proposals with the justification of “but think of the children!”, the famous Chinese Four Pests campaign should serve as a good example too—you start with a sane idea of increasing harvests by eliminating pests that hurt crops, you decide to eradicate all species seen near fields and you end up discovering a truth known to any biologist, that birds are much better at hunting insects than people and killing them was a bad idea). Occasionally you see the proverbial broken clock being right (if you generate inane ideas sooner or later one of them might be sane for a change). But recently I’ve started to notice a significant amount of ideas that are actually right but for all the wrong reasons. Most of them are political ones but you can spot some in other areas (like medicine—it is hard to explain why wearing masks was proposed during COVID-19 pandemic when they didn’t believe in the virus spreading by air).

Before moving to the powerhouse of right ideas for wrong reasons, I’d like to mention Hungarian prime minister who claims that Ukraine won’t be allowed to the EU until it conquers corruption. Of course he’s right except for one detail: it is Hungarian corruption that blocks Ukrainian membership and it’s EU that should do something about it (and yet does nothing—so it’s up to Ukraine to fight against at least one of major “patrons” of Hungarian government).

And of course the majority of right ideas for wrong reasons come from the USA. For starters, USian president had a proposal to Europe to stop buying russian gas and oil. There’s nothing wrong with that idea except when you look at the motives, and they’re not about undermining the aggressor’s main income but rather for making Europe dependent on USian fossil fuel (but still dependent on single supplier). A similar proposal for Europe to be more self-reliant in the defence sector instead of relying on USA is equally good unless you see the implied part, namely that Europe can’t trust USA to honour its obligations and that “self-reliance” means buying USian equipment to replace what currently garrisoned forces use and probably paying for the e.g. USian military intelligence services. I’m starting to see a pattern here…

For more IT-related stuff, banning TikTok is an excellent idea. I have not used it myself but from what I heard about it from different sources it’s essentially a digital drug with controlled narratives (and with a vehemently denied role of CPC in that process). Both addictiveness and propaganda are good reasons to ban it and similar creations outright. And yet we see that the main reason is not that it is bad but rather because it is not controlled by US government or corporations (is there still a difference?), so if the USian segment is sold to a USian company it’s all fine.

The last one would be the warrant put by the International Criminal Court on Netanyahu. Regardless of what you think about his recent actions against Gaza, it is his politics that created this situation and endangered lives of the people he is supposed to protect (the same applies to Iran with its mostly peaceful nuclear programme that previously was stopped by Israeli military forces at much earlier stages than “couple of weeks before a bomb”). Throw in his behaviour of a typical dictator (nominally just a prime minister but considering their recent judicial reform and similar things any other dictator in the club does), he really deserves an international warrant (especially since local courts are not likely to do anything about him). But the way ICC handled it feels more like they were politically (or even religiously) motivated instead of trying to bring justice. Sadly this is a likely story with all those international organisations—they tend to outlive their usefulness and become an empty formality often driven by petty interests of the only members who care enough to do anything.

As usual, I can’t do anything about it so I simply point out what’s wrong with this world and move on. The solution exists though: just make people remember old deeds and claims, think, and call others on their bullshit—this will make things much better in just one generation. Implementation details are left to the reader as an exercise.

(Semi) interactive movies — less explored multimedia niche

Tuesday, December 2nd, 2025

Here’s something worth reminding of, something I’m not going to tackle myself and it’s not likely somebody else will pick up. I’m talking about an intermediate form between static videos and interactive games, which I called (semi) interactive movies.

The best-known representative of those is Flash. Some of you old enough may remember it as a source of annoyance in form of extremely animated ad banners, some of you not so old may remember Flash games, younger people may remember it as an annoying web player that every video hosting required until they all got rid of it (reportedly by a whim of one man). But there was a time when Flash was used for its original purpose: creating animations (often bundled with a stand-alone player) or slightly interactive animations (like a blender with several buttons you can press and depending on it a different animation will play; it was gory and disgusting, it’s better to watch something nice and cute like Happy Tree Friends instead).

Of course Flash is reasonably well supported by open-source software to the point you can even run it in the browser without installing a plug-in. But there were more and not all from the same company.

Macintosh had MacroMind Director which allowed to create interactive applications a la HyperCard. Later it was ported to Windows as well and was used to create more or less portable games or activity centres and such. Eventually it was bought up with its sibling projects and compressed into shitbrickmud-brick, but meanwhile it managed to spawn several variations. There were “Gaffed Director movies” (usually bundled with stand-alone player), there were RIFF Multimedia Movies (in .mmm files), I’m pretty sure there more flavours of it too. Rather recently ScummVM started to support some games made with Director (which is not that easy task considering different engine revisions and that it often relied on platform-specific plug-ins for extended functions like playing videos or CD audio—up to decrypting data). So if you want to have support for the formats I mentioned the best course would be probably to write a new player based on their code-base (because it’s probably the best foundation to start from and ScummVM is for playing games, not this kind of content).

Another similar system I’m aware of is Brilliant Digital Entertainment’s Multipath Movies. I haven’t played any of them but from the description it sounds a lot like those DVD menu-based games. The engine seems to be under one megabyte and its data is self-contained (one large .bhf for the content plus auxiliary .map and .nav files—a striking difference from Director with its .cxt and .dxr files referencing each other and all other external resources).

There are so many old neglected formats that deserve to be preserved for the posterity, here I hope to remind people at least of some.

P.S. Why wouldn’t I implement it? Exactly because it’s not the kind of multimedia I work with. Mostly I write a decoder and I can do whatever I want with the decoded output. Here one has more to mind inner engine workings: interpreting engine script, synchronising output composed mostly of sprites, mind potential user input and such. And hardly any work on figuring how how video is compressed. So if you want to be the next open-source software hero—well, here’s a good challenge for you.