intelfsh.cpp: sst 49lf020 does not support certain commands in certain states (nw)

This commit is contained in:
yz70s 2019-11-24 17:34:41 +01:00
parent 8c4f10d3aa
commit ffc1b9a49f

View File

@ -702,11 +702,19 @@ void intelfsh_device::write_full(uint32_t address, uint32_t data)
m_flash_mode = FM_WRITEPART1;
break;
case 0x50: // clear status reg
m_status = 0x80;
m_flash_mode = FM_READSTATUS;
if ((m_type == FLASH_SST_49LF020) && (m_flash_mode == FM_NORMAL))
logerror("Invalid flash mode byte %x\n", data & 0xff);
else
{
m_status = 0x80;
m_flash_mode = FM_READSTATUS;
}
break;
case 0x20: // block erase
m_flash_mode = FM_CLEARPART1;
if (m_type == FLASH_SST_49LF020)
logerror("Unknown flash mode byte %x\n", data & 0xff);
else
m_flash_mode = FM_CLEARPART1;
break;
case 0x60: // set master lock
m_flash_mode = FM_SETMASTER;