Skip to content

Commit

Permalink
v1.02 rev3950 (13 Dec 2019)
Browse files Browse the repository at this point in the history
- Added support for Jackie Chan Stuntmaster videos
Bug fixes:
- Some videos in EA games are not detected
  • Loading branch information
m35 committed Dec 14, 2019
1 parent 2f042c9 commit e1ba2bb
Show file tree
Hide file tree
Showing 25 changed files with 333 additions and 225 deletions.
14 changes: 7 additions & 7 deletions jpsxdec/PSXListOFGames.txt
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ Status
[ ] SLUS-01014 ISS Pro Evolution
[ ] SLUS-00674 ISS Soccer Pro '98
[ ] SLUS-01457 Italian Job, The
[ ] SLUS-00684 Jackie Chan Stuntmaster
[+f] SLUS-00684 Jackie Chan Stuntmaster
[ ] SLUS-00854 Jade Cocoon - Legend of Tamamayu
[ ] SLUS-90054 Jade Cocoon - Story of the Tamamayu [Demo]
[ ] SCUS-94176 Jampack Vol.1 [Demo]
Expand Down Expand Up @@ -800,7 +800,7 @@ Status
00C1B085 Madden NFL '96
[ ] SLUS-00018 Madden NFL '97
[ ] SLUS-00516 Madden NFL '98
[ ] SLUS-00729 Madden NFL '99
[+] SLUS-00729 Madden NFL '99
[ ] SLUS-00029 Magic Carpet
[ ] SLUS-00247 Magic the Gathering - Battlemage
[ ] SLUS-01471 Marble Master
Expand Down Expand Up @@ -924,7 +924,7 @@ Status
[ ] SLUS-01166 NASCAR Heat
[ ] SLUS-01050 NASCAR Racers
[ ] SLUS-00374 NASCAR Racing
[ ] SLUS-01068 NASCAR Rumble
[+] SLUS-01068 NASCAR Rumble
[ ] SLUS-01403 NASCAR Thunder 2002
[ ] SLUS-01502 NASCAR Thunder 2003
[ ] SLUS-01571 NASCAR Thunder 2004
Expand Down Expand Up @@ -4384,7 +4384,7 @@ Status
[ ] SLPM-86073 Akumajo Dracula X - Gekka no Yasoukyoku [PlayStation The Best]
[ ] SLPM-87328 Akumajo Dracula X - Gekka no Yasoukyoku [PSone Books]
[ ] SLPS-02961 Alabama
[f] SLPS-00636 Alice in Cyberland
[+f] SLPS-00636 Alice in Cyberland
[ ] SLPS-01003 Alice on Borderlines [Disc1of3]
[ ] SLPS-01004 Alice on Borderlines [Disc2of3]
[ ] SLPS-01005 Alice on Borderlines [Disc3of3]
Expand Down Expand Up @@ -5665,7 +5665,7 @@ Status
[ ] SLPM-86081 Final Fantasy V
[ ] SCPS-45387 Final Fantasy VI
[ ] SLPM-86198 Final Fantasy VI
[f] SLPS-01060 Final Fantasy VII - International [Bonus Disc]
[+f] SLPS-01060 Final Fantasy VII - International [Bonus Disc]
[ ] SLPS-91443 Final Fantasy VII - International [Bonus Disc] [PSone Books]
[ ] SLPM-87383 Final Fantasy VII - International [Bonus Disc] [Ultimate Hits]
[ ] SLPS-01057 Final Fantasy VII - International [Disc1of3]
Expand All @@ -5682,7 +5682,7 @@ Status
[ ] SCPS-45008 Final Fantasy VII [Disc2of3]
[ ] SLPS-00701 Final Fantasy VII [Disc2of3]
[ ] SCPS-45009 Final Fantasy VII [Disc3of3]
[f] SLPS-00702 Final Fantasy VII [Disc3of3]
[+f] SLPS-00702 Final Fantasy VII [Disc3of3]
[ ] SCPS-45375 Final Fantasy VIII [Disc1of4]
[ ] SLPS-01880 Final Fantasy VIII [Disc1of4]
[ ] SLPM-87384 Final Fantasy VIII [Disc1of4] [Ultimate Hits]
Expand Down Expand Up @@ -5797,7 +5797,7 @@ Status
[ ] SLPS-03313 Gakkou o Tsukurou!! Koushou Sensei Monogatari [Reprint]
[ ] SLPS-01852 Gakuen Sentai Solblast
[ ] SLPS-01638 Gakuensai
[ ] SLPS-00270 Galaxian 3
[+] SLPS-00270 Galaxian 3
[ ] SLPS-00138 Galaxy Fight - Universal Warriors
[ ] SLPS-02596 Gale Gunner
[ ] SLPS-03305 Gale Gunner [ASCII Casual Collection]
Expand Down
2 changes: 1 addition & 1 deletion jpsxdec/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- ====== global build properties ====== -->

