mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-05 05:34:20 +00:00
Yamaha: don't touch address at all unless a RAM access.
This commit is contained in:
parent
8768ee1504
commit
914a9e0c84
@ -921,21 +921,26 @@ void Base<personality>::write_register(uint8_t value) {
|
|||||||
|
|
||||||
// The RAM pointer is always set on a second write, regardless of
|
// The RAM pointer is always set on a second write, regardless of
|
||||||
// whether the caller is intending to enqueue a VDP operation.
|
// whether the caller is intending to enqueue a VDP operation.
|
||||||
// If this is a Yamaha VDP then the latched byte isn't set as part
|
// If this isn't a Yamaha VDP then the RAM address is updated
|
||||||
// of the address until now.
|
// regardless of whether this turns out to be a register access.
|
||||||
//
|
//
|
||||||
// The top two bits are used to determine the type of write; only
|
// The top two bits are used to determine the type of write; only
|
||||||
// the lower six are actual address.
|
// the lower six are actual address.
|
||||||
if constexpr (is_yamaha_vdp(personality)) {
|
if constexpr (!is_yamaha_vdp(personality)) {
|
||||||
install_field<0>(ram_pointer_, low_write_);
|
|
||||||
}
|
|
||||||
install_field<8, 6>(ram_pointer_, value);
|
install_field<8, 6>(ram_pointer_, value);
|
||||||
|
}
|
||||||
|
|
||||||
write_phase_ = false;
|
write_phase_ = false;
|
||||||
if(value & 0x80) {
|
if(value & 0x80) {
|
||||||
commit_register(value, low_write_);
|
commit_register(value, low_write_);
|
||||||
} else {
|
} else {
|
||||||
// This is an access via the RAM pointer.
|
// This is an access via the RAM pointer; if this is a Yamaha VDP then update
|
||||||
|
// the low 14-bits of the RAM pointer now.
|
||||||
|
if constexpr (is_yamaha_vdp(personality)) {
|
||||||
|
install_field<0>(ram_pointer_, low_write_);
|
||||||
|
install_field<8, 6>(ram_pointer_, value);
|
||||||
|
}
|
||||||
|
|
||||||
if(!(value & 0x40)) {
|
if(!(value & 0x40)) {
|
||||||
// A read request is enqueued upon setting the address; conversely a write
|
// A read request is enqueued upon setting the address; conversely a write
|
||||||
// won't be enqueued unless and until some actual data is supplied.
|
// won't be enqueued unless and until some actual data is supplied.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user