Author Archive

Looking at some more exotic animation formats

Thursday, December 19th, 2024

I keep looking for old games with interesting animation formats and I’ve found another two, from Israeli companies this time.

First is the format used in Armed & Delirious. Since all of the files are in the custom archive (except for a single file with “please change CD” animation) I’m not going to support it, though I still documented it for posterity. Apparently it has two operating modes: updating some lines where each line can have its own coding mode (all are RLE variations) and updating tiles, now with each tile having its own coding mode. The only interesting thing is that tile coding operates on a sub-set of colours so it can use 3-6 bits for index. I remember some formats resorting to 16 colours and 4-bit indices but there are more variations here.

And then there’s VID format used in Soul Hunt and, apparently, some other games by the same company. It features DPCM-compressed audio and depending on version RLE- or JPEG-compressed images (and both versions are present in the game). That’s right, they use code (probably borrowed from libjpeg but I’m not sure about that) to decode data in JPEG-like format (8×8 blocks, IDCT and such) and then use some large lookup table to convert it from YUV to paletted RGB. Of course there are video codecs with such built-in functionality like Cinepak or Indeo 3 but it’s still surprising to see such thing in a random codec.

Update from December 21st: I’ve looked at JPEG-inspired coding again and I have a better understanding what it does (so maybe I’ll even be able to support it eventually):

  • there’s intra- and inter-coding, the former operates on 256×16 megablocks (consisting of 32×2 Y blocks and 16 U and V blocks each), the latter has a macroblock update mask and codes only updated macroblocks;
  • there are two quantisation matrices sets used in intra and inter mode, the binary specifications calls them “good” and “bad” factors;
  • the colour conversion code and IDCT seem to come from libjpeg while coefficient coding is their own invention;
  • coefficient coding seems to employ a rather simple set of codes: xxx0 is used for -4..4 values (codes are LSB first), xxxxxx01 is used for larger values, xxxxxx11 is used to code zero runs and xxxxxxxx 11111111 is used to code large values;
  • DC prediction is present and works the following way: decode block, dequantise it, add last DC value (and update it afterwards), scale block DC value by 32.

Initially I was discouraged by the coefficient decoding routines being implemented as state machines with computed label, so Ghidra cannot decompile it properly. I.e. it starts with “refill bit buffer” state, then moves to “decode new coefficient having 32 bits”, then it handles one of four cases listed above and moves to “decode new coefficient having 28 bits”, or “decode new coefficient having 24 bits”, or “decode new coefficient having 16 bits” state—unless it decoded the full block and saves that state to keep working from it the next time the function is called. Oh well, at least it turned out to be not that much complicated in the end.

Some words about Alien Isolation CDA2

Wednesday, December 11th, 2024

Some of you might’ve heard about a Finnish adventure game called Alien Incident. Apparently it had a CD release with intro and final cutscenes re-done as an animation format. Of course that’s enough to draw my attention.

It turned out that it has several features making it one of the most advanced game formats: multiple soft subtitles and checksums for each frame. The file header is followed by the text block with subtitles in several languages that are rendered by the player over the video (and the font itself is RLE-compressed). Then there’s a table of 32-bit checksums for each frame, and only after that there’s frame size table followed by actual frame data.

Video is coded in 32×40 tiles with one of several coding modes: read full tile, update marked pixels in the tile, update 2×2 blocks in the tile, or update 4×4 blocks in the tile. That data is further compressed with slightly modified LZSS. Additionally frames carry audio data and some additional commands such as fading or setting frame duration. By default player operates on 70 or 75Hz clock and each frame is displayed for several ticks (usually 5-8). So a special command in the frame data tells player to display each frame for N ticks until further notice.

And now it is time for a rant. There is an issue uncovered by decoding these files. Both files are long (finale is over 11 minutes at 18.75 fps) and have lots of palette changes (because of both scene changes and fading)—and those two things helped uncover a problem with FFmpeg. Its AVI demuxer is the problem: it scans index, finds palette change chunks (which I explicitly mark with AVIIF_NO_TIME flag), adds them to the video stream statistics (despite the flag), concludes that video stream has significantly more frames than audio stream and switches to non-interleaved mode; in that mode it disregards actual index contents and treats palette change chunks as video data. Personally I don’t care because I have my own set of tools for decoding, transcoding or playing videos that does not have this problem, but considering that virtually every other piece of software uses libavformat for handling input data, that may pose a problem for everybody else (I can afford to not care but somebody else would have to change perfectly valid output just to work around third-party bug). This is a fun case demonstrating that monopoly is evil, even if it’s a monopoly of open-source software.

