mirror of
https://github.com/holub/mame
synced 2025-04-16 21:44:32 +03:00
chess*: use clock device for irq signal
This commit is contained in:
parent
da6f1fd6fc
commit
668f3fd816
@ -22,9 +22,9 @@ TODO:
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
|
@ -21,11 +21,13 @@ Hardware notes:
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
@ -40,7 +42,6 @@ public:
|
||||
ch2001_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_display(*this, "display"),
|
||||
m_board(*this, "board"),
|
||||
m_dac(*this, "dac"),
|
||||
@ -56,16 +57,11 @@ protected:
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<dac_bit_interface> m_dac;
|
||||
required_ioport_array<2> m_inputs;
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
@ -184,10 +180,9 @@ void ch2001_state::ch2001(machine_config &config)
|
||||
Z80(config, m_maincpu, 8_MHz_XTAL/2);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ch2001_state::main_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(568); // 555 timer (20nF, 100K+33K, 1K2), measured 568Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(ch2001_state::irq_on<INPUT_LINE_IRQ0>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(16600)); // active for 16.6us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(ch2001_state::irq_off<INPUT_LINE_IRQ0>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 568)); // 555 timer (20nF, 100K+33K, 1K2), measured 568Hz
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(16600)); // active for 16.6us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
|
@ -21,8 +21,8 @@ magnetic chess board sensors. See fidel_sc12.cpp for a more technical descriptio
|
||||
#include "bus/generic/carts.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
@ -42,7 +42,6 @@ class as12_state : public fidel_clockdiv_state
|
||||
public:
|
||||
as12_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
fidel_clockdiv_state(mconfig, type, tag),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
m_dac(*this, "dac"),
|
||||
@ -62,7 +61,6 @@ protected:
|
||||
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<dac_bit_interface> m_dac;
|
||||
@ -71,10 +69,6 @@ private:
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
void control_w(u8 data);
|
||||
@ -227,10 +221,9 @@ void as12_state::feleg(machine_config &config)
|
||||
R65C02(config, m_maincpu, 4_MHz_XTAL); // R65C02P4
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &as12_state::main_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(600); // from 556 timer (22nF, 110K, 1K), ideal frequency is 600Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(as12_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_usec(17)); // active for 17us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(as12_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 556 timer (22nF, 110K, 1K), ideal frequency is 600Hz
|
||||
irq_clock.set_pulse_width(attotime::from_usec(17)); // active for 17us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
|
@ -27,11 +27,13 @@ the S14001A in the 70s), this time a 65C02 software solution.
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
@ -46,7 +48,6 @@ public:
|
||||
chesster_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_rombank(*this, "rombank"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
@ -65,7 +66,6 @@ protected:
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_memory_bank m_rombank;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
@ -74,10 +74,6 @@ private:
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void control_w(offs_t offset, u8 data);
|
||||
u8 input_r(offs_t offset);
|
||||
@ -190,10 +186,9 @@ void chesster_state::chesster(machine_config &config)
|
||||
R65C02(config, m_maincpu, 5_MHz_XTAL); // RP65C02G
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &chesster_state::main_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(9500); // from 555 timer, measured (9.6kHz on a Chesster, 9.3kHz on a Kishon)
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(chesster_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(2600)); // active for 2.6us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(chesster_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 9500)); // from 555 timer, measured (9.6kHz on a Chesster, 9.3kHz on a Kishon)
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(2600)); // active for 2.6us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
|
@ -199,13 +199,15 @@ clicking on the game board.
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/s14001a.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
@ -224,7 +226,6 @@ public:
|
||||
csc_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_pia(*this, "pia%u", 0),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
@ -248,7 +249,6 @@ protected:
|
||||
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
optional_device_array<pia6821_device, 2> m_pia;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
@ -263,10 +263,6 @@ protected:
|
||||
void su9_map(address_map &map);
|
||||
void rsc_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
u16 read_inputs();
|
||||
void update_display();
|
||||
@ -621,10 +617,9 @@ void csc_state::csc(machine_config &config)
|
||||
M6502(config, m_maincpu, 3.9_MHz_XTAL/2); // from 3.9MHz resonator
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &csc_state::csc_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(38.4_kHz_XTAL/64); // through 4060 IC, 600Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(csc_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_hz(38.4_kHz_XTAL*2)); // edge!
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(csc_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 38.4_kHz_XTAL/64)); // through 4060 IC, 600Hz
|
||||
irq_clock.set_pulse_width(attotime::from_hz(38.4_kHz_XTAL*2)); // edge!
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
PIA6821(config, m_pia[0], 0);
|
||||
m_pia[0]->readpa_handler().set(FUNC(csc_state::pia0_pa_r));
|
||||
@ -683,10 +678,9 @@ void csc_state::rsc(machine_config &config)
|
||||
M6502(config, m_maincpu, 1800000); // measured approx 1.81MHz
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &csc_state::rsc_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(546); // from 555 timer, measured
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(csc_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_usec(38)); // active for 38us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(csc_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 546)); // from 555 timer, measured
|
||||
irq_clock.set_pulse_width(attotime::from_usec(38)); // active for 38us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
PIA6821(config, m_pia[0], 0); // MOS 6520
|
||||
m_pia[0]->readpa_handler().set(FUNC(csc_state::pia0_pa_r));
|
||||
|
@ -23,11 +23,13 @@ TODO:
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
@ -42,7 +44,6 @@ public:
|
||||
dsc_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
m_dac(*this, "dac"),
|
||||
@ -58,7 +59,6 @@ protected:
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<dac_bit_interface> m_dac;
|
||||
@ -67,10 +67,6 @@ private:
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
void control_w(u8 data);
|
||||
@ -232,10 +228,9 @@ void dsc_state::dsc(machine_config &config)
|
||||
Z80(config, m_maincpu, 3.9_MHz_XTAL); // 3.9MHz resonator
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &dsc_state::main_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(523); // from 555 timer (22nF, 120K, 2.7K)
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(dsc_state::irq_on<INPUT_LINE_IRQ0>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_usec(41)); // active for 41us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(dsc_state::irq_off<INPUT_LINE_IRQ0>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 523)); // from 555 timer (22nF, 120K, 2.7K)
|
||||
irq_clock.set_pulse_width(attotime::from_usec(41)); // active for 41us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(FUNC(dsc_state::init_board));
|
||||
|
@ -36,13 +36,15 @@ Designer Mach IV Master 2325 (model 6129) overview:
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "cpu/m6502/m65sc02.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
@ -61,7 +63,6 @@ public:
|
||||
desdis_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_rombank(*this, "rombank"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
@ -80,7 +81,6 @@ protected:
|
||||
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
optional_memory_bank m_rombank;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
@ -90,10 +90,6 @@ protected:
|
||||
// address maps
|
||||
void fdes2100d_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_lcd();
|
||||
virtual void control_w(offs_t offset, u8 data);
|
||||
@ -293,10 +289,9 @@ void desdis_state::fdes2100d(machine_config &config)
|
||||
M65C02(config, m_maincpu, 6_MHz_XTAL); // W65C02P-6
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &desdis_state::fdes2100d_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(600); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(desdis_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(15250)); // active for 15.25us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(desdis_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(15250)); // active for 15.25us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
@ -329,10 +324,9 @@ void desmas_state::fdes2265(machine_config &config)
|
||||
M68000(config.replace(), m_maincpu, 16_MHz_XTAL); // MC68HC000P12F
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &desmas_state::fdes2265_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(600); // from 555 timer, ideal frequency is 600Hz (measured 597Hz)
|
||||
TIMER(config.replace(), m_irq_on).configure_periodic(FUNC(desmas_state::irq_on<M68K_IRQ_4>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_usec(6)); // active for 6us
|
||||
TIMER(config.replace(), "irq_off").configure_periodic(FUNC(desmas_state::irq_off<M68K_IRQ_4>), irq_period);
|
||||
auto &irq_clock(CLOCK(config.replace(), "irq_clock", 600)); // from 555 timer, ideal frequency is 600Hz (measured 597Hz)
|
||||
irq_clock.set_pulse_width(attotime::from_usec(6)); // active for 6us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M68K_IRQ_4);
|
||||
|
||||
config.set_default_layout(layout_fidel_desdis_68kr);
|
||||
}
|
||||
|
@ -162,13 +162,13 @@ B0000x-xxxxxx: see V7, -800000
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
@ -191,7 +191,6 @@ public:
|
||||
eag_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_ram(*this, "ram"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
@ -217,7 +216,6 @@ protected:
|
||||
|
||||
// devices/pointers
|
||||
required_device<m68000_base_device> m_maincpu;
|
||||
optional_device<timer_device> m_irq_on;
|
||||
optional_device<ram_device> m_ram;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
@ -229,10 +227,6 @@ protected:
|
||||
void eagv7_map(address_map &map);
|
||||
void eagv10_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
virtual void mux_w(offs_t offset, u8 data);
|
||||
@ -558,10 +552,9 @@ void excel68k_state::fex68k(machine_config &config)
|
||||
M68000(config, m_maincpu, 12_MHz_XTAL); // HD68HC000P12
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &excel68k_state::fex68k_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(600); // 556 timer (22nF, 91K + 20K POT @ 14.8K, 0.1K), ideal is 600Hz (measured 580Hz, 604Hz, 632Hz)
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(excel68k_state::irq_on<M68K_IRQ_2>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(1525)); // active for 1.525us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(excel68k_state::irq_off<M68K_IRQ_2>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 600)); // 556 timer (22nF, 91K + 20K POT @ 14.8K, 0.1K), ideal is 600Hz (measured 580Hz, 604Hz, 632Hz)
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(1525)); // active for 1.525us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M68K_IRQ_2);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
@ -602,7 +595,7 @@ void excel68k_state::fex68km4(machine_config &config)
|
||||
M68020(config.replace(), m_maincpu, 20_MHz_XTAL); // XC68020RC16 or MC68020RC20E
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &excel68k_state::fex68km4_map);
|
||||
|
||||
m_irq_on->set_start_delay(attotime::from_hz(600) - attotime::from_usec(10)); // irq active for 10us
|
||||
subdevice<clock_device>("irq_clock")->set_pulse_width(attotime::from_usec(10)); // irq active for 10us
|
||||
}
|
||||
|
||||
void eag_state::eag_base(machine_config &config)
|
||||
@ -612,10 +605,9 @@ void eag_state::eag_base(machine_config &config)
|
||||
m_maincpu->disable_interrupt_mixer();
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &eag_state::eag_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(4.9152_MHz_XTAL/0x2000); // 4060 Q13, 600Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(eag_state::irq_on<M68K_IRQ_IPL1>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(8250)); // active for 8.25us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(eag_state::irq_off<M68K_IRQ_IPL1>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 4.9152_MHz_XTAL / 0x2000)); // 4060 Q13, 600Hz
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(8250)); // active for 8.25us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M68K_IRQ_IPL1);
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
|
||||
|
||||
@ -712,10 +704,9 @@ void eag_state::eagv11(machine_config &config)
|
||||
/* basic machine hardware */
|
||||
M68EC040(config.replace(), m_maincpu, 36_MHz_XTAL*2); // wrong! should be M68EC060
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &eag_state::eagv10_map);
|
||||
m_maincpu->set_periodic_int(FUNC(eag_state::irq2_line_hold), attotime::from_hz(600));
|
||||
|
||||
config.device_remove("irq_on"); // 8.25us is too long
|
||||
config.device_remove("irq_off");
|
||||
config.device_remove("irq_clock"); // 8.25us is too long
|
||||
m_maincpu->set_periodic_int(FUNC(eag_state::irq2_line_hold), attotime::from_hz(600));
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,10 +62,10 @@ uninteresting to emulate as separate drivers.
|
||||
#include "bus/generic/slot.h"
|
||||
#include "cpu/m6502/m65c02.h"
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/s14001a.h"
|
||||
#include "video/pwm.h"
|
||||
@ -90,7 +90,6 @@ class elite_state : public fidel_clockdiv_state
|
||||
public:
|
||||
elite_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
fidel_clockdiv_state(mconfig, type, tag),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_ppi8255(*this, "ppi8255"),
|
||||
m_rombank(*this, "rombank"),
|
||||
m_board(*this, "board"),
|
||||
@ -117,7 +116,6 @@ protected:
|
||||
void set_cpu_freq();
|
||||
|
||||
// devices/pointers
|
||||
required_device<timer_device> m_irq_on;
|
||||
optional_device<i8255_device> m_ppi8255;
|
||||
optional_memory_bank m_rombank;
|
||||
required_device<sensorboard_device> m_board;
|
||||
@ -132,10 +130,6 @@ protected:
|
||||
void eas_map(address_map &map);
|
||||
void pc_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
u8 speech_r(offs_t offset);
|
||||
@ -469,10 +463,9 @@ void elite_state::pc(machine_config &config)
|
||||
R65C02(config, m_maincpu, 4_MHz_XTAL); // R65C02P4
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &elite_state::pc_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(38.4_kHz_XTAL/64); // through 4060 IC, 600Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(elite_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_hz(38.4_kHz_XTAL*2)); // edge!
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(elite_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 38.4_kHz_XTAL/64)); // through 4060 IC, 600Hz
|
||||
irq_clock.set_pulse_width(attotime::from_hz(38.4_kHz_XTAL*2)); // edge!
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
|
@ -131,13 +131,15 @@ Designer 2100 (model 6103): exactly same, but running at 5MHz
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "cpu/m6502/m65sc02.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/s14001a.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/s14001a.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
@ -156,7 +158,6 @@ public:
|
||||
excel_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
m_dac(*this, "dac"),
|
||||
@ -184,7 +185,6 @@ protected:
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<dac_bit_interface> m_dac;
|
||||
@ -196,10 +196,6 @@ private:
|
||||
void fexcel_map(address_map &map);
|
||||
void fexcelb_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
u8 speech_r(offs_t offset);
|
||||
void ttl_w(offs_t offset, u8 data);
|
||||
@ -392,10 +388,9 @@ void excel_state::fexcel(machine_config &config)
|
||||
M65SC02(config, m_maincpu, 12_MHz_XTAL/4); // G65SC102P-3, 12.0M ceramic resonator
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &excel_state::fexcel_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(600); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(excel_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(15250)); // active for 15.25us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(excel_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(15250)); // active for 15.25us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
|
@ -47,13 +47,13 @@ If control Q4 is set, printer data can be read from I0.
|
||||
#include "emu.h"
|
||||
#include "machine/fidel_clockdiv.h"
|
||||
|
||||
#include "bus/generic/carts.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
#include "softlist.h"
|
||||
#include "speaker.h"
|
||||
@ -71,7 +71,6 @@ class sc12_state : public fidel_clockdiv_state
|
||||
public:
|
||||
sc12_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
fidel_clockdiv_state(mconfig, type, tag),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
m_dac(*this, "dac"),
|
||||
@ -87,7 +86,6 @@ protected:
|
||||
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<dac_bit_interface> m_dac;
|
||||
@ -96,10 +94,6 @@ private:
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void control_w(u8 data);
|
||||
u8 input_r(offs_t offset);
|
||||
@ -213,10 +207,9 @@ void sc12_state::sc12(machine_config &config)
|
||||
R65C02(config, m_maincpu, 3_MHz_XTAL); // R65C02P3
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &sc12_state::main_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(600); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(sc12_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(15250)); // active for 15.25us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(sc12_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(15250)); // active for 15.25us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
|
@ -28,6 +28,7 @@ I/O is via TTL, not further documented here
|
||||
The Playmatic S was only released in Germany, it's basically a 'deluxe' version of SC9
|
||||
with magnet sensors and came with CB9 and CB16.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Starting with SC9, Fidelity added a cartridge slot to their chess computers, meant for
|
||||
extra book opening databases and recorded games.
|
||||
@ -46,11 +47,11 @@ IRQ and write strobe are unused. Maximum known size is 16KB.
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/dac.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
@ -72,7 +73,6 @@ public:
|
||||
sc9_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
m_dac(*this, "dac"),
|
||||
@ -90,7 +90,6 @@ protected:
|
||||
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<dac_bit_interface> m_dac;
|
||||
@ -100,10 +99,6 @@ protected:
|
||||
void sc9_map(address_map &map);
|
||||
void sc9d_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
void control_w(u8 data);
|
||||
@ -269,10 +264,9 @@ void sc9_state::sc9d(machine_config &config)
|
||||
M6502(config, m_maincpu, 3.9_MHz_XTAL / 2); // R6502AP, 3.9MHz resonator
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &sc9_state::sc9d_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(600); // from 555 timer (22nF, 102K, 2.7K), ideal frequency is 600Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(sc9_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_usec(41)); // active for 41us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(sc9_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 555 timer (22nF, 102K, 2.7K), ideal frequency is 600Hz
|
||||
irq_clock.set_pulse_width(attotime::from_usec(41)); // active for 41us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
|
@ -21,11 +21,12 @@ I/O is again similar to supercon
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/beep.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
@ -40,7 +41,6 @@ public:
|
||||
cexpert_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_display(*this, "display"),
|
||||
m_board(*this, "board"),
|
||||
m_beeper(*this, "beeper"),
|
||||
@ -56,7 +56,6 @@ protected:
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<beep_device> m_beeper;
|
||||
@ -65,10 +64,6 @@ private:
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
void mux_w(u8 data);
|
||||
@ -211,10 +206,9 @@ void cexpert_state::cexpert(machine_config &config)
|
||||
R65C02(config, m_maincpu, 10_MHz_XTAL/2);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &cexpert_state::main_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(15440 / 32.0); // 555 timer (measured), to 4020
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(cexpert_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(15200)); // active for 15.2us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(cexpert_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 15440 / 32)); // 555 timer (measured), to 4020
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(15200)); // active for 15.2us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
|
||||
|
||||
|
@ -22,12 +22,13 @@ TODO:
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/beep.h"
|
||||
#include "video/hlcd0538.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
@ -42,7 +43,6 @@ public:
|
||||
cforte_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_display(*this, "display"),
|
||||
m_board(*this, "board"),
|
||||
m_lcd(*this, "hlcd0538"),
|
||||
@ -59,7 +59,6 @@ protected:
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<hlcd0538_device> m_lcd;
|
||||
@ -69,10 +68,6 @@ private:
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
void lcd_output_w(u64 data);
|
||||
@ -248,10 +243,9 @@ void cforte_state::cforte(machine_config &config)
|
||||
R65C02(config, m_maincpu, 10_MHz_XTAL/2);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &cforte_state::main_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(32.768_kHz_XTAL/128); // 256Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(cforte_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_usec(11)); // active for 11us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(cforte_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 32.768_kHz_XTAL/128)); // 256Hz
|
||||
irq_clock.set_pulse_width(attotime::from_usec(11)); // active for 11us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
|
||||
|
||||
|
@ -62,16 +62,16 @@ TODO:
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "bus/generic/carts.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "cpu/m6502/m65sc02.h"
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/beep.h"
|
||||
#include "video/pwm.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
#include "softlist.h"
|
||||
#include "speaker.h"
|
||||
@ -91,7 +91,6 @@ public:
|
||||
const_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_board(*this, "board"),
|
||||
m_display(*this, "display"),
|
||||
m_beeper(*this, "beeper"),
|
||||
@ -117,7 +116,6 @@ protected:
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<sensorboard_device> m_board;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<beep_device> m_beeper;
|
||||
@ -128,10 +126,6 @@ private:
|
||||
void ssensor4_map(address_map &map);
|
||||
void sconst_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
void mux_w(u8 data);
|
||||
@ -361,10 +355,9 @@ void const_state::nconst(machine_config &config)
|
||||
M6502(config, m_maincpu, 2_MHz_XTAL);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &const_state::const_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(2_MHz_XTAL / 0x2000); // through 4020 IC, ~244Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(const_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(17200)); // active for ~17.2us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(const_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 2_MHz_XTAL / 0x2000)); // through 4020 IC, ~244Hz
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(17200)); // active for ~17.2us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
@ -405,10 +398,7 @@ void const_state::nconst36(machine_config &config)
|
||||
M65SC02(config.replace(), m_maincpu, 7.2_MHz_XTAL/2);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &const_state::const_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(7.2_MHz_XTAL/2 / 0x2000); // through 4020 IC, ~439Hz
|
||||
TIMER(config.replace(), m_irq_on).configure_periodic(FUNC(const_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(17200)); // same as nconst
|
||||
TIMER(config.replace(), "irq_off").configure_periodic(FUNC(const_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
subdevice<clock_device>("irq_clock")->set_clock(7.2_MHz_XTAL/2 / 0x2000); // ~439Hz (pulse width same as nconst)
|
||||
|
||||
m_board->set_delay(attotime::from_msec(200));
|
||||
|
||||
@ -440,10 +430,7 @@ void const_state::nconstq(machine_config &config)
|
||||
/* basic machine hardware */
|
||||
m_maincpu->set_clock(8_MHz_XTAL/2);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(8_MHz_XTAL/4 / 0x1000); // through 4020 IC, ~488Hz
|
||||
TIMER(config.replace(), m_irq_on).configure_periodic(FUNC(const_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(17200)); // same as nconst
|
||||
TIMER(config.replace(), "irq_off").configure_periodic(FUNC(const_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
subdevice<clock_device>("irq_clock")->set_clock(8_MHz_XTAL/4 / 0x1000); // ~488Hz (pulse width same as nconst)
|
||||
|
||||
config.set_default_layout(layout_novag_constq);
|
||||
|
||||
@ -460,7 +447,7 @@ void const_state::sconst(machine_config &config)
|
||||
M6502(config.replace(), m_maincpu, 8_MHz_XTAL/2); // UM6502C
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &const_state::sconst_map);
|
||||
|
||||
m_irq_on->set_start_delay(m_irq_on->period() - attotime::from_nsec(10200)); // irq active for 10.2us
|
||||
subdevice<clock_device>("irq_clock")->set_pulse_width(attotime::from_nsec(10200)); // irq active for 10.2us
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
|
||||
m_board->set_nvram_enable(true);
|
||||
|
@ -22,13 +22,13 @@ Scorpio 68000 hardware is very similar, but with chessboard buttons and side led
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/mos6551.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/beep.h"
|
||||
#include "video/pwm.h"
|
||||
#include "video/hd44780.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
@ -47,7 +47,6 @@ public:
|
||||
diablo_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_screen(*this, "screen"),
|
||||
m_display(*this, "display"),
|
||||
m_lcd(*this, "hd44780"),
|
||||
@ -68,7 +67,6 @@ protected:
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<m68000_base_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<pwm_display_device> m_display;
|
||||
required_device<hd44780_device> m_lcd;
|
||||
@ -82,10 +80,6 @@ private:
|
||||
void diablo68k_map(address_map &map);
|
||||
void scorpio68k_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
void control_w(u8 data);
|
||||
@ -285,10 +279,9 @@ void diablo_state::diablo68k(machine_config &config)
|
||||
m_maincpu->disable_interrupt_mixer();
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &diablo_state::diablo68k_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(32.768_kHz_XTAL/128); // 256Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(diablo_state::irq_on<M68K_IRQ_IPL1>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(1380)); // active for 1.38us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(diablo_state::irq_off<M68K_IRQ_IPL1>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 32.768_kHz_XTAL/128)); // 256Hz
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(1380)); // active for 1.38us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M68K_IRQ_IPL1);
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
|
||||
|
||||
|
@ -40,10 +40,10 @@ TODO:
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m6502/m65c02.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/mos6551.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "sound/beep.h"
|
||||
#include "video/hd44780.h"
|
||||
#include "video/pwm.h"
|
||||
@ -67,7 +67,6 @@ public:
|
||||
sexpert_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_irq_on(*this, "irq_on"),
|
||||
m_rombank(*this, "rombank"),
|
||||
m_screen(*this, "screen"),
|
||||
m_display(*this, "display"),
|
||||
@ -93,7 +92,6 @@ protected:
|
||||
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<timer_device> m_irq_on;
|
||||
required_memory_bank m_rombank;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<pwm_display_device> m_display;
|
||||
@ -109,10 +107,6 @@ protected:
|
||||
// address maps
|
||||
void sexpert_map(address_map &map);
|
||||
|
||||
// periodic interrupts
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
|
||||
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
|
||||
|
||||
// I/O handlers
|
||||
void update_display();
|
||||
virtual void lcd_control_w(u8 data);
|
||||
@ -429,10 +423,9 @@ void sexpert_state::sexpert(machine_config &config)
|
||||
M65C02(config, m_maincpu, 10_MHz_XTAL/2); // or 12_MHz_XTAL/2, also seen with R65C02
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &sexpert_state::sexpert_map);
|
||||
|
||||
const attotime irq_period = attotime::from_hz(32.768_kHz_XTAL/128); // 256Hz
|
||||
TIMER(config, m_irq_on).configure_periodic(FUNC(sexpert_state::irq_on<M6502_IRQ_LINE>), irq_period);
|
||||
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(21500)); // active for 21.5us
|
||||
TIMER(config, "irq_off").configure_periodic(FUNC(sexpert_state::irq_off<M6502_IRQ_LINE>), irq_period);
|
||||
auto &irq_clock(CLOCK(config, "irq_clock", 32.768_kHz_XTAL/128)); // 256Hz
|
||||
irq_clock.set_pulse_width(attotime::from_nsec(21500)); // active for 21.5us
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
|
||||
|
||||
@ -488,7 +481,7 @@ void sforte_state::sforte(machine_config &config)
|
||||
|
||||
/* basic machine hardware */
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &sforte_state::sforte_map);
|
||||
m_irq_on->set_start_delay(m_irq_on->period() - attotime::from_usec(10)); // tlow measured between 8us and 12us (unstable)
|
||||
subdevice<clock_device>("irq_clock")->set_pulse_width(attotime::from_usec(10)); // measured between 8us and 12us (unstable)
|
||||
|
||||
m_board->set_type(sensorboard_device::BUTTONS);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user