m35 / jpsxdec

jPSXdec: cross-platform PlayStation 1 audio and video converter
http://jpsxdec.blogspot.com/
461 stars 24 forks source link

FMV's from Road Rash 3D #9

Closed Mohsen865 closed 5 years ago

Mohsen865 commented 6 years ago

It doesn't recognize any FMV from Road Rash 3D.

debug0.log

Environment

jPSXdec version: v0.99.7 rev3397 Operating system: Win7 64bits Java runtime environment: Version 8 - Update 44

PlayStation Game

Name: Road Rash 3D Region code: I tried both [SLUS-00524] and [SLES-00910] versions. rr3d_ntsc_cd

Description

What happened?: Doesn't recognize any FMV videos, soundtracks, and most of the TIM's / textures.

What was supposed to happen?: To recognize FMV videos, soundtracks, SFX, and more TIM's / textures.

Additional info

The soundtracks (which plays during the races) are stored in "ALBUM2.ALB" and "ALBUM.ALB" files, in ADPCM Stereo format plays at 16000Hz and the interleave value is 8192 bytes(?) can be played with "Cube Media Player 2".

The dialogue/monologues, menu music, SFX, and some other sounds are stored in "FENOIZ_E.DAT" and "RASHNZ_E.DAT" files, plays at 8000Hz ~ 16000Hz. (Unknown format but PS Sound plays them / XA maybe).

The FMV video format in this game is still unknown, or at least it's hidden somewhere on the disc! There are at least 62 FMV's in this game though....

Mohsen865 commented 6 years ago

Update!

Not sure but I think, I found that what are the FMV files on the game disc! ๐Ÿ˜… The files with .WVE extension must be the FMV videos.

Example: _EALOGO.WVE

wve

But the file header is not like a MDEC video at all!

wve_header

m35 commented 6 years ago

Great job investigating! The game is definitely doing something unique. I'll take a look at it this week and let you know.

Mohsen865 commented 6 years ago

Thank you very much! โ™ฅ

m35 commented 6 years ago

This game uses completely different ways to encode its FMVs ๐Ÿ™. There is an upcoming release of jPSXdec in the next month. Unfortunately support for Road Rash 3D FMVs and SFXs won't be added until the release after that (6+ months from now). As for more TIM/textures/images: jPSXdec primary focus really has to be on FMV and SFX simply because anything else is just too much for me (basic TIM support is an exception because it is so common).

Mohsen865 commented 6 years ago

Good to know. I think I can wait for more 6 months! ๐Ÿ˜ Thanks for explanation! โ™ฅ So you found the name of video Codec yet?

I examined the Road Rash 3D's main executable file in IDA disassembler... I'm not familiar with those code languages and I don't understand most of them! ๐Ÿ˜… But here are (see the screenshot) some mentions about MDEC in the game's exe file. So we have MDEC in this game? Maybe there are normal MDEC but they encrypted the video files, and the game exe decrypt them on the fly? ๐Ÿค” da

If someone who understands the language could check those codes, then we could have uncovered this ~20 years old mystery!

Something else: I noticed that the FMV playback (in Road Rash 3D, NBA Live 98, and some other EA games) works in a different way than FMV's in a regular PS1 game!! So on actual console, during the FMV playback if you open the PS1's Disc Cover, it takes a short time (like ~1 second) for the playback to freeze! It seems we have a buffered playback happening here in Road Rash 3D; But with a regular FMV (example: 007 The World Is Not Enough, and almost every PS1 game), once you open the Disc Cover, the video playback freezes quickly in no time!

Though if I'm not mistaken, the FMV's visual quality in Road Rash 3D is superior to those other games...

m35 commented 6 years ago

Shoot me an email at jpsxdec@gmail.com and I can get into more details you might find very interesting.

m35 commented 5 years ago

Added in this release https://github.com/m35/jpsxdec/releases/tag/v0.99.9

Mohsen865 commented 5 years ago

Added in this release https://github.com/m35/jpsxdec/releases/tag/v0.99.9

Thank you for the new release... Now since the release of this game (21yrs), finally we have an application which plays Road Rash 3D FMV's without needing to run or emulate the game! We can also watch the unused existing FMV's too... ๐Ÿ‘

But still something weird is happening to the output frames, on both JPSXDEC and emulation even by using the software renderer on emulator... The frames width is larger than 320 pixels (321 pixels?) ๐Ÿ˜ฎ As it is obvious on the following comparison, there's a hidden / cropped column of pixels on both emulator(1st pixels column on the right side of the frames) and the JPSXDEC(1st pixels column on the left) output frames, which proves that the real frames width is larger than 320 pixels! Note that the original captured screen from the emulator was in native 320x240 pixels with the two top and bottom black bands, before I crop them into 224 pixels, to remove the black bands...

Here's a comparison GIF between the pictures on JPSXDEC and emulator:

comparison

Can the resolution be really 321x224? Is it possible to find out how much larger are the original / uncropped frames of the game FMV's? I'll add more details about this issue in future, if required...

And I have questions about the FMV's audio track... What is the audio format? I didn't think that they could be in 22050 Hz! But still they sound like they're even better than 32000 Hz! ๐Ÿ˜ Is it possible to add a feature to let the users to save / convert FMV's audio tracks separately just like how we do it for regular STR FMV's of other games? audio

m35 commented 5 years ago

I can't think how there could be more than 320 pixels wide. Double checked the source data, and it doesn't have any data beyond 320 pixels wide. Checked the raw VRAM, and it also shows only 320 pixels wide (the emulator is showing the image in 16-bit mode, but the data is 24 bit, so it's 1.5x wider). RRSize

Mohsen865 commented 5 years ago

Ah, I see! Thanks for the reply. But something strange is going on with this game...

Lets add a fame from emulator to a frame from JPSXDEC to see the results... This is a frame from the intro video (T1.WVE) decoded by JPSXDEC: T1.WVE[0]234

And this is a frame from decoded video by emulator (black bands cropped out): DEMO0001 AVI_snapshot_00 11 000_ 2019 08 12_17 23 30

Here's the output result with 321 pixels width picture: DEMO0001 MIX

But I cannot even imagine how a video could be "321" pixels in width!! ๐Ÿ˜ฒ Perhaps we'll never know, until we ask from the person who encoded the video files or the game programmers themselves... ๐Ÿ˜

And for the final part, I'll add some comparison GIF's here (black bands cropped out): Zoom in to see more details

DEMO0001-1 DEMO0001-2 DEMO0001-3 DEMO0001-4

piratesephiroth commented 5 years ago

looks like a problem with the emulator

m35 commented 5 years ago

It's been confirmed to be an issue with how the emulator's video plugin was saving AVI images. The extra 1 column of pixels on the left was simply the first 1 column of pixels duplicated, and the right-most 1 column of pixels were cropped off. jPSXdec is doing it the right way.