na_game_tool: yet another bunch of formats

So, what’s been added since previous report?

  • Road Avenger BIN—as mentioned in an update to the previous post, done;
  • Reaper FMV (from Rollcage game)—decoding works fine but the reconstruction does not because of imperfect IDCT implementation on my side (and the fact they don’t use any kind of clipping to make sure the result will stay in range all while employing different tricks like converting double to int by adding a large constant, storing the result as double and read the second half of it as an integer). Overall, I decided not to count it and threw in a couple of easily REd formats described in the next entry;
  • a pair of other BIN formats from Data East—they’re the same as Road Avenger BIN but not even compressed;
  • Ecco the Dolphin LMS—another raw-tile Sega CD console format except that tile data is arranged more curiously there (128×128 frame is split into 128×32 strips consisting of 8×8 tiles that are arranged in columns). Also it seems to use implicit grey-scale palette (unless there are some external palettes hidden elsewhere), at least watching those documentaries in this way is fine;
  • Interplay M95—it’s been described on The Wiki since 2006 (not by me of course) but nobody bothered to implement a decoder for it until now;
  • Psygnosis SMV (from WipEout game)—I looked at it back in the day but of course it’s been on The Wiki since 2012. Codec 2 was not described completely right there (partition codebooks are stored in the end, after block indices and not before; and it was not immediately clear that block palettes are stored in global frame order and not in partition coding order) but nothing that a bit of debugging can’t fix.

In either case I’ve filled self-imposed quota of a dozen of originally REd formats and started to pick other formats to support (three done, about nine to go). I have noted about three formats worth supporting and if I can’t find more good candidates—well, maybe there are some more low-hanging Sega CD formats…

And as usual, for more supported console formats, both simpler and much more complex, there’s always librempeg (and that’s not talking about other things it offers like the countless audio and video filters).

P.S. Since I don’t want to do a separate rant, I’ll mention some tangentially related things here.

First, a search for more SMV samples on discmaster returned no unknown real SMV samples but some PMV samples with .smv extension including one that could not be decoded (because of zero root chunk length—I’ve fixed that) and a couple that had nothing wrong with them but were not detected as Zork PMV at all for some reason.

Second, I actually used discmaster to check if there are some interesting ARMovie files. Sadly it still lack an option for omitting supported files so I searched for acornReplayAudio files and filtered out the sources containing actual ARMovie files without video track (somehow I don’t want to check all of ~6000 files so if one or two files coming from same CD are audio-only I excluded it from the further search). After all this winnowing I’ve found two samples with Eidos Escape 102 codec. It’s simple and I’ve REd it some time ago so finally I’ve managed to write a decoder for it. At least I don’t have to search for the samples by the magic string like I did back in the day… Sadly there’s no good way to detect old TCA format so I’m not even going to attempt looking for it.

4 Responses to “na_game_tool: yet another bunch of formats”

  1. Paul says:

    I may gonna try to implement two more Bluetooth codecs: ldac and lhdc once I find no easy way to improve FFT code.

    Rename project to decoder tool in the name, otherwise you must implement 50% of encoders for all those nice game formats you RE.

    How much unsafe calls the current Rust code have?

  2. Kostya says:

    Thanks for the suggestion, while I have no intent to rename it, I might extend it to do some other things (like extracting some game archives).

    As for your question about unsafe calls, I don’t understand it. In Rust you usually mark some code as unsafe when you want to do some things that the compiler can’t prove to be sound (for example, in na_game_tool I cast pointer to integer into pointer to byte array of equal size for reading—that’s the only instance of unsafe code there). Unsafe calls are usually for foreign functions (e.g. calls to libSDL functions in my audio player).

  3. Sembiance says:

    discmaster now has a feature to omit supported files. For example, here is a search for ARMovie files that were not able to be processed by dexvert: https://dev.discmaster.textfiles.com/search?detection=41524D6F7669650A*&unsupported=true
    Note: It’s possible that some due convert ok but that those particular items haven’t been “reprocessed” yes with more updated versions of dexvert/tools (like niahv/na_game_tool)

  4. Kostya says:

    Very nice (and useful) indeed. Hopefully I’ll be able to use it in the future for new exciting searches of the old boring stuff.

Leave a Reply