P.S. Probably it’s a good occasion to remind that librempeg exists and probably both it and you can benefit from your attention to it.

Some more game formats

Sunday, December 8th, 2024

In my recent post about na_game_tool 0.2.5 release I complained that I still miss formats starting with letters B, O, W, Y and Z. Well, after an extensive search I’ve managed to find two formats to cover some missing letters.

First is the animation format used in some DOS version of the game Baldies (it’s an RTS game released on consoles as well as on Windows and DOS—and there was even an early Amiga demo apparently). CD with DOS/Windows version employs ordinary FLIC, (floppy?) DOS version and demos used its own animation format instead. It’s rather ordinary RLE anyway in a BAL(d) file as the rest of game resources.

The second game, Los Justicieros (or Zorton Brothers, which is a much better title for my purposes) is much more interesting game. It has a format with various compression methods as well as audio chunks and palette manipulation commands (like fade to black or fade to a new palette). And the compression methods are a mix of RLE and tile-based VQ (in both senses). One method decodes picture as RLE, another one uses RLE on updates to the previous frame, third method either codes whole frame in 4×2 two-colour tiles or codes an update mask first and draws only updated tiles. The fourth method uses RLE on updates as one of the previously described methods, but instead of pixels it codes two-colour 4×4 tiles. Another fun thing is that there are (at least in the version I was able to locate) five files in this format: four of those code one still image and the fifth one codes over half an hour of all video scenes.

In either case it was a very curious format—exactly the reason why I like to examine those old games.

Some words about AVSS format

Thursday, December 5th, 2024

Back in the day I had a cursory glance at AVS. Out of curiosity I decided to add AVSS format support to NihAV. Despite it looking like an obscure format nobody has ever heard of, it’s well-documented. Under the name of Intel DVI (you know, Digital Video Interactive—mostly remembered for DVI ADPCM under the name IMA ADPCM).

Anyway, I’ve managed to locate just one sample containing single RTV2.1 stream so I was curious how it fares.

Well, it turned out to be the standard Indeo 2 format but for some reason actual image being down-sampled compared to what the headers claim (160×100 instead of 320×200). Nothing much to say but it was still curious to see that system from the past.

na_game_tool 0.2.5 released

Saturday, November 30th, 2024

I know that I released version 0.2.0 merely two months ago while saying it’d probably take me a year for a next release. Well, that’s still true but I wanted to make public some quality-of-life improvements as well as move some formats from NihAV (mostly Actimagine VX) so those who care have a simple way of decoding them. That is why it is a micro release.

The main reasons for release are improved AVI writer and VX decoder. The problem with my AVI writer is that it writes raw video and audio and those tend to become large—so I introduced OpenDML support in 0.2.0. But as I didn’t thought it through, I simply enabled it for videos with large frames. Now it works automatically if the file gets large enough so you should not hit size limit unless the total file size will approach 4GB.

But even if it’s a micro release I could not release it with just those two things so it introduces support for two formats reverse engineered by me recently, two formats reverse engineered by me long time ago (both are called Paco), two formats also imported from NihAV and two formats implemented after the description or code produced by others.

As always, grab it from the dedicated page if you really care.

P.S. I’ll probably keep doing what I’ve been doing so far (polishing my code, reverse engineering random formats, moving some more format from NihAV to na_game_tool—in other words, nothing to show). Meanwhile there’s still more new and exciting stuff at Librempeg.

P.P.S. Two formats were added for a rather non-technical reason: I want to have in my tool decoding support for formats for each letter of the alphabet. So far letters B, O, W, Y and Z are missing. That is why I intend to import Beam Software formats support from NihAV, maybe implement Psygnosis YOP and some Westwood format if I can’t find anything to RE instead (and I lost my chance to name PMV and RLF after Zork games). In either case 0.3.0 will still probably take half a year to a year to get enough supported formats.

Technical: NihAV repository snapshots are available over HTTPS

Monday, November 18th, 2024

Some people complained that they can’t clone NihAV code. I suspect the problem comes from the hosting provider blocking connections thanks to excessive mirroring requests and I can’t do much about it. But for the curious ones I’ve put git bundles on https://nihav.org/ which can be used as a source of cloning.

Considering the glacial pace of the project development I don’t see a reason to update them often so there’s no point in constantly checking if there’s a new version available on the server. But if you’re curious about the things my software does not support or fails to do—you’re welcome to check it out.

