--- nono/vm/pio.h 2026/04/29 17:05:33 1.1.1.14 +++ nono/vm/pio.h 2026/04/29 17:05:55 1.1.1.15 @@ -13,6 +13,7 @@ #include "device.h" #include +class ADPCMDevice; class InterruptDevice; class LCDDevice; class MPU64180Device; @@ -79,8 +80,7 @@ class PPIDevice : public i8255Device PPIDevice(); ~PPIDevice() override; - // ADPCM のサンプリングレートの 2bit を取得する - uint8 GetADPCMRate() const { return adpcm_rate; } + bool Init() override; protected: // BusIO インタフェース @@ -90,11 +90,13 @@ class PPIDevice : public i8255Device busdata PeekPort(uint32 offset); private: + uint32 GetPC() const; void SetPC(uint, uint) override; - bool pan_left {}; - bool pan_right {}; - uint adpcm_rate {}; + // ADPCM サンプリングレートの設定値(0..3)をこちらでも持っておく。 + uint32 adpcm_rate {}; + + ADPCMDevice *adpcm {}; }; class PIO0Device : public i8255Device