//std::unique_ptr<u8[]> m_blended_data; // construction/destruction protected atarigen_state(machine_config mconfig, device_type type, string tag) : base(mconfig, type, tag) { m_maincpu = new required_device <cpu_device>(this, "maincpu"); m_gfxdecode = new optional_device <gfxdecode_device>(this, "gfxdecode"); m_screen = new optional_device <screen_device>(this, "screen"); }
public u32 m_specified_inputs_mask; // mask of inputs explicitly specified (not counting auto-allocated) // construction/destruction //------------------------------------------------- // device_sound_interface - constructor //------------------------------------------------- public device_sound_interface(machine_config mconfig, device_t device) : base(device, "sound") { m_outputs = 0; m_auto_allocated_inputs = 0; m_specified_inputs_mask = 0; }
protected override void device_add_mconfig(machine_config config) { /* basic machine hardware */ m6803_cpu_device cpu = M6803(config, m_cpu, new XTAL(3579545)); /* verified on pcb */ cpu.memory().set_addrmap(AS_PROGRAM, m52_small_sound_map); cpu.in_p1_cb().set(m6803_port1_r).reg(); cpu.out_p1_cb().set(m6803_port1_w).reg(); cpu.in_p2_cb().set(m6803_port2_r).reg(); cpu.out_p2_cb().set(m6803_port2_w).reg(); /* sound hardware */ SPEAKER(config, "mono").front_center(); AY8910(config, m_ay_45M, new XTAL(3579545) / 4); /* verified on pcb */ m_ay_45M.op0.set_flags(ay8910_device.AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT); m_ay_45M.op0.set_resistors_load(470, 0, 0); m_ay_45M.op0.port_a_read_callback().set(soundlatch_r).reg(); m_ay_45M.op0.port_b_write_callback().set(ay8910_45M_portb_w).reg(); m_ay_45M.op0.add_route(0, "filtermix", 1.0, 0); AY8910(config, m_ay_45L, new XTAL(3579545) / 4); /* verified on pcb */ m_ay_45L.op0.set_flags(ay8910_device.AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT); m_ay_45L.op0.set_resistors_load(470, 0, 0); m_ay_45L.op0.port_a_write_callback().set(ay8910_45L_porta_w).reg(); m_ay_45L.op0.add_route(0, "filtermix", 1.0, 1); MSM5205(config, m_adpcm1, new XTAL(384000)); /* verified on pcb */ m_adpcm1.op0.vck_callback().set_inputline(m_cpu, INPUT_LINE_NMI).reg(); // driven through NPN inverter m_adpcm1.op0.set_prescaler_selector(msm5205_device.S96_4B); /* default to 4KHz, but can be changed at run time */ m_adpcm1.op0.add_route(0, "filtermix", 1.0, 2); DISCRETE(config, "filtermix", m52_sound_c_discrete).disound.add_route(ALL_OUTPUTS, "mono", 1.0); }
bool m_clear; // clear/reset active state // construction/destruction protected addressable_latch_device(machine_config mconfig, device_type type, string tag, device_t owner, u32 clock, bool clear_active) : base(mconfig, type, tag, owner, clock) { m_q_out_cb = new devcb_write_line.array <u64_const_8>(this, () => { return(new devcb_write_line(this)); }); m_parallel_out_cb = new devcb_write8(this); m_clear_active = clear_active; }
// construction/destruction //------------------------------------------------- // generic_latch_base_device - constructor //------------------------------------------------- protected generic_latch_base_device(machine_config mconfig, device_type type, string tag, device_t owner, u32 clock) : base(mconfig, type, tag, owner, clock) { m_separate_acknowledge = false; m_latch_written = false; m_data_pending_cb = new devcb_write_line(this); }
atari_motion_objects_device(machine_config mconfig, string tag, device_t owner, uint32_t clock) : base(mconfig, ATARI_MOTION_OBJECTS, tag, owner) { m_divideo = new device_video_interface(mconfig, this); //, device_video_interface(mconfig, *this) m_tilewidth = 0; m_tileheight = 0; m_tilexshift = 0; m_tileyshift = 0; m_bitmapwidth = 0; m_bitmapheight = 0; m_bitmapxmask = 0; m_bitmapymask = 0; m_entrycount = 0; m_entrybits = 0; m_spriterammask = 0; m_spriteramsize = 0; m_slipshift = 0; m_sliprammask = 0; m_slipramsize = 0; m_bank = 0; m_xscroll = 0; m_yscroll = 0; m_slipram = null; m_slipramshare = new optional_shared_ptr <u16>(this, "slip"); m_activelast = null; m_last_xpos = 0; m_next_xpos = 0; m_xoffset = 0; m_gfxdecode = new required_device <gfxdecode_device>(this, finder_base.DUMMY_TAG); }
public taitosj_state(machine_config mconfig, device_type type, string tag) : base(mconfig, type, tag) { m_videoram = new required_shared_ptr_array <uint8_t, u32_const_3>(this, "videoram_{0}", 1U); m_spriteram = new required_shared_ptr <uint8_t>(this, "spriteram"); m_paletteram = new required_shared_ptr <uint8_t>(this, "paletteram"); m_characterram = new required_shared_ptr <uint8_t>(this, "characterram"); m_scroll = new required_shared_ptr <uint8_t>(this, "scroll"); m_colscrolly = new required_shared_ptr <uint8_t>(this, "colscrolly"); m_gfxpointer = new required_shared_ptr <uint8_t>(this, "gfxpointer"); m_colorbank = new required_shared_ptr <uint8_t>(this, "colorbank"); m_video_mode = new required_shared_ptr <uint8_t>(this, "video_mode"); m_video_priority = new required_shared_ptr <uint8_t>(this, "video_priority"); m_collision_reg = new required_shared_ptr <uint8_t>(this, "collision_reg"); m_kikstart_scrollram = new optional_shared_ptr <uint8_t>(this, "kikstart_scroll"); //m_kikstart_scrollram = new required_shared_ptr_uint8_t(this, "kikstart_scroll"); m_gfx = new required_region_ptr <uint8_t>(this, "gfx"); m_mainbank = new required_memory_bank(this, "mainbank"); m_in2 = new required_ioport(this, "IN2"); m_gear = new optional_ioport_array <u32_const_2>(this, "GEARP{0}", 1U); m_maincpu = new required_device <cpu_device>(this, "maincpu"); m_audiocpu = new required_device <cpu_device>(this, "audiocpu"); m_mcu = new optional_device <taito_sj_security_mcu_device>(this, "bmcu"); m_soundnmi = new required_device_array <input_merger_device, u32_const_2>(this, "soundnmi{0}", 1U, (base_, tag_) => { return(new device_finder <input_merger_device, bool_const_true>(base_, tag_)); }); m_dac = new required_device <dac_8bit_r2r_device>(this, "dac"); m_dacvol = new required_device <discrete_sound_device>(this, "dacvol"); m_ay = new required_device_array <ay8910_device, u32_const_4>(this, "ay{0}", 1U, (base_, tag_) => { return(new device_finder <ay8910_device, bool_const_true>(base_, tag_)); }); m_gfxdecode = new required_device <gfxdecode_device>(this, "gfxdecode"); m_screen = new required_device <screen_device>(this, "screen"); m_palette = new required_device <palette_device>(this, "palette"); }
// construction/destruction //------------------------------------------------- // driver_device - constructor //------------------------------------------------- public driver_device(machine_config mconfig, device_type type, string tag) : base(mconfig, type, tag, null, 0) { m_system = null; m_flip_screen_x = 0; m_flip_screen_y = 0; }
// construction/destruction public mb88_cpu_device(machine_config mconfig, device_type type, string tag, device_t owner, uint32_t clock, int program_width, int data_width) : base(mconfig, type, tag, owner, clock) { m_class_interfaces.Add(new device_execute_interface_mb88(mconfig, this)); m_class_interfaces.Add(new device_memory_interface_mb88(mconfig, this)); m_class_interfaces.Add(new device_state_interface_mb88(mconfig, this)); m_class_interfaces.Add(new device_disasm_interface_mb88(mconfig, this)); m_program_config = new address_space_config("program", endianness_t.ENDIANNESS_BIG, 8, (byte)program_width, 0, (program_width == 9) ? program_9bit : (program_width == 10) ? program_10bit : (address_map_constructor)program_11bit); m_data_config = new address_space_config("data", endianness_t.ENDIANNESS_BIG, 8, (byte)data_width, 0, (data_width == 4) ? data_4bit : (data_width == 5) ? data_5bit : (data_width == 6) ? data_6bit : (address_map_constructor)data_7bit); m_PLA = null; m_read_k = new devcb_read8(this); m_write_o = new devcb_write8(this); m_write_p = new devcb_write8(this); for (int i = 0; i < 4; i++) { m_read_r[i] = new devcb_read8(this); } for (int i = 0; i < 4; i++) { m_write_r[i] = new devcb_write8(this); } m_read_si = new devcb_read_line(this); m_write_so = new devcb_write_line(this); }
protected avgdvg_device_base(machine_config mconfig, device_type type, string tag, device_t owner, u32 clock) : base(mconfig, type, tag, owner, clock) { m_vector = new required_device <vector_device>(this, finder_base.DUMMY_TAG); m_memspace = new required_address_space(this, finder_base.DUMMY_TAG, -1); m_membase = 0; m_nvect = 0; m_pc = 0; m_sp = 0; m_dvx = 0; m_dvy = 0; m_stack = new u16 [] { 0, 0, 0, 0 }; m_data = 0; m_state_latch = 0; m_scale = 0; m_intensity = 0; m_op = 0; m_halt = 0; m_sync_halt = 0; m_xpos = 0; m_ypos = 0; m_prom = new required_region_ptr <u8>(this, "prom"); m_vg_run_timer = null; m_vg_halt_timer = null; }
protected m6805_base_device( machine_config mconfig, string tag, device_t owner, uint32_t clock, device_type type, configuration_params params_, address_map_constructor internal_map) : base(mconfig, type, tag, owner, clock) { //m_class_interfaces.Add(new device_execute_interface_m6805_base(mconfig, this)); m_class_interfaces.Add(new device_memory_interface_m6805_base(mconfig, this)); m_class_interfaces.Add(new device_state_interface_m6805_base(mconfig, this)); //m_class_interfaces.Add(new device_disasm_interface_m6805_base(mconfig, this)); m_dimemory = GetClassInterface <device_memory_interface_m6805_base>(); m_distate = GetClassInterface <device_state_interface_m6805_base>(); init_s_hmos_s_ops(); m_params = params_; m_program_config = new address_space_config("program", ENDIANNESS_BIG, 8, (u8)params_.m_addr_width, 0, internal_map); }
//static const atari_motion_objects_config s_mob_config; public atarisy2_state(machine_config mconfig, device_type type, string tag) : base(mconfig, type, tag) { m_maincpu = new required_device <t11_device>(this, "maincpu"); m_audiocpu = new required_device <m6502_device>(this, "audiocpu"); m_gfxdecode = new required_device <gfxdecode_device>(this, "gfxdecode"); m_screen = new required_device <screen_device>(this, "screen"); m_mob = new required_device <atari_motion_objects_device>(this, "mob"); m_slapstic_region = new required_region_ptr <uint16_t>(this, "maincpu"); m_playfield_tilemap = new required_device <tilemap_device>(this, "playfield"); m_alpha_tilemap = new required_device <tilemap_device>(this, "alpha"); m_xscroll = new required_shared_ptr <uint16_t>(this, "xscroll"); m_yscroll = new required_shared_ptr <uint16_t>(this, "yscroll"); m_soundlatch = new required_device <generic_latch_8_device>(this, "soundlatch"); m_mainlatch = new required_device <generic_latch_8_device>(this, "mainlatch"); m_ym2151 = new required_device <ym2151_device>(this, "ymsnd"); m_pokey = new required_device_array <pokey_device, u32_const_2>(this, "pokey{0}", 1, (base_, tag_) => { return(new device_finder <pokey_device, bool_const_true>(base_, tag_)); }); m_tms5220 = new optional_device <tms5220c_device>(this, "tms"); m_rombank = new required_memory_bank_array <u32_const_2>(this, "rombank{0}", 1); m_slapstic = new required_device <atari_slapstic_device>(this, "slapstic"); m_vmmu = new memory_view(this, "vmmu"); m_playfieldt = new required_shared_ptr <uint16_t>(this, "playfieldt"); m_playfieldb = new required_shared_ptr <uint16_t>(this, "playfieldb"); m_leds = new output_finder <u32_const_2>(this, "led{0}", 0); }
protected required_device <dac_16bit_r2r_twos_complement_device> m_dac; //required_device<dac_word_interface> m_dac; /* just to have a sound device */ protected ttl_mono_state(machine_config mconfig, device_type type, string tag) : base(mconfig, type, tag) { m_maincpu = new required_device <netlist_mame_device>(this, "maincpu"); m_video = new required_device <fixedfreq_device>(this, "fixfreq"); m_dac = new required_device <dac_16bit_r2r_twos_complement_device>(this, "dac"); /* just to have a sound device */ }
intref m_icount = new intref(); //int m_icount; // construction/destruction i8257_device(machine_config mconfig, string tag, device_t owner, uint32_t clock) : base(mconfig, I8257, tag, owner, clock) { m_class_interfaces.Add(new device_execute_interface_i8257(mconfig, this)); //device_execute_interface(mconfig, *this), m_icount.i = 0; m_reverse_rw = false; m_tc = false; m_msb = 0; m_hreq = CLEAR_LINE; m_hack = 0; m_ready = 1; m_state = 0; m_current_channel = 0; m_last_channel = 0; m_transfer_mode = 0; m_status = 0; m_request = 0; m_temp = 0; m_out_hrq_cb = new devcb_write_line(this); m_out_tc_cb = new devcb_write_line(this); m_in_memr_cb = new devcb_read8(this); m_out_memw_cb = new devcb_write8(this); m_in_ior_cb = new devcb_read8.array <u64_const_4>(this, () => { return(new devcb_read8(this)); }); m_out_iow_cb = new devcb_write8.array <u64_const_4>(this, () => { return(new devcb_write8(this)); }); m_out_dack_cb = new devcb_write_line.array <u64_const_4>(this, () => { return(new devcb_write_line(this)); }); }
// construction/destruction //template <typename T> public gfxdecode_device(machine_config mconfig, string tag, device_t owner, string palette_tag, gfx_decode_entry [] gfxinfo) : this(mconfig, tag, owner, 0) { m_digfx = GetClassInterface <device_gfx_interface>(); m_digfx.set_palette(palette_tag); m_digfx.set_info(gfxinfo); }
public dkong_state(machine_config mconfig, device_type type, string tag) : base(mconfig, type, tag) { m_maincpu = new required_device <cpu_device>(this, "maincpu"); m_soundcpu = new optional_device <mcs48_cpu_device>(this, "soundcpu"); m_eeprom = new optional_device <eeprom_serial_93cxx_device>(this, "eeprom"); m_dev_n2a03a = new optional_device <intref>(this, "n2a03a"); m_dev_n2a03b = new optional_device <intref>(this, "n2a03b"); m_dev_vp2 = new optional_device <latch8_device>(this, "virtual_p2"); m_dev_6h = new optional_device <latch8_device>(this, "ls259.6h"); m_ls175_3d = new optional_device <latch8_device>(this, "ls175.3d"); m_discrete = new optional_device <discrete_device>(this, "discrete"); m_m58817 = new optional_device <intref>(this, "tms"); m_watchdog = new optional_device <watchdog_timer_device>(this, "watchdog"); m_video_ram = new required_shared_ptr_uint8_t(this, "video_ram"); m_sprite_ram = new required_shared_ptr_uint8_t(this, "sprite_ram"); m_snd_rom = new optional_region_ptr_uint8_t(this, "soundcpu"); m_vidhw = DKONG_BOARD; m_sig30Hz = 0; m_blue_level = 0; m_cv1 = 0; m_cv2 = 0; m_vg1 = 0; m_vg2 = 0; m_vg3 = 0; m_cv3 = 0; m_cv4 = 0; m_gfxdecode = new required_device <gfxdecode_device>(this, "gfxdecode"); m_screen = new required_device <screen_device>(this, "screen"); m_palette = new required_device <palette_device>(this, "palette"); m_z80dma = new optional_device <intref>(this, "z80dma"); m_dma8257 = new optional_device <i8257_device>(this, "dma8257"); }
emu_timer m_timer; // timer for triggering reset // construction/destruction //------------------------------------------------- // watchdog_timer_device - constructor //------------------------------------------------- watchdog_timer_device(machine_config mconfig, string tag, device_t owner, uint32_t clock = 0) : base(mconfig, WATCHDOG_TIMER, tag, owner, clock) { m_vblank_count = 0; m_time = attotime.zero; m_screen = new optional_device <screen_device>(this, finder_base.DUMMY_TAG); }
memory_array m_paletteram_ext = new memory_array(); // extended memory // construction/destruction palette_device(machine_config mconfig, string tag, device_t owner, init_delegate init, u32 entries = 0U, u32 indirect = 0U) : this(mconfig, tag, owner, 0U) { set_entries(entries); set_indirect_entries(indirect); set_init(init); }
// construction/destruction //------------------------------------------------- // eeprom_base_device - constructor //------------------------------------------------- protected eeprom_base_device(machine_config mconfig, device_type devtype, string tag, device_t owner) : base(mconfig, devtype, tag, owner, 0) { m_class_interfaces.Add(new device_nvram_interface_eeprom(mconfig, this)); //device_nvram_interface(mconfig, *this), m_nvram_interface = GetClassInterface <device_nvram_interface_eeprom>(); m_region = new optional_memory_region(this, DEVICE_SELF); m_cells = 0; m_address_bits = 0; m_data_bits = 0; m_default_data = null; m_default_data_size = 0; m_default_value = 0; m_default_value_set = false; m_completion_time = attotime.zero; // a 2ms write time is too long for rfjetsa m_operation_time[(int)timing_type.WRITE_TIME] = attotime.from_usec(1750); m_operation_time[(int)timing_type.WRITE_ALL_TIME] = attotime.from_usec(8000); m_operation_time[(int)timing_type.ERASE_TIME] = attotime.from_usec(1000); m_operation_time[(int)timing_type.ERASE_ALL_TIME] = attotime.from_usec(8000); }
protected m6805_hmos_device(machine_config mconfig, string tag, device_t owner, u32 clock, device_type type, u32 addr_width, unsigned ram_size) : base(mconfig, tag, owner, clock, type, new configuration_params(addr_width > 13 ? s_hmos_b_ops : s_hmos_s_ops, s_hmos_cycles, addr_width, 0x007f, 0x0060, M6805_VECTOR_SWI), null) //map) { m6805_base_device_after_ctor(map); //m_class_interfaces.Add(new device_execute_interface_m6805_hmos(mconfig, this)); m_timer = new m6805_timer(this); m_port_open_drain = new bool [PORT_COUNT] { false, false, false, false }; m_port_mask = new u8 [PORT_COUNT] { 0x00, 0x00, 0x00, 0x00 }; m_port_input = new u8 [PORT_COUNT] { 0xff, 0xff, 0xff, 0xff }; m_port_latch = new u8 [PORT_COUNT] { 0xff, 0xff, 0xff, 0xff }; m_port_ddr = new u8 [PORT_COUNT] { 0x00, 0x00, 0x00, 0x00 }; m_port_cb_r = new devcb_read8.array <u64_const_PORT_COUNT>(this, () => { return(new devcb_read8(this)); }); m_port_cb_w = new devcb_write8.array <u64_const_PORT_COUNT>(this, () => { return(new devcb_write8(this)); }); m_ram_size = ram_size; }
namco_50xx_device(machine_config mconfig, string tag, device_t owner, u32 clock) : base(mconfig, NAMCO_50XX, tag, owner, clock) { m_cpu = new required_device <mb88_cpu_device>(this, "mcu"); m_rw = 0; m_cmd = 0; m_portO = 0; }
protected override void device_add_mconfig(machine_config config) { M68705P5(config, m_mcu, DERIVED_CLOCK(1, 1)); m_mcu.op0.porta_r().set(mcu_pa_r).reg(); m_mcu.op0.portc_r().set(mcu_pc_r).reg(); m_mcu.op0.porta_w().set(mcu_pa_w).reg(); m_mcu.op0.portb_w().set(mcu_pb_w).reg(); }
protected m6800_cpu_device(machine_config mconfig, device_type type, string tag, device_t owner, uint32_t clock, op_func [] insn, uint8_t [] cycles, address_map_constructor internal_) : base(mconfig, type, tag, owner, clock) { m_program_config = new address_space_config("program", ENDIANNESS_BIG, 8, 16, 0, internal_); m_decrypted_opcodes_config = new address_space_config("program", ENDIANNESS_BIG, 8, 16, 0); m_insn = insn; m_cycles = cycles; }
bool m_decoded; // have we processed our decode info yet? // construction/destruction //------------------------------------------------- // device_gfx_interface - constructor //------------------------------------------------- public device_gfx_interface(machine_config mconfig, device_t device, gfx_decode_entry [] gfxinfo = null, string palette_tag = finder_base.DUMMY_TAG) : base(device, "gfx") { m_paletteDevice = new optional_device <palette_device>(this.device(), palette_tag); //m_palette(*this, palette_tag), m_gfxdecodeinfo = gfxinfo; m_palette_is_disabled = false; m_decoded = false; }
public digdug_state(machine_config mconfig, device_type type, string tag) : base(mconfig, type, tag) { m_earom = new required_device <er2055_device>(this, "earom"); m_digdug_objram = new required_shared_ptr_uint8_t(this, "digdug_objram"); m_digdug_posram = new required_shared_ptr_uint8_t(this, "digdug_posram"); m_digdug_flpram = new required_shared_ptr_uint8_t(this, "digdug_flpram"); }
screen_device m_screen; // pointer to the screen device // construction/destruction //------------------------------------------------- // device_video_interface - constructor //------------------------------------------------- public device_video_interface(machine_config mconfig, device_t device, bool screen_required = true) : base(device, "video") { m_screen_required = screen_required; m_screen_base = device; m_screen_tag = s_unconfigured_screen_tag; m_screen = null; }
gunfight_audio_device(machine_config mconfig, string tag, device_t owner, u32 clock = 0) : base(mconfig, GUNFIGHT_AUDIO, tag, owner, clock) { m_left_shot = new required_device <netlist_mame_logic_input_device>(this, "sound_nl:left_shot"); m_right_shot = new required_device <netlist_mame_logic_input_device>(this, "sound_nl:right_shot"); m_left_hit = new required_device <netlist_mame_logic_input_device>(this, "sound_nl:left_hit"); m_right_hit = new required_device <netlist_mame_logic_input_device>(this, "sound_nl:right_hit"); }
namco_54xx_device(machine_config mconfig, string tag, device_t owner, u32 clock) : base(mconfig, NAMCO_54XX, tag, owner, clock) { m_cpu = new required_device <mb88_cpu_device>(this, "mcu"); m_discrete = new required_device <discrete_device>(this, finder_base.DUMMY_TAG); m_basenode = 0; m_latched_cmd = 0; }
//------------------------------------------------- // device_add_mconfig - add device configuration //------------------------------------------------- protected override void device_add_mconfig(machine_config config) { MB8844(config, m_cpu, DERIVED_CLOCK(1, 1)); /* parent clock, internally divided by 6 */ m_cpu.target.read_k().set(K_r).reg(); m_cpu.target.write_o().set(O_w).reg(); m_cpu.target.read_r(0).set(R0_r).reg(); m_cpu.target.write_r(1).set(R1_w).reg(); }
invaders_audio_device(machine_config mconfig, string tag, device_t owner, u32 clock = 0) : base(mconfig, INVADERS_AUDIO, tag, owner, clock) { m_sn = new required_device <sn76477_device>(this, "snsnd"); m_discrete = new required_device <discrete_sound_device>(this, "discrete"); m_flip_screen_out = new devcb_write_line(this); m_p2 = 0; }