This commit is contained in:
Michaël Banaan Ananas 2012-09-25 02:21:15 +00:00
parent dcccfc3d36
commit bb40e5f86a
3 changed files with 360 additions and 270 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ public:
/* device- and memory pointers */ /* device- and memory pointers */
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu; required_device<cpu_device> m_audiocpu;
required_shared_ptr<UINT8> m_spriteram; optional_shared_ptr<UINT8> m_spriteram;
optional_shared_ptr<UINT8> m_scrollram; optional_shared_ptr<UINT8> m_scrollram;
required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_colorram; required_shared_ptr<UINT8> m_colorram;
@ -58,8 +58,13 @@ public:
TILE_GET_INFO_MEMBER(joinem_get_bg_tile_info); TILE_GET_INFO_MEMBER(joinem_get_bg_tile_info);
DECLARE_VIDEO_START(joinem); DECLARE_VIDEO_START(joinem);
DECLARE_PALETTE_INIT(joinem); DECLARE_PALETTE_INIT(joinem);
DECLARE_MACHINE_START(striv);
DECLARE_MACHINE_RESET(striv);
DECLARE_MACHINE_START(joinem);
DECLARE_MACHINE_RESET(joinem);
UINT32 screen_update_jack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_jack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_striv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_joinem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_joinem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_start(); virtual void machine_start();

View File

@ -10,6 +10,7 @@
#include "includes/jack.h" #include "includes/jack.h"
WRITE8_MEMBER(jack_state::jack_videoram_w) WRITE8_MEMBER(jack_state::jack_videoram_w)
{ {
m_videoram[offset] = data; m_videoram[offset] = data;
@ -39,6 +40,9 @@ WRITE8_MEMBER(jack_state::jack_flipscreen_w)
flip_screen_set(offset); flip_screen_set(offset);
} }
/**************************************************************************/
TILE_GET_INFO_MEMBER(jack_state::get_bg_tile_info) TILE_GET_INFO_MEMBER(jack_state::get_bg_tile_info)
{ {
int code = m_videoram[tile_index] + ((m_colorram[tile_index] & 0x18) << 5); int code = m_videoram[tile_index] + ((m_colorram[tile_index] & 0x18) << 5);
@ -60,6 +64,9 @@ void jack_state::video_start()
m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(jack_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(jack_state::tilemap_scan_cols_flipy),this), 8, 8, 32, 32); m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(jack_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(jack_state::tilemap_scan_cols_flipy),this), 8, 8, 32, 32);
} }
/**************************************************************************/
static void jack_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect ) static void jack_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
{ {
jack_state *state = machine.driver_data<jack_state>(); jack_state *state = machine.driver_data<jack_state>();
@ -98,10 +105,25 @@ UINT32 jack_state::screen_update_jack(screen_device &screen, bitmap_ind16 &bitma
return 0; return 0;
} }
/*
UINT32 jack_state::screen_update_striv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
// no sprites
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
return 0;
}
/***************************************************************************
Joinem has a bit different video hardware with proms based palette, Joinem has a bit different video hardware with proms based palette,
3bpp gfx and different banking / colors bits 3bpp gfx and different banking / colors bits
*/
***************************************************************************/
WRITE8_MEMBER(jack_state::joinem_scroll_w) WRITE8_MEMBER(jack_state::joinem_scroll_w)
{ {
@ -120,6 +142,9 @@ WRITE8_MEMBER(jack_state::joinem_scroll_w)
m_scrollram[offset] = data; m_scrollram[offset] = data;
} }
/**************************************************************************/
PALETTE_INIT_MEMBER(jack_state,joinem) PALETTE_INIT_MEMBER(jack_state,joinem)
{ {
const UINT8 *color_prom = machine().root_device().memregion("proms")->base(); const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
@ -145,6 +170,7 @@ PALETTE_INIT_MEMBER(jack_state,joinem)
} }
} }
TILE_GET_INFO_MEMBER(jack_state::joinem_get_bg_tile_info) TILE_GET_INFO_MEMBER(jack_state::joinem_get_bg_tile_info)
{ {
int code = m_videoram[tile_index] + ((m_colorram[tile_index] & 0x03) << 8); int code = m_videoram[tile_index] + ((m_colorram[tile_index] & 0x03) << 8);
@ -159,6 +185,9 @@ VIDEO_START_MEMBER(jack_state,joinem)
m_bg_tilemap->set_scroll_cols(32); m_bg_tilemap->set_scroll_cols(32);
} }
/**************************************************************************/
static void joinem_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect ) static void joinem_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
{ {
jack_state *state = machine.driver_data<jack_state>(); jack_state *state = machine.driver_data<jack_state>();