Looking at AOL ART format

Friday, November 15th, 2024

Since I have nothing better to do (beside some slight NihAV refactoring) and somebody told me about it, I decided to look at the format. Apparently back in the day The Multimedia Mike also attempted to research some information about it but I don’t think anything substantial came out from it.

Anyway, here’s what I everybody knows about it: as apparent from the name, it was developed by Johnson-Grace company, it combines a lot of different image compression methods and format—so apparently you can have slide show with an accompanying MIDI or speech, and it splits image into tiles and tries to compress them using whatever method fits best.

So, here are some additional details.

Audio codec is a rather common speech codec (LPC plus quality improvement post-filters) with one peculiarity: internally it decodes 16-bit samples yet outputs 8-bit PCM.

Slide show—I had just a cursory glance but it seems to mix various kinds of content with the slide show commands (like displaying next image) in the single file. Of course it’s last in my priorities list.

Image formats—now that’s where the real fun is. It handles about twenty different chunk types (even if most of them are useless and provide some image information at best) and recognizes (and skips) about the same amount too. I’m still struggling with the code but there seem to be three types of compression: LZ77-based lossless compression, lossy compression with the same coding for coefficients that probably uses wavelet coding, and another lossy compression (for palette-based images?). So far the only things I’m sure about is that it employs LZ77-based compression that reminds me of deflate with dynamic codebooks (but differs from it or DCL) and it seem to code signed coefficients while at it; the other thing is there are way too many functions for converting palette formats (usually between 24- and 32-bit RGB but quite often it’s between 32-bit RGB and 32-bit RGB in the same format but as an integer or an array of bytes).

In either case I’m in no hurry and can keep digging into it at my leisure.

So long, USA, it was a disappointment knowing you

Wednesday, November 6th, 2024

I’m going to publish this after the elections are over so no idiot can call me interfering in the elections, even if I don’t argue in favour of either candidate or political system reform. This post is simply summing up the frustrations about the mismatch of how the country views and positions itself against what it really is.

First of all, the title is about USA slipping out of relevance and not e.g. about me emigrating from the country (I’ve never been to it and it’s highly unlikely I’ll ever go there) nor about USA stopping to exist in the near future. My point of view is that while USA has done to undermine its own position, it has built enough inertia to keep going for a while—like large baobabs that can’t physically fall down and simply rot away standing.

The upcoming downfall does not make me happy as I realise how bad it will be for the whole civilised world (remember 2008? ever heard of Black Tuesday?). So consider it as an extremely late (a decade or two late) and useless warning. In theory some things still can be done to rectify the situation but does anybody believe anything substantial will be done?

Below I’ll try to present my thoughts in a logical form: what made USA great in the first place, what it did wrong in last decades (and why it hurts USA), and how it will likely to end.

What made USA a global superpower?

Let’s start with the foundation on which USian power was built. Without defining it it’s impossible to argue what actions undermine that foundation.

My short list would look like this:

  • having one of the largest pieces of land stolen from others (rivalled only by China and russia); and if you wonder why I haven’t included Canada to the list—with those countries land was not merely something seized from uncivilised tribes (which may be unthinkable now but was though more as a God-given right back then) but from other countries as well (ever heard of internationally recognised Hawaiian Kingdom and how it ended being a state of USA? do you want to visit United States (of Mexico) and tell them how Texas and California have always been a part of USA?);
  • that land being suitable for agriculture and being rich in natural resources (russia has been always complaining about the quality of its lands—even after large oil reserves were discovered; from what I heard China also complains about its territory being mostly mountains);
  • people willing to work and the state not hindering them (you won’t believe how many russian proverbs are there about the futility of working; also back in the day russia and Austro-Hungary were two empires stifling technical progress in fear of losing power—you can guess how it helped them during World War I);
  • being isolated by oceans from most other countries and not experiencing a full-scale war at its own territory in XX century—sure, USA was involved in wars but it was mostly sending troops overseas instead of, say, Japanese troops occupying half of Oregon or German bombers levelling down Bridgeport, Philadelphia and Jacksonville. If you manage to have your civil population safe, industry and economics mostly intact and working, not needing money for post-war reconstruction—that definitely gives you an edge against the countries devastated by war;
  • even more, you can help other countries in time of need tying them to you economically;
  • as the result you can play Switzerland and organise things to go by your rules that will benefit all the players involved (like free trade, technological co-operation, unified defence and so on);
  • and finally, you can build large and good equipped military force that helps keeping the rules.

