Breaking Eggs And Making Omelettes

Topics On Multimedia Technology and Reverse Engineering


Archives:

MDEC Comeback

November 29th, 2007 by Multimedia Mike

I just wanted to draw attention to a recent effort by one Michael Sabin who has been building a Java application called jPSXdec to play back videos ripped from the Sony PlayStation 1.


Sony PlayStation

To review, the original PlayStation had a bit of dedicated hardware called the motion decoder (MDEC) which decoded specially formatted blocks of what were essentially motion JPEG data. Assorted games also compressed the blocks using Huffman codes which were decoded by software. While the MDEC hardware was rigid in the data it would accept, PS programmers could deploy whatever Huffman tables they chose. I always thought it would be an interesting project (and a natural extension of my usual efforts) to catalog the various tables needed to play movies from different games, as well as different strategies that games have used to store the data on the disc.

Michael S. has been doing just that. There is a blog to document jPSXdec’s progress. Near and dear to my heart, however, is the fact that he is building a remarkable document (seen in the project’s download list) that explains precisely how to decode this data, from the perspective of a non-multimedia geek, no less.

Posted in Game Hacking, Open Source Multimedia | 4 Comments »

4 Responses

  1. astrange Says:

    Wow, the only plugin is for the only PSX game I want to see videos for, even though nobody’s ever heard of it!

    I really wish I could get it to play through ffmpeg, though, since -vf pp should be really effective on them; last time I tried the .STR demuxer it had broken a/v sync. (not to mention that this is one of the games with custom compression)

  2. Multimedia Mike Says:

    I’m confused– are you saying that the jPSXdec can or can not play the videos you care about? If it can, that’s great news since we should be able to incorporate the knowledge into FFmpeg.

  3. astrange Says:

    Turns out it can’t. I’ll submit one as a sample, although it’s very compressed and probably encrypted in some way, so I’ll have to go back and RE the game eventually.

    …but ffplay-r11113 built right now can’t play any STRs at all anymore, even the ones on mplayerhq (http://samples.mplayerhq.hu/game-formats/psx-str/lunar2.str). I guess i’d better file some bugs.

  4. astrange Says:

    …and done. I thought the a/v sync was broken but it’s just that the adpcm decoder is clipping a lot and my test STR is actually 20fps. I thought that was impossible… oh well.