mirror of
https://github.com/holub/mame
synced 2025-04-28 03:02:52 +03:00
(nw) output finders for techno,thayers, tm990189,turbo
This commit is contained in:
parent
45809a3211
commit
d4743f6b3e
@ -27,6 +27,7 @@ public:
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_switch(*this, "SWITCH.%u", 0)
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
{ }
|
||||
|
||||
enum
|
||||
@ -61,6 +62,7 @@ private:
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_ioport_array<8> m_switch;
|
||||
output_finder<48> m_digits;
|
||||
|
||||
emu_timer *m_irq_set_timer;
|
||||
emu_timer *m_irq_advance_timer;
|
||||
@ -88,22 +90,22 @@ void techno_state::techno_map(address_map &map)
|
||||
map(0x17800, 0x17fff).w(this, FUNC(techno_state::setout_w));
|
||||
}
|
||||
|
||||
ADDRESS_MAP_START(techno_state::techno_sub_map)
|
||||
// no ram here, must be internal to the cpu
|
||||
AM_RANGE(0x0000, 0x3fff) AM_READ(rd_r) // to TKY2016A audio processor which has its own 3.58MHz clock
|
||||
AM_RANGE(0x4000, 0x7fff) AM_WRITE(wr_w) // A11=LED;A12=WR2 (DAC) ;A13=WR1 (TKY2016A as above)
|
||||
AM_RANGE(0x4000, 0xbfff) AM_ROM // 4000-7FFF is same as 8000-BFFF; 4x 16k ROMS bankswitched
|
||||
AM_RANGE(0xc000, 0xffff) AM_ROM // another 16k ROM
|
||||
ADDRESS_MAP_END
|
||||
void techno_state::techno_sub_map(address_map &map)
|
||||
{ // no ram here, must be internal to the cpu
|
||||
map(0x0000, 0x3fff).r(this, FUNC(techno_state::rd_r)); // to TKY2016A audio processor which has its own 3.58MHz clock
|
||||
map(0x4000, 0x7fff).w(this, FUNC(techno_state::wr_w)); // A11=LED;A12=WR2 (DAC) ;A13=WR1 (TKY2016A as above)
|
||||
map(0x4000, 0xbfff).rom(); // 4000-7FFF is same as 8000-BFFF; 4x 16k ROMS bankswitched
|
||||
map(0xc000, 0xffff).rom(); // another 16k ROM
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( techno_state::disp1_w )
|
||||
{
|
||||
output().set_digit_value(m_digit, bitswap<16>(data, 12, 10, 8, 14, 13, 9, 11, 15, 7, 6, 5, 4, 3, 2, 1, 0));
|
||||
m_digits[m_digit] = bitswap<16>(data, 12, 10, 8, 14, 13, 9, 11, 15, 7, 6, 5, 4, 3, 2, 1, 0);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( techno_state::disp2_w )
|
||||
{
|
||||
output().set_digit_value(m_digit+30, bitswap<16>(data, 12, 10, 8, 14, 13, 9, 11, 15, 7, 6, 5, 4, 3, 2, 1, 0));
|
||||
m_digits[m_digit+30] = bitswap<16>(data, 12, 10, 8, 14, 13, 9, 11, 15, 7, 6, 5, 4, 3, 2, 1, 0);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( techno_state::sound_w )
|
||||
@ -276,6 +278,7 @@ void techno_state::machine_start()
|
||||
|
||||
void techno_state::machine_reset()
|
||||
{
|
||||
m_digits.resolve();
|
||||
m_vector = 0x88;
|
||||
m_digit = 0;
|
||||
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
, m_ldv1000(*this, "ldv1000")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_row(*this, "ROW.%u", 0)
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
{
|
||||
}
|
||||
|
||||
@ -103,6 +104,7 @@ public:
|
||||
void check_interrupt();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_ioport_array<10> m_row;
|
||||
output_finder<16> m_digits;
|
||||
|
||||
void thayers(machine_config &config);
|
||||
void thayers_io_map(address_map &map);
|
||||
@ -464,7 +466,7 @@ WRITE8_MEMBER(thayers_state::den1_w)
|
||||
|
||||
*/
|
||||
|
||||
output().set_digit_value(data >> 4, led_map[data & 0x0f]);
|
||||
m_digits[data >> 4] = led_map[data & 0x0f];
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(thayers_state::den2_w)
|
||||
@ -484,7 +486,7 @@ WRITE8_MEMBER(thayers_state::den2_w)
|
||||
|
||||
*/
|
||||
|
||||
output().set_digit_value(8 + (data >> 4), led_map[data & 0x0f]);
|
||||
m_digits[8 + (data >> 4)] = led_map[data & 0x0f];
|
||||
}
|
||||
|
||||
/* SSI-263 */
|
||||
@ -764,6 +766,7 @@ INPUT_PORTS_END
|
||||
|
||||
void thayers_state::machine_start()
|
||||
{
|
||||
m_digits.resolve();
|
||||
memset(&m_ssi263, 0, sizeof(m_ssi263));
|
||||
}
|
||||
|
||||
|
@ -90,6 +90,7 @@ public:
|
||||
, m_tms9918(*this, "tms9918")
|
||||
, m_tms9901_usr(*this, TMS9901_0_TAG)
|
||||
, m_tms9901_sys(*this, TMS9901_1_TAG)
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
{ }
|
||||
|
||||
required_device<tms9980a_device> m_tms9980a;
|
||||
@ -170,6 +171,7 @@ private:
|
||||
void digitsel(int offset, bool state);
|
||||
required_device<tms9901_device> m_tms9901_usr;
|
||||
required_device<tms9901_device> m_tms9901_sys;
|
||||
output_finder<10> m_digits;
|
||||
};
|
||||
|
||||
|
||||
@ -184,11 +186,13 @@ MACHINE_RESET_MEMBER(tm990189_state,tm990_189)
|
||||
|
||||
MACHINE_START_MEMBER(tm990189_state,tm990_189)
|
||||
{
|
||||
m_digits.resolve();
|
||||
m_displayena_timer = machine().scheduler().timer_alloc(timer_expired_delegate());
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(tm990189_state,tm990_189_v)
|
||||
{
|
||||
m_digits.resolve();
|
||||
m_displayena_timer = machine().scheduler().timer_alloc(timer_expired_delegate());
|
||||
|
||||
m_joy1x_timer = machine().scheduler().timer_alloc(timer_expired_delegate());
|
||||
@ -253,8 +257,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(tm990189_state::display_callback)
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
m_old_segment_state[i] |= m_segment_state[i];
|
||||
sprintf(ledname,"digit%d",i);
|
||||
output().set_digit_value(i, m_old_segment_state[i]);
|
||||
m_digits[i] = m_old_segment_state[i];
|
||||
m_old_segment_state[i] = m_segment_state[i];
|
||||
m_segment_state[i] = 0;
|
||||
}
|
||||
|
@ -366,8 +366,8 @@ WRITE8_MEMBER( turbo_state::digit_w )
|
||||
static const uint8_t ls48_map[16] =
|
||||
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 };
|
||||
|
||||
output().set_digit_value(m_i8279_scanlines * 2 + 0, ls48_map[data & 0x0f]);
|
||||
output().set_digit_value(m_i8279_scanlines * 2 + 1, ls48_map[(data>>4) & 0x0f]);
|
||||
m_digits[m_i8279_scanlines * 2] = ls48_map[data & 0x0f];
|
||||
m_digits[m_i8279_scanlines * 2 + 1] = ls48_map[data>>4];
|
||||
}
|
||||
|
||||
/*************************************
|
||||
|
@ -22,26 +22,28 @@ class turbo_state : public driver_device
|
||||
{
|
||||
public:
|
||||
turbo_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subcpu(*this, "subcpu"),
|
||||
m_i8255_0(*this, "i8255_0"),
|
||||
m_i8255_1(*this, "i8255_1"),
|
||||
m_i8255_2(*this, "i8255_2"),
|
||||
m_i8255_3(*this, "i8255_3"),
|
||||
m_spriteroms(*this, "sprites"),
|
||||
m_proms(*this, "proms"),
|
||||
m_roadroms(*this, "road"),
|
||||
m_bgcolorrom(*this, "bgcolor"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_sprite_position(*this, "spritepos"),
|
||||
m_decrypted_opcodes(*this, "decrypted_opcodes"),
|
||||
m_samples(*this, "samples"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen")
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_subcpu(*this, "subcpu")
|
||||
, m_i8255_0(*this, "i8255_0")
|
||||
, m_i8255_1(*this, "i8255_1")
|
||||
, m_i8255_2(*this, "i8255_2")
|
||||
, m_i8255_3(*this, "i8255_3")
|
||||
, m_spriteroms(*this, "sprites")
|
||||
, m_proms(*this, "proms")
|
||||
, m_roadroms(*this, "road")
|
||||
, m_bgcolorrom(*this, "bgcolor")
|
||||
, m_videoram(*this, "videoram")
|
||||
, m_spriteram(*this, "spriteram")
|
||||
, m_sprite_position(*this, "spritepos")
|
||||
, m_decrypted_opcodes(*this, "decrypted_opcodes")
|
||||
, m_samples(*this, "samples")
|
||||
, m_gfxdecode(*this, "gfxdecode")
|
||||
, m_screen(*this, "screen")
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
{ }
|
||||
|
||||
private:
|
||||
/* device/memory pointers */
|
||||
required_device<z80_device> m_maincpu;
|
||||
optional_device<z80_device> m_subcpu;
|
||||
@ -64,8 +66,10 @@ public:
|
||||
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
output_finder<32> m_digits;
|
||||
|
||||
std::unique_ptr<uint8_t[]> m_buckrog_bitmap_ram;
|
||||
virtual void machine_start() override { m_digits.resolve(); }
|
||||
|
||||
/* machine states */
|
||||
uint8_t m_i8279_scanlines;
|
||||
@ -125,6 +129,7 @@ public:
|
||||
uint32_t step[8]; /* stepping value */
|
||||
};
|
||||
|
||||
public:
|
||||
DECLARE_WRITE8_MEMBER(scanlines_w);
|
||||
DECLARE_WRITE8_MEMBER(digit_w);
|
||||
DECLARE_READ8_MEMBER(turbo_collision_r);
|
||||
|
Loading…
Reference in New Issue
Block a user