And thus, by the end of XX century USA had:

  • a powerful economy;
  • the standard currency for international trade (surviving even de-pegging from the gold standard in 1971);
  • well-developed industry and financial sector;
  • being a leader in scientific research and hi-tech developments;
  • leading the most powerful military alliance, with its main antagonist temporarily withdrawing from the playing-field.

In theory every thing on that list should only ensure that other things keep getting better, so what went wrong?

Losing advantages

In one word—idiocy. In more words—greed, short-sightedness and idiocy. Almost every advantage USA had was lost either via uncontrollable greed, decisions that prioritised short-term gains over long-term consequences, and refusal to see something that does not fit your comfortable image of the world. Let’s see how each and every strong point got undermined.

A powerful economy. I’d point at 2008 financial crisis as the best demonstration of what went wrong. The financial market became so strong and successful that it managed to shatter the bonds of reality and as the result it could build something imaginary—a derivative paper on derivative paper that tries to hide a risk of suspicious credit (or mortgage of dubious value). And the total amount of CDSes issued was comparable to the whole world economy of the day (Wikipedia quotes the number of over $62 trillion of CDS amount by the end of 2007 and about $109 trillion for estimated size of world economy in 2024). You should be able to guess what reasons were at play here. I’d also add that dealing with it demonstrated short-sightedness as it seems nobody serious was punished (because they all are Too Big To Fail) which incentivises others to keeps such dangerous games—after all, you get your bonus now and the government will bail you out later if needed. And such hiccup in the economy lowered the trust in its robustness abroad.

The standard currency. While US dollar is still the main international trade currency, both the behaviour of US government and the way it imposed sanctions made other countries search a way to avoid relying on it too much. Terrorist states (like russia) do it to ensure they can function even under sanctions cutting off access to the international banking and payment processing, states supporting terrorism (like China) take preventive measures against possible sanctions, and even the EU wants to ensure it’ll manage to function no matter what ham-fisted decisions US government will make (in recent news there was a bit about EU startup backed by a lot of large European banks trying to provide an independent payment system).

Well-developed industry. (no reason to discuss financial sector again) Guess what is losing its reputation rather fast. For example, I still remember the days when Boeing was a company producing quality air planes, Intel making cutting-edge CPUs and Google search returning relevant results. Nowadays Boeing is known for its faulty planes, Intel for failing to keep with the progress and the overall state of Internet search has degraded. Why? I’d blame two main things: having duopoly (or monopoly) which makes you care less about the innovations (after all, what alternatives do your customers have?) and the usual prioritisation of showing current growth over long-term improvements (Intel is the most apparent case of not trying to invest money into semiconductor fabrication research and losing, in other cases it’s more like small cuts that result in a company not caring about the quality of its products). I’d argue this is also a consequence of companies becoming too large and divorced from reality (especially when managed by those with MBS degree instead of people who at least have an idea what the company should make and how). After all, investors mostly care about the current price of their stocks. And offloading production to China also lowers perception of USian goods being high-quality—after all, most of them are not made in the USA (and quite often, not even designed there either).

Scientific research and hi-tech developments. Those seem to have suffered in two ways: first, from the companies spending less on the research (because not all companies do production themselves anymore and thus don’t care about improving e.g. production processes—they can simply move to the lowest bidder in China instead); second, the unhealthy atmosphere in academia. I’m not going to claim knowledge what exactly is wrong with it, but from an outsider point of view there are two main problems: degree inflation (so that everybody and their dog tries to get a degree even if it’s mostly good for whining about a student debt later let alone the pressure succinctly put in formula “publish or perish” resulting in a large amount of low-quality papers) and abusing ethical and moral principles in the best Soviet traditions (I’m not going to discuss if there’s anything wrong with those principles, I would simply like to point out that there are people abusing those principles either to get rid of successful competition or merely secure a place for themselves so you can’t kick them out as it would be treated as an offence even if there’s no merit to keep them at that position in the first place). And in both those aspects you can’t compete with China which has larger population and thus can engage more students producing ideologically correct papers.

Leading the most powerful military alliance. The recent events demonstrated the lack of leadership there. In the first days of 24 February there was a joke that if russia would invade Poland, Poland would be kicked out from NATO. Now it seems more like Poland would be kept in NATO but it would be forbidden for it to retaliate—after all russian invasion would pose no threat to the alliance and retaliating means escalation of the conflict. The current war (essentially resulting from the Budapest Memorandum that USA pressured Ukraine to sign—with no guarantees in return) demonstrated that USA is unreliable partner. Even worse, recent events show that USA has OSCE-grade of blindness. I need to elaborate this a bit.

