Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazky committed Dec 9, 2023
1 parent 0947626 commit a5280ae
Show file tree
Hide file tree
Showing 101 changed files with 63,466 additions and 0 deletions.
25 changes: 25 additions & 0 deletions PSX2PS4-GUI.sln
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34031.279
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PSX2PS4-GUI", "PSX2PS4-GUI\PSX2PS4-GUI.vbproj", "{1A01BA2D-8DD1-48C9-8D12-7DA3C82D3402}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1A01BA2D-8DD1-48C9-8D12-7DA3C82D3402}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A01BA2D-8DD1-48C9-8D12-7DA3C82D3402}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A01BA2D-8DD1-48C9-8D12-7DA3C82D3402}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A01BA2D-8DD1-48C9-8D12-7DA3C82D3402}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6751CAB8-31ED-4DC4-B02A-70C66324FF90}
EndGlobalSection
EndGlobal
38 changes: 38 additions & 0 deletions PSX2PS4-GUI/App.config
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="PSX2PS4_GUI.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\dlls" />
</assemblyBinding>
</runtime>
<userSettings>
<PSX2PS4_GUI.My.MySettings>
<setting name="GN" serializeAs="String">
<value />
</setting>
<setting name="GID" serializeAs="String">
<value />
</setting>
<setting name="KI" serializeAs="String">
<value>False</value>
</setting>
<setting name="AC" serializeAs="String">
<value>True</value>
</setting>
<setting name="AP" serializeAs="String">
<value>False</value>
</setting>
<setting name="P5C" serializeAs="String">
<value>False</value>
</setting>
</PSX2PS4_GUI.My.MySettings>
</userSettings>
</configuration>
Binary file added PSX2PS4-GUI/DLL/PSXRFD.dll
Binary file not shown.
1,056 changes: 1,056 additions & 0 deletions PSX2PS4-GUI/Form/Main.Designer.vb

Large diffs are not rendered by default.

8,939 changes: 8,939 additions & 0 deletions PSX2PS4-GUI/Form/Main.resx

Large diffs are not rendered by default.

318 changes: 318 additions & 0 deletions PSX2PS4-GUI/Form/Main.vb
@@ -0,0 +1,318 @@
Imports System.IO
Imports System.Reflection.Emit
Imports System.Threading

Public Class Main
Private Sub Main_Load(sender As Object, e As EventArgs) Handles MyBase.Load
HopeSwitch2.Checked = My.Settings.AC
HopeSwitch3.Checked = My.Settings.AP
HopeSwitch8.Checked = My.Settings.P5C
PictureBox1.AllowDrop = True
PictureBox2.AllowDrop = True
checknet()
Directory.CreateDirectory("bin\lang")
'Directory.CreateDirectory("bin\configs")
'Directory.CreateDirectory("bin\LUA")
Directory.CreateDirectory("bin\covers")
Directory.CreateDirectory("bin\emulators")
'Directory.CreateDirectory("bin\info")

End Sub

Sub checknet()
Try
IO.File.WriteAllText("s.bat", "dotnet --list-runtimes > r.txt")
Shell("s.bat", AppWinStyle.Hide, True)
Dim r As String = IO.File.ReadAllText("r.txt")
If r.Contains("Microsoft.NETCore.App 6") Then
IO.File.Delete("r.txt")
IO.File.Delete("s.bat")
Else
MsgBox(".net 6.0 Runtime not found please install it first !", MsgBoxStyle.Critical)
Me.Invoke(Sub() Me.WindowState = FormWindowState.Minimized)
Shell("winget install Microsoft.DotNet.DesktopRuntime.6 -h", AppWinStyle.NormalFocus, True)
Me.Invoke(Sub() Me.WindowState = FormWindowState.Normal)

IO.File.Delete("r.txt")
IO.File.Delete("s.bat")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
MsgBox("Can't install .NET 6 using winget" & vbCr & "Please intall the Desktop Runtime manually.", MsgBoxStyle.Critical)
Process.Start("https://download.visualstudio.microsoft.com/download/pr/4c5e26cf-2512-4518-9480-aac8679b0d08/523f1967fd98b0cf4f9501855d1aa063/windowsdesktop-runtime-6.0.13-win-x64.exe")
IO.File.Delete("r.txt")
IO.File.Delete("s.bat")
'Me.Close()
End Try


