mirror of
https://github.com/holub/mame
synced 2025-04-26 18:23:08 +03:00
another pile of cleanup (nw)
This commit is contained in:
parent
4aa7d22106
commit
3d09b31c84
@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(SED1520, sed1520_device, "sed1520", "Epson SED1520")
|
||||
sed1520_device::sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, SED1520, tag, owner, clock), m_lcd_on(0), m_busy(0), m_page(0), m_column(0), m_old_column(0), m_start_line(0),
|
||||
m_adc(0), m_static_drive(0), m_modify_write(false),
|
||||
m_screen_update_func(nullptr)
|
||||
m_screen_update_cb()
|
||||
{
|
||||
}
|
||||
|
||||
@ -44,6 +44,8 @@ sed1520_device::sed1520_device(const machine_config &mconfig, const char *tag, d
|
||||
|
||||
void sed1520_device::device_start()
|
||||
{
|
||||
m_screen_update_cb.bind_relative_to(*owner());
|
||||
|
||||
// state saving
|
||||
save_item(NAME(m_lcd_on));
|
||||
save_item(NAME(m_busy));
|
||||
@ -84,8 +86,8 @@ uint32_t sed1520_device::screen_update(screen_device &screen, bitmap_ind16 &bitm
|
||||
{
|
||||
if (m_lcd_on)
|
||||
{
|
||||
if (m_screen_update_func)
|
||||
m_screen_update_func(*this, bitmap, cliprect, m_vram, m_start_line, m_adc);
|
||||
if (!m_screen_update_cb.isnull())
|
||||
m_screen_update_cb(bitmap, cliprect, m_vram, m_start_line, m_adc);
|
||||
}
|
||||
else if (m_static_drive)
|
||||
return UPDATE_HAS_NOT_CHANGED;
|
||||
|
@ -12,15 +12,18 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#define MCFG_SED1520_ADD( _tag, _cb ) \
|
||||
MCFG_DEVICE_ADD( _tag, SED1520, 0 ) \
|
||||
downcast<sed1520_device &>(*device).set_screen_update_cb(_cb);
|
||||
#define SED1520CB_UPDATE(cls, fnc) sed1520_device::screen_update_delegate((&cls::fnc), (#cls "::" #fnc), DEVICE_SELF, ((cls *)nullptr))
|
||||
#define SED1520CB_DEVUPDATE(tag, cls, fnc) sed1520_device::screen_update_delegate((&cls::fnc), (#cls "::" #fnc), (tag), ((cls *)nullptr))
|
||||
|
||||
#define MCFG_SED1520_ADD(tag, cb) \
|
||||
MCFG_DEVICE_ADD(tag, SED1520, 0) \
|
||||
downcast<sed1520_device &>(*device).set_screen_update_cb(SED1520CB_##cb);
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
#define SED1520_UPDATE_CB(name) uint32_t name(device_t &device, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *vram, int start_line, int adc)
|
||||
#define SED1520_UPDATE_CB(name) uint32_t name(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *vram, int start_line, int adc)
|
||||
|
||||
|
||||
// ======================> sed1520_device
|
||||
@ -28,13 +31,13 @@
|
||||
class sed1520_device : public device_t
|
||||
{
|
||||
public:
|
||||
typedef uint32_t (*screen_update_func)(device_t &device, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *vram, int start_line, int adc);
|
||||
typedef device_delegate<uint32_t (bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *vram, int start_line, int adc)> screen_update_delegate;
|
||||
|
||||
// construction/destruction
|
||||
sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// sconfiguration helpers
|
||||
template <typename Object> void set_screen_update_cb(Object &&cb) { m_screen_update_func = std::forward<Object>(cb); }
|
||||
template <typename Object> void set_screen_update_cb(Object &&cb) { m_screen_update_cb = std::forward<Object>(cb); }
|
||||
|
||||
// device interface
|
||||
virtual DECLARE_WRITE8_MEMBER(write);
|
||||
@ -52,18 +55,18 @@ protected:
|
||||
|
||||
private:
|
||||
// internal state
|
||||
uint8_t m_lcd_on;
|
||||
uint8_t m_busy;
|
||||
uint8_t m_page;
|
||||
uint8_t m_column;
|
||||
uint8_t m_old_column;
|
||||
uint8_t m_start_line;
|
||||
uint8_t m_adc;
|
||||
uint8_t m_static_drive;
|
||||
uint8_t m_lcd_on;
|
||||
uint8_t m_busy;
|
||||
uint8_t m_page;
|
||||
uint8_t m_column;
|
||||
uint8_t m_old_column;
|
||||
uint8_t m_start_line;
|
||||
uint8_t m_adc;
|
||||
uint8_t m_static_drive;
|
||||
bool m_modify_write;
|
||||
screen_update_func m_screen_update_func;
|
||||
screen_update_delegate m_screen_update_cb;
|
||||
|
||||
uint8_t m_vram[0x140];
|
||||
uint8_t m_vram[0x140];
|
||||
};
|
||||
|
||||
|
||||
|
@ -31,27 +31,27 @@ class chessmst_state : public driver_device
|
||||
{
|
||||
public:
|
||||
chessmst_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_pia2(*this, "z80pio2"),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_beeper(*this, "beeper"),
|
||||
m_extra(*this, "EXTRA")
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_pia2(*this, "z80pio2")
|
||||
, m_speaker(*this, "speaker")
|
||||
, m_beeper(*this, "beeper")
|
||||
, m_extra(*this, "EXTRA")
|
||||
, m_buttons(*this, "BUTTONS")
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
, m_leds(*this, "led_%c%u", unsigned('a'), 1U)
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<z80pio_device> m_pia2;
|
||||
optional_device<speaker_sound_device> m_speaker;
|
||||
optional_device<beep_device> m_beeper;
|
||||
required_ioport m_extra;
|
||||
DECLARE_INPUT_CHANGED_MEMBER(chessmst_sensor);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(view_monitor_button);
|
||||
|
||||
uint16_t m_matrix;
|
||||
uint16_t m_led_sel;
|
||||
uint8_t m_sensor[64];
|
||||
uint8_t m_digit_matrix;
|
||||
int m_digit_dot;
|
||||
uint16_t m_digit;
|
||||
void chessmst(machine_config &config);
|
||||
void chessmsta(machine_config &config);
|
||||
void chessmstdm(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
DECLARE_WRITE8_MEMBER( digits_w );
|
||||
@ -60,20 +60,31 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( pio1_port_b_dm_w );
|
||||
DECLARE_READ8_MEMBER( pio2_port_a_r );
|
||||
DECLARE_WRITE8_MEMBER( pio2_port_b_w );
|
||||
DECLARE_INPUT_CHANGED_MEMBER(chessmst_sensor);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(view_monitor_button);
|
||||
DECLARE_WRITE_LINE_MEMBER( timer_555_w );
|
||||
|
||||
void chessmst(machine_config &config);
|
||||
void chessmsta(machine_config &config);
|
||||
void chessmstdm(machine_config &config);
|
||||
void chessmst_io(address_map &map);
|
||||
void chessmst_mem(address_map &map);
|
||||
void chessmstdm(address_map &map);
|
||||
void chessmstdm_io(address_map &map);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<z80pio_device> m_pia2;
|
||||
optional_device<speaker_sound_device> m_speaker;
|
||||
optional_device<beep_device> m_beeper;
|
||||
required_ioport m_extra;
|
||||
required_ioport m_buttons;
|
||||
output_finder<4> m_digits;
|
||||
output_finder<10, 8> m_leds;
|
||||
|
||||
uint16_t m_matrix;
|
||||
uint16_t m_led_sel;
|
||||
uint8_t m_sensor[64];
|
||||
uint8_t m_digit_matrix;
|
||||
int m_digit_dot;
|
||||
uint16_t m_digit;
|
||||
};
|
||||
|
||||
|
||||
@ -245,6 +256,19 @@ static INPUT_PORTS_START( chessmstdm )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
void chessmst_state::machine_start()
|
||||
{
|
||||
m_digits.resolve();
|
||||
m_leds.resolve();
|
||||
|
||||
save_item(NAME(m_matrix));
|
||||
save_item(NAME(m_led_sel));
|
||||
save_item(NAME(m_sensor));
|
||||
save_item(NAME(m_digit_matrix));
|
||||
save_item(NAME(m_digit_dot));
|
||||
save_item(NAME(m_digit));
|
||||
}
|
||||
|
||||
void chessmst_state::machine_reset()
|
||||
{
|
||||
//reset all sensors
|
||||
@ -257,10 +281,10 @@ void chessmst_state::machine_reset()
|
||||
|
||||
void chessmst_state::update_display()
|
||||
{
|
||||
for(int i=0; i<4; i++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (BIT(m_digit_matrix, i))
|
||||
output().set_indexed_value("digit", i, bitswap<16>(m_digit, 3,5,12,10,14,1,2,13,8,6,11,15,7,9,4,0) | (m_digit_dot << 16));
|
||||
m_digits[i] = bitswap<16>(m_digit, 3,5,12,10,14,1,2,13,8,6,11,15,7,9,4,0) | (m_digit_dot << 16);
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,28 +298,18 @@ WRITE8_MEMBER( chessmst_state::digits_w )
|
||||
|
||||
WRITE8_MEMBER( chessmst_state::pio1_port_a_w )
|
||||
{
|
||||
for (int row=1; row<=8; row++)
|
||||
for (int row = 0; row < 8; row++)
|
||||
{
|
||||
if (m_led_sel & 0x01)
|
||||
output().set_indexed_value("led_a", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x02)
|
||||
output().set_indexed_value("led_b", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x04)
|
||||
output().set_indexed_value("led_c", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x08)
|
||||
output().set_indexed_value("led_d", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x10)
|
||||
output().set_indexed_value("led_e", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x20)
|
||||
output().set_indexed_value("led_f", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x40)
|
||||
output().set_indexed_value("led_g", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x80)
|
||||
output().set_indexed_value("led_h", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x100)
|
||||
output().set_indexed_value("led_i", row, BIT(data, 8-row));
|
||||
if (m_led_sel & 0x200)
|
||||
output().set_indexed_value("led_j", row, BIT(data, 8-row));
|
||||
if (BIT(m_led_sel, 0)) m_leds[0][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 1)) m_leds[1][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 2)) m_leds[2][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 3)) m_leds[3][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 4)) m_leds[4][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 5)) m_leds[5][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 6)) m_leds[6][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 7)) m_leds[7][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 8)) m_leds[8][row] = BIT(data, 7 - row);
|
||||
if (BIT(m_led_sel, 9)) m_leds[9][row] = BIT(data, 7 - row);
|
||||
}
|
||||
|
||||
m_led_sel = 0;
|
||||
@ -337,7 +351,7 @@ READ8_MEMBER( chessmst_state::pio2_port_a_r )
|
||||
}
|
||||
|
||||
if (m_matrix & 0x100)
|
||||
data |= ioport("BUTTONS")->read();
|
||||
data |= m_buttons->read();
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -363,17 +377,17 @@ static const z80_daisy_config chessmstdm_daisy_chain[] =
|
||||
MACHINE_CONFIG_START(chessmst_state::chessmst)
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL(9'830'400)/4) // U880 Z80 clone
|
||||
MCFG_CPU_ADD("maincpu", Z80, 9.8304_MHz_XTAL/4) // U880 Z80 clone
|
||||
MCFG_CPU_PROGRAM_MAP(chessmst_mem)
|
||||
MCFG_CPU_IO_MAP(chessmst_io)
|
||||
MCFG_Z80_DAISY_CHAIN(chessmst_daisy_chain)
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, XTAL(9'830'400)/4)
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, 9.8304_MHz_XTAL/4)
|
||||
MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_Z80PIO_OUT_PA_CB(WRITE8(chessmst_state, pio1_port_a_w))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio1_port_b_w))
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, XTAL(9'830'400)/4)
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, 9.8304_MHz_XTAL/4)
|
||||
MCFG_Z80PIO_IN_PA_CB(READ8(chessmst_state, pio2_port_a_r))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio2_port_b_w))
|
||||
|
||||
@ -388,17 +402,17 @@ MACHINE_CONFIG_END
|
||||
MACHINE_CONFIG_START(chessmst_state::chessmsta)
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL(8'000'000)/4) // U880 Z80 clone
|
||||
MCFG_CPU_ADD("maincpu", Z80, 8_MHz_XTAL/4) // U880 Z80 clone
|
||||
MCFG_CPU_PROGRAM_MAP(chessmst_mem)
|
||||
MCFG_CPU_IO_MAP(chessmst_io)
|
||||
MCFG_Z80_DAISY_CHAIN(chessmst_daisy_chain)
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, XTAL(8'000'000)/4)
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, 8_MHz_XTAL/4)
|
||||
MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_Z80PIO_OUT_PA_CB(WRITE8(chessmst_state, pio1_port_a_w))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio1_port_b_w))
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, XTAL(8'000'000)/4)
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, 8_MHz_XTAL/4)
|
||||
MCFG_Z80PIO_IN_PA_CB(READ8(chessmst_state, pio2_port_a_r))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio2_port_b_w))
|
||||
|
||||
@ -413,17 +427,17 @@ MACHINE_CONFIG_END
|
||||
MACHINE_CONFIG_START(chessmst_state::chessmstdm)
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL(8'000'000)/2) // U880 Z80 clone
|
||||
MCFG_CPU_ADD("maincpu", Z80, 8_MHz_XTAL/2) // U880 Z80 clone
|
||||
MCFG_CPU_PROGRAM_MAP(chessmstdm)
|
||||
MCFG_CPU_IO_MAP(chessmstdm_io)
|
||||
MCFG_Z80_DAISY_CHAIN(chessmstdm_daisy_chain)
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, XTAL(8'000'000)/4)
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, 8_MHz_XTAL/4)
|
||||
MCFG_Z80PIO_OUT_PA_CB(WRITE8(chessmst_state, pio1_port_a_w))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio1_port_b_dm_w))
|
||||
MCFG_Z80PIO_IN_PB_CB(IOPORT("EXTRA"))
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, XTAL(8'000'000)/4)
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, 8_MHz_XTAL/4)
|
||||
MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_Z80PIO_IN_PA_CB(READ8(chessmst_state, pio2_port_a_r))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio2_port_b_w))
|
||||
|
@ -70,28 +70,27 @@
|
||||
class digel804_state : public driver_device
|
||||
{
|
||||
public:
|
||||
digel804_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
digel804_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_acia(*this, "acia"),
|
||||
m_vfd(*this, "vfd"),
|
||||
m_kb(*this, "74c923"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_rambank(*this, "bankedram")
|
||||
m_rambank(*this, "bankedram"),
|
||||
m_func_leds(*this, "func_led%u", 0U)
|
||||
{
|
||||
}
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<mos6551_device> m_acia;
|
||||
required_device<roc10937_device> m_vfd;
|
||||
required_device<mm74c922_device> m_kb;
|
||||
required_device<ram_device> m_ram;
|
||||
required_memory_bank m_rambank;
|
||||
DECLARE_INPUT_CHANGED_MEMBER(mode_change);
|
||||
|
||||
void digel804(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
DECLARE_DRIVER_INIT(digel804);
|
||||
|
||||
DECLARE_WRITE8_MEMBER( op00 );
|
||||
DECLARE_READ8_MEMBER( ip40 );
|
||||
DECLARE_WRITE8_MEMBER( op40 );
|
||||
@ -114,9 +113,22 @@ public:
|
||||
DECLARE_READ8_MEMBER( acia_control_r );
|
||||
DECLARE_WRITE8_MEMBER( acia_control_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( ep804_acia_irq_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( da_w );
|
||||
DECLARE_INPUT_CHANGED_MEMBER(mode_change);
|
||||
|
||||
void z80_mem_804_1_4(address_map &map);
|
||||
void z80_io_1_4(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<mos6551_device> m_acia;
|
||||
required_device<roc10937_device> m_vfd;
|
||||
required_device<mm74c922_device> m_kb;
|
||||
required_device<ram_device> m_ram;
|
||||
required_memory_bank m_rambank;
|
||||
|
||||
output_finder<16> m_func_leds;
|
||||
|
||||
// current speaker state for port 45
|
||||
uint8_t m_speaker_state;
|
||||
// ram stuff for banking
|
||||
@ -132,20 +144,44 @@ public:
|
||||
uint8_t m_chipinsert_state;
|
||||
uint8_t m_keyen_state;
|
||||
uint8_t m_op41;
|
||||
};
|
||||
|
||||
|
||||
class ep804_state : public digel804_state
|
||||
{
|
||||
public:
|
||||
using digel804_state::digel804_state;
|
||||
|
||||
void ep804(machine_config &config);
|
||||
void digel804(machine_config &config);
|
||||
void z80_io_1_2(address_map &map);
|
||||
void z80_io_1_4(address_map &map);
|
||||
|
||||
protected:
|
||||
DECLARE_WRITE_LINE_MEMBER( ep804_acia_irq_w );
|
||||
|
||||
void z80_mem_804_1_2(address_map &map);
|
||||
void z80_mem_804_1_4(address_map &map);
|
||||
void z80_io_1_2(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
enum { MODE_OFF, MODE_KEY, MODE_REM, MODE_SIM };
|
||||
|
||||
|
||||
DRIVER_INIT_MEMBER(digel804_state,digel804)
|
||||
void digel804_state::machine_start()
|
||||
{
|
||||
m_func_leds.resolve();
|
||||
|
||||
save_item(NAME(m_speaker_state));
|
||||
save_item(NAME(m_ram_bank));
|
||||
save_item(NAME(m_acia_intq));
|
||||
save_item(NAME(m_overload_state));
|
||||
save_item(NAME(m_key_intq));
|
||||
save_item(NAME(m_remote_mode));
|
||||
save_item(NAME(m_key_mode));
|
||||
save_item(NAME(m_sim_mode));
|
||||
save_item(NAME(m_powerfail_state));
|
||||
save_item(NAME(m_chipinsert_state));
|
||||
save_item(NAME(m_keyen_state));
|
||||
save_item(NAME(m_op41));
|
||||
|
||||
m_speaker_state = 0;
|
||||
//port43_rtn = 0xEE;//0xB6;
|
||||
m_acia_intq = 1; // /INT source 1
|
||||
@ -344,8 +380,8 @@ WRITE8_MEMBER( digel804_state::op46 )
|
||||
output().set_value("busy_led", BIT(data,6));
|
||||
output().set_value("error_led", BIT(data,5));
|
||||
|
||||
for(int i=0; i<16; i++)
|
||||
output().set_indexed_value("func_led", i, (!(data & 0x10) && ((~data & 0x0f) == i)) ? 1 : 0);
|
||||
for (int i = 0; i < 16; i++)
|
||||
m_func_leds[i] = (!(data & 0x10) && ((~data & 0x0f) == i)) ? 1 : 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( digel804_state::op47 ) // eprom timing/power and control write
|
||||
@ -446,7 +482,7 @@ ADDRESS_MAP_START(digel804_state::z80_mem_804_1_4)
|
||||
// f800-ffff is open bus in mapper, 7f
|
||||
ADDRESS_MAP_END
|
||||
|
||||
ADDRESS_MAP_START(digel804_state::z80_mem_804_1_2)
|
||||
ADDRESS_MAP_START(ep804_state::z80_mem_804_1_2)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM // 3f in mapper = rom D41
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROM // 5f in mapper = rom D42
|
||||
@ -489,7 +525,7 @@ ADDRESS_MAP_START(digel804_state::z80_io_1_4)
|
||||
|
||||
ADDRESS_MAP_END
|
||||
|
||||
ADDRESS_MAP_START(digel804_state::z80_io_1_2)
|
||||
ADDRESS_MAP_START(ep804_state::z80_io_1_2)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
// io bits: x 1 x x x * * *
|
||||
@ -586,13 +622,13 @@ WRITE_LINE_MEMBER( digel804_state::acia_irq_w )
|
||||
m_maincpu->set_input_line(0, (m_key_intq & m_acia_intq) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( digel804_state::ep804_acia_irq_w )
|
||||
WRITE_LINE_MEMBER( ep804_state::ep804_acia_irq_w )
|
||||
{
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START(digel804_state::digel804)
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL(3'686'400)/2) /* Z80A, X1(aka E0 on schematics): 3.6864Mhz */
|
||||
MCFG_CPU_ADD("maincpu", Z80, 3.6864_MHz_XTAL/2) /* Z80A, X1(aka E0 on schematics): 3.6864Mhz */
|
||||
MCFG_CPU_PROGRAM_MAP(z80_mem_804_1_4)
|
||||
MCFG_CPU_IO_MAP(z80_io_1_4)
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
||||
@ -611,7 +647,7 @@ MACHINE_CONFIG_START(digel804_state::digel804)
|
||||
|
||||
/* acia */
|
||||
MCFG_DEVICE_ADD("acia", MOS6551, 0)
|
||||
MCFG_MOS6551_XTAL(XTAL(3'686'400)/2)
|
||||
MCFG_MOS6551_XTAL(3.6864_MHz_XTAL/2)
|
||||
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(digel804_state, acia_irq_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
|
||||
MCFG_MOS6551_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
|
||||
@ -634,15 +670,16 @@ MACHINE_CONFIG_START(digel804_state::digel804)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(digel804_state::ep804)
|
||||
MACHINE_CONFIG_START(ep804_state::ep804)
|
||||
digel804(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu") /* Z80, X1(aka E0 on schematics): 3.6864Mhz */
|
||||
MCFG_CPU_PROGRAM_MAP(z80_mem_804_1_2)
|
||||
MCFG_CPU_IO_MAP(z80_io_1_2)
|
||||
|
||||
MCFG_DEVICE_MODIFY("acia")
|
||||
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(digel804_state, ep804_acia_irq_w))
|
||||
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(ep804_state, ep804_acia_irq_w))
|
||||
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("32K")
|
||||
@ -730,6 +767,6 @@ ROM_END
|
||||
Drivers
|
||||
******************************************************************************/
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1985, digel804, 0, 0, digel804, digel804, digel804_state, digel804, "Digelec, Inc", "Digelec 804 EPROM Programmer", MACHINE_NOT_WORKING )
|
||||
COMP( 1982, ep804, digel804, 0, ep804, digel804, digel804_state, digel804, "Wavetek/Digelec, Inc", "EP804 EPROM Programmer", MACHINE_NOT_WORKING )
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1985, digel804, 0, 0, digel804, digel804, digel804_state, 0, "Digelec, Inc", "Digelec 804 EPROM Programmer", MACHINE_NOT_WORKING )
|
||||
COMP( 1982, ep804, digel804, 0, ep804, digel804, ep804_state, 0, "Wavetek/Digelec, Inc", "EP804 EPROM Programmer", MACHINE_NOT_WORKING )
|
||||
|
@ -21,69 +21,41 @@
|
||||
class ecoinf2_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ecoinf2_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
ecoinf2_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_reel0(*this, "reel0"),
|
||||
m_reel1(*this, "reel1"),
|
||||
m_reel2(*this, "reel2"),
|
||||
m_reel3(*this, "reel3"),
|
||||
m_reels(*this, "reel%s", 0U),
|
||||
m_meters(*this, "meters"),
|
||||
m_coins(*this, "COINS"),
|
||||
m_key(*this, "PERKEY"),
|
||||
m_panel(*this, "PANEL")
|
||||
m_panel(*this, "PANEL"),
|
||||
m_lamp_outputs(*this, "lamp%u", 0U),
|
||||
m_led_outputs(*this, "digit%u", 0U),
|
||||
m_coinlamp_outputs(*this, "coinlamp%u", 0U)
|
||||
{
|
||||
strobe_amount = 0;
|
||||
strobe_addr = 0;
|
||||
}
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<stepper_device> m_reel0;
|
||||
required_device<stepper_device> m_reel1;
|
||||
required_device<stepper_device> m_reel2;
|
||||
required_device<stepper_device> m_reel3;
|
||||
required_device<meters_device> m_meters;
|
||||
required_ioport m_coins;
|
||||
required_ioport m_key;
|
||||
required_ioport m_panel;
|
||||
void ecoinf2_oxo(machine_config &config);
|
||||
|
||||
uint16_t m_lamps[16];
|
||||
uint16_t m_leds[16];
|
||||
//uint16_t m_chars[14];
|
||||
// void update_display();
|
||||
int m_optic_pattern;
|
||||
DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
|
||||
int strobe_addr;
|
||||
int strobe_amount;
|
||||
protected:
|
||||
template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ox_port5c_out_w);
|
||||
DECLARE_DRIVER_INIT(ecoinf2);
|
||||
|
||||
void update_lamps()
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
for (int bit=0;bit<16;bit++)
|
||||
{
|
||||
int data = ((m_lamps[i] << bit)&0x8000)>>15;
|
||||
|
||||
output().set_indexed_value("lamp", (i*16)+bit, data );
|
||||
}
|
||||
for (int bit = 0; bit < 16; bit++)
|
||||
m_lamp_outputs[(i << 4) | bit] = BIT(m_lamps[i], 15 - i);
|
||||
}
|
||||
}
|
||||
void update_leds(void)
|
||||
void update_leds()
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
for (int bit=0;bit<16;bit++)
|
||||
{
|
||||
int data = ((m_leds[i] << bit)&0x8000)>>15;
|
||||
|
||||
output().set_digit_value((i*16)+bit, data );
|
||||
}
|
||||
for (int bit = 0; bit < 16; bit++)
|
||||
m_led_outputs[(i << 4) | bit] = BIT(m_leds[i], 15 - i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,8 +153,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_ic24_write_b_payouts)
|
||||
{
|
||||
//TODO: Fix up payout enables - all available bits enable one slide each
|
||||
output().set_value("coinlamp0", data&0x40 );
|
||||
output().set_value("coinlamp1", data&0x80 );
|
||||
m_coinlamp_outputs[0] = BIT(data, 6);
|
||||
m_coinlamp_outputs[1] = BIT(data, 7);
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_ic24_write_c_inhibits)
|
||||
@ -197,24 +169,22 @@ public:
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_ic23_write_a_reel01)
|
||||
{
|
||||
m_reel0->update( data &0x0f);
|
||||
m_reel1->update((data>>4)&0x0f);
|
||||
m_reels[0]->update( data &0x0f);
|
||||
m_reels[1]->update((data>>4)&0x0f);
|
||||
|
||||
awp_draw_reel(machine(),"reel1", *m_reel0);
|
||||
awp_draw_reel(machine(),"reel2", *m_reel1);
|
||||
awp_draw_reel(machine(),"reel1", *m_reels[0]);
|
||||
awp_draw_reel(machine(),"reel2", *m_reels[1]);
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_ic23_write_b_reel23)
|
||||
{
|
||||
m_reel2->update( data &0x0f);
|
||||
m_reel3->update((data>>4)&0x0f);
|
||||
m_reels[2]->update( data &0x0f);
|
||||
m_reels[3]->update((data>>4)&0x0f);
|
||||
|
||||
awp_draw_reel(machine(),"reel3", *m_reel2);
|
||||
awp_draw_reel(machine(),"reel4", *m_reel3);
|
||||
awp_draw_reel(machine(),"reel3", *m_reels[2]);
|
||||
awp_draw_reel(machine(),"reel4", *m_reels[3]);
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_ic23_read_c_key)
|
||||
@ -224,11 +194,34 @@ public:
|
||||
return data;
|
||||
}
|
||||
|
||||
DECLARE_MACHINE_START(ecoinf2);
|
||||
virtual void machine_start() override
|
||||
{
|
||||
m_lamp_outputs.resolve();
|
||||
m_led_outputs.resolve();
|
||||
m_coinlamp_outputs.resolve();
|
||||
}
|
||||
|
||||
void ecoinf2_oxo(machine_config &config);
|
||||
void oxo_memmap(address_map &map);
|
||||
void oxo_portmap(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device_array<stepper_device, 4> m_reels;
|
||||
required_device<meters_device> m_meters;
|
||||
required_ioport m_coins;
|
||||
required_ioport m_key;
|
||||
required_ioport m_panel;
|
||||
output_finder<16 * 16> m_lamp_outputs;
|
||||
output_finder<16 * 16> m_led_outputs;
|
||||
output_finder<2> m_coinlamp_outputs;
|
||||
|
||||
uint16_t m_lamps[16];
|
||||
uint16_t m_leds[16];
|
||||
//uint16_t m_chars[14];
|
||||
int m_optic_pattern;
|
||||
|
||||
int strobe_addr = 0;
|
||||
int strobe_amount = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -538,13 +531,13 @@ MACHINE_CONFIG_START(ecoinf2_state::ecoinf2_oxo)
|
||||
MCFG_I8255_IN_PORTC_CB(READ8(ecoinf2_state, ppi8255_ic13_read_c_panel))
|
||||
|
||||
MCFG_ECOIN_200STEP_ADD("reel0")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinf2_state, reel0_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinf2_state, reel_optic_cb<0>))
|
||||
MCFG_ECOIN_200STEP_ADD("reel1")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinf2_state, reel1_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinf2_state, reel_optic_cb<1>))
|
||||
MCFG_ECOIN_200STEP_ADD("reel2")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinf2_state, reel2_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinf2_state, reel_optic_cb<2>))
|
||||
MCFG_ECOIN_200STEP_ADD("reel3")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinf2_state, reel3_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinf2_state, reel_optic_cb<3>))
|
||||
|
||||
MCFG_DEVICE_ADD("meters", METERS, 0)
|
||||
MCFG_METERS_NUMBER(8)
|
||||
@ -788,18 +781,15 @@ ROM_START( ec_sumnc )
|
||||
ROM_LOAD( "smn94.bin", 0x0000, 0x010000, CRC(9ade016a) SHA1(1c75dc46436253c4e6730f40523d016098c20683) )
|
||||
ROM_LOAD( "smncscst", 0x0000, 0x010000, CRC(1147531a) SHA1(c303187452afdcb79e0f182d26d2c27693f69d76) )
|
||||
ROM_END
|
||||
DRIVER_INIT_MEMBER(ecoinf2_state,ecoinf2)
|
||||
{
|
||||
}
|
||||
|
||||
// OXO wh type (Phoenix?) (watchdog on port 5c?)
|
||||
GAME( 19??, ec_oxocg, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Electrocoin", "Oxo Classic Gold (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxocl, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Electrocoin", "Oxo Club (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxogb, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Electrocoin", "Oxo Golden Bars (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxorl, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Electrocoin", "Oxo Reels (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxorv, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Electrocoin", "Oxo Revolution (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_suprl, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Electrocoin", "Super Reels (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_rcc, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Electrocoin", "Royal Casino Club (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxocg, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Electrocoin", "Oxo Classic Gold (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxocl, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Electrocoin", "Oxo Club (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxogb, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Electrocoin", "Oxo Golden Bars (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxorl, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Electrocoin", "Oxo Reels (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_oxorv, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Electrocoin", "Oxo Revolution (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_suprl, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Electrocoin", "Super Reels (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_rcc, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Electrocoin", "Royal Casino Club (Electrocoin) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
|
||||
GAME( 19??, ec_sumnd, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Concept Games Ltd", "Super Multi Nudger (Concept / Electrocoin Oxo) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_sumnc, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, ecoinf2, ROT0, "Concept Games Ltd", "Casino Super Multi Nudger (Concept / Electrocoin Oxo) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_sumnd, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Concept Games Ltd", "Super Multi Nudger (Concept / Electrocoin Oxo) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
GAME( 19??, ec_sumnc, 0 , ecoinf2_oxo, ecoinf2, ecoinf2_state, 0, ROT0, "Concept Games Ltd", "Casino Super Multi Nudger (Concept / Electrocoin Oxo) (?)", MACHINE_NO_SOUND|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING|MACHINE_MECHANICAL)
|
||||
|
@ -49,21 +49,26 @@ public:
|
||||
elem = 0xff000000;
|
||||
}
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(key_pressed);
|
||||
|
||||
void monty(machine_config &config);
|
||||
void mmonty(machine_config &config);
|
||||
|
||||
protected:
|
||||
DECLARE_WRITE8_MEMBER(sound_w);
|
||||
DECLARE_WRITE8_MEMBER(ioDisplayWrite_w);
|
||||
DECLARE_WRITE8_MEMBER(ioCommandWrite0_w);
|
||||
DECLARE_WRITE8_MEMBER(ioCommandWrite1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(halt_changed);
|
||||
DECLARE_WRITE_LINE_MEMBER(key_pressed);
|
||||
|
||||
// screen updates
|
||||
uint32_t lcd_update(screen_device& screen, bitmap_rgb32& bitmap, const rectangle& cliprect);
|
||||
SED1520_UPDATE_CB(screen_update);
|
||||
|
||||
void monty(machine_config &config);
|
||||
void mmonty(machine_config &config);
|
||||
void mmonty_mem(address_map &map);
|
||||
void monty_io(address_map &map);
|
||||
void monty_mem(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
@ -249,7 +254,7 @@ uint32_t monty_state::lcd_update(screen_device& screen, bitmap_rgb32& bitmap, co
|
||||
}
|
||||
|
||||
|
||||
SED1520_UPDATE_CB(monty_screen_update)
|
||||
SED1520_UPDATE_CB(monty_state::screen_update)
|
||||
{
|
||||
// TODO: Not really a SED1520 - there are two SED1503s
|
||||
return 0x00;
|
||||
@ -278,7 +283,7 @@ MACHINE_CONFIG_START(monty_state::monty)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
|
||||
// LCD controller interfaces
|
||||
MCFG_SED1520_ADD("sed1520_0", monty_screen_update)
|
||||
MCFG_SED1520_ADD("sed1520_0", UPDATE(monty_state, screen_update))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(monty_state::mmonty)
|
||||
|
@ -44,19 +44,13 @@ public:
|
||||
, m_bank0(*this, "bank0")
|
||||
, m_bank1(*this, "bank1")
|
||||
, m_bank2(*this, "bank2")
|
||||
, m_rows{ { *this, "IN%X", 0 }, { *this, "IN%X", 8 } }
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<hd44780_device> m_lcdc;
|
||||
required_device<beep_device> m_beep;
|
||||
required_device<generic_slot_device> m_cart;
|
||||
optional_memory_bank m_bank0;
|
||||
required_memory_bank m_bank1;
|
||||
optional_memory_bank m_bank2;
|
||||
|
||||
uint8_t m_mux_data;
|
||||
uint8_t m_beep_state;
|
||||
void pc2000(machine_config &config);
|
||||
void gl2000(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
@ -69,27 +63,58 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( beep_w );
|
||||
DECLARE_PALETTE_INIT(pc2000);
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pc2000_cart);
|
||||
void pc2000(machine_config &config);
|
||||
void gl2000(machine_config &config);
|
||||
|
||||
void pc2000_io(address_map &map);
|
||||
void pc2000_mem(address_map &map);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<hd44780_device> m_lcdc;
|
||||
required_device<beep_device> m_beep;
|
||||
required_device<generic_slot_device> m_cart;
|
||||
optional_memory_bank m_bank0;
|
||||
required_memory_bank m_bank1;
|
||||
optional_memory_bank m_bank2;
|
||||
|
||||
private:
|
||||
required_ioport_array<8> m_rows[2];
|
||||
|
||||
uint8_t m_mux_data;
|
||||
uint8_t m_beep_state;
|
||||
};
|
||||
|
||||
class gl3000s_state : public pc2000_state
|
||||
{
|
||||
public:
|
||||
gl3000s_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: pc2000_state(mconfig, type, tag),
|
||||
m_lcdc_r(*this, "sed1520_r"),
|
||||
m_lcdc_l(*this, "sed1520_l")
|
||||
{ }
|
||||
: pc2000_state(mconfig, type, tag)
|
||||
, m_lcdc_r(*this, "sed1520_r")
|
||||
, m_lcdc_l(*this, "sed1520_l")
|
||||
, m_lev_out(*this, "LEV%u", 1U)
|
||||
, m_try_out(*this, "TRY%u", 1U)
|
||||
, m_tick_out(*this, "TICK%u", 0U)
|
||||
, m_time_out(*this, "TIME%u", 0U)
|
||||
, m_points_out(*this, "P%u%u", 1U, 0U)
|
||||
{ }
|
||||
|
||||
void gl3000s(machine_config &config);
|
||||
|
||||
protected:
|
||||
void machine_start() override;
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void gl3000s_io(address_map &map);
|
||||
|
||||
private:
|
||||
int sed1520_screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *vram, int start_line, int adc, int start_x);
|
||||
SED1520_UPDATE_CB(screen_update_right);
|
||||
SED1520_UPDATE_CB(screen_update_left);
|
||||
|
||||
required_device<sed1520_device> m_lcdc_r;
|
||||
required_device<sed1520_device> m_lcdc_l;
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void gl3000s(machine_config &config);
|
||||
void gl3000s_io(address_map &map);
|
||||
output_finder<4> m_lev_out;
|
||||
output_finder<3> m_try_out;
|
||||
output_finder<8> m_tick_out;
|
||||
output_finder<3> m_time_out;
|
||||
output_finder<2, 3> m_points_out;
|
||||
};
|
||||
|
||||
class gl4004_state : public pc2000_state
|
||||
@ -97,11 +122,13 @@ class gl4004_state : public pc2000_state
|
||||
public:
|
||||
gl4004_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: pc2000_state(mconfig, type, tag)
|
||||
{ }
|
||||
{ }
|
||||
|
||||
void gl4000(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
HD44780_PIXEL_UPDATE(gl4000_pixel_update);
|
||||
void gl4000(machine_config &config);
|
||||
};
|
||||
|
||||
class pc1000_state : public pc2000_state
|
||||
@ -109,9 +136,12 @@ class pc1000_state : public pc2000_state
|
||||
public:
|
||||
pc1000_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: pc2000_state(mconfig, type, tag)
|
||||
{ }
|
||||
{ }
|
||||
|
||||
void misterx(machine_config &config);
|
||||
void pc1000(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
@ -121,27 +151,19 @@ public:
|
||||
DECLARE_READ8_MEMBER( lcdc_control_r );
|
||||
DECLARE_WRITE8_MEMBER( lcdc_control_w );
|
||||
HD44780_PIXEL_UPDATE(pc1000_pixel_update);
|
||||
void misterx(machine_config &config);
|
||||
void pc1000(machine_config &config);
|
||||
|
||||
void pc1000_io(address_map &map);
|
||||
void pc1000_mem(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
/* TODO: put a breakpoint at 1625 and test the inputs, writes at dce4 are the scancode values */
|
||||
// TODO: put a breakpoint at 1625 and test the inputs, writes at dce4 are the scancode values
|
||||
READ8_MEMBER( pc2000_state::key_matrix_r )
|
||||
{
|
||||
static const char *const bitnames[2][8] =
|
||||
{
|
||||
{"IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7"},
|
||||
{"IN8", "IN9", "INA", "INB", "INC", "IND", "INE", "INF"}
|
||||
};
|
||||
|
||||
uint8_t data = 0xff;
|
||||
|
||||
for (int line=0; line<8; line++)
|
||||
if (m_mux_data & (1<<line))
|
||||
data &= ioport(bitnames[offset][line])->read();
|
||||
for (int line = 0; line < 8; line++)
|
||||
if (BIT(m_mux_data, line))
|
||||
data &= m_rows[offset & 1][line]->read();
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -200,6 +222,17 @@ ADDRESS_MAP_START(pc2000_state::pc2000_io)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
void gl3000s_state::machine_start()
|
||||
{
|
||||
pc2000_state::machine_start();
|
||||
|
||||
m_lev_out.resolve();
|
||||
m_try_out.resolve();
|
||||
m_tick_out.resolve();
|
||||
m_time_out.resolve();
|
||||
m_points_out.resolve();
|
||||
}
|
||||
|
||||
uint32_t gl3000s_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0);
|
||||
@ -208,7 +241,7 @@ uint32_t gl3000s_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gl3000s_sed1520_screen_update(device_t &device, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *vram, int start_line, int adc, int start_x)
|
||||
int gl3000s_state::sed1520_screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *vram, int start_line, int adc, int start_x)
|
||||
{
|
||||
for (int y=0; y<2; y++)
|
||||
{
|
||||
@ -231,12 +264,12 @@ int gl3000s_sed1520_screen_update(device_t &device, bitmap_ind16 &bitmap, const
|
||||
return 0;
|
||||
}
|
||||
|
||||
SED1520_UPDATE_CB(gl3000s_screen_update_right)
|
||||
SED1520_UPDATE_CB(gl3000s_state::screen_update_right)
|
||||
{
|
||||
return gl3000s_sed1520_screen_update(device, bitmap, cliprect, vram, start_line, adc, 119);
|
||||
return sed1520_screen_update(bitmap, cliprect, vram, start_line, adc, 119);
|
||||
}
|
||||
|
||||
SED1520_UPDATE_CB(gl3000s_screen_update_left)
|
||||
SED1520_UPDATE_CB(gl3000s_state::screen_update_left)
|
||||
{
|
||||
uint8_t sec[5];
|
||||
uint8_t points[2][5];
|
||||
@ -273,10 +306,10 @@ SED1520_UPDATE_CB(gl3000s_screen_update_left)
|
||||
else if ((x == 75 || x == 77 || x == 79) && yi == 5) points[y][dpos] |= (state << 4);
|
||||
else if ((x == 75 || x == 77 || x == 79) && yi == 6) points[y][dpos] |= (state << 3);
|
||||
|
||||
else if (y == 1 && x >= 65 && x <= 68 && yi == 7) device.machine().output().set_indexed_value("LEV", x - 64, state);
|
||||
else if (x >= 59 && x <= 60 && yi == 7) device.machine().output().set_indexed_value("TRY", x - 58 + (y ? 0 : 1), state);
|
||||
else if (y == 1 && x >= 61 && x <= 64 && yi == 7) device.machine().output().set_indexed_value("TICK", x - 59, state);
|
||||
else if (y == 0 && x >= 61 && x <= 64 && yi == 7) device.machine().output().set_indexed_value("TICK", 62 - x + (x >= 63 ? 8 : 0), state);
|
||||
else if (y == 1 && x >= 65 && x <= 68 && yi == 7) m_lev_out[x - 65] = state;
|
||||
else if (x >= 59 && x <= 60 && yi == 7) m_try_out[x - 59 + (y ? 0 : 1)] = state;
|
||||
else if (y == 1 && x >= 61 && x <= 64 && yi == 7) m_tick_out[x - 59] = state;
|
||||
else if (y == 0 && x >= 61 && x <= 64 && yi == 7) m_tick_out[62 - x + (x >= 63 ? 8 : 0)] = state;
|
||||
|
||||
else if (x < 74 && yi < 7)
|
||||
{
|
||||
@ -286,14 +319,14 @@ SED1520_UPDATE_CB(gl3000s_screen_update_left)
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=0; i < 3; i++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
device.machine().output().set_indexed_value("TIME", i, sec[i]);
|
||||
device.machine().output().set_indexed_value("P1", i, points[1][i]);
|
||||
device.machine().output().set_indexed_value("P2", i, points[0][i]);
|
||||
m_time_out[i] = sec[i];
|
||||
m_points_out[0][i] = points[1][i];
|
||||
m_points_out[1][i] = points[0][i];
|
||||
}
|
||||
|
||||
return gl3000s_sed1520_screen_update(device, bitmap, cliprect, vram, start_line, adc, 58);
|
||||
return sed1520_screen_update(bitmap, cliprect, vram, start_line, adc, 58);
|
||||
}
|
||||
|
||||
|
||||
@ -766,7 +799,7 @@ void pc2000_state::machine_start()
|
||||
std::string region_tag;
|
||||
uint8_t *bios = memregion("bios")->base();
|
||||
memory_region *cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
uint8_t *cart = (cart_region != nullptr) ? cart_region->base() : memregion("bios")->base();
|
||||
uint8_t *cart = cart_region ? cart_region->base() : bios;
|
||||
|
||||
m_bank0->configure_entries(0, 0x10, bios, 0x4000);
|
||||
m_bank1->configure_entries(0, 0x10, bios, 0x4000);
|
||||
@ -904,8 +937,8 @@ MACHINE_CONFIG_START(gl3000s_state::gl3000s)
|
||||
MCFG_CPU_IO_MAP(gl3000s_io)
|
||||
|
||||
MCFG_DEVICE_REMOVE("hd44780")
|
||||
MCFG_SED1520_ADD("sed1520_l", gl3000s_screen_update_left) // left panel is 59 pixels (0-58)
|
||||
MCFG_SED1520_ADD("sed1520_r", gl3000s_screen_update_right) // right panel is 61 pixels (59-119)
|
||||
MCFG_SED1520_ADD("sed1520_l", UPDATE(gl3000s_state, screen_update_left)) // left panel is 59 pixels (0-58)
|
||||
MCFG_SED1520_ADD("sed1520_r", UPDATE(gl3000s_state, screen_update_right)) // right panel is 61 pixels (59-119)
|
||||
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_SIZE(120, 24)
|
||||
|
@ -21,31 +21,41 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/mcs51/mcs51.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "tecnbras.lh"
|
||||
|
||||
|
||||
class tecnbras_state : public driver_device
|
||||
{
|
||||
public:
|
||||
tecnbras_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_dmds(*this, "dmd_%u", 0U)
|
||||
{ }
|
||||
|
||||
void tecnbras(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(set_x_position_w);
|
||||
DECLARE_WRITE8_MEMBER(print_column_w);
|
||||
|
||||
// DECLARE_WRITE8_MEMBER(tecnbras_io_w);
|
||||
// DECLARE_READ8_MEMBER(tecnbras_io_r);
|
||||
DECLARE_DRIVER_INIT(tecnbras);
|
||||
void tecnbras(machine_config &config);
|
||||
void i80c31_io(address_map &map);
|
||||
void i80c31_prg(address_map &map);
|
||||
//DECLARE_WRITE8_MEMBER(tecnbras_io_w);
|
||||
//DECLARE_READ8_MEMBER(tecnbras_io_r);
|
||||
void i80c31_io(address_map &map);
|
||||
void i80c31_prg(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
output_finder<14 * 7> m_dmds;
|
||||
|
||||
int m_xcoord;
|
||||
char m_digit[14][7];
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
ADDRESS_MAP_START(tecnbras_state::i80c31_prg)
|
||||
@ -59,16 +69,6 @@ ADDRESS_MAP_START(tecnbras_state::i80c31_io)
|
||||
AM_RANGE(0x06B8, 0x06BC) AM_WRITE(print_column_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
DRIVER_INIT_MEMBER( tecnbras_state, tecnbras )
|
||||
{
|
||||
m_xcoord = 0;
|
||||
for (auto & elem : m_digit){
|
||||
for (int y=0; y<7; y++){
|
||||
elem[y] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(tecnbras_state::set_x_position_w)
|
||||
{
|
||||
m_xcoord = offset;
|
||||
@ -76,25 +76,34 @@ WRITE8_MEMBER(tecnbras_state::set_x_position_w)
|
||||
|
||||
WRITE8_MEMBER(tecnbras_state::print_column_w)
|
||||
{
|
||||
int x = m_xcoord + offset;
|
||||
for (int i=0; i<7; i++){
|
||||
if((x/5) < ARRAY_LENGTH(m_digit)){
|
||||
m_digit[x/5][i] &= ~(1 << (x%5));
|
||||
m_digit[x/5][i] |= BIT(data, 7-i) ? (1 << (x%5)) : 0;
|
||||
output().set_indexed_value("dmd_", (x/5)*7 + i, 0x1F & m_digit[x/5][i]);
|
||||
int const x = m_xcoord + offset;
|
||||
int const ch = x / 5;
|
||||
if (ch < ARRAY_LENGTH(m_digit)) {
|
||||
int const row = x % 5;
|
||||
for (int i = 0; i < 7; i++) {
|
||||
m_digit[ch][i] &= ~(1 << row);
|
||||
m_digit[ch][i] |= BIT(data, 7 - i) ? (1 << row) : 0;
|
||||
m_dmds[(ch * 7) + i] = 0x1F & m_digit[ch][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tecnbras_state::machine_start()
|
||||
{
|
||||
/*
|
||||
for (int x=0; x<14; x++){
|
||||
for (int y=0; y<7; y++){
|
||||
output().set_indexed_value("dmd_", x*7 + y, y);
|
||||
}
|
||||
}
|
||||
*/
|
||||
m_dmds.resolve();
|
||||
|
||||
save_item(NAME(m_xcoord));
|
||||
save_item(NAME(m_digit));
|
||||
|
||||
m_xcoord = 0;
|
||||
for (auto &elem : m_digit)
|
||||
std::fill(std::begin(elem), std::end(elem), 0);
|
||||
|
||||
#if 0
|
||||
for (int x = 0; x < ARRAY_LENGTH(m_digit); x++)
|
||||
for (int y = 0; y < 7; y++)
|
||||
m_dmds[(x * 7) + y] = y;
|
||||
#endif
|
||||
}
|
||||
|
||||
void tecnbras_state::machine_reset()
|
||||
@ -103,7 +112,7 @@ void tecnbras_state::machine_reset()
|
||||
|
||||
MACHINE_CONFIG_START(tecnbras_state::tecnbras)
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", I80C31, XTAL(12'000'000)) /* verified on pcb */
|
||||
MCFG_CPU_ADD("maincpu", I80C31, 12_MHz_XTAL) // verified on pcb
|
||||
MCFG_CPU_PROGRAM_MAP(i80c31_prg)
|
||||
MCFG_CPU_IO_MAP(i80c31_io)
|
||||
MCFG_MCS51_PORT_P1_OUT_CB(NOOP) // buzzer ?
|
||||
@ -132,5 +141,5 @@ ROM_START( tecnbras )
|
||||
ROM_LOAD( "tecnbras.u2", 0x0000, 0x8000, CRC(1a1e18fc) SHA1(8907e72f0356a2e2e1097dabac6d6b0b3d717f85) )
|
||||
ROM_END
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 200?, tecnbras, 0, 0, tecnbras, 0, tecnbras_state, tecnbras, "Tecnbras", "Dot Matrix Display (70x7 pixels)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND)
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 200?, tecnbras, 0, 0, tecnbras, 0, tecnbras_state, 0, "Tecnbras", "Dot Matrix Display (70x7 pixels)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND )
|
||||
|
@ -429,19 +429,37 @@ K28 modules:
|
||||
class tispeak_state : public hh_tms1k_state
|
||||
{
|
||||
public:
|
||||
tispeak_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_tms1k_state(mconfig, type, tag),
|
||||
tispeak_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
hh_tms1k_state(mconfig, type, tag),
|
||||
m_tms5100(*this, "tms5100"),
|
||||
m_tms6100(*this, "tms6100"),
|
||||
m_cart(*this, "cartslot")
|
||||
m_cart(*this, "cartslot"),
|
||||
m_ol_out(*this, "ol%u", 1U)
|
||||
{ }
|
||||
|
||||
// devices
|
||||
required_device<tms5110_device> m_tms5100;
|
||||
required_device<tms6100_device> m_tms6100;
|
||||
optional_device<generic_slot_device> m_cart;
|
||||
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(power_button) override;
|
||||
|
||||
DECLARE_DRIVER_INIT(snspell);
|
||||
DECLARE_DRIVER_INIT(tntell);
|
||||
DECLARE_DRIVER_INIT(lantutor);
|
||||
|
||||
// machine configs
|
||||
void tms5110_route(machine_config &config);
|
||||
void sns_tmc0281(machine_config &config);
|
||||
void sns_tmc0281d(machine_config &config);
|
||||
void sns_cd2801(machine_config &config);
|
||||
void snspellit(machine_config &config);
|
||||
void snspellsp(machine_config &config);
|
||||
void snspellc(machine_config &config);
|
||||
void snspellcuk(machine_config &config);
|
||||
void snmath(machine_config &config);
|
||||
void snread(machine_config &config);
|
||||
void tntell(machine_config &config);
|
||||
void vocaid(machine_config &config);
|
||||
void lantutor(machine_config &config);
|
||||
void k28m2(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void power_off() override;
|
||||
void prepare_display();
|
||||
bool vfd_filament_on() { return m_display_decay[15][16] != 0; }
|
||||
@ -462,36 +480,27 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(k28_write_o);
|
||||
DECLARE_WRITE16_MEMBER(k28_write_r);
|
||||
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(tntell_get_overlay);
|
||||
|
||||
void init_cartridge();
|
||||
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
// devices
|
||||
required_device<tms5110_device> m_tms5100;
|
||||
required_device<tms6100_device> m_tms6100;
|
||||
optional_device<generic_slot_device> m_cart;
|
||||
|
||||
output_finder<5> m_ol_out;
|
||||
|
||||
// cartridge
|
||||
u32 m_cart_max_size;
|
||||
u8* m_cart_base;
|
||||
void init_cartridge();
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge);
|
||||
DECLARE_DRIVER_INIT(snspell);
|
||||
DECLARE_DRIVER_INIT(tntell);
|
||||
DECLARE_DRIVER_INIT(lantutor);
|
||||
|
||||
u8 m_overlay;
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(tntell_get_overlay);
|
||||
|
||||
// machine configs
|
||||
void tms5110_route(machine_config &config);
|
||||
void sns_tmc0281(machine_config &config);
|
||||
void sns_tmc0281d(machine_config &config);
|
||||
void sns_cd2801(machine_config &config);
|
||||
void snspellit(machine_config &config);
|
||||
void snspellsp(machine_config &config);
|
||||
void snspellc(machine_config &config);
|
||||
void snspellcuk(machine_config &config);
|
||||
void snmath(machine_config &config);
|
||||
void snread(machine_config &config);
|
||||
void tntell(machine_config &config);
|
||||
void vocaid(machine_config &config);
|
||||
void lantutor(machine_config &config);
|
||||
void k28m2(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
};
|
||||
|
||||
|
||||
@ -499,6 +508,8 @@ void tispeak_state::machine_start()
|
||||
{
|
||||
hh_tms1k_state::machine_start();
|
||||
|
||||
m_ol_out.resolve();
|
||||
|
||||
init_cartridge();
|
||||
}
|
||||
|
||||
@ -689,7 +700,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::tntell_get_overlay)
|
||||
m_overlay = m_inp_matrix[10]->read();
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
output().set_indexed_value("ol", i+1, m_overlay >> i & 1);
|
||||
m_ol_out[i] = BIT(m_overlay, i);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user