Example #1
0
        /*************************************
        *
        *  Machine drivers
        *
        *************************************/

        void centiped_base(machine_config config)
        {
            /* basic machine hardware */
            M6502(config, maincpu, 12096000 / 8);  /* 1.512 MHz (slows down to 0.75MHz while accessing playfield RAM) */

            MCFG_MACHINE_START_OVERRIDE(config, machine_start_centiped);
            MCFG_MACHINE_RESET_OVERRIDE(config, machine_reset_centiped);

            ER2055(config, earom);

            LS259(config, outlatch);
            outlatch.target.q_out_cb(0).set(coin_counter_left_w).reg();
            outlatch.target.q_out_cb(1).set(coin_counter_center_w).reg();
            outlatch.target.q_out_cb(2).set(coin_counter_right_w).reg();
            outlatch.target.q_out_cb(3).set_output("led0").invert().reg(); // LED 1
            outlatch.target.q_out_cb(4).set_output("led1").invert().reg(); // LED 2

            WATCHDOG_TIMER(config, "watchdog");

            /* timer */
            TIMER(config, "32v").configure_scanline(generate_interrupt, "screen", 0, 16);

            /* video hardware */
            SCREEN(config, screen, SCREEN_TYPE_RASTER);
            screen.target.set_refresh_hz(60);
            screen.target.set_size(32 * 8, 32 * 8);
            screen.target.set_visarea(0 * 8, 32 * 8 - 1, 0 * 8, 30 * 8 - 1);
            screen.target.set_screen_update(screen_update_centiped);
            screen.target.set_palette(palette);

            GFXDECODE(config, gfxdecode, palette, gfx_centiped);
            PALETTE(config, palette).set_entries(4 + 4 * 4 * 4 * 4);

            MCFG_VIDEO_START_OVERRIDE(config, video_start_centiped);
        }
Example #2
0
        public void centiped(machine_config config)
        {
            centiped_base(config);

            maincpu.target.memory().set_addrmap(AS_PROGRAM, centiped_map);

            // M10
            outlatch.target.q_out_cb(7).set(flip_screen_w).reg();

            /* sound hardware */
            SPEAKER(config, "mono").front_center();

            pokey_device pokey = POKEY(config, "pokey", 12096000 / 8);

            pokey.set_output_opamp_low_pass(RES_K(3.3), CAP_U(0.01), 5.0);
            pokey.GetClassInterface <device_sound_interface>().add_route(ALL_OUTPUTS, "mono", 0.5);
        }
Example #3
0
        protected machine_static_info(ui_options options, machine_config config, ioport_list ports)
        {
            m_options             = options;
            m_flags               = config.gamedrv().flags;
            m_unemulated_features = config.gamedrv().type.unemulated_features();
            m_imperfect_features  = config.gamedrv().type.imperfect_features();
            m_has_bioses          = false;
            m_has_dips            = false;
            m_has_configs         = false;
            m_has_keyboard        = false;
            m_has_test_switch     = false;
            m_has_analog          = false;


            ioport_list local_ports = new ioport_list();
            string      sink;

            foreach (device_t device in new device_enumerator(config.root_device()))
            {
                // the "no sound hardware" warning doesn't make sense when you plug in a sound card
                if (device.GetClassInterface <device_sound_interface>() != null)  // dynamic_cast<device_sound_interface *>(&device))
                {
                    m_flags &= ~machine_flags.type.NO_SOUND_HW;
                }

                // build overall emulation status
                m_unemulated_features |= device.type().unemulated_features();
                m_imperfect_features  |= device.type().imperfect_features();

                // look for BIOS options
                device_t parent            = device.owner();
                device_slot_interface slot = device.GetClassInterface <device_slot_interface>();  //device_slot_interface const *const slot(dynamic_cast<device_slot_interface const *>(parent));
                if (parent == null || (slot != null && (slot.get_card_device() == device)))
                {
                    for (Pointer <tiny_rom_entry> rom = device.rom_region(); !m_has_bioses && rom != null && !ROMENTRY_ISEND(rom.op); ++rom)  //for (tiny_rom_entry const *rom = device.rom_region(); !m_has_bioses && rom && !ROMENTRY_ISEND(rom); ++rom)
                    {
                        if (ROMENTRY_ISSYSTEM_BIOS(rom.op))
                        {
                            m_has_bioses = true;
                        }
                    }
                }
            }

            // suppress "requires external artwork" warning when external artwork was loaded
            if (config.root_device().has_running_machine())
            {
                for (render_target target = config.root_device().machine().render().first_target(); target != null; target = target.next())
                {
                    if (!target.hidden() && target.external_artwork())
                    {
                        m_flags &= ~machine_flags.type.REQUIRES_ARTWORK;
                        break;
                    }
                }
            }

            // unemulated trumps imperfect when aggregating (always be pessimistic)
            m_imperfect_features &= ~m_unemulated_features;

            // scan the input port array to see what options we need to enable
            foreach (var port in (ports != null ? ports : local_ports))
            {
                foreach (ioport_field field in port.Value.fields())
                {
                    switch (field.type())
                    {
                    case ioport_type.IPT_DIPSWITCH: m_has_dips = true;          break;

                    case ioport_type.IPT_CONFIG:    m_has_configs = true;       break;

                    case ioport_type.IPT_KEYBOARD:  m_has_keyboard = true;      break;

                    case ioport_type.IPT_SERVICE:   m_has_test_switch = true;   break;

                    default: break;
                    }

                    if (field.is_analog())
                    {
                        m_has_analog = true;
                    }
                }
            }
        }
