forked from RPCS3/discord-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogParserResultFormatter.WeirdSettingsSection.cs
More file actions
1493 lines (1367 loc) · 71 KB
/
Copy pathLogParserResultFormatter.WeirdSettingsSection.cs
File metadata and controls
1493 lines (1367 loc) · 71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System.Collections.Specialized;
using System.Globalization;
using System.Text.RegularExpressions;
using CompatApiClient.Utils;
using CompatBot.EventHandlers.LogParsing.POCOs;
namespace CompatBot.Utils.ResultFormatters;
internal static partial class LogParserResult
{
[GeneratedRegex(@"Radeon RX 5\d{3}", RegexOptions.IgnoreCase)]
private static partial Regex RadeonRx5xxPattern();
private static void BuildWeirdSettingsSection(DiscordEmbedBuilder builder, LogParseState state, List<string> generalNotes)
{
var items = state.CompletedCollection!;
var multiItems = state.CompleteMultiValueCollection!;
var notes = new List<string>();
var serial = items["serial"] ?? "";
_ = int.TryParse(items["thread_count"], out var threadCount);
if (items["disable_logs"] == EnabledMark)
notes.Add("❗ `Silence All Logs` is enabled, please disable and upload a new log");
else if (!string.IsNullOrWhiteSpace(items["log_disabled_channels"])
|| !string.IsNullOrWhiteSpace(items["log_disabled_channels_multiline"]))
notes.Add("❗ Some logging priorities were modified, please reset and upload a new log");
var hasTsx = items["cpu_extensions"]?.Contains("TSX") ?? false;
var hasTsxFa = items["cpu_extensions"]?.Contains("TSX-FA") ?? false;
items["has_tsx"] = hasTsx ? EnabledMark : DisabledMark;
items["has_tsx_fa"] = hasTsxFa ? EnabledMark : DisabledMark;
if (TryGetRpcs3Version(items, out var buildVersion)
&& buildVersion < TsxFaFixedVersion)
{
if (items["enable_tsx"] == "Disabled" && hasTsx && !hasTsxFa)
notes.Add("ℹ️ TSX support is disabled");
else if (items["enable_tsx"] == "Enabled" && hasTsxFa)
notes.Add("⚠️ Disable TSX support if you experience performance issues");
}
else
{
if (items["enable_tsx"] == "Disabled" && hasTsx)
notes.Add("ℹ️ TSX support is disabled");
}
/*
if (items["spu_lower_thread_priority"] == EnabledMark && threadCount > 4)
notes.Add("❓ `Lower SPU thread priority` is enabled on a CPU with enough threads");
*/
if (items["cpu_model"] is string cpu)
{
if (cpu.StartsWith("AMD")
&& cpu.Contains("Ryzen")
&& items["os_type"] != "Linux")
{
if (Version.TryParse(items["os_version"], out var winVer)
&& winVer is { Major: <10 } or { Major: 10, Build: <18362 }) // everything before win 10 1903
{
if (items["thread_scheduler"] == "OS")
{
if (buildVersion >= IntelThreadSchedulerBuildVersion)
notes.Add("⚠️ Please enable RPCS3 `Thread Scheduler` option in the CPU Settings");
else
notes.Add("⚠️ Please enable `Thread Scheduler` in the CPU Settings");
}
else
notes.Add("ℹ️ Changing `Thread Scheduler` option may or may not increase performance");
}
else
notes.Add("ℹ️ Changing `Thread Scheduler` option may or may not increase performance");
}
else if (cpu.StartsWith("Intel")
&& threadCount > 11
&& buildVersion >= IntelThreadSchedulerBuildVersion)
notes.Add("ℹ️ Changing `Thread Scheduler` option may or may not increase performance");
}
var isAppleGpu = items["gpu_info"] is string gpuInfoApple && gpuInfoApple.Contains("Apple", StringComparison.OrdinalIgnoreCase);
var canUseRelaxedZcull = items["renderer"] is not "Vulkan" || multiItems["vk_ext"].Contains("VK_EXT_depth_range_unrestricted");
if (items["llvm_arch"] is string llvmArch)
notes.Add($"❓ LLVM target CPU architecture override is set to `{llvmArch.Sanitize(replaceBackTicks: true)}`");
if (items["renderer"] is "D3D12")
notes.Add("💢 Do **not** use DX12 renderer");
if (items["renderer"] is "OpenGL"
&& items["supported_gpu"] is EnabledMark
&& !GowHDIds.Contains(serial))
notes.Add("⚠️ `Vulkan` is the recommended `Renderer`");
if (items["renderer"] is "Vulkan")
{
if (items["supported_gpu"] is DisabledMark)
notes.Add("❌ Selected `Vulkan` device is not supported, please use `OpenGL` instead");
}
var selectedRes = items["resolution"];
var selectedRatio = items["aspect_ratio"];
if (!string.IsNullOrEmpty(selectedRes))
{
if (selectedRes == "1280x720" && items["game_category"] == "1P")
{
if (serial.Length > 3)
{
if (serial[2] == 'E')
{
if (selectedRes != "720x576")
notes.Add("⚠️ PAL PS1 Classics should use `Resolution` of `720x576`");
}
else
{
if (selectedRes != "720x480")
notes.Add("⚠️ NTSC PS1 Classics should use `Resolution` of `720x480`");
}
}
}
else if (selectedRes != "1280x720")
{
var supported = false;
var known = false;
if (items["game_supported_resolution_list"] is string supportedRes)
{
var supportedList = PsnMetaExtensions.GetSupportedResolutions(supportedRes);
supported = selectedRatio == "Auto"
? supportedList.Any(i => i.resolution == selectedRes)
: supportedList.Any(i => i.resolution == selectedRes && i.aspectRatio == selectedRatio);
known = true;
}
if (selectedRes == "1920x1080" && Known1080pIds.Contains(serial))
{
supported = true;
known = true;
}
if (known)
{
if (!supported)
notes.Add("❌ Selected `Resolution` is not supported, please set to recommended `1280x720`");
}
else if (items["game_category"] != "1P")
notes.Add("⚠️ `Resolution` was changed from the recommended `1280x720`");
var dimensions = selectedRes.Split("x");
if (dimensions.Length > 1
&& int.TryParse(dimensions[0], out var width)
&& int.TryParse(dimensions[1], out var height))
{
var ratio = Reduce(width, height);
var canBeWideOrSquare = width is 720 && height is 480 or 576;
if (ratio == (8, 5))
ratio = (16, 10);
if (selectedRatio is not null and not "Auto")
{
var arParts = selectedRatio.Split(':');
if (arParts.Length > 1
&& int.TryParse(arParts[0], out var arWidth)
&& int.TryParse(arParts[1], out var arHeight))
{
var arRatio = Reduce(arWidth, arHeight);
if (arRatio == (8, 5))
arRatio = (16, 10);
/*
if (items["game_category"] == "1P")
{
if (arRatio != (4, 3))
notes.Add("⚠️ PS1 Classics should use `Aspect Ratio` of 4:3");
}
else
*/
if (arRatio != ratio && !canBeWideOrSquare)
notes.Add($"⚠️ Selected `Resolution` has aspect ratio of {ratio.numerator}:{ratio.denominator}, but `Aspect Ratio` is set to {selectedRatio}");
}
}
else
{
if (canBeWideOrSquare)
notes.Add("ℹ️ Setting `Aspect Ratio` to `16:9` or `4:3` instead of `Auto` may improve compatibility");
else
notes.Add($"ℹ️ Setting `Aspect Ratio` to `{ratio.numerator}:{ratio.denominator}` instead of `Auto` may improve compatibility");
}
if (height < 720 && items["game_category"] != "1P")
notes.Add("⚠️ `Resolution` below 720p will not improve performance");
}
}
}
if (items["stretch_to_display"] == EnabledMark)
notes.Add("🤢 `Stretch to Display Area` is enabled");
var vertexCacheDisabled = items["vertex_cache"] == EnabledMark || items["mtrsx"] == EnabledMark;
if (KnownDisableVertexCacheIds.Contains(serial) && !vertexCacheDisabled)
notes.Add("⚠️ This game requires disabling `Vertex Cache` option");
if (multiItems["rsx_not_supported_feature"].Contains("alpha-to-one for multisampling"))
{
if (items["msaa"] is not null and not "Disabled")
generalNotes.Add("ℹ️ The driver or GPU does not support all required features for proper MSAA implementation, which may result in minor visual artifacts");
}
var isWireframeBugPossible = items["gpu_info"] is string gpuInfo
&& buildVersion < RdnaMsaaFixedVersion
&& RadeonRx5xxPattern().IsMatch(gpuInfo) // RX 590 is a thing 😔
&& !gpuInfo.Contains("RADV");
if (items["msaa"] is "Disabled")
{
if (!isWireframeBugPossible && !isAppleGpu)
notes.Add("ℹ️ `Anti-aliasing` is disabled, which may result in visual artifacts");
}
else if (items["msaa"] is not null)
{
if (isAppleGpu)
notes.Add("⚠️ `Anti-aliasing` is not supported for Apple GPUs, please disable");
else if (isWireframeBugPossible)
notes.Add("⚠️ Please disable `Anti-aliasing` if you experience wireframe-like visual artifacts");
}
var vsync = items["vsync"] == EnabledMark;
string? vkPm;
if (items["rsx_present_mode"] is string pm)
RsxPresentModeMap.TryGetValue(pm, out vkPm);
else
vkPm = null;
if (items["force_fifo_present"] == EnabledMark)
{
notes.Add("⚠️ Double-buffered VSync is forced");
vsync = true;
}
if (items["rsx_swapchain_mode"] is "2")
vsync = true;
if (vsync && items["frame_limit"] is string frameLimitStr)
{
if (frameLimitStr == "Auto")
notes.Add("ℹ️ Frame rate might be limited to 30 fps due to enabled VSync");
else if (double.TryParse(frameLimitStr, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out var frameLimit))
{
if (frameLimit is >30 and <60)
notes.Add("ℹ️ Frame rate might be limited to 30 fps due to enabled VSync");
else if (frameLimit < 30)
notes.Add("ℹ️ Frame rate might be limited to 15 fps due to enabled VSync");
else
notes.Add("ℹ️ Frame pacing might be affected due to VSync and Frame Limiter enabled at the same time");
}
}
if (!vsync && vkPm != "VK_PRESENT_MODE_IMMEDIATE_KHR")
{
var pmDesc = vkPm switch
{
"VK_PRESENT_MODE_MAILBOX_KHR" => "Fast Sync",
"VK_PRESENT_MODE_FIFO_KHR" => "Double-buffered VSync",
"VK_PRESENT_MODE_FIFO_RELAXED_KHR" => "Adaptive VSync",
_ => null,
};
if (pmDesc != null)
notes.Add($"ℹ️ `VSync` is disabled, but the drivers provided `{pmDesc}`");
}
if (items["async_texture_streaming"] == EnabledMark)
{
if (isAppleGpu)
{
notes.Add("⚠️ `Async Texture Streaming` is not supported on Apple GPUs");
}
else
{
if (items["async_queue_scheduler"] == "Device")
notes.Add("⚠️ If you experience visual artifacts, try setting `Async Queue Scheduler` to use `Host`");
notes.Add("⚠️ If you experience visual artifacts, try disabling `Async Texture Streaming`");
}
}
if (items["ppu_decoder"] is string ppuDecoder)
{
if (KnownGamesThatRequireInterpreter.Contains(serial))
{
if (ppuDecoder.Contains("Recompiler", StringComparison.InvariantCultureIgnoreCase))
notes.Add("⚠️ This game requires `PPU Decoder` to use `Interpreter (static)`");
}
else
{
if (ppuDecoder.Contains("Interpreter", StringComparison.InvariantCultureIgnoreCase))
notes.Add("⚠️ Please set `PPU Decoder` to use recompiler for better performance");
}
}
if (items["spu_decoder"] is string spuDecoder && spuDecoder.Contains("Interpreter", StringComparison.InvariantCultureIgnoreCase))
notes.Add("⚠️ Please set `SPU Decoder` to use recompiler for better performance");
if (items["accurate_getllar"] is EnabledMark)
notes.Add("ℹ️ `Accurate GETLLAR` is enabled");
if (items["accurate_putlluc"] is EnabledMark)
notes.Add("ℹ️ `Accurate PUTLLUC` is enabled");
if (items["accurate_rsx_reservation"] is EnabledMark)
notes.Add("ℹ️ `Accurate RSX Reservation Access` is enabled");
if (items["spu_events_busy_loop"] is EnabledMark && threadCount < 12)
notes.Add("⚠️ `SPU Events Busy Loop` is enabled on a CPU with few threads");
if (KnownGamesThatRequireAccurateXfloat.Contains(serial) && items["xfloat_mode"] is not "Accurate")
notes.Add("⚠️ `Accurate xfloat` is required for this game");
else if (items["xfloat_mode"] is "Accurate" && !KnownGamesThatRequireAccurateXfloat.Contains(serial))
notes.Add("⚠️ `Accurate xfloat` is not required, and significantly impacts performance");
else if (items["xfloat_mode"] is "Relaxed" or "Inaccurate" && !KnownNoApproximateXFloatIds.Contains(serial))
notes.Add("⚠️ `Approximate xfloat` is disabled, please enable");
else if (items["xfloat_mode"] is "Inaccurate" && !KnownNoRelaxedXFloatIds.Contains(serial))
notes.Add("⚠️ `Relaxed xfloat` is disabled, please enable");
if (items["resolution_scale"] is string resScale
&& int.TryParse(resScale, out var resScaleFactor))
{
if (resScaleFactor < 100)
notes.Add($"❓ `Resolution Scale` is `{resScale}%`; this will not increase performance");
if (resScaleFactor != 100
&& items["texture_scale_threshold"] is string thresholdStr
&& int.TryParse(thresholdStr, out var threshold)
&& threshold < 16
&& !KnownResScaleThresholdIds.Contains(serial))
{
notes.Add("⚠️ `Resolution Scale Threshold` below `16x16` may result in corrupted visuals and game crash");
}
if (resScaleFactor > 100
&& items["msaa"] is string msaa
&& msaa != "Disabled")
{
var level = "ℹ️";
if (resScaleFactor > 200)
level = "⚠️";
notes.Add($"{level} If you have missing UI elements or experience performance issues, decrease `Resolution Scale` or disable `Anti-aliasing`");
}
if (resScaleFactor > 300)
notes.Add("⚠️ Excessive `Resolution Scale` may impact performance");
}
var allPpuHashes = GetPatches(multiItems["ppu_patch"], false);
var ppuPatches = allPpuHashes.Where(kvp => kvp.Value > 0).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
var ppuHashes = new HashSet<string>(allPpuHashes.Keys, StringComparer.InvariantCultureIgnoreCase);
var patchNames = multiItems["patch_desc"];
if (items["write_color_buffers"] == DisabledMark
&& !string.IsNullOrEmpty(serial)
&& KnownWriteColorBuffersIds.Contains(serial))
{
if (DesIds.Contains(serial) && ppuPatches.Count != 0)
notes.Add("ℹ️ `Write Color Buffers` is disabled");
else
notes.Add("⚠️ `Write Color Buffers` is disabled, please enable");
}
if (items["vertex_cache"] == EnabledMark
&& items["mtrsx"] == DisabledMark
&& !string.IsNullOrEmpty(serial)
&& !KnownDisableVertexCacheIds.Contains(serial))
notes.Add("ℹ️ `Vertex Cache` is disabled, and may impact performance");
if (items["frame_skip"] == EnabledMark)
notes.Add("⚠️ `Frame Skip` is enabled, please disable");
if (items["cpu_blit"] is EnabledMark
&& items["write_color_buffers"] is DisabledMark)
notes.Add("❓ `Force CPU Blit` is enabled, but `Write Color Buffers` is disabled");
if (items["zcull_status"] is not null and not "Full" && !canUseRelaxedZcull)
notes.Add("⚠️ This GPU does not support `VK_EXT_depth_range_unrestricted` extension, please disable `Relaxed ZCull Sync`");
else if (items["zcull_status"] is "Disabled")
notes.Add("⚠️ `ZCull Occlusion Queries` is disabled, which can result in visual artifacts");
else if (items["relaxed_zcull"] is string relaxedZcull)
{
if (relaxedZcull is EnabledMark
&& !KnownGamesThatWorkWithRelaxedZcull.Contains(serial))
{
notes.Add("ℹ️ `ZCull Accuracy` is set to `Relaxed` and can cause performance and visual issues");
}
else if (relaxedZcull is DisabledMark
&& KnownGamesThatWorkWithRelaxedZcull.Contains(serial)
&& canUseRelaxedZcull)
{
notes.Add("ℹ️ Changing `ZCull Accuracy` to `Relaxed` for this game may improve performance");
}
}
if (items["use_rebar"] is DisabledMark)
notes.Add("⚠️ `Use Re-BAR memory for GPU uploads` is disabled and may impact performance");
else if (items["gpu_vram_size"] is {Length: >0} deviceLocalMemory
&& items["gpu_rebar_size"] is {Length: >0} barMemory
&& deviceLocalMemory != barMemory)
{
generalNotes.Add("⚠️ [Re-BAR](<https://www.nvidia.com/en-us/geforce/news/geforce-rtx-30-series-resizable-bar-support/>) (or SAM) is [not enabled](<https://www.intel.com/content/www/us/en/support/articles/000090831/graphics.html>) on this system, which may impact performance");
}
if (!KnownFpsUnlockPatchIds.Contains(serial) || ppuPatches.Count == 0)
{
if (items["vblank_rate"] is string vblank
&& int.TryParse(vblank, out var vblankRate)
&& vblankRate != 60)
notes.Add($"ℹ️ `VBlank Rate` is set to {vblankRate} Hz ({vblankRate / 60.0 * 100:0}%)");
if (items["clock_scale"] is string clockScaleStr
&& int.TryParse(clockScaleStr, out var clockScale)
&& clockScale != 100)
notes.Add($"ℹ️ `Clock Scale` is set to {clockScale}%");
}
if (items["lib_loader"] is string libLoader
&& (libLoader == "Auto"
|| ((libLoader.Contains("manual", StringComparison.InvariantCultureIgnoreCase)
|| libLoader.Contains("strict", StringComparison.InvariantCultureIgnoreCase))
&& (string.IsNullOrEmpty(items["library_list"]) || items["library_list"] == "None"))))
{
if (items["game_title"] != "vsh.self")
notes.Add("⚠️ Please use `Load liblv2.sprx only` as a `Library loader`");
}
bool warnLibraryOverrides = items["library_list_hle"] is not null and not "None";
if (items["library_list_lle"] is string lleLibList and not "None")
{
if (lleLibList.Contains("sysutil"))
notes.Add("❗ Never override `sysutil` firmware modules");
if (lleLibList.Contains("libvdec"))
{
var weirdModules = lleLibList.Split(',', StringSplitOptions.TrimEntries).Except(["libvdec.sprx"]).ToArray();
if (weirdModules.Length > 0)
{
notes.Add("⚠️ Please do not override Firmware Libraries that you weren't asked to");
warnLibraryOverrides = false;
}
}
else
warnLibraryOverrides = true;
}
if (warnLibraryOverrides)
notes.Add("⚠️ Please disable any Firmware Libraries overrides");
if (!string.IsNullOrEmpty(serial))
{
CheckP5Settings(serial, items, notes, generalNotes, ppuHashes, ppuPatches, patchNames);
CheckAsurasWrathSettings(serial, items, notes);
CheckJojoSettings(serial, state, notes, ppuPatches, ppuHashes, generalNotes);
CheckSimpsonsSettings(serial, items, generalNotes, ppuPatches, patchNames);
CheckNierSettings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckDod3Settings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckScottPilgrimSettings(serial, items, notes, generalNotes);
CheckGow3Settings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckDesSettings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckTlouSettings(serial, items, notes, ppuPatches, ppuHashes, patchNames);
CheckRdrSettings(serial, items, notes);
CheckMgs4Settings(serial, items, ppuPatches, ppuHashes, generalNotes);
CheckMgsPwSettings(serial, items, ppuPatches, ppuHashes, notes);
CheckProjectDivaSettings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckGt5Settings(serial, items, generalNotes);
CheckGt6Settings(serial, items, notes, generalNotes);
//CheckRatchetSettings(serial, items, notes, generalNotes);
CheckSly4Settings(serial, items, notes);
CheckDragonsCrownSettings(serial, items, notes);
CheckLbpSettings(serial, items, generalNotes);
CheckKillzone3Settings(serial, items, notes, patchNames);
CheckSkate3Settings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckSonic06Settings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
}
else if (items["game_title"] == "vsh.self")
CheckVshSettings(items, notes, generalNotes);
if (items["game_category"] == "1P")
CheckPs1ClassicsSettings(items, notes, generalNotes);
if (items["game_title"] != "vsh.self" && items["debug_console_mode"] == EnabledMark)
notes.Add("⚠️ `Debug Console Mode` is enabled, and may cause game crashes");
if (items["hook_static_functions"] is EnabledMark)
notes.Add("⚠️ `Hook Static Functions` is enabled, please disable");
if (items["host_root"] is EnabledMark)
notes.Add("❓ `/host_root/` is enabled");
if (items["ppu_threads"] is string ppuThreads
&& ppuThreads != "2")
notes.Add($"⚠️ `PPU Threads` is set to `{ppuThreads.Sanitize()}`; please change it back to `2`");
if (items["spurs_threads"] is string spursSetting
&& int.TryParse(spursSetting, out var spursThreads)
&& spursThreads != 6)
{
if (spursThreads is <1 or >6)
notes.Add($"⚠️ `Max SPURS Threads` is set to `{spursThreads}`; please change it back to `6`");
else
notes.Add($"ℹ️ `Max SPURS Threads` is set to `{spursThreads}`; may result in game crash");
}
if (items["gpu_texture_scaling"] is EnabledMark)
notes.Add("⚠️ `GPU Texture Scaling` is enabled, please disable");
if (items["af_override"] is string af)
{
if (isAppleGpu && af is not "Auto")
notes.Add("⚠️ `Anisotropic Filter` override is not supported on Apple GPUs, please use `Auto`");
else if (af is "Disabled")
notes.Add("❌ `Anisotropic Filter` is `Disabled`, please use `Auto` instead");
else if (af is not "Auto" and not "16")
notes.Add($"❓ `Anisotropic Filter` is set to `{af}x`, which makes little sense over `16x` or `Auto`");
}
if (items["shader_mode"]?.Contains("Interpreter") is true && isAppleGpu)
notes.Add("⚠️ Interpreter `Shader Mode` is not supported on Apple GPUs, please use Async-only option");
else if (items["shader_mode"] == "Interpreter only")
notes.Add("⚠️ `Shader Interpreter Only` mode is not accurate and very demanding");
else if (items["shader_mode"]?.StartsWith("Async") is false && !isAppleGpu)
notes.Add("❓ Async shader compilation is disabled");
if (items["driver_recovery_timeout"] is string driverRecoveryTimeout
&& int.TryParse(driverRecoveryTimeout, out var drtValue)
&& drtValue != 1000000)
{
if (drtValue == 0)
notes.Add("⚠️ `Driver Recovery Timeout` is set to 0 (infinite), please use default value of 1000000");
else if (drtValue < 10_000)
notes.Add($"⚠️ `Driver Recovery Timeout` is set too low: {GetTimeFormat(drtValue)} (1 frame @ {(1_000_000.0 / drtValue):0.##} fps)");
else if (drtValue > 10_000_000)
notes.Add($"⚠️ `Driver Recovery Timeout` is set too high: {GetTimeFormat(drtValue)}");
}
if (items["driver_wakeup_delay"] is string strDriverWakeup
&& int.TryParse(strDriverWakeup, out var driverWakeupDelay)
&& driverWakeupDelay > 1)
{
if (driverWakeupDelay > 1000)
notes.Add($"⚠️ `Driver Wake-up Delay` is set to {GetTimeFormat(driverWakeupDelay)}, and will impact performance");
else
notes.Add($"ℹ️ `Driver Wake-up Delay` is set to {GetTimeFormat(driverWakeupDelay)}");
}
if (items["audio_buffering"] == EnabledMark
&& int.TryParse(items["audio_buffer_duration"], out var duration)
&& duration > 100)
notes.Add($"ℹ️ `Audio Buffer Duration` is set to {duration}ms, which may cause audio lag");
if (items["audio_stretching"] == EnabledMark)
notes.Add("ℹ️ `Audio Time Stretching` is `Enabled`");
if (items["mtrsx"] is EnabledMark)
{
if (isAppleGpu)
notes.Add("⚠️ `Multithreaded RSX` is not supported for Apple GPUs");
else if (multiItems["fatal_error"].Any(f => f.Contains("VK_ERROR_OUT_OF_POOL_MEMORY_KHR")))
notes.Add("⚠️ `Multithreaded RSX` is enabled, please disable for this game");
else if (threadCount < 6)
notes.Add("⚠️ `Multithreaded RSX` is enabled on a CPU with few threads");
else
notes.Add("ℹ️ `Multithreaded RSX` is enabled");
}
if (items["failed_pad"] is string failedPad)
notes.Add($"⚠️ Binding `{failedPad.Sanitize(replaceBackTicks: true)}` failed, check if device is connected.");
if (serial is {Length: >0}
&& KnownMotionControlsIds.Contains(serial)
&& !multiItems["pad_handler"].Any(h => h.StartsWith("DualS"))
&& !multiItems["pad_has_gyro"].Any(g => g is "1" or "true"))
notes.Add("❗ This game requires motion controls, please use native handler for DualShock 3, 4, DualSense, or SDL handler with compatible controller");
if (items["audio_backend"] is string audioBackend && !string.IsNullOrEmpty(audioBackend))
{
if (buildVersion is not null && buildVersion < CubebBuildVersion)
{
if (items["os_type"] is "Windows" && !audioBackend.Equals("XAudio2", StringComparison.OrdinalIgnoreCase))
notes.Add("⚠️ Please use `XAudio2` as the audio backend for this build");
else if (items["os_type"] == "Linux"
&& !audioBackend.Equals("OpenAL", StringComparison.OrdinalIgnoreCase)
&& !audioBackend.Equals("FAudio", StringComparison.OrdinalIgnoreCase))
notes.Add("ℹ️ `FAudio` and `OpenAL` are the recommended audio backends for this build");
}
else
{
if (items["os_type"] is "Windows" or "Linux"
&& !audioBackend.Equals("Cubeb", StringComparison.OrdinalIgnoreCase)
&& !audioBackend.Equals("XAudio2", StringComparison.OrdinalIgnoreCase))
notes.Add("⚠️ Please use `Cubeb` as the audio backend");
}
if (audioBackend.Equals("null", StringComparison.OrdinalIgnoreCase))
notes.Add("⚠️ `Audio backend` is set to `null`");
}
if (int.TryParse(items["audio_volume"], out var audioVolume))
{
if (audioVolume < 10)
notes.Add($"⚠️ Audio volume is set to {audioVolume}%");
else if (audioVolume > 100)
notes.Add($"⚠️ Audio volume is set to {audioVolume}%; audio clipping is to be expected");
}
if (items["hle_lwmutex"] is EnabledMark)
notes.Add("⚠️ `HLE lwmutex` is enabled, might affect compatibility");
if (items["spu_block_size"] is string spuBlockSize)
{
if (spuBlockSize != "Safe" && spuBlockSize != "Mega")
notes.Add($"⚠️ Please change `SPU Analyzer Block Size` to `Safe/Mega`, currently `{spuBlockSize}` is unstable.");
}
if (items["booting_savestate"] is DisabledMark)
{
if (items["auto_start_on_boot"] is DisabledMark)
notes.Add("❓ `Automatically start games after boot` is disabled");
else if (items["always_start_on_boot"] is DisabledMark)
notes.Add("❓ `Always start after boot` is disabled");
}
else
{
if (items["start_paused_savestate"] is EnabledMark)
notes.Add("❓ `Pause emulation after loading savestates` is disabled");
if (items["compatible_savestate"] is not EnabledMark)
notes.Add("⚠️ If you have weird compatibility issues after boot, try enabling `SPU-Compatible Savestate Mode`");
}
if (items["applied_config_type"] is "custom" or "continuous" && notes.Count > 0)
generalNotes.Add("⚠️ To change custom configuration, **Right-click on the game**, then `Configure`");
if (items["custom_input_config"] is { Length: > 0 } and not "global")
generalNotes.Add("ℹ️ Custom input configuration is applied");
var notesContent = new StringBuilder();
foreach (var line in SortLines(notes))
notesContent.AppendLine(line);
PageSection(builder, notesContent.ToString().Trim(), "Important Settings to Review");
}
private static readonly HashSet<string> P5Ids =
[
"BLES02247", "BLUS31604", "BLJM61346",
"NPEB02436", "NPUB31848", "NPJB00769",
];
private static readonly HashSet<string> KnownP5Patches = new(StringComparer.InvariantCultureIgnoreCase)
{
"e72e715d646a94770d1902364bc66fe33b1b6606",
"b8c34f774adb367761706a7f685d4f8d9d355426",
"3b394da7912181d308bf08505009b3578521c756",
"9da9b988693598fbe1e2d316d1e927c37ad666bc",
};
private static void CheckP5Settings(string serial, NameValueCollection items, List<string> notes, List<string> generalNotes, HashSet<string> ppuHashes, Dictionary<string, int> ppuPatches, UniqueList<string> patchNames)
{
if (!P5Ids.Contains(serial))
return;
if (items["ppu_decoder"] is string ppuDecoder && !ppuDecoder.Contains("LLVM"))
notes.Add("⚠️ Please set `PPU Decoder` to `Recompiler (LLVM)`");
if (items["spu_decoder"] is string spuDecoder)
{
if (spuDecoder.Contains("Interpreter"))
notes.Add("⚠️ Please set `SPU Decoder` to `Recompiler (LLVM)`");
else if (spuDecoder.Contains("ASMJIT"))
notes.Add("ℹ️ Please consider setting `SPU Decoder` to `Recompiler (LLVM)`");
}
if (items["spu_threads"] is string spuThreads)
{
if (items["has_tsx"] == EnabledMark)
{
if (spuThreads != "Auto")
notes.Add("ℹ️ `SPU Thread Count` is best to set to `Auto`");
}
else if (spuThreads != "2")
{
if (int.TryParse(items["thread_count"], out var threadCount))
{
if (threadCount > 4)
notes.Add("ℹ️ `SPU Thread Count` is best to set to `2`");
else if (spuThreads != "1")
notes.Add("ℹ️ `SPU Thread Count` is best to set to `2` or `1`");
}
else
notes.Add("ℹ️ `SPU Thread Count` is best to set to `2`");
}
}
if (items["spu_loop_detection"] is EnabledMark)
notes.Add("ℹ️ If you have distorted audio, try disabling `SPU Loop Detection`");
if (items["frame_limit"] is not null and not "Off")
notes.Add("⚠️ `Frame Limiter` is not required, please disable");
if (items["write_color_buffers"] is EnabledMark)
notes.Add("⚠️ `Write Color Buffers` is not required, please disable");
if (items["cpu_blit"] is EnabledMark)
notes.Add("⚠️ `Force CPU Blit` is not required, please disable");
if (items["strict_rendering_mode"] is EnabledMark)
notes.Add("⚠️ `Strict Rendering Mode` is not required, please disable");
if (ppuPatches.Count == 0
&& items["resolution_scale"] is string resScale
&& int.TryParse(resScale, out var scale)
&& scale > 100)
notes.Add("⚠️ `Resolution Scale` over 100% requires portrait sprites mod");
/*
* 60 fps v1 = 12
* 60 fps v2 = 268
*/
if (patchNames.Any(n => n.Contains("60")) || ppuPatches.Values.Any(n => n > 260))
notes.Add("ℹ️ 60 fps patch is enabled; please disable if you have any strange issues");
if (!KnownP5Patches.Overlaps(ppuHashes))
generalNotes.Add("🤔 Very interesting version of the game you got there");
}
private static void CheckAsurasWrathSettings(string serial, NameValueCollection items, List<string> notes)
{
if (serial is "BLES01227" or "BLUS30721")
{
if (items["resolution_scale"] is string resScale
&& int.TryParse(resScale, out var scale)
&& scale > 100
&& items["texture_scale_threshold"] is string thresholdStr
&& int.TryParse(thresholdStr, out var threshold)
&& threshold < 500)
notes.Add("⚠️ `Resolution Scale` over 100% requires `Resolution Scale Threshold` set to `512x512`");
if (items["af_override"] is not null and not "Auto")
notes.Add("⚠️ Please use `Auto` for `Anisotropic Filter Override`");
}
}
private static readonly HashSet<string> AllStarBattleIds =
[
"BLES01986", "BLUS31405", "BLJS10217",
"NPEB01922", "NPUB31391", "NPJB00331",
];
private static readonly HashSet<string> KnownJojoPatches = new(StringComparer.InvariantCultureIgnoreCase)
{
"6875682ab309df32307c5305c43bb132c4e261fa",
"18cf9a4e8196684ed9ee816f82649561fd1bf182",
};
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 (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 (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
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"] 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");
}
}
private static void CheckSimpsonsSettings(string serial, NameValueCollection items, List<string> generalNotes, Dictionary<string, int> ppuPatches, UniqueList<string> patchNames)
{
if (serial is not ("BLES00142" or "BLUS30065"))
return;
var hasPatch = ppuPatches.Any() && patchNames.Any(n => n.Contains("Fix pad initialization", StringComparison.OrdinalIgnoreCase));
if ((!TryGetRpcs3Version(items, out var v) || v < FixedSimpsonsBuild)
&& !hasPatch)
generalNotes.Add("ℹ️ This game has a controller initialization bug. Please use [the patch](https://wiki.rpcs3.net/index.php?title=The_Simpsons_Game#Patches).");
}
private static readonly HashSet<string> KnownNierPatches = new(StringComparer.InvariantCultureIgnoreCase)
{
"13950b2e29e05a115fe317815d3da9d2b2baee65",
"f098ee8410599c81c89f90d698340a078dc69a90",
};
private static void CheckNierSettings(string serial, NameValueCollection items, List<string> notes, Dictionary<string, int> ppuPatches, HashSet<string> ppuHashes, List<string> generalNotes)
{
if (serial is "BLUS30481" or "BLES00826" or "BLJM60223")
{
var frameLimit = items["frame_limit"];
var vsync = items["vsync"] == EnabledMark;
if (ppuPatches.Any() && ppuPatches.Values.Max() > 1)
notes.Add("✅ Using the variable rate FPS patch");
else if (ppuPatches.Any())
{
if (frameLimit == "Off")
{
if (!vsync)
notes.Add("⚠️ Please set `Framerate Limiter` to `Auto` or enable V-Sync");
}
else if (frameLimit != "59.95"
&& frameLimit != "60"
&& frameLimit != "Auto")
{
if (vsync)
notes.Add("⚠️ Please set `Framerate Limiter` to `Off`");
else
notes.Add("⚠️ Please set `Framerate Limiter` to `Auto` or enable V-Sync");
}
else
{
if (vsync)
notes.Add("⚠️ Please set `Framerate Limiter` to `Off`");
}
notes.Add("⚠️ There is a new variable frame rate FPS patch available");
}
else
{
if (frameLimit != "30")
notes.Add("⚠️ Please set `Framerate Limiter` to 30 fps");
if (ppuHashes.Overlaps(KnownNierPatches))
generalNotes.Add("ℹ️ This game has an FPS unlock patch");
}
if (serial == "BLJM60223" && items["native_ui"] == EnabledMark)
notes.Add("ℹ️ To enter the character name, disable `Native UI` and use Japanese text");
if (items["sleep_timer"] is string sleepTimer
&& sleepTimer != "Usleep Only"
&& sleepTimer != "Usleep")
notes.Add("⚠️ Please set `Sleep Timers Accuracy` setting to `Usleep Only`");
}
}
private static void CheckScottPilgrimSettings(string serial, NameValueCollection items, List<string> notes, List<string> generalNotes)
{
if (serial is "NPEB00258" or "NPUB30162" or "NPJB00068")
{
if (items["resolution"] is not null and not "1920x1080")
notes.Add("⚠️ For perfect sprite scaling without borders set `Resolution` to `1920x1080`");
if (items["game_version"] is string gameVer
&& Version.TryParse(gameVer, out var v)
&& v < new Version(1, 03))
generalNotes.Add("⚠️ Please update game to v1.03 if you experience visual issues");
}
}
private static readonly HashSet<string> Gow3Ids =
[
"BCAS25003", "BCES00510", "BCES00799", "BCJS37001", "BCUS98111", "BCKS15003",
"NPUA70080", // Demo
];
private static readonly HashSet<string> KnownGow3Patches = new(StringComparer.InvariantCultureIgnoreCase)
{
"4d5c51503a81a327c2a99427390a395b8dcb3767", // 1.00
"cc23d46d671458b37f34e08b6e06d1751084a34e", // 1.00 BCAS25003 & BCKS15003
"19724fde16a5b111b7b4d2a065f5dccaf8e01962", // 1.03
"c25d318100a48dc3d8b85460e385e4c38289f555", // Demo
};
private static readonly HashSet<string> GowHDIds =
[
"BCAS20102", "BCES00791", "BCES00800", "BLJM60200", "BCUS98229", // collection except volume II
"NPUA80491", "NPUA80490", "NPEA00255", "NPEA00256", "NPJA00062", "NPJA00061", "NPJA00066",
];
private static readonly HashSet<string> GowAscIds =
[
"BCAS25016", "BCES01741", "BCES01742", "BCUS98232",
"NPEA00445", "NPEA90123", "NPUA70216", "NPUA70269", "NPUA80918",
"NPHA80258",
];
private static void CheckGow3Settings(string serial, NameValueCollection items, List<string> notes, Dictionary<string, int> ppuPatches, HashSet<string> ppuHashes, List<string> generalNotes)
{
if (!Gow3Ids.Contains(serial))
return;
if (!ppuHashes.Overlaps(KnownGow3Patches))
generalNotes.Add("🤔 Very interesting version of the game you got there");
}
private static readonly HashSet<string> DesIds =
[
"BLES00932", "BLUS30443", "BCJS30022", "BCAS20071",
"NPEB01202", "NPUB30910", "NPJA00102",
"BLUD80018", // trade demo
];
private static readonly HashSet<string> KnownDesPatches = new(StringComparer.InvariantCultureIgnoreCase)
{
"83681f6110d33442329073b72b8dc88a2f677172", // BLUS30443 1.00
"5446a2645880eefa75f7e374abd6b7818511e2ef", // BLES00932 1.00
"9403fe1678487def5d7f3c380b4c4fb275035378", // BCAS20071 1.04
"f965a746d844cd0c572a7e8731b5b3b7a81f7bdd", // BLUD80018 1.01
};
private static void CheckDesSettings(string serial, NameValueCollection items, List<string> notes, Dictionary<string, int> ppuPatches, HashSet<string> ppuHashes, List<string> generalNotes)
{
if (!DesIds.Contains(serial))
return;
if (items["spu_block_size"] is not null and not "Safe")
notes.Add("ℹ️ Please set `SPU Analyzer Block Size` to `Safe` to reduce crash rate");
if (items["frame_limit"] is not null and not "Off")
notes.Add("⚠️ `Frame Limiter` should be `Off`");
if (items["spu_loop_detection"] == EnabledMark)
notes.Add("⚠️ `SPU Loop Detection` is `Enabled`, and can cause visual artifacts");
if (items["spu_threads"] is not null and not "Auto")
notes.Add("⚠️ Please set `SPU Thread Count` to `Auto` for best performance");
if (serial != "BLES00932" && serial != "BLUS30443")
return;
if (items["vblank_rate"] is string vbrStr
&& items["clock_scale"] is string clkStr
&& int.TryParse(vbrStr, out var vblankRate)
&& int.TryParse(clkStr, out var clockScale))
{
var vbrRatio = vblankRate / 60.0;
var clkRatio = clockScale / 100.0;
if (ppuPatches.Values.Any(v => v >= 25))
{
if (vblankRate != 60)
notes.Add($"ℹ️ `VBlank Rate` is set to {vblankRate} Hz ({vbrRatio * 100:0}%)");
if (clockScale != 100)
notes.Add($"⚠️ `Clock Scale` is set to {clockScale}%, please set it back to 100%");
else
notes.Add("✅ Settings are set for the variable rate FPS patch");
}
else if (ppuPatches.Any())
{
if (vblankRate == 60)
notes.Add("ℹ️ `VBlank Rate` is not set; FPS is limited to 30");
if (Math.Abs(vbrRatio - clkRatio) > 0.05)
notes.Add($"⚠️ `VBlank Rate` is set to {vblankRate} Hz ({vbrRatio * 100:0}%), but `Clock Scale` is set to {clockScale}%");
else if (vblankRate == 60)
notes.Add("ℹ️ Settings are not set for the fixed rate FPS patch");
else
notes.Add($"✅ Settings are set for the fixed rate {vblankRate / 2} FPS patch");
notes.Add("⚠️ There is a new variable frame rate FPS patch available");
}
else
{
if (ppuHashes.Overlaps(KnownDesPatches))
generalNotes.Add("ℹ️ This game has an FPS unlock patch");
}
}
else if (ppuPatches.Any())
{
notes.Add("ℹ️ `VBlank Rate` or `Clock Scale` is not set");
}
}
private static readonly HashSet<string> Dod3Ids =
[
"BLUS31197", "NPUB31251",
"NPEB01407",
"BLJM61043", "NPJB00380",
"BCAS20311", "NPHB00633", "NPHB00639",
];
private static readonly HashSet<string> KnownDod3Patches = new(StringComparer.InvariantCultureIgnoreCase)
{
"2b393f064786e5895d5a576621deb4c9107a8f0b", // BLUS31197 1.00
"f2f7f7ea0444353884bb715152147c3a29f4e790", // BLUS31197 1.01
"b18834a8f21cd29a091b287a66656a279ccba507", // NPUB31251 1.00
"9c04f427625a0064282432e4edfefe9e0956c303", // NPUB31251 1.01
"e1a44e5d3fb03a37f0445e92ed13abce8d6efdd4", // NPEB01407
"a017576369165f3746730724c8ae762ed9bc64d8", // BLJM61043 1.00
"eda0339b931f6fe15420b053703ddd89b27d615b", // BLJM61043 1.01
"62eb0f5d8f0f929cb23309311b89ce21eaa3bc9e", // BLJM61043 1.02
"384a28c62ff179a4ae815ab7b711e76fbb1167b4", // BLJM61043 1.03
"c09c496514f6dc591434575b04eb7c003826c11d", // BLJM61043 1.04
"56cc988f7d5b5127049f28ed9278b98de2e4ff1f", // BCAS20311 1.01
"ac64494f4ea31f8b0f82584c48916d30dad16300", // BCAS20311 1.02
"20183817f17fb358d28131e195c5af1fc9579ada", // NPHB00633 1.00
"def0c4b28e5c35da73fcc07731ec0cc3d7fe9485", // NPHB00633 1.01
"8342766aab0791f480d0a6f8984cc5c199455c64", // NPHB00633 1.02
// missing NPJB00380, NPHB00639
};
private static void CheckDod3Settings(string serial, NameValueCollection items, List<string> notes, Dictionary<string, int> ppuPatches, HashSet<string> ppuHashes, List<string> generalNotes)
{
if (!Dod3Ids.Contains(serial))
return;
if (items["vblank_rate"] is string vbrStr
&& int.TryParse(vbrStr, out var vbr))
{
if (ppuPatches.Any())
{
if (vbr == 60)
notes.Add("ℹ️ `VBlank Rate` is not set; FPS is limited to 30");
else if (vbr is 120 or 240)
notes.Add($"✅ Settings are set for the {vbr / 2} FPS patch");
else if (vbr > 240)
notes.Add($"⚠️ Settings are configured for the {vbr/2} FPS patch, which is too high; issues are expected");
else
notes.Add($"ℹ️ Settings are set for the {vbr/2} FPS patch");
}
else
{
if (vbr > 60)
notes.Add("ℹ️ Unlocking FPS requires game patch");
if (ppuHashes.Overlaps(KnownDod3Patches))
generalNotes.Add("ℹ️ This game has an FPS unlock patch");
else if (ppuHashes.Any())
generalNotes.Add("🤔 Very interesting version of the game you got there");
}
}
}
private static readonly HashSet<string> TlouIds =
[
"BCAS20270", "BCES01584", "BCES01585", "BCJS37010", "BCUS98174",
"NPEA00435", "NPJA00096", "NPHA80243", "NPUA80960",
"NPEA00521", "NPJA00129", "NPHA80279", "NPUA81175", // left behind
"NPEA90122", "NPHA80246", "NPUA70257", // demos
"NPEA00454", "NPUA30134", "NPEA00517", // soundtrack
"NPJM00012", // bonus video
"NPUO30130", // manual