mirror of
https://github.com/holub/mame
synced 2025-06-07 05:13:46 +03:00
Merge pull request #14 from shattered/master
mc1502: restore fdc support for newer hw revisions with bios 5.3x
This commit is contained in:
commit
b1c7c0dc22
@ -168,6 +168,20 @@ READ8_MEMBER( mc1502_fdc_device::mc1502_fdc_r )
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
READ8_MEMBER( mc1502_fdc_device::mc1502_fdcv2_r )
|
||||||
|
{
|
||||||
|
UINT8 data = 0xff;
|
||||||
|
|
||||||
|
switch( offset )
|
||||||
|
{
|
||||||
|
case 0: data = mc1502_wd17xx_aux_r(); break;
|
||||||
|
case 1: data = mc1502_wd17xx_motor_r(); break;
|
||||||
|
case 2: data = mc1502_wd17xx_drq_r(); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER( mc1502_fdc_device::mc1502_fdc_w )
|
WRITE8_MEMBER( mc1502_fdc_device::mc1502_fdc_w )
|
||||||
{
|
{
|
||||||
switch( offset )
|
switch( offset )
|
||||||
@ -187,18 +201,6 @@ mc1502_fdc_device::mc1502_fdc_device(const machine_config &mconfig, const char *
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
AM_RANGE(0x004c, 0x004c) AM_READWRITE(mc1502_wd17xx_aux_r, mc1502_wd17xx_aux_w)
|
|
||||||
AM_RANGE(0x004d, 0x004d) AM_READ(mc1502_wd17xx_motor_r)
|
|
||||||
AM_RANGE(0x004e, 0x004e) AM_READ(mc1502_wd17xx_drq_r) // blocking read!
|
|
||||||
AM_RANGE(0x0048, 0x004b) AM_DEVREADWRITE("vg93", fd1793_t, read, write)
|
|
||||||
|
|
||||||
AM_RANGE(0x0100, 0x0100) AM_READWRITE(mc1502_wd17xx_aux_r, mc1502_wd17xx_aux_w)
|
|
||||||
AM_RANGE(0x0108, 0x0108) AM_READ(mc1502_wd17xx_drq_r) // blocking read!
|
|
||||||
AM_RANGE(0x010a, 0x010a) AM_READ(mc1502_wd17xx_motor_r)
|
|
||||||
AM_RANGE(0x010c, 0x010f) AM_DEVREADWRITE("vg93", fd1793_t, read, write)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_start - device-specific startup
|
// device_start - device-specific startup
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -207,28 +209,18 @@ void mc1502_fdc_device::device_start()
|
|||||||
{
|
{
|
||||||
set_isa_device();
|
set_isa_device();
|
||||||
|
|
||||||
// BIOS 5.0, 5.2
|
// BIOS 5.0-5.2x
|
||||||
m_isa->install_device(0x010c, 0x010f, 0, 0,
|
m_isa->install_device(0x010c, 0x010f, 0, 0,
|
||||||
READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read),
|
READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read),
|
||||||
WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) );
|
WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) );
|
||||||
m_isa->install_device(0x0100, 0x010b, 0, 0, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) );
|
m_isa->install_device(0x0100, 0x010b, 0, 0, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) );
|
||||||
// BIOS 5.31, 5.33
|
|
||||||
/*
|
// BIOS 5.3x
|
||||||
m_isa->install_device(0x010c, 0x010f, 0, 0,
|
m_isa->install_device(0x0048, 0x004b, 0, 0,
|
||||||
READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read),
|
READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read),
|
||||||
WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) );
|
WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) );
|
||||||
m_isa->install_device(0x0100, 0x010b, 0, 0, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) );
|
m_isa->install_device(0x004c, 0x004f, 0, 0, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdcv2_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) );
|
||||||
*/
|
|
||||||
|
|
||||||
motor_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mc1502_fdc_device::motor_callback),this));
|
motor_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mc1502_fdc_device::motor_callback),this));
|
||||||
motor_on = 0;
|
motor_on = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
|
||||||
// device_reset - device-specific reset
|
|
||||||
//-------------------------------------------------
|
|
||||||
|
|
||||||
void mc1502_fdc_device::device_reset()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
@ -39,13 +39,13 @@ public:
|
|||||||
TIMER_CALLBACK_MEMBER( motor_callback );
|
TIMER_CALLBACK_MEMBER( motor_callback );
|
||||||
|
|
||||||
DECLARE_READ8_MEMBER(mc1502_fdc_r);
|
DECLARE_READ8_MEMBER(mc1502_fdc_r);
|
||||||
|
DECLARE_READ8_MEMBER(mc1502_fdcv2_r);
|
||||||
DECLARE_WRITE8_MEMBER(mc1502_fdc_w);
|
DECLARE_WRITE8_MEMBER(mc1502_fdc_w);
|
||||||
DECLARE_WRITE_LINE_MEMBER( mc1502_fdc_irq_drq );
|
DECLARE_WRITE_LINE_MEMBER( mc1502_fdc_irq_drq );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
virtual void device_reset();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
required_device<fd1793_t> m_fdc;
|
required_device<fd1793_t> m_fdc;
|
||||||
|
Loading…
Reference in New Issue
Block a user