diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index 957834ec831..ecd4996b320 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -3318,7 +3318,14 @@ void device_debug::tracer::update(offs_t pc) // print the address std::string buffer; int logaddrchars = m_debug.logaddrchars(); - buffer = string_format("%0*X: ", logaddrchars, pc); + if (m_debug.is_octal()) + { + buffer = string_format("%0*o: ", logaddrchars*3/2, pc); + } + else + { + buffer = string_format("%0*X: ", logaddrchars, pc); + } // print the disassembly std::string dasm; diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index 5afb6fbceec..da97944d244 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -171,6 +171,7 @@ public: // commonly-used pass-throughs int logaddrchars() const { return (m_memory != nullptr && m_memory->has_space(AS_PROGRAM)) ? m_memory->space(AS_PROGRAM).logaddrchars() : 8; } + bool is_octal() const { return (m_memory != nullptr && m_memory->has_space(AS_PROGRAM)) ? m_memory->space(AS_PROGRAM).is_octal() : false; } device_t& device() const { return m_device; } // hooks used by the rest of the system