End Sub

Private Sub TextBox1_DragEnter(sender As Object, e As DragEventArgs) Handles TextBox1.DragEnter

End Sub

Private Sub TextBox1_DragDrop(sender As Object, e As DragEventArgs) Handles TextBox1.DragDrop


End Sub

Private Sub ToolStripComboBox1_LostFocus(sender As Object, e As EventArgs) Handles ToolStripComboBox1.LostFocus
My.Settings.KI = ToolStripComboBox1.Text
My.Settings.Save()
End Sub

Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs)
RichTextBox1.SelectionStart = RichTextBox1.Text.Length
RichTextBox1.ScrollToCaret()
End Sub

Private Sub BigLabel1_DragDrop(sender As Object, e As DragEventArgs) Handles BigLabel1.DragDrop
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
Dim i = 0
TextBox1.Text = ""
'Label15.Text = "Disc number: 0"
For Each path In files
If i = 5 Then
MsgBox("5 ISO/BIN LIMIT !!!", MsgBoxStyle.Critical, "PSX2PS4-GUI")
Else
TextBox1.Text = TextBox1.Text & files(i) & vbCrLf
i += 1
End If

Next
Dim fl = Split(TextBox1.Text, vbCrLf)
'Label15.Text = Label15.Text.Replace("Disc number: 0", "Disc number: " & fl.Length - 1)
Dim b As Thread = New Thread(Sub() ExtractPSX.info(fl(0), Me))
b.IsBackground = True
b.SetApartmentState(ApartmentState.STA)
b.Start()
End Sub

Private Sub BigLabel1_DragEnter(sender As Object, e As DragEventArgs) Handles BigLabel1.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
End Sub

Private Sub TabPage5_DragDrop(sender As Object, e As DragEventArgs) Handles TabPage5.DragDrop

End Sub

Private Sub TabPage5_DragEnter(sender As Object, e As DragEventArgs) Handles TabPage5.DragEnter

End Sub

Private Sub RichTextBox1_TextChanged_1(sender As Object, e As EventArgs) Handles RichTextBox1.TextChanged
RichTextBox1.SelectionStart = RichTextBox1.Text.Length
RichTextBox1.ScrollToCaret()
End Sub

Private Sub PictureBox3_DragDrop(sender As Object, e As DragEventArgs) Handles PictureBox3.DragDrop
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
Dim i = 0
TextBox1.Text = ""
'Label15.Text = "Disc number: 0"
For Each path In files
If i = 5 Then
MsgBox("5 ISO/BIN LIMIT !!!", MsgBoxStyle.Critical, "PSX2PS4-GUI")
Else
TextBox1.Text = TextBox1.Text & files(i) & vbCrLf
i += 1
End If

Next
Dim fl = Split(TextBox1.Text, vbCrLf)
'Label15.Text = Label15.Text.Replace("Disc number: 0", "Disc number: " & fl.Length - 1)
Dim b As Thread = New Thread(Sub() ExtractPSX.info(fl(0), Me))
b.IsBackground = True
b.SetApartmentState(ApartmentState.STA)
b.Start()
End Sub

Private Sub PictureBox3_DragEnter(sender As Object, e As DragEventArgs) Handles PictureBox3.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
End Sub

Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click

End Sub

Private Sub BigLabel1_DoubleClick(sender As Object, e As EventArgs) Handles BigLabel1.DoubleClick

End Sub

Private Sub LinkLabel9_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel9.LinkClicked
Process.Start("https://github.com/xlenore")
End Sub

Private Sub LinkLabel8_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs)
Process.Start("https://github.com/extramaster")
End Sub

Private Sub LinkLabel3_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs)
Process.Start("https://github.com/hessu")
End Sub

Private Sub LinkLabel4_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs)
Process.Start("https://github.com/a1346054")
End Sub

Private Sub LinkLabel5_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs)
Process.Start("https://github.com/yanalunaterra")
End Sub

Private Sub LinkLabel6_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs)
Process.Start("https://github.com/h3xx")
End Sub

Private Sub LinkLabel7_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs)
Process.Start("https://github.com/amroamroamro")
End Sub

