From e50cabe1ffae8cda9be5e9328f97514c5f06d79b Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Mon, 1 Aug 2016 22:19:06 +0300 Subject: naomi: get rid of hacky rom_region, use rom_parameter instead --- src/mame/machine/naomim1.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/mame/machine/naomim1.cpp') diff --git a/src/mame/machine/naomim1.cpp b/src/mame/machine/naomim1.cpp index a456bc8cdb8..68282faf8d9 100644 --- a/src/mame/machine/naomim1.cpp +++ b/src/mame/machine/naomim1.cpp @@ -20,13 +20,7 @@ naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, d READ16_MEMBER(naomi_m1_board::actel_id_r) { - if (rombdid_tag && owner()->memregion(rombdid_tag) != nullptr) - { - const UINT8 *bdid = owner()->memregion(rombdid_tag)->base(); - return bdid[0] | (bdid[1] << 8); - } - - return 0x0000; + return actel_id; } void naomi_m1_board::device_start() @@ -42,6 +36,15 @@ void naomi_m1_board::device_start() key = 0; } + std::string sid = parameter("id"); + if (!sid.empty()) + actel_id = strtoll(sid.c_str(), nullptr, 16); + else + { + logerror("%s: Warning: Actel ID not provided\n", tag()); + actel_id = 0; + } + buffer = std::make_unique(BUFFER_SIZE); save_pointer(NAME(buffer.get()), BUFFER_SIZE); -- cgit v1.2.3