<property name="jpsxdec.ver" value="v1-01_rev3936"/>
<property name="jpsxdec.ver" value="v1-02_rev3950"/>

<!-- sources -->
<property name="src.dir.rel" location="src" relative="true"/>
Expand Down
6 changes: 5 additions & 1 deletion jpsxdec/doc/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
v1.02 rev3950 (13 Dec 2019)
- Added support for Jackie Chan Stuntmaster videos
Bug fixes:
- Some videos in EA games are not detected
v1.01 rev3936 (16 Nov 2019)
- Added support for Starblade Alpha videos
- Added support for Starblade Alpha and Galaxian 3 videos
Bug fixes:
- Replacing audio throws an exception
v1.00 rev3921 (7 Sept 2019) The "ran out of version numbers" release
Expand Down
4 changes: 2 additions & 2 deletions jpsxdec/doc/LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ Specifically src/jpsxdec/i18n/I.java and Translations*.properties

Copyright:
Michael Sabin
V�ctor Gonz�lez
Víctor González
Sergi Medina
Gianluigi "Infrid" Cusimano

English and Japanese by Michael Sabin
Spanish by V�ctor Gonz�lez and Sergi Medina
Spanish by Víctor González and Sergi Medina
Italian by Gianluigi "Infrid" Cusimano

Licensed under the Apache License, Version 2.0
Expand Down
2 changes: 1 addition & 1 deletion jpsxdec/src/jpsxdec/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

