// 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); }
namco_53xx_device(machine_config mconfig, string tag, device_t owner, u32 clock) : base(mconfig, NAMCO_53XX, tag, owner, clock) { m_cpu = new required_device <mb88_cpu_device>(this, "mcu"); m_portO = 0; m_k = new devcb_read8(this); for (int i = 0; i < 4; i++) { m_in[i] = new devcb_read8(this); } m_p = new devcb_write8(this); }
protected ay8910_device(machine_config mconfig, device_type type, string tag, device_t owner, u32 clock, psg_type_t psg_type, int streams, int ioports) : base(mconfig, type, tag, owner, clock) { m_class_interfaces.Add(new device_sound_interface_ay8910(mconfig, this)); // device_sound_interface(mconfig, *this); m_type = psg_type; m_streams = streams; m_ioports = ioports; m_ready = 0; m_channel = null; m_active = false; m_register_latch = 0; m_last_enable = 0; m_prescale_noise = 0; m_count_noise = 0; m_count_env = 0; m_env_step = 0; m_env_volume = 0; m_hold = 0; m_alternate = 0; m_attack = 0; m_holding = 0; m_rng = 0; m_env_step_mask = psg_type == psg_type_t.PSG_TYPE_AY ? (byte)0x0f : (byte)0x1f; m_step = psg_type == psg_type_t.PSG_TYPE_AY ? 2 : 1; m_zero_is_off = psg_type == psg_type_t.PSG_TYPE_AY ? 1 : 0; m_par = psg_type == psg_type_t.PSG_TYPE_AY ? ay8910_param : ym2149_param; m_par_env = psg_type == psg_type_t.PSG_TYPE_AY ? ay8910_param : ym2149_param_env; m_flags = AY8910_LEGACY_OUTPUT; m_port_a_read_cb = new devcb_read8(this); m_port_b_read_cb = new devcb_read8(this); m_port_a_write_cb = new devcb_write8(this); m_port_b_write_cb = new devcb_write8(this); memset(m_regs, (byte)0); memset(m_count, 0); memset(m_output, (byte)0); memset(m_vol_enabled, (byte)0); memset(m_vol_table, 0); memset(m_env_table, 0); m_res_load[0] = m_res_load[1] = m_res_load[2] = 1000; //Default values for resistor loads set_type(psg_type); }
i8255_device(machine_config mconfig, device_type type, string tag, device_t owner, uint32_t clock, bool is_ams40489) : base(mconfig, type, tag, owner, clock) { m_force_portb_in = is_ams40489; m_force_portc_out = is_ams40489; m_dont_clear_output_latches = is_ams40489; m_in_pa_cb = new devcb_read8(this); m_in_pb_cb = new devcb_read8(this); m_in_pc_cb = new devcb_read8(this); m_out_pa_cb = new devcb_write8(this); m_out_pb_cb = new devcb_write8(this); m_out_pc_cb = new devcb_write8(this); m_tri_pa_cb = new devcb_read8(this); m_tri_pb_cb = new devcb_read8(this); m_control = 0; m_intr = new int[2] { 0, 0 }; }
namco_06xx_device(machine_config mconfig, string tag, device_t owner, u32 clock) : base(mconfig, NAMCO_06XX, tag, owner, clock) { m_control = 0; m_nmicpu = new required_device <cpu_device>(this, finder_base.DUMMY_TAG); for (int i = 0; i < 4; i++) { m_read[i] = new devcb_read8(this); } for (int i = 0; i < 4; i++) { m_readreq[i] = new devcb_write_line(this); } for (int i = 0; i < 4; i++) { m_write[i] = new devcb_write8(this); } }
namco_51xx_device(machine_config mconfig, string tag, device_t owner, u32 clock) : base(mconfig, NAMCO_51XX, tag, owner, clock) { m_cpu = new required_device <mb88_cpu_device>(this, "mcu"); m_screen = new required_device <screen_device>(this, finder_base.DUMMY_TAG); for (int i = 0; i < 4; i++) { m_in[i] = new devcb_read8(this); } for (int i = 0; i < 2; i++) { m_out[i] = new devcb_write8(this); } m_lastcoins = 0; m_lastbuttons = 0; m_mode = 0; m_coincred_mode = 0; m_remap_joy = 0; }
intref m_icountRef = 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_icountRef.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); for (int i = 0; i < 4; i++) { m_in_ior_cb[i] = new devcb_read8(this); } for (int i = 0; i < 4; i++) { m_out_iow_cb[i] = new devcb_write8(this); } for (int i = 0; i < 4; i++) { m_out_dack_cb[i] = new devcb_write_line(this); } }