CD-ROM emulation now reads multiple sectors at once.

This commit is contained in:
SarahW 2018-03-04 13:59:39 +00:00
commit bab6695b2c
7 changed files with 59 additions and 50 deletions

View file

@ -409,13 +409,13 @@ static void ioctl_load(void)
cdrom_capacity = ioctl_get_last_block(0, 0, 4096, 0);
}
static int ioctl_readsector(uint8_t *b, int sector)
static int ioctl_readsector(uint8_t *b, int sector, int count)
{
if (ioctl_fd <= 0)
return -1;
lseek(ioctl_fd, sector*2048, SEEK_SET);
read(ioctl_fd, b, 2048);
read(ioctl_fd, b, count*2048);
return 0;
}