From 3708ad7faee601c1dd3b22b944578130d994d467 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 14 May 2023 20:29:56 +0300 Subject: [PATCH] Debugger ? binary output grouped to 4*8 bits. --- debug.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/debug.cpp b/debug.cpp index e1f07a06..b1ebcc32 100644 --- a/debug.cpp +++ b/debug.cpp @@ -772,16 +772,19 @@ static bool readbinx (TCHAR **c, uae_u32 *valp) negative = checkisneg(c); for (;;) { TCHAR nc = **c; - if (nc != '1' && nc != '0') { + if (nc != '1' && nc != '0' && nc != '`') { if (first) return false; break; } first = false; (*c)++; - val <<= 1; - if (nc == '1') - val |= 1; + if (nc != '`') { + val <<= 1; + if (nc == '1') { + val |= 1; + } + } } *valp = val * (negative ? -1 : 1); return true; @@ -1045,15 +1048,19 @@ static void converter(TCHAR **c) bool err; uae_u32 v = readint(c, &err); TCHAR s[100]; - int i; + int i, j; if (err) { return; } - for (i = 0; i < 32; i++) - s[i] = (v & (1 << (31 - i))) ? '1' : '0'; - s[i] = 0; - console_out_f (_T("0x%08X = %%%s = %u = %d\n"), v, s, v, (uae_s32)v); + for (i = 0, j = 0; i < 32; i++) { + s[j++] = (v & (1 << (31 - i))) ? '1' : '0'; + if (i < 31 && (i & 7) == 7) { + s[j++] = '`'; + } + } + s[j] = 0; + console_out_f (_T("$%08X = %%%s = %u = %d\n"), v, s, v, (uae_s32)v); } static bool isrom(uaecptr addr) -- 2.47.3