Private Sub LinkLabel2_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
Process.Start("https://twitter.com/Markus00095")
End Sub

Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Process.Start("https://twitter.com/NazkyYT")
Process.Start("https://ko-fi.com/nazkyyt")
End Sub


Private Sub HopeSwitch5_CheckedChanged(sender As Object, e As EventArgs) Handles HopeSwitch5.CheckedChanged
If HopeSwitch5.Checked = True Then
MsgBox("In the next update ;)", MsgBoxStyle.Information)
HopeSwitch5.Checked = False
End If
End Sub

Private Sub HopeSwitch4_CheckedChanged(sender As Object, e As EventArgs) Handles HopeSwitch4.CheckedChanged
If HopeSwitch4.Checked = True Then
MsgBox("In the next update ;)", MsgBoxStyle.Information)
HopeSwitch4.Checked = False
End If
End Sub

Private Sub HopeSwitch1_CheckedChanged(sender As Object, e As EventArgs)

End Sub

Private Sub HopeSwitch2_CheckedChanged(sender As Object, e As EventArgs) Handles HopeSwitch2.CheckedChanged

End Sub

Private Sub HopeSwitch2_Click(sender As Object, e As EventArgs) Handles HopeSwitch2.Click
If HopeSwitch2.Checked = False Then
My.Settings.AC = False
Else
My.Settings.AC = True
End If
My.Settings.Save()
End Sub

Private Sub PictureBox1_DragDrop(sender As Object, e As DragEventArgs) Handles PictureBox1.DragDrop
Try
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
Catch ex As Exception

End Try

End Sub

Private Sub PictureBox1_DragEnter(sender As Object, e As DragEventArgs) Handles PictureBox1.DragEnter
Try
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
For Each path In files

PictureBox1.Image = Image.FromFile(path)
Next
Catch ex As Exception

End Try

End Sub

Private Sub PictureBox2_DragDrop(sender As Object, e As DragEventArgs) Handles PictureBox2.DragDrop
Try
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
Catch ex As Exception

End Try

End Sub

Private Sub PictureBox2_DragEnter(sender As Object, e As DragEventArgs) Handles PictureBox2.DragEnter
Try
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
For Each path In files

PictureBox2.Image = Image.FromFile(path)
Next
Catch ex As Exception

End Try

End Sub

Private Sub HopeSwitch3_CheckedChanged(sender As Object, e As EventArgs) Handles HopeSwitch3.CheckedChanged

End Sub

Private Sub BigLabel1_Click(sender As Object, e As EventArgs) Handles BigLabel1.Click

End Sub

Private Sub RoyalButton1_Click(sender As Object, e As EventArgs) Handles RoyalButton1.Click
Try
Dim b As Thread = New Thread(Sub() PSX2PS4.CreatePKG(TextBox1.Text, My.Settings.GID, My.Settings.GN, RichTextBox1, Me))
b.IsBackground = True
b.SetApartmentState(ApartmentState.STA)
b.Start()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
End Sub

Private Sub HopeSwitch8_CheckedChanged(sender As Object, e As EventArgs) Handles HopeSwitch8.CheckedChanged

End Sub

Private Sub HopeSwitch3_Click(sender As Object, e As EventArgs) Handles HopeSwitch3.Click
If HopeSwitch3.Checked = True Then
My.Settings.KI = True
Else
My.Settings.KI = False
End If
My.Settings.Save()
End Sub

Private Sub HopeSwitch8_Click(sender As Object, e As EventArgs) Handles HopeSwitch8.Click
If HopeSwitch8.Checked = True Then
My.Settings.P5C = True
MsgBox("This is a experimental settings using a old ps1 emulator, compatibility are maybe not the best ! but at least it's working on PS5", MsgBoxStyle.Exclamation)
Else
My.Settings.P5C = False
End If
My.Settings.Save()
End Sub

Private Sub PictureBox1_DoubleClick(sender As Object, e As EventArgs) Handles PictureBox1.DoubleClick
Try
Dim ic As New OpenFileDialog
ic.Filter = "Game cover |*.png|*.jpg"
ic.Title = "Select a cover for the game"
If ic.ShowDialog = DialogResult.OK Then
PictureBox1.Image = Image.FromFile(ic.FileName)
End If
Catch ex As Exception

End Try
End Sub
End Class

0 comments on commit a5280ae

Please sign in to comment.