gomoku: remove unused input ports

This commit is contained in:
hap 2022-12-22 18:54:24 +01:00
parent 95cd620d66
commit 61573957b1
3 changed files with 24 additions and 30 deletions

View File

@ -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<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
required_shared_ptr<uint8_t> m_bgram;
optional_ioport_array<8> m_inputs;
required_ioport_array<3> m_inputs;
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_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;
}

View File

@ -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);
}

View File

@ -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
}