trunk/src/devices/cpu/m6502/deco16.cpp
| r250194 | r250195 | |
| 16 | 16 | const device_type DECO16 = &device_creator<deco16_device>; |
| 17 | 17 | |
| 18 | 18 | deco16_device::deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 19 | | m6502_device(mconfig, DECO16, "DECO16", tag, owner, clock, "deco16", __FILE__), |
| 19 | m6502_device(mconfig, DECO16, "DECO16", tag, owner, clock, "deco16", __FILE__), |
| 20 | io(NULL), |
| 20 | 21 | io_config("io", ENDIANNESS_LITTLE, 8, 16) |
| 21 | 22 | { |
| 22 | 23 | } |
trunk/src/devices/cpu/m6502/m4510.cpp
| r250194 | r250195 | |
| 14 | 14 | const device_type M4510 = &device_creator<m4510_device>; |
| 15 | 15 | |
| 16 | 16 | m4510_device::m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 17 | | m65ce02_device(mconfig, M4510, "M4510", tag, owner, clock, "m4510", __FILE__) |
| 17 | m65ce02_device(mconfig, M4510, "M4510", tag, owner, clock, "m4510", __FILE__), |
| 18 | map_enable(0), |
| 19 | nomap(false) |
| 18 | 20 | { |
| 19 | 21 | program_config.m_addrbus_width = 20; |
| 20 | 22 | program_config.m_logaddr_width = 16; |
trunk/src/devices/cpu/m6809/hd6309.cpp
| r250194 | r250195 | |
| 127 | 127 | // hd6309_device - constructor |
| 128 | 128 | //------------------------------------------------- |
| 129 | 129 | |
| 130 | | hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 131 | | : m6809_base_device(mconfig, "HD6309", tag, owner, clock, HD6309, 4, "hd6309", __FILE__) |
| 130 | hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 131 | m6809_base_device(mconfig, "HD6309", tag, owner, clock, HD6309, 4, "hd6309", __FILE__), |
| 132 | m_md(0), |
| 133 | m_temp_im(0) |
| 132 | 134 | { |
| 133 | 135 | } |
| 134 | 136 | |
| r250194 | r250195 | |
| 450 | 452 | |
| 451 | 453 | inline m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_register(UINT8 reg) |
| 452 | 454 | { |
| 453 | | UINT16 value = 0; |
| 455 | UINT16 value; |
| 454 | 456 | |
| 455 | 457 | switch(reg & 0x0F) |
| 456 | 458 | { |
trunk/src/devices/machine/6821pia.cpp
| r250194 | r250195 | |
| 51 | 51 | |
| 52 | 52 | pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 53 | 53 | : device_t(mconfig, PIA6821, "6821 PIA", tag, owner, clock, "pia6821", __FILE__), |
| 54 | | m_in_a_handler(*this), |
| 55 | | m_in_b_handler(*this), |
| 56 | | m_in_ca1_handler(*this), |
| 57 | | m_in_cb1_handler(*this), |
| 58 | | m_in_ca2_handler(*this), |
| 59 | | m_out_a_handler(*this), |
| 60 | | m_out_b_handler(*this), |
| 61 | | m_ca2_handler(*this), |
| 62 | | m_cb2_handler(*this), |
| 63 | | m_irqa_handler(*this), |
| 64 | | m_irqb_handler(*this), |
| 65 | | m_in_ca1(0), |
| 66 | | m_ctl_a(0), |
| 67 | | m_irq_a_state(0), |
| 68 | | m_in_cb1(0), |
| 69 | | m_ctl_b(0), |
| 70 | | m_irq_b_state(0) |
| 54 | m_in_a_handler(*this), |
| 55 | m_in_b_handler(*this), |
| 56 | m_in_ca1_handler(*this), |
| 57 | m_in_cb1_handler(*this), |
| 58 | m_in_ca2_handler(*this), |
| 59 | m_out_a_handler(*this), |
| 60 | m_out_b_handler(*this), |
| 61 | m_ca2_handler(*this), |
| 62 | m_cb2_handler(*this), |
| 63 | m_irqa_handler(*this), |
| 64 | m_irqb_handler(*this), m_in_a(0), |
| 65 | m_in_ca1(0), m_in_ca2(0), m_out_a(0), m_out_ca2(0), m_port_a_z_mask(0), m_ddr_a(0), |
| 66 | m_ctl_a(0), m_irq_a1(0), m_irq_a2(0), |
| 67 | m_irq_a_state(0), m_in_b(0), |
| 68 | m_in_cb1(0), m_in_cb2(0), m_out_b(0), m_out_cb2(0), m_last_out_cb2_z(0), m_ddr_b(0), |
| 69 | m_ctl_b(0), m_irq_b1(0), m_irq_b2(0), |
| 70 | m_irq_b_state(0), m_in_a_pushed(false), m_out_a_needs_pulled(false), m_in_ca1_pushed(false), |
| 71 | m_in_ca2_pushed(false), m_out_ca2_needs_pulled(false), m_in_b_pushed(false), m_out_b_needs_pulled(false), |
| 72 | m_in_cb1_pushed(false), m_in_cb2_pushed(false), m_out_cb2_needs_pulled(false), m_logged_port_a_not_connected(false), |
| 73 | m_logged_port_b_not_connected(false), m_logged_ca1_not_connected(false), m_logged_ca2_not_connected(false), |
| 74 | m_logged_cb1_not_connected(false), m_logged_cb2_not_connected(false) |
| 71 | 75 | { |
| 72 | 76 | } |
| 73 | 77 | |
trunk/src/devices/sound/2151intf.cpp
| r250194 | r250195 | |
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "emu.h" |
| 12 | | #include "fm.h" |
| 13 | 12 | #include "2151intf.h" |
| 14 | 13 | #include "ym2151.h" |
| 15 | 14 | |
| r250194 | r250195 | |
| 24 | 23 | |
| 25 | 24 | ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 26 | 25 | : device_t(mconfig, YM2151, "YM2151", tag, owner, clock, "ym2151", __FILE__), |
| 27 | | device_sound_interface(mconfig, *this), |
| 26 | device_sound_interface(mconfig, *this), |
| 27 | m_stream(NULL), |
| 28 | m_chip(NULL), |
| 29 | m_lastreg(0), |
| 28 | 30 | m_irqhandler(*this), |
| 29 | 31 | m_portwritehandler(*this) |
| 30 | 32 | { |
trunk/src/devices/sound/3526intf.cpp
| r250194 | r250195 | |
| 19 | 19 | * |
| 20 | 20 | ******************************************************************************/ |
| 21 | 21 | #include "3526intf.h" |
| 22 | | #include "fm.h" |
| 23 | 22 | #include "fmopl.h" |
| 24 | 23 | |
| 25 | 24 | |
| r250194 | r250195 | |
| 157 | 156 | |
| 158 | 157 | ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 159 | 158 | : device_t(mconfig, YM3526, "YM3526", tag, owner, clock, "ym3526", __FILE__), |
| 160 | | device_sound_interface(mconfig, *this), |
| 159 | device_sound_interface(mconfig, *this), |
| 160 | m_stream(NULL), |
| 161 | m_chip(NULL), |
| 161 | 162 | m_irq_handler(*this) |
| 162 | 163 | { |
| 163 | 164 | } |
trunk/src/devices/sound/3812intf.cpp
| r250194 | r250195 | |
| 20 | 20 | ******************************************************************************/ |
| 21 | 21 | #include "emu.h" |
| 22 | 22 | #include "3812intf.h" |
| 23 | | #include "fm.h" |
| 24 | 23 | #include "sound/fmopl.h" |
| 25 | 24 | |
| 26 | 25 | |
| r250194 | r250195 | |
| 155 | 154 | |
| 156 | 155 | ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 157 | 156 | : device_t(mconfig, YM3812, "YM3812", tag, owner, clock, "ym3812", __FILE__), |
| 158 | | device_sound_interface(mconfig, *this), |
| 157 | device_sound_interface(mconfig, *this), |
| 158 | m_stream(NULL), |
| 159 | m_chip(NULL), |
| 159 | 160 | m_irq_handler(*this) |
| 160 | 161 | { |
| 161 | 162 | } |
trunk/src/devices/sound/8950intf.cpp
| r250194 | r250195 | |
| 19 | 19 | * |
| 20 | 20 | ******************************************************************************/ |
| 21 | 21 | #include "8950intf.h" |
| 22 | | #include "fm.h" |
| 23 | 22 | #include "fmopl.h" |
| 24 | 23 | |
| 25 | 24 | |
| r250194 | r250195 | |
| 206 | 205 | |
| 207 | 206 | y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 208 | 207 | : device_t(mconfig, Y8950, "Y8950", tag, owner, clock, "y8950", __FILE__), |
| 209 | | device_sound_interface(mconfig, *this), |
| 208 | device_sound_interface(mconfig, *this), |
| 209 | m_stream(NULL), |
| 210 | m_chip(NULL), |
| 210 | 211 | m_irq_handler(*this), |
| 211 | 212 | m_keyboard_read_handler(*this), |
| 212 | 213 | m_keyboard_write_handler(*this), |
trunk/src/devices/sound/discrete.cpp
| r250194 | r250195 | |
| 127 | 127 | |
| 128 | 128 | protected: |
| 129 | 129 | discrete_task(discrete_device &pdev) |
| 130 | | : task_group(0), m_device(pdev), m_threadid(-1) |
| 131 | | { |
| 130 | : task_group(0), m_device(pdev), m_threadid(-1), m_samples(0) |
| 131 | { |
| 132 | 132 | source_list.clear(); |
| 133 | 133 | step_list.clear(); |
| 134 | 134 | m_buffers.clear(); |
| r250194 | r250195 | |
| 324 | 324 | buf.source = dest_node->m_input[inputnum]; |
| 325 | 325 | buf.node_num = inputnode_num; |
| 326 | 326 | //buf.node = device->discrete_find_node(inputnode); |
| 327 | | i = m_buffers.count(); |
| 327 | m_buffers.count(); |
| 328 | 328 | pbuf = m_buffers.add(buf); |
| 329 | 329 | } |
| 330 | 330 | m_device.discrete_log("dso_task_start - buffering %d(%d) in task %p group %d referenced by %d group %d", NODE_INDEX(inputnode_num), NODE_CHILD_NODE_NUM(inputnode_num), this, task_group, dest_node->index(), dest_task->task_group); |
| r250194 | r250195 | |
| 354 | 354 | * |
| 355 | 355 | *************************************/ |
| 356 | 356 | |
| 357 | | discrete_base_node::discrete_base_node() : |
| 357 | discrete_base_node::discrete_base_node() : |
| 358 | m_device(NULL), |
| 359 | m_block(NULL), |
| 360 | m_active_inputs(0), |
| 361 | m_custom(NULL), |
| 362 | m_input_is_node(0), |
| 358 | 363 | m_step_intf(NULL), |
| 359 | | m_input_intf(NULL) |
| 364 | m_input_intf(NULL), |
| 365 | m_output_intf(NULL) |
| 360 | 366 | { |
| 361 | 367 | m_output[0] = 0.0; |
| 362 | 368 | } |
| r250194 | r250195 | |
| 845 | 851 | |
| 846 | 852 | discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 847 | 853 | : discrete_device(mconfig, DISCRETE, "DISCRETE", tag, owner, clock), |
| 848 | | device_sound_interface(mconfig, *this) |
| 854 | device_sound_interface(mconfig, *this), |
| 855 | m_stream(NULL) |
| 849 | 856 | { |
| 850 | 857 | } |
| 851 | 858 | |
| r250194 | r250195 | |
| 1096 | 1103 | { |
| 1097 | 1104 | const discrete_base_node *node = discrete_find_node(offset); |
| 1098 | 1105 | |
| 1099 | | UINT8 data = 0; |
| 1106 | UINT8 data; |
| 1100 | 1107 | |
| 1101 | 1108 | /* Read the node input value if allowed */ |
| 1102 | 1109 | if (node) |
trunk/src/devices/sound/votrax.cpp
| r250194 | r250195 | |
| 96 | 96 | |
| 97 | 97 | votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 98 | 98 | : device_t(mconfig, VOTRAX_SC01, "Votrax SC-01", tag, owner, clock, "votrax", __FILE__), |
| 99 | | device_sound_interface(mconfig, *this), |
| 100 | | m_stream(NULL), |
| 101 | | m_phoneme_timer(NULL), |
| 102 | | m_request_cb(*this) |
| 99 | device_sound_interface(mconfig, *this), |
| 100 | m_stream(NULL), |
| 101 | m_phoneme_timer(NULL), m_rom(NULL), m_inflection(0), m_phoneme(0), |
| 102 | m_request_cb(*this), m_request_state(0), m_internal_request(0), m_master_clock_freq(0), m_master_clock(0), m_counter_34(0), |
| 103 | m_latch_70(0), m_latch_72(0), m_beta1(0), m_p2(0), m_p1(0), m_phi2(0), m_phi1(0), m_phi2_20(0), m_phi1_20(0), m_subphoneme_period(0), |
| 104 | m_subphoneme_count(0), m_clock_88(0), m_latch_42(0), m_counter_84(0), m_latch_92(0), m_srff_132(false), m_srff_114(false), m_srff_112(false), |
| 105 | m_srff_142(false), m_latch_80(0), m_counter_220(0), m_counter_222(0), m_counter_224(0), m_counter_234(0), m_counter_236(0), m_fgate(0), |
| 106 | m_glottal_sync(0), m_0625_clock(0), m_counter_46(0), m_latch_46(0), m_latch_168(0), m_latch_170(0), m_f1(0), m_f2(0), m_fc(0), m_f3(0), |
| 107 | m_f2q(0), m_va(0), m_fa(0), m_noise_clock(0), m_shift_252(0), m_counter_250(0) |
| 103 | 108 | { |
| 104 | 109 | } |
| 105 | 110 | |
trunk/src/devices/sound/ym2151.cpp
| r250194 | r250195 | |
| 601 | 601 | |
| 602 | 602 | for (i=0; i<768; i++) |
| 603 | 603 | { |
| 604 | #if 0 |
| 604 | 605 | /* 3.4375 Hz is note A; C# is 4 semitones higher */ |
| 605 | 606 | Hz = 1000; |
| 606 | | #if 0 |
| 607 | | /* Hz is close, but not perfect */ |
| 607 | /* Hz is close, but not perfect */ |
| 608 | 608 | //Hz = scaler * 3.4375 * pow (2, (i + 4 * 64 ) / 768.0 ); |
| 609 | 609 | /* calculate phase increment */ |
| 610 | 610 | phaseinc = (Hz*SIN_LEN) / (double)chip->sampfreq; |
| r250194 | r250195 | |
| 687 | 687 | |
| 688 | 688 | /* calculate timers' deltas */ |
| 689 | 689 | /* User's Manual pages 15,16 */ |
| 690 | | mult = (1<<TIMER_SH); |
| 690 | #ifndef USE_MAME_TIMERS |
| 691 | mult = (1<<TIMER_SH); |
| 692 | #endif |
| 691 | 693 | for (i=0; i<1024; i++) |
| 692 | 694 | { |
| 693 | 695 | /* ASG 980324: changed to compute both tim_A_tab and timer_A_time */ |