Add isDevKit bool (#2685)

This commit is contained in:
illusion0001 2025-03-27 09:50:21 +13:00 committed by GitHub
parent 3abe5b0d57
commit 9c37aa039b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 0 deletions

View file

@ -38,6 +38,16 @@ void MemoryManager::SetupMemoryRegions(u64 flexible_size, bool use_extended_mem1
bool use_extended_mem2) {
const bool is_neo = ::Libraries::Kernel::sceKernelIsNeoMode();
auto total_size = is_neo ? SCE_KERNEL_TOTAL_MEM_PRO : SCE_KERNEL_TOTAL_MEM;
if (Config::isDevKitConsole()) {
const auto old_size = total_size;
// Assuming 2gb is neo for now, will need to link it with sceKernelIsDevKit
total_size += is_neo ? 2_GB : 768_MB;
LOG_WARNING(Kernel_Vmm,
"Config::isDevKitConsole is enabled! Added additional {:s} of direct memory.",
is_neo ? "2 GB" : "768 MB");
LOG_WARNING(Kernel_Vmm, "Old Direct Size: {:#x} -> New Direct Size: {:#x}", old_size,
total_size);
}
if (!use_extended_mem1 && is_neo) {
total_size -= 256_MB;
}