mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
ceres: hd image fixes
This commit is contained in:
parent
cd85730b98
commit
829cf9afe4
@ -100,7 +100,7 @@ protected:
|
||||
|
||||
required_device<wd2797_device> m_fdc;
|
||||
optional_device_array<floppy_image_device, 4> m_fdd;
|
||||
optional_device_array<harddisk_image_device, 3> m_hdd;
|
||||
required_device_array<harddisk_image_device, 3> m_hdd;
|
||||
|
||||
required_device<screen_device> m_screen;
|
||||
required_shared_ptr<u32> m_vram;
|
||||
@ -191,6 +191,9 @@ void ceres1_state::wfc_command(u8 command)
|
||||
m_wfc_status &= ~WFC_S_ERR;
|
||||
m_wfc_error = 0;
|
||||
|
||||
if (((m_wfc_sdh >> 3) & 3) == 3)
|
||||
return;
|
||||
|
||||
harddisk_image_device *hdf = m_hdd[(m_wfc_sdh >> 3) & 3];
|
||||
|
||||
switch (command >> 4)
|
||||
@ -201,14 +204,14 @@ void ceres1_state::wfc_command(u8 command)
|
||||
case 2:
|
||||
LOG("read sector drive %d chs %d,%d,%d count %d\n",
|
||||
(m_wfc_sdh >> 3) & 3, m_wfc_cylinder & 0x3ff, (m_wfc_sdh >> 0) & 7, m_wfc_sector, m_wfc_count);
|
||||
if (hdf)
|
||||
if (hdf->exists())
|
||||
hdf->read(get_lbasector(hdf), m_wfc_sram);
|
||||
m_wfc_offset = 0;
|
||||
break;
|
||||
case 3:
|
||||
LOG("write sector drive %d chs %d,%d,%d count %d\n",
|
||||
(m_wfc_sdh >> 3) & 3, m_wfc_cylinder & 0x3ff, (m_wfc_sdh >> 0) & 7, m_wfc_sector, m_wfc_count);
|
||||
if (hdf)
|
||||
if (hdf->exists())
|
||||
hdf->write(get_lbasector(hdf), m_wfc_sram);
|
||||
m_wfc_offset = 0;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user