summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/dirtc.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-04-27 05:11:18 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-04-27 05:11:18 +0000
commit919913f118760c0ca41ab63512bd5c106f6fd840 (patch)
treecd6c115c8e9c5280ac4bd16eabfe69c7341151c2 /src/emu/dirtc.h
parent84f2c31f7d6f6c667427b1d60c83e6dc9f420d60 (diff)
Collapsed device_config and device_t into one class. Updated all
existing modern devices and the legacy wrappers to work in this environment. This in general greatly simplifies writing a modern device. [Aaron Giles] General notes: * some more cleanup probably needs to happen behind this change, but I needed to get it in before the next device modernization or import from MESS :) * new template function device_creator which automatically defines the static function that creates the device; use this instead of creating a static_alloc_device_config function * added device_stop() method which is called at around the time the previous device_t's destructor was called; if you auto_free anything, do it here because the machine is gone when the destructor is called * changed the static_set_* calls to pass a device_t & instead of a device_config * * for many devices, the static config structure member names over- lapped the device's names for devcb_* functions; in these cases the members in the interface were renamed to have a _cb suffix * changed the driver_enumerator to only cache 100 machine_configs because caching them all took a ton of memory; fortunately this implementation detail is completely hidden behind the driver_enumerator interface * got rid of the macros for creating derived classes; doing it manually is now clean enough that it isn't worth hiding the details in a macro
Diffstat (limited to 'src/emu/dirtc.h')
-rw-r--r--src/emu/dirtc.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/emu/dirtc.h b/src/emu/dirtc.h
index a791e3a8230..ba1b238eecf 100644
--- a/src/emu/dirtc.h
+++ b/src/emu/dirtc.h
@@ -21,19 +21,6 @@
//**************************************************************************
-// ======================> device_config_rtc_interface
-
-// class representing interface-specific configuration rtc
-class device_config_rtc_interface : public device_config_interface
-{
-public:
- // construction/destruction
- device_config_rtc_interface(const machine_config &mconfig, device_config &device);
- virtual ~device_config_rtc_interface();
-};
-
-
-
// ======================> device_rtc_interface
// class representing interface-specific live rtc
@@ -41,19 +28,13 @@ class device_rtc_interface : public device_interface
{
public:
// construction/destruction
- device_rtc_interface(running_machine &machine, const device_config &config, device_t &device);
+ device_rtc_interface(const machine_config &mconfig, device_t &device);
virtual ~device_rtc_interface();
- // configuration access
- const device_config_rtc_interface &rtc_config() const { return m_rtc_config; }
-
protected:
// derived class overrides
virtual void rtc_set_time(int year, int month, int day, int day_of_week, int hour, int minute, int second) = 0;
virtual bool rtc_is_year_2000_compliant() = 0;
-
- // configuration
- const device_config_rtc_interface &m_rtc_config; // reference to our device_config_execute_interface
};