Skip to content
This repository was archived by the owner on Jun 13, 2026. It is now read-only.

Commit 9d95cb0

Browse files
committed
New features, improvements and fixes
1 parent 6def37b commit 9d95cb0

62 files changed

Lines changed: 4971 additions & 1168 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
bin/
1+
*.suo
2+
*.user
3+
.vs
4+
bin
5+
obj
6+
packages

PSX XMB Manager/Application.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Application x:Class="Application"
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:PSX_XMB_Manager"
5-
StartupUri="NewMainWindow.xaml">
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:PSX_XMB_Manager"
5+
StartupUri="NewMainWindow.xaml">
66
<Application.Resources>
77

88
</Application.Resources>
File renamed without changes.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Imports System.Drawing
2+
Imports System.Drawing.Imaging
3+
4+
Imports MColor = System.Windows.Media.Color
5+
Imports DColor = System.Drawing.Color
6+
7+
Public Class ImageUtils
8+
9+
Private Shared Function CalcColorSwap(_base As Byte, _new As Byte) As Single
10+
Return (_new - CInt(_base)) / 255.0!
11+
End Function
12+
13+
Public Shared Function RecolorImage(inBMP As Bitmap, baseColor As MColor, newColor As MColor) As Bitmap
14+
Dim NewBitmap As New Bitmap(inBMP.Width, inBMP.Height)
15+
Dim ColorTransformation As New ColorMatrix(New Single()() {
16+
New Single() {1, 0, 0, 0, 0},
17+
New Single() {0, 1, 0, 0, 0},
18+
New Single() {0, 0, 1, 0, 0},
19+
New Single() {0, 0, 0, 1, 0},
20+
New Single() {CalcColorSwap(baseColor.R, newColor.R), CalcColorSwap(baseColor.G, newColor.G), CalcColorSwap(baseColor.B, newColor.B), 0, 1}
21+
})
22+
23+
Dim NewImageAttributes As New ImageAttributes()
24+
NewImageAttributes.SetColorMatrix(ColorTransformation)
25+
26+
Using NewGraphics As Graphics = Graphics.FromImage(NewBitmap)
27+
NewGraphics.CompositingQuality = Drawing2D.CompositingQuality.HighQuality
28+
NewGraphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
29+
NewGraphics.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic
30+
NewGraphics.DrawImage(inBMP, New Rectangle(0, 0, inBMP.Width, inBMP.Height), 0, 0, inBMP.Width, inBMP.Height, GraphicsUnit.Pixel, NewImageAttributes)
31+
End Using
32+
33+
Return NewBitmap
34+
End Function
35+
36+
'Converts System.Drawing.Color -> System.Windows.Media.Color
37+
Public Shared Function ToMediaColor(color As DColor) As MColor
38+
Return MColor.FromArgb(color.A, color.R, color.G, color.B)
39+
End Function
40+
41+
End Class
42+

PSX XMB Manager/Classes/PS1Game.vb

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
Public Class PS1Game
2+
3+
Private _GameTitle As String
4+
Private _GameID As String
5+
Private _GameSize As String
6+
Private _GameRegion As String
7+
Private _GameFilePath As String
8+
Private _GameFolderPath As String
9+
Private _GameCoverSource As ImageSource
10+
Private _GameGenre As String
11+
Private _GameDescription As String
12+
Private _GameReleaseDate As String
13+
Private _GamePublisher As String
14+
Private _GameDeveloper As String
15+
16+
Public Property GameTitle As String
17+
Get
18+
Return _GameTitle
19+
End Get
20+
Set
21+
_GameTitle = Value
22+
End Set
23+
End Property
24+
25+
Public Property GameID As String
26+
Get
27+
Return _GameID
28+
End Get
29+
Set
30+
_GameID = Value
31+
End Set
32+
End Property
33+
34+
Public Property GameSize As String
35+
Get
36+
Return _GameSize
37+
End Get
38+
Set
39+
_GameSize = Value
40+
End Set
41+
End Property
42+
43+
Public Property GameRegion As String
44+
Get
45+
Return _GameRegion
46+
End Get
47+
Set
48+
_GameRegion = Value
49+
End Set
50+
End Property
51+
52+
Public Property GameFilePath As String
53+
Get
54+
Return _GameFilePath
55+
End Get
56+
Set
57+
_GameFilePath = Value
58+
End Set
59+
End Property
60+
61+
Public Property GameFolderPath As String
62+
Get
63+
Return _GameFolderPath
64+
End Get
65+
Set
66+
_GameFolderPath = Value
67+
End Set
68+
End Property
69+
70+
Public Property GameCoverSource As ImageSource
71+
Get
72+
Return _GameCoverSource
73+
End Get
74+
Set
75+
_GameCoverSource = Value
76+
End Set
77+
End Property
78+
79+
Public Property GameGenre As String
80+
Get
81+
Return _GameGenre
82+
End Get
83+
Set
84+
_GameGenre = Value
85+
End Set
86+
End Property
87+
88+
Public Property GameDeveloper As String
89+
Get
90+
Return _GameDeveloper
91+
End Get
92+
Set
93+
_GameDeveloper = Value
94+
End Set
95+
End Property
96+
97+
Public Property GamePublisher As String
98+
Get
99+
Return _GamePublisher
100+
End Get
101+
Set
102+
_GamePublisher = Value
103+
End Set
104+
End Property
105+
106+
Public Property GameReleaseDate As String
107+
Get
108+
Return _GameReleaseDate
109+
End Get
110+
Set
111+
_GameReleaseDate = Value
112+
End Set
113+
End Property
114+
115+
Public Property GameDescription As String
116+
Get
117+
Return _GameDescription
118+
End Get
119+
Set
120+
_GameDescription = Value
121+
End Set
122+
End Property
123+
124+
Public Shared Function GetRegionChar(GameID As String) As String
125+
If GameID.StartsWith("SLES", StringComparison.OrdinalIgnoreCase) Then
126+
Return "P"
127+
ElseIf GameID.StartsWith("SCES", StringComparison.OrdinalIgnoreCase) Then
128+
Return "P"
129+
ElseIf GameID.StartsWith("SLUS", StringComparison.OrdinalIgnoreCase) Then
130+
Return "U"
131+
ElseIf GameID.StartsWith("SCUS", StringComparison.OrdinalIgnoreCase) Then
132+
Return "U"
133+
ElseIf GameID.StartsWith("SLPS", StringComparison.OrdinalIgnoreCase) Then
134+
Return "J"
135+
ElseIf GameID.StartsWith("SLPM", StringComparison.OrdinalIgnoreCase) Then
136+
Return "J"
137+
ElseIf GameID.StartsWith("SCCS", StringComparison.OrdinalIgnoreCase) Then
138+
Return "J"
139+
ElseIf GameID.StartsWith("SLKA", StringComparison.OrdinalIgnoreCase) Then
140+
Return "J"
141+
Else
142+
Return ""
143+
End If
144+
End Function
145+
146+
End Class
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,28 @@
161161
End Set
162162
End Property
163163

