mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 03:32:01 +00:00
DSKLEN has to be written twice.
This commit is contained in:
parent
6acddfdb98
commit
7733fef3bd
@ -922,14 +922,18 @@ void Chipset::DiskDMA::enqueue(uint16_t value, bool matches_sync) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Chipset::DiskDMA::set_length(uint16_t value) {
|
void Chipset::DiskDMA::set_length(uint16_t value) {
|
||||||
|
if(value == last_set_length_) {
|
||||||
dma_enable_ = value & 0x8000;
|
dma_enable_ = value & 0x8000;
|
||||||
write_ = value & 0x4000;
|
write_ = value & 0x4000;
|
||||||
length_ = value & 0x3fff;
|
length_ = value & 0x3fff;
|
||||||
buffer_read_ = buffer_write_ = 0;
|
buffer_read_ = buffer_write_ = 0;
|
||||||
|
|
||||||
if(dma_enable_) {
|
if(dma_enable_) {
|
||||||
LOG("Disk DMA [" << (write_ ? "write" : "read") << " of " << length_ << " to " << PADHEX(8) << pointer_[0]);
|
LOG("Disk DMA " << (write_ ? "write" : "read") << " of " << length_ << " to " << PADHEX(8) << pointer_[0]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
last_set_length_ = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Chipset::DiskDMA::advance() {
|
bool Chipset::DiskDMA::advance() {
|
||||||
|
@ -282,6 +282,7 @@ class Chipset: private ClockingHint::Observer {
|
|||||||
uint16_t length_;
|
uint16_t length_;
|
||||||
bool dma_enable_ = false;
|
bool dma_enable_ = false;
|
||||||
bool write_ = false;
|
bool write_ = false;
|
||||||
|
uint16_t last_set_length_ = 0;
|
||||||
|
|
||||||
std::array<uint16_t, 4> buffer_;
|
std::array<uint16_t, 4> buffer_;
|
||||||
size_t buffer_read_ = 0, buffer_write_ = 0;
|
size_t buffer_read_ = 0, buffer_write_ = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user