コード例 #1
0
ファイル: luckgrln.c プロジェクト: risico/jsmess
static TILE_GET_INFO( get_luckgrln_reel4_tile_info )
{
	luckgrln_state *state = machine.driver_data<luckgrln_state>();
	int code = state->m_reel4_ram[tile_index];
	int attr = state->m_reel4_attr[tile_index];
	int col = (attr & 0x1f);

	code |= (attr & 0xe0)<<3;

	SET_TILE_INFO(
			1,
			code,
			col,
			0);
}
コード例 #2
0
ファイル: cabal.c プロジェクト: kkalmaz/psmame
static TILE_GET_INFO( get_text_tile_info )
{
	cabal_state *state = machine.driver_data<cabal_state>();

	int tile = state->m_colorram[tile_index];
	int color = (tile>>10);

	tile &= 0x3ff;

	SET_TILE_INFO(
			0,
			tile,
			color,
			0);
}
コード例 #3
0
ファイル: ninjakd2.c プロジェクト: LibXenonProject/mame-lx
static TILE_GET_INFO( mnight_get_bg_tile_info )
{
	ninjakd2_state *state = machine.driver_data<ninjakd2_state>();
	int const lo = state->m_bg_videoram[(tile_index << 1)];
	int const hi = state->m_bg_videoram[(tile_index << 1) | 1];
	int const tile = ((hi & 0x10) << 6) | ((hi & 0xc0) << 2) | lo;
	int const flipy = (hi & 0x20) >> 5;
	int const color = hi & 0x0f;

	SET_TILE_INFO(
			2,
			tile,
			color,
			flipy ? TILE_FLIPY : 0);
}
コード例 #4
0
ファイル: brkthru.c プロジェクト: j4y4r/j4ymame
static TILE_GET_INFO( get_bg_tile_info )
{
	brkthru_state *state = machine.driver_data<brkthru_state>();
	/* BG RAM format
        0         1
        ---- -c-- ---- ---- = Color
        ---- --xx xxxx xxxx = Code
    */

	int code = (state->m_videoram[tile_index * 2] | ((state->m_videoram[tile_index * 2 + 1]) << 8)) & 0x3ff;
	int region = 1 + (code >> 7);
	int colour = state->m_bgbasecolor + ((state->m_videoram[tile_index * 2 + 1] & 0x04) >> 2);

	SET_TILE_INFO(region, code & 0x7f, colour,0);
}
コード例 #5
0
ファイル: cabal.c プロジェクト: kkalmaz/psmame
static TILE_GET_INFO( get_back_tile_info )
{
	cabal_state *state = machine.driver_data<cabal_state>();

	int tile = state->m_videoram[tile_index];
	int color = (tile>>12)&0xf;

	tile &= 0xfff;

	SET_TILE_INFO(
			1,
			tile,
			color,
			0);
}
コード例 #6
0
ファイル: toaplan1.c プロジェクト: Paulodx/sdl-mame-wii
static TILE_GET_INFO( get_pf4_tile_info )
{
	int color, tile_number, attrib;

	tile_number = pf4_tilevram16[2*tile_index+1] & 0x7fff;
	attrib = pf4_tilevram16[2*tile_index];
	color = attrib & 0x3f;
	SET_TILE_INFO(
			0,
			tile_number,
			color,
			0);
	if (pf4_tilevram16[2*tile_index+1] & 0x8000) tileinfo->category = 0;
	else tileinfo->category = (attrib & 0xf000) >> 12;
}
コード例 #7
0
ファイル: darkmist.c プロジェクト: cdenix/ps3-mame-0125
static TILE_GET_INFO( get_bgtile_info )
{
	int code,attr,pal;

	code=memory_region(REGION_USER1)[tile_index]; /* TTTTTTTT */
	attr=memory_region(REGION_USER2)[tile_index]; /* -PPP--TT - FIXED BITS (0xxx00xx) */
	code+=(attr&3)<<8;
	pal=(attr>>4);

	SET_TILE_INFO(
		1,
        code,
        pal,
        0);
}
コード例 #8
0
ファイル: ninjakd2.c プロジェクト: LibXenonProject/mame-lx
static TILE_GET_INFO( ninjakd2_get_bg_tile_info )
{
	ninjakd2_state *state = machine.driver_data<ninjakd2_state>();
	int const lo = state->m_bg_videoram[(tile_index << 1)];
	int const hi = state->m_bg_videoram[(tile_index << 1) | 1];
	int const tile = ((hi & 0xc0) << 2) | lo;
	int const flipyx = (hi & 0x30) >> 4;
	int const color = hi & 0x0f;

	SET_TILE_INFO(
			2,
			tile,
			color,
			TILE_FLIPYX(flipyx));
}
コード例 #9
0
ファイル: actfancr.c プロジェクト: cdenix/ps3-mame-0125
static TILE_GET_INFO( get_pf2_tile_info )
{
	int tile,color;

	tile=actfancr_pf2_data[2*tile_index]+(actfancr_pf2_data[2*tile_index+1]<<8);
	color=tile>>12;

	tile=tile&0xfff;

	SET_TILE_INFO(
				0,
				tile,
				color,
				0);
}
コード例 #10
0
ファイル: stfight.c プロジェクト: kleopatra999/mess-svn
static TILE_GET_INFO( get_bg_tile_info )
{
	UINT8   *bgMap = machine.root_device().memregion("gfx6")->base();
	int attr,tile_bank,tile_base;

	attr = bgMap[0x8000+tile_index];
	tile_bank = (attr & 0x20) >> 5;
	tile_base = (attr & 0x80) << 1;

	SET_TILE_INFO(
			2+tile_bank,
			tile_base + bgMap[tile_index],
			attr & 0x07,
			0);
}
コード例 #11
0
ファイル: wink.c プロジェクト: vikke/mame_0145
static TILE_GET_INFO( get_bg_tile_info )
{
	wink_state *state = machine.driver_data<wink_state>();
	UINT8 *videoram = state->m_videoram;
	int code = videoram[tile_index];
	code |= 0x200 * state->m_tile_bank;

	// the 2 parts of the screen use different tile banking
	if(tile_index < 0x360)
	{
		code |= 0x100;
	}

	SET_TILE_INFO(0, code, 0, 0);
}
コード例 #12
0
ファイル: jokrwild.c プロジェクト: Paulodx/sdl-mame-wii
static TILE_GET_INFO( get_bg_tile_info )
{
/*  - bits -
    7654 3210
    ---- ----   bank select.
    ---- ----   color code.
    ---- ----   seems unused.
*/
//  int attr = colorram[tile_index];
	int code = videoram[tile_index];
//  int bank = (attr & 0x08) >> 3;
//  int color = (attr & 0x03);

	SET_TILE_INFO( 0 /* bank */, code, 0 /* color */, 0);
}
コード例 #13
0
ファイル: cshooter.c プロジェクト: nitrologic/emu
static TILE_GET_INFO( get_cstx_tile_info )
{
	int code = (cshooter_txram[tile_index*2]);
	int attr = (cshooter_txram[tile_index*2+1]);
	int rg;
	rg=0;
	if (attr & 0x20) rg = 1;

	SET_TILE_INFO(

			rg,
			(code & 0x1ff),
			0x2c+(attr&0x1f), //test
			0);
}
コード例 #14
0
ファイル: news.c プロジェクト: j4y4r/j4ymame
static TILE_GET_INFO( get_bg_tile_info )
{
	news_state *state = machine.driver_data<news_state>();
	int code = (state->m_bgram[tile_index * 2] << 8) | state->m_bgram[tile_index * 2 + 1];
	int color = (code & 0xf000) >> 12;

	code &= 0x0fff;
	if ((code & 0x0e00) == 0x0e00)
		code = (code & 0x1ff) | (state->m_bgpic << 9);

	SET_TILE_INFO(
			0,
			code,
			color,
			0);
}
コード例 #15
0
static TILE_GET_INFO( get_cstx_tile_info )
{
	cshooter_state *state = machine.driver_data<cshooter_state>();
	int code = (state->m_txram[tile_index*2]);
	int attr = (state->m_txram[tile_index*2+1]);
	int rg;
	rg=0;
	if (attr & 0x20) rg = 1;

	SET_TILE_INFO(

			rg,
			(code & 0x1ff),
			0x2c+(attr&0x1f), //test
			0);
}
コード例 #16
0
ファイル: nsmpoker.c プロジェクト: stuartcarnie/MAME-OS-X
static TILE_GET_INFO( get_bg_tile_info )
{
	nsmpoker_state *state = machine.driver_data<nsmpoker_state>();
/*  - bits -
    7654 3210
    ---- ----   bank select.
    ---- ----   color code.
    ---- ----   seems unused.
*/
//  int attr = state->m_colorram[tile_index];
	int code = state->m_videoram[tile_index];
//  int bank = (attr & 0x08) >> 3;
//  int color = (attr & 0x03);

	SET_TILE_INFO( 0 /* bank */, code, 0 /* color */, 0);
}
コード例 #17
0
ファイル: konamigx.c プロジェクト: broftkd/historic-mame
static TILE_GET_INFO( get_gx_psac1b_tile_info )
{
	int tileno, colour, flipx,flipy;
	int flip;
	flip=0;

	colour = 0;
	tileno = (gx_psacram[tile_index*2+1] & 0x00003fff)>>0;
	flipx  = (gx_psacram[tile_index*2+1] & 0x00200000)>>21;
	flipy  = (gx_psacram[tile_index*2+1] & 0x00100000)>>20;

	if (flipx) flip |= TILE_FLIPX;
	if (flipy) flip |= TILE_FLIPY;

	SET_TILE_INFO(0, tileno, colour, flip);
}
コード例 #18
0
ファイル: tattack.c プロジェクト: cdenix/ps3-mame-0125
static TILE_GET_INFO( get_tile_info )
{
	int code = videoram[tile_index];
	int color=colorram[tile_index];

	if((color&1 ) || (color>15) )
		logerror("COLOR %i\n",color);

	color>>=1;

	SET_TILE_INFO(
		0,
		code,
		color,
		0);
}
コード例 #19
0
static TILE_GET_INFO( get_txttile_info )
{
    panicr_state *state = machine.driver_data<panicr_state>();
    UINT8 *videoram = state->m_videoram;
    int code=videoram[tile_index*4];
    int attr=videoram[tile_index*4+2];
    int color = attr & 0x07;

    tileinfo->group = color;

    SET_TILE_INFO(
        0,
        code + ((attr & 8) << 5),
        color,
        0);
}
コード例 #20
0
static TILE_GET_INFO( get_tile_info )
{
	/* the hardware has two character sets, one normal and one x-flipped. When
       screen is flipped, character y flip is done by the hardware inverting the
       timing signals, while x flip is done by selecting the 2nd character set.
       We reproduce this here, but since the tilemap system automatically flips
       characters when screen is flipped, we have to flip them back. */
	_galaga_state *state =  machine->driver_data<_galaga_state>();
    int color = state->videoram[tile_index + 0x400] & 0x3f;
	SET_TILE_INFO(
			0,
			(state->videoram[tile_index] & 0x7f) | (flip_screen_get(machine) ? 0x80 : 0) | (state->galaga_gfxbank << 8),
			color,
			flip_screen_get(machine) ? TILE_FLIPX : 0);
	tileinfo->group = color;
}
コード例 #21
0
ファイル: skykid.c プロジェクト: LibXenonProject/mame-lx
static TILE_GET_INFO( tx_get_tile_info )
{
	skykid_state *state = machine.driver_data<skykid_state>();
	int code = state->m_textram[tile_index];
	int attr = state->m_textram[tile_index + 0x400];
	tileinfo.category = code >> 4 & 0xf;

	/* the hardware has two character sets, one normal and one flipped. When
       screen is flipped, character flip is done by selecting the 2nd character set.
       We reproduce this here, but since the tilemap system automatically flips
       characters when screen is flipped, we have to flip them back. */
	SET_TILE_INFO(
			0,
			code | (flip_screen_get(machine) ? 0x100 : 0),
			attr & 0x3f,
			flip_screen_get(machine) ? (TILE_FLIPY | TILE_FLIPX) : 0);
}
コード例 #22
0
GFXDECODE_END


