diff options
author | 2017-05-22 19:48:30 +1000 | |
---|---|---|
committer | 2017-05-22 19:48:30 +1000 | |
commit | ed231988f17832c7e8326dbeb0fdefc726e42adf (patch) | |
tree | 1aa44c58fb75ecdcc1ffcf3842b84112549c76fc /src/emu/driver.cpp | |
parent | ceb586419e929d0e94a3aae2a3333aa2465214cb (diff) |
let's use Zaccaria as a demo for machine config in members
Diffstat (limited to 'src/emu/driver.cpp')
-rw-r--r-- | src/emu/driver.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/emu/driver.cpp b/src/emu/driver.cpp index ceed36bd493..73944970970 100644 --- a/src/emu/driver.cpp +++ b/src/emu/driver.cpp @@ -40,21 +40,21 @@ driver_device::~driver_device() //------------------------------------------------- -// static_set_game - set the game in the device +// set_game_driver - set the game in the device // configuration //------------------------------------------------- -void driver_device::static_set_game(device_t &device, const game_driver &game) +void driver_device::set_game_driver(const game_driver &game) { - driver_device &driver = downcast<driver_device &>(device); + assert(!m_system); // set the system - driver.m_system = &game; + m_system = &game; // and set the search path to include all parents - driver.m_searchpath = game.name; + m_searchpath = game.name; for (int parent = driver_list::clone(game); parent != -1; parent = driver_list::clone(parent)) - driver.m_searchpath.append(";").append(driver_list::driver(parent).name); + m_searchpath.append(";").append(driver_list::driver(parent).name); } @@ -156,6 +156,7 @@ void driver_device::video_reset() const tiny_rom_entry *driver_device::device_rom_region() const { + assert(m_system); return m_system->rom; } @@ -166,6 +167,7 @@ const tiny_rom_entry *driver_device::device_rom_region() const void driver_device::device_add_mconfig(machine_config &config) { + assert(m_system); m_system->machine_config(config, this, nullptr); } |