Previous 199869 Revisions Next

r17575 Thursday 30th August, 2012 at 08:09:00 UTC by Miodrag Milanović
Removed not used legacy calls (nw)
[src/emu]devlegcy.c devlegcy.h

trunk/src/emu/devlegcy.c
r17574r17575
196196
197197
198198//-------------------------------------------------
199//  device_validity_check - perform validity
200//  checks on a device configuration
201//-------------------------------------------------
202
203void legacy_device_base::device_validity_check(validity_checker &valid) const
204{
205   device_validity_check_func validity_func = reinterpret_cast<device_validity_check_func>(get_legacy_fct(DEVINFO_FCT_VALIDITY_CHECK));
206   if (validity_func != NULL)
207      (*validity_func)(&mconfig().gamedrv(), this, mconfig().options());
208}
209
210
211//-------------------------------------------------
212199//  device_start - called to start up a device
213200//-------------------------------------------------
214201
trunk/src/emu/devlegcy.h
r17574r17575
114114      DEVINFO_FCT_START = DEVINFO_FCT_FIRST,         // R/O: device_start_func
115115      DEVINFO_FCT_STOP,                        // R/O: device_stop_func
116116      DEVINFO_FCT_RESET,                        // R/O: device_reset_func
117      DEVINFO_FCT_EXECUTE,                     // R/O: device_execute_func
118      DEVINFO_FCT_NVRAM,                        // R/O: device_nvram_func
119      DEVINFO_FCT_VALIDITY_CHECK,                  // R/O: device_validity_check_func
120117
121118   DEVINFO_FCT_CLASS_SPECIFIC = 0x24000,            // R/W: device-specific values start here
122119   DEVINFO_FCT_DEVICE_SPECIFIC = 0x28000,            // R/W: device-specific values start here
r17574r17575
185182#define DEVICE_GET_INFO(name)      void DEVICE_GET_INFO_NAME(name)(const device_t *device, UINT32 state, deviceinfo *info)
186183#define DEVICE_GET_INFO_CALL(name)   DEVICE_GET_INFO_NAME(name)(device, state, info)
187184
188#define DEVICE_VALIDITY_CHECK_NAME(name)   device_validity_check_##name
189#define DEVICE_VALIDITY_CHECK(name)         int DEVICE_VALIDITY_CHECK_NAME(name)(const game_driver *driver, const device_t *device, emu_options &options)
190#define DEVICE_VALIDITY_CHECK_CALL(name)   DEVICE_VALIDITY_CHECK_NAME(name)(driver, device)
191
192185#define DEVICE_START_NAME(name)      device_start_##name
193186#define DEVICE_START(name)         void DEVICE_START_NAME(name)(device_t *device)
194187#define DEVICE_START_CALL(name)      DEVICE_START_NAME(name)(device)
r17574r17575
201194#define DEVICE_RESET(name)         void DEVICE_RESET_NAME(name)(device_t *device)
202195#define DEVICE_RESET_CALL(name)      DEVICE_RESET_NAME(name)(device)
203196
204#define DEVICE_EXECUTE_NAME(name)   device_execute_##name
205#define DEVICE_EXECUTE(name)      INT32 DEVICE_EXECUTE_NAME(name)(device_t *device, INT32 clocks)
206#define DEVICE_EXECUTE_CALL(name)   DEVICE_EXECUTE_NAME(name)(device, clocks)
207197
208
209198//**************************************************************************
210199//  DEVICE_CONFIGURATION_MACROS
211200//**************************************************************************
r17574r17575
269258
270259// device interface function types
271260typedef void (*device_get_config_func)(const device_t *device, UINT32 state, deviceinfo *info);
272typedef int (*device_validity_check_func)(const game_driver *driver, const device_t *device, emu_options &options);
273261
274262typedef void (*device_start_func)(device_t *device);
275263typedef void (*device_stop_func)(device_t *device);
276typedef INT32 (*device_execute_func)(device_t *device, INT32 clocks);
277264typedef void (*device_reset_func)(device_t *device);
278typedef void (*device_nvram_func)(device_t *device, emu_file *file, int read_or_write);
279265
280266// the actual deviceinfo union
281267union deviceinfo
r17574r17575
288274   device_start_func      start;                  // DEVINFO_FCT_START
289275   device_stop_func      stop;                  // DEVINFO_FCT_STOP
290276   device_reset_func      reset;                  // DEVINFO_FCT_RESET
291   device_execute_func    execute;               // DEVINFO_FCT_EXECUTE
292   device_nvram_func      nvram;                  // DEVINFO_FCT_NVRAM
293277   const rom_entry *      romregion;               // DEVINFO_PTR_ROM_REGION
294278   machine_config_constructor machine_config;         // DEVINFO_PTR_MACHINE_CONFIG
295279   ioport_constructor ipt;                        // DEVINFO_PTR_INPUT_PORTS
r17574r17575
331315   virtual const rom_entry *device_rom_region() const { return reinterpret_cast<const rom_entry *>(get_legacy_ptr(DEVINFO_PTR_ROM_REGION)); }
332316   virtual machine_config_constructor device_mconfig_additions() const { return reinterpret_cast<machine_config_constructor>(get_legacy_ptr(DEVINFO_PTR_MACHINE_CONFIG)); }
333317   virtual ioport_constructor device_input_ports() const { return reinterpret_cast<ioport_constructor>(get_legacy_ptr(DEVINFO_PTR_INPUT_PORTS)); }
334   virtual void device_validity_check(validity_checker &valid) const;
335318   virtual void device_start();
336319   virtual void device_reset();
337320   virtual void device_stop();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team