static TILE_GET_INFO( get_bg_tile_info )
{
	coinmstr_state *state = machine.driver_data<coinmstr_state>();
	UINT8 *videoram = state->m_videoram;
	int tile = videoram[tile_index + 0x0240];
	int color = tile_index;

	tile |= (state->m_attr_ram1[tile_index + 0x0240] & 0x80) << 1;
	tile |= (state->m_attr_ram2[tile_index + 0x0240] & 0x80) << 2;

	tile |= (state->m_attr_ram3[tile_index + 0x0240] & 0x03) << (6+4);

	SET_TILE_INFO(0, tile, color, 0);
}
コード例 #23
0
ファイル: flyball.c プロジェクト: cdenix/ps3-mame-0125
static TILE_GET_INFO( flyball_get_tile_info )
{
	UINT8 data = flyball_playfield_ram[tile_index];

	int flags =
		((data & 0x40) ? TILE_FLIPX : 0) |
		((data & 0x80) ? TILE_FLIPY : 0);

	int code = data & 63;

	if ((flags & TILE_FLIPX) && (flags & TILE_FLIPY))
	{
		code += 64;
	}

	SET_TILE_INFO(0, code, 0, flags);
}
コード例 #24
0
ファイル: egghunt.c プロジェクト: i-willh/imame4all
static TILE_GET_INFO( get_bg_tile_info )
{
    int code = ((egghunt_bgram[tile_index*2+1] << 8) | egghunt_bgram[tile_index*2]) & 0x3fff;
    int colour = egghunt_atram[tile_index] & 0x3f;

    if(code & 0x2000)
    {
        if((egghunt_gfx_banking & 3) == 2)
            code += 0x2000;
        else if((egghunt_gfx_banking & 3) == 3)
            code += 0x4000;
//      else if((egghunt_gfx_banking & 3) == 1)
//          code += 0;
    }

    SET_TILE_INFO(0, code, colour, 0);
}
コード例 #25
0
ファイル: orbit.c プロジェクト: broftkd/historic-mame
static TILE_GET_INFO( get_tile_info )
{
	UINT8 code = orbit_playfield_ram[tile_index];

	int flags = 0;

	if (code & 0x40)
	{
		flags |= TILE_FLIPX;
	}
	if (orbit_flip_screen)
	{
		flags |= TILE_FLIPY;
	}

	SET_TILE_INFO(3, code & 0x3f, 0, flags);
}
コード例 #26
0
ファイル: chaknpop.c プロジェクト: LibXenonProject/mame-lx
static TILE_GET_INFO( chaknpop_get_tx_tile_info )
{
	chaknpop_state *state = machine.driver_data<chaknpop_state>();
	int tile = state->m_tx_ram[tile_index];
	int tile_h_bank = (state->m_gfxmode & GFX_TX_BANK2) << 2;	/* 0x00-0xff -> 0x200-0x2ff */
	int color = state->m_attr_ram[TX_COLOR2];

	if (tile == 0x74)
		color = state->m_attr_ram[TX_COLOR1];

	if (state->m_gfxmode & GFX_TX_BANK1 && tile >= 0xc0)
		tile += 0xc0;					/* 0xc0-0xff -> 0x180-0x1bf */

	tile |= tile_h_bank;

	SET_TILE_INFO(1, tile, color, 0);
}
コード例 #27
0
ファイル: miniboy7.c プロジェクト: nitrologic/emu
static TILE_GET_INFO( get_bg_tile_info )
{
/*  - bits -
    7654 3210
    --xx xx--   tiles color?.
    ---- --x-   tiles bank.
    xx-- ---x   seems unused. */

	int attr = colorram[tile_index];
	int code = videoram[tile_index];
	int bank = (attr & 0x02) >> 1;	/* bit 1 switch the gfx banks */
	int color = (attr & 0x3c);	/* bits 2-3-4-5 for color? */

	if (bank == 1)	/* temporary hack to point to the 3rd gfx bank */
		bank = 2;

	SET_TILE_INFO(bank, code, color, 0);
}
コード例 #28
0
static TILE_GET_INFO( get_bg_tile_info )
{
	egghunt_state *state = machine.driver_data<egghunt_state>();
	int code = ((state->m_bgram[tile_index * 2 + 1] << 8) | state->m_bgram[tile_index * 2]) & 0x3fff;
	int colour = state->m_atram[tile_index] & 0x3f;

	if(code & 0x2000)
	{
		if((state->m_gfx_banking & 3) == 2)
			code += 0x2000;
		else if((state->m_gfx_banking & 3) == 3)
			code += 0x4000;
//      else if((state->m_gfx_banking & 3) == 1)
//          code += 0;
	}

	SET_TILE_INFO(0, code, colour, 0);
}
コード例 #29
0
ファイル: darkmist.c プロジェクト: cdenix/ps3-mame-0125
static TILE_GET_INFO( get_txttile_info )
{
	int code,attr,pal;

	code=videoram[tile_index];
	attr=videoram[tile_index+0x400];
	pal=(attr>>1);

	code+=(attr&1)<<8;

	pal+=48;

	SET_TILE_INFO(
		0,
        code,
        pal,
        0);
}
コード例 #30
0
ファイル: quizdna.c プロジェクト: Paulodx/sdl-mame-wii
static TILE_GET_INFO( get_fg_tile_info )
{
	int code,col,x,y;
	UINT8 *FG = memory_region(machine, "user1");

	x = tile_index & 0x1f;
	y = FG[(tile_index >> 5) & 0x1f] & 0x3f;
	code = y & 1;

	y >>= 1;

	col = quizdna_fg_ram[x*2 + y*0x40 + 1];
	code += (quizdna_fg_ram[x*2 + y*0x40] + (col & 0x1f) * 0x100) * 2;
	col >>= 5;
	col = (col & 3) | ((col & 4) << 1);

	SET_TILE_INFO(0, code, col, 0);
}