mirror of
https://github.com/holub/mame
synced 2025-06-08 13:53:52 +03:00
bankp: add display on/off control and palette high bit [hap, Pierre Cornier]
This commit is contained in:
parent
ecf03c4beb
commit
77f4f7b7d7
@ -452,8 +452,8 @@ VIDEO_START_MEMBER(cclimber_state,cclimber)
|
|||||||
m_bs_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cclimber_state::cclimber_get_bs_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
m_bs_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cclimber_state::cclimber_get_bs_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||||
m_bs_tilemap->set_scroll_cols(1);
|
m_bs_tilemap->set_scroll_cols(1);
|
||||||
m_bs_tilemap->set_scroll_rows(1);
|
m_bs_tilemap->set_scroll_rows(1);
|
||||||
m_bs_tilemap->set_transmask(0, 0x01, 0); /* pen 0 is transaprent */
|
m_bs_tilemap->set_transmask(0, 0x01, 0); // pen 0 is transparent
|
||||||
m_bs_tilemap->set_transmask(1, 0x0f, 0); /* all 4 pens are transparent */
|
m_bs_tilemap->set_transmask(1, 0x0f, 0); // all 4 pens are transparent
|
||||||
|
|
||||||
save_item(NAME(m_flip_x));
|
save_item(NAME(m_flip_x));
|
||||||
save_item(NAME(m_flip_y));
|
save_item(NAME(m_flip_y));
|
||||||
@ -469,8 +469,8 @@ VIDEO_START_MEMBER(cclimber_state,swimmer)
|
|||||||
m_bs_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cclimber_state::cclimber_get_bs_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
m_bs_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cclimber_state::cclimber_get_bs_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||||
m_bs_tilemap->set_scroll_cols(1);
|
m_bs_tilemap->set_scroll_cols(1);
|
||||||
m_bs_tilemap->set_scroll_rows(1);
|
m_bs_tilemap->set_scroll_rows(1);
|
||||||
m_bs_tilemap->set_transmask(0, 0x01, 0); /* pen 0 is transaprent */
|
m_bs_tilemap->set_transmask(0, 0x01, 0); // pen 0 is transparent
|
||||||
m_bs_tilemap->set_transmask(1, 0xff, 0); /* all 8 pens are transparent */
|
m_bs_tilemap->set_transmask(1, 0xff, 0); // all 8 pens are transparent
|
||||||
|
|
||||||
save_item(NAME(m_flip_x));
|
save_item(NAME(m_flip_x));
|
||||||
save_item(NAME(m_flip_y));
|
save_item(NAME(m_flip_y));
|
||||||
@ -490,8 +490,8 @@ VIDEO_START_MEMBER(cclimber_state,toprollr)
|
|||||||
m_bs_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cclimber_state::toprollr_get_bs_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
m_bs_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cclimber_state::toprollr_get_bs_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||||
m_bs_tilemap->set_scroll_cols(1);
|
m_bs_tilemap->set_scroll_cols(1);
|
||||||
m_bs_tilemap->set_scroll_rows(1);
|
m_bs_tilemap->set_scroll_rows(1);
|
||||||
m_bs_tilemap->set_transmask(0, 0x01, 0); /* pen 0 is transaprent */
|
m_bs_tilemap->set_transmask(0, 0x01, 0); // pen 0 is transparent
|
||||||
m_bs_tilemap->set_transmask(1, 0x0f, 0); /* all 4 pens are transparent */
|
m_bs_tilemap->set_transmask(1, 0x0f, 0); // all 4 pens are transparent
|
||||||
|
|
||||||
save_item(NAME(m_flip_x));
|
save_item(NAME(m_flip_x));
|
||||||
save_item(NAME(m_flip_y));
|
save_item(NAME(m_flip_y));
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders: Nicola Salmoria
|
// copyright-holders: Nicola Salmoria
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
||||||
Bank Panic / Combat Hawk hardware
|
Bank Panic / Combat Hawk hardware
|
||||||
@ -59,14 +58,11 @@
|
|||||||
315-5073 - PAL16L4 (protected)
|
315-5073 - PAL16L4 (protected)
|
||||||
315-5074 - PAL10L8 (read OK)
|
315-5074 - PAL10L8 (read OK)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
Bank Panic memory map (preliminary)
|
Bank Panic memory map (preliminary)
|
||||||
Similar to Appoooh
|
Similar to Appoooh
|
||||||
|
|
||||||
|
|
||||||
0000-dfff ROM
|
0000-dfff ROM
|
||||||
e000-e7ff RAM
|
e000-e7ff RAM
|
||||||
f000-f3ff Video RAM #1
|
f000-f3ff Video RAM #1
|
||||||
@ -86,11 +82,7 @@
|
|||||||
01 SN76496 #2
|
01 SN76496 #2
|
||||||
02 SN76496 #3
|
02 SN76496 #3
|
||||||
05 horizontal scroll
|
05 horizontal scroll
|
||||||
07 bit 0-1 = at least one of these two controls the playfield priority
|
07 video control
|
||||||
bit 2-3 = ?
|
|
||||||
bit 4 = NMI enable
|
|
||||||
bit 5 = flip screen
|
|
||||||
bit 6-7 = ?
|
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@ -122,6 +114,7 @@ public:
|
|||||||
void bankp(machine_config &config);
|
void bankp(machine_config &config);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void machine_start() override;
|
||||||
virtual void machine_reset() override;
|
virtual void machine_reset() override;
|
||||||
virtual void video_start() override;
|
virtual void video_start() override;
|
||||||
|
|
||||||
@ -138,38 +131,47 @@ private:
|
|||||||
// video-related
|
// video-related
|
||||||
tilemap_t *m_bg_tilemap = nullptr;
|
tilemap_t *m_bg_tilemap = nullptr;
|
||||||
tilemap_t *m_fg_tilemap = nullptr;
|
tilemap_t *m_fg_tilemap = nullptr;
|
||||||
|
|
||||||
uint8_t m_scroll_x = 0;
|
uint8_t m_scroll_x = 0;
|
||||||
uint8_t m_priority = 0;
|
uint8_t m_priority = 0;
|
||||||
|
uint8_t m_pen_hi = 0;
|
||||||
|
uint8_t m_display_on = 0;
|
||||||
uint8_t m_nmi_mask = 0;
|
uint8_t m_nmi_mask = 0;
|
||||||
|
|
||||||
void scroll_w(uint8_t data);
|
void scroll_w(uint8_t data);
|
||||||
template <uint8_t Which> void videoram_w(offs_t offset, uint8_t data);
|
template <uint8_t Which> void videoram_w(offs_t offset, uint8_t data);
|
||||||
template <uint8_t Which> void colorram_w(offs_t offset, uint8_t data);
|
template <uint8_t Which> void colorram_w(offs_t offset, uint8_t data);
|
||||||
void out_w(uint8_t data);
|
void video_control_w(uint8_t data);
|
||||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||||
void palette(palette_device &palette) const;
|
void palette(palette_device &palette) const;
|
||||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
INTERRUPT_GEN_MEMBER(vblank_irq);
|
INTERRUPT_GEN_MEMBER(vblank_interrupt);
|
||||||
void io_map(address_map &map);
|
void io_map(address_map &map);
|
||||||
void prg_map(address_map &map);
|
void prg_map(address_map &map);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void bankp_state::machine_start()
|
||||||
|
{
|
||||||
|
save_item(NAME(m_scroll_x));
|
||||||
|
save_item(NAME(m_priority));
|
||||||
|
save_item(NAME(m_pen_hi));
|
||||||
|
save_item(NAME(m_display_on));
|
||||||
|
save_item(NAME(m_nmi_mask));
|
||||||
|
}
|
||||||
|
|
||||||
|
void bankp_state::machine_reset()
|
||||||
|
{
|
||||||
|
video_control_w(0);
|
||||||
|
}
|
||||||
|
|
||||||
// video
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
||||||
Convert the color PROMs into a more useable format.
|
Convert the color PROMs into a more useable format.
|
||||||
|
|
||||||
Bank Panic has a 32x8 palette PROM (I'm not sure whether the second 16
|
Bank Panic has a 32x8 palette PROM and two 256x4 lookup table PROMs (one
|
||||||
bytes are used - they contain the same colors as the first 16 with only
|
for charset #1, one for charset #2 - only the first 128 nibbles are used).
|
||||||
one different) and two 256x4 lookup table PROMs (one for charset #1, one
|
|
||||||
for charset #2 - only the first 128 nibbles seem to be used).
|
|
||||||
|
|
||||||
I don't know for sure how the palette PROM is connected to the RGB output,
|
|
||||||
but it's probably the usual:
|
|
||||||
|
|
||||||
bit 7 -- 220 ohm resistor -- BLUE
|
bit 7 -- 220 ohm resistor -- BLUE
|
||||||
-- 470 ohm resistor -- BLUE
|
-- 470 ohm resistor -- BLUE
|
||||||
@ -212,20 +214,23 @@ void bankp_state::palette(palette_device &palette) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// color_prom now points to the beginning of the lookup table
|
// color_prom now points to the beginning of the lookup table
|
||||||
|
for (int i = 0; i < 0x100; i++)
|
||||||
|
{
|
||||||
|
// lookup tables are 256x4, but A7 is GND
|
||||||
|
int index = (i << 1 & 0x100) | (i & 0x7f);
|
||||||
|
|
||||||
// charset #1 lookup table
|
palette.set_pen_indirect(index, color_prom[index] & 0xf);
|
||||||
for (int i = 0; i < m_gfxdecode->gfx(0)->colors() * m_gfxdecode->gfx(0)->granularity(); i++)
|
palette.set_pen_indirect(index | 0x80, (color_prom[index] & 0xf) | 0x10);
|
||||||
palette.set_pen_indirect(m_gfxdecode->gfx(0)->colorbase() + i, *color_prom++ & 0x0f);
|
}
|
||||||
|
|
||||||
color_prom += 128; // skip the bottom half of the PROM - seems to be not used
|
|
||||||
|
|
||||||
// charset #2 lookup table
|
|
||||||
for (int i = 0; i < m_gfxdecode->gfx(1)->colors() * m_gfxdecode->gfx(1)->granularity(); i++)
|
|
||||||
palette.set_pen_indirect(m_gfxdecode->gfx(1)->colorbase() + i, *color_prom++ & 0x0f);
|
|
||||||
|
|
||||||
// the bottom half of the PROM seems to be not used
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************
|
||||||
|
*
|
||||||
|
* Tilemaps
|
||||||
|
*
|
||||||
|
*************************************/
|
||||||
|
|
||||||
void bankp_state::scroll_w(uint8_t data)
|
void bankp_state::scroll_w(uint8_t data)
|
||||||
{
|
{
|
||||||
m_scroll_x = data;
|
m_scroll_x = data;
|
||||||
@ -245,58 +250,75 @@ void bankp_state::colorram_w(offs_t offset, uint8_t data)
|
|||||||
Which ? m_bg_tilemap->mark_tile_dirty(offset) : m_fg_tilemap->mark_tile_dirty(offset);
|
Which ? m_bg_tilemap->mark_tile_dirty(offset) : m_fg_tilemap->mark_tile_dirty(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bankp_state::out_w(uint8_t data)
|
void bankp_state::video_control_w(uint8_t data)
|
||||||
{
|
{
|
||||||
// bits 0-1 are playfield priority
|
// bits 0-1 are playfield priority
|
||||||
// TODO: understand how this works
|
// TODO: understand how this works
|
||||||
m_priority = data & 0x03;
|
m_priority = data & 0x03;
|
||||||
|
|
||||||
// bits 2-3 unknown (2 is used)
|
// bit 2 turns on display
|
||||||
|
m_display_on = BIT(data, 2);
|
||||||
|
|
||||||
// bit 4 controls NMI
|
// bit 3 controls pen high bit
|
||||||
m_nmi_mask = (data & 0x10) >> 4;
|
if (m_pen_hi != BIT(data, 3))
|
||||||
|
{
|
||||||
|
m_pen_hi = BIT(data, 3);
|
||||||
|
machine().tilemap().mark_all_dirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
// bit 4 enables vblank NMI
|
||||||
|
m_nmi_mask = BIT(data, 4);
|
||||||
|
|
||||||
// bit 5 controls screen flip
|
// bit 5 controls screen flip
|
||||||
flip_screen_set(data & 0x20);
|
flip_screen_set(BIT(data, 5));
|
||||||
|
|
||||||
// bits 6-7 unknown
|
// bits 6-7 N/C
|
||||||
|
}
|
||||||
|
|
||||||
|
TILE_GET_INFO_MEMBER(bankp_state::get_fg_tile_info)
|
||||||
|
{
|
||||||
|
int const code = m_videoram[0][tile_index] + 256 * (m_colorram[0][tile_index] & 0x03);
|
||||||
|
int const color = (m_colorram[0][tile_index] >> 3) | (m_pen_hi << 5);
|
||||||
|
int const flags = (m_colorram[0][tile_index] & 0x04) ? TILE_FLIPX : 0;
|
||||||
|
|
||||||
|
tileinfo.set(0, code, color, flags);
|
||||||
|
tileinfo.group = color & 0x1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
TILE_GET_INFO_MEMBER(bankp_state::get_bg_tile_info)
|
TILE_GET_INFO_MEMBER(bankp_state::get_bg_tile_info)
|
||||||
{
|
{
|
||||||
int const code = m_videoram[1][tile_index] + 256 * (m_colorram[1][tile_index] & 0x07);
|
int const code = m_videoram[1][tile_index] + 256 * (m_colorram[1][tile_index] & 0x07);
|
||||||
int const color = m_colorram[1][tile_index] >> 4;
|
int const color = (m_colorram[1][tile_index] >> 4) | (m_pen_hi << 4);
|
||||||
int const flags = (m_colorram[1][tile_index] & 0x08) ? TILE_FLIPX : 0;
|
int const flags = (m_colorram[1][tile_index] & 0x08) ? TILE_FLIPX : 0;
|
||||||
|
|
||||||
tileinfo.set(1, code, color, flags);
|
tileinfo.set(1, code, color, flags);
|
||||||
tileinfo.group = color;
|
tileinfo.group = color & 0xf;
|
||||||
}
|
|
||||||
|
|
||||||
TILE_GET_INFO_MEMBER(bankp_state::get_fg_tile_info)
|
|
||||||
{
|
|
||||||
int const code = m_videoram[0][tile_index] + 256 * ((m_colorram[0][tile_index] & 3) >> 0);
|
|
||||||
int const color = m_colorram[0][tile_index] >> 3;
|
|
||||||
int const flags = (m_colorram[0][tile_index] & 0x04) ? TILE_FLIPX : 0;
|
|
||||||
|
|
||||||
tileinfo.set(0, code, color, flags);
|
|
||||||
tileinfo.group = color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void bankp_state::video_start()
|
void bankp_state::video_start()
|
||||||
{
|
{
|
||||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bankp_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
|
||||||
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bankp_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bankp_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||||
|
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bankp_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||||
|
|
||||||
m_bg_tilemap->configure_groups(*m_gfxdecode->gfx(1), 0);
|
|
||||||
m_fg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0);
|
m_fg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0);
|
||||||
|
m_bg_tilemap->configure_groups(*m_gfxdecode->gfx(1), 0);
|
||||||
save_item(NAME(m_scroll_x));
|
|
||||||
save_item(NAME(m_priority));
|
|
||||||
save_item(NAME(m_nmi_mask));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************
|
||||||
|
*
|
||||||
|
* Screen update
|
||||||
|
*
|
||||||
|
*************************************/
|
||||||
|
|
||||||
uint32_t bankp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
uint32_t bankp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
|
if (!m_display_on)
|
||||||
|
{
|
||||||
|
bitmap.fill(m_palette->black_pen(), cliprect);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (flip_screen())
|
if (flip_screen())
|
||||||
{
|
{
|
||||||
m_fg_tilemap->set_scrollx(0, 240 - m_scroll_x);
|
m_fg_tilemap->set_scrollx(0, 240 - m_scroll_x);
|
||||||
@ -308,33 +330,31 @@ uint32_t bankp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
|
|||||||
m_bg_tilemap->set_scrollx(0, 0);
|
m_bg_tilemap->set_scrollx(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// only one bit matters?
|
// only one bit matters?
|
||||||
switch (m_priority)
|
switch (m_priority)
|
||||||
{
|
{
|
||||||
case 0: // combat hawk uses this
|
case 0: // combat hawk uses this
|
||||||
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE);
|
||||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
m_fg_tilemap->draw(screen, bitmap, cliprect);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE);
|
||||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
m_fg_tilemap->draw(screen, bitmap, cliprect);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE);
|
||||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
m_bg_tilemap->draw(screen, bitmap, cliprect);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); // just a guess
|
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE); // just a guess
|
||||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
m_bg_tilemap->draw(screen, bitmap, cliprect);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// machine
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
* Address maps
|
* Address maps
|
||||||
@ -359,7 +379,7 @@ void bankp_state::io_map(address_map &map)
|
|||||||
map(0x02, 0x02).portr("IN2").w("sn3", FUNC(sn76489_device::write));
|
map(0x02, 0x02).portr("IN2").w("sn3", FUNC(sn76489_device::write));
|
||||||
map(0x04, 0x04).portr("DSW1");
|
map(0x04, 0x04).portr("DSW1");
|
||||||
map(0x05, 0x05).w(FUNC(bankp_state::scroll_w));
|
map(0x05, 0x05).w(FUNC(bankp_state::scroll_w));
|
||||||
map(0x07, 0x07).w(FUNC(bankp_state::out_w));
|
map(0x07, 0x07).w(FUNC(bankp_state::video_control_w));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -487,24 +507,18 @@ static const gfx_layout charlayout2 =
|
|||||||
};
|
};
|
||||||
|
|
||||||
static GFXDECODE_START( gfx_bankp )
|
static GFXDECODE_START( gfx_bankp )
|
||||||
GFXDECODE_ENTRY( "fgtiles", 0, charlayout, 0, 32 )
|
GFXDECODE_ENTRY( "fgtiles", 0, charlayout, 0, 64 )
|
||||||
GFXDECODE_ENTRY( "bgtiles", 0, charlayout2, 32*4, 16 )
|
GFXDECODE_ENTRY( "bgtiles", 0, charlayout2, 64*4, 32 )
|
||||||
GFXDECODE_END
|
GFXDECODE_END
|
||||||
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
* Machine driver
|
* Machine driver
|
||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
void bankp_state::machine_reset()
|
INTERRUPT_GEN_MEMBER(bankp_state::vblank_interrupt)
|
||||||
{
|
|
||||||
m_scroll_x = 0;
|
|
||||||
m_priority = 0;
|
|
||||||
m_nmi_mask = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
INTERRUPT_GEN_MEMBER(bankp_state::vblank_irq)
|
|
||||||
{
|
{
|
||||||
if (m_nmi_mask)
|
if (m_nmi_mask)
|
||||||
device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
||||||
@ -531,8 +545,7 @@ void bankp_state::bankp(machine_config &config)
|
|||||||
Z80(config, m_maincpu, MASTER_CLOCK / 6);
|
Z80(config, m_maincpu, MASTER_CLOCK / 6);
|
||||||
m_maincpu->set_addrmap(AS_PROGRAM, &bankp_state::prg_map);
|
m_maincpu->set_addrmap(AS_PROGRAM, &bankp_state::prg_map);
|
||||||
m_maincpu->set_addrmap(AS_IO, &bankp_state::io_map);
|
m_maincpu->set_addrmap(AS_IO, &bankp_state::io_map);
|
||||||
m_maincpu->set_vblank_int("screen", FUNC(bankp_state::vblank_irq));
|
m_maincpu->set_vblank_int("screen", FUNC(bankp_state::vblank_interrupt));
|
||||||
|
|
||||||
|
|
||||||
// video hardware
|
// video hardware
|
||||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||||
@ -541,20 +554,17 @@ void bankp_state::bankp(machine_config &config)
|
|||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_bankp);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_bankp);
|
||||||
PALETTE(config, m_palette, FUNC(bankp_state::palette), 32 * 4 + 16 * 8, 32);
|
PALETTE(config, m_palette, FUNC(bankp_state::palette), 512, 32);
|
||||||
|
|
||||||
// sound hardware
|
// sound hardware
|
||||||
SPEAKER(config, "mono").front_center();
|
SPEAKER(config, "mono").front_center();
|
||||||
|
|
||||||
SN76489(config, "sn1", MASTER_CLOCK / 6).add_route(ALL_OUTPUTS, "mono", 1.0);
|
SN76489(config, "sn1", MASTER_CLOCK / 6).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||||
|
|
||||||
SN76489(config, "sn2", MASTER_CLOCK / 6).add_route(ALL_OUTPUTS, "mono", 1.0);
|
SN76489(config, "sn2", MASTER_CLOCK / 6).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||||
|
|
||||||
SN76489(config, "sn3", MASTER_CLOCK / 6).add_route(ALL_OUTPUTS, "mono", 1.0);
|
SN76489(config, "sn3", MASTER_CLOCK / 6).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
* ROM definition(s)
|
* ROM definition(s)
|
||||||
@ -612,8 +622,8 @@ ROM_START( combh )
|
|||||||
|
|
||||||
ROM_REGION( 0x0220, "proms", 0 )
|
ROM_REGION( 0x0220, "proms", 0 )
|
||||||
ROM_LOAD( "pr-10900.8a", 0x0000, 0x020, CRC(f95fcd66) SHA1(ed7bf6691a942f344b0230310876a63a68606922) ) // palette
|
ROM_LOAD( "pr-10900.8a", 0x0000, 0x020, CRC(f95fcd66) SHA1(ed7bf6691a942f344b0230310876a63a68606922) ) // palette
|
||||||
ROM_LOAD( "pr-10901.6f", 0x0020, 0x100, CRC(6fd981c8) SHA1(0bd2e7b72fd5e055224a675108e2e706cd6f6e5a) ) // bgtiles lookup table
|
ROM_LOAD( "pr-10901.6f", 0x0020, 0x100, CRC(6fd981c8) SHA1(0bd2e7b72fd5e055224a675108e2e706cd6f6e5a) ) // fgtiles lookup table
|
||||||
ROM_LOAD( "pr-10902.5a", 0x0120, 0x100, CRC(84d6bded) SHA1(67d9c4c7d7c84eb54ec655a4cf1768ca0cbb047d) ) // fgtiles lookup table
|
ROM_LOAD( "pr-10902.5a", 0x0120, 0x100, CRC(84d6bded) SHA1(67d9c4c7d7c84eb54ec655a4cf1768ca0cbb047d) ) // bgtiles lookup table
|
||||||
|
|
||||||
ROM_REGION( 0x025c, "user1", 0 )
|
ROM_REGION( 0x025c, "user1", 0 )
|
||||||
ROM_LOAD( "315-5074.2c.bin", 0x0000, 0x025b, CRC(2e57bbba) SHA1(c3e45e8a972342779442e50872a2f5f2d61e9c0a) )
|
ROM_LOAD( "315-5074.2c.bin", 0x0000, 0x025b, CRC(2e57bbba) SHA1(c3e45e8a972342779442e50872a2f5f2d61e9c0a) )
|
||||||
|
Loading…
Reference in New Issue
Block a user