Esempio n. 1
0
 public slot_option(string name, device_type devtype, bool selectable)
 {
     m_name                  = name;
     m_devtype               = devtype;
     m_selectable            = selectable;
     m_default_bios          = null;
     m_machine_config        = null;
     m_input_device_defaults = null;
     m_clock                 = 0;
 }
Esempio n. 2
0
        public string name;                             // short name of the system


        public game_driver(device_type type, string parent, string year, string manufacturer, machine_creator_wrapper machine_creator, ioport_constructor ipt, driver_init_wrapper driver_init, MemoryContainer <tiny_rom_entry> rom, int monitor, u64 flags, string name, string fullname)
        {
            this.type            = type;
            this.parent          = parent;
            this.year            = year;
            this.manufacturer    = manufacturer;
            this.machine_creator = machine_creator;
            this.ipt             = ipt;
            this.driver_init     = driver_init;
            this.rom             = new Pointer <tiny_rom_entry>(rom);
            this.compatible_with = null;
            this.default_layout  = null;
            this.flags           = (machine_flags.type)((u64)(u32)monitor | flags | MACHINE_TYPE_ARCADE);
            this.name            = name;
        }
Esempio n. 3
0
        //#define GAME_DRIVER_TYPE(NAME, CLASS, FLAGS) \
        //driver_device_creator< \
        //        CLASS, \
        //        (GAME_TRAITS_NAME(NAME)::shortname), \
        //        (GAME_TRAITS_NAME(NAME)::fullname), \
        //        (GAME_TRAITS_NAME(NAME)::source), \
        //        game_driver::unemulated_features(FLAGS), \
        //        game_driver::imperfect_features(FLAGS)>

        // standard GAME() macro
        //#define GAME(YEAR,NAME,PARENT,MACHINE,INPUT,CLASS,INIT,MONITOR,COMPANY,FULLNAME,FLAGS) \
        //GAME_DRIVER_TRAITS(NAME,FULLNAME)                                       \
        //extern game_driver const GAME_NAME(NAME)                                \
        //{                                                                       \
        //    GAME_DRIVER_TYPE(NAME, CLASS, FLAGS),                               \
        //    #PARENT,                                                            \
        //    #YEAR,                                                              \
        //    COMPANY,                                                            \
        //    [] (machine_config &config, device_t &owner) { downcast<CLASS &>(owner).MACHINE(config); }, \
        //    INPUT_PORTS_NAME(INPUT),                                            \
        //    [] (device_t &owner) { downcast<CLASS &>(owner).INIT(); },          \
        //    ROM_NAME(NAME),                                                     \
        //    nullptr,                                                            \
        //    nullptr,                                                            \
        //    machine_flags::type(u32((MONITOR) | (FLAGS) | MACHINE_TYPE_ARCADE)),\
        //    #NAME                                                               \
        //};

        public static game_driver GAME(device_type.create_func creator, List <tiny_rom_entry> roms, string YEAR, string NAME, string PARENT, machine_creator_wrapper MACHINE, ioport_constructor INPUT, driver_init_wrapper INIT, UInt32 MONITOR, string COMPANY, string FULLNAME, UInt64 FLAGS)
        {
            var traits = GAME_DRIVER_TRAITS(NAME, FULLNAME);

            device_type game_device = new device_type(new driver_device_creator(creator, traits.shortname, traits.fullname, traits.source, game_driver.unemulated_features(FLAGS), game_driver.imperfect_features(FLAGS), driver_device.unemulated_features(), driver_device.imperfect_features()).driver_tag());

            return(new game_driver
                   (
                       game_device,
                       PARENT,
                       YEAR,
                       COMPANY,
                       (config, owner) => { MACHINE(config, owner); },
                       INPUT,
                       (owner) => { INIT(owner); },
                       roms,
                       MONITOR,
                       FLAGS,
                       NAME,
                       FULLNAME
                   ));
        }