Comments (14)
Here's the build, give it a try
jpsxdec_v0-99-8_reboot_bin_src.zip
from jpsxdec.
WHEW! That was a furious night of coding.
Although I couldn't adapt the app to actually read the files, I was able to modify the original payloads to do so!
To get the videos to read under the STR format, you need to modify the following bytes:
- MDEC 32 bytes block needs to be 1 or greater, so I wrote 0x1.
- Magic 0x3800 needs to be present, so I overwrote the registers with 0x3800
- Frame Version is 0x0000 in these files, so I set it to version 2.
- Quantization needs to be greater than 0, so set to 1.
Doing this causes all the videos to play with zero errors.
Not sure if it's worthwhile to write a new rule into the parser, but if you can somehow write in above tolerances, the app can open the files natively.
from jpsxdec.
Absolutely brilliant! Thanks a ton for sticking with it. Understanding all the fields that are different gives me what I need to add handling for this new video variation. I'll add the handling and put together a build for you this weekend to try.
The way 0x3800 is different, but consistent across the whole video, it reminds me of other video variations that put the video frame count in the header for some reason. I don't know if you can find some kind of correlation about the videos and the 0x3800 values. But in any case, I think we're good to go.
from jpsxdec.
There is indeed video in there, but it breaks some of the rules so it's not detected :/
from jpsxdec.
Unfortunately I have had little luck in unwrapping the video data. Is there a way we can strip out the detected audio to decode the video payload, or is it wrapped within the audio?
from jpsxdec.
I don't know if you're up for it, but the layout of FMVs is described in chapter 1.2. How the PlayStation reads data from the disc
of https://github.com/m35/jpsxdec/blob/readme/jpsxdec/PlayStation1_STR_format.txt
You can view the sector layout of your disc or files using the command
java -jar jpsxdec.jar -f EA.WXA -sectordump ea.txt
The video sectors could be easily identifiable by looking for Submode:-R----V-
(R=real time, V=video)
But the 32 byte video sector headers of this game are not conforming to the standard STR sector header described in :: STR Frame Sector Header ::
, so jPSXdec doesn't know what to do with them. However, the 32 byte header format is close. We'd need to check what values are used in all the video sector headers so we can add the necessary support for the unique video sector type. The new sector type would look much like https://github.com/m35/jpsxdec/blob/readme/jpsxdec/src/jpsxdec/modules/strvideo/SectorStrVideo.java
from jpsxdec.
Ok. I have a good chunk of videos, so I'll have a look and see if the headers are common for this game. Thanks!
from jpsxdec.
So far, the only major deviation I can see is with the magic "0x3800" fields. I haven't decoded the actual video data (too lazy to re-write it if I don't have to), but it seems to align with the spec otherwise on quick glance. For whatever reason, the magic field on this one seems to be 0x0064 as per the attached report I generated.
Sorry, I'm really not a java guy. Could you try compiling with a flag to switch the magic number to 0x0064?
test.txt
EDIT Want to try 0x0064 for this test, but each file seems to change that magic number a bit, but it remains the same for the entire WXA file. I'm curious if the rule is truly required...
EDIT 2 So editing the magic numbers in didn't allow the app to translate it. Here's what I can see:
- Frames start at 0.
- The first video frame is usually on the 2nd sector, preceded by an audio frame
- Number of MDEX frames required is always 0x0000.
from jpsxdec.
Yeah finding the patterns is the most time consuming part. I'd ultimately write a little program to dump the first 32 bytes and sector number of every video sector into a text file and run some analysis on all the values. Edit which is exactly what you did! (sorry missed the link). It's also important to understand as many values as possible since they may be important when replacing frames.
from jpsxdec.
I realized I blended that text file into the post a bit, so no worries.
I wrote a little python app to do just that, assuming the entire disk is Mode 2 (which it appears to be for all the videos). I can compile a report for you tonight, but so far the above mentioned deviations seem common. Each WXA file seems to have a unique value in the 0x3800 field, which is consistent for all frame data.
Have you determined how the 0x3800 corresponds to the decryption, or is it just a payload validation? I'm wondering if it's just easier to add an options menu to enable / disable the frame and 0x3800 checks.
from jpsxdec.
Ok, uploading so we can both look at this:
https://drive.google.com/file/d/1qAoK292wW3Uy1dwwX3Gnkhkd6xfet7Vh/view?usp=sharing
This is the report of all the WXA files in the game's MOVIES directory. It looks as if what I said above remains true.
from jpsxdec.
On first guess looking at the first file, the magic number partially correlates to the number of frames in the video. For my first video, instead of 0x0038 (decoded), it's 0x03D0. The last Frame Number is 0x03C9. For the EA one above, the magic number is 0x0064, and the last frame is 0x005E
It seemingly has no impact on this payload at least.
from jpsxdec.
Works great! I'll check the PAL ISO in a bit, but it worked with zero errors on the mdf image. Thanks!
from jpsxdec.
Incorporated into this release https://github.com/m35/jpsxdec/releases/tag/v0.99.9
from jpsxdec.
Related Issues (20)
- About replacing spoken dialog in Silent Hill HOT 2
- Broken Video - True Love Story - Remember My Heart (Japan) HOT 1
- Psychic Detective - MDC Files
- Crisis Beat (SLES-02793) .xa extraction results in noise HOT 2
- Putter Golf - Corrupted Sound
- Frame rate is displayed incorrectly HOT 1
- Brian Lara Cricket missing audio HOT 3
- Request: Support for Namco Museum TIP format
- Legend of Mana FIN.STR audio issue
- Add CD audio (CDDA) detection, extraction, and replacing
- Add ability to replace (ISO 9660) files
- Add support for detecting and extracting PS1 Sound Processing Unit audio
- Policenauts demo disc videos are not detected HOT 1
- Add support for detecting and extracting PS1 SEQ audio HOT 1
- Replacing audio files not working anymore. HOT 2
- How to extract Tim file for captain tsubasa j get in the tomorrow ps1 HOT 4
- Eagle One - Harrier Attack - No frames of video HOT 1
- Dance UK eXtra TraX - Videos with no video or audio HOT 2
- Sonic Wings Special - Broken Frames HOT 1
- Support for .VLC files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpsxdec.