Previous 199869 Revisions Next

r41683 Wednesday 11th November, 2015 at 16:47:41 UTC by Miodrag Milanović
Some more cleanup (nw)
[src/devices/cpu/m6502]deco16.cpp m3745x.cpp m4510.cpp m5074x.cpp
[src/devices/cpu/m6809]6309dasm.cpp 6809dasm.cpp hd6309.cpp
[src/devices/cpu/tms9900]tms9995.h
[src/devices/cpu/z80]z80dasm.cpp
[src/devices/machine]6532riot.cpp 6821pia.cpp bankdev.cpp z80ctc.cpp z80ctc.h
[src/devices/sound]2151intf.cpp 3526intf.cpp 3812intf.cpp 8950intf.cpp ay8910.cpp discrete.cpp votrax.cpp ym2151.cpp

trunk/src/devices/cpu/m6502/deco16.cpp
r250194r250195
1616const device_type DECO16 = &device_creator<deco16_device>;
1717
1818deco16_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),
2021   io_config("io", ENDIANNESS_LITTLE, 8, 16)
2122{
2223}
trunk/src/devices/cpu/m6502/m3745x.cpp
r250194r250195
5555   read_ad_4(*this),
5656   read_ad_5(*this),
5757   read_ad_6(*this),
58   read_ad_7(*this)
58   read_ad_7(*this),
59   m_intreq1(0),
60   m_intreq2(0),
61   m_intctrl1(0),
62   m_intctrl2(0),
63   m_adctrl(0),
64   m_last_all_ints(0)
5965{
6066}
6167
r250194r250195
195201
196202void m3745x_device::recalc_irqs()
197203{
198   UINT16 all_ints = 0;
204   UINT16 all_ints;
199205   int static const irq_lines[16] =
200206   {
201207      -1, -1, -1, M740_INT11_LINE, M740_INT12_LINE, M740_INT13_LINE, -1, -1,
trunk/src/devices/cpu/m6502/m4510.cpp
r250194r250195
1414const device_type M4510 = &device_creator<m4510_device>;
1515
1616m4510_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)
1820{
1921   program_config.m_addrbus_width = 20;
2022   program_config.m_logaddr_width = 16;
trunk/src/devices/cpu/m6502/m5074x.cpp
r250194r250195
4949   write_p0(*this),
5050   write_p1(*this),
5151   write_p2(*this),
52   write_p3(*this)
52   write_p3(*this),
53   m_intctrl(0),
54   m_tmrctrl(0),
55   m_tmr12pre(0),
56   m_tmr1(0),
57   m_tmr2(0),
58   m_tmrxpre(0),
59   m_tmrx(0),
60   m_tmr1latch(0),
61   m_tmr2latch(0),
62   m_tmrxlatch(0),
63   m_last_all_ints(0)
5364{
5465}
5566
trunk/src/devices/cpu/m6809/6309dasm.cpp
r250194r250195
613613   unsigned int ea, flags;
614614   int numoperands, offset, indirect;
615615
616   int i, p = 0, page = 0, opcode_found = FALSE;
616   int i, p = 0, page = 0, opcode_found;
617617
618618   do
619619   {
trunk/src/devices/cpu/m6809/6809dasm.cpp
r250194r250195
372372   const UINT8 *operandarray;
373373   unsigned int ea, flags;
374374   int numoperands, offset, indirect;
375   int i, p = 0, page = 0, opcode_found = FALSE;
375   int i, p = 0, page = 0, opcode_found;
376376
377377   do
378378   {
trunk/src/devices/cpu/m6809/hd6309.cpp
r250194r250195
127127//  hd6309_device - constructor
128128//-------------------------------------------------
129129
130hd6309_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__)
130hd6309_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)
132134{
133135}
134136
r250194r250195
450452
451453inline m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_register(UINT8 reg)
452454{
453   UINT16 value = 0;
455   UINT16 value;
454456
455457   switch(reg & 0x0F)
456458   {
trunk/src/devices/cpu/tms9900/tms9995.h
r250194r250195
131131   // Processor states
132132   bool    m_idle_state;
133133   bool    m_nmi_state;
134   bool    m_irq_state;
134//   bool    m_irq_state;
135135   bool    m_hold_state;
136136
137137   // READY handling. The READY line is operated before the clock
r250194r250195
382382   void alu_lst_lwp();
383383   void alu_mov();
384384   void alu_multiply();
385   void alu_multiply_signed();
385//   void alu_multiply_signed();
386386   void alu_rtwp();
387387   void alu_sbo_sbz();
388388   void alu_shift();
trunk/src/devices/cpu/z80/z80dasm.cpp
r250194r250195
420420   char *dst;
421421   INT8 offset = 0;
422422   UINT8 op, op1 = 0;
423   UINT16 ea = 0;
423   UINT16 ea;
424424   int pos = 0;
425425
426426   ixy = "oops!!";
trunk/src/devices/machine/6532riot.cpp
r250194r250195
238238
239239UINT8 riot6532_device::reg_r(UINT8 offset, bool debugger_access)
240240{
241   UINT8 val = 0;
241   UINT8 val;
242242
243243   /* if A2 == 1 and A0 == 1, we are reading interrupt flags */
244244   if ((offset & 0x05) == 0x05)
r250194r250195
392392      m_out_pa_cb(*this),
393393      m_in_pb_cb(*this),
394394      m_out_pb_cb(*this),
395      m_irq_cb(*this),
395      m_irq_cb(*this),
396      m_irqstate(0),
397      m_irqenable(0),
396398      m_irq(CLEAR_LINE),
397399      m_pa7dir(0),
398      m_pa7prev(0)
400      m_pa7prev(0),
401      m_timershift(0),
402      m_timerstate(0),
403      m_timer(NULL)
399404{
400405   memset(m_port, 0x00, sizeof(m_port));
401406}
trunk/src/devices/machine/6821pia.cpp
r250194r250195
5151
5252pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5353   : 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)
7175{
7276}
7377
trunk/src/devices/machine/bankdev.cpp
r250194r250195
1111      m_endianness(ENDIANNESS_NATIVE),
1212      m_databus_width(0),
1313      m_addrbus_width(32),
14      m_stride(1),
14      m_stride(1),
15      m_program(NULL),
1516      m_offset(0)
1617{
1718}
trunk/src/devices/machine/z80ctc.cpp
r250194r250195
1010
1111#include "emu.h"
1212#include "z80ctc.h"
13#include "cpu/z80/z80.h"
1413#include "cpu/z80/z80daisy.h"
1514
1615
r250194r250195
8685      m_zc0_cb(*this),
8786      m_zc1_cb(*this),
8887      m_zc2_cb(*this),
89      m_zc3_cb(*this)
88      m_zc3_cb(*this),
89      m_vector(0)
9090{
9191}
9292
r250194r250195
284284//-------------------------------------------------
285285
286286z80ctc_device::ctc_channel::ctc_channel()
287   : m_mode(0),
287   : m_device(NULL),
288      m_index(0),
289      m_mode(0),
288290      m_tconst(0),
289291      m_down(0),
290292      m_extclk(0),
trunk/src/devices/machine/z80ctc.h
r250194r250195
8888private:
8989   // internal helpers
9090   void interrupt_check();
91   void timercallback(int chanindex);
9291
9392   // a single channel within the CTC
9493   class ctc_channel
trunk/src/devices/sound/2151intf.cpp
r250194r250195
99***************************************************************************/
1010
1111#include "emu.h"
12#include "fm.h"
1312#include "2151intf.h"
1413#include "ym2151.h"
1514
r250194r250195
2423
2524ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2625   : 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),
2830      m_irqhandler(*this),
2931      m_portwritehandler(*this)
3032{
trunk/src/devices/sound/3526intf.cpp
r250194r250195
1919*
2020******************************************************************************/
2121#include "3526intf.h"
22#include "fm.h"
2322#include "fmopl.h"
2423
2524
r250194r250195
157156
158157ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
159158   : 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),
161162      m_irq_handler(*this)
162163{
163164}
trunk/src/devices/sound/3812intf.cpp
r250194r250195
2020******************************************************************************/
2121#include "emu.h"
2222#include "3812intf.h"
23#include "fm.h"
2423#include "sound/fmopl.h"
2524
2625
r250194r250195
155154
156155ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
157156   : 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),
159160      m_irq_handler(*this)
160161{
161162}
trunk/src/devices/sound/8950intf.cpp
r250194r250195
1919*
2020******************************************************************************/
2121#include "8950intf.h"
22#include "fm.h"
2322#include "fmopl.h"
2423
2524
r250194r250195
206205
207206y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
208207   : 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),
210211      m_irq_handler(*this),
211212      m_keyboard_read_handler(*this),
212213      m_keyboard_write_handler(*this),
trunk/src/devices/sound/ay8910.cpp
r250194r250195
493493INLINE void build_single_table(double rl, const ay8910_device::ay_ym_param *par, int normalize, INT32 *tab, int zero_is_off)
494494{
495495   int j;
496   double rt, rw = 0;
496   double rt;
497   double rw;
497498   double temp[32], min=10.0, max=0.0;
498499
499500   for (j=0; j < par->res_count; j++)
trunk/src/devices/sound/discrete.cpp
r250194r250195
127127
128128protected:
129129   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{
132132      source_list.clear();
133133      step_list.clear();
134134      m_buffers.clear();
r250194r250195
324324                     buf.source = dest_node->m_input[inputnum];
325325                     buf.node_num = inputnode_num;
326326                     //buf.node = device->discrete_find_node(inputnode);
327                     i = m_buffers.count();
327                     m_buffers.count();
328328                     pbuf = m_buffers.add(buf);
329329                  }
330330                  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);
r250194r250195
354354 *
355355 *************************************/
356356
357discrete_base_node::discrete_base_node() :
357discrete_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),
358363   m_step_intf(NULL),
359   m_input_intf(NULL)
364   m_input_intf(NULL),
365   m_output_intf(NULL)
360366{
361367   m_output[0] = 0.0;
362368}
r250194r250195
845851
846852discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
847853   : discrete_device(mconfig, DISCRETE, "DISCRETE", tag, owner, clock),
848      device_sound_interface(mconfig, *this)
854      device_sound_interface(mconfig, *this),
855      m_stream(NULL)
849856{
850857}
851858
r250194r250195
10961103{
10971104   const discrete_base_node *node = discrete_find_node(offset);
10981105
1099   UINT8 data = 0;
1106   UINT8 data;
11001107
11011108   /* Read the node input value if allowed */
11021109   if (node)
trunk/src/devices/sound/votrax.cpp
r250194r250195
9696
9797votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
9898   : 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)
103108{
104109}
105110
trunk/src/devices/sound/ym2151.cpp
r250194r250195
601601
602602   for (i=0; i<768; i++)
603603   {
604#if 0
604605      /* 3.4375 Hz is note A; C# is 4 semitones higher */
605606      Hz = 1000;
606#if 0
607/* Hz is close, but not perfect */
607      /* Hz is close, but not perfect */
608608      //Hz = scaler * 3.4375 * pow (2, (i + 4 * 64 ) / 768.0 );
609609      /* calculate phase increment */
610610      phaseinc = (Hz*SIN_LEN) / (double)chip->sampfreq;
r250194r250195
687687
688688   /* calculate timers' deltas */
689689   /* User's Manual pages 15,16  */
690   mult = (1<<TIMER_SH);
690   #ifndef USE_MAME_TIMERS
691      mult = (1<<TIMER_SH);
692   #endif
691693   for (i=0; i<1024; i++)
692694   {
693695      /* ASG 980324: changed to compute both tim_A_tab and timer_A_time */


Previous 199869 Revisions Next


© 1997-2024 The MAME Team