diff --git a/Components/9918/Implementation/9918Base.hpp b/Components/9918/Implementation/9918Base.hpp index f7db5bf10..9c10aeafd 100644 --- a/Components/9918/Implementation/9918Base.hpp +++ b/Components/9918/Implementation/9918Base.hpp @@ -813,6 +813,11 @@ template struct Base: public Storage { ++ram_pointer_; if constexpr (is_yamaha_vdp(personality)) { + // The Yamaha increments only 14 bits of the address in TMS-compatible modes. + if(this->underlying_mode_ < ScreenMode::YamahaText80) { + ram_pointer_ = (ram_pointer_ & 0x3fff) | (address & AddressT(~0x3fff)); + } + if(this->underlying_mode_ == ScreenMode::YamahaGraphics6 || this->underlying_mode_ == ScreenMode::YamahaGraphics7) { // Rotate address one to the right as the hardware accesses // the underlying banks of memory alternately but presents