mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
6840ptm: Counter/timers are numbered from 1 to 3, not 0 to 2 as with 8253 (nw)
- Rename OUT0, OUT1 and OUT2 callback configuration macros to match pin names (O1, O2 and O3) - Update all verbose logging messages to be one-based - Remove unnecessary mentions of device type in logging messages
This commit is contained in:
parent
1b14b550b5
commit
5f9a181487
@ -294,7 +294,7 @@ uint16_t ptm6840_device::compute_counter( int counter ) const
|
||||
// If there's no timer, return the count
|
||||
if (!m_enabled[counter])
|
||||
{
|
||||
LOG("MC6840: read counter(%d): %d\n", counter, m_counter[counter]);
|
||||
LOG("Timer #%d read counter: %d\n", counter + 1, m_counter[counter]);
|
||||
return m_counter[counter];
|
||||
}
|
||||
|
||||
@ -302,12 +302,12 @@ uint16_t ptm6840_device::compute_counter( int counter ) const
|
||||
if (m_control_reg[counter] & INTERNAL_CLK_EN)
|
||||
{
|
||||
clk = static_cast<double>(clock());
|
||||
LOG("MC6840: %d internal clock freq %f \n", counter, clk);
|
||||
LOG("Timer #%d internal clock freq %f \n", counter + 1, clk);
|
||||
}
|
||||
else
|
||||
{
|
||||
clk = m_external_clock[counter];
|
||||
LOG("MC6840: %d external clock freq %f \n", counter, clk);
|
||||
LOG("Timer #%d external clock freq %f \n", counter + 1, clk);
|
||||
}
|
||||
// See how many are left
|
||||
int remaining = (m_timer[counter]->remaining() * clk).as_double();
|
||||
@ -320,7 +320,7 @@ uint16_t ptm6840_device::compute_counter( int counter ) const
|
||||
int lsb = remaining % divisor;
|
||||
remaining = (msb << 8) | lsb;
|
||||
}
|
||||
LOG("MC6840: read counter(%d): %d\n", counter, remaining);
|
||||
LOG("Timer #%d read counter: %d\n", counter + 1, remaining);
|
||||
return remaining;
|
||||
}
|
||||
|
||||
@ -345,12 +345,12 @@ void ptm6840_device::reload_count(int idx)
|
||||
if (m_control_reg[idx] & INTERNAL_CLK_EN)
|
||||
{
|
||||
clk = static_cast<double> (clock());
|
||||
LOG("MC6840: %d internal clock freq %f \n", idx, clk);
|
||||
LOG("Timer #%d internal clock freq %f \n", idx + 1, clk);
|
||||
}
|
||||
else
|
||||
{
|
||||
clk = m_external_clock[idx];
|
||||
LOG("MC6840: %d external clock freq %f \n", idx, clk);
|
||||
LOG("Timer #%d external clock freq %f \n", idx + 1, clk);
|
||||
}
|
||||
|
||||
// Determine the number of clock periods before we expire
|
||||
@ -373,7 +373,7 @@ void ptm6840_device::reload_count(int idx)
|
||||
}
|
||||
|
||||
// Set the timer
|
||||
LOG("MC6840: reload_count(%d): clock = %f count = %d\n", idx, clk, count);
|
||||
LOG("Timer #%d reload_count: clock = %f count = %d\n", idx + 1, clk, count);
|
||||
|
||||
if (clk == 0.0)
|
||||
{
|
||||
@ -389,7 +389,7 @@ void ptm6840_device::reload_count(int idx)
|
||||
duration *= m_t3_divisor;
|
||||
}
|
||||
|
||||
LOG("MC6840: reload_count(%d): output = %f\n", idx, duration.as_double());
|
||||
LOG("Timer #%d reload_count: output = %f\n", idx + 1, duration.as_double());
|
||||
|
||||
m_enabled[idx] = 1;
|
||||
m_timer[idx]->adjust(duration);
|
||||
@ -417,7 +417,7 @@ READ8_MEMBER( ptm6840_device::read )
|
||||
|
||||
case PTM_6840_STATUS:
|
||||
{
|
||||
LOG("%s: MC6840: Status read = %04X\n", machine().describe_context(), m_status_reg);
|
||||
LOG("%s: Status read = %04X\n", machine().describe_context(), m_status_reg);
|
||||
m_status_read_since_int |= m_status_reg & 0x07;
|
||||
val = m_status_reg;
|
||||
break;
|
||||
@ -439,7 +439,7 @@ READ8_MEMBER( ptm6840_device::read )
|
||||
|
||||
m_lsb_buffer = result & 0xff;
|
||||
|
||||
LOG("%s: MC6840: Counter %d read = %04X\n", machine().describe_context(), idx, result >> 8);
|
||||
LOG("%s: Counter %d read = %04X\n", machine().describe_context(), idx + 1, result >> 8);
|
||||
val = result >> 8;
|
||||
break;
|
||||
}
|
||||
@ -480,7 +480,7 @@ WRITE8_MEMBER( ptm6840_device::write )
|
||||
m_mode[idx] = (data >> 3) & 0x07;
|
||||
m_control_reg[idx] = data;
|
||||
|
||||
LOG("MC6840: Control register %d selected\n", idx);
|
||||
LOG("Control register #%d selected\n", idx + 1);
|
||||
LOG("operation mode = %s\n", opmode[m_mode[idx]]);
|
||||
LOG("value = %04X\n", m_control_reg[idx]);
|
||||
LOG("t3divisor = %d\n", m_t3_divisor);
|
||||
@ -500,7 +500,7 @@ WRITE8_MEMBER( ptm6840_device::write )
|
||||
// Holding reset down
|
||||
if (data & RESET_TIMERS)
|
||||
{
|
||||
LOG("MC6840: Timer reset\n");
|
||||
LOG("Timer reset\n");
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
m_timer[i]->enable(false);
|
||||
@ -532,7 +532,7 @@ WRITE8_MEMBER( ptm6840_device::write )
|
||||
case PTM_6840_MSBBUF2:
|
||||
case PTM_6840_MSBBUF3:
|
||||
{
|
||||
LOG("MC6840 msbbuf%d = %02X\n", offset / 2, data);
|
||||
LOG("msbbuf%d = %02X\n", offset / 2, data);
|
||||
m_msb_buffer = data;
|
||||
break;
|
||||
}
|
||||
@ -554,7 +554,7 @@ WRITE8_MEMBER( ptm6840_device::write )
|
||||
reload_count(idx);
|
||||
}
|
||||
|
||||
LOG("%s:MC6840: Counter %d latch = %04X\n", machine().describe_context(), idx, m_latch[idx]);
|
||||
LOG("%s: Counter #%d latch = %04X\n", machine().describe_context(), idx + 1, m_latch[idx]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -567,7 +567,7 @@ WRITE8_MEMBER( ptm6840_device::write )
|
||||
|
||||
void ptm6840_device::timeout(int idx)
|
||||
{
|
||||
LOG("**ptm6840 t%d timeout**\n", idx);
|
||||
LOG("**ptm6840 t%d timeout**\n", idx + 1);
|
||||
|
||||
// Set the interrupt flag
|
||||
m_status_reg |= (1 << idx);
|
||||
@ -581,7 +581,7 @@ void ptm6840_device::timeout(int idx)
|
||||
case 0:
|
||||
case 2:
|
||||
m_output[idx] = m_output[idx] ^ 1;
|
||||
LOG("**ptm6840 t%d output %d **\n", idx, m_output[idx]);
|
||||
LOG("**ptm6840 t%d output %d **\n", idx + 1, m_output[idx]);
|
||||
m_out_cb[idx](m_output[idx]);
|
||||
break;
|
||||
|
||||
@ -590,7 +590,7 @@ void ptm6840_device::timeout(int idx)
|
||||
if (!m_fired[idx])
|
||||
{
|
||||
m_output[idx] = 1;
|
||||
LOG("**ptm6840 t%d output %d **\n", idx, m_output[idx]);
|
||||
LOG("**ptm6840 t%d output %d **\n", idx + 1, m_output[idx]);
|
||||
|
||||
m_out_cb[idx](m_output[idx]);
|
||||
|
||||
|
@ -22,13 +22,13 @@
|
||||
#define MCFG_PTM6840_EXTERNAL_CLOCKS(_clk0, _clk1, _clk2) \
|
||||
ptm6840_device::set_external_clocks(*device, _clk0, _clk1, _clk2);
|
||||
|
||||
#define MCFG_PTM6840_OUT0_CB(_devcb) \
|
||||
#define MCFG_PTM6840_O1_CB(_devcb) \
|
||||
devcb = &ptm6840_device::set_out_callback(*device, 0, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_PTM6840_OUT1_CB(_devcb) \
|
||||
#define MCFG_PTM6840_O2_CB(_devcb) \
|
||||
devcb = &ptm6840_device::set_out_callback(*device, 1, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_PTM6840_OUT2_CB(_devcb) \
|
||||
#define MCFG_PTM6840_O3_CB(_devcb) \
|
||||
devcb = &ptm6840_device::set_out_callback(*device, 2, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_PTM6840_IRQ_CB(_devcb) \
|
||||
|
@ -455,7 +455,7 @@ MACHINE_CONFIG_START(arachnid_state::arachnid)
|
||||
|
||||
MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, XTAL(8'000'000) / 4)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(arachnid_state, ptm_o1_callback))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(arachnid_state, ptm_o1_callback))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -78,9 +78,9 @@ public:
|
||||
DECLARE_READ8_MEMBER(via_audio_pa_r);
|
||||
DECLARE_WRITE8_MEMBER(via_audio_pa_w);
|
||||
DECLARE_WRITE8_MEMBER(via_audio_pb_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ptm_out0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ptm_out1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ptm_out2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ptm_o1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ptm_o2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ptm_o3_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(dmod_clr_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(dmod_data_w);
|
||||
|
||||
@ -332,12 +332,12 @@ WRITE8_MEMBER( beezer_state::via_audio_pb_w )
|
||||
m_ch_sign[0] = BIT(data, 7);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( beezer_state::ptm_out0_w )
|
||||
WRITE_LINE_MEMBER( beezer_state::ptm_o1_w )
|
||||
{
|
||||
m_ch_sign[1] = state;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( beezer_state::ptm_out1_w )
|
||||
WRITE_LINE_MEMBER( beezer_state::ptm_o2_w )
|
||||
{
|
||||
// on rising edge, enable noise input to ptm c3
|
||||
if (m_ch_sign[2] == 0 && state == 1)
|
||||
@ -346,7 +346,7 @@ WRITE_LINE_MEMBER( beezer_state::ptm_out1_w )
|
||||
m_ch_sign[2] = state;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( beezer_state::ptm_out2_w )
|
||||
WRITE_LINE_MEMBER( beezer_state::ptm_o3_w )
|
||||
{
|
||||
m_ch_sign[3] = state;
|
||||
}
|
||||
@ -517,9 +517,9 @@ MACHINE_CONFIG_START(beezer_state::beezer)
|
||||
MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("audio_irqs", input_merger_device, in_w<0>))
|
||||
|
||||
MCFG_DEVICE_ADD("ptm", PTM6840, XTAL(4'000'000) / 4)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(beezer_state, ptm_out0_w))
|
||||
MCFG_PTM6840_OUT1_CB(WRITELINE(beezer_state, ptm_out1_w))
|
||||
MCFG_PTM6840_OUT2_CB(WRITELINE(beezer_state, ptm_out2_w))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(beezer_state, ptm_o1_w))
|
||||
MCFG_PTM6840_O2_CB(WRITELINE(beezer_state, ptm_o2_w))
|
||||
MCFG_PTM6840_O3_CB(WRITELINE(beezer_state, ptm_o3_w))
|
||||
MCFG_PTM6840_IRQ_CB(DEVWRITELINE("audio_irqs", input_merger_device, in_w<1>))
|
||||
// schematics show an input labeled VCO to channel 2, but the source is unknown
|
||||
|
||||
|
@ -268,7 +268,7 @@ private:
|
||||
double m_freq;
|
||||
bool m_active;
|
||||
|
||||
int m_ptm_out0;
|
||||
int m_ptm_o1;
|
||||
|
||||
int m_pia_0_irqa;
|
||||
int m_pia_0_irqb;
|
||||
@ -293,7 +293,7 @@ private:
|
||||
DECLARE_WRITE_LINE_MEMBER( pia_1_irqb );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( ptm_irq );
|
||||
DECLARE_WRITE_LINE_MEMBER( ptm_out0 );
|
||||
DECLARE_WRITE_LINE_MEMBER( ptm_o1 );
|
||||
};
|
||||
|
||||
DEFINE_DEVICE_TYPE(CMI01A_CHANNEL_CARD, cmi01a_device, "cmi_01a", "Fairlight CMI-01A Channel Card")
|
||||
@ -330,7 +330,7 @@ MACHINE_CONFIG_START(cmi01a_device::device_add_mconfig)
|
||||
|
||||
MCFG_DEVICE_ADD("cmi01a_ptm", PTM6840, 2000000) // ptm_cmi01a_config
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(250000, 500000, 500000)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(cmi01a_device, ptm_out0))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(cmi01a_device, ptm_o1))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(cmi01a_device, ptm_irq))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -393,7 +393,7 @@ void cmi01a_device::device_reset()
|
||||
m_freq = 0.0;
|
||||
m_active = false;
|
||||
|
||||
m_ptm_out0 = 0;
|
||||
m_ptm_o1 = 0;
|
||||
}
|
||||
|
||||
class cmi_state : public driver_device
|
||||
@ -528,7 +528,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( cmi02_w );
|
||||
DECLARE_WRITE8_MEMBER( master_tune_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( cmi02_ptm_irq );
|
||||
DECLARE_WRITE_LINE_MEMBER( cmi02_ptm_o1 );
|
||||
DECLARE_WRITE_LINE_MEMBER( cmi02_ptm_o2 );
|
||||
|
||||
// Alphanumeric keyboard
|
||||
DECLARE_READ8_MEMBER( ank_col_r );
|
||||
@ -1819,7 +1819,7 @@ void cmi01a_device::zx_timer_cb()
|
||||
if (m_zx_flag == 0)
|
||||
{
|
||||
/* Low to high transition - clock flip flop */
|
||||
int op = m_ptm_out0;
|
||||
int op = m_ptm_o1;
|
||||
|
||||
/* Set /ZCINT */
|
||||
if (op != m_zx_ff)
|
||||
@ -1929,9 +1929,9 @@ void cmi01a_device::update_wave_addr(int inc)
|
||||
/* Zero crossing interrupt is a pulse */
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( cmi01a_device::ptm_out0 )
|
||||
WRITE_LINE_MEMBER( cmi01a_device::ptm_o1 )
|
||||
{
|
||||
m_ptm_out0 = state;
|
||||
m_ptm_o1 = state;
|
||||
}
|
||||
|
||||
READ_LINE_MEMBER( cmi01a_device::eosi_r )
|
||||
@ -1986,7 +1986,7 @@ WRITE8_MEMBER( cmi01a_device::write )
|
||||
{
|
||||
/* PTM addressing is a little funky */
|
||||
int a0 = offset & 1;
|
||||
int a1 = (m_ptm_out0 && BIT(offset, 3)) || (!BIT(offset, 3) && BIT(offset, 2));
|
||||
int a1 = (m_ptm_o1 && BIT(offset, 3)) || (!BIT(offset, 3) && BIT(offset, 2));
|
||||
int a2 = BIT(offset, 1);
|
||||
|
||||
//printf("CH%d PTM W: [%x] = %02x\n", m_channel, (a2 << 2) | (a1 << 1) | a0, data);
|
||||
@ -2042,7 +2042,7 @@ READ8_MEMBER( cmi01a_device::read )
|
||||
case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
|
||||
{
|
||||
int a0 = offset & 1;
|
||||
int a1 = (m_ptm_out0 && BIT(offset, 3)) || (!BIT(offset, 3) && BIT(offset, 2));
|
||||
int a1 = (m_ptm_o1 && BIT(offset, 3)) || (!BIT(offset, 3) && BIT(offset, 2));
|
||||
int a2 = BIT(offset, 1);
|
||||
|
||||
data = m_ptm->read(space, (a2 << 2) | (a1 << 1) | a0);
|
||||
@ -2068,7 +2068,7 @@ WRITE_LINE_MEMBER( cmi_state::cmi02_ptm_irq )
|
||||
set_interrupt(CPU_1, IRQ_TIMINT_LEVEL, m_cmi02_ptm_irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( cmi_state::cmi02_ptm_o1 )
|
||||
WRITE_LINE_MEMBER( cmi_state::cmi02_ptm_o2 )
|
||||
{
|
||||
m_cmi02_ptm->set_c1(state);
|
||||
m_cmi02_ptm->set_c3(state);
|
||||
@ -2824,7 +2824,7 @@ MACHINE_CONFIG_START(cmi_state::cmi2x)
|
||||
MCFG_DEVICE_ADD("cmi02_pia_2", PIA6821, 0) // pia_cmi02_2_config
|
||||
|
||||
MCFG_DEVICE_ADD("cmi02_ptm", PTM6840, 2000000) // ptm_cmi02_config TODO
|
||||
MCFG_PTM6840_OUT1_CB(WRITELINE(cmi_state, cmi02_ptm_o1))
|
||||
MCFG_PTM6840_O2_CB(WRITELINE(cmi_state, cmi02_ptm_o2))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(cmi_state, cmi02_ptm_irq))
|
||||
|
||||
MCFG_DEVICE_ADD("mkbd_acia_clock", CLOCK, XTAL(1'843'200) / 12)
|
||||
|
@ -216,7 +216,7 @@ MACHINE_CONFIG_START(duet16_state::duet16)
|
||||
|
||||
MCFG_DEVICE_ADD("itm", PTM6840, 0)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0.0, 0.0, (8_MHz_XTAL / 8).dvalue()) // C3 = 1MHz
|
||||
MCFG_PTM6840_OUT2_CB(DEVWRITELINE("itm", ptm6840_device, set_c1)) // C1 = C2 = O3
|
||||
MCFG_PTM6840_O3_CB(DEVWRITELINE("itm", ptm6840_device, set_c1)) // C1 = C2 = O3
|
||||
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("itm", ptm6840_device, set_c2))
|
||||
MCFG_PTM6840_IRQ_CB(DEVWRITELINE("pic", pic8259_device, ir0_w)) // INT6
|
||||
|
||||
|
@ -256,7 +256,7 @@ MACHINE_CONFIG_START(ginganin_state::ginganin)
|
||||
|
||||
MCFG_DEVICE_ADD("6840ptm", PTM6840, SOUND_CLOCK/2)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(ginganin_state, ptm_irq))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(ginganin_state, ptm_irq))
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -673,7 +673,7 @@ MACHINE_CONFIG_START(jpmsys5_state::jpmsys5v)
|
||||
/* 6840 PTM */
|
||||
MCFG_DEVICE_ADD("6840ptm", PTM6840, 1000000)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(jpmsys5_state, u26_o1_callback))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(jpmsys5_state, u26_o1_callback))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(jpmsys5_state, ptm_irq))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -877,7 +877,7 @@ MACHINE_CONFIG_START(jpmsys5_state::jpmsys5_ym)
|
||||
/* 6840 PTM */
|
||||
MCFG_DEVICE_ADD("6840ptm", PTM6840, 1000000)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(jpmsys5_state, u26_o1_callback))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(jpmsys5_state, u26_o1_callback))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(jpmsys5_state, ptm_irq))
|
||||
MCFG_DEFAULT_LAYOUT(layout_jpmsys5)
|
||||
|
||||
@ -929,7 +929,7 @@ MACHINE_CONFIG_START(jpmsys5_state::jpmsys5)
|
||||
/* 6840 PTM */
|
||||
MCFG_DEVICE_ADD("6840ptm", PTM6840, 1000000)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(jpmsys5_state, u26_o1_callback))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(jpmsys5_state, u26_o1_callback))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(jpmsys5_state, ptm_irq))
|
||||
MCFG_DEFAULT_LAYOUT(layout_jpmsys5)
|
||||
|
||||
|
@ -857,9 +857,9 @@ MACHINE_CONFIG_START(mpu3_state::mpu3base)
|
||||
/* 6840 PTM */
|
||||
MCFG_DEVICE_ADD("ptm_ic2", PTM6840, MPU3_MASTER_CLOCK)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(mpu3_state, ic2_o1_callback))
|
||||
MCFG_PTM6840_OUT1_CB(WRITELINE(mpu3_state, ic2_o2_callback))
|
||||
MCFG_PTM6840_OUT2_CB(WRITELINE(mpu3_state, ic2_o3_callback))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(mpu3_state, ic2_o1_callback))
|
||||
MCFG_PTM6840_O2_CB(WRITELINE(mpu3_state, ic2_o2_callback))
|
||||
MCFG_PTM6840_O3_CB(WRITELINE(mpu3_state, ic2_o3_callback))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(mpu3_state, cpu0_irq))
|
||||
|
||||
MCFG_DEVICE_ADD("pia_ic3", PIA6821, 0)
|
||||
|
@ -1310,9 +1310,9 @@ MACHINE_CONFIG_START(mpu4vid_state::mpu4_vid)
|
||||
|
||||
MCFG_DEVICE_ADD("6840ptm_68k", PTM6840, VIDEO_MASTER_CLOCK / 10) /* 68k E clock */
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(mpu4vid_state, vid_o1_callback))
|
||||
MCFG_PTM6840_OUT1_CB(WRITELINE(mpu4vid_state, vid_o2_callback))
|
||||
MCFG_PTM6840_OUT2_CB(WRITELINE(mpu4vid_state, vid_o3_callback))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(mpu4vid_state, vid_o1_callback))
|
||||
MCFG_PTM6840_O2_CB(WRITELINE(mpu4vid_state, vid_o2_callback))
|
||||
MCFG_PTM6840_O3_CB(WRITELINE(mpu4vid_state, vid_o3_callback))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(mpu4vid_state, cpu1_ptm_irq))
|
||||
/* Present on all video cards */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
@ -187,8 +187,8 @@ MACHINE_CONFIG_START(poly_state::poly)
|
||||
|
||||
MCFG_DEVICE_ADD("ptm", PTM6840, XTAL(12'057'600) / 3)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT1_CB(WRITELINE(poly_state, ptm_o2_callback))
|
||||
MCFG_PTM6840_OUT2_CB(WRITELINE(poly_state, ptm_o3_callback))
|
||||
MCFG_PTM6840_O2_CB(WRITELINE(poly_state, ptm_o2_callback))
|
||||
MCFG_PTM6840_O3_CB(WRITELINE(poly_state, ptm_o3_callback))
|
||||
MCFG_PTM6840_IRQ_CB(INPUTLINE("maincpu", M6809_IRQ_LINE))
|
||||
|
||||
MCFG_DEVICE_ADD("acia", ACIA6850, 0)
|
||||
|
@ -177,8 +177,8 @@ MACHINE_CONFIG_START(swtpc09_state::swtpc09_base)
|
||||
|
||||
MCFG_DEVICE_ADD("ptm", PTM6840, 2000000)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(50, 0, 50)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(swtpc09_state, ptm_o1_callback))
|
||||
MCFG_PTM6840_OUT2_CB(WRITELINE(swtpc09_state, ptm_o3_callback))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(swtpc09_state, ptm_o1_callback))
|
||||
MCFG_PTM6840_O3_CB(WRITELINE(swtpc09_state, ptm_o3_callback))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(swtpc09_state, ptm_irq))
|
||||
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal")
|
||||
|
@ -315,7 +315,7 @@ MACHINE_CONFIG_START(tavernie_state::cpu09)
|
||||
MCFG_DEVICE_ADD("ptm", PTM6840, XTAL(4'000'000) / 4)
|
||||
// all i/o lines connect to the 40-pin expansion connector
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT1_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
|
||||
MCFG_PTM6840_O2_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
|
||||
MCFG_PTM6840_IRQ_CB(INPUTLINE("maincpu", M6809_IRQ_LINE))
|
||||
|
||||
MCFG_DEVICE_ADD("acia", ACIA6850, 0)
|
||||
|
@ -322,8 +322,8 @@ MACHINE_CONFIG_START(v6809_state::v6809)
|
||||
|
||||
MCFG_DEVICE_ADD("ptm", PTM6840, XTAL(16'000'000) / 4)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(4000000/14, 4000000/14, 4000000/14/8)
|
||||
MCFG_PTM6840_OUT1_CB(WRITELINE(v6809_state, speaker_w))
|
||||
MCFG_PTM6840_OUT2_CB(WRITELINE(v6809_state, speaker_en_w))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(v6809_state, speaker_w))
|
||||
MCFG_PTM6840_O2_CB(WRITELINE(v6809_state, speaker_en_w))
|
||||
MCFG_PTM6840_IRQ_CB(INPUTLINE("maincpu", M6809_IRQ_LINE))
|
||||
|
||||
MCFG_DEVICE_ADD("acia0", ACIA6850, 0)
|
||||
|
@ -3004,9 +3004,9 @@ MACHINE_CONFIG_START(mpu4_state::mpu4_common)
|
||||
/* 6840 PTM */
|
||||
MCFG_DEVICE_ADD("ptm_ic2", PTM6840, MPU4_MASTER_CLOCK / 4)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(WRITELINE(mpu4_state, ic2_o1_callback))
|
||||
MCFG_PTM6840_OUT1_CB(WRITELINE(mpu4_state, ic2_o2_callback))
|
||||
MCFG_PTM6840_OUT2_CB(WRITELINE(mpu4_state, ic2_o3_callback))
|
||||
MCFG_PTM6840_O1_CB(WRITELINE(mpu4_state, ic2_o1_callback))
|
||||
MCFG_PTM6840_O2_CB(WRITELINE(mpu4_state, ic2_o2_callback))
|
||||
MCFG_PTM6840_O3_CB(WRITELINE(mpu4_state, ic2_o3_callback))
|
||||
MCFG_PTM6840_IRQ_CB(WRITELINE(mpu4_state, cpu0_irq))
|
||||
|
||||
MCFG_DEVICE_ADD("pia_ic3", PIA6821, 0)
|
||||
@ -3069,9 +3069,9 @@ MACHINE_CONFIG_END
|
||||
MACHINE_CONFIG_START(mpu4_state::mpu4_common2)
|
||||
MCFG_DEVICE_ADD("ptm_ic3ss", PTM6840, MPU4_MASTER_CLOCK / 4)
|
||||
MCFG_PTM6840_EXTERNAL_CLOCKS(0, 0, 0)
|
||||
MCFG_PTM6840_OUT0_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_c2))
|
||||
MCFG_PTM6840_OUT1_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_c1))
|
||||
//MCFG_PTM6840_OUT2_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_g1))
|
||||
MCFG_PTM6840_O1_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_c2))
|
||||
MCFG_PTM6840_O2_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_c1))
|
||||
//MCFG_PTM6840_O3_CB(DEVWRITELINE("ptm_ic3ss", ptm6840_device, set_g1))
|
||||
//MCFG_PTM6840_IRQ_CB(WRITELINE(mpu4_state, cpu1_ptm_irq))
|
||||
|
||||
MCFG_DEVICE_ADD("pia_ic4ss", PIA6821, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user