mirror of
https://github.com/holub/mame
synced 2025-05-21 13:18:56 +03:00
Taito device tilemap assert fixes, and clean up of obsolete stuff (nw)
This commit is contained in:
parent
970fc85e7a
commit
b33ff1a101
@ -676,9 +676,9 @@ static const gfx_layout char2layout =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( darius )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 256 ) /* sprites */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 256 ) /* scr tiles */
|
||||
GFXDECODE_ENTRY( "gfx3", 0, char2layout, 0, 256 ) /* top layer scr tiles */
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 128 ) /* sprites */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 128 ) /* scr tiles */
|
||||
GFXDECODE_ENTRY( "gfx3", 0, char2layout, 0, 128 ) /* top layer scr tiles */
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -764,7 +764,7 @@ static MACHINE_CONFIG_START( darius, darius_state )
|
||||
|
||||
/* video hardware */
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", darius)
|
||||
MCFG_PALETTE_ADD("palette", 4096*2)
|
||||
MCFG_PALETTE_ADD("palette", 2048)
|
||||
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
|
||||
MCFG_DEFAULT_LAYOUT(layout_darius)
|
||||
|
||||
|
@ -666,13 +666,13 @@ static const gfx_layout tilelayout_b =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( opwolf )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 256 ) /* sprites */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 256 ) /* scr tiles */
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 128 ) /* sprites */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 128 ) /* scr tiles */
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( opwolfb )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout_b, 0, 256 ) /* sprites */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout_b, 0, 256 ) /* scr tiles */
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout_b, 0, 128 ) /* sprites */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout_b, 0, 128 ) /* scr tiles */
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -704,7 +704,7 @@ static MACHINE_CONFIG_START( opwolf, opwolf_state )
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", opwolf)
|
||||
MCFG_PALETTE_ADD("palette", 8192)
|
||||
MCFG_PALETTE_ADD("palette", 2048)
|
||||
MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB)
|
||||
|
||||
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
|
||||
@ -770,7 +770,7 @@ static MACHINE_CONFIG_START( opwolfb, opwolf_state ) /* OSC clocks unknown for t
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", opwolfb)
|
||||
MCFG_PALETTE_ADD("palette", 8192)
|
||||
MCFG_PALETTE_ADD("palette", 2048)
|
||||
MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB)
|
||||
|
||||
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
|
||||
|
@ -646,7 +646,7 @@ static MACHINE_CONFIG_START( rbisland, rbisland_state )
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", rbisland)
|
||||
MCFG_PALETTE_ADD("palette", 8192)
|
||||
MCFG_PALETTE_ADD("palette", 2048)
|
||||
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
|
||||
|
||||
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
|
||||
@ -697,7 +697,7 @@ static MACHINE_CONFIG_START( jumping, rbisland_state )
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", jumping)
|
||||
MCFG_PALETTE_ADD("palette", 8192)
|
||||
MCFG_PALETTE_ADD("palette", 2048)
|
||||
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(rbisland_state,jumping)
|
||||
|
@ -376,7 +376,7 @@ static MACHINE_CONFIG_START( rastan, rastan_state )
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", rastan)
|
||||
MCFG_PALETTE_ADD("palette", 8192)
|
||||
MCFG_PALETTE_ADD("palette", 2048)
|
||||
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
|
||||
|
||||
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
|
||||
|
@ -446,7 +446,7 @@ static const gfx_layout slapshot_charlayout =
|
||||
|
||||
static GFXDECODE_START( slapshot )
|
||||
GFXDECODE_ENTRY( "gfx2", 0x0, tilelayout, 0, 256 ) /* sprite parts */
|
||||
GFXDECODE_ENTRY( "gfx1", 0x0, slapshot_charlayout, 0, 256 ) /* sprites & playfield */
|
||||
GFXDECODE_ENTRY( "gfx1", 0x0, slapshot_charlayout, 4096, 256 ) /* sprites & playfield */
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -514,7 +514,7 @@ static MACHINE_CONFIG_START( slapshot, slapshot_state )
|
||||
MCFG_TC0480SCP_OFFSETS(30 + 3, 9)
|
||||
MCFG_TC0480SCP_OFFSETS_TX(-1, -1)
|
||||
MCFG_TC0480SCP_OFFSETS_FLIP(0, 2)
|
||||
MCFG_TC0480SCP_COL_BASE(256)
|
||||
MCFG_TC0480SCP_COL_BASE(4096)
|
||||
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
|
||||
MCFG_TC0480SCP_PALETTE("palette")
|
||||
|
||||
@ -575,7 +575,7 @@ static MACHINE_CONFIG_START( opwolf3, slapshot_state )
|
||||
MCFG_TC0480SCP_OFFSETS(30 + 3, 9)
|
||||
MCFG_TC0480SCP_OFFSETS_TX(-1, -1)
|
||||
MCFG_TC0480SCP_OFFSETS_FLIP(0, 2)
|
||||
MCFG_TC0480SCP_COL_BASE(256)
|
||||
MCFG_TC0480SCP_COL_BASE(4096)
|
||||
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
|
||||
MCFG_TC0480SCP_PALETTE("palette")
|
||||
|
||||
|
@ -2792,17 +2792,27 @@ static const gfx_layout footchmpbl_tilelayout =
|
||||
RGN_FRAC(1,4),
|
||||
4, /* 4 bits per pixel */
|
||||
{ RGN_FRAC(0,4), RGN_FRAC(1,4),RGN_FRAC(2,4),RGN_FRAC(3,4) },
|
||||
{ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
|
||||
{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16, 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
|
||||
{ STEP16(0,1) },
|
||||
{ STEP16(0,16) },
|
||||
16*16 /* every sprite takes 128 consecutive bytes */
|
||||
};
|
||||
|
||||
static const gfx_layout footchmpbl_charlayout =
|
||||
{
|
||||
8,8, /* 16*16 sprites */
|
||||
256, /* the ROMs are mostly empty */
|
||||
4, /* 4 bits per pixel */
|
||||
{ RGN_FRAC(0,4), RGN_FRAC(1,4),RGN_FRAC(2,4),RGN_FRAC(3,4) },
|
||||
{ STEP8(0,1) },
|
||||
{ STEP8(0,8) },
|
||||
8*8 /* every sprite takes 128 consecutive bytes */
|
||||
};
|
||||
|
||||
static GFXDECODE_START( footchmpbl )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, footchmpbl_tilelayout, 0, 256 ) /* sprites & playfield */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, footchmpbl_tilelayout, 0, 256 ) /* sprites & playfield */
|
||||
GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_tilelayout, 0, 256 ) // gets wiped out by the dynamic decode atm
|
||||
GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_tilelayout, 0, 256 ) // bootleg should clearly use this instead of the uploaded tiles
|
||||
GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_charlayout, 0, 256 ) // gets wiped out by the dynamic decode atm
|
||||
GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_charlayout, 0, 256 ) // bootleg should clearly use this instead of the uploaded tiles
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -3417,7 +3427,7 @@ static MACHINE_CONFIG_DERIVED( metalb, taito_f2_tc0510nio )
|
||||
MCFG_TC0480SCP_OFFSETS(0x32 + 3, -0x04)
|
||||
MCFG_TC0480SCP_OFFSETS_TX(1, 0)
|
||||
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
|
||||
MCFG_TC0480SCP_COL_BASE(256)
|
||||
MCFG_TC0480SCP_COL_BASE(4096)
|
||||
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
|
||||
MCFG_TC0480SCP_PALETTE("palette")
|
||||
|
||||
|
@ -516,7 +516,7 @@ static const gfx_layout charlayout =
|
||||
|
||||
static GFXDECODE_START( topspeed )
|
||||
GFXDECODE_ENTRY( "gfx2", 0x0, tile16x8_layout, 0, 256 ) // Sprite parts
|
||||
GFXDECODE_ENTRY( "gfx1", 0x0, charlayout, 0, 256 ) // Sprites & playfield
|
||||
GFXDECODE_ENTRY( "gfx1", 0x0, charlayout, 0, 512 ) // Sprites & playfield
|
||||
// Road Lines gfxdecodable ?
|
||||
GFXDECODE_END
|
||||
|
||||
|
@ -124,7 +124,6 @@ public:
|
||||
UINT32 screen_update_darius_middle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_darius_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void darius_postload();
|
||||
inline void actual_get_fg_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum );
|
||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int primask, int x_offs, int y_offs );
|
||||
UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs);
|
||||
void parse_control( ) /* assumes Z80 sandwiched between 68Ks */;
|
||||
|
@ -70,7 +70,6 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(tc0100scn_triple_screen_w);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_ninjaw_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_ninjaw_middle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_ninjaw_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
@ -64,7 +64,6 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(tc0100scn_dual_screen_w);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_warriorb_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_warriorb_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void reset_sound_region();
|
||||
|
@ -3,26 +3,22 @@
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
inline void darius_state::actual_get_fg_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum )
|
||||
{
|
||||
UINT16 code = (ram[tile_index + 0x2000] & 0x7ff);
|
||||
UINT16 attr = ram[tile_index];
|
||||
|
||||
SET_TILE_INFO_MEMBER(gfxnum,
|
||||
code,
|
||||
((attr & 0xff) << 2),
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(darius_state::get_fg_tile_info)
|
||||
{
|
||||
actual_get_fg_tile_info(tileinfo, tile_index, m_fg_ram, 2);
|
||||
UINT16 code = (m_fg_ram[tile_index + 0x2000] & 0x7ff);
|
||||
UINT16 attr = m_fg_ram[tile_index];
|
||||
|
||||
SET_TILE_INFO_MEMBER(2,
|
||||
code,
|
||||
(attr & 0x7f),
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
void darius_state::video_start()
|
||||
{
|
||||
m_gfxdecode->gfx(2)->set_granularity(16);
|
||||
m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(darius_state::get_fg_tile_info),this),TILEMAP_SCAN_ROWS,8,8,128,64);
|
||||
|
||||
m_fg_tilemap->set_transparent_pen(0);
|
||||
|
@ -1,14 +1,6 @@
|
||||
#include "emu.h"
|
||||
#include "includes/ninjaw.h"
|
||||
|
||||
/**********************************************************/
|
||||
|
||||
void ninjaw_state::video_start()
|
||||
{
|
||||
/* Ensure palette from correct TC0110PCR used for each screen */
|
||||
m_tc0100scn_1->set_colbanks(0x0, 0x100, 0x200);
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
SPRITE DRAW ROUTINE
|
||||
************************************************************/
|
||||
|
@ -191,7 +191,7 @@ void tc0080vco_device::device_start()
|
||||
m_scroll_ram = m_ram + 0x20800 / 2;
|
||||
|
||||
/* create the char set (gfx will then be updated dynamically from RAM) */
|
||||
m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, charlayout, (UINT8 *)m_char_ram, 0, 64, 0)));
|
||||
m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, charlayout, (UINT8 *)m_char_ram, 0, 1, 512)));
|
||||
|
||||
save_pointer(NAME(m_ram), TC0080VCO_RAM_SIZE / 2);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_device::postload), this));
|
||||
@ -273,8 +273,8 @@ TILE_GET_INFO_MEMBER(tc0080vco_device::get_tx_tile_info)
|
||||
|
||||
SET_TILE_INFO_MEMBER(m_txnum,
|
||||
tile,
|
||||
0x40,
|
||||
0); /* 0x20<<1 as 3bpp */
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,11 +132,8 @@ tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *ta
|
||||
m_bgscrolly(0),
|
||||
m_fgscrollx(0),
|
||||
m_fgscrolly(0),
|
||||
m_bg_col_mult(0),
|
||||
m_bg_tilemask(0),
|
||||
m_tx_col_mult(0),
|
||||
m_gfxbank(0),
|
||||
m_colbank(0),
|
||||
m_bg0_colbank(0),
|
||||
m_bg1_colbank(0),
|
||||
m_tx_colbank(0),
|
||||
@ -257,27 +254,24 @@ void tc0100scn_device::device_start()
|
||||
|
||||
m_bg_tilemask = 0xffff; /* Mjnquest has 0x7fff tilemask */
|
||||
|
||||
m_bg_col_mult = 1; /* multiplier for when bg gfx != 4bpp */
|
||||
m_tx_col_mult = 1; /* multiplier needed when bg gfx is 6bpp */
|
||||
|
||||
if (m_gfxdecode->gfx(m_gfxnum)->granularity() == 2) /* Yuyugogo, Yesnoj */
|
||||
m_bg_col_mult = 8;
|
||||
|
||||
if (m_gfxdecode->gfx(m_gfxnum)->granularity() == 0x40) /* Undrfire */
|
||||
m_tx_col_mult = 4;
|
||||
|
||||
//logerror("TC0100SCN bg gfx granularity %04x: multiplier %04x\n", m_gfxdecode->gfx(m_gfxnum)->granularity(), m_tx_col_mult);
|
||||
|
||||
m_ram = auto_alloc_array_clear(machine(), UINT16, TC0100SCN_RAM_SIZE / 2);
|
||||
|
||||
set_layer_ptrs();
|
||||
|
||||
/* create the char set (gfx will then be updated dynamically from RAM) */
|
||||
m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, tc0100scn_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 256, 0)));
|
||||
|
||||
gfx_element *gfx = m_gfxdecode->gfx(m_gfxnum);
|
||||
gfx_element *txt = m_gfxdecode->gfx(m_txnum);
|
||||
|
||||
if (gfx->granularity() == 2) /* Yuyugogo, Yesnoj */
|
||||
gfx->set_granularity(16);
|
||||
|
||||
txt->set_granularity(gfx->granularity());
|
||||
|
||||
set_colbanks(0, 0, 0); /* standard values, only Wgp & multiscreen games change them */
|
||||
/* we call this here, so that they can be modified at video_start*/
|
||||
|
||||
/* create the char set (gfx will then be updated dynamically from RAM) */
|
||||
m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, tc0100scn_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, 0)));
|
||||
|
||||
save_pointer(NAME(m_ram), TC0100SCN_RAM_SIZE / 2);
|
||||
save_item(NAME(m_ctrl));
|
||||
save_item(NAME(m_dblwidth));
|
||||
@ -292,7 +286,6 @@ void tc0100scn_device::device_start()
|
||||
void tc0100scn_device::device_reset()
|
||||
{
|
||||
m_dblwidth = 0;
|
||||
m_colbank = 0;
|
||||
m_gfxbank = 0; /* Mjnquest uniquely banks tiles */
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
@ -304,11 +297,11 @@ void tc0100scn_device::device_reset()
|
||||
DEVICE HANDLERS
|
||||
*****************************************************************************/
|
||||
|
||||
void tc0100scn_device::common_get_bg0_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
|
||||
void tc0100scn_device::common_get_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int colbank )
|
||||
{
|
||||
int code, attr;
|
||||
|
||||
if (!dblwidth)
|
||||
if (!m_dblwidth)
|
||||
{
|
||||
/* Mahjong Quest (F2 system) inexplicably has a banking feature */
|
||||
code = (ram[2 * tile_index + 1] & m_bg_tilemask) + (m_gfxbank << 15);
|
||||
@ -320,62 +313,30 @@ void tc0100scn_device::common_get_bg0_tile_info( tile_data &tileinfo, int tile_i
|
||||
attr = ram[2 * tile_index];
|
||||
}
|
||||
|
||||
SET_TILE_INFO_MEMBER(gfxnum,
|
||||
SET_TILE_INFO_MEMBER(m_gfxnum,
|
||||
code,
|
||||
(((attr * m_bg_col_mult) + m_bg0_colbank) & 0xff) + colbank,
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
void tc0100scn_device::common_get_bg1_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
|
||||
{
|
||||
int code, attr;
|
||||
|
||||
if (!dblwidth)
|
||||
{
|
||||
/* Mahjong Quest (F2 system) inexplicably has a banking feature */
|
||||
code = (ram[2 * tile_index + 1] & m_bg_tilemask) + (m_gfxbank << 15);
|
||||
attr = ram[2 * tile_index];
|
||||
}
|
||||
else
|
||||
{
|
||||
code = ram[2 * tile_index + 1] & m_bg_tilemask;
|
||||
attr = ram[2 * tile_index];
|
||||
}
|
||||
|
||||
SET_TILE_INFO_MEMBER(gfxnum,
|
||||
code,
|
||||
(((attr * m_bg_col_mult) + m_bg1_colbank) & 0xff) + colbank,
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
void tc0100scn_device::common_get_tx_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth )
|
||||
{
|
||||
int attr = ram[tile_index];
|
||||
|
||||
SET_TILE_INFO_MEMBER(gfxnum,
|
||||
attr & 0xff,
|
||||
((((attr >> 6) & 0xfc) * m_tx_col_mult + (m_tx_colbank << 2)) & 0x3ff) + colbank * 4,
|
||||
((attr + colbank) & 0xff),
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(tc0100scn_device::get_bg_tile_info)
|
||||
{
|
||||
common_get_bg0_tile_info(tileinfo, tile_index, m_bg_ram, m_gfxnum, m_colbank, m_dblwidth);
|
||||
common_get_tile_info(tileinfo, tile_index, m_bg_ram, m_bg0_colbank);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(tc0100scn_device::get_fg_tile_info)
|
||||
{
|
||||
common_get_bg1_tile_info(tileinfo, tile_index, m_fg_ram, m_gfxnum, m_colbank, m_dblwidth);
|
||||
common_get_tile_info(tileinfo, tile_index, m_fg_ram, m_bg1_colbank);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(tc0100scn_device::get_tx_tile_info)
|
||||
{
|
||||
common_get_tx_tile_info(tileinfo, tile_index, m_tx_ram, m_txnum, m_colbank, m_dblwidth);
|
||||
}
|
||||
int attr = m_tx_ram[tile_index];
|
||||
|
||||
void tc0100scn_device::set_colbank( int col )
|
||||
{
|
||||
m_colbank = col;
|
||||
SET_TILE_INFO_MEMBER(m_txnum,
|
||||
attr & 0x00ff,
|
||||
((attr & 0x3f00) >> 8) + m_tx_colbank,
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
void tc0100scn_device::set_colbanks( int bg0, int bg1, int tx )
|
||||
|
@ -39,10 +39,6 @@ public:
|
||||
To change from the default (0,0,0) use after calling TC0100SCN_vh_start */
|
||||
void set_colbanks(int bg0, int bg1, int tx);
|
||||
|
||||
/* Function to set separate color banks for each TC0100SCN.
|
||||
To change from the default (0,0,0) use after calling TC0100SCN_vh_start */
|
||||
void set_colbank(int colbank);
|
||||
|
||||
/* Function to set bg tilemask < 0xffff */
|
||||
void set_bg_tilemask(int mask);
|
||||
|
||||
@ -92,8 +88,8 @@ private:
|
||||
/* We keep two tilemaps for each of the 3 actual tilemaps: one at standard width, one double */
|
||||
tilemap_t *m_tilemap[3][2];
|
||||
|
||||
int m_bg_col_mult, m_bg_tilemask, m_tx_col_mult;
|
||||
INT32 m_gfxbank, m_colbank;
|
||||
int m_bg_tilemask;
|
||||
INT32 m_gfxbank;
|
||||
INT32 m_bg0_colbank, m_bg1_colbank, m_tx_colbank;
|
||||
int m_dblwidth;
|
||||
|
||||
@ -112,9 +108,7 @@ private:
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_tx_tile_info);
|
||||
|
||||
void common_get_bg0_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth);
|
||||
void common_get_bg1_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth);
|
||||
void common_get_tx_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth);
|
||||
void common_get_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int colbank);
|
||||
|
||||
void tilemap_draw_fg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, UINT32 priority);
|
||||
void set_layer_ptrs();
|
||||
|
@ -282,7 +282,8 @@ void tc0480scp_device::device_start()
|
||||
set_layer_ptrs();
|
||||
|
||||
/* create the char set (gfx will then be updated dynamically from RAM) */
|
||||
m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, tc0480scp_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, 0)));
|
||||
m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, tc0480scp_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, m_col_base)));
|
||||
m_gfxdecode->gfx(m_gfxnum)->set_colorbase(m_col_base);
|
||||
|
||||
save_item(NAME(m_ram));
|
||||
save_item(NAME(m_ctrl));
|
||||
@ -317,7 +318,7 @@ void tc0480scp_device::common_get_tc0480bg_tile_info( tile_data &tileinfo, int t
|
||||
int attr = ram[2 * tile_index];
|
||||
SET_TILE_INFO_MEMBER(gfxnum,
|
||||
code,
|
||||
(attr & 0xff) + m_col_base,
|
||||
(attr & 0xff),
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
@ -326,7 +327,7 @@ void tc0480scp_device::common_get_tc0480tx_tile_info( tile_data &tileinfo, int t
|
||||
int attr = ram[tile_index];
|
||||
SET_TILE_INFO_MEMBER(gfxnum,
|
||||
attr & 0xff,
|
||||
((attr & 0x3f00) >> 8) + m_col_base,
|
||||
((attr & 0x3f00) >> 8),
|
||||
TILE_FLIPYX((attr & 0xc000) >> 14));
|
||||
}
|
||||
|
||||
@ -654,10 +655,6 @@ void tc0480scp_device::tilemap_update()
|
||||
TODO
|
||||
----
|
||||
|
||||
Broken for any rotation except ROT0. ROT180 support could probably
|
||||
be added without too much difficulty: machine_flip is there as a
|
||||
place-holder for this purpose.
|
||||
|
||||
Wouldn't work if y needs to be > 255 (i.e. if some game uses a
|
||||
bigger than usual vertical visible area). Refer to tc0080vco
|
||||
custom draw routine for an example of dealing with this.
|
||||
@ -709,7 +706,6 @@ void tc0480scp_device::bg01_draw( screen_device &screen, bitmap_ind16 &bitmap, c
|
||||
int flip = m_pri_reg & 0x40;
|
||||
int i, y, y_index, src_y_index, row_index;
|
||||
int x_index, x_step;
|
||||
int machine_flip = 0; /* for ROT 180 ? */
|
||||
|
||||
UINT16 screen_width = 512; //cliprect.width();
|
||||
UINT16 min_y = cliprect.min_y;
|
||||
@ -736,10 +732,7 @@ void tc0480scp_device::bg01_draw( screen_device &screen, bitmap_ind16 &bitmap, c
|
||||
y_index -= (m_y_offset - min_y) * zoomy;
|
||||
}
|
||||
|
||||
if (!machine_flip)
|
||||
y = min_y;
|
||||
else
|
||||
y = max_y;
|
||||
|
||||
do
|
||||
{
|
||||
@ -781,12 +774,9 @@ void tc0480scp_device::bg01_draw( screen_device &screen, bitmap_ind16 &bitmap, c
|
||||
taitoic_drawscanline(bitmap, cliprect, 0, y, scanline, (flags & TILEMAP_DRAW_OPAQUE) ? 0 : 1, ROT0, screen.priority(), priority);
|
||||
|
||||
y_index += zoomy;
|
||||
if (!machine_flip)
|
||||
y++;
|
||||
else
|
||||
y--;
|
||||
}
|
||||
while ((!machine_flip && y <= max_y) || (machine_flip && y >= min_y));
|
||||
while (y <= max_y);
|
||||
|
||||
}
|
||||
}
|
||||
@ -798,10 +788,6 @@ void tc0480scp_device::bg01_draw( screen_device &screen, bitmap_ind16 &bitmap, c
|
||||
TODO
|
||||
----
|
||||
|
||||
Broken for any rotation except ROT0. ROT180 support could probably
|
||||
be added without too much difficulty: machine_flip is there as a
|
||||
place-holder for this purpose.
|
||||
|
||||
Wouldn't work if y needs to be > 255 (i.e. if some game uses a
|
||||
bigger than usual vertical visible area). Refer to tc0080vco
|
||||
custom draw routine for an example of dealing with this.
|
||||
@ -844,7 +830,6 @@ void tc0480scp_device::bg23_draw(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
UINT32 zoomx, zoomy;
|
||||
UINT16 scanline[512];
|
||||
int flipscreen = m_pri_reg & 0x40;
|
||||
int machine_flip = 0; /* for ROT 180 ? */
|
||||
|
||||
UINT16 screen_width = 512; //cliprect.width();
|
||||
UINT16 min_y = cliprect.min_y;
|
||||
@ -878,11 +863,7 @@ void tc0480scp_device::bg23_draw(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
y_index -= (m_y_offset - min_y) * zoomy;
|
||||
}
|
||||
|
||||
|
||||
if (!machine_flip)
|
||||
y = min_y;
|
||||
else
|
||||
y = max_y;
|
||||
|
||||
do
|
||||
{
|
||||
@ -944,12 +925,9 @@ void tc0480scp_device::bg23_draw(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
taitoic_drawscanline(bitmap, cliprect, 0, y, scanline, (flags & TILEMAP_DRAW_OPAQUE) ? 0 : 1, ROT0, screen.priority(), priority);
|
||||
|
||||
y_index += zoomy;
|
||||
if (!machine_flip)
|
||||
y++;
|
||||
else
|
||||
y--;
|
||||
}
|
||||
while ((!machine_flip && y<=max_y) || (machine_flip && y>=min_y));
|
||||
while (y<=max_y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,15 +1,6 @@
|
||||
#include "emu.h"
|
||||
#include "includes/warriorb.h"
|
||||
|
||||
/**********************************************************/
|
||||
|
||||
void warriorb_state::video_start()
|
||||
{
|
||||
/* Ensure palette from correct TC0110PCR used for each screen */
|
||||
m_tc0100scn_1->set_colbanks(0x0, 0x100, 0x0);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************
|
||||
SPRITE DRAW ROUTINE
|
||||
************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user