diff options
-rw-r--r-- | src/devices/machine/74259.cpp | 21 | ||||
-rw-r--r-- | src/devices/machine/74259.h | 1 | ||||
-rw-r--r-- | src/mame/drivers/ddenlovr.cpp | 4 | ||||
-rw-r--r-- | src/mame/drivers/dynax.cpp | 17 | ||||
-rw-r--r-- | src/mame/drivers/gomoku.cpp | 9 | ||||
-rw-r--r-- | src/mame/includes/dynax.h | 10 | ||||
-rw-r--r-- | src/mame/includes/gomoku.h | 4 |
7 files changed, 32 insertions, 34 deletions
diff --git a/src/devices/machine/74259.cpp b/src/devices/machine/74259.cpp index e8632baf940..da6a7cfa99d 100644 --- a/src/devices/machine/74259.cpp +++ b/src/devices/machine/74259.cpp @@ -249,6 +249,27 @@ WRITE8_MEMBER(addressable_latch_device::write_d0) } //------------------------------------------------- +// write_d1 - bus-triggered write handler using +// second-lowest data bit +//------------------------------------------------- + +WRITE8_MEMBER(addressable_latch_device::write_d1) +{ + if (LOG_MYSTERY_BITS && data != 0x00 && data != 0x02 && data != 0xff) + logerror("Mystery bits written to Q%d:%s%s%s%s%s%s%s\n", + offset, + BIT(data, 7) ? " D7" : "", + BIT(data, 6) ? " D6" : "", + BIT(data, 5) ? " D5" : "", + BIT(data, 4) ? " D4" : "", + BIT(data, 3) ? " D3" : "", + BIT(data, 2) ? " D2" : "", + BIT(data, 0) ? " D0" : ""); + + write_bit(offset, BIT(data, 1)); +} + +//------------------------------------------------- // write_d7 - bus-triggered write handler using // MSB of (8-bit) data //------------------------------------------------- diff --git a/src/devices/machine/74259.h b/src/devices/machine/74259.h index 1569bb299ae..e4496240687 100644 --- a/src/devices/machine/74259.h +++ b/src/devices/machine/74259.h @@ -73,6 +73,7 @@ public: void write_bit(offs_t offset, bool d); void write_abcd(u8 a, bool d); DECLARE_WRITE8_MEMBER(write_d0); + DECLARE_WRITE8_MEMBER(write_d1); DECLARE_WRITE8_MEMBER(write_d7); DECLARE_WRITE8_MEMBER(write_a0); DECLARE_WRITE8_MEMBER(write_a3); diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp index bd2a59efc71..eef150a1cbd 100644 --- a/src/mame/drivers/ddenlovr.cpp +++ b/src/mame/drivers/ddenlovr.cpp @@ -118,6 +118,8 @@ Notes: #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "sound/ay8910.h" +#include "sound/ym2413.h" +#include "machine/74259.h" #include "machine/gen_latch.h" #include "machine/msm6242.h" #include "machine/nvram.h" @@ -4240,7 +4242,7 @@ static ADDRESS_MAP_START( htengoku_io_map, AS_IO, 8, ddenlovr_state ) AM_RANGE( 0xc4, 0xc4 ) AM_WRITE(dynax_blit_pen_w) // Destination Pen AM_RANGE( 0xc5, 0xc5 ) AM_WRITE(dynax_blit_dest_w) // Destination Layer AM_RANGE( 0xc6, 0xc6 ) AM_WRITE(htengoku_blit_romregion_w) // Blitter ROM bank - AM_RANGE( 0xe0, 0xe7 ) AM_WRITE(yarunara_mainlatch_w) + AM_RANGE( 0xe0, 0xe7 ) AM_DEVWRITE("mainlatch", ls259_device, write_d1) ADDRESS_MAP_END /*************************************************************************** diff --git a/src/mame/drivers/dynax.cpp b/src/mame/drivers/dynax.cpp index 5b184a5528d..e658cb0a0a3 100644 --- a/src/mame/drivers/dynax.cpp +++ b/src/mame/drivers/dynax.cpp @@ -85,9 +85,12 @@ TODO: #include "cpu/tlcs90/tlcs90.h" #include "cpu/z80/z80.h" #include "cpu/z80/tmpz84c015.h" +#include "machine/74259.h" +#include "machine/msm6242.h" #include "machine/nvram.h" #include "sound/ay8910.h" #include "sound/2203intf.h" +#include "sound/ym2413.h" #include "sound/3812intf.h" #include "rendlay.h" @@ -724,11 +727,6 @@ WRITE8_MEMBER(dynax_state::yarunara_rombank_w) m_bankdev->set_bank(data & 0x3f); } -WRITE8_MEMBER(dynax_state::yarunara_mainlatch_w) -{ - m_mainlatch->write_bit(offset, BIT(data, 1)); -} - WRITE8_MEMBER(dynax_state::yarunara_blit_romregion_w) { switch(data) @@ -758,7 +756,7 @@ static ADDRESS_MAP_START( yarunara_io_map, AS_IO, 8, dynax_state ) AM_RANGE( 0x4b, 0x4b ) AM_WRITE(dynax_vblank_ack_w) // VBlank IRQ Ack AM_RANGE( 0x4c, 0x4c ) AM_READ_PORT("DSW0") // DSW 1 AM_RANGE( 0x4f, 0x4f ) AM_READ_PORT("DSW1") // DSW 2 - AM_RANGE( 0x50, 0x57 ) AM_WRITE(yarunara_mainlatch_w) + AM_RANGE( 0x50, 0x57 ) AM_DEVWRITE("mainlatch", ls259_device, write_d1) AM_RANGE( 0x68, 0x68 ) AM_WRITE(dynax_blit_pen_w) // Destination Pen AM_RANGE( 0x69, 0x69 ) AM_WRITE(dynax_blit_dest_w) // Destination Layer AM_RANGE( 0x6a, 0x6a ) AM_WRITE(dynax_blit_palette01_w) // Layers Palettes @@ -1259,11 +1257,6 @@ WRITE8_MEMBER(dynax_state::tenkai_blit_romregion_w) logerror("%04x: unmapped romregion=%02X\n", space.device().safe_pc(), data); } -WRITE8_MEMBER(dynax_state::tenkai_mainlatch_w) -{ - m_mainlatch->write_bit(offset >> 2, BIT(data, 1)); -} - static ADDRESS_MAP_START( tenkai_map, AS_PROGRAM, 8, dynax_state ) AM_RANGE( 0x0000, 0x5fff ) AM_ROM AM_RANGE( 0x6000, 0x6fff ) AM_RAM @@ -1280,7 +1273,7 @@ static ADDRESS_MAP_START( tenkai_map, AS_PROGRAM, 8, dynax_state ) AM_RANGE( 0x10050, 0x10050 ) AM_WRITE(tenkai_priority_w) // layer priority and enable AM_RANGE( 0x10054, 0x10054 ) AM_WRITE(dynax_blit_backpen_w) // Background Color AM_RANGE( 0x10058, 0x10058 ) AM_WRITE(tenkai_blit_romregion_w) // Blitter ROM bank - AM_RANGE( 0x10060, 0x1007f ) AM_WRITE(tenkai_mainlatch_w) + AM_RANGE( 0x10060, 0x1007f ) AM_DEVWRITE_MOD("mainlatch", ls259_device, write_d1, rshift<2>) AM_RANGE( 0x100c0, 0x100c0 ) AM_WRITE(tenkai_ipsel_w) AM_RANGE( 0x100c1, 0x100c1 ) AM_WRITE(tenkai_ip_w) AM_RANGE( 0x100c2, 0x100c3 ) AM_READ(tenkai_ip_r) diff --git a/src/mame/drivers/gomoku.cpp b/src/mame/drivers/gomoku.cpp index 1bc20a04129..fb41bd94e17 100644 --- a/src/mame/drivers/gomoku.cpp +++ b/src/mame/drivers/gomoku.cpp @@ -28,6 +28,7 @@ todo: #include "audio/gomoku.h" #include "cpu/z80/z80.h" +#include "machine/74259.h" #include "speaker.h" @@ -44,12 +45,6 @@ READ8_MEMBER(gomoku_state::input_port_r) } -WRITE8_MEMBER(gomoku_state::gomoku_latch_w) -{ - m_latch->write_bit(offset, BIT(data, 1)); -} - - static ADDRESS_MAP_START( gomoku_map, AS_PROGRAM, 8, gomoku_state ) AM_RANGE(0x0000, 0x47ff) AM_ROM AM_RANGE(0x4800, 0x4fff) AM_RAM @@ -58,7 +53,7 @@ static ADDRESS_MAP_START( gomoku_map, AS_PROGRAM, 8, gomoku_state ) AM_RANGE(0x5800, 0x58ff) AM_RAM_WRITE(gomoku_bgram_w) AM_SHARE("bgram") AM_RANGE(0x6000, 0x601f) AM_DEVWRITE("gomoku", gomoku_sound_device, sound1_w) AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("gomoku", gomoku_sound_device, sound2_w) - AM_RANGE(0x7000, 0x7007) AM_WRITE(gomoku_latch_w) + AM_RANGE(0x7000, 0x7007) AM_DEVWRITE("latch", ls259_device, write_d1) AM_RANGE(0x7800, 0x7807) AM_READ(input_port_r) AM_RANGE(0x7800, 0x7800) AM_WRITENOP ADDRESS_MAP_END diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h index 80de33c388e..7021b231606 100644 --- a/src/mame/includes/dynax.h +++ b/src/mame/includes/dynax.h @@ -6,10 +6,7 @@ ***************************************************************************/ -#include "machine/74259.h" #include "machine/bankdev.h" -#include "machine/msm6242.h" -#include "sound/ym2413.h" #include "sound/msm5205.h" #include "sound/okim6295.h" #include "screen.h" @@ -21,13 +18,10 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_soundcpu(*this, "soundcpu") - , m_ym2413(*this, "ym2413") , m_oki(*this, "oki") , m_msm(*this, "msm") , m_screen(*this, "screen") , m_palette(*this, "palette") - , m_rtc(*this, "rtc") - , m_mainlatch(*this, "mainlatch") , m_bankdev(*this, "bankdev") , m_gfx_region1(*this, "gfx1") , m_gfx_region2(*this, "gfx2") @@ -44,13 +38,10 @@ public: /* devices */ required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_soundcpu; - optional_device<ym2413_device> m_ym2413; optional_device<okim6295_device> m_oki; optional_device<msm5205_device> m_msm; optional_device<screen_device> m_screen; required_device<palette_device> m_palette; - optional_device<msm6242_device> m_rtc; - optional_device<ls259_device> m_mainlatch; optional_device<address_map_bank_device> m_bankdev; optional_region_ptr<uint8_t> m_gfx_region1; optional_region_ptr<uint8_t> m_gfx_region2; @@ -164,7 +155,6 @@ public: DECLARE_WRITE8_MEMBER(nanajign_palette_hi_w); void nanajign_palette_update(offs_t offset); DECLARE_WRITE8_MEMBER(adpcm_data_w); - DECLARE_WRITE8_MEMBER(yarunara_mainlatch_w); DECLARE_WRITE8_MEMBER(hjingi_bank_w); DECLARE_WRITE_LINE_MEMBER(hjingi_lockout_w); DECLARE_WRITE_LINE_MEMBER(hjingi_hopper_w); diff --git a/src/mame/includes/gomoku.h b/src/mame/includes/gomoku.h index a99c8426ea3..f4b24b2fdd8 100644 --- a/src/mame/includes/gomoku.h +++ b/src/mame/includes/gomoku.h @@ -3,7 +3,6 @@ #ifndef MAME_INCLUDES_GOMOKU_H #define MAME_INCLUDES_GOMOKU_H -#include "machine/74259.h" #include "screen.h" class gomoku_state : public driver_device @@ -16,7 +15,6 @@ public: m_bgram(*this, "bgram"), m_inputs(*this, {"IN0", "IN1", "DSW", "UNUSED0", "UNUSED1", "UNUSED2", "UNUSED3", "UNUSED4"}), m_maincpu(*this, "maincpu"), - m_latch(*this, "latch"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen") { } @@ -29,7 +27,6 @@ public: bitmap_ind16 m_bg_bitmap; optional_ioport_array<8> m_inputs; DECLARE_READ8_MEMBER(input_port_r); - DECLARE_WRITE8_MEMBER(gomoku_latch_w); DECLARE_WRITE8_MEMBER(gomoku_videoram_w); DECLARE_WRITE8_MEMBER(gomoku_colorram_w); DECLARE_WRITE8_MEMBER(gomoku_bgram_w); @@ -40,7 +37,6 @@ public: DECLARE_PALETTE_INIT(gomoku); uint32_t screen_update_gomoku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device<cpu_device> m_maincpu; - required_device<ls259_device> m_latch; required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; }; |