--- nono/vm/iodevstream.cpp 2026/04/29 17:05:28 1.1 +++ nono/vm/iodevstream.cpp 2026/04/29 17:05:41 1.1.1.2 @@ -19,18 +19,18 @@ IODeviceStream::~IODeviceStream() busdata IODeviceStream::ReadN(busaddr size) { - busaddr addr = busaddr(offset) | size | BusAddr::SRead; + busaddr ba = busaddr(addr) | size | BusAddr::SRead; busdata data; do { - busdata bd = dev->Read(addr); + busdata bd = dev->Read(ba); if (__predict_false(bd.IsBusErr())) { return bd; } - data |= MainbusDevice::DYNAMIC_BUS_SIZING_R(addr, bd); - } while (addr.GetSize() != 0); + data |= MainbusDevice::DYNAMIC_BUS_SIZING_R(ba, bd); + } while (ba.GetSize() != 0); - offset += size.GetSize(); + addr += size.GetSize(); data |= busdata(size.Get()); return data; } @@ -40,16 +40,16 @@ IODeviceStream::ReadN(busaddr size) busdata IODeviceStream::WriteN(busaddr size, uint32 data) { - busaddr addr = busaddr(offset) | size | BusAddr::SWrite; + busaddr ba = busaddr(addr) | size | BusAddr::SWrite; do { - busdata r = dev->Write(addr, data); + busdata r = dev->Write(ba, data); if (__predict_false(r.IsBusErr())) { return r; } - MainbusDevice::DYNAMIC_BUS_SIZING_W(addr, data, r); - } while (addr.GetSize() != 0); + MainbusDevice::DYNAMIC_BUS_SIZING_W(ba, data, r); + } while (ba.GetSize() != 0); - offset += size.GetSize(); + addr += size.GetSize(); return 0; } @@ -59,8 +59,8 @@ IODeviceStream::WriteMem(const void *src { auto mainram = dynamic_cast(dev); if (mainram) { - mainram->WriteMem(offset, src, len); - offset += len; + mainram->WriteMem(addr, src, len); + addr += len; } else { const uint8 *s = (const uint8 *)src; for (int i = 0; i < len; i++) {