mirror of
https://github.com/holub/mame
synced 2025-05-18 03:35:03 +03:00
eeprom_device tag lookup cleanup (nw)
This commit is contained in:
parent
82681f1bb1
commit
a6e9d21953
@ -339,8 +339,6 @@ INPUT_PORTS_END
|
||||
|
||||
void _20pacgal_state::machine_start()
|
||||
{
|
||||
m_eeprom = machine().device("eeprom");
|
||||
|
||||
save_item(NAME(m_game_selected));
|
||||
save_item(NAME(m_ram_48000));
|
||||
save_item(NAME(m_irq_mask));
|
||||
|
@ -287,7 +287,6 @@ WRITE8_MEMBER(cave_state::soundlatch_ack_w)
|
||||
|
||||
WRITE16_MEMBER(cave_state::cave_eeprom_msb_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (data & ~0xfe00)
|
||||
logerror("%s: Unknown EEPROM bit written %04X\n", machine().describe_context(), data);
|
||||
|
||||
@ -299,14 +298,13 @@ WRITE16_MEMBER(cave_state::cave_eeprom_msb_w)
|
||||
coin_counter_w(machine(), 0, data & 0x1000);
|
||||
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x0800);
|
||||
m_eeprom->write_bit(data & 0x0800);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x0200) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x0200) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,24 +316,21 @@ WRITE16_MEMBER(cave_state::sailormn_eeprom_msb_w)
|
||||
|
||||
WRITE16_MEMBER(cave_state::hotdogst_eeprom_msb_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_8_15) // even address
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x0800);
|
||||
m_eeprom->write_bit(data & 0x0800);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x0200) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x0200) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x0400) ? CLEAR_LINE: ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x0400) ? CLEAR_LINE: ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(cave_state::cave_eeprom_lsb_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (data & ~0x00ef)
|
||||
logerror("%s: Unknown EEPROM bit written %04X\n",machine().describe_context(),data);
|
||||
|
||||
@ -347,14 +342,13 @@ WRITE16_MEMBER(cave_state::cave_eeprom_lsb_w)
|
||||
coin_counter_w(machine(), 0, data & 0x0001);
|
||||
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x80);
|
||||
m_eeprom->write_bit(data & 0x80);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,7 +366,6 @@ WRITE16_MEMBER(cave_state::gaia_coin_lsb_w)
|
||||
- Writing 0xcf00 shouldn't send a 1 bit to the eeprom */
|
||||
WRITE16_MEMBER(cave_state::metmqstr_eeprom_msb_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (data & ~0xff00)
|
||||
logerror("%s: Unknown EEPROM bit written %04X\n", machine().describe_context(), data);
|
||||
|
||||
@ -384,14 +377,13 @@ WRITE16_MEMBER(cave_state::metmqstr_eeprom_msb_w)
|
||||
if (~data & 0x0100)
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x0800);
|
||||
m_eeprom->write_bit(data & 0x0800);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x0200) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x0200) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -672,7 +664,6 @@ WRITE16_MEMBER(cave_state::korokoro_leds_w)
|
||||
|
||||
WRITE16_MEMBER(cave_state::korokoro_eeprom_msb_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (data & ~0x7000)
|
||||
{
|
||||
logerror("%s: Unknown EEPROM bit written %04X\n",machine().describe_context(),data);
|
||||
@ -685,14 +676,13 @@ WRITE16_MEMBER(cave_state::korokoro_eeprom_msb_w)
|
||||
m_hopper = data & 0x0100; // ???
|
||||
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x4000);
|
||||
m_eeprom->write_bit(data & 0x4000);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x1000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x1000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x2000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x2000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -800,9 +790,7 @@ ADDRESS_MAP_END
|
||||
|
||||
READ16_MEMBER(cave_state::pwrinst2_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return ~8 + ((eeprom->read_bit() & 1) ? 8 : 0);
|
||||
return ~8 + ((m_eeprom->read_bit() & 1) ? 8 : 0);
|
||||
}
|
||||
|
||||
INLINE void vctrl_w(address_space &space, offs_t offset, UINT16 data, UINT16 mem_mask, int GFX)
|
||||
@ -899,21 +887,19 @@ ADDRESS_MAP_END
|
||||
|
||||
WRITE16_MEMBER(cave_state::tjumpman_eeprom_lsb_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (data & ~0x0038)
|
||||
logerror("%s: Unknown EEPROM bit written %04X\n",machine().describe_context(),data);
|
||||
|
||||
if (ACCESSING_BITS_0_7) // odd address
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x0020);
|
||||
m_eeprom->write_bit(data & 0x0020);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x0010) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x0010) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,19 +457,15 @@ WRITE32_MEMBER(dragngun_state::dragngun_lightgun_w)
|
||||
|
||||
READ32_MEMBER(deco32_state::dragngun_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return 0xfffffffe | eeprom->read_bit();
|
||||
return 0xfffffffe | m_eeprom->read_bit();
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(deco32_state::dragngun_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7) {
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line((data & 0x2) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom->write_bit(data & 0x1);
|
||||
eeprom->set_cs_line((data & 0x4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x2) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit(data & 0x1);
|
||||
m_eeprom->set_cs_line((data & 0x4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
return;
|
||||
}
|
||||
logerror("%s:Write control 1 %08x %08x\n",machine().describe_context(),offset,data);
|
||||
|
@ -182,14 +182,12 @@ READ32_MEMBER(deco_mlc_state::mlc_scanline_r)
|
||||
|
||||
WRITE32_MEMBER(deco_mlc_state::avengrs_eprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_8_15) {
|
||||
UINT8 ebyte=(data>>8)&0xff;
|
||||
// if (ebyte&0x80) {
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line((ebyte & 0x2) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom->write_bit(ebyte & 0x1);
|
||||
eeprom->set_cs_line((ebyte & 0x4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((ebyte & 0x2) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit(ebyte & 0x1);
|
||||
m_eeprom->set_cs_line((ebyte & 0x4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
// }
|
||||
}
|
||||
else if (ACCESSING_BITS_0_7) {
|
||||
|
@ -331,7 +331,8 @@ public:
|
||||
fortecar_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_vram(*this, "vram"){ }
|
||||
m_vram(*this, "vram"),
|
||||
m_eeprom(*this, "eeprom"){ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_shared_ptr<UINT8> m_vram;
|
||||
@ -344,6 +345,7 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_fortecar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -432,7 +434,6 @@ R = 82 Ohms Pull Down.
|
||||
|
||||
WRITE8_MEMBER(fortecar_state::ppi0_portc_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
/*
|
||||
NM93CS56N Serial EEPROM
|
||||
|
||||
@ -441,18 +442,15 @@ CK PPI_PC1
|
||||
DIN PPI_PC2
|
||||
DOUT PPI_PC4
|
||||
*/
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit((data & 0x04) >> 2);
|
||||
eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit((data & 0x04) >> 2);
|
||||
m_eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER(fortecar_state::ppi0_portc_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// popmessage("%s",machine().describe_context());
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return ((eeprom->read_bit()<<4) & 0x10);
|
||||
return ((m_eeprom->read_bit()<<4) & 0x10);
|
||||
}
|
||||
|
||||
static I8255A_INTERFACE( ppi8255_intf )
|
||||
|
@ -282,7 +282,6 @@ WRITE32_MEMBER(gaelco3d_state::irq_ack32_w)
|
||||
|
||||
READ16_MEMBER(gaelco3d_state::eeprom_data_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
UINT32 result = 0xffff;
|
||||
|
||||
if (ACCESSING_BITS_0_7)
|
||||
@ -293,8 +292,7 @@ READ16_MEMBER(gaelco3d_state::eeprom_data_r)
|
||||
result |= gaelco_serial_status_r(machine().device("serial"), space, 0);
|
||||
}
|
||||
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
if (eeprom->read_bit())
|
||||
if (m_eeprom->read_bit())
|
||||
result ^= 0x0004;
|
||||
if (LOG)
|
||||
logerror("eeprom_data_r(%02X)\n", result);
|
||||
@ -321,11 +319,9 @@ READ32_MEMBER(gaelco3d_state::eeprom_data32_r)
|
||||
|
||||
WRITE16_MEMBER(gaelco3d_state::eeprom_data_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01);
|
||||
m_eeprom->write_bit(data & 0x01);
|
||||
}
|
||||
else if (mem_mask != 0xffff)
|
||||
logerror("write mask: %08x data %08x\n", mem_mask, data);
|
||||
@ -334,22 +330,18 @@ WRITE16_MEMBER(gaelco3d_state::eeprom_data_w)
|
||||
|
||||
WRITE16_MEMBER(gaelco3d_state::eeprom_clock_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WRITE16_MEMBER(gaelco3d_state::eeprom_cs_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,26 +35,22 @@ To Do:
|
||||
|
||||
READ16_MEMBER(galpani2_state::galpani2_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return (m_eeprom_word & ~1) | (eeprom->read_bit() & 1);
|
||||
return (m_eeprom_word & ~1) | (m_eeprom->read_bit() & 1);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(galpani2_state::galpani2_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
COMBINE_DATA( &m_eeprom_word );
|
||||
if ( ACCESSING_BITS_0_7 )
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x02);
|
||||
m_eeprom->write_bit(data & 0x02);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x08) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_cs_line((data & 0x08) ? CLEAR_LINE : ASSERT_LINE );
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,8 @@ public:
|
||||
m_tmapscroll2(*this, "tmapscroll2"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_gdfs_st0020(*this, "st0020_spr"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
virtual void machine_start()
|
||||
{
|
||||
@ -130,6 +131,7 @@ public:
|
||||
optional_shared_ptr<UINT32> m_spriteram;
|
||||
optional_device<st0020_device> m_gdfs_st0020;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
DECLARE_WRITE32_MEMBER(darkhors_tmapram_w);
|
||||
DECLARE_WRITE32_MEMBER(darkhors_tmapram2_w);
|
||||
DECLARE_WRITE32_MEMBER(paletteram32_xBBBBBGGGGGRRRRR_dword_w);
|
||||
@ -286,21 +288,19 @@ UINT32 darkhors_state::screen_update_darkhors(screen_device &screen, bitmap_ind1
|
||||
|
||||
WRITE32_MEMBER(darkhors_state::darkhors_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (data & ~0xff000000)
|
||||
logerror("%s: Unknown EEPROM bit written %08X\n",machine().describe_context(),data);
|
||||
|
||||
if ( ACCESSING_BITS_24_31 )
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x04000000);
|
||||
m_eeprom->write_bit(data & 0x04000000);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x01000000) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_cs_line((data & 0x01000000) ? CLEAR_LINE : ASSERT_LINE );
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x02000000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x02000000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,8 @@ public:
|
||||
konamigv_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_am53cf96(*this, "scsi:am53cf96"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_device<am53cf96_device> m_am53cf96;
|
||||
|
||||
@ -174,17 +175,16 @@ public:
|
||||
void scsi_dma_read( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_size );
|
||||
void scsi_dma_write( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_size );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
/* EEPROM handlers */
|
||||
|
||||
WRITE32_MEMBER(konamigv_state::eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit((data&0x01) ? 1 : 0);
|
||||
eeprom->set_clock_line((data&0x04) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom->set_cs_line((data&0x02) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->write_bit((data&0x01) ? 1 : 0);
|
||||
m_eeprom->set_clock_line((data&0x04) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_cs_line((data&0x02) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(konamigv_state::mb89371_w)
|
||||
|
@ -1208,26 +1208,21 @@ READ16_MEMBER(metro_state::gakusai_input_r)
|
||||
|
||||
READ16_MEMBER(metro_state::gakusai_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return eeprom->read_bit() & 1;
|
||||
return m_eeprom->read_bit() & 1;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(metro_state::gakusai_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
|
||||
// latch the bit
|
||||
eeprom->write_bit(BIT(data, 0));
|
||||
m_eeprom->write_bit(BIT(data, 0));
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line(BIT(data, 2) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_cs_line(BIT(data, 2) ? CLEAR_LINE : ASSERT_LINE );
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line(BIT(data, 1) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line(BIT(data, 1) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1310,38 +1305,32 @@ ADDRESS_MAP_END
|
||||
|
||||
READ16_MEMBER(metro_state::dokyusp_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line(CLEAR_LINE);
|
||||
eeprom->set_clock_line(ASSERT_LINE);
|
||||
m_eeprom->set_clock_line(CLEAR_LINE);
|
||||
m_eeprom->set_clock_line(ASSERT_LINE);
|
||||
|
||||
return eeprom->read_bit() & 1;
|
||||
return m_eeprom->read_bit() & 1;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(metro_state::dokyusp_eeprom_bit_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(BIT(data, 0));
|
||||
m_eeprom->write_bit(BIT(data, 0));
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line(CLEAR_LINE);
|
||||
eeprom->set_clock_line(ASSERT_LINE);
|
||||
m_eeprom->set_clock_line(CLEAR_LINE);
|
||||
m_eeprom->set_clock_line(ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(metro_state::dokyusp_eeprom_reset_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
// reset line asserted: reset.
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_cs_line(BIT(data, 0) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line(BIT(data, 0) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,8 @@ public:
|
||||
midas_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_gfxregs(*this, "gfxregs"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
UINT16 *m_gfxram;
|
||||
required_shared_ptr<UINT16> m_gfxregs;
|
||||
@ -83,6 +84,7 @@ public:
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE_LINE_MEMBER(livequiz_irqhandler);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -212,18 +214,16 @@ UINT32 midas_state::screen_update_midas(screen_device &screen, bitmap_ind16 &bit
|
||||
|
||||
WRITE16_MEMBER(midas_state::midas_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x04);
|
||||
m_eeprom->write_bit(data & 0x04);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE );
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,23 +106,17 @@ READ8_MEMBER(mitchell_state::pang_port5_r)
|
||||
|
||||
WRITE8_MEMBER(mitchell_state::eeprom_cs_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_cs_line(data ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line(data ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mitchell_state::eeprom_clock_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line(data ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line(data ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mitchell_state::eeprom_serial_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data);
|
||||
m_eeprom->write_bit(data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,11 +103,9 @@ static const eeprom_interface eeprom_intf =
|
||||
|
||||
READ32_MEMBER(polygonet_state::polygonet_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_15)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return 0x0200 | (eeprom->read_bit() << 8);
|
||||
return 0x0200 | (m_eeprom->read_bit() << 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -131,10 +131,11 @@ class pntnpuzl_state : public driver_device
|
||||
public:
|
||||
pntnpuzl_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this,"maincpu")
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_eeprom(*this, "eeprom")
|
||||
{ }
|
||||
|
||||
UINT16 m_eeprom;
|
||||
UINT16 m_eeprom_data;
|
||||
UINT16 m_pntpzl_200000;
|
||||
UINT16 m_serial;
|
||||
UINT16 m_serial_out;
|
||||
@ -153,6 +154,7 @@ public:
|
||||
DECLARE_READ16_MEMBER(pntnpuzl_eeprom_r);
|
||||
DECLARE_WRITE16_MEMBER(pntnpuzl_eeprom_w);
|
||||
DECLARE_DRIVER_INIT(pip);
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -170,25 +172,21 @@ static const eeprom_interface eeprom_intf =
|
||||
|
||||
READ16_MEMBER(pntnpuzl_state::pntnpuzl_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
/* bit 11 is EEPROM data */
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return (m_eeprom & 0xf4ff) | (eeprom->read_bit()<<11) | (ioport("IN1")->read() & 0x0300);
|
||||
return (m_eeprom_data & 0xf4ff) | (m_eeprom->read_bit()<<11) | (ioport("IN1")->read() & 0x0300);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(pntnpuzl_state::pntnpuzl_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
m_eeprom = data;
|
||||
m_eeprom_data = data;
|
||||
|
||||
/* bit 12 is data */
|
||||
/* bit 13 is clock (active high) */
|
||||
/* bit 14 is cs (active high) */
|
||||
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x1000);
|
||||
eeprom->set_cs_line((data & 0x4000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
eeprom->set_clock_line((data & 0x2000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit(data & 0x1000);
|
||||
m_eeprom->set_cs_line((data & 0x4000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x2000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -165,13 +165,11 @@ static const eeprom_interface eeprom_interface_93C56 =
|
||||
|
||||
WRITE32_MEMBER(psikyo4_state::ps4_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_16_31)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit((data & 0x00200000) ? 1 : 0);
|
||||
eeprom->set_cs_line((data & 0x00800000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
eeprom->set_clock_line((data & 0x00400000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit((data & 0x00200000) ? 1 : 0);
|
||||
m_eeprom->set_cs_line((data & 0x00800000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x00400000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -321,13 +321,11 @@ static const eeprom_interface eeprom_interface_93C56 =
|
||||
|
||||
WRITE32_MEMBER(psikyosh_state::psh_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit((data & 0x20000000) ? 1 : 0);
|
||||
eeprom->set_cs_line((data & 0x80000000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
eeprom->set_clock_line((data & 0x40000000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit((data & 0x20000000) ? 1 : 0);
|
||||
m_eeprom->set_cs_line((data & 0x80000000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x40000000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -31,7 +31,8 @@ public:
|
||||
m_txt_videoram(*this, "txt_videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_oki(*this, "oki") { }
|
||||
m_oki(*this, "oki"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT16> m_video_regs;
|
||||
@ -64,6 +65,7 @@ public:
|
||||
UINT32 screen_update_pzletime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<okim6295_device> m_oki;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -167,13 +169,11 @@ WRITE16_MEMBER(pzletime_state::txt_videoram_w)
|
||||
|
||||
WRITE16_MEMBER(pzletime_state::eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01);
|
||||
eeprom->set_cs_line((data & 0x02) ? CLEAR_LINE : ASSERT_LINE );
|
||||
eeprom->set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->write_bit(data & 0x01);
|
||||
m_eeprom->set_cs_line((data & 0x02) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,8 @@ public:
|
||||
m_md_vram(*this, "md_vram"),
|
||||
m_fg_vram(*this, "fg_vram"),
|
||||
m_tx_vram(*this, "tx_vram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
DECLARE_WRITE16_MEMBER(rdx_bg_vram_w);
|
||||
@ -74,6 +75,7 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(rdx_v33_interrupt);
|
||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -270,13 +272,11 @@ UINT32 r2dx_v33_state::screen_update_rdx_v33(screen_device &screen, bitmap_ind16
|
||||
|
||||
WRITE16_MEMBER(r2dx_v33_state::rdx_v33_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom->write_bit(data & 0x20);
|
||||
eeprom->set_cs_line((data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit(data & 0x20);
|
||||
m_eeprom->set_cs_line((data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
if (data&0xc7) logerror("eeprom_w extra bits used %04x\n",data);
|
||||
}
|
||||
|
@ -100,7 +100,8 @@ public:
|
||||
m_spriteregs(*this, "spriteregs"),
|
||||
m_blitterregs(*this, "blitterregs"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT32> m_viewregs0;
|
||||
required_shared_ptr<UINT32> m_viewregs6;
|
||||
@ -147,6 +148,7 @@ public:
|
||||
void rabbit_drawtilemap( bitmap_ind16 &bitmap, const rectangle &cliprect, int whichtilemap );
|
||||
void rabbit_do_blit();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -671,20 +673,18 @@ WRITE32_MEMBER(rabbit_state::rabbit_blitter_w)
|
||||
|
||||
WRITE32_MEMBER(rabbit_state::rabbit_eeprom_write)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// don't disturb the EEPROM if we're not actually writing to it
|
||||
// (in particular, data & 0x100 here with mask = ffff00ff looks to be the watchdog)
|
||||
if (mem_mask == 0xff000000)
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01000000);
|
||||
m_eeprom->write_bit(data & 0x01000000);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x04000000) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_cs_line((data & 0x04000000) ? CLEAR_LINE : ASSERT_LINE );
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x02000000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x02000000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,8 @@ public:
|
||||
m_gms_vidram2(*this, "gms_vidram2"),
|
||||
m_gms_vidram(*this, "gms_vidram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_mcu(*this, "mcu") { }
|
||||
m_mcu(*this, "mcu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_gms_vidram2;
|
||||
required_shared_ptr<UINT16> m_gms_vidram;
|
||||
@ -84,6 +85,7 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(mcu_irq);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_mcu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -108,15 +110,13 @@ WRITE16_MEMBER(rbmk_state::gms_write3)
|
||||
|
||||
WRITE16_MEMBER(rbmk_state::eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
//bad ?
|
||||
if( ACCESSING_BITS_0_7 )
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x04);
|
||||
eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE:ASSERT_LINE );
|
||||
m_eeprom->write_bit(data & 0x04);
|
||||
m_eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE:ASSERT_LINE );
|
||||
|
||||
eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -866,17 +866,15 @@ READ32_MEMBER(seibuspi_state::spi_unknown_r)
|
||||
|
||||
WRITE32_MEMBER(seibuspi_state::eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
okim6295_device *oki2 = machine().device<okim6295_device>("oki2");
|
||||
|
||||
// tile banks
|
||||
if( ACCESSING_BITS_16_23 ) {
|
||||
rf2_set_layer_banks(data >> 16);
|
||||
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit((data & 0x800000) ? 1 : 0);
|
||||
eeprom->set_clock_line((data & 0x400000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom->set_cs_line((data & 0x200000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->write_bit((data & 0x800000) ? 1 : 0);
|
||||
m_eeprom->set_clock_line((data & 0x400000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x200000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
// oki banking
|
||||
@ -1101,11 +1099,9 @@ WRITE_LINE_MEMBER(seibuspi_state::irqhandler)
|
||||
|
||||
WRITE32_MEMBER(seibuspi_state::sys386f2_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit((data & 0x80) ? 1 : 0);
|
||||
eeprom->set_clock_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom->set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->write_bit((data & 0x80) ? 1 : 0);
|
||||
m_eeprom->set_clock_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
static const ymf271_interface ymf271_config =
|
||||
|
@ -182,18 +182,14 @@ ADDRESS_MAP_END
|
||||
|
||||
READ16_MEMBER(seta2_state::gundamex_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return ((eeprom->read_bit() & 1)) << 3;
|
||||
return ((m_eeprom->read_bit() & 1)) << 3;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(seta2_state::gundamex_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line((data & 0x2) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom->write_bit(data & 0x1);
|
||||
eeprom->set_cs_line((data & 0x4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x2) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit(data & 0x1);
|
||||
m_eeprom->set_cs_line((data & 0x4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( gundamex_map, AS_PROGRAM, 16, seta2_state )
|
||||
|
@ -103,11 +103,13 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_nvram(*this, "nvram"){ }
|
||||
m_nvram(*this, "nvram"),
|
||||
m_eeprom(*this, "eeprom"){ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_shared_ptr<UINT8> m_spriteram;
|
||||
required_shared_ptr<UINT8> m_nvram;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
|
||||
UINT8 m_reg;
|
||||
UINT8 m_rombank;
|
||||
@ -443,17 +445,15 @@ void sigmab98_state::show_outputs()
|
||||
// Port c0
|
||||
WRITE8_MEMBER(sigmab98_state::eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x40);
|
||||
m_eeprom->write_bit(data & 0x40);
|
||||
|
||||
// reset line asserted: reset.
|
||||
// if ((m_c0 ^ data) & 0x20)
|
||||
eeprom->set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
m_c0 = data;
|
||||
//show_outputs(state);
|
||||
@ -644,23 +644,19 @@ READ8_MEMBER(sigmab98_state::animalc_rambank_r)
|
||||
|
||||
READ8_MEMBER(sigmab98_state::sammymdl_eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return eeprom->read_bit() ? 0x80 : 0;
|
||||
return m_eeprom->read_bit() ? 0x80 : 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(sigmab98_state::sammymdl_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x40);
|
||||
m_eeprom->write_bit(data & 0x40);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
if (data & 0x8f)
|
||||
logerror("%s: unknown eeeprom bits written %02x\n", machine().describe_context(), data);
|
||||
|
@ -102,7 +102,8 @@ public:
|
||||
m_main(*this, "mainram"),
|
||||
m_vram(*this, "vram"),
|
||||
m_cram(*this, "cram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_main;
|
||||
required_shared_ptr<UINT8> m_vram;
|
||||
@ -120,6 +121,7 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_spool99(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
TILE_GET_INFO_MEMBER(spool99_state::get_spool99_tile_info)
|
||||
@ -194,26 +196,20 @@ READ8_MEMBER(spool99_state::spool99_io_r)
|
||||
|
||||
WRITE8_MEMBER(spool99_state::eeprom_resetline_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// reset line asserted: reset.
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE );
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(spool99_state::eeprom_clockline_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(spool99_state::eeprom_dataline_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01);
|
||||
m_eeprom->write_bit(data & 0x01);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( spool99_map, AS_PROGRAM, 8, spool99_state )
|
||||
|
@ -76,13 +76,11 @@ TO DO :
|
||||
|
||||
WRITE16_MEMBER(stlforce_state::eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if( ACCESSING_BITS_0_7 )
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01);
|
||||
eeprom->set_cs_line((data & 0x02) ? CLEAR_LINE : ASSERT_LINE );
|
||||
eeprom->set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->write_bit(data & 0x01);
|
||||
m_eeprom->set_cs_line((data & 0x02) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -269,20 +269,16 @@ READ16_MEMBER(tecmosys_state::unk880000_r)
|
||||
|
||||
READ16_MEMBER(tecmosys_state::eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return ((eeprom->read_bit() & 0x01) << 11);
|
||||
return ((m_eeprom->read_bit() & 0x01) << 11);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(tecmosys_state::eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if ( ACCESSING_BITS_8_15 )
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x0800);
|
||||
eeprom->set_cs_line((data & 0x0200) ? CLEAR_LINE : ASSERT_LINE );
|
||||
eeprom->set_clock_line((data & 0x0400) ? CLEAR_LINE: ASSERT_LINE );
|
||||
m_eeprom->write_bit(data & 0x0800);
|
||||
m_eeprom->set_cs_line((data & 0x0200) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x0400) ? CLEAR_LINE: ASSERT_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,8 @@ public:
|
||||
m_tilemap_regs(*this, "tilemap_regs"),
|
||||
m_spriteregs(*this, "spriteregs"),
|
||||
m_spriteram(*this, "spriteram") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr_array<UINT32, 4> m_tilemap_regs;
|
||||
required_shared_ptr<UINT32> m_spriteregs;
|
||||
@ -77,6 +78,7 @@ public:
|
||||
void ttmjprd_draw_tilemap(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32*tileram, UINT32*tileregs, UINT8*rom );
|
||||
void tmmjprd_do_blit();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -499,7 +501,6 @@ WRITE32_MEMBER(tmmjprd_state::tmmjprd_blitter_w)
|
||||
|
||||
WRITE32_MEMBER(tmmjprd_state::tmmjprd_eeprom_write)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
// don't disturb the EEPROM if we're not actually writing to it
|
||||
// (in particular, data & 0x100 here with mask = ffff00ff looks to be the watchdog)
|
||||
if (mem_mask == 0x000000ff)
|
||||
@ -508,14 +509,13 @@ WRITE32_MEMBER(tmmjprd_state::tmmjprd_eeprom_write)
|
||||
if (mem_mask == 0xff000000)
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01000000);
|
||||
m_eeprom->write_bit(data & 0x01000000);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x04000000) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_cs_line((data & 0x04000000) ? CLEAR_LINE : ASSERT_LINE );
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x02000000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x02000000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,21 +198,19 @@ WRITE32_MEMBER(unico_state::zeropnt2_leds_w)
|
||||
|
||||
WRITE32_MEMBER(unico_state::zeropnt2_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if (data & ~0xfe00000)
|
||||
logerror("%s - Unknown EEPROM bit written %04X\n",machine().describe_context(),data);
|
||||
|
||||
if ( ACCESSING_BITS_24_31 )
|
||||
{
|
||||
// latch the bit
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x04000000);
|
||||
m_eeprom->write_bit(data & 0x04000000);
|
||||
|
||||
// reset line asserted: reset.
|
||||
eeprom->set_cs_line((data & 0x01000000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x01000000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// clock line asserted: write latch or select next bit to read
|
||||
eeprom->set_clock_line((data & 0x02000000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x02000000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,8 @@ public:
|
||||
m_wram32(*this,"wram32"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_oki(*this, "oki"),
|
||||
m_oki2(*this, "oki_2") {
|
||||
m_oki2(*this, "oki_2"),
|
||||
m_eeprom(*this, "eeprom") {
|
||||
m_has_extra_gfx = 0;
|
||||
}
|
||||
|
||||
@ -171,15 +172,14 @@ public:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<okim6295_device> m_oki;
|
||||
optional_device<okim6295_device> m_oki2;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
||||
READ16_MEMBER(vamphalf_state::eeprom_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if(offset)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return eeprom->read_bit();
|
||||
return m_eeprom->read_bit();
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
@ -187,20 +187,16 @@ READ16_MEMBER(vamphalf_state::eeprom_r)
|
||||
|
||||
READ32_MEMBER(vamphalf_state::eeprom32_r)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
return eeprom->read_bit();
|
||||
return m_eeprom->read_bit();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(vamphalf_state::eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
if(offset)
|
||||
{
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01);
|
||||
eeprom->set_cs_line((data & 0x04) ? CLEAR_LINE : ASSERT_LINE );
|
||||
eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->write_bit(data & 0x01);
|
||||
m_eeprom->set_cs_line((data & 0x04) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
|
||||
|
||||
// data & 8?
|
||||
}
|
||||
@ -208,20 +204,16 @@ WRITE16_MEMBER(vamphalf_state::eeprom_w)
|
||||
|
||||
WRITE32_MEMBER(vamphalf_state::eeprom32_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01);
|
||||
eeprom->set_cs_line((data & 0x04) ? CLEAR_LINE : ASSERT_LINE );
|
||||
eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->write_bit(data & 0x01);
|
||||
m_eeprom->set_cs_line((data & 0x04) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(vamphalf_state::finalgdr_eeprom_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x4000);
|
||||
eeprom->set_cs_line((data & 0x1000) ? CLEAR_LINE : ASSERT_LINE );
|
||||
eeprom->set_clock_line((data & 0x2000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
m_eeprom->write_bit(data & 0x4000);
|
||||
m_eeprom->set_cs_line((data & 0x1000) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_eeprom->set_clock_line((data & 0x2000) ? ASSERT_LINE : CLEAR_LINE );
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(vamphalf_state::flipscreen_w)
|
||||
|
@ -766,7 +766,6 @@ void wheelfir_state::machine_reset()
|
||||
void wheelfir_state::machine_start()
|
||||
{
|
||||
m_screen = machine().device("screen");
|
||||
m_eeprom = machine().device("eeprom");
|
||||
|
||||
m_zoom_table = auto_alloc_array(machine(), INT32, ZOOM_TABLE_SIZE);
|
||||
m_blitter_data = auto_alloc_array(machine(), UINT16, 16);
|
||||
|
@ -46,26 +46,20 @@ EEPROM chip: 93C46
|
||||
|
||||
WRITE16_MEMBER(xorworld_state::eeprom_chip_select_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
/* bit 0 is CS (active low) */
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(xorworld_state::eeprom_serial_clock_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
/* bit 0 is SK (active high) */
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(xorworld_state::eeprom_data_w)
|
||||
{
|
||||
device_t *device = machine().device("eeprom");
|
||||
/* bit 0 is EEPROM data (DIN) */
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(device);
|
||||
eeprom->write_bit(data & 0x01);
|
||||
m_eeprom->write_bit(data & 0x01);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(xorworld_state::xorworld_irq2_ack_w)
|
||||
|
@ -5,7 +5,7 @@
|
||||
driver by Nicola Salmoria
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class _20pacgal_state : public driver_device
|
||||
{
|
||||
@ -17,7 +17,8 @@ public:
|
||||
m_stars_seed(*this, "stars_seed"),
|
||||
m_stars_ctrl(*this, "stars_ctrl"),
|
||||
m_flip(*this, "flip"),
|
||||
m_maincpu(*this, "maincpu"){ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_video_ram;
|
||||
@ -31,7 +32,7 @@ public:
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
device_t *m_eeprom;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
|
||||
/* memory */
|
||||
UINT8 m_sprite_gfx_ram[0x2000];
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
optional_device<timer_device> m_schaser_effect_555_timer;
|
||||
optional_device<timer_device> m_claybust_gun_on;
|
||||
optional_device<discrete_device> m_discrete;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
optional_device<speaker_sound_device> m_speaker;
|
||||
|
||||
|
||||
/* misc game specific */
|
||||
|
@ -3,6 +3,7 @@
|
||||
Cave hardware
|
||||
|
||||
***************************************************************************/
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
struct sprite_cave
|
||||
{
|
||||
@ -35,7 +36,8 @@ public:
|
||||
m_mirror_ram(*this, "mirror_ram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_int_timer(*this, "int_timer") { }
|
||||
m_int_timer(*this, "int_timer"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT16> m_videoregs;
|
||||
@ -210,4 +212,5 @@ public:
|
||||
void sailormn_tilebank_w(int bank);
|
||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||
DECLARE_WRITE_LINE_MEMBER(sound_irq_gen);
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "audio/decobsmt.h"
|
||||
#include "video/bufsprite.h"
|
||||
#include "video/decospr.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class deco32_state : public driver_device
|
||||
{
|
||||
@ -19,7 +20,8 @@ public:
|
||||
m_ace_ram(*this, "ace_ram"),
|
||||
m_sprgen(*this, "spritegen"),
|
||||
m_sprgen1(*this, "spritegen1"),
|
||||
m_sprgen2(*this, "spritegen2")
|
||||
m_sprgen2(*this, "spritegen2"),
|
||||
m_eeprom(*this, "eeprom")
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -37,6 +39,8 @@ public:
|
||||
optional_device<decospr_device> m_sprgen;
|
||||
optional_device<decospr_device> m_sprgen1;
|
||||
optional_device<decospr_device> m_sprgen2;
|
||||
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
|
||||
int m_raster_enable;
|
||||
timer_device *m_raster_irq_timer;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class deco_mlc_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -7,7 +9,8 @@ public:
|
||||
m_irq_ram(*this, "irq_ram"),
|
||||
m_mlc_clip_ram(*this, "mlc_clip_ram"),
|
||||
m_mlc_vram(*this, "mlc_vram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT32> m_mlc_ram;
|
||||
required_shared_ptr<UINT32> m_irq_ram;
|
||||
@ -60,4 +63,5 @@ public:
|
||||
void draw_sprites( const rectangle &cliprect, int scanline, UINT32* dest);
|
||||
void descramble_sound( );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "video/bufsprite.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class gaelco2_state : public driver_device
|
||||
{
|
||||
@ -9,12 +10,14 @@ public:
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_spriteram(*this,"spriteram"),
|
||||
m_vregs(*this, "vregs"),
|
||||
m_snowboar_protection(*this, "snowboar_prot"){ }
|
||||
m_snowboar_protection(*this, "snowboar_prot"),
|
||||
m_eeprom(*this, "eeprom"){ }
|
||||
|
||||
required_device<m68000_device> m_maincpu;
|
||||
required_device<buffered_spriteram16_device> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_vregs;
|
||||
optional_shared_ptr<UINT16> m_snowboar_protection;
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
|
||||
int m_clr_gun_int;
|
||||
UINT8 m_analog_ports[2];
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "sound/dmadac.h"
|
||||
#include "video/polynew.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
#define SOUND_CHANNELS 4
|
||||
|
||||
@ -57,7 +58,8 @@ public:
|
||||
m_tms_comm_base(*this,"tms_comm_base",0),
|
||||
m_adsp_control_regs(*this,"adsp_regs"),
|
||||
m_adsp_fastram_base(*this,"adsp_fastram") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT32> m_adsp_ram_base;
|
||||
required_shared_ptr<UINT16> m_m68k_ram_base;
|
||||
@ -122,4 +124,5 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(adsp_autobuffer_irq);
|
||||
void gaelco3d_render(screen_device &screen);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "video/kaneko_spr.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class galpani2_state : public driver_device
|
||||
{
|
||||
@ -18,7 +19,8 @@ public:
|
||||
m_subcpu(*this,"sub"),
|
||||
m_kaneko_spr(*this, "kan_spr"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_oki2(*this, "oki2")
|
||||
m_oki2(*this, "oki2"),
|
||||
m_eeprom(*this, "eeprom")
|
||||
{ }
|
||||
|
||||
required_shared_ptr_array<UINT16, 2> m_bg8;
|
||||
@ -69,4 +71,5 @@ public:
|
||||
|
||||
DECLARE_WRITE16_MEMBER( galpani2_bg15_w );
|
||||
required_device<okim6295_device> m_oki2;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -5,6 +5,7 @@
|
||||
*************************************************************************/
|
||||
|
||||
#include "devlegcy.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
#define LELAND_BATTERY_RAM_SIZE 0x4000
|
||||
#define ATAXX_EXTRA_TRAM_SIZE 0x800
|
||||
@ -24,10 +25,12 @@ public:
|
||||
leland_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_master(*this, "master"),
|
||||
m_slave(*this, "slave") { }
|
||||
m_slave(*this, "slave"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_device<cpu_device> m_master;
|
||||
required_device<cpu_device> m_slave;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
|
||||
UINT8 m_dac_control;
|
||||
UINT8 *m_alleymas_kludge_mem;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "sound/okim6295.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "video/konicdev.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class metro_state : public driver_device
|
||||
{
|
||||
@ -33,7 +34,8 @@ public:
|
||||
m_videoregs(*this, "videoregs"),
|
||||
m_screenctrl(*this, "screenctrl"),
|
||||
m_input_sel(*this, "input_sel"),
|
||||
m_k053936_ram(*this, "k053936_ram")
|
||||
m_k053936_ram(*this, "k053936_ram"),
|
||||
m_eeprom(*this, "eeprom")
|
||||
{ }
|
||||
|
||||
/* devices */
|
||||
@ -60,6 +62,8 @@ public:
|
||||
optional_shared_ptr<UINT16> m_screenctrl;
|
||||
optional_shared_ptr<UINT16> m_input_sel;
|
||||
optional_shared_ptr<UINT16> m_k053936_ram;
|
||||
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
|
||||
|
||||
int m_flip_screen;
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class mitchell_state : public driver_device
|
||||
{
|
||||
@ -17,7 +18,8 @@ public:
|
||||
m_oki(*this, "oki") ,
|
||||
m_nvram(*this, "nvram"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_videoram(*this, "videoram"){ }
|
||||
m_videoram(*this, "videoram"),
|
||||
m_eeprom(*this, "eeprom"){ }
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -27,6 +29,8 @@ public:
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_colorram;
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_bg_tilemap;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
static const UINT16 dsp56k_bank00_size = 0x1000;
|
||||
static const UINT16 dsp56k_bank01_size = 0x1000;
|
||||
static const UINT16 dsp56k_bank02_size = 0x4000;
|
||||
@ -13,7 +15,8 @@ public:
|
||||
m_dsp56k_p_mirror(*this, "dsp56k_p_mirror"),
|
||||
m_dsp56k_p_8000(*this, "dsp56k_p_8000"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_soundcpu(*this, "soundcpu") { }
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
/* 68k-side shared ram */
|
||||
required_shared_ptr<UINT32> m_shared_ram;
|
||||
@ -80,4 +83,5 @@ public:
|
||||
void reset_sound_region();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_soundcpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
*************************************************************************/
|
||||
|
||||
#define MASTER_CLOCK 57272700 // main oscillator frequency
|
||||
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class psikyo4_state : public driver_device
|
||||
{
|
||||
@ -19,7 +19,8 @@ public:
|
||||
m_paletteram(*this, "paletteram"),
|
||||
m_io_select(*this, "io_select"),
|
||||
m_ram(*this, "ram"),
|
||||
m_maincpu(*this, "maincpu"){ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom"){ }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT32> m_spriteram;
|
||||
@ -36,6 +37,8 @@ public:
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
|
||||
DECLARE_WRITE32_MEMBER(ps4_paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w);
|
||||
DECLARE_WRITE32_MEMBER(ps4_bgpen_1_dword_w);
|
||||
DECLARE_WRITE32_MEMBER(ps4_bgpen_2_dword_w);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "video/bufsprite.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
#define MASTER_CLOCK 57272700 // main oscillator frequency
|
||||
|
||||
@ -28,7 +29,8 @@ public:
|
||||
m_zoomram(*this, "zoomram"),
|
||||
m_vidregs(*this, "vidregs"),
|
||||
m_ram(*this, "ram"),
|
||||
m_maincpu(*this, "maincpu"){ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom"){ }
|
||||
|
||||
/* memory pointers */
|
||||
required_device<buffered_spriteram32_device> m_spriteram;
|
||||
@ -47,6 +49,7 @@ public:
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
|
||||
DECLARE_WRITE32_MEMBER(psikyosh_irqctrl_w);
|
||||
DECLARE_WRITE32_MEMBER(paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "machine/intelfsh.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
#define FIFO_SIZE 512
|
||||
|
||||
@ -10,7 +11,8 @@ public:
|
||||
m_spi_scrollram(*this, "spi_scrollram"),
|
||||
m_spimainram(*this, "spimainram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_soundcpu(*this, "soundcpu") { }
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
optional_shared_ptr<UINT32> m_spi_scrollram;
|
||||
required_shared_ptr<UINT32> m_spimainram;
|
||||
@ -135,6 +137,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_soundcpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
/*----------- defined in machine/spisprit.c -----------*/
|
||||
void seibuspi_sprite_decrypt(UINT8 *src, int romsize);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "sound/okim9810.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class seta2_state : public driver_device
|
||||
{
|
||||
@ -12,7 +13,8 @@ public:
|
||||
m_coldfire_regs(*this, "coldfire_regs"),
|
||||
m_funcube_outputs(*this, "funcube_outputs"),
|
||||
m_funcube_leds(*this, "funcube_leds"),
|
||||
m_oki(*this, "oki"){ }
|
||||
m_oki(*this, "oki"),
|
||||
m_eeprom(*this, "eeprom"){ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_shared_ptr<UINT16> m_nvram;
|
||||
@ -81,4 +83,5 @@ public:
|
||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
void funcube_debug_outputs();
|
||||
optional_device<okim9810_device> m_oki;
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class stlforce_state : public driver_device
|
||||
{
|
||||
@ -15,7 +16,8 @@ public:
|
||||
m_vidattrram(*this, "vidattrram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_oki(*this, "oki") { }
|
||||
m_oki(*this, "oki"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
tilemap_t *m_bg_tilemap;
|
||||
tilemap_t *m_mlow_tilemap;
|
||||
@ -51,4 +53,5 @@ public:
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<okim6295_device> m_oki;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -3,6 +3,7 @@
|
||||
tecmosys protection simulation
|
||||
|
||||
***************************************************************************/
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class tecmosys_state : public driver_device
|
||||
{
|
||||
@ -24,7 +25,8 @@ public:
|
||||
m_c80000regs(*this, "c80000regs"),
|
||||
m_880000regs(*this, "880000regs"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu") { }
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_tilemap_paletteram16;
|
||||
@ -92,4 +94,5 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(sound_irq);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class unico_state : public driver_device
|
||||
{
|
||||
@ -11,7 +12,8 @@ public:
|
||||
m_scroll32(*this, "scroll32"),
|
||||
m_spriteram(*this, "spriteram", 0),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_oki(*this, "oki") { }
|
||||
m_oki(*this, "oki"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
optional_shared_ptr<UINT16> m_vram;
|
||||
optional_shared_ptr<UINT16> m_scroll;
|
||||
@ -50,4 +52,5 @@ public:
|
||||
void zeropnt2_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<okim6295_device> m_oki;
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "machine/eeprom.h"
|
||||
|
||||
class xorworld_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -5,7 +7,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
@ -23,4 +26,5 @@ public:
|
||||
UINT32 screen_update_xorworld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -263,22 +263,19 @@ WRITE16_MEMBER(gaelco2_state::wrally2_adc_cs)
|
||||
WRITE16_MEMBER(gaelco2_state::gaelco2_eeprom_cs_w)
|
||||
{
|
||||
/* bit 0 is CS (active low) */
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(machine().device("eeprom"));
|
||||
eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_eeprom->set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(gaelco2_state::gaelco2_eeprom_sk_w)
|
||||
{
|
||||
/* bit 0 is SK (active high) */
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(machine().device("eeprom"));
|
||||
eeprom->set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(gaelco2_state::gaelco2_eeprom_data_w)
|
||||
{
|
||||
/* bit 0 is EEPROM data (DIN) */
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(machine().device("eeprom"));
|
||||
eeprom->write_bit(data & 0x01);
|
||||
m_eeprom->write_bit(data & 0x01);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -820,10 +820,9 @@ WRITE8_MEMBER(leland_state::ataxx_eeprom_w)
|
||||
{
|
||||
if (LOG_EEPROM) logerror("%s:EE write %d%d%d\n", machine().describe_context(),
|
||||
(data >> 6) & 1, (data >> 5) & 1, (data >> 4) & 1);
|
||||
eeprom_device *eeprom = downcast<eeprom_device *>(machine().device("eeprom"));
|
||||
eeprom->write_bit ((data & 0x10) >> 4);
|
||||
eeprom->set_clock_line((data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
|
||||
eeprom->set_cs_line ((~data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->write_bit ((data & 0x10) >> 4);
|
||||
m_eeprom->set_clock_line((data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->set_cs_line ((~data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user