summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mame/drivers/bnstars.c788
-rw-r--r--src/mame/drivers/ms32.c58
2 files changed, 156 insertions, 690 deletions
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index a47a7acab46..249d1cbffd8 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -106,13 +106,14 @@ public:
m_ms32_bg1_ram(*this, "bg1_ram"),
m_ms32_roz0_ram(*this, "roz0_ram"),
m_ms32_roz1_ram(*this, "roz1_ram"),
- m_ms32_pal_ram(*this, "pal_ram"),
m_ms32_roz_ctrl(*this, "roz_ctrl"),
m_ms32_spram(*this, "spram"),
m_ms32_tx0_scroll(*this, "tx0_scroll"),
m_ms32_bg0_scroll(*this, "bg0_scroll"),
m_ms32_tx1_scroll(*this, "tx1_scroll"),
- m_ms32_bg1_scroll(*this, "bg1_scroll") { }
+ m_ms32_bg1_scroll(*this, "bg1_scroll"),
+ m_p1_keys(*this, "P1KEY"),
+ m_p2_keys(*this, "P2KEY") { }
tilemap_t *m_ms32_tx_tilemap[2];
tilemap_t *m_ms32_bg_tilemap[2];
@@ -123,13 +124,16 @@ public:
required_shared_ptr<UINT32> m_ms32_bg1_ram;
required_shared_ptr<UINT32> m_ms32_roz0_ram;
required_shared_ptr<UINT32> m_ms32_roz1_ram;
- required_shared_ptr_array<UINT32, 2> m_ms32_pal_ram;
required_shared_ptr_array<UINT32, 2> m_ms32_roz_ctrl;
required_shared_ptr<UINT32> m_ms32_spram;
required_shared_ptr<UINT32> m_ms32_tx0_scroll;
required_shared_ptr<UINT32> m_ms32_bg0_scroll;
required_shared_ptr<UINT32> m_ms32_tx1_scroll;
required_shared_ptr<UINT32> m_ms32_bg1_scroll;
+
+ required_ioport_array<4> m_p1_keys;
+ required_ioport_array<4> m_p2_keys;
+
UINT32 m_bnstars1_mahjong_select;
DECLARE_WRITE32_MEMBER(ms32_tx0_ram_w);
DECLARE_WRITE32_MEMBER(ms32_tx1_ram_w);
@@ -137,10 +141,8 @@ public:
DECLARE_WRITE32_MEMBER(ms32_bg1_ram_w);
DECLARE_WRITE32_MEMBER(ms32_roz0_ram_w);
DECLARE_WRITE32_MEMBER(ms32_roz1_ram_w);
- DECLARE_WRITE32_MEMBER(ms32_pal0_ram_w);
- DECLARE_WRITE32_MEMBER(ms32_pal1_ram_w);
- DECLARE_READ32_MEMBER(bnstars1_r);
DECLARE_WRITE32_MEMBER(bnstars1_mahjong_select_w);
+ DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r);
DECLARE_DRIVER_INIT(bnstars);
TILE_GET_INFO_MEMBER(get_ms32_tx0_tile_info);
TILE_GET_INFO_MEMBER(get_ms32_tx1_tile_info);
@@ -153,8 +155,7 @@ public:
UINT32 screen_update_bnstars_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_bnstars_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_roz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority, int chip);
- void update_color(int color, int screen);
- void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32 *sprram_top, size_t sprram_size, int region);
+ void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32 *sprram_top, size_t sprram_size);
};
@@ -176,7 +177,7 @@ TILE_GET_INFO_MEMBER(bnstars_state::get_ms32_tx1_tile_info)
tileno = m_ms32_tx1_ram[tile_index *2+0] & 0x0000ffff;
colour = m_ms32_tx1_ram[tile_index *2+1] & 0x0000000f;
- SET_TILE_INFO_MEMBER(7,tileno,colour,0);
+ SET_TILE_INFO_MEMBER(6,tileno,colour,0);
}
WRITE32_MEMBER(bnstars_state::ms32_tx0_ram_w)
@@ -210,7 +211,7 @@ TILE_GET_INFO_MEMBER(bnstars_state::get_ms32_bg1_tile_info)
tileno = m_ms32_bg1_ram[tile_index *2+0] & 0x0000ffff;
colour = m_ms32_bg1_ram[tile_index *2+1] & 0x0000000f;
- SET_TILE_INFO_MEMBER(6,tileno,colour,0);
+ SET_TILE_INFO_MEMBER(5,tileno,colour,0);
}
WRITE32_MEMBER(bnstars_state::ms32_bg0_ram_w)
@@ -329,7 +330,7 @@ TILE_GET_INFO_MEMBER(bnstars_state::get_ms32_roz1_tile_info)
tileno = m_ms32_roz1_ram[tile_index *2+0] & 0x0000ffff;
colour = m_ms32_roz1_ram[tile_index *2+1] & 0x0000000f;
- SET_TILE_INFO_MEMBER(5,tileno,colour,0);
+ SET_TILE_INFO_MEMBER(4,tileno,colour,0);
}
WRITE32_MEMBER(bnstars_state::ms32_roz0_ram_w)
@@ -345,32 +346,8 @@ WRITE32_MEMBER(bnstars_state::ms32_roz1_ram_w)
}
-void bnstars_state::update_color(int color, int screen)
-{
- int r,g,b;
-
- r = ((m_ms32_pal_ram[screen][color*2] & 0xff00) >>8 );
- g = ((m_ms32_pal_ram[screen][color*2] & 0x00ff) >>0 );
- b = ((m_ms32_pal_ram[screen][color*2+1] & 0x00ff) >>0 );
-
- m_palette->set_pen_color(color+screen*0x8000,rgb_t(r,g,b));
-}
-
-WRITE32_MEMBER(bnstars_state::ms32_pal0_ram_w)
-{
- COMBINE_DATA(&m_ms32_pal_ram[0][offset]);
- update_color(offset/2, 0);
-}
-
-WRITE32_MEMBER(bnstars_state::ms32_pal1_ram_w)
-{
- COMBINE_DATA(&m_ms32_pal_ram[1][offset]);
- update_color(offset/2, 1);
-}
-
-
/* SPRITES based on tetrisp2 for now, readd priority bits later */
-void bnstars_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32 *sprram_top, size_t sprram_size, int region)
+void bnstars_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32 *sprram_top, size_t sprram_size)
{
/***************************************************************************
@@ -412,7 +389,7 @@ void bnstars_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, co
int tx, ty, sx, sy, flipx, flipy;
int xsize, ysize, xzoom, yzoom;
int code, attr, color, size, pri, pri_mask;
- gfx_element *gfx = m_gfxdecode->gfx(region);
+ gfx_element *gfx = m_gfxdecode->gfx(0);
UINT32 *source = sprram_top;
const UINT32 *finish = sprram_top + (sprram_size - 0x10) / 4;
@@ -538,7 +515,7 @@ UINT32 bnstars_state::screen_update_bnstars_left(screen_device &screen, bitmap_i
m_ms32_tx_tilemap[0]->draw(screen, bitmap, cliprect, 0,4);
- draw_sprites(screen,bitmap,cliprect, m_ms32_spram, 0x20000, 0);
+ draw_sprites(screen,bitmap,cliprect, m_ms32_spram, 0x20000);
return 0;
}
@@ -547,7 +524,7 @@ UINT32 bnstars_state::screen_update_bnstars_right(screen_device &screen, bitmap_
{
screen.priority().fill(0, cliprect);
- bitmap.fill(0x8000+0, cliprect); /* bg color */
+ bitmap.fill(0, cliprect); /* bg color */
m_ms32_bg_tilemap[1]->set_scrollx(0, m_ms32_bg1_scroll[0x00/4] + m_ms32_bg1_scroll[0x08/4] + 0x10 );
@@ -560,454 +537,99 @@ UINT32 bnstars_state::screen_update_bnstars_right(screen_device &screen, bitmap_
m_ms32_tx_tilemap[1]->set_scrolly(0, m_ms32_tx1_scroll[0x0c/4] + m_ms32_tx1_scroll[0x14/4]);
m_ms32_tx_tilemap[1]->draw(screen, bitmap, cliprect, 0,4);
- draw_sprites(screen,bitmap,cliprect, m_ms32_spram+(0x20000/4), 0x20000, 4);
+ draw_sprites(screen,bitmap,cliprect, m_ms32_spram+(0x20000/4), 0x20000);
return 0;
}
static INPUT_PORTS_START( bnstars )
- PORT_START("IN0")
- PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_START("P1")
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bnstars_state, mahjong_ctrl_r, (void *)0)
+ PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Test?") PORT_CODE(KEYCODE_F1)
+
+ PORT_START("P1KEY.0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_A )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_E )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_I )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
- PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000100, 0x00000100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000200, 0x00000200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000400, 0x00000400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000800, 0x00000800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00001000, 0x00001000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00001000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00002000, 0x00002000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00002000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00004000, 0x00004000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00004000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00008000, 0x00008000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00008000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_DIPNAME( 0x00020000, 0x00020000, "MAH1" )
- PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_DIPNAME( 0x00080000, 0x00080000, "Service Mode ? 1" )
- PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00100000, 0x00100000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00200000, 0x00200000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00400000, 0x00400000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00800000, 0x00800000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x01000000, 0x01000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x02000000, 0x02000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x04000000, 0x04000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x08000000, 0x08000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x10000000, 0x10000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x20000000, 0x20000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x40000000, 0x40000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x80000000, 0x80000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
-
- PORT_START("IN1")
- PORT_DIPNAME( 0x00000001, 0x00000001, "MAH2" )
- PORT_DIPSETTING( 0x00000001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_MAHJONG_B )
- PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_MAHJONG_F )
- PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_MAHJONG_N )
- PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_MAHJONG_J )
- PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
- PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000100, 0x00000100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000200, 0x00000200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000400, 0x00000400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000800, 0x00000800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00001000, 0x00001000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00001000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00002000, 0x00002000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00002000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00004000, 0x00004000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00004000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00008000, 0x00008000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00008000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00010000, 0x00010000, "MAH3" )
- PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00020000, 0x00020000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00040000, 0x00040000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00080000, 0x00080000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00100000, 0x00100000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00200000, 0x00200000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00400000, 0x00400000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00800000, 0x00800000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x01000000, 0x01000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x02000000, 0x02000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x04000000, 0x04000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x08000000, 0x08000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x10000000, 0x10000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x20000000, 0x20000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x40000000, 0x40000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x80000000, 0x80000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
-
- PORT_START("IN2")
- PORT_DIPNAME( 0x00000001, 0x00000001, "MAH4" )
- PORT_DIPSETTING( 0x00000001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_MAHJONG_C )
- PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_MAHJONG_G )
- PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
- PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_MAHJONG_K )
- PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
- PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000100, 0x00000100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000200, 0x00000200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000400, 0x00000400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000800, 0x00000800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00001000, 0x00001000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00001000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00002000, 0x00002000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00002000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00004000, 0x00004000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00004000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00008000, 0x00008000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00008000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00010000, 0x00010000, "MAH5" )
- PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00020000, 0x00020000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00040000, 0x00040000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00080000, 0x00080000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00100000, 0x00100000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00200000, 0x00200000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00400000, 0x00400000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00800000, 0x00800000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x01000000, 0x01000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x02000000, 0x02000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x04000000, 0x04000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x08000000, 0x08000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x10000000, 0x10000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x20000000, 0x20000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x40000000, 0x40000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x80000000, 0x80000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
-
- PORT_START("IN3")
- PORT_DIPNAME( 0x00000001, 0x00000001, "MAH6" )
- PORT_DIPSETTING( 0x00000001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_MAHJONG_D )
- PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_MAHJONG_H )
- PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
- PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_MAHJONG_L )
- PORT_DIPNAME( 0x00000020, 0x00000020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000100, 0x00000100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000200, 0x00000200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000400, 0x00000400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000800, 0x00000800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00001000, 0x00001000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00001000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00002000, 0x00002000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00002000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00004000, 0x00004000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00004000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00008000, 0x00008000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00008000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00010000, 0x00010000, "MAH7" )
- PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00020000, 0x00020000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00040000, 0x00040000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00080000, 0x00080000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00100000, 0x00100000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00200000, 0x00200000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00400000, 0x00400000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00800000, 0x00800000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x01000000, 0x01000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x02000000, 0x02000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x04000000, 0x04000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x08000000, 0x08000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x10000000, 0x10000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x20000000, 0x20000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x40000000, 0x40000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x80000000, 0x80000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
-
- PORT_START("IN4")
- PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_START2 )
- /* The follow 4 bits active 4 button each one for the second player */
- PORT_DIPNAME( 0x00000002, 0x00000002, "P2: A,B,C,D" )
- PORT_DIPSETTING( 0x00000002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000004, 0x00000004, "P2: E,F,G,H" )
- PORT_DIPSETTING( 0x00000004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000008, 0x00000008, "P2: M,N,Pon,Chie" )
- PORT_DIPSETTING( 0x00000008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000010, 0x00000010, "P2: I,J,K,L" )
- PORT_DIPSETTING( 0x00000010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000020, 0x00000020, "P2: Kan,Reach,Ron" )
- PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000100, 0x00000100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000200, 0x00000200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000400, 0x00000400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000800, 0x00000800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00001000, 0x00001000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00001000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00002000, 0x00002000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00002000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00004000, 0x00004000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00004000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00008000, 0x00008000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00008000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("P1KEY.1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_B )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_F )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_J )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("P1KEY.2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_C )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_G )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_K )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("P1KEY.3")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_D )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_H )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_L )
+ PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("P2")
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bnstars_state, mahjong_ctrl_r, (void *)1)
+ PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_DIPNAME( 0x00020000, 0x00020000, "MAH9" )
- PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
+ PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_SERVICE2 )
- PORT_DIPNAME( 0x00080000, 0x00080000, "Service Mode ? 2" )
- PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00100000, 0x00100000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00200000, 0x00200000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00400000, 0x00400000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00800000, 0x00800000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x01000000, 0x01000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x02000000, 0x02000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x04000000, 0x04000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x08000000, 0x08000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x10000000, 0x10000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x20000000, 0x20000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x40000000, 0x40000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x80000000, 0x80000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
-
- PORT_START("IN5")
+ PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Test?") PORT_CODE(KEYCODE_F2)
+
+ PORT_START("P2KEY.0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2)
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("P2KEY.1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2)
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("P2KEY.2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2)
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("P2KEY.3")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2)
+ PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("DSW")
PORT_DIPNAME( 0x00000001, 0x00000001, "Test Mode" ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00000001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
@@ -1032,12 +654,9 @@ static INPUT_PORTS_START( bnstars )
PORT_DIPSETTING( 0x00000060, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x000000a0, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00000020, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x00000100, 0x00000100, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:8")
- PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000200, 0x00000200, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:7")
- PORT_DIPSETTING( 0x00000200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
+
+ PORT_DIPUNUSED_DIPLOC( 0x00000100, 0x00000100, "SW2:8" )
+ PORT_DIPUNUSED_DIPLOC( 0x00000200, 0x00000200, "SW2:7" )
PORT_DIPNAME( 0x00000400, 0x00000400, "Taisen Only" ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x00000400, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
@@ -1057,156 +676,18 @@ static INPUT_PORTS_START( bnstars )
PORT_DIPSETTING( 0x0000a000, DEF_STR( Harder ) )
PORT_DIPSETTING( 0x00002000, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0x00010000, 0x00010000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:8")
- PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00020000, 0x00020000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:7")
- PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00040000, 0x00040000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:6")
- PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00080000, 0x00080000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:5")
- PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00100000, 0x00100000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:4")
- PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00200000, 0x00200000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:3")
- PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00400000, 0x00400000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:2")
- PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00800000, 0x00800000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:1")
- PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x01000000, 0x01000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x02000000, 0x02000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x04000000, 0x04000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x08000000, 0x08000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x10000000, 0x10000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x20000000, 0x20000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x40000000, 0x40000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x80000000, 0x80000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
-
- PORT_START("IN6")
- PORT_DIPNAME( 0x00000001, 0x00000001, "4" )
- PORT_DIPSETTING( 0x00000001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000002, 0x00000002, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000004, 0x00000004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000008, 0x00000008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000010, 0x00000010, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000020, 0x00000020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000100, 0x00000100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000200, 0x00000200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000400, 0x00000400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000800, 0x00000800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00001000, 0x00001000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00001000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00002000, 0x00002000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00002000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00004000, 0x00004000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00004000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00008000, 0x00008000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00008000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00010000, 0x00010000, "5" )
- PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00020000, 0x00020000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00040000, 0x00040000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00080000, 0x00080000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00100000, 0x00100000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00200000, 0x00200000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00400000, 0x00400000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00800000, 0x00800000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x01000000, 0x01000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x02000000, 0x02000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x04000000, 0x04000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x08000000, 0x08000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x10000000, 0x10000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x20000000, 0x20000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x40000000, 0x40000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x80000000, 0x80000000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
+ PORT_DIPUNUSED_DIPLOC( 0x00010000, 0x00010000, "SW3:8" )
+ PORT_DIPUNUSED_DIPLOC( 0x00020000, 0x00020000, "SW3:7" )
+ PORT_DIPUNUSED_DIPLOC( 0x00040000, 0x00040000, "SW3:6" )
+ PORT_DIPUNUSED_DIPLOC( 0x00080000, 0x00080000, "SW3:5" )
+ PORT_DIPUNUSED_DIPLOC( 0x00100000, 0x00100000, "SW3:4" )
+ PORT_DIPUNUSED_DIPLOC( 0x00200000, 0x00200000, "SW3:3" )
+ PORT_DIPUNUSED_DIPLOC( 0x00400000, 0x00400000, "SW3:2" )
+ PORT_DIPUNUSED_DIPLOC( 0x00800000, 0x00800000, "SW3:1" )
+ PORT_BIT( 0xff000000, IP_ACTIVE_LOW, IPT_UNUSED ) // Unused?
INPUT_PORTS_END
-
/* sprites are contained in 256x256 "tiles" */
static GFXLAYOUT_RAW( spritelayout, 256, 256, 256*8, 256*256*8 )
static GFXLAYOUT_RAW( bglayout, 16, 16, 16*8, 16*16*8 )
@@ -1218,33 +699,32 @@ static GFXDECODE_START( bnstars )
GFXDECODE_ENTRY( "gfx4", 0, bglayout, 0x1000, 0x10 ) /* Bg scr1 */
GFXDECODE_ENTRY( "gfx5", 0, txlayout, 0x6000, 0x10 ) /* Tx scr1 */
- GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 0x8000+0x0000, 0x10 )
- GFXDECODE_ENTRY( "gfx3", 0, bglayout, 0x8000+0x5000, 0x10 ) /* Roz scr2 */
- GFXDECODE_ENTRY( "gfx6", 0, bglayout, 0x8000+0x1000, 0x10 ) /* Bg scr2 */
- GFXDECODE_ENTRY( "gfx7", 0, txlayout, 0x8000+0x6000, 0x10 ) /* Tx scr2 */
-
+ GFXDECODE_ENTRY( "gfx3", 0, bglayout, 0x5000, 0x10 ) /* Roz scr2 */
+ GFXDECODE_ENTRY( "gfx6", 0, bglayout, 0x1000, 0x10 ) /* Bg scr2 */
+ GFXDECODE_ENTRY( "gfx7", 0, txlayout, 0x6000, 0x10 ) /* Tx scr2 */
GFXDECODE_END
-READ32_MEMBER(bnstars_state::bnstars1_r)
+CUSTOM_INPUT_MEMBER(bnstars_state::mahjong_ctrl_r)
{
+ required_ioport_array<4> &keys = (param == 0) ? m_p1_keys : m_p2_keys;
+
switch (m_bnstars1_mahjong_select & 0x2080)
{
default:
printf("unk bnstars1_r %08x\n",m_bnstars1_mahjong_select);
- return 0xffffffff;
+ return 0xff;
case 0x0000:
- return ioport("IN0")->read();
+ return keys[0]->read();
case 0x0080:
- return ioport("IN1")->read();
+ return keys[1]->read();
case 0x2000:
- return ioport("IN2")->read();
+ return keys[2]->read();
case 0x2080:
- return ioport("IN3")->read();
-
+ return keys[3]->read();
}
}
@@ -1260,9 +740,9 @@ static ADDRESS_MAP_START( bnstars_map, AS_PROGRAM, 32, bnstars_state )
AM_RANGE(0xfc800000, 0xfc800003) AM_WRITE(ms32_sound_w)
- AM_RANGE(0xfcc00004, 0xfcc00007) AM_READ(bnstars1_r )
- AM_RANGE(0xfcc00008, 0xfcc0000b) AM_READ_PORT("IN4")
- AM_RANGE(0xfcc00010, 0xfcc00013) AM_READ_PORT("IN5")
+ AM_RANGE(0xfcc00004, 0xfcc00007) AM_READ_PORT("P1")
+ AM_RANGE(0xfcc00008, 0xfcc0000b) AM_READ_PORT("P2")
+ AM_RANGE(0xfcc00010, 0xfcc00013) AM_READ_PORT("DSW")
AM_RANGE(0xfce00034, 0xfce00037) AM_WRITENOP
AM_RANGE(0xfce00038, 0xfce0003b) AM_WRITE(reset_sub_w)
@@ -1286,8 +766,8 @@ static ADDRESS_MAP_START( bnstars_map, AS_PROGRAM, 32, bnstars_state )
/* wrote together */
AM_RANGE(0xfd040000, 0xfd047fff) AM_RAM // priority ram
AM_RANGE(0xfd080000, 0xfd087fff) AM_RAM
- AM_RANGE(0xfd200000, 0xfd237fff) AM_RAM_WRITE(ms32_pal1_ram_w) AM_SHARE("pal_ram.1")
- AM_RANGE(0xfd400000, 0xfd437fff) AM_RAM_WRITE(ms32_pal0_ram_w) AM_SHARE("pal_ram.0")
+ AM_RANGE(0xfd200000, 0xfd237fff) AM_DEVREADWRITE16("palette2", palette_device, read, write, 0x0000ffff) AM_SHARE("palette2")
+ AM_RANGE(0xfd400000, 0xfd437fff) AM_DEVREADWRITE16("palette", palette_device, read, write, 0x0000ffff) AM_SHARE("palette")
AM_RANGE(0xfe000000, 0xfe01ffff) AM_RAM_WRITE(ms32_roz1_ram_w) AM_SHARE("roz1_ram")
AM_RANGE(0xfe400000, 0xfe41ffff) AM_RAM_WRITE(ms32_roz0_ram_w) AM_SHARE("roz0_ram")
AM_RANGE(0xfe800000, 0xfe83ffff) AM_RAM AM_SHARE("spram")
@@ -1297,7 +777,7 @@ static ADDRESS_MAP_START( bnstars_map, AS_PROGRAM, 32, bnstars_state )
AM_RANGE(0xfec08000, 0xfec0ffff) AM_RAM_WRITE(ms32_bg0_ram_w) AM_SHARE("bg0_ram")
AM_RANGE(0xfee00000, 0xfee1ffff) AM_RAM
- AM_RANGE(0xffe00000, 0xffffffff) AM_ROMBANK("bank1")
+ AM_RANGE(0xffe00000, 0xffffffff) AM_ROM AM_REGION("maincpu", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START( bnstars_sound_map, AS_PROGRAM, 8, bnstars_state )
@@ -1335,9 +815,15 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state )
MCFG_QUANTUM_TIME(attotime::from_hz(60000))
-
MCFG_GFXDECODE_ADD("gfxdecode", "palette", bnstars)
- MCFG_PALETTE_ADD("palette", 0x8000*2)
+
+ MCFG_PALETTE_ADD("palette", 0x8000)
+ MCFG_PALETTE_FORMAT(XBRG)
+ MCFG_PALETTE_MEMBITS(16)
+
+ MCFG_PALETTE_ADD("palette2", 0x8000)
+ MCFG_PALETTE_FORMAT(XBRG)
+ MCFG_PALETTE_MEMBITS(16)
MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
@@ -1355,7 +841,7 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state )
MCFG_SCREEN_SIZE(40*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
MCFG_SCREEN_UPDATE_DRIVER(bnstars_state, screen_update_bnstars_right)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE("palette2")
/* sound hardware */
@@ -1415,9 +901,8 @@ ROM_START( bnstars1 )
ROM_LOAD( "vsjanshi5.6", 0x000000, 0x080000, CRC(fdbbac21) SHA1(c77d852e53126cc8ebfe1e79d1134e42b54d1aab) )
/* Sound Program (one, driving both screen sound) */
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "sb93145.5", 0x000000, 0x040000, CRC(0424e899) SHA1(fbcdebfa3d5f52b10cf30f7e416f5f53994e4d55) )
- ROM_RELOAD( 0x010000, 0x40000 )
/* Samples #1 (Screen 1?) */
ROM_REGION( 0x400000, "ymf1", 0 ) /* samples - 8-bit signed PCM */
@@ -1439,7 +924,6 @@ DRIVER_INIT_MEMBER(bnstars_state,bnstars)
decrypt_ms32_tx(machine(), 0x00020,0x7e, "gfx7");
decrypt_ms32_bg(machine(), 0x00001,0x9b, "gfx6");
- membank("bank1")->set_base(memregion("maincpu")->base());
configure_banks();
}
diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c
index efac24dfb4c..f83f552eb2f 100644
--- a/src/mame/drivers/ms32.c
+++ b/src/mame/drivers/ms32.c
@@ -353,7 +353,7 @@ static ADDRESS_MAP_START( ms32_map, AS_PROGRAM, 32, ms32_state )
AM_RANGE(0xc2c08000, 0xc2c0ffff) AM_READWRITE16(ms32_bgram_r16, ms32_bgram_w16, 0x0000ffff) AM_MIRROR(0x3c1f0000) AM_SHARE("bgram") /* bgram is 16-bit wide, 0x4000 in size */
/* AM_RANGE(0xc2c10000, 0xc2dfffff) // mirrors of txram / bg, handled above */
AM_RANGE(0xc2e00000, 0xc2e1ffff) AM_RAM AM_SHARE("mainram") AM_MIRROR(0x3c0e0000) /* mainram is 32-bit wide, 0x20000 in size */
- AM_RANGE(0xc3e00000, 0xc3ffffff) AM_ROMBANK("bank1") AM_MIRROR(0x3c000000) // ROM is 32-bit wide, 0x200000 in size */
+ AM_RANGE(0xc3e00000, 0xc3ffffff) AM_ROM AM_REGION("maincpu", 0) AM_MIRROR(0x3c000000) // ROM is 32-bit wide, 0x200000 in size */
/* todo: clean up the mapping of these */
AM_RANGE(0xfc800000, 0xfc800003) AM_READNOP /* sound? */
@@ -1375,7 +1375,6 @@ ADDRESS_MAP_END
void ms32_state::machine_reset()
{
- membank("bank1")->set_base(memregion("maincpu")->base());
membank("bank4")->set_entry(0);
membank("bank5")->set_entry(1);
irq_init();
@@ -1460,9 +1459,8 @@ ROM_START( bbbxing )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "bbbx32-2.bin",0x000000, 0x080000, CRC(3ffdae75) SHA1(2b837d28f7ecdd49e8525bd5c249e83021d5fe9f) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "bbbx21.bin", 0x000000, 0x040000, CRC(5f3ea01f) SHA1(761f6a5852312d2b12de009f3cf0476f5b2e906c) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "bbbx22.bin", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) // common samples
@@ -1498,9 +1496,8 @@ ROM_START( 47pie2 )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "93166-30.bin", 0x000000, 0x080000, CRC(0c738883) SHA1(e552c1842d759e5e617eb9c6cc178620a461b4dd) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "93166-21.bin", 0x000000, 0x040000, CRC(e7fd1bf4) SHA1(74567530364bfd93bffddb588758d8498e197668) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "94019-10.22", 0x000000, 0x200000, CRC(745d41ec) SHA1(9118d0f27b65c9d37970326ccf86fdccb81d32f5) )
@@ -1536,9 +1533,8 @@ ROM_START( 47pie2o )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "93166-30.bin", 0x000000, 0x080000, CRC(0c738883) SHA1(e552c1842d759e5e617eb9c6cc178620a461b4dd) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "93166-21.bin", 0x000000, 0x040000, CRC(e7fd1bf4) SHA1(74567530364bfd93bffddb588758d8498e197668) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "94019-10.22", 0x000000, 0x200000, CRC(745d41ec) SHA1(9118d0f27b65c9d37970326ccf86fdccb81d32f5) )
@@ -1576,9 +1572,8 @@ ROM_START( desertwr )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "93166-30.41", 0x000000, 0x080000, CRC(980ab89c) SHA1(8468fc13a5988e25750e8d99ff464f46e86ab412) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "93166-21.30", 0x000000, 0x040000, CRC(9300be4c) SHA1(a8e9c1704abf26545aeb9a5d28fd0cafd38f2d84) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "92042-01.33", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) // common samples
@@ -1631,9 +1626,8 @@ ROM_START( f1superb )
ROM_LOAD( "f1sb4b.bin", 0x400000, 0x200000, CRC(077180c5) SHA1(ab16739da709ecdbbb1264beba349ef6ecf3f8b1) )
ROM_LOAD( "f1sb5b.bin", 0x600000, 0x200000, CRC(efabc47d) SHA1(195afde8a1f45da4fc04c3080a3cf5fdfff7be5e) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "f1sb21.bin", 0x000000, 0x040000, CRC(e131e1c7) SHA1(33f95a074930c49548069518d8c6dcde7fa25627) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "f1sb24.bin", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) // common samples
@@ -1668,9 +1662,8 @@ ROM_START( gratia )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "94019_2.030",0x000000, 0x080000, CRC(f9543fcf) SHA1(8466c7893bc6c43e2a80b8f91a776fd0a345ea6c) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "94019.021",0x000000, 0x040000, CRC(6e8dd039) SHA1(f1e69c9b40b14ba0f8377a6d9b6c3933919bc803) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "92042.01", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) // common rom?
@@ -1705,9 +1698,8 @@ ROM_START( gratiaa )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "94019.030",0x000000, 0x080000, CRC(026b5379) SHA1(b9237477f1bf8ae83174e8231492fe667e6d6a13) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "94019.021",0x000000, 0x040000, CRC(6e8dd039) SHA1(f1e69c9b40b14ba0f8377a6d9b6c3933919bc803) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "92042.01", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) // common rom?
@@ -1745,9 +1737,8 @@ ROM_START( gametngk )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "mr94041.30", 0x000000, 0x080000, CRC(c0f27b7f) SHA1(874fe80aa4b46520f844ef6efa61f28eabccbc4f) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "mr94041.21", 0x000000, 0x040000, CRC(38dcb837) SHA1(29fdde54e52dec4ee39a6f2db8e0d67774320d15) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "mr94041.13", 0x000000, 0x200000, CRC(fba84caf) SHA1(318270dbf825a8e0f315992c49a2dc34dd1df7c1) )
@@ -1781,9 +1772,8 @@ ROM_START( hayaosi2 )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "mb93138a.32", 0x000000, 0x080000, CRC(f563a144) SHA1(14d86e4992329811857e1faf282cd9ec530a364c) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "mb93138a.21", 0x000000, 0x040000, CRC(8e8048b0) SHA1(93285a0570ed829b36f4e8c57d133a7dd14f123d) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples - 8-bit signed PCM */
ROM_LOAD( "mr92042.01", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) // common samples
@@ -1886,9 +1876,8 @@ ROM_START( hayaosi3 )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "mb93138.32", 0x000000, 0x080000, CRC(df5d00b4) SHA1(2bbbcd546d5b5170d81bf33b37b46b70b417c9c7) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "mb93138.21", 0x000000, 0x040000, CRC(008bc217) SHA1(eec66a86f285ccbc47eba17a4bb83cc1f8a5f425) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples - 8-bit signed PCM */
ROM_LOAD( "mr92042.01", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) // common samples
@@ -1925,9 +1914,8 @@ ROM_START( kirarast )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "mr95025.30", 0x000000, 0x080000, CRC(aee6e0c2) SHA1(dee985f7a9773ba7a4d31a3833a7775d778bbe5a) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "mr95025.21", 0x000000, 0x040000, CRC(a6c70c7f) SHA1(fe2108f3e8d46ed53d8c5c98e8d0fdb19b77075d) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples - 8-bit signed PCM */
ROM_LOAD( "mr95025.12", 0x000000, 0x200000, CRC(1dd4f766) SHA1(455befd3a216f2197cd2e7e4899d4f1af7d20bf7) )
@@ -1963,9 +1951,8 @@ ROM_START( akiss )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "93166.30", 0x000000, 0x080000, CRC(1807c1ea) SHA1(94696b8319c4982cb5d33423f56e2348f210cdb5) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "93166.21", 0x000000, 0x040000, CRC(01a03687) SHA1(2340c4ed19f434e8c23709edfc93259313aefaf9))
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples - 8-bit signed PCM */
ROM_LOAD( "95008-11.22", 0x000000, 0x200000, CRC(23b9af76) SHA1(98b4087c142500dc759bda94d71c77634452a7ad))
@@ -2003,9 +1990,8 @@ ROM_START( p47aces )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "p47-30.bin", 0x000000, 0x080000, CRC(7ba90fad) SHA1(c0a3d4458816f00b8f5eb4b6d4531d1abeaccbe5) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "p47-21.bin", 0x000000, 0x040000, CRC(f2d43927) SHA1(69ac20f339a515d58cafbcd6f7d7982ca5cda681) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples - 8-bit signed PCM */
ROM_LOAD( "p47-22.bin", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) )
@@ -2035,9 +2021,8 @@ ROM_START( tetrisp )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "mr95024.30", 0x000000, 0x080000, CRC(cea7002d) SHA1(5462edaeb9339790b95ed15a4bfaab8fae655b12) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "mr95024.21", 0x000000, 0x040000, CRC(5c565e3b) SHA1(d349a8ca50d03c06d8978e6d3632b624f019dee4) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "mr95024.22", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) // common samples
@@ -2067,9 +2052,8 @@ ROM_START( tp2m32 )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "tp2m3230.30", 0x000000, 0x080000, CRC(6845e476) SHA1(61c33714db2e2b5ccdcef0e0d3efdc391fe6aba2) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "tp2m3221.21", 0x000000, 0x040000, CRC(2bcc4176) SHA1(74740fa13ab81b9819b4cfbe9d34a0749ba23b8f) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "tp2m3205.22", 0x000000, 0x200000, CRC(74aa5c31) SHA1(7e3f86198fb678244fab76bee9c72bbdfc818118) )
@@ -2106,9 +2090,8 @@ ROM_START( bnstars ) /* ver 1.1 */
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "vsjanshi30.41", 0x000000, 0x080000, CRC(fdbbac21) SHA1(c77d852e53126cc8ebfe1e79d1134e42b54d1aab) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "vsjanshi21.30", 0x000000, 0x040000, CRC(d622bce1) SHA1(059fcc3c7216d3ea4f3a4226a06219375ce8c2bf) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples - 8-bit signed PCM */
ROM_LOAD( "mr96004-10.22", 0x000000, 0x400000, CRC(83f4303a) SHA1(90ee010591afe1d35744925ef0e8d9a7e2ef3378) )
@@ -2179,9 +2162,8 @@ ROM_START( wpksocv2 )
ROM_REGION( 0x080000, "gfx4", 0 ) /* tx tiles */
ROM_LOAD( "32", 0x000000, 0x080000, CRC(becc25c2) SHA1(4ae7665cd45ebd9586068e99327145194ba216fc) )
- ROM_REGION( 0x50000, "audiocpu", 0 ) /* z80 program */
+ ROM_REGION( 0x40000, "audiocpu", 0 ) /* z80 program */
ROM_LOAD( "ws-21", 0x000000, 0x040000, CRC(bdeff5d6) SHA1(920a6fc983d53f09510887e4e81ee89ccd5079e6) )
- ROM_RELOAD( 0x010000, 0x40000 )
ROM_REGION( 0x400000, "ymf", 0 ) /* samples */
ROM_LOAD( "mr92042-01.22", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) )
@@ -2195,8 +2177,8 @@ ROM_END
void ms32_state::configure_banks()
{
save_item(NAME(m_to_main));
- membank("bank4")->configure_entries(0, 16, memregion("audiocpu")->base() + 0x14000, 0x4000);
- membank("bank5")->configure_entries(0, 16, memregion("audiocpu")->base() + 0x14000, 0x4000);
+ membank("bank4")->configure_entries(0, 16, memregion("audiocpu")->base() + 0x4000, 0x4000);
+ membank("bank5")->configure_entries(0, 16, memregion("audiocpu")->base() + 0x4000, 0x4000);
}
DRIVER_INIT_MEMBER(ms32_state,ms32_common)