mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Adds half-updating of RAM pointer.
This emulator now passes the first screen of the SMS VDP test.
This commit is contained in:
parent
63fb3f03d1
commit
9f69dbf31a
@ -412,12 +412,15 @@ void TMS9918::set_register(int address, uint8_t value) {
|
||||
if(!write_phase_) {
|
||||
low_write_ = value;
|
||||
write_phase_ = true;
|
||||
|
||||
// The initial write should half update the access pointer.
|
||||
ram_pointer_ = (ram_pointer_ & 0xff00) | low_write_;
|
||||
return;
|
||||
}
|
||||
|
||||
// The RAM pointer is always set on a second write, regardless of
|
||||
// whether the caller is intending to enqueue a VDP operation.
|
||||
ram_pointer_ = static_cast<uint16_t>(low_write_ | (value << 8));
|
||||
ram_pointer_ = (ram_pointer_ & 0x00ff) | static_cast<uint16_t>(value << 8);
|
||||
|
||||
write_phase_ = false;
|
||||
if(value & 0x80) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user