Example #4
0
 //-------------------------------------------------
 //  machine_static_info - constructors
 //-------------------------------------------------
 public machine_static_info(ui_options options, machine_config config)
     : this(options, config, null)
 {
 }
Example #5
0
 public static device_t device_add_impl(machine_config mconfig, string tag, device_type type, device_t owner, XTAL clock)
 {
     return(device_add_impl(mconfig, tag, type, owner, clock.value()));
 }
Example #6
0
 //template <typename Tag, typename Creator, typename... Params>
 //inline std::enable_if_t<emu::detail::is_device_implementation<typename std::remove_reference_t<Creator>::exposed_type>::value, typename std::remove_reference_t<Creator>::exposed_type *> device_add_impl(machine_config &mconfig, Tag &&tag, Creator &&type, Params &&... args)
 //{
 //    return &type(mconfig, std::forward<Tag>(tag), std::forward<Params>(args)...);
 //}
 //template <typename Tag, typename Creator, typename... Params>
 //inline std::enable_if_t<emu::detail::is_device_interface<typename std::remove_reference_t<Creator>::exposed_type>::value, device_t *> device_add_impl(machine_config &mconfig, Tag &&tag, Creator &&type, Params &&... args)
 //{
 //    return &type(mconfig, std::forward<Tag>(tag), std::forward<Params>(args)...).device();
 //}
 //template <typename Tag, typename Creator, typename... Params>
 public static device_t device_add_impl(machine_config mconfig, string tag, device_type type, device_t owner, u32 clock)
 {
     return(mconfig.device_add(tag, type, clock));
 }
Example #7
0
File: info.cs Project: kwanboy/mcs
        protected machine_static_info(machine_config config, ioport_list ports)
        {
            m_flags = config.gamedrv().flags;
            m_unemulated_features = config.gamedrv().type.unemulated_features();
            m_imperfect_features  = config.gamedrv().type.imperfect_features();
            m_has_bioses          = false;
            m_has_dips            = false;
            m_has_configs         = false;
            m_has_keyboard        = false;
            m_has_test_switch     = false;
            m_has_analog          = false;


            ioport_list local_ports = new ioport_list();
            string      sink;

            foreach (device_t device in new device_iterator(config.root_device()))
            {
                // the "no sound hardware" warning doesn't make sense when you plug in a sound card
                if (device.GetClassInterface <device_sound_interface>() != null)  // dynamic_cast<device_sound_interface *>(&device))
                {
                    m_flags &= ~machine_flags.type.NO_SOUND_HW;
                }

                // build overall emulation status
                m_unemulated_features |= device.type().unemulated_features();
                m_imperfect_features  |= device.type().imperfect_features();

                // look for BIOS options
                List <tiny_rom_entry> rom = device.rom_region();
                for (int romOffset = 0; !m_has_bioses && rom != null && rom[romOffset] != null && !romload_global.ROMENTRY_ISEND(rom[romOffset]); ++romOffset)
                {
                    if (romload_global.ROMENTRY_ISSYSTEM_BIOS(rom[romOffset]))
                    {
                        m_has_bioses = true;
                    }
                }

                // if we don't have ports passed in, build here
                if (ports == null)
                {
                    local_ports.append(device, out sink);
                }
            }

            // unemulated trumps imperfect when aggregating (always be pessimistic)
            m_imperfect_features &= ~m_unemulated_features;

            // scan the input port array to see what options we need to enable
            foreach (var port in (ports != null ? ports : local_ports))
            {
                foreach (ioport_field field in port.Value.fields())
                {
                    switch (field.type())
                    {
                    case ioport_type.IPT_DIPSWITCH: m_has_dips = true;          break;

                    case ioport_type.IPT_CONFIG:    m_has_configs = true;       break;

                    case ioport_type.IPT_KEYBOARD:  m_has_keyboard = true;      break;

                    case ioport_type.IPT_SERVICE:   m_has_test_switch = true;   break;

                    default: break;
                    }

                    if (field.is_analog())
                    {
                        m_has_analog = true;
                    }
                }
            }
        }
Example #8
0
File: info.cs Project: kwanboy/mcs
 //-------------------------------------------------
 //  machine_static_info - constructors
 //-------------------------------------------------
 public machine_static_info(machine_config config)
     : this(config, null)
 {
 }