From f93ccc3933ec651162fe0fbeef9e3080d0dd6265 Mon Sep 17 00:00:00 2001 From: tomcw Date: Sat, 30 Mar 2024 13:11:02 +0000 Subject: [PATCH] Only allow alloc granularity of 64KiB + add more logging --- source/Memory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/Memory.cpp b/source/Memory.cpp index 4f12cd91..24ae91e4 100644 --- a/source/Memory.cpp +++ b/source/Memory.cpp @@ -1544,7 +1544,7 @@ static LPBYTE AllocMemImage(void) // . This is a fix (and optimisation) for 6502 opcodes that do a 16-bit read at 6502 address $FFFF. (GH#1285) SYSTEM_INFO info; GetSystemInfo(&info); - bool res = info.dwAllocationGranularity <= _6502_MEM_LEN; + bool res = (info.dwAllocationGranularity == _6502_MEM_LEN); if (res) { @@ -1594,6 +1594,10 @@ static LPBYTE AllocMemImage(void) } #endif } + else + { + LogFileOutput("MemInitialize: SYSETEM_INFO.wAllocationGranularity = 0x%08X.\n", info.dwAllocationGranularity); + } if (!res) {