From 45429a88d8c0735bfd35a7f43673f9068f739e50 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 23 Apr 2016 18:01:27 +0200 Subject: [PATCH] Some Pandora fine-tunning --- Sources/Engine/Engine.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) mode change 100644 => 100755 Sources/Engine/Engine.cpp diff --git a/Sources/Engine/Engine.cpp b/Sources/Engine/Engine.cpp old mode 100644 new mode 100755 index 15021ca..84e5944 --- a/Sources/Engine/Engine.cpp +++ b/Sources/Engine/Engine.cpp @@ -127,6 +127,9 @@ static void DetectCPU(void) { #if (defined USE_PORTABLE_C) // rcg10072001 CPrintF(TRANSV(" (No CPU detection in this binary.)\n")); + #ifdef PLATFORM_PANDORA + sys_iCPUMHz = 400; // conservative, ARM -> x86 cpu translation is not 1 to 1. + #endif #else char strVendor[12+1]; @@ -398,7 +401,19 @@ static void SetupMemoryManager(void) sys_iRAMSwap = ms.dwTotalPageFile/MB; #elif (defined PLATFORM_UNIX) + #ifdef PLATFORM_PANDORA + sys_iRAMPhys = 256; // conservative here, there is 256MB models and 512MB... + FILE* esrev = fopen("/etc/powervr-esrev", "r"); + if (esrev) { + int rev = 0; + fscanf(esrev,"%d", &rev); + if (rev==3 || rev==5) + sys_iRAMPhys = 512; + fclose(esrev); + }; + #else sys_iRAMPhys = 1; // !!! FIXME: This is bad. Bad. BAD. + #endif sys_iRAMSwap = 1; #else