--- nono/debugger/debugger_memory.h 2026/04/29 17:05:16 1.1.1.3 +++ nono/debugger/debugger_memory.h 2026/04/29 17:05:28 1.1.1.5 @@ -11,30 +11,15 @@ #pragma once #include "debugger_defs.h" -#include "saddr.h" +#include "bus.h" -class IOContainerDevice; +class IODevice; class DebuggerMemoryStream { public: // コンストラクタ (全部入り) - DebuggerMemoryStream(const DebuggerMD *md_, const saddr_t& laddr_, - MemoryMode access_mode, MMULookupMode lookup_mode); - - // コンストラクタ (物理アドレス指定) - DebuggerMemoryStream(const DebuggerMD *md_, const saddr_t& laddr_) - : DebuggerMemoryStream(md_, laddr_, - MemoryMode::Physical, MMULookupMode::None) // 移譲 - { - } - // コンストラクタ (論理アドレスとテーブルサーチモード指定) - DebuggerMemoryStream(const DebuggerMD *md_, const saddr_t& laddr_, - MMULookupMode lookup_mode) - : DebuggerMemoryStream(md_, laddr_, - MemoryMode::Logical, lookup_mode) // 移譲 - { - } + DebuggerMemoryStream(const DebuggerMD *md_, busaddr laddr_); // 現在のアドレスを表示用に整形して str に代入する。 // アドレス変換でバスエラーが起きたら false を返す。 @@ -59,21 +44,20 @@ class DebuggerMemoryStream uint64 Read(int bytes); // laddr から1バイト読み込んで、アドレスを進める。 - uint64 Read8(); + uint64 Read1(); public: - saddr_t laddr {}; // (論理)アドレス + busaddr laddr {}; // (論理)アドレス uint32 paddr {}; // 物理アドレス private: // アクセスするバス - IOContainerDevice *bus {}; + IODevice *bus {}; int lcol; // 論理アドレス幅の16進桁数 int pcol; // 物理アドレス幅の16進桁数 bool translate {}; // アドレス変換が必要なら true - bool lookup {}; // MMU テーブルサーチを行うなら true bool pageover {}; // 256バイト境界をまたいだら true const DebuggerMD *md {}; // アドレス変換に必要 };