diff --git a/src/mame/nichibutsu/gomoku.cpp b/src/mame/nichibutsu/gomoku.cpp index 06e8eab35ee..6d99ca5d43d 100644 --- a/src/mame/nichibutsu/gomoku.cpp +++ b/src/mame/nichibutsu/gomoku.cpp @@ -1,6 +1,5 @@ // license:BSD-3-Clause // copyright-holders: Takahiro Nogi, David Haywood - /****************************************************************************** Gomoku Narabe Renju @@ -9,17 +8,10 @@ Driver by Takahiro Nogi 1999/11/06 - Updated to compile again by David Haywood 19th Oct 2002 -******************************************************************************/ -/****************************************************************************** - -todo: - +TODO: - Refactor sound emulation. - - BG(Go table) is generated by board circuitry, so not fully emulated. - - Couldn't figure out the method to specify palette, so I modified palette number manually. - - Couldn't figure out oneshot sound playback parameter, so I adjusted it manually. ******************************************************************************/ @@ -47,7 +39,7 @@ public: m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_bgram(*this, "bgram"), - m_inputs(*this, {"IN0", "IN1", "DSW", "UNUSED0", "UNUSED1", "UNUSED2", "UNUSED3", "UNUSED4"}), + m_inputs(*this, { "IN0", "IN1", "DSW" }), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), @@ -65,7 +57,7 @@ private: required_shared_ptr m_videoram; required_shared_ptr m_colorram; required_shared_ptr m_bgram; - optional_ioport_array<8> m_inputs; + required_ioport_array<3> m_inputs; required_device m_maincpu; required_device m_gfxdecode; required_device m_screen; @@ -141,10 +133,7 @@ TILE_GET_INFO_MEMBER(gomoku_state::get_fg_tile_info) int const color = (attr & 0x0f); int const flipyx = (attr & 0xc0) >> 6; - tileinfo.set(0, - code, - color, - TILE_FLIPYX(flipyx)); + tileinfo.set(0, code, color, TILE_FLIPYX(flipyx)); } void gomoku_state::videoram_w(offs_t offset, uint8_t data) @@ -194,10 +183,10 @@ void gomoku_state::video_start() { int const bgdata = m_bg_d[m_bg_x[x] + (m_bg_y[y] << 4)]; - int color = 0x20; // outside frame (black) + int color = 0x20; // outside frame (black) if (bgdata & 0x01) color = 0x21; // board (brown) - if (bgdata & 0x02) color = 0x20; // frame line (while) + if (bgdata & 0x02) color = 0x20; // frame line (black) m_bg_bitmap.pix((255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color; } @@ -270,7 +259,7 @@ uint32_t gomoku_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap } else if (bgram & 0x08) { - color = 0x22; // cursor (white) + color = 0x22; // cursor (white) } else continue; } @@ -292,14 +281,15 @@ uint32_t gomoku_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap // machine -// input ports are rotated 90 degrees uint8_t gomoku_state::input_port_r(offs_t offset) { int res = 0; - for (int i = 0; i < 8; i++) - res |= ((m_inputs[i].read_safe(0xff) >> offset) & 1) << i; - return res; + // input ports are rotated 90 degrees + for (int i = 0; i < 3; i++) + res |= BIT(m_inputs[i]->read(), offset) << i; + + return res | 0xf8; } diff --git a/src/mame/nichibutsu/seicross.cpp b/src/mame/nichibutsu/seicross.cpp index 302b309cec0..8c5dfd81a36 100644 --- a/src/mame/nichibutsu/seicross.cpp +++ b/src/mame/nichibutsu/seicross.cpp @@ -375,9 +375,8 @@ GFXDECODE_END INTERRUPT_GEN_MEMBER(seicross_state::vblank_irq) { - if(m_irq_mask) + if (m_irq_mask) device.execute().set_input_line(0, HOLD_LINE); - } diff --git a/src/mame/nichibutsu/tubep.cpp b/src/mame/nichibutsu/tubep.cpp index 853669537bc..49949bcc27c 100644 --- a/src/mame/nichibutsu/tubep.cpp +++ b/src/mame/nichibutsu/tubep.cpp @@ -558,27 +558,32 @@ void rjammer_state::rjammer_sound_portmap(address_map &map) void tubep_state::ay8910_portA_0_w(uint8_t data) { - //analog sound control + //analog sound control } + void tubep_state::ay8910_portB_0_w(uint8_t data) { - //analog sound control + //analog sound control } + void tubep_state::ay8910_portA_1_w(uint8_t data) { - //analog sound control + //analog sound control } + void tubep_state::ay8910_portB_1_w(uint8_t data) { - //analog sound control + //analog sound control } + void tubep_state::ay8910_portA_2_w(uint8_t data) { - //analog sound control + //analog sound control } + void tubep_state::ay8910_portB_2_w(uint8_t data) { - //analog sound control + //analog sound control }