summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2019-12-20 14:02:40 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2019-12-20 14:02:40 +1100
commita734555ec1e6eb58d4d6b0094f6a19bffdb77d9a (patch)
tree50d17b5ad222e733c4e6429f973974c82c630483 /src
parent9d9631e23e0171914398e50fbdcf360ef3b8d5a3 (diff)
parent825cd426397585aaf7600db160ba1569e42b3f51 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src')
-rw-r--r--src/devices/machine/intelfsh.cpp42
-rw-r--r--src/devices/machine/intelfsh.h8
-rw-r--r--src/lib/util/coretmpl.h128
-rw-r--r--src/mame/drivers/dccons.cpp39
-rw-r--r--src/mame/includes/dccons.h8
5 files changed, 133 insertions, 92 deletions
diff --git a/src/devices/machine/intelfsh.cpp b/src/devices/machine/intelfsh.cpp
index c08d9f800ac..73ff954a02a 100644
--- a/src/devices/machine/intelfsh.cpp
+++ b/src/devices/machine/intelfsh.cpp
@@ -92,6 +92,7 @@ DEFINE_DEVICE_TYPE(AMD_29LV200T, amd_29lv200t_device, "amd_29l
DEFINE_DEVICE_TYPE(FUJITSU_29F160T, fujitsu_29f160t_device, "fujitsu_29f160t", "Fujitsu 29F160T Flash")
DEFINE_DEVICE_TYPE(FUJITSU_29F016A, fujitsu_29f016a_device, "fujitsu_29f016a", "Fujitsu 29F016A Flash")
DEFINE_DEVICE_TYPE(FUJITSU_29DL16X, fujitsu_29dl16x_device, "fujitsu_29dl16x", "Fujitsu 29DL16X Flash")
+DEFINE_DEVICE_TYPE(FUJITSU_29LV002TC, fujitsu_29lv002tc_device, "fujitsu_29lv002tc", "Fujitsu 29LV002TC Flash")
DEFINE_DEVICE_TYPE(INTEL_E28F400B, intel_e28f400b_device, "intel_e28f400b", "Intel E28F400B Flash")
DEFINE_DEVICE_TYPE(MACRONIX_29L001MC, macronix_29l001mc_device, "macronix_29l001mc", "Macronix 29L001MC Flash")
DEFINE_DEVICE_TYPE(MACRONIX_29LV160TMC, macronix_29lv160tmc_device, "macronix_29lv160tmc", "Macronix 29LV160TMC Flash")
@@ -286,6 +287,12 @@ intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type
m_maker_id = MFG_FUJITSU;
m_device_id = 0x35;
break;
+ case FLASH_FUJITSU_29LV002TC:
+ m_bits = 8;
+ m_size = 0x40000;
+ m_maker_id = MFG_FUJITSU;
+ m_device_id = 0x40;
+ break;
case FLASH_INTEL_E28F008SA:
m_bits = 8;
m_size = 0x100000;
@@ -378,6 +385,9 @@ fujitsu_29f016a_device::fujitsu_29f016a_device(const machine_config &mconfig, co
fujitsu_29dl16x_device::fujitsu_29dl16x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: intelfsh8_device(mconfig, FUJITSU_29DL16X, tag, owner, clock, FLASH_FUJITSU_29DL16X) { }
+fujitsu_29lv002tc_device::fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : intelfsh8_device(mconfig, FUJITSU_29LV002TC, tag, owner, clock, FLASH_FUJITSU_29LV002TC) { }
+
sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: intelfsh8_device(mconfig, SHARP_LH28F016S, tag, owner, clock, FLASH_SHARP_LH28F016S) { }
@@ -883,7 +893,14 @@ void intelfsh_device::write_full(uint32_t address, uint32_t data)
(( address & 0xfff ) == 0xaaa && ( data & 0xff ) == 0x10 ) )
{
// chip erase
- memset(&m_data[0], 0xff, m_size);
+ if (m_maker_id == MFG_FUJITSU && m_device_id == 0x40)
+ {
+ // hardcoded for Dreamcast, TODO properly handle sector protection
+ memset(&m_data[0], 0xff, 0x3A000);
+ memset(&m_data[0x3C000], 0xff, 0x04000);
+ }
+ else
+ memset(&m_data[0], 0xff, m_size);
m_status = 1 << 3;
m_flash_mode = FM_ERASEAMD4;
@@ -939,6 +956,23 @@ void intelfsh_device::write_full(uint32_t address, uint32_t data)
m_timer->adjust( attotime::from_msec( 500 ) );
}
}
+ else if (m_maker_id == MFG_FUJITSU && m_device_id == 0x40)
+ {
+ constexpr u32 sectors[] = { 0x10000, 0x10000, 0x10000, 0x08000, 0x02000, 0x02000, 0x4000 };
+
+ u32 sec_num = 0;
+ u32 toffset = base;
+ while (toffset >= sectors[sec_num])
+ toffset -= sectors[sec_num++];
+ u32 sec_len = sectors[sec_num];
+
+ if (sec_num != 5) // hardcoded for Dreamcast, TODO properly handle sector protection
+ {
+ memset(&m_data[base & ~(sec_len - 1)], 0xff, sec_len);
+ }
+ m_erase_sector = address & ~(sec_len - 1);
+ m_timer->adjust(attotime::from_seconds(1));
+ }
else
{
memset(&m_data[base & ~0xffff], 0xff, 64 * 1024);
@@ -958,9 +992,13 @@ void intelfsh_device::write_full(uint32_t address, uint32_t data)
switch( m_bits )
{
case 8:
+ if (m_maker_id == MFG_FUJITSU && m_device_id == 0x40)
{
- m_data[address] = data;
+ if (address < 0x3a000 || address >= 0x3c000) // hardcoded for Dreamcast, TODO properly handle sector protection
+ m_data[address] &= data;
}
+ else
+ m_data[address] = data;
break;
default:
logerror( "FM_BYTEPROGRAM not supported when m_bits == %d\n", m_bits );
diff --git a/src/devices/machine/intelfsh.h b/src/devices/machine/intelfsh.h
index 2d459f59eed..cd52dc7ada5 100644
--- a/src/devices/machine/intelfsh.h
+++ b/src/devices/machine/intelfsh.h
@@ -20,6 +20,7 @@ public:
FLASH_FUJITSU_29F160T,
FLASH_FUJITSU_29F016A,
FLASH_FUJITSU_29DL16X,
+ FLASH_FUJITSU_29LV002TC,
FLASH_ATMEL_29C010,
FLASH_AMD_29F010,
FLASH_AMD_29F040,
@@ -161,6 +162,12 @@ public:
fujitsu_29dl16x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
};
+class fujitsu_29lv002tc_device : public intelfsh8_device
+{
+public:
+ fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+};
+
class atmel_29c010_device : public intelfsh8_device
{
public:
@@ -352,6 +359,7 @@ DECLARE_DEVICE_TYPE(AMD_29LV200T, amd_29lv200t_device)
DECLARE_DEVICE_TYPE(FUJITSU_29F160T, fujitsu_29f160t_device)
DECLARE_DEVICE_TYPE(FUJITSU_29F016A, fujitsu_29f016a_device)
DECLARE_DEVICE_TYPE(FUJITSU_29DL16X, fujitsu_29dl16x_device)
+DECLARE_DEVICE_TYPE(FUJITSU_29LV002TC, fujitsu_29lv002tc_device)
DECLARE_DEVICE_TYPE(INTEL_E28F400B, intel_e28f400b_device)
DECLARE_DEVICE_TYPE(MACRONIX_29L001MC, macronix_29l001mc_device)
DECLARE_DEVICE_TYPE(MACRONIX_29LV160TMC, macronix_29lv160tmc_device)
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h
index 6c8ac39b45c..87715dce120 100644
--- a/src/lib/util/coretmpl.h
+++ b/src/lib/util/coretmpl.h
@@ -45,7 +45,7 @@ template<typename T> constexpr T make_bitmask(unsigned int N)
// a simple_list is a singly-linked list whose 'next' pointer is owned
// by the object
-template<class _ElementType>
+template<class ElementType>
class simple_list final
{
public:
@@ -53,36 +53,31 @@ public:
{
public:
typedef int difference_type;
- typedef _ElementType value_type;
- typedef _ElementType *pointer;
- typedef _ElementType &reference;
+ typedef ElementType value_type;
+ typedef ElementType *pointer;
+ typedef ElementType &reference;
typedef std::forward_iterator_tag iterator_category;
// construction/destruction
auto_iterator() noexcept : m_current(nullptr) { }
- auto_iterator(_ElementType *ptr) noexcept : m_current(ptr) { }
+ auto_iterator(ElementType *ptr) noexcept : m_current(ptr) { }
// required operator overloads
bool operator==(const auto_iterator &iter) const noexcept { return m_current == iter.m_current; }
bool operator!=(const auto_iterator &iter) const noexcept { return m_current != iter.m_current; }
- _ElementType &operator*() const noexcept { return *m_current; }
- _ElementType *operator->() const noexcept { return m_current; }
- // note that _ElementType::next() must not return a const ptr
+ ElementType &operator*() const noexcept { return *m_current; }
+ ElementType *operator->() const noexcept { return m_current; }
+ // note that ElementType::next() must not return a const ptr
auto_iterator &operator++() noexcept { m_current = m_current->next(); return *this; }
auto_iterator operator++(int) noexcept { auto_iterator result(*this); m_current = m_current->next(); return result; }
private:
// private state
- _ElementType *m_current;
+ ElementType *m_current;
};
// construction/destruction
- simple_list() noexcept
- : m_head(nullptr)
- , m_tail(nullptr)
- , m_count(0)
- {
- }
+ simple_list() noexcept { }
~simple_list() noexcept { reset(); }
// we don't support deep copying
@@ -90,18 +85,19 @@ public:
simple_list &operator=(const simple_list &) = delete;
// but we do support cheap swap/move
- simple_list(simple_list &&list) : simple_list() { operator=(std::move(list)); }
+ simple_list(simple_list &&list) noexcept { operator=(std::move(list)); }
simple_list &operator=(simple_list &&list)
{
using std::swap;
swap(m_head, list.m_head);
swap(m_tail, list.m_tail);
swap(m_count, list.m_count);
+ return *this;
}
// simple getters
- _ElementType *first() const noexcept { return m_head; }
- _ElementType *last() const noexcept { return m_tail; }
+ ElementType *first() const noexcept { return m_head; }
+ ElementType *last() const noexcept { return m_tail; }
int count() const noexcept { return m_count; }
bool empty() const noexcept { return m_count == 0; }
@@ -117,7 +113,7 @@ public:
}
// add the given object to the head of the list
- _ElementType &prepend(_ElementType &object) noexcept
+ ElementType &prepend(ElementType &object) noexcept
{
object.m_next = m_head;
m_head = &object;
@@ -128,13 +124,13 @@ public:
}
// add the given list to the head of the list
- void prepend_list(simple_list<_ElementType> &list) noexcept
+ void prepend_list(simple_list<ElementType> &list) noexcept
{
int count = list.count();
if (count == 0)
return;
- _ElementType *tail = list.last();
- _ElementType *head = list.detach_all();
+ ElementType *tail = list.last();
+ ElementType *head = list.detach_all();
tail->m_next = m_head;
m_head = head;
if (m_tail == nullptr)
@@ -143,7 +139,7 @@ public:
}
// add the given object to the tail of the list
- _ElementType &append(_ElementType &object) noexcept
+ ElementType &append(ElementType &object) noexcept
{
object.m_next = nullptr;
if (m_tail != nullptr)
@@ -155,13 +151,13 @@ public:
}
// add the given list to the tail of the list
- void append_list(simple_list<_ElementType> &list) noexcept
+ void append_list(simple_list<ElementType> &list) noexcept
{
int count = list.count();
if (count == 0)
return;
- _ElementType *tail = list.last();
- _ElementType *head = list.detach_all();
+ ElementType *tail = list.last();
+ ElementType *head = list.detach_all();
if (m_tail != nullptr)
m_tail->m_next = head;
else
@@ -171,7 +167,7 @@ public:
}
// insert the given object after a particular object (nullptr means prepend)
- _ElementType &insert_after(_ElementType &object, _ElementType *insert_after) noexcept
+ ElementType &insert_after(ElementType &object, ElementType *insert_after) noexcept
{
if (insert_after == nullptr)
return prepend(object);
@@ -184,11 +180,11 @@ public:
}
// insert the given object before a particular object (nullptr means append)
- _ElementType &insert_before(_ElementType &object, _ElementType *insert_before) noexcept
+ ElementType &insert_before(ElementType &object, ElementType *insert_before) noexcept
{
if (insert_before == nullptr)
return append(object);
- for (_ElementType **curptr = &m_head; *curptr != nullptr; curptr = &(*curptr)->m_next)
+ for (ElementType **curptr = &m_head; *curptr != nullptr; curptr = &(*curptr)->m_next)
if (*curptr == insert_before)
{
object.m_next = insert_before;
@@ -202,10 +198,10 @@ public:
}
// replace an item in the list at the same location, and remove it
- _ElementType &replace_and_remove(_ElementType &object, _ElementType &toreplace) noexcept
+ ElementType &replace_and_remove(ElementType &object, ElementType &toreplace) noexcept
{
- _ElementType *prev = nullptr;
- for (_ElementType *cur = m_head; cur != nullptr; prev = cur, cur = cur->m_next)
+ ElementType *prev = nullptr;
+ for (ElementType *cur = m_head; cur != nullptr; prev = cur, cur = cur->m_next)
if (cur == &toreplace)
{
if (prev != nullptr)
@@ -222,9 +218,9 @@ public:
}
// detach the head item from the list, but don't free its memory
- _ElementType *detach_head() noexcept
+ ElementType *detach_head() noexcept
{
- _ElementType *result = m_head;
+ ElementType *result = m_head;
if (result != nullptr)
{
m_head = result->m_next;
@@ -236,10 +232,10 @@ public:
}
// detach the given item from the list, but don't free its memory
- _ElementType &detach(_ElementType &object) noexcept
+ ElementType &detach(ElementType &object) noexcept
{
- _ElementType *prev = nullptr;
- for (_ElementType *cur = m_head; cur != nullptr; prev = cur, cur = cur->m_next)
+ ElementType *prev = nullptr;
+ for (ElementType *cur = m_head; cur != nullptr; prev = cur, cur = cur->m_next)
if (cur == &object)
{
if (prev != nullptr)
@@ -255,34 +251,34 @@ public:
}
// detach the entire list, returning the head, but don't free memory
- _ElementType *detach_all() noexcept
+ ElementType *detach_all() noexcept
{
- _ElementType *result = m_head;
+ ElementType *result = m_head;
m_head = m_tail = nullptr;
m_count = 0;
return result;
}
// remove the given object and free its memory
- void remove(_ElementType &object) noexcept
+ void remove(ElementType &object) noexcept
{
global_free(&detach(object));
}
// find an object by index in the list
- _ElementType *find(int index) const noexcept
+ ElementType *find(int index) const noexcept
{
- for (_ElementType *cur = m_head; cur != nullptr; cur = cur->m_next)
+ for (ElementType *cur = m_head; cur != nullptr; cur = cur->m_next)
if (index-- == 0)
return cur;
return nullptr;
}
// return the index of the given object in the list
- int indexof(const _ElementType &object) const noexcept
+ int indexof(const ElementType &object) const noexcept
{
int index = 0;
- for (_ElementType *cur = m_head; cur != nullptr; cur = cur->m_next)
+ for (ElementType *cur = m_head; cur != nullptr; cur = cur->m_next)
{
if (cur == &object)
return index;
@@ -293,9 +289,9 @@ public:
private:
// internal state
- _ElementType * m_head; // head of the singly-linked list
- _ElementType * m_tail; // tail of the singly-linked list
- int m_count; // number of objects in the list
+ ElementType * m_head = nullptr; // head of the singly-linked list
+ ElementType * m_tail = nullptr; // tail of the singly-linked list
+ int m_count = 0; // number of objects in the list
};
@@ -304,38 +300,39 @@ private:
// a simple_list_wrapper wraps an existing object with a next pointer so it
// can live in a simple_list without requiring the object to have a next
// pointer
-template<class _ObjectType>
+template<class ObjectType>
class simple_list_wrapper
{
public:
template<class U> friend class simple_list;
// construction/destruction
- simple_list_wrapper(_ObjectType *object)
- : m_next(nullptr),
- m_object(object) { }
+ simple_list_wrapper(ObjectType *object)
+ : m_next(nullptr)
+ , m_object(object)
+ { }
// operators
- operator _ObjectType *() { return m_object; }
- operator _ObjectType *() const { return m_object; }
- _ObjectType *operator *() { return m_object; }
- _ObjectType *operator *() const { return m_object; }
+ operator ObjectType *() { return m_object; }
+ operator ObjectType *() const { return m_object; }
+ ObjectType *operator *() { return m_object; }
+ ObjectType *operator *() const { return m_object; }
// getters
simple_list_wrapper *next() const { return m_next; }
- _ObjectType *object() const { return m_object; }
+ ObjectType *object() const { return m_object; }
private:
// internal state
simple_list_wrapper * m_next;
- _ObjectType * m_object;
+ ObjectType * m_object;
};
// ======================> fixed_allocator
// a fixed_allocator is a simple class that maintains a free pool of objects
-template<class _ItemType>
+template<class ItemType>
class fixed_allocator
{
// we don't support deep copying
@@ -347,24 +344,24 @@ public:
fixed_allocator() { }
// allocate a new item, either by recycling an old one, or by allocating a new one
- _ItemType *alloc()
+ ItemType *alloc()
{
- _ItemType *result = m_freelist.detach_head();
+ ItemType *result = m_freelist.detach_head();
if (result == nullptr)
- result = global_alloc(_ItemType);
+ result = global_alloc(ItemType);
return result;
}
// reclaim an item by adding it to the free list
- void reclaim(_ItemType *item) { if (item != nullptr) m_freelist.append(*item); }
- void reclaim(_ItemType &item) { m_freelist.append(item); }
+ void reclaim(ItemType *item) { if (item != nullptr) m_freelist.append(*item); }
+ void reclaim(ItemType &item) { m_freelist.append(item); }
// reclaim all items from a list
- void reclaim_all(simple_list<_ItemType> &_list) { m_freelist.append_list(_list); }
+ void reclaim_all(simple_list<ItemType> &_list) { m_freelist.append_list(_list); }
private:
// internal state
- simple_list<_ItemType> m_freelist; // list of free objects
+ simple_list<ItemType> m_freelist; // list of free objects
};
@@ -798,6 +795,7 @@ public:
m_mapping.insert(it);
assert(m_elements.size() == m_size);
assert(m_mapping.size() == m_size);
+ return *this;
}
private:
diff --git a/src/mame/drivers/dccons.cpp b/src/mame/drivers/dccons.cpp
index eaadb7cb34c..65d4bb83878 100644
--- a/src/mame/drivers/dccons.cpp
+++ b/src/mame/drivers/dccons.cpp
@@ -366,22 +366,20 @@ WRITE64_MEMBER(dc_cons_state::dc_pdtra_w )
PDTRA = (data & 0xffff);
}
-#if 0
READ8_MEMBER(dc_cons_state::dc_flash_r)
{
- return m_dcflash->read(offset);
+ return m_dcflash->read(offset+0x20000);
}
WRITE8_MEMBER(dc_cons_state::dc_flash_w)
{
- m_dcflash->write(offset,data);
+ m_dcflash->write(offset+0x20000,data);
}
-#endif
void dc_cons_state::dc_map(address_map &map)
{
map(0x00000000, 0x001fffff).rom().nopw(); // BIOS
- map(0x00200000, 0x0021ffff).rom().region("dcflash", 0);//.rw(FUNC(dc_cons_state::dc_flash_r), FUNC(dc_cons_state::dc_flash_w));
+ map(0x00200000, 0x0021ffff).rw(FUNC(dc_cons_state::dc_flash_r), FUNC(dc_cons_state::dc_flash_w)).region("dcflash", 0x20000);
map(0x005f6800, 0x005f69ff).rw(FUNC(dc_cons_state::dc_sysctrl_r), FUNC(dc_cons_state::dc_sysctrl_w));
map(0x005f6c00, 0x005f6cff).m(m_maple, FUNC(maple_dc_device::amap));
map(0x005f7000, 0x005f701f).rw(m_ata, FUNC(ata_interface_device::cs1_r), FUNC(ata_interface_device::cs1_w)).umask64(0x0000ffff0000ffff);
@@ -647,7 +645,7 @@ void dc_cons_state::dc_base(machine_config &config)
MCFG_MACHINE_RESET_OVERRIDE(dc_cons_state,dc_console )
-// MACRONIX_29LV160TMC(config, "dcflash");
+ FUJITSU_29LV002TC(config, "dcflash");
MAPLE_DC(config, m_maple, 0, m_maincpu);
m_maple->irq_callback().set(FUNC(dc_state::maple_irq));
@@ -784,16 +782,16 @@ struct cid_record
ROM_START(dc)
DREAMCAST_COMMON_BIOS
- ROM_REGION64_LE(0x020000, "dcflash", 0)
- ROM_LOAD( "dcus_ntsc.bin", 0x000000, 0x020000, CRC(4136c25b) SHA1(1efa00ab9d8357a9f91e5be931a3efd6236f2b79) ) // dumped from VA2.4 mobo with 1.022 BIOS
+ ROM_REGION64_LE(0x040000, "dcflash", ROMREGION_ERASEFF)
+ ROM_LOAD( "dcus_ntsc.bin", 0x020000, 0x020000, CRC(4136c25b) SHA1(1efa00ab9d8357a9f91e5be931a3efd6236f2b79) ) // dumped from VA2.4 mobo with 1.022 BIOS
ROM_END
ROM_START( dceu )
DREAMCAST_COMMON_BIOS
- ROM_REGION64_LE(0x020000, "dcflash", 0)
- ROM_LOAD( "dceu_pal.bin", 0x000000, 0x020000, CRC(7a102d05) SHA1(13e444e613dffe0a8bce073a01efa9a1d4626ba7) ) // VA1
- ROM_LOAD( "dceu_pala.bin", 0x000000, 0x020000, CRC(2e8dfa07) SHA1(ca5fd977bbf8f48c28c1027a023b038123d57d39) ) // from VA1 with 1.01d BIOS
+ ROM_REGION64_LE(0x040000, "dcflash", ROMREGION_ERASEFF)
+ ROM_LOAD( "dceu_pal.bin", 0x020000, 0x020000, CRC(7a102d05) SHA1(13e444e613dffe0a8bce073a01efa9a1d4626ba7) ) // VA1
+ ROM_LOAD( "dceu_pala.bin", 0x020000, 0x020000, CRC(2e8dfa07) SHA1(ca5fd977bbf8f48c28c1027a023b038123d57d39) ) // from VA1 with 1.01d BIOS
ROM_END
ROM_START( dcjp )
@@ -801,8 +799,8 @@ ROM_START( dcjp )
ROM_SYSTEM_BIOS(4, "1004", "v1.004 (Japan)") // oldest known mass production version, supports Japan region only
ROM_LOAD_BIOS(4, "mpr-21068.ic501", 0x000000, 0x200000, CRC(5454841f) SHA1(1ea132c0fbbf07ef76789eadc07908045c089bd6) )
- ROM_REGION64_LE(0x020000, "dcflash", 0)
- ROM_LOAD( "dcjp_ntsc.bin", 0x000000, 0x020000, CRC(306023ab) SHA1(5fb66adb6d1b54a552fe9c2bb736e4c6960e447d) ) // from refurbished VA0 with 1.004 BIOS
+ ROM_REGION64_LE(0x040000, "dcflash", ROMREGION_ERASEFF)
+ ROM_LOAD( "dcjp_ntsc.bin", 0x020000, 0x020000, CRC(306023ab) SHA1(5fb66adb6d1b54a552fe9c2bb736e4c6960e447d) ) // from refurbished VA0 with 1.004 BIOS
ROM_END
// unauthorised portable modification
@@ -811,8 +809,8 @@ ROM_START( dctream )
// uses regular mpr-21931 BIOS chip, have region-free mod-chip installed, see driver init.
ROM_LOAD( "mpr-21931.ic501", 0x000000, 0x200000, CRC(89f2b1a1) SHA1(8951d1bb219ab2ff8583033d2119c899cc81f18c) )
- ROM_REGION64_LE(0x020000, "dcflash", 0)
- ROM_LOAD( "dc_flash.bin", 0x000000, 0x020000, CRC(9d5515c4) SHA1(78a86fd4e8b58fc9d3535eef6591178f1b97ecf9) ) // VA1 NTSC-US
+ ROM_REGION64_LE(0x040000, "dcflash", ROMREGION_ERASEFF)
+ ROM_LOAD( "dc_flash.bin", 0x020000, 0x020000, CRC(9d5515c4) SHA1(78a86fd4e8b58fc9d3535eef6591178f1b97ecf9) ) // VA1 NTSC-US
ROM_END
// normally, with DIP switch 4 off, HKT-0100/0110/0120 AKA "Katana Set 5.xx", will be booted from flash ROM IC507 (first 2 dumps below)
@@ -836,8 +834,8 @@ ROM_START( dcdev )
ROM_SYSTEM_BIOS(4, "041", "Katana Set5 Checker v0.41")
ROM_LOAD_BIOS(4, "set5v0.41.bin", 0x000000, 0x200000, CRC(485877bd) SHA1(dc1af1f1248ffa87d57bc5ef2ea41aac95ecfc5e) )
- ROM_REGION64_LE(0x020000, "dcflash", 0)
- ROM_LOAD( "hkt-0120-flash.bin", 0x000000, 0x020000, CRC(7784c304) SHA1(31ef57f550d8cd13e40263cbc657253089e53034) ) // Dev.Boxes have empty (FF filled) flash ROM
+ ROM_REGION64_LE(0x040000, "dcflash", ROMREGION_ERASEFF)
+ // Dev.Boxes have empty (FF filled) flash ROM
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
@@ -891,13 +889,12 @@ ROM_START( dcfish )
ROM_LOAD( "mpr-21931.ic501", 0x000000, 0x200000, CRC(89f2b1a1) SHA1(8951d1bb219ab2ff8583033d2119c899cc81f18c) ) // regular v1.0d 3.3v BIOS
// similar Dreamcast flashes, machine_name was changed to "Fish Life", machine_code2 is 0xff (verified by software)
- // dumped from used device, should be replaced with cleaned binary when flash programming will be emulated
- ROM_REGION64_LE(0x020000, "dcflash", 0)
- ROM_LOAD( "fish_flash.bin", 0x000000, 0x020000, BAD_DUMP CRC(73cbc49b) SHA1(c55caf64eb0ac5f8e73a1a385064606ad12947b7) ) // VA1 NTSC-JP
+ ROM_REGION64_LE(0x040000, "dcflash", ROMREGION_ERASEFF)
+ ROM_LOAD( "fish_flash.bin", 0x020000, 0x020000, CRC(f7f36b7b) SHA1(f49d18de85c519c16d5447ca8ae39b62d1b8e483) ) // VA1 NTSC-JP
DISK_REGION( "ata:0:gdrom" )
DISK_IMAGE_READONLY( "fish_life_amazon", 0, SHA1(2cbba727b219bbbeddf551d0f3e80c5f8ecbe21f) ) // HDR-0094
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
-CONS( 2000, dcfish, 0, 0, dc_fish, dcfish,dc_cons_state, init_dcjp, "Sega", "Fish Life Amazon Playful Edition (Japan)", MACHINE_NOT_WORKING )
+SYST( 2000, dcfish, 0, 0, dc_fish, dcfish,dc_cons_state, init_dcjp, "Sega", "Fish Life Amazon Playful Edition (Japan)", MACHINE_NOT_WORKING )
diff --git a/src/mame/includes/dccons.h b/src/mame/includes/dccons.h
index 6e37e85cd25..8ed88874c64 100644
--- a/src/mame/includes/dccons.h
+++ b/src/mame/includes/dccons.h
@@ -18,12 +18,12 @@ public:
dc_cons_state(const machine_config &mconfig, device_type type, const char *tag)
: dc_state(mconfig, type, tag)
, m_ata(*this, "ata")
+ , m_dcflash(*this, "dcflash")
, atapi_xfercomplete(0)
-// , m_dcflash(*this, "dcflash")
{ }
required_device<ata_interface_device> m_ata;
-// required_device<macronix_29lv160tmc_device> m_dcflash;
+ required_device<fujitsu_29lv002tc_device> m_dcflash;
void init_dc();
void init_dcus();
@@ -46,8 +46,8 @@ public:
void dreamcast_atapi_init();
DECLARE_READ32_MEMBER( dc_mess_g1_ctrl_r );
DECLARE_WRITE32_MEMBER( dc_mess_g1_ctrl_w );
-// DECLARE_READ8_MEMBER( dc_flash_r );
-// DECLARE_WRITE8_MEMBER( dc_flash_w );
+ DECLARE_READ8_MEMBER( dc_flash_r );
+ DECLARE_WRITE8_MEMBER( dc_flash_w );
static void gdrom_config(device_t *device);
void dc_base(machine_config &config);