diff options
author | MetalliC <0vetal0@gmail.com> | 2016-08-01 22:19:06 +0300 |
---|---|---|
committer | MetalliC <0vetal0@gmail.com> | 2016-08-01 22:19:06 +0300 |
commit | e50cabe1ffae8cda9be5e9328f97514c5f06d79b (patch) | |
tree | ced6fe932ed81503c0d0db3d4ddbbb334c46b667 /src/mame/machine/naomim1.cpp | |
parent | 203e6dc8293414dc1839eec7a48d875f6fc902a3 (diff) |
naomi: get rid of hacky rom_region, use rom_parameter instead
Diffstat (limited to 'src/mame/machine/naomim1.cpp')
-rw-r--r-- | src/mame/machine/naomim1.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
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<UINT8[]>(BUFFER_SIZE); save_pointer(NAME(buffer.get()), BUFFER_SIZE); |