Skip to content

Commit a92da2e

Browse files
committed
Improved README
* Thanks to zacknini for doing the title screen image
1 parent 5ea80e0 commit a92da2e

File tree

10 files changed

+40
-30
lines changed

10 files changed

+40
-30
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
![Downloads](https://img.shields.io/github/downloads/wagrenier/zero2undub/total)
44
![Push Since Last Release](https://img.shields.io/github/commits-since/wagrenier/zero2undub/latest)
55

6+
![](docs/title_alt_512x512.png)
7+
68
## Undub project for Fatal Frame 2 PS2 (Project Zero 2零紅い蝶)
79

810
Includes:

Zero2UndubProcess/Constants/GameRegionConstants.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static class EuIsoConstants
1212
public const long FileArchiveEndAddress = 0x9168B000;
1313
public const long FileArchiveEndIsoAddress = 0xC23CB000;
1414
}
15-
15+
1616
public static class UsIsoConstants
1717
{
1818
public const string TitleId = "SLUS_207.66";
@@ -31,8 +31,8 @@ public static class JpIsoConstants
3131
public const long FileTableStartAddress = 0x002F85F8;
3232
public const long FileTypeTableStartAddress = 0x304B00;
3333
public const long FileArchiveStartAddress = 0x30D40000;
34-
public const long FileArchiveEndAddress = 0x9168B000;
35-
public const long FileArchiveEndIsoAddress = 0xC23CB000;
34+
public const long FileArchiveEndAddress = 0x91566000;
35+
public const long FileArchiveEndIsoAddress = 0xC22A6000;
3636
}
3737
}
3838
}

Zero2UndubProcess/GameFiles/RegionHandler.cs

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public RegionHandler(FileSystemInfo origin, FileSystemInfo target)
1717
_originGameRegion = GetGameRegionFromTitleId(origin);
1818
_targetGameRegion = GetGameRegionFromTitleId(target);
1919

20+
/*
2021
if (_targetGameRegion == GameRegions.Japan)
2122
{
2223
ShouldSwitch = true;
@@ -25,6 +26,7 @@ public RegionHandler(FileSystemInfo origin, FileSystemInfo target)
2526
_targetGameRegion = _originGameRegion;
2627
_originGameRegion = temp;
2728
}
29+
*/
2830

2931
OriginRegionInfo = GetRegionInfoFromGameRegion(_originGameRegion);
3032

