bonusCD support

This commit is contained in:
sShemet
2025-09-17 15:32:43 +05:00
parent cc52ac29a8
commit b9b8e197a8
12 changed files with 166 additions and 14 deletions

View File

@@ -81,7 +81,25 @@
pointer += 30
Loop
'32 - floors count
'36-52 - floors ids (by 1 byte)
'FLOOR STRUCTURE FROM 52 (40 bytes chunks)
'{
'int16 + int16 - Map width and (Heigth / 2) in words, or normal minimap by 1 byte
'int32 - FFFF0000
'int32 - Flood id
'int32 - User minimap offset
'int32 - Floor objects geometry offset
'int32 - User normal map offset
'int32 - Some vars offset 1
'int32 - Some vars offset 2 (coords??)
'int32 - Some vars offset 3
'int32 - Floor places strings offset (int16 - status, char[30] - text)
'}
'80 - Minimap offset
'84 - DUNGEON MAIN MAP offset
'88 - Dungeon normal usermap offset
End Sub

View File

@@ -265,7 +265,8 @@ Partial Class Form1
Me.UserPath.Name = "UserPath"
Me.UserPath.Size = New System.Drawing.Size(300, 20)
Me.UserPath.TabIndex = 0
Me.UserPath.Text = "D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\Persona 2 - Batsu USER.bin"
Me.UserPath.Text = "D:\Games\PSX\Persona 2 - Batsu (NTSC-J) [SLPS-02825]\EXTRA_CD\Sumaru TV Special P" &
"review Disc (Japan).bin"
'
'Label3
'

View File

@@ -207,7 +207,7 @@ Public Class Form1
Dim xy = ""
If r.Type = 2 Then xy = ", x" & r.x & "y" & r.y & "w" & r.w & "h" & r.h
If r.Type = 2 Then xy = ", Vx" & r.x & " Vy" & r.y & ", w" & r.w & " h" & r.h
Select Case r.Compr
@@ -423,8 +423,19 @@ Public Class Form1
End Function
Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown, SelBinFiles.KeyDown
If e.KeyCode = Keys.E Then ExportUnrleFile.PerformClick()
Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown, SelBinFiles.KeyDown, CDFileList.KeyDown
If e.KeyCode = Keys.E Then
If SelBinFiles.SelectedIndex = -1 Then
If CDFileList.SelectedIndex = -1 Then Exit Sub
Dim a = New ISOTools
Dim fil = a.getCDfile(getFilnam, files1(CDFileList.SelectedIndex).Sector, files1(CDFileList.SelectedIndex).Sizw)
Dim filename = ExportBinPath.Text & CDFileList.SelectedIndex.ToString("D4") & ".bin"
My.Computer.FileSystem.WriteAllBytes(filename, fil.ToArray, False)
Savedlbl.Text = "SAVED TO " & filename
Else
ExportUnrleFile.PerformClick()
End If
End If
End Sub
@@ -494,7 +505,7 @@ Public Class Form1
CDFileList.Items.Clear()
If Not File.Exists(filnam) Then MsgBox("File not found! Please select proper BIN file and check path!", MsgBoxStyle.Critical) : Exit Sub
If FileLen(filnam) < 621900000 Then MsgBox("File is not proper PERSONA2 IS bin image! Check it!", MsgBoxStyle.Critical) : Exit Sub
If FileLen(filnam) < 621900000 Then MsgBox("File is not proper PERSONA2 EP bin image! Check it!", MsgBoxStyle.Critical) : Exit Sub
'Reading Files Descriptions

View File

@@ -116,11 +116,12 @@ Public Class ISOTools
Public Function makeFileList(ByVal ISOname As String)
Dim a = New List(Of fileInfo)
Dim FilesSectors = getCDfile(ISOname, &H17, &H1B88).ToArray
Dim maxFiles = 880
Dim FilesSectors = getCDfile(ISOname, &H17, &H4000).ToArray
If ISOname.Contains("KUDOS") Then FilesSectors = getCDfile(ISOname, &H31, &H1B88).ToArray
If ISOname.Contains("Sumaru TV") Then maxFiles = 1124
For x = 0 To 880
For x = 0 To maxFiles
a.Add(New fileInfo With {.FileID = x, .Sector = Form1.Read32bitNum(FilesSectors, x * 8), .Sizw = Form1.Read32bitNum(FilesSectors, x * 8 + 4)})
Next

View File

@@ -1771,7 +1771,8 @@ endlineTest:
TextLine &= Chr(bytes(curTextAddr))
curTextAddr += 1
Next
If charNum And 1 Then curTextAddr += 1 'if AND1 - +1
'If charNum And 1 Then curTextAddr += 1 'if AND1 - +1
curTextAddr += charNum And 1 'if AND1 - +1
Continue Do
End If
If c And &H1000 Then
@@ -1779,7 +1780,7 @@ endlineTest:
If c = &H1101 Then TextLine &= " / "
curTextAddr += (c >> 8 And &HF) * 2 : Continue Do 'BitShift / And / Jump command length
Else
'TextLine &= Chr(c And &HFF)
TextLine &= Form1.chars(c)
End If
curTextAddr += 2

View File

@@ -1,4 +1,4 @@

MDEC_CODE
@@ -675,9 +675,9 @@ ExtraPack
......
LastExtra
TimCLUT1
TimCLUT2
TimCLUT3
IntrFcTIM
TitleCode
TitleScrn
@@ -879,3 +879,123 @@ Vid_Intro