machine/intelfsh.cpp: Support reading the busy/ready pin for Flash chips that have one. [R. Belmont]

This commit is contained in:
arbee 2023-09-01 22:53:08 -04:00
parent 747f93d3a2
commit e81c0d609a
2 changed files with 12 additions and 0 deletions

View File

@ -317,6 +317,15 @@ void intelfsh_device::device_start()
save_pointer( &m_data[0], "m_data", m_size);
}
//-------------------------------------------------
// is_ready - emulates the *Busy/Ready pin on some
// flash devices.
//-------------------------------------------------
bool intelfsh_device::is_ready()
{
return (m_status & 0x80) ? true : false;
}
//-------------------------------------------------
// delay_tick - handle delayed commands/events
@ -332,6 +341,7 @@ TIMER_CALLBACK_MEMBER(intelfsh_device::delay_tick)
case FM_ERASEAMD4:
m_flash_mode = FM_NORMAL;
m_status = 0x80;
break;
}
}

View File

@ -15,6 +15,8 @@ class intelfsh_device : public device_t,
public:
uint8_t *base() { return &m_data[0]; }
bool is_ready();
protected:
// construction/destruction
intelfsh_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t bits, uint32_t size, uint8_t maker_id, uint16_t device_id);