@@ -36,32 +38,32 @@ private static RegionInfo GetRegionInfoFromGameRegion(GameRegions gameRegion)
3638
return gameRegion switch
3739
{
3840
GameRegions.EU => new RegionInfo
39-
{
40-
FileArchiveStartAddress = GameRegionConstants.EuIsoConstants.FileArchiveStartAddress,
41-
FileTableStartAddress = GameRegionConstants.EuIsoConstants.FileTableStartAddress,
42-
FileTypeTableStartAddress = GameRegionConstants.EuIsoConstants.FileTypeTableStartAddress,
43-
NumberFiles = GameRegionConstants.EuIsoConstants.NumberFiles,
44-
FileArchiveEndAddress = GameRegionConstants.EuIsoConstants.FileArchiveEndAddress,
45-
FileArchiveEndIsoAddress = GameRegionConstants.EuIsoConstants.FileArchiveEndIsoAddress
46-
},
41+
{
42+
FileArchiveStartAddress = GameRegionConstants.EuIsoConstants.FileArchiveStartAddress,
43+
FileTableStartAddress = GameRegionConstants.EuIsoConstants.FileTableStartAddress,
44+
FileTypeTableStartAddress = GameRegionConstants.EuIsoConstants.FileTypeTableStartAddress,
45+
NumberFiles = GameRegionConstants.EuIsoConstants.NumberFiles,
46+
FileArchiveEndAddress = GameRegionConstants.EuIsoConstants.FileArchiveEndAddress,
47+
FileArchiveEndIsoAddress = GameRegionConstants.EuIsoConstants.FileArchiveEndIsoAddress
48+
},
4749
GameRegions.USA => new RegionInfo
48-
{
49-
FileArchiveStartAddress = GameRegionConstants.UsIsoConstants.FileArchiveStartAddress,
50-
FileTableStartAddress = GameRegionConstants.UsIsoConstants.FileTableStartAddress,
51-
FileTypeTableStartAddress = GameRegionConstants.UsIsoConstants.FileTypeTableStartAddress,
52-
NumberFiles = GameRegionConstants.UsIsoConstants.NumberFiles,
53-
FileArchiveEndAddress = GameRegionConstants.UsIsoConstants.FileArchiveEndAddress,
54-
FileArchiveEndIsoAddress = GameRegionConstants.UsIsoConstants.FileArchiveEndIsoAddress
55-
},
50+
{
51+
FileArchiveStartAddress = GameRegionConstants.UsIsoConstants.FileArchiveStartAddress,
52+
FileTableStartAddress = GameRegionConstants.UsIsoConstants.FileTableStartAddress,
53+
FileTypeTableStartAddress = GameRegionConstants.UsIsoConstants.FileTypeTableStartAddress,
54+
NumberFiles = GameRegionConstants.UsIsoConstants.NumberFiles,
55+
FileArchiveEndAddress = GameRegionConstants.UsIsoConstants.FileArchiveEndAddress,
56+
FileArchiveEndIsoAddress = GameRegionConstants.UsIsoConstants.FileArchiveEndIsoAddress
57+
},
5658
GameRegions.Japan => new RegionInfo
57-
{
58-
FileArchiveStartAddress = GameRegionConstants.JpIsoConstants.FileArchiveStartAddress,
59-
FileTableStartAddress = GameRegionConstants.JpIsoConstants.FileTableStartAddress,
60-
FileTypeTableStartAddress = GameRegionConstants.JpIsoConstants.FileTypeTableStartAddress,
61-
NumberFiles = GameRegionConstants.JpIsoConstants.NumberFiles,
62-
FileArchiveEndAddress = GameRegionConstants.JpIsoConstants.FileArchiveEndAddress,
63-
FileArchiveEndIsoAddress = GameRegionConstants.JpIsoConstants.FileArchiveEndIsoAddress
64-
},
59+
{
60+
FileArchiveStartAddress = GameRegionConstants.JpIsoConstants.FileArchiveStartAddress,
61+
FileTableStartAddress = GameRegionConstants.JpIsoConstants.FileTableStartAddress,
62+
FileTypeTableStartAddress = GameRegionConstants.JpIsoConstants.FileTypeTableStartAddress,
63+
NumberFiles = GameRegionConstants.JpIsoConstants.NumberFiles,
64+
FileArchiveEndAddress = GameRegionConstants.JpIsoConstants.FileArchiveEndAddress,
65+
FileArchiveEndIsoAddress = GameRegionConstants.JpIsoConstants.FileArchiveEndIsoAddress
66+
},
6567
GameRegions.UNKNOWN => throw new Exception("Unknown game region."),
6668
_=> throw new Exception("Unknown game region.")
6769
};

Zero2UndubProcess/Importer/ZeroFileImporter.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ public void RestoreGame()
3737
var targetFile = _isoHandler.TargetGetFile(i);
3838
var originFile = _isoHandler.OriginGetFile(i);
3939

40+
// Check for splash screen logo
41+
if (targetFile.FileId == 3)
42+
{
43+
44+
}
45+
4046
if (targetFile.Type != FileType.VIDEO && targetFile.Type != FileType.AUDIO)
4147
{
4248
continue;
@@ -57,7 +63,7 @@ public void RestoreGame()
5763
}
5864
else if (targetFile.Type == FileType.AUDIO)
5965
{
60-
_isoHandler.AudioUndub(originFile, targetFile);
66+
_isoHandler.AppendFile(originFile, targetFile);
6167
}
6268
else if (targetFile.Type == FileType.VIDEO)
6369
{

Zero2UndubProcess/Iso/IsoHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public IsoHandler(string originFile, string targetFile)
1717
var targetIso = new FileInfo(targetFile);
1818

1919
IsoRegionHandler = new RegionHandler(originIso, targetIso);
20-
20+
2121
if (IsoRegionHandler.ShouldSwitch)
2222
{
2323
var temp = originIso;
@@ -69,7 +69,7 @@ public void LargerVideoUndub(ZeroFile origin, ZeroFile target)
6969
_targetIsoWriter.OverwriteFile(origin, target, newVideoContent);
7070
}
7171

72-
public void AudioUndub(ZeroFile origin, ZeroFile target)
72+
public void AppendFile(ZeroFile origin, ZeroFile target)
7373
{
7474
var originHeaderFile = OriginGetFile(origin.FileId - 1);
7575
var targetHeaderFile = TargetGetFile(target.FileId - 1);

docs/title_256x128.png

79.3 KB
Loading

docs/title_3111x2333.png

2.62 MB
Loading

docs/title_512x512.png

546 KB
Loading

docs/title_alt_512x512.png

465 KB
Loading

docs/title_white_512x512.png

545 KB
Loading

0 commit comments

Comments
 (0)