Пример #1
0
 public optional_device_array_i8255_device(int Count, device_t basedevice, string format, int start) : base(Count, basedevice, format, start)
 {
     m_array = new device_finder <i8255_device> [Count];
     for (int i = 0; i < Count; i++)
     {
         m_array[i] = new device_finder <i8255_device>(false, basedevice, m_tag[i]);
     }
 }
Пример #2
0
        // inline configuration helpers

        //template <typename Object> void configure_generic(Object &&cb)
        //{
        //    m_type = TIMER_TYPE_GENERIC;
        //    m_callback = std::forward<Object>(cb);
        //}
        //template <class FunctionClass> void configure_generic(void (FunctionClass::*callback)(timer_device &, void *, s32), const char *name)
        //{
        //    configure_generic(expired_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
        //}

        //template <typename Object> void configure_periodic(Object &&cb, const attotime &period)
        //{
        //    m_type = TIMER_TYPE_PERIODIC;
        //    m_callback = std::forward<Object>(cb);
        //    m_period = period;
        //}
        //template <class FunctionClass> void configure_periodic(void (FunctionClass::*callback)(timer_device &, void *, s32), const char *name,
        //    const attotime &period)
        //{
        //    configure_periodic(expired_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)), period);
        //}


        public void configure_scanline <bool_Required>(expired_delegate callback, device_finder <screen_device, bool_Required> screen, int first_vpos, int increment)  //template <typename F, typename U> void configure_scanline(F &&callback, const char *name, U &&screen, int first_vpos, int increment)
            where bool_Required : bool_const, new()
        {
            m_type     = timer_type.TIMER_TYPE_SCANLINE;
            m_callback = callback;    //m_callback.set(std::forward<F>(callback), name);
            m_screen.set_tag(screen); //m_screen.set_tag(std::forward<U>(screen));
            m_first_vpos = (u32)first_vpos;
            m_increment  = (u32)increment;
        }
Пример #3
0
        //void set_screen(device_t &base, const char *tag)
        //{
        //    m_screen_base = &base;
        //    m_screen_tag = tag;
        //}


        //template <class ObjectClass, bool Required>
        public void set_screen <ObjectClass, bool_Required>(device_finder <ObjectClass, bool_Required> finder)  //void set_screen(device_finder<ObjectClass, Required> &finder)
            where bool_Required : bool_const, new()
        {
            m_screen_base = finder.finder_target().first;
            m_screen_tag  = finder.finder_target().second;
        }
Пример #4
0
 public void set_gfxdecode <bool_Required>(device_finder <gfxdecode_device, bool_Required> tag)
     where bool_Required : bool_const, new()
 {
     m_gfxdecode.set_tag(tag);
 }
Пример #5
0
        public static void MCFG_PALETTE_ADD(out device_t device, machine_config config, device_t owner, device_finder <palette_device> finder, u32 entries)
        {
            var target = finder.finder_target();  //std::pair<device_t &, char const *> const target(finder.finder_target());

            mconfig_global.MCFG_DEVICE_ADD(out device, config, owner, target.second(), palette_device.PALETTE, 0);
            finder.target = (palette_device)device;
            ((palette_device)device).set_entries(entries);
        }