1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Limit to 14 bits in old modes.

This commit is contained in:
Thomas Harte 2023-02-06 22:16:31 -05:00
parent 7cb51c021b
commit 7028bdd05d

View File

@ -813,6 +813,11 @@ template <Personality personality> struct Base: public Storage<personality> {
++ram_pointer_; ++ram_pointer_;
if constexpr (is_yamaha_vdp(personality)) { 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) { if(this->underlying_mode_ == ScreenMode::YamahaGraphics6 || this->underlying_mode_ == ScreenMode::YamahaGraphics7) {
// Rotate address one to the right as the hardware accesses // Rotate address one to the right as the hardware accesses
// the underlying banks of memory alternately but presents // the underlying banks of memory alternately but presents