Previous 199869 Revisions Next

r18012 Wednesday 19th September, 2012 at 10:31:22 UTC by Miodrag Milanović
Removed device_memory_interface from driver_device, fixes issues with dkong clones, and various others, require clean compile (no whatsnew)
[src/emu]driver.c driver.h

trunk/src/emu/driver.c
r18011r18012
5151
5252driver_device::driver_device(const machine_config &mconfig, device_type type, const char *tag)
5353   : device_t(mconfig, type, "Driver Device", tag, NULL, 0),
54     device_memory_interface(mconfig, *this),
5554     m_generic_paletteram_8(*this, "paletteram"),
5655     m_generic_paletteram2_8(*this, "paletteram2"),
5756     m_generic_paletteram_16(*this, "paletteram"),
r18011r18012
5958     m_generic_paletteram_32(*this, "paletteram"),
6059     m_generic_paletteram2_32(*this, "paletteram2"),
6160     m_system(NULL),
62     m_generic_space_config("generic", ENDIANNESS_LITTLE, 8, 8),
6361     m_latch_clear_value(0),
6462     m_flip_screen_x(0),
6563     m_flip_screen_y(0)
r18011r18012
315313}
316314
317315
318//-------------------------------------------------
319//  memory_space_config - return a description of
320//  any address spaces owned by this device
321//-------------------------------------------------
322
323const address_space_config *driver_device::memory_space_config(address_spacenum spacenum) const
324{
325   return (spacenum == 0) ? &m_generic_space_config : NULL;
326}
327
328
329
330316//**************************************************************************
331317//  INTERRUPT ENABLE AND VECTOR HELPERS
332318//**************************************************************************
trunk/src/emu/driver.h
r18011r18012
166166// ======================> driver_device
167167
168168// base class for machine driver-specific devices
169class driver_device :    public device_t,
170                  public device_memory_interface
169class driver_device :    public device_t
171170{
172171public:
173172   // construction/destruction
r18011r18012
206205   void init_0() { }
207206   
208207   // memory helpers
209   address_space &generic_space() const { return *space(AS_PROGRAM); }
208   address_space &generic_space() const { return *machine().memory().first_space(); }
210209
211210   // generic interrupt generators
212211   void generic_pulse_irq_line(device_execute_interface &exec, int irqline, int cycles);
r18011r18012
404403   virtual void device_start();
405404   virtual void device_reset_after_children();
406405
407   // device_memory_interface overrides
408   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
409
410406   // internal helpers
411407   inline UINT16 paletteram16_le(offs_t offset) const { return m_generic_paletteram_8[offset & ~1] | (m_generic_paletteram_8[offset |  1] << 8); }
412408   inline UINT16 paletteram16_be(offs_t offset) const { return m_generic_paletteram_8[offset |  1] | (m_generic_paletteram_8[offset & ~1] << 8); }
r18011r18012
433429   driver_callback_delegate m_callbacks[CB_COUNT];      // start/reset callbacks
434430   legacy_callback_func   m_legacy_callbacks[CB_COUNT]; // legacy start/reset callbacks
435431
436   // memory state
437   address_space_config   m_generic_space_config;
438
439432   // generic audio
440433   UINT16               m_latch_clear_value;
441434   UINT16               m_latched_value[4];

Previous 199869 Revisions Next


© 1997-2024 The MAME Team