diff --git a/rp06.cpp b/rp06.cpp index 1005e4b..d97b56f 100644 --- a/rp06.cpp +++ b/rp06.cpp @@ -182,11 +182,12 @@ void rp06::write_word(const uint16_t addr, uint16_t v) uint32_t nw = 65536 - registers[reg_num(RP06_WC)]; uint32_t nb = nw * 2; - DOLOG(debug, false, "RP06: reading %u bytes from %u (dec) to %06o (oct)", nw, offs, addr); + uint8_t xfer_buffer[SECTOR_SIZE] { }; + uint32_t end_offset = offs + nb; + for(uint32_t cur_offset = offs; cur_offsetread(cur_offset, cur_n, xfer_buffer, SECTOR_SIZE)) { DOLOG(ll_error, true, "RP06 read error %s from %u", strerror(errno), cur_offset);