There was a joke in Ukrainian emigrant magazine of 1948—”USA will send $100 million relief funds to European countries, one half immediately, for the second half they’ll have to wait too.” This applies to the way USA provided its military help as well. And it not only delayed its own help, it sabotaged attempts of other countries by e.g. not giving a permission to train Ukrainian pilots on F-16 planes in other countries. And of course that help was so limited that it reminds me somebody taking an antibiotic to combat the disease in such half-hearted way that it mostly helps breeding antibiotic-resistant bacteria than actually curing a patient. If you don’t see a similarity—thanks to the weapons being limited in at least two senses (range and amount) russia has learned how to deal with them (same with economic sanctions). And as a cherry on top, you should remember USian officials asking Ukraine not to hit russian refineries—because they value oil prices as a more important thing than safety. And unless you’re a USian official you should know that at least one common feature among China, Iran, North Korea and russia is that they all regard USA as their number one enemy and would gladly hit it if the occasion presents itself. Another fun fact: while Ukraine managed to damage or destroy several russian strategic objects used in their nuclear defence without any retaliation (despite russian doctrine claiming that such actions would cause an immediate nuclear strike on the offender), USA is still afraid of that paper bear.

Speaking of which, you might’ve wondered what “OSCE-grade blindness” expression means. You can read more about the organisation in Wikipedia but suffice to say that after the russian invasion in Ukraine in 2014 it proved itself to be worse than useless—it completely ignored russian war crimes and, as Ukrainian soldiers wrote, after OSCE inspector visits they had to relocate the forces because russian shells would start hitting the place they visited. And now we have USA reacting to the reality of one terrorist state sending military help to the other terrorist state:

  1. Those are just the rumours.
  2. Okay, maybe not the rumours but still there’s no reason to do anything yet.
  3. We’ll consider our actions when it comes to the direct engagement.
  4. Ukraine has the right to defend itself against Koreans (why, thank you very much!).
  5. We’ll go as far as not forbidding Ukraine to use our weapons against them.

I believe this post was not far from the truth (translated for those who don’t understand Ukrainian):

Bloomberg writes that potential NATO answers to the DPRK actions are limited, yet they may include:

  • concern
  • deep concern
  • playing dumb
  • making a busy appearance
  • shaking head in disbelief
  • saying “tsk-tsk” with a sad expression
  • giving russians some Patriot systems to protect their oil refineries

And while various experts and “experts” say it’s a desperate step for russia, they forget to mention that desperate buyer pays any price—and Iran and DPRK both would gladly wrestle some technologies from it so they can nuke USA (or at least Israel) later. Of course USA sees no threat in that.

As the result, other NATO members (as well as other countries currently depending on USian help) see this inaction and finally prepare to be able to defend themselves even without USA. The claims of one candidate about leaving NATO (as well as hindering the trade with other countries) if he wins—which he may or may not follow—do not help with trusting USA either.

Overall, it seems like the advantages USA had were so successful that they went out of control and started to hurt themselves. To give an example, in ancient times stock prices were determined a lot by dividends they paid, nowadays dividends are treated as something archaic and it’s presumed that stock owners should get wealth from the increase of stock prices—which are determined by a metric “how much a lot of suckers would agree to pay” (and not some silly things as assets and profits). Similarly the companies are run by professional managers that care mostly about their bonuses—which usually means implementing short-term measures like sacking fifth of staff right before the financial report, so savings can be shown as profits, growth (and bonus for the successful manager). And if somebody is not like this—where to find enough people with a similar mindset to run a large corporation? Hubris and monopoly may make you think that it’ll last forever—but then the conditions change and your position is not so sure anymore (you might’ve heard about gas guzzlers and Detroit being the industrial heart of USA—before oil prices soared and USians started to buy Japanese cars instead).

There were many attempts to undermine Pax Americana but this time it seems USA is helping in doing that itself.

What’s next?

Nobody knows. IMO the most realistic scenario is that USA will wither while pretending that everything is nice and Enron-y—and it may work for them until the reality hits.

There are countries that attempted to concentrate on ideological issues instead of more practical ones, usually building communism (socialism, or Islam revolution). This ended badly for the population of those countries even if they must feel happy living in such moral place (or face consequences of wanting more bread instead of high moral ground).

