diff options
author | 2011-04-27 05:11:18 +0000 | |
---|---|---|
committer | 2011-04-27 05:11:18 +0000 | |
commit | 919913f118760c0ca41ab63512bd5c106f6fd840 (patch) | |
tree | cd6c115c8e9c5280ac4bd16eabfe69c7341151c2 /src/emu/cpu/pdp1 | |
parent | 84f2c31f7d6f6c667427b1d60c83e6dc9f420d60 (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/cpu/pdp1')
-rw-r--r-- | src/emu/cpu/pdp1/pdp1.c | 2 | ||||
-rw-r--r-- | src/emu/cpu/pdp1/tx0.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c index d356596b8e7..f77ebb0a06b 100644 --- a/src/emu/cpu/pdp1/pdp1.c +++ b/src/emu/cpu/pdp1/pdp1.c @@ -537,7 +537,7 @@ static void pdp1_set_irq_line (pdp1_state *cpustate, int irqline, int state) static CPU_INIT( pdp1 ) { - const pdp1_reset_param_t *param = (const pdp1_reset_param_t *)device->baseconfig().static_config(); + const pdp1_reset_param_t *param = (const pdp1_reset_param_t *)device->static_config(); pdp1_state *cpustate = get_safe_token(device); int i; diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c index 15b1aa0dcd6..e446a0ecde4 100644 --- a/src/emu/cpu/pdp1/tx0.c +++ b/src/emu/cpu/pdp1/tx0.c @@ -130,7 +130,7 @@ static void tx0_init_common(legacy_cpu_device *device, device_irq_callback irqca tx0_state *cpustate = get_safe_token(device); /* clean-up */ - cpustate->iface = (const tx0_reset_param_t *)device->baseconfig().static_config(); + cpustate->iface = (const tx0_reset_param_t *)device->static_config(); cpustate->address_mask = is_64kw ? ADDRESS_MASK_64KW : ADDRESS_MASK_8KW; cpustate->ir_mask = is_64kw ? 03 : 037; |