164+
Public Shared Function GetGameRegionByGameID(GameID As String) As String
165+
If GameID.StartsWith("SLES", StringComparison.OrdinalIgnoreCase) Then
166+
Return "E"
167+
ElseIf GameID.StartsWith("SCES", StringComparison.OrdinalIgnoreCase) Then
168+
Return "E"
169+
ElseIf GameID.StartsWith("SLUS", StringComparison.OrdinalIgnoreCase) Then
170+
Return "U"
171+
ElseIf GameID.StartsWith("SCUS", StringComparison.OrdinalIgnoreCase) Then
172+
Return "U"
173+
ElseIf GameID.StartsWith("SCPS", StringComparison.OrdinalIgnoreCase) Then
174+
Return "J"
175+
ElseIf GameID.StartsWith("SLPS", StringComparison.OrdinalIgnoreCase) Then
176+
Return "J"
177+
ElseIf GameID.StartsWith("SLPM", StringComparison.OrdinalIgnoreCase) Then
178+
Return "J"
179+
ElseIf GameID.StartsWith("SCCS", StringComparison.OrdinalIgnoreCase) Then
180+
Return "J"
181+
ElseIf GameID.StartsWith("SLKA", StringComparison.OrdinalIgnoreCase) Then
182+
Return "J"
183+
Else
184+
Return ""
185+
End If
186+
End Function
187+
164188
End Class
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,57 @@
173173

174174
End Structure
175175

176+
Public Enum AssetType
177+
Audio
178+
DIC
179+
Font
180+
Image
181+
Video
182+
XML
183+
End Enum
184+
185+
Public Structure AssetListViewItem
186+
Private _AssetFileName As String
187+
Private _AssetFilePath As String
188+
Private _Type As AssetType
189+
Private _Icon As ImageSource
190+
191+
Public Property AssetFileName As String
192+
Get
193+
Return _AssetFileName
194+
End Get
195+
Set
196+
_AssetFileName = Value
197+
End Set
198+
End Property
199+
200+
Public Property AssetFilePath As String
201+
Get
202+
Return _AssetFilePath
203+
End Get
204+
Set
205+
_AssetFilePath = Value
206+
End Set
207+
End Property
208+
209+
Public Property Type As AssetType
210+
Get
211+
Return _Type
212+
End Get
213+
Set
214+
_Type = Value
215+
End Set
216+
End Property
217+
218+
Public Property Icon As ImageSource
219+
Get
220+
Return _Icon
221+
End Get
222+
Set
223+
_Icon = Value
224+
End Set
225+
End Property
226+
227+
End Structure
228+
176229
End Class
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Public Class Translations
2+
3+
Public Class TranslationRequest
4+
Private _q As String
5+
Private _source As String
6+
Private _target As String
7+
8+
Public Property q As String
9+
Get
10+
Return _q
11+
End Get
12+
Set
13+
_q = Value
14+
End Set
15+
End Property
16+
17+
Public Property source As String
18+
Get
19+
Return _source
20+
End Get
21+
Set
22+
_source = Value
23+
End Set
24+
End Property
25+
26+
Public Property target As String
27+
Get
28+
Return _target
29+
End Get
30+
Set
31+
_target = Value
32+
End Set
33+
End Property
34+
End Class
35+
36+
Public Class DetectedLanguage
37+
Private _confidence As Double
38+
Private _language As String
39+
40+
Public Property confidence As Double
41+
Get
42+
Return _confidence
43+
End Get
44+
Set
45+
_confidence = Value
46+
End Set
47+
End Property
48+
49+
Public Property language As String
50+
Get
51+
Return _language
52+
End Get
53+
Set
54+
_language = Value
55+
End Set
56+
End Property
57+
End Class
58+
59+
Public Class ReceivedTranslation
60+
Private _translatedText As String
61+
Private _detectedLanguage As DetectedLanguage
62+
63+
Public Property detectedLanguage As DetectedLanguage
64+
Get
65+
Return _detectedLanguage
66+
End Get
67+
Set
68+
_detectedLanguage = Value
69+
End Set
70+
End Property
71+
72+
Public Property translatedText As String
73+
Get
74+
Return _translatedText
75+
End Get
76+
Set
77+
_translatedText = Value
78+
End Set
79+
End Property
80+
End Class
81+
82+
End Class

0 commit comments

Comments
 (0)