1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-27 02:55:07 +00:00

Reset write phase only upon traditional register accesses.

This commit is contained in:
Thomas Harte 2023-02-06 20:32:24 -05:00
parent b538407386
commit a3df106f92

View File

@ -1068,10 +1068,13 @@ uint8_t Base<personality>::read_register_indirect() {
template <Personality personality>
uint8_t TMS9918<personality>::read(int address) {
// TODO: is this still a global effect of reads, even in the world of the Yamahas?
this->write_phase_ = false;
const int target = this->masked_address(address);
switch(this->masked_address(address)) {
if(target < 2) {
this->write_phase_ = false;
}
switch(target) {
default: return 0xff;
case 0: return this->read_vram();
case 1: return this->read_register();