From 036b4e945659dfb1b083834652abf4054341ea1b Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 5 Oct 2025 11:27:59 -0700 Subject: [PATCH] assign a specific_version for PC NTE --- README.md | 1 + notes/ar-codes.txt | 1 + src/Version.cc | 8 ++++++-- src/Version.hh | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 435db8f4..bdc2a838 100644 --- a/README.md +++ b/README.md @@ -482,6 +482,7 @@ The specific versions are: | PSO DC v2 JP | 2OJF | SH-4 | | PSO DC v2 US | 2OEF | SH-4 | | PSO DC v2 EU | 2OPF | SH-4 | +| PSO PC (v2) Trial Edition | 2OJT | Client functions not supported | | PSO PC (v2) 04/2002 | 2OJW | Client functions not supported | | PSO PC (v2) 02/2003 | 2OJZ | Client functions not supported | | PSO GC Trial Edition | 3OJT | PowerPC | diff --git a/notes/ar-codes.txt b/notes/ar-codes.txt index 33ade4ed..a3fe8eaa 100644 --- a/notes/ar-codes.txt +++ b/notes/ar-codes.txt @@ -17,6 +17,7 @@ Version codes (from README.md): 2OJF: PSO DC v2 JP 2OEF: PSO DC v2 US 2OPF: PSO DC v2 EU + 2OJT: PSO PC Trial Edition 2OJW: PSO PC (v2) 04/2002 2OJZ: PSO PC (v2) 02/2003 3OJT: PSO GC Trial Edition diff --git a/src/Version.cc b/src/Version.cc index 7ec8fe28..ef700998 100644 --- a/src/Version.cc +++ b/src/Version.cc @@ -162,6 +162,8 @@ uint32_t default_specific_version_for_version(Version version, int64_t sub_versi } case Version::DC_V2: return SPECIFIC_VERSION_DC_V2_INDETERMINATE; // 2___; need to send VersionDetectDC + case Version::PC_NTE: + return SPECIFIC_VERSION_PC_V2_NTE; // 2OJT case Version::PC_V2: return SPECIFIC_VERSION_PC_V2_INDETERMINATE; // 2OJ_; need to send checksum command case Version::GC_NTE: @@ -215,7 +217,6 @@ bool specific_version_is_indeterminate(uint32_t specific_version) { } bool specific_version_is_dc(uint32_t specific_version) { - // All v1 and v2 specific_versions are DC except 2OJW and 2OJZ, which are PC uint8_t major_version = specific_version >> 24; if (major_version < 0x31 || major_version > 0x32) { return false; @@ -224,7 +225,10 @@ bool specific_version_is_dc(uint32_t specific_version) { } bool specific_version_is_pc_v2(uint32_t specific_version) { - return ((specific_version == SPECIFIC_VERSION_PC_V2_DEFAULT) || (specific_version == SPECIFIC_VERSION_PC_V2_FINAL)); + // All v1 and v2 specific_versions are DC except these, which are PC + return ((specific_version == SPECIFIC_VERSION_PC_V2_NTE) || + (specific_version == SPECIFIC_VERSION_PC_V2_DEFAULT) || + (specific_version == SPECIFIC_VERSION_PC_V2_FINAL)); } bool specific_version_is_gc(uint32_t specific_version) { diff --git a/src/Version.hh b/src/Version.hh index 89625dbe..6b7f5738 100644 --- a/src/Version.hh +++ b/src/Version.hh @@ -192,6 +192,7 @@ constexpr uint32_t SPECIFIC_VERSION_DC_V1_EU_INDETERMINATE = 0x314F5000; // 1OP_ constexpr uint32_t SPECIFIC_VERSION_DC_V1_INDETERMINATE = 0x31000000; // 1___ constexpr uint32_t SPECIFIC_VERSION_DC_V2_INDETERMINATE = 0x32000000; // 2___ constexpr uint32_t SPECIFIC_VERSION_PC_V2_INDETERMINATE = 0x324F4A00; // 2OJ_ +constexpr uint32_t SPECIFIC_VERSION_PC_V2_NTE = 0x324F4A54; // 2OJT constexpr uint32_t SPECIFIC_VERSION_PC_V2_DEFAULT = 0x324F4A57; // 2OJW constexpr uint32_t SPECIFIC_VERSION_PC_V2_FINAL = 0x324F4A5A; // 2OJZ constexpr uint32_t SPECIFIC_VERSION_GC_NTE = 0x334F4A54; // 3OJT