Skip to content

Commit

Permalink
PS4 Tools Update
Browse files Browse the repository at this point in the history
  • Loading branch information
xXxTheDarkprogramerxXx committed Jul 26, 2022
1 parent 8e5a8ec commit a3e12c4
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 3 deletions.
3 changes: 2 additions & 1 deletion PS4_PKG_Viewer/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e)
label2.Text = PS4_PKG.PS4_Title;
dataGridView3.DataSource = null;
label3.Text = PS4_PKG.Content_ID;
lblExtraInfo.Text = "System Version : "+PS4_PKG.Firmware_Version + " (" + PS4_PKG.PKGState.ToString() + ")";
lblExtraInfo.Text = "System Version : " + PS4_PKG.Firmware_Version + " (" + PS4_PKG.PKGState.ToString() + ") " + PS4_PKG.Region;
this.Text = "PS4 PKG Viewer - PS4 Tools (" + PS4_PKG.PKG_Type.ToString() + ")";
DataTable dttemp = new DataTable();
dttemp.Columns.Add("PARAM");
dttemp.Columns.Add("VALUE");
Expand Down
Binary file modified PS4_PKG_Viewer/bin/Debug/PS4_PKG_Viewer.exe
Binary file not shown.
Binary file modified PS4_PKG_Viewer/bin/Debug/PS4_PKG_Viewer.pdb
Binary file not shown.
Binary file modified PS4_PKG_Viewer/bin/Debug/PS4_Tools.dll
Binary file not shown.
Binary file modified PS4_PKG_Viewer/bin/Debug/PS4_Tools.pdb
Binary file not shown.
45 changes: 43 additions & 2 deletions PS4_Tools/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8801,6 +8801,9 @@ public string BuildDate
}
}


public string Region { get; set; }

}


Expand Down Expand Up @@ -9245,7 +9248,7 @@ This will also be used in my other project*/
pkgreturn.Entires = entry;
string temp = Encoding.ASCII.GetString(data);

binaryReader.BaseStream.Seek(0x077, SeekOrigin.Begin);
binaryReader.BaseStream.Seek(4L, SeekOrigin.Begin);
ushort pkgtype = Util.Utils.ReadUInt16(binaryReader);//custom read offset 119 this will tll us if its debug or retail

//from the offset table we need to read the name
Expand Down Expand Up @@ -9426,8 +9429,46 @@ This will also be used in my other project*/
var item = trpreader.Load(trp_byte, nptitle);
pkgreturn.Trophy_File = item;
}
pkgreturn.PKGState = (pkgtype == 6666) ? PKG_State.Fake : ((pkgtype == 7747) ? PKG_State.Officail_DP : PKG_State.Official);
bool pkgofficail = false;
pkgofficail = (pkgtype == 33536 | pkgtype == 33024);

pkgreturn.PKGState = (pkgofficail == false) ? PKG_State.Fake : ((pkgtype == 7747) ? PKG_State.Officail_DP : PKG_State.Official);



//Adding region detection here as well for lapy's tools
switch (pkgreturn.Content_ID.ToUpper().Substring(0, 2))
{
case "UP":
{
pkgreturn.Region = "( US )";
break;
}
case "EP":
case "IP":
{
pkgreturn.Region = "( EU )";
break;
}
case "JP":
{
pkgreturn.Region = "( JP )";
break;
}
case "HP":
case "AP":
{
pkgreturn.Region = "( AS )";
break;
}
case "KP":
{
pkgreturn.Region = "( KO )";
break;
}
default:
break;
}
}
m_loaded = true;
return pkgreturn;
Expand Down
Binary file modified PS4_Tools/bin/Debug/PS4_Tools.dll
Binary file not shown.
Binary file modified PS4_Tools/bin/Debug/PS4_Tools.pdb
Binary file not shown.

0 comments on commit a3e12c4

Please sign in to comment.