mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Attempt to log dropped indirect writes.
This commit is contained in:
parent
4efda108c6
commit
9c57bfd58d
@ -727,9 +727,8 @@ void Base<personality>::write_register(uint8_t value) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 17:
|
case 17:
|
||||||
LOG("TODO: Yamaha indirect addressing; " << PADHEX(2) << +low_write_);
|
Storage<personality>::increment_indirect_register_ = low_write_ & 0x80;
|
||||||
// b7: 1 = disable autoincrementing; 0 = enable.
|
Storage<personality>::indirect_register_ = low_write_ & 0x3f;
|
||||||
// b5–b0: register number
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18:
|
case 18:
|
||||||
@ -829,9 +828,14 @@ void Base<personality>::write_palette(uint8_t value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <Personality personality>
|
template <Personality personality>
|
||||||
void Base<personality>::write_register_indirect(uint8_t value) {
|
void Base<personality>::write_register_indirect([[maybe_unused]] uint8_t value) {
|
||||||
LOG("Register indirect write TODO");
|
if constexpr (is_yamaha_vdp(personality)) {
|
||||||
(void)value;
|
LOG("TODO: indirect write of " << PADHEX(2) << +value << " to " << PADHEX(2) << Storage<personality>::indirect_register_);
|
||||||
|
|
||||||
|
if(Storage<personality>::increment_indirect_register_) {
|
||||||
|
Storage<personality>::indirect_register_ = (Storage<personality>::indirect_register_ + 1) & 0x3f;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <Personality personality>
|
template <Personality personality>
|
||||||
|
@ -128,6 +128,9 @@ template <> struct Storage<Personality::TMS9918A> {
|
|||||||
// Yamaha-specific storage.
|
// Yamaha-specific storage.
|
||||||
template <Personality personality> struct Storage<personality, std::enable_if_t<is_yamaha_vdp(personality)>> {
|
template <Personality personality> struct Storage<personality, std::enable_if_t<is_yamaha_vdp(personality)>> {
|
||||||
int selected_status_ = 0;
|
int selected_status_ = 0;
|
||||||
|
|
||||||
|
int indirect_register_ = 0;
|
||||||
|
bool increment_indirect_register_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Master System-specific storage.
|
// Master System-specific storage.
|
||||||
|
Loading…
Reference in New Issue
Block a user