mirror of
https://github.com/holub/mame
synced 2025-10-05 16:50:57 +03:00
atarifdc.cpp: fixed drive lookup (nw) (#3051)
This commit is contained in:
parent
bcc66f3b07
commit
08588682d4
@ -109,10 +109,23 @@ static void _atari_load_proc(device_image_interface &image, bool is_created)
|
||||
atarifdc->atari_load_proc(image, is_created);
|
||||
}
|
||||
|
||||
static int atari_fdc_get_drive(device_t *image)
|
||||
{
|
||||
int drive = -1;
|
||||
if (strcmp(image->tag(), ":fdc:" FLOPPY_0) == 0) drive = 0;
|
||||
if (strcmp(image->tag(), ":fdc:" FLOPPY_1) == 0) drive = 1;
|
||||
if (strcmp(image->tag(), ":fdc:" FLOPPY_2) == 0) drive = 2;
|
||||
if (strcmp(image->tag(), ":fdc:" FLOPPY_3) == 0) drive = 3;
|
||||
return drive;
|
||||
}
|
||||
|
||||
void atari_fdc_device::atari_load_proc(device_image_interface &image, bool is_created)
|
||||
{
|
||||
int id = floppy_get_drive(&image.device());
|
||||
int id = atari_fdc_get_drive(&image.device());
|
||||
int size, i;
|
||||
|
||||
if (id == -1)
|
||||
return;
|
||||
|
||||
m_drv[id].image = std::make_unique<uint8_t[]>(MAXSIZE);
|
||||
if (!m_drv[id].image)
|
||||
|
Loading…
Reference in New Issue
Block a user