mirror of
https://github.com/holub/mame
synced 2025-05-25 15:25:33 +03:00
WD17xx: Connected Side Select Output for variants that support it. [Curt Coder]
This commit is contained in:
parent
3d2cda66bb
commit
c1e7e1873d
@ -140,6 +140,9 @@
|
|||||||
2011-Jun-24 Curt Coder
|
2011-Jun-24 Curt Coder
|
||||||
- Added device types for all known variants, and enforced inverted DAL lines.
|
- Added device types for all known variants, and enforced inverted DAL lines.
|
||||||
|
|
||||||
|
2011-Sep-18 Curt Coder
|
||||||
|
- Connected Side Select Output for variants that support it.
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- What happens if a track is read that doesn't have any id's on it?
|
- What happens if a track is read that doesn't have any id's on it?
|
||||||
(e.g. unformatted disc)
|
(e.g. unformatted disc)
|
||||||
@ -1003,7 +1006,22 @@ static int wd17xx_find_sector(device_t *device)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void wd17xx_side_compare(device_t *device, UINT8 command)
|
||||||
|
{
|
||||||
|
wd1770_state *w = get_safe_token(device);
|
||||||
|
|
||||||
|
if (command & FDC_SIDE_CMP_T)
|
||||||
|
{
|
||||||
|
w->head = (command & FDC_SIDE_CMP_S) ? 1 : 0;
|
||||||
|
|
||||||
|
if (wd17xx_has_side_select(device))
|
||||||
|
wd17xx_set_side(device, w->head);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
w->head = ~0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* read a sector */
|
/* read a sector */
|
||||||
static void wd17xx_read_sector(device_t *device)
|
static void wd17xx_read_sector(device_t *device)
|
||||||
@ -1012,10 +1030,7 @@ static void wd17xx_read_sector(device_t *device)
|
|||||||
w->data_offset = 0;
|
w->data_offset = 0;
|
||||||
|
|
||||||
/* side compare? */
|
/* side compare? */
|
||||||
if (w->read_cmd & 0x02)
|
wd17xx_side_compare(device, w->read_cmd);
|
||||||
w->head = (w->read_cmd & 0x08) ? 1 : 0;
|
|
||||||
else
|
|
||||||
w->head = ~0;
|
|
||||||
|
|
||||||
if (wd17xx_find_sector(device))
|
if (wd17xx_find_sector(device))
|
||||||
{
|
{
|
||||||
@ -1067,10 +1082,7 @@ static void wd17xx_write_sector(device_t *device)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* side compare? */
|
/* side compare? */
|
||||||
if (w->write_cmd & 0x02)
|
wd17xx_side_compare(device, w->write_cmd);
|
||||||
w->head = (w->write_cmd & 0x08) ? 1 : 0;
|
|
||||||
else
|
|
||||||
w->head = ~0;
|
|
||||||
|
|
||||||
/* find sector */
|
/* find sector */
|
||||||
if (wd17xx_find_sector(device))
|
if (wd17xx_find_sector(device))
|
||||||
@ -1173,10 +1185,7 @@ static TIMER_CALLBACK( wd17xx_write_sector_callback )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* side compare? */
|
/* side compare? */
|
||||||
if (w->write_cmd & 0x02)
|
wd17xx_side_compare(device, w->write_cmd);
|
||||||
w->head = (w->write_cmd & 0x08) ? 1 : 0;
|
|
||||||
else
|
|
||||||
w->head = ~0;
|
|
||||||
|
|
||||||
/* attempt to find it first before getting data from cpu */
|
/* attempt to find it first before getting data from cpu */
|
||||||
if (wd17xx_find_sector(device))
|
if (wd17xx_find_sector(device))
|
||||||
|
Loading…
Reference in New Issue
Block a user