Skip to content

Commit

Permalink
intelfsh: Add SST_39SF010 variant, add missing address mask check to …
Browse files Browse the repository at this point in the history
…erase command
  • Loading branch information
startaq committed Nov 29, 2024
1 parent 84159fe commit 8850e57
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/devices/machine/intelfsh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ DEFINE_DEVICE_TYPE(TMS_29F040, tms_29f040_device, "t
DEFINE_DEVICE_TYPE(PANASONIC_MN63F805MNP, panasonic_mn63f805mnp_device, "panasonic_mn63f805mnp", "Panasonic MN63F805MNP Flash")
DEFINE_DEVICE_TYPE(SANYO_LE26FV10N1TS, sanyo_le26fv10n1ts_device, "sanyo_le26fv10n1ts", "Sanyo LE26FV10N1TS Flash")
DEFINE_DEVICE_TYPE(SST_28SF040, sst_28sf040_device, "sst_28sf040", "SST 28SF040 Flash")
DEFINE_DEVICE_TYPE(SST_39SF010, sst_39sf010_device, "sst_39sf010", "SST 39SF010 Flash")
DEFINE_DEVICE_TYPE(SST_39SF040, sst_39sf040_device, "sst_39sf040", "SST 39SF040 Flash")
DEFINE_DEVICE_TYPE(SST_39VF020, sst_39vf020_device, "sst_39vf020", "SST 39VF020 Flash")
DEFINE_DEVICE_TYPE(SST_49LF020, sst_49lf020_device, "sst_49lf020", "SST 49LF020 Flash")
Expand Down Expand Up @@ -271,6 +272,9 @@ sanyo_le26fv10n1ts_device::sanyo_le26fv10n1ts_device(const machine_config &mconf
sst_28sf040_device::sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: intelfsh8_device(mconfig, SST_28SF040, tag, owner, clock, 0x80000, MFG_SST, 0x04) { }

sst_39sf010_device::sst_39sf010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: intelfsh8_device(mconfig, SST_39SF010, tag, owner, clock, 0x20000, MFG_SST, 0xb5) { m_addrmask = 0x7fff; }

sst_39sf040_device::sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: intelfsh8_device(mconfig, SST_39SF040, tag, owner, clock, 0x80000, MFG_SST, 0xb7) { m_addrmask = 0x7fff; }

Expand Down Expand Up @@ -798,6 +802,10 @@ void intelfsh_device::write_full(uint32_t address, uint32_t data)
{
m_flash_mode = FM_ERASEAMD3;
}
else if( ( address & m_addrmask ) == 0x2aaa && ( data & 0xff ) == 0x55 && m_addrmask )
{
m_flash_mode = FM_ERASEAMD3;
}
else
{
logerror( "unexpected %08x=%02x in FM_ERASEAMD2\n", address, data & 0xff );
Expand Down
7 changes: 7 additions & 0 deletions src/devices/machine/intelfsh.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ class sst_28sf040_device : public intelfsh8_device
sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
};

class sst_39sf010_device : public intelfsh8_device
{
public:
sst_39sf010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
};

class sst_39sf040_device : public intelfsh8_device
{
public:
Expand Down Expand Up @@ -418,6 +424,7 @@ DECLARE_DEVICE_TYPE(TMS_29F040, tms_29f040_device)
DECLARE_DEVICE_TYPE(PANASONIC_MN63F805MNP, panasonic_mn63f805mnp_device)
DECLARE_DEVICE_TYPE(SANYO_LE26FV10N1TS, sanyo_le26fv10n1ts_device)
DECLARE_DEVICE_TYPE(SST_28SF040, sst_28sf040_device)
DECLARE_DEVICE_TYPE(SST_39SF010, sst_39sf010_device)
DECLARE_DEVICE_TYPE(SST_39SF040, sst_39sf040_device)
DECLARE_DEVICE_TYPE(SST_39VF020, sst_39vf020_device)
DECLARE_DEVICE_TYPE(SST_49LF020, sst_49lf020_device)
Expand Down

0 comments on commit 8850e57

Please sign in to comment.