--- nono/vm/mfp.h 2026/04/29 17:05:29 1.1.1.15 +++ nono/vm/mfp.h 2026/04/29 17:05:38 1.1.1.17 @@ -12,7 +12,6 @@ #include "device.h" #include "event.h" -#include "monitor.h" #include class InterruptDevice; @@ -92,9 +91,11 @@ struct MFP ir16 isr; ir16 imr; - // - // | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | + // b7 b6 b5 b4 b3 b2 b1 b0 + // +-----+-----+-----+-----+-----+-----+-----+-----+ // VR | V7 | V6 | V5 | V4 | S | --- | --- | --- | + // +-----+-----+-----+-----+-----+-----+-----+-----+ + // | | | | | // | | | | +------------ In-Service Register Enable // +-----+-----+-----+------------------ Vector Number uint8 vr_vec; // ベクタの上位4ビット @@ -131,8 +132,11 @@ struct MFP uint8 scr; - // | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | + // b7 b6 b5 b4 b3 b2 b1 b0 + // +-----+-----+-----+-----+-----+-----+-----+-----+ // UCR | CLK | WL | ST | PE | E/O | --- | + // +-----+-----+-----+-----+-----+-----+-----+-----+ + // | | | | | // | | | | +--------- %1で偶数パリティ // | | | +--------------- %1でパリティエラー // | | +------------------- スタート/ストップビット @@ -149,8 +153,11 @@ struct MFP static const uint32 UCR_EO = 0x02; uint8 ucr; - // | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | + // b7 b6 b5 b4 b3 b2 b1 b0 + // +-----+-----+-----+-----+-----+-----+-----+-----+ // RSR | BF | OE | PE | FE | B | CIP | SS | RE | + // +-----+-----+-----+-----+-----+-----+-----+-----+ + // | | | | | | | | // | | | | | | | +--- %1 RX Enable // | | | | | | +--------- Sync Stop // | | | | | +--------------- 非同期なら @@ -171,8 +178,11 @@ struct MFP static const uint32 RSR_RE = 0x01; uint8 rsr; - // | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | + // b7 b6 b5 b4 b3 b2 b1 b0 + // +-----+-----+-----+-----+-----+-----+-----+-----+ // TSR | BE | UE | AT | END | B | H | L | TE | + // +-----+-----+-----+-----+-----+-----+-----+-----+ + // | | | | // | | | +--- %1 TX Enable // | | +--------------------------- %1 TX Disabled // | +--------------------------------------- %1 Underrun Error @@ -272,7 +282,7 @@ class MFPDevice : public IODevice std::array event {}; Event key_event { this }; - Monitor monitor { this }; + Monitor *monitor {}; InterruptDevice *interrupt {}; X68030Keyboard *keyboard {};