summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
authorGravatarGravatar yz70s <yz70s@users.noreply.github.com>2019-11-24 17:34:41 +0100
committerGravatarGravatar yz70s <yz70s@users.noreply.github.com>2019-11-24 17:49:50 +0100
commitffc1b9a49fcf37ab833cfa4634f56dfffdfa7cae (patch)
tree52d6b4e25d8f2c926e5affa3067d6b3068ba4120 /src/devices
parent8c4f10d3aa59fd8a49a5cedb4dcee37775fe6b20 (diff)
intelfsh.cpp: sst 49lf020 does not support certain commands in certain states (nw)
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/machine/intelfsh.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/devices/machine/intelfsh.cpp b/src/devices/machine/intelfsh.cpp
index f0cacb6c7a6..c08d9f800ac 100644
--- a/src/devices/machine/intelfsh.cpp
+++ b/src/devices/machine/intelfsh.cpp
@@ -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;