fill buffer with data from memory before writing it to disk
This commit is contained in:
parent
4039c8f274
commit
82c7541686
1 changed files with 9 additions and 0 deletions
9
rl02.cpp
9
rl02.cpp
|
@ -213,6 +213,15 @@ void rl02::writeWord(const uint16_t addr, uint16_t v)
|
||||||
while(count > 0) {
|
while(count > 0) {
|
||||||
uint32_t cur = std::min(uint32_t(sizeof xfer_buffer), count);
|
uint32_t cur = std::min(uint32_t(sizeof xfer_buffer), count);
|
||||||
|
|
||||||
|
for(uint32_t i=0; i<cur;) {
|
||||||
|
// BA and MPR are increased by 2
|
||||||
|
xfer_buffer[i++] = b->readUnibusByte(memory_address++);
|
||||||
|
xfer_buffer[i++] = b->readUnibusByte(memory_address++);
|
||||||
|
|
||||||
|
// update_bus_address(memory_address);
|
||||||
|
mpr[0]++;
|
||||||
|
}
|
||||||
|
|
||||||
if (!fhs.at(device)->write(temp_disk_offset, cur, xfer_buffer)) {
|
if (!fhs.at(device)->write(temp_disk_offset, cur, xfer_buffer)) {
|
||||||
DOLOG(ll_error, true, "RL02: write error, device %d, disk offset %u, read size %u, cylinder %d, head %d, sector %d", device, temp_disk_offset, cur, track, head, sector);
|
DOLOG(ll_error, true, "RL02: write error, device %d, disk offset %u, read size %u, cylinder %d, head %d, sector %d", device, temp_disk_offset, cur, track, head, sector);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue