Merge branch 'vnext'

This commit is contained in:
13xforever
2025-08-23 00:51:47 +05:00
4 changed files with 46 additions and 30 deletions

View File

@@ -180,6 +180,7 @@ internal partial class LogParser
["LDR: Path:"] = DigitalPathLdr(),
["LDR: Boot path:"] = BootPathInBodyLdr(),
["SYS: Game:"] = GamePathSys(),
["SYS: Title was set from"] = TitleWasSet(),
["SYS: Path:"] = DigitalPathSys(),
["SYS: Boot path:"] = BootPathInBodySys(),
["Elf path:"] = ElfPath(),

View File

@@ -237,6 +237,8 @@ internal partial class LogParser
[GeneratedRegex(@"Boot path: (?<ldr_boot_path_full>.*(?<ldr_boot_path>/dev_hdd0/game/(?<ldr_boot_path_serial>[^/\r\n]+)).*|[^\r\n]*)\r?$", DefaultOptions)]
private static partial Regex BootPathInBodyLdr();
[GeneratedRegex(@"Game: (?<ldr_game_full>.*(?<ldr_game>/dev_hdd0/game/(?<ldr_game_serial>[^/\r\n]+)).*|[^\r\n]*)\r?$", DefaultOptions)]
private static partial Regex TitleWasSet();
[GeneratedRegex(@"Title was set from (?<title_was_set_from>.+) to (?<title_was_set_to>.+)\r?$", DefaultOptions)]
private static partial Regex GamePathSys();
[GeneratedRegex(@"Path: (?<ldr_path_full>.*(?<ldr_path>/dev_hdd0/game/(?<ldr_path_serial>[^/\r\n]+)).*|[^\r\n]*)\r?$", DefaultOptions)]
private static partial Regex DigitalPathSys();

View File

@@ -651,7 +651,12 @@ internal static partial class LogParserResult
else if (int.TryParse(match.Groups["verification_error_hex"].Value, NumberStyles.HexNumber, NumberFormatInfo.InvariantInfo, out var hexCode))
win32ErrorCodes.Add(hexCode);
}
builder.AddField(sectionName, $"```\n{fatalError.Trim(EmbedPager.MaxFieldLength - 8)}\n```");
var trimIdx = fatalError.IndexOf(" Called from");
var errorTxt = fatalError;
if (trimIdx > -1)
errorTxt = fatalError[..trimIdx];
errorTxt = errorTxt.Trim(EmbedPager.MaxFieldLength - 7);
builder.AddField(sectionName, $"```\n{errorTxt}```");
}
}
}

View File

@@ -683,41 +683,49 @@ internal static partial class LogParserResult
private static void CheckJojoSettings(string serial, LogParseState state, List<string> notes, Dictionary<string, int> ppuPatches, HashSet<string> ppuHashes, List<string> generalNotes)
{
if (!AllStarBattleIds.Contains(serial) && serial is not ("BLJS10318" or "NPJB00753"))
return;
var items = state.CompletedCollection!;
if (AllStarBattleIds.Contains(serial) || serial is "BLJS10318" or "NPJB00753")
if (items["audio_buffering"] == EnabledMark && items["audio_buffer_duration"] != "20")
notes.Add(" If you experience audio issues, set `Audio Buffer Duration` to `20ms`");
else if (items["audio_buffering"] == DisabledMark)
notes.Add(" If you experience audio issues, check `Enable Buffering` and set `Audio Buffer Duration` to `20ms`");
if (serial is "BLUS31405" or "BLJS10318"
&& items["vblank_rate"] is string vbrStr
&& int.TryParse(vbrStr, out var vbr))
{
if (items["audio_buffering"] == EnabledMark && items["audio_buffer_duration"] != "20")
notes.Add(" If you experience audio issues, set `Audio Buffer Duration` to `20ms`");
else if (items["audio_buffering"] == DisabledMark)
notes.Add(" If you experience audio issues, check `Enable Buffering` and set `Audio Buffer Duration` to `20ms`");
if (serial is "BLUS31405" or "BLJS10318"
&& items["vblank_rate"] is string vbrStr
&& int.TryParse(vbrStr, out var vbr))
if (ppuPatches.Count > 0)
{
if (ppuPatches.Any())
{
if (vbr == 60)
notes.Add(" `VBlank Rate` is not set; FPS is limited to 30");
else if (vbr == 120)
notes.Add("✅ Settings are set for the 60 FPS patch");
else
notes.Add($"⚠️ Settings are configured for the {vbr / 2} FPS patch, which is unsupported");
}
if (vbr is 60)
notes.Add(" `VBlank Rate` is not set; FPS is limited to 30");
else if (vbr is 120)
notes.Add("✅ Settings are set for the 60 FPS patch");
else
{
if (vbr > 60)
notes.Add(" Unlocking FPS requires game patch");
if (ppuHashes.Overlaps(KnownJojoPatches))
generalNotes.Add($" This game has an FPS unlock patch");
}
notes.Add($"⚠️ Settings are configured for the {vbr / 2} FPS patch, which is unsupported");
}
else
{
if (vbr > 60)
notes.Add(" Unlocking FPS requires game patch");
if (ppuHashes.Overlaps(KnownJojoPatches))
generalNotes.Add(" This game has an FPS unlock patch");
}
}
if (serial == "BLUS31405"
&& items["compat_database_path"] is string compatDbPath
&& compatDbPath.Contains("JoJo ASB Emulator v.04")
&& state.CompleteMultiValueCollection!["rap_file"].Any())
generalNotes.Add("🤔 Very interesting version of the game you got there");
if (serial == "BLUS31405"
&& items["compat_database_path"] is string compatDbPath
&& compatDbPath.Contains("JoJo ASB Emulator v.04")
&& state.CompleteMultiValueCollection!["rap_file"] is {Length: >0})
generalNotes.Add("🤔 Very interesting version of the game you got there");
if (serial is "BLJS10318" or "NPJB00753"
&& items["title_was_set_from"] is {Length: >0} oldTitle
&& items["title_was_set_to"] is {Length: >0} newTitle
&& oldTitle != newTitle)
{
generalNotes.Add("⚠️ Unofficial translation modification is not supported");
}
}