From 80328b2bacc40eb846f3928d67ab27e6da2f7cd5 Mon Sep 17 00:00:00 2001 From: tomcw Date: Thu, 9 Mar 2023 23:02:31 +0000 Subject: [PATCH] Debugger: mini-mem: fix SYn to match AYn --- source/Debugger/Debug.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index 69bb19c5..0f805e8b 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -3617,7 +3617,10 @@ bool MemoryDumpCheck (int nArgs, WORD * pAddress_ ) { if (strlen(g_aArgs[1].sArg) == 3) // "SY0" or "SY1" { - nAddress = (g_aArgs[1].sArg[2] - '0') & 3; + UINT bits = (g_aArgs[1].sArg[2] - '0') & 3; + UINT slot = 4 + (bits >> 1); + UINT subUnit = bits & 1; + nAddress = (slot << 4) | subUnit; // slot=[4..5] | subUnit=[0..1] pArg->eDevice = DEV_SY6522; bUpdate = true; }