There are two countries known for going into isolation and having extremely limited trade with the outside world—China and Japan. In case of Japan most countries politely avoided interacting with it until some rude USians came uninvited on their black warships and said “let’s trade!” In case of China it ended with a period they proudly call “century of humiliation”. You know, when the country that was proud to have most population and the most advanced industry (for some time) lost couple of wars to small groups of foreign barbarians, having to open trade, paying tribute and ceding territories. I guess that’s the future some want for USA.

If somebody thinks that voting for a right candidate will solve everything, I advise you to watch South Park episode about choosing a school mascot. I’d compare the current alternatives as Boeing and The-Company-Formerly-Known-as-Twitter: in one case you have a respectable outlook that hides degradation of the things—until the planes start to crash or self-disassemble in the air; in another case you have a company managed by a chaotic personality that manages to lose half of the users and advertisers while severing ties with the other half itself. IMO the main problem comes from most people being functionally idiots i.e. having a working brain but refusing to use it (thinking is hard after all—and there are too many helpful people around offering to think for you).

I don’t have much hope in other countries either—many things I’ve written above apply to the EU as well (but I’d argue it’s more about bureaucracy and having too many parties to come to unanimous decisions). Even China while being effectively a dictatorship (and thus lacking several of the problems) seems to experience problems (because dictators don’t always make good decisions and there’s nobody to stop them) and it is not clear if it will survive the downfall of USA (though it would welcome such event regardless).

Welcome to the shitty world, finding new ways to get worse since 2020. Enjoy it while there’s still something left to enjoy.

Another annoying game video format

Thursday, October 31st, 2024

Since I had nothing better to do and remembered about one mostly finished format, I decided to add its support to na_game_tool. The game in question is called either Cydonia: Mars – The First Manned Mission or Lightbringer (with two variations of sub-title).

The main problem is that there may be different audio and video formats inside but you cannot easily detect them. The header contains only the dimensions (which can be any as long at it’s 640×320 as the game uses hard-coded dimensions in the decoder), number of video frames (also rather pointless as it does not really affect anything) and audio present flag (the only useful information there).

First annoyance is audio format detection. The simplest solution I could devise is looking at the first audio block size and depending on its size setting the format (22050 bytes means 11kHz mono, 44100 bytes are for 22kHz mono and 88200 bytes are for 22kHz stereo). As long as you don’t encounter those extra-short files with a single audio block of different size you should be fine.

Then, video. Game demo (and maybe some versions of the full game) uses paletted video while the full game (at least the version I could find) uses 16-bit video instead. So if you discover palette chunk before video it must be a paletted format. At least the compression schemes remain the same.

And what do you know, video compression is also annoying. Both compression methods employ LZ77-based algorithm with some variations. Method 3 always decodes 640*320 bytes (or twice as much for 16-bit video) and employs an additional code for leaving data unchanged from the previous frame. Method 2 uses the same coding method (minus the “keep previous data” code) to code inter frame data of variable length (without an end code apparently). Essentially if the next 24-bit code is a valid offset (which is coded as x+y*632) then copy a block from the previous frame at the given position, otherwise decode block data (64 or 128 bytes depending on bit-depth). As I mentioned before, you don’t know compressed data size beforehand and you don’t have end-of-stream marker so you have to decode the needed amount of data as you paint the frame.

Overall, this is rather interesting video compression scheme but Paco also serves as an example of how not to design a container format. This reminds me of RoQ hack where the game engine used slightly different decoding mode if the filename was in a special list. And Nova Logic KDV but there it were different flavours in different games at least.

Ratvideo: done and not done

Monday, October 21st, 2024

I’ve written a decoder for Ratvideo (and documented it as well). So why it’s not done? Because apparently it’s VIDPAK (from the creator of DIGPAK John W. Ratcliff—hmm, I wonder if his name has anything to do with the format name) so it’s a different thing that had been done. And since the format was created by an EA programmer for use in EA games it’s definitely Peter Ross’s fault for not REing it.

So the runtime-generated table turned out to be code for masked update and inter-coding mode proved out to be a fixed-size mask telling which pixels to update plus the values to update it with. Mentioned in the previous post mode with duplicating lines turned out to be an alternative coding mode where each next line uses a previous one as the reference, so that previous line is copied and updated depending on the mask. That’s another case where you need to look at the disassembly instead of what decompiler provides (if it manages to produce something in the first place) but the code is almost trivial.

I’m not going to look at any more game formats in the near future (unless some come to my attention), so it’s just boring stuff for me for now.