mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
nscsi_harddisk_device: track the current block LBA on writes (#4463)
* nscsi_harddisk_device: track the current block LBA on writes * nscsi_harddisk_device: track the current block LBA on writes
This commit is contained in:
parent
2a09574eff
commit
e0adc2e60e
@ -92,9 +92,9 @@ void nscsi_harddisk_device::scsi_put_data(int id, int pos, uint8_t data)
|
||||
|
||||
int offset = pos % bytes_per_sector;
|
||||
block[offset] = data;
|
||||
int clba = lba + pos / bytes_per_sector;
|
||||
cur_lba = lba + pos / bytes_per_sector;
|
||||
if(offset == bytes_per_sector-1) {
|
||||
if(!hard_disk_write(harddisk, clba, block))
|
||||
if(!hard_disk_write(harddisk, cur_lba, block))
|
||||
LOG("HD WRITE ERROR !\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user