public class Version {

public final static String Version = "1.01 (beta)";
public final static String Version = "1.02 (beta)";
public final static String IndexHeader = "[jPSXdec v"+Version+"]";

}
6 changes: 3 additions & 3 deletions jpsxdec/src/jpsxdec/i18n/I.java
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ <p>Right after this string, the next string (CMD_ASSERT_DISABLED_NO_DEBUG_USE_EA
</ul>
*/
public static @Nonnull ILocalizedMessage GUI_DISC_NO_RAW_HEADERS_WARNING() {
return msg("GUI_DISC_NO_RAW_HEADERS_WARNING", "Disc image does not have raw headers -- audio may not be detected.");
return new _PlaceholderMessage("File does not have raw sector headers -- audio may not be detected.");
}

/**
Expand Down Expand Up @@ -3852,8 +3852,8 @@ <pre>Trying to reduce quantization scale of macroblock ({0,number,#},{1,number,#
<li>SectorClaimToRoadRash.java</li>
</ul>
*/
public static @Nonnull ILocalizedMessage ROADRASH_DATA_CORRUPTION() {
return msg("ROADRASH_DATA_CORRUPTION", "RoadRash data corruption");
public static @Nonnull ILocalizedMessage EA_VIDEO_DATA_CORRUPTION() {
return new _PlaceholderMessage("EA video data corruption");
}

/**
Expand Down
109 changes: 109 additions & 0 deletions jpsxdec/src/jpsxdec/i18n/_PlaceholderMessage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/*
* jPSXdec: PlayStation 1 Media Decoder/Converter in Java
* Copyright (C) 2019 Michael Sabin
* All rights reserved.
*
* Redistribution and use of the jPSXdec code or any derivative works are
* permitted provided that the following conditions are met:
*
* * Redistributions may not be sold, nor may they be used in commercial
* or revenue-generating business activities.
*
* * Redistributions that are modified from the original source must
* include the complete source code, including the source code for all
* components used by a binary built from the modified sources. However, as
* a special exception, the source code distributed need not include
* anything that is normally distributed (in either source or binary form)
* with the major components (compiler, kernel, and so on) of the operating
* system on which the executable runs, unless that component itself
* accompanies the executable.
*
* * Redistributions must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package jpsxdec.i18n;

import java.text.MessageFormat;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

/** Development localized message. Replace with actual message before release. */
public class _PlaceholderMessage implements ILocalizedMessage {

@Nonnull
private final String _sMessage;
@CheckForNull
private final Object[] _aoArguments;

public _PlaceholderMessage(@Nonnull String sMessage, Object ... aoArguments) {
_sMessage = sMessage;
_aoArguments = aoArguments;
}

public _PlaceholderMessage(@Nonnull String sMessage) {
_sMessage = sMessage;
_aoArguments = null;
}

public void logEnglish(@Nonnull Logger log, @Nonnull Level level) {
logEnglish(log, level, null);
}

public void logEnglish(@Nonnull Logger log, @Nonnull Level level, @CheckForNull Throwable ex) {
LogRecord lr = new LogRecord(level, _sMessage);
lr.setLoggerName(log.getName());
if (_aoArguments != null)
lr.setParameters(_aoArguments);
if (ex != null)
lr.setThrown(ex);
log.log(lr);
}

public @Nonnull String getEnglishMessage() {
if (_aoArguments == null)
return _sMessage;
else {
Object[] aoArgCopy = new Object[_aoArguments.length];
for (int i = 0; i < _aoArguments.length; i++) {
Object arg = _aoArguments[i];
if (arg instanceof ILocalizedMessage)
aoArgCopy[i] = ((ILocalizedMessage)arg).getEnglishMessage(); // recursively get all the English
else
aoArgCopy[i] = arg;
}

return MessageFormat.format(_sMessage, aoArgCopy);
}
}

public @Nonnull String getLocalizedMessage() {
return getEnglishMessage();
}

@Override
public String toString() {
return getLocalizedMessage();
}

public boolean equalsIgnoreCase(@Nonnull String s) {
return _sMessage.equalsIgnoreCase(s);
}

}
4 changes: 2 additions & 2 deletions jpsxdec/src/jpsxdec/indexing/DiscIndexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
import jpsxdec.modules.ac3.DiscIndexerAceCombat3Video;
import jpsxdec.modules.crusader.DiscIndexerCrusader;
import jpsxdec.modules.dredd.DiscIndexerDredd;
import jpsxdec.modules.eavideo.DiscIndexerEAVideo;
import jpsxdec.modules.iso9660.DiscIndexerISO9660;
import jpsxdec.modules.policenauts.DiscIndexerPolicenauts;
import jpsxdec.modules.roadrash.DiscIndexerRoadRash;
import jpsxdec.modules.spu.DiscIndexerSpu;
import jpsxdec.modules.square.DiscIndexerSquareAudio;
import jpsxdec.modules.strvideo.DiscIndexerStrVideo;
Expand All @@ -81,7 +81,7 @@ public abstract class DiscIndexer {
new DiscIndexerPolicenauts(),
new DiscIndexerCrusader(log),
new DiscIndexerDredd(log),
new DiscIndexerRoadRash(),
new DiscIndexerEAVideo(),
};
ArrayList<DiscIndexer> indexers = new ArrayList<DiscIndexer>(Arrays.asList(coreIndexers));

Expand Down
4 changes: 2 additions & 2 deletions jpsxdec/src/jpsxdec/modules/SectorClaimSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
import jpsxdec.modules.cdaudio.SectorClaimToSectorCdAudio;
import jpsxdec.modules.crusader.SectorClaimToSectorCrusader;
import jpsxdec.modules.dredd.SectorClaimToDreddFrame;
import jpsxdec.modules.eavideo.SectorClaimToEAVideo;
import jpsxdec.modules.iso9660.SectorClaimToSectorISO9660;
import jpsxdec.modules.policenauts.SectorClaimToPolicenauts;
import jpsxdec.modules.roadrash.SectorClaimToRoadRash;
import jpsxdec.modules.square.SectorClaimToSquareAudioSector;
import jpsxdec.modules.strvideo.SectorClaimToStrVideoSector;
import jpsxdec.modules.xa.SectorClaimToSectorXaAudio;
Expand Down Expand Up @@ -99,7 +99,7 @@ public class SectorClaimSystem {
scs.addClaimer(new SectorClaimToSectorCrusader());
scs.addClaimer(new SectorClaimToDreddFrame());
scs.addClaimer(new SectorClaimToPolicenauts());
scs.addClaimer(new SectorClaimToRoadRash());
scs.addClaimer(new SectorClaimToEAVideo());
scs.addClaimer(new SectorClaimToUnidentifiedSector());
return scs;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package jpsxdec.modules.roadrash;
package jpsxdec.modules.eavideo;

import javax.annotation.Nonnull;
import jpsxdec.psxvideo.bitstreams.ArrayBitReader;
Expand All @@ -45,11 +45,11 @@
import jpsxdec.psxvideo.bitstreams.BitStreamUncompressor_STRv2;
import jpsxdec.psxvideo.bitstreams.ZeroRunLengthAcLookup;

public class BitStreamUncompressorRoadRash extends BitStreamUncompressor {
public class BitStreamUncompressor_EA extends BitStreamUncompressor {

private final int _iQuantizationScale;

public BitStreamUncompressorRoadRash(@Nonnull byte[] abMdecPacketPayload,
public BitStreamUncompressor_EA(@Nonnull byte[] abMdecPacketPayload,
@Nonnull ZeroRunLengthAcLookup lookupTable,
int iQuantizationScale)
{
Expand All @@ -65,8 +65,8 @@ public BitStreamUncompressorRoadRash(@Nonnull byte[] abMdecPacketPayload,

@Override
public @Nonnull BitStreamCompressor makeCompressor() {
// Writing a Road Rashvideo encoder would be a significant amount of work.
// And that might be ok, except to properly replace Road Rash videos would
// Writing a EA video encoder would be a significant amount of work.
// And that might be ok, except to properly replace EA videos would
// require re-building all of the packets from start to finish.
// That is beyond the scope jPSXdec's functionality. Modders will have
// to handle that part on their own.
Expand All @@ -84,7 +84,7 @@ public String toString() {
static final int BITSTREAM_ESCAPE_CODE = 0x7c1f;

/** The VLC0 packet contains a list of MDEC codes that are mapped to bit-codes in this order. */
static final BitStreamCode[] ROAD_RASH_BIT_CODE_ORDER = {
static final BitStreamCode[] EA_VIDEO_BIT_CODE_ORDER = {
BitStreamCode._10_______________,
BitStreamCode._110______________,
BitStreamCode._111______________,
Expand Down Expand Up @@ -312,8 +312,8 @@ public String toString() {
};

static {
if (ROAD_RASH_BIT_CODE_ORDER.length != BitStreamCode.getTotalCount())
throw new AssertionError("Road Rash VLC code count is wrong");
if (EA_VIDEO_BIT_CODE_ORDER.length != BitStreamCode.getTotalCount())
throw new AssertionError("EA VLC code count is wrong");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package jpsxdec.modules.roadrash;
package jpsxdec.modules.eavideo;

import java.io.PrintStream;
import java.util.Arrays;
Expand All @@ -49,24 +49,24 @@
import jpsxdec.util.Fraction;


public class DemuxedRoadRashFrame implements IDemuxedFrame {
public class DemuxedEAFrame implements IDemuxedFrame {

@Nonnull
private final RoadRashPacketSectors _sectors;
private final EAVideoPacketSectors _sectors;
@Nonnull
private final RoadRashPacket.MDEC _mdecPacket;
private final EAVideoPacket.MDEC _mdecPacket;
@Nonnull
private final RoadRashPacket.VLC0 _vlc;
private final EAVideoPacket.VLC0 _vlc;
@Nonnull
private final FrameNumber _frameNumber;
@Nonnull
private final Fraction _presentationSector;

public DemuxedRoadRashFrame(@Nonnull RoadRashPacketSectors sectors,
@Nonnull RoadRashPacket.MDEC mdecPacket,
@Nonnull RoadRashPacket.VLC0 vlc,
@Nonnull FrameNumber frameNumber,
@Nonnull Fraction presentationSector)
public DemuxedEAFrame(@Nonnull EAVideoPacketSectors sectors,
@Nonnull EAVideoPacket.MDEC mdecPacket,
@Nonnull EAVideoPacket.VLC0 vlc,
@Nonnull FrameNumber frameNumber,
@Nonnull Fraction presentationSector)
{
_sectors = sectors;
_mdecPacket = mdecPacket;
Expand Down Expand Up @@ -118,7 +118,7 @@ public void printSectors(PrintStream ps) {
}

public void writeToSectors(byte[] abNewDemux, int iNewUsedSize, int iNewMdecCodeCount, CdFileSectorReader cd, ILocalizedLogger log) throws LoggedFailure {
throw new UnsupportedOperationException("No support for replacing Road Rash frames");
throw new UnsupportedOperationException("No support for replacing EA video frames");
}

}
Loading

0 comments on commit e1ba2bb

Please sign in to comment.