k056832: updated to use delegates and inline configs. nw.

these changes are mostly driver-level, so I think they should not conflict
with anyone else's work. the only relevant change for the device code
is the removal of altK056832_vh_start. no further work on this chip is 
planned (it requires major rework)
This commit is contained in:
Fabio Priuli 2014-06-26 07:22:24 +00:00
parent 0270936be6
commit 4987adf1ae
37 changed files with 218 additions and 328 deletions

View File

@ -215,14 +215,6 @@ static INPUT_PORTS_START( asterix )
INPUT_PORTS_END INPUT_PORTS_END
static const k056832_interface asterix_k056832_intf =
{
"gfx1", 0,
K056832_BPP_4,
1, 1,
asterix_tile_callback, "none"
};
void asterix_state::machine_start() void asterix_state::machine_start()
{ {
save_item(NAME(m_cur_control2)); save_item(NAME(m_cur_control2));
@ -238,8 +230,6 @@ void asterix_state::machine_start()
void asterix_state::machine_reset() void asterix_state::machine_reset()
{ {
int i;
m_cur_control2 = 0; m_cur_control2 = 0;
m_prot[0] = 0; m_prot[0] = 0;
m_prot[1] = 0; m_prot[1] = 0;
@ -250,7 +240,7 @@ void asterix_state::machine_reset()
m_layerpri[1] = 0; m_layerpri[1] = 0;
m_layerpri[2] = 0; m_layerpri[2] = 0;
for (i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
m_layer_colorbase[i] = 0; m_layer_colorbase[i] = 0;
m_tilebanks[i] = 0; m_tilebanks[i] = 0;
@ -284,7 +274,10 @@ static MACHINE_CONFIG_START( asterix, asterix_state )
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD("k056832", asterix_k056832_intf)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(asterix_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 1, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")

View File

@ -363,14 +363,6 @@ WRITE_LINE_MEMBER(bishi_state::sound_irq_gen)
} }
static const k056832_interface bishi_k056832_intf =
{
"gfx1", 0,
K056832_BPP_8,
1, 0,
bishi_tile_callback, "none"
};
void bishi_state::machine_start() void bishi_state::machine_start()
{ {
save_item(NAME(m_cur_control)); save_item(NAME(m_cur_control));
@ -390,7 +382,6 @@ static MACHINE_CONFIG_START( bishi, bishi_state )
MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bishi_state, bishi_scanline, "screen", 0, 1) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bishi_state, bishi_scanline, "screen", 0, 1)
/* video hardware */ /* video hardware */
MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
@ -406,7 +397,10 @@ static MACHINE_CONFIG_START( bishi, bishi_state )
MCFG_PALETTE_ENABLE_HILIGHTS() MCFG_PALETTE_ENABLE_HILIGHTS()
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD("k056832", bishi_k056832_intf)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(bishi_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")

View File

@ -289,14 +289,6 @@ GFXDECODE_END
/**********************************************************************************/ /**********************************************************************************/
static const k056832_interface dbz_k056832_intf =
{
"gfx1", 2,
K056832_BPP_4,
1, 1,
dbz_tile_callback, "none"
};
static const k053247_interface dbz_k053246_intf = static const k053247_interface dbz_k053246_intf =
{ {
"gfx2", 3, "gfx2", 3,
@ -343,7 +335,6 @@ static MACHINE_CONFIG_START( dbz, dbz_state )
MCFG_CPU_PROGRAM_MAP(dbz_sound_map) MCFG_CPU_PROGRAM_MAP(dbz_sound_map)
MCFG_CPU_IO_MAP(dbz_sound_io_map) MCFG_CPU_IO_MAP(dbz_sound_io_map)
/* video hardware */ /* video hardware */
MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(55) MCFG_SCREEN_REFRESH_RATE(55)
@ -359,7 +350,9 @@ static MACHINE_CONFIG_START( dbz, dbz_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
MCFG_PALETTE_ENABLE_SHADOWS() MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_K056832_ADD("k056832", dbz_k056832_intf) MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(dbz_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 2, K056832_BPP_4, 1, 1, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")

View File

@ -1390,14 +1390,6 @@ void djmain_state::machine_reset()
* *
*************************************/ *************************************/
static const k056832_interface djmain_k056832_intf =
{
"gfx2", 1,
K056832_BPP_4dj,
1, 1,
djmain_tile_callback, "none"
};
static MACHINE_CONFIG_START( djmain, djmain_state ) static MACHINE_CONFIG_START( djmain, djmain_state )
/* basic machine hardware */ /* basic machine hardware */
@ -1407,7 +1399,6 @@ static MACHINE_CONFIG_START( djmain, djmain_state )
MCFG_CPU_PROGRAM_MAP(memory_map) MCFG_CPU_PROGRAM_MAP(memory_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", djmain_state, vb_interrupt) MCFG_CPU_VBLANK_INT_DRIVER("screen", djmain_state, vb_interrupt)
MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true) MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(djmain_state, ide_interrupt)) MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(djmain_state, ide_interrupt))
@ -1422,9 +1413,12 @@ static MACHINE_CONFIG_START( djmain, djmain_state )
MCFG_PALETTE_ADD("palette", 0x4440/4) MCFG_PALETTE_ADD("palette", 0x4440/4)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", djmain) MCFG_GFXDECODE_ADD("gfxdecode", "palette", djmain)
MCFG_K056832_ADD("k056832", djmain_k056832_intf) MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(djmain_state, tile_callback)
MCFG_K056832_CONFIG("gfx2", 1, K056832_BPP_4dj, 1, 1, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555") MCFG_K055555_ADD("k055555")
/* sound hardware */ /* sound hardware */

View File

@ -295,14 +295,6 @@ static const k054539_interface k054539_config =
NULL, NULL,
}; };
static const k056832_interface gijoe_k056832_intf =
{
"gfx1", 0,
K056832_BPP_4,
1, 0,
gijoe_tile_callback, "none"
};
static const k053247_interface gijoe_k053247_intf = static const k053247_interface gijoe_k053247_intf =
{ {
"gfx2", 1, "gfx2", 1,
@ -350,9 +342,13 @@ static MACHINE_CONFIG_START( gijoe, gijoe_state )
MCFG_PALETTE_ENABLE_SHADOWS() MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD("k056832", gijoe_k056832_intf)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(gijoe_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")
MCFG_K053246_ADD("k053246", gijoe_k053247_intf) MCFG_K053246_ADD("k053246", gijoe_k053247_intf)
MCFG_K053246_GFXDECODE("gfxdecode") MCFG_K053246_GFXDECODE("gfxdecode")
MCFG_K053246_PALETTE("palette") MCFG_K053246_PALETTE("palette")

View File

@ -1633,9 +1633,13 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
MCFG_PALETTE_ENABLE_HILIGHTS() MCFG_PALETTE_ENABLE_HILIGHTS()
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD_NOINTF("k056832"/*, konamigx_k056832_intf*/)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(konamigx_state, type2_tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555") MCFG_K055555_ADD("k055555")
MCFG_DEVICE_ADD("k054338", K054338, 0) MCFG_DEVICE_ADD("k054338", K054338, 0)
@ -1674,22 +1678,44 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sexyparo, konamigx )
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(konamigx_state, alpha_tile_callback)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( tbyahhoo, konamigx )
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "k055555")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dragoonj, konamigx ) static MACHINE_CONFIG_DERIVED( dragoonj, konamigx )
MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_VISIBLE_AREA(40, 40+384-1, 16, 16+224-1) MCFG_SCREEN_VISIBLE_AREA(40, 40+384-1, 16, 16+224-1)
MCFG_VIDEO_START_OVERRIDE(konamigx_state,dragoonj) MCFG_VIDEO_START_OVERRIDE(konamigx_state,dragoonj)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 1, 0, "none")
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( le2, konamigx ) static MACHINE_CONFIG_DERIVED( le2, konamigx )
MCFG_VIDEO_START_OVERRIDE(konamigx_state,le2) MCFG_VIDEO_START_OVERRIDE(konamigx_state,le2)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 1, 0, "none")
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( konamigx_6bpp, konamigx ) static MACHINE_CONFIG_DERIVED( konamigx_6bpp, konamigx )
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_6bpp) MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_6bpp)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 0, "none")
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( konamigx_6bpp_2, konamigx ) static MACHINE_CONFIG_DERIVED( konamigx_6bpp_2, konamigx )
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_6bpp_2) MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_6bpp_2)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 1, 0, "none")
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( opengolf, konamigx ) static MACHINE_CONFIG_DERIVED( opengolf, konamigx )
@ -1713,6 +1739,9 @@ static MACHINE_CONFIG_DERIVED( racinfrc, konamigx )
MCFG_GFXDECODE_MODIFY("gfxdecode", racinfrc) MCFG_GFXDECODE_MODIFY("gfxdecode", racinfrc)
MCFG_VIDEO_START_OVERRIDE(konamigx_state,racinfrc) MCFG_VIDEO_START_OVERRIDE(konamigx_state,racinfrc)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 0, "none")
MCFG_CPU_MODIFY("maincpu") MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(gx_type1_map) MCFG_CPU_PROGRAM_MAP(gx_type1_map)
@ -1730,6 +1759,8 @@ static MACHINE_CONFIG_DERIVED( gxtype3, konamigx )
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_type3) MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_type3)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 0, "none")
MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_ENTRIES(16384) MCFG_PALETTE_ENTRIES(16384)
@ -1780,10 +1811,12 @@ static MACHINE_CONFIG_DERIVED( gxtype4, konamigx )
MCFG_GFXDECODE_MODIFY("gfxdecode", type4) MCFG_GFXDECODE_MODIFY("gfxdecode", type4)
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_type4) MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_type4)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 0, "none")
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gxtype4_vsn, gxtype4 ) static MACHINE_CONFIG_DERIVED( gxtype4_vsn, gxtype4 )
MCFG_DEFAULT_LAYOUT(layout_dualhsxs) MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_MODIFY("screen")
@ -1795,20 +1828,25 @@ static MACHINE_CONFIG_DERIVED( gxtype4_vsn, gxtype4 )
MCFG_SCREEN_VISIBLE_AREA(0, 576-1, 16, 32*8-1-16) MCFG_SCREEN_VISIBLE_AREA(0, 576-1, 16, 32*8-1-16)
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_type4_vsn) MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_type4_vsn)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 2, "none") // set djmain_hack to 2 to kill layer association or half the tilemaps vanish on screen 0
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gxtype4sd2, gxtype4 ) static MACHINE_CONFIG_DERIVED( gxtype4sd2, gxtype4 )
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_type4_sd2) MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_type4_sd2)
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( winspike, konamigx ) static MACHINE_CONFIG_DERIVED( winspike, konamigx )
MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_VISIBLE_AREA(38, 38+384-1, 16, 16+224-1) MCFG_SCREEN_VISIBLE_AREA(38, 38+384-1, 16, 16+224-1)
MCFG_VIDEO_START_OVERRIDE(konamigx_state,winspike) MCFG_VIDEO_START_OVERRIDE(konamigx_state,winspike)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(konamigx_state, alpha_tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 2, "none")
MACHINE_CONFIG_END MACHINE_CONFIG_END
@ -3770,15 +3808,15 @@ GAME( 1994, gokuparo, fantjour, konamigx, gokuparo, konamigx_state, konamigx, RO
GAME( 1994, crzcross, konamigx, konamigx, puzldama, konamigx_state, konamigx, ROT0, "Konami", "Crazy Cross (ver EAA)", GAME_IMPERFECT_GRAPHICS ) GAME( 1994, crzcross, konamigx, konamigx, puzldama, konamigx_state, konamigx, ROT0, "Konami", "Crazy Cross (ver EAA)", GAME_IMPERFECT_GRAPHICS )
GAME( 1994, puzldama, crzcross, konamigx, puzldama, konamigx_state, konamigx, ROT0, "Konami", "Taisen Puzzle-dama (ver JAA)", GAME_IMPERFECT_GRAPHICS ) GAME( 1994, puzldama, crzcross, konamigx, puzldama, konamigx_state, konamigx, ROT0, "Konami", "Taisen Puzzle-dama (ver JAA)", GAME_IMPERFECT_GRAPHICS )
GAME( 1995, tbyahhoo, konamigx, konamigx, gokuparo, konamigx_state, konamigx, ROT0, "Konami", "Twin Bee Yahhoo! (ver JAA)", GAME_IMPERFECT_GRAPHICS ) GAME( 1995, tbyahhoo, konamigx, tbyahhoo, gokuparo, konamigx_state, konamigx, ROT0, "Konami", "Twin Bee Yahhoo! (ver JAA)", GAME_IMPERFECT_GRAPHICS )
GAME( 1995, tkmmpzdm, konamigx, konamigx_6bpp, puzldama, konamigx_state, konamigx, ROT0, "Konami", "Tokimeki Memorial Taisen Puzzle-dama (ver JAB)", GAME_IMPERFECT_GRAPHICS ) GAME( 1995, tkmmpzdm, konamigx, konamigx_6bpp, puzldama, konamigx_state, konamigx, ROT0, "Konami", "Tokimeki Memorial Taisen Puzzle-dama (ver JAB)", GAME_IMPERFECT_GRAPHICS )
GAME( 1995, dragoona, konamigx, dragoonj, dragoonj, konamigx_state, konamigx, ROT0, "Konami", "Dragoon Might (ver AAB)", GAME_IMPERFECT_GRAPHICS ) GAME( 1995, dragoona, konamigx, dragoonj, dragoonj, konamigx_state, konamigx, ROT0, "Konami", "Dragoon Might (ver AAB)", GAME_IMPERFECT_GRAPHICS )
GAME( 1995, dragoonj, dragoona, dragoonj, dragoonj, konamigx_state, konamigx, ROT0, "Konami", "Dragoon Might (ver JAA)", GAME_IMPERFECT_GRAPHICS ) GAME( 1995, dragoonj, dragoona, dragoonj, dragoonj, konamigx_state, konamigx, ROT0, "Konami", "Dragoon Might (ver JAA)", GAME_IMPERFECT_GRAPHICS )
GAME( 1996, sexyparo, konamigx, konamigx, gokuparo, konamigx_state, konamigx, ROT0, "Konami", "Sexy Parodius (ver JAA)", GAME_IMPERFECT_GRAPHICS ) GAME( 1996, sexyparo, konamigx, sexyparo, gokuparo, konamigx_state, konamigx, ROT0, "Konami", "Sexy Parodius (ver JAA)", GAME_IMPERFECT_GRAPHICS )
GAME( 1996, sexyparoa,sexyparo, konamigx, gokuparo, konamigx_state, konamigx, ROT0, "Konami", "Sexy Parodius (ver AAA)", GAME_IMPERFECT_GRAPHICS ) GAME( 1996, sexyparoa,sexyparo, sexyparo, gokuparo, konamigx_state, konamigx, ROT0, "Konami", "Sexy Parodius (ver AAA)", GAME_IMPERFECT_GRAPHICS )
GAME( 1996, daiskiss, konamigx, konamigx, gokuparo, konamigx_state, konamigx, ROT0, "Konami", "Daisu-Kiss (ver JAA)", GAME_IMPERFECT_GRAPHICS ) GAME( 1996, daiskiss, konamigx, konamigx, gokuparo, konamigx_state, konamigx, ROT0, "Konami", "Daisu-Kiss (ver JAA)", GAME_IMPERFECT_GRAPHICS )

View File

@ -491,15 +491,6 @@ void lethal_state::machine_reset()
m_bank4800->set_bank(0); m_bank4800->set_bank(0);
} }
static const k056832_interface lethalen_k056832_intf =
{
"gfx1", 0,
K056832_BPP_8LE,
1, 0,
lethalen_tile_callback, "none"
};
static MACHINE_CONFIG_START( lethalen, lethal_state ) static MACHINE_CONFIG_START( lethalen, lethal_state )
/* basic machine hardware */ /* basic machine hardware */
@ -534,7 +525,9 @@ static MACHINE_CONFIG_START( lethalen, lethal_state )
MCFG_PALETTE_ENABLE_SHADOWS() MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_K056832_ADD("k056832", lethalen_k056832_intf) MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(lethal_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8LE, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")

View File

@ -514,14 +514,6 @@ MACHINE_RESET_MEMBER(moo_state,moo)
m_sprite_colorbase = 0; m_sprite_colorbase = 0;
} }
static const k056832_interface moo_k056832_intf =
{
"gfx1", 0,
K056832_BPP_4,
1, 0,
moo_tile_callback, "none"
};
static const k053247_interface moo_k053247_intf = static const k053247_interface moo_k053247_intf =
{ {
"gfx2", 1, "gfx2", 1,
@ -578,7 +570,10 @@ static MACHINE_CONFIG_START( moo, moo_state )
MCFG_K053246_ADD("k053246", moo_k053247_intf) MCFG_K053246_ADD("k053246", moo_k053247_intf)
MCFG_K053246_GFXDECODE("gfxdecode") MCFG_K053246_GFXDECODE("gfxdecode")
MCFG_K053246_PALETTE("palette") MCFG_K053246_PALETTE("palette")
MCFG_K056832_ADD("k056832", moo_k056832_intf)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(moo_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")
@ -630,7 +625,10 @@ static MACHINE_CONFIG_START( moobl, moo_state )
MCFG_K053246_ADD("k053246", moo_k053247_intf) MCFG_K053246_ADD("k053246", moo_k053247_intf)
MCFG_K053246_GFXDECODE("gfxdecode") MCFG_K053246_GFXDECODE("gfxdecode")
MCFG_K053246_PALETTE("palette") MCFG_K053246_PALETTE("palette")
MCFG_K056832_ADD("k056832", moo_k056832_intf)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(moo_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")

View File

@ -1006,12 +1006,16 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state )
MCFG_PALETTE_ENABLE_SHADOWS() MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS() MCFG_PALETTE_ENABLE_HILIGHTS()
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD_NOINTF("k056832"/*, mystwarr_k056832_intf*/)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(mystwarr_state, mystwarr_tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555") MCFG_K055555_ADD("k055555")
MCFG_K055673_ADD_NOINTF("k055673") MCFG_K055673_ADD_NOINTF("k055673")
MCFG_K055673_GFXDECODE("gfxdecode") MCFG_K055673_GFXDECODE("gfxdecode")
MCFG_K055673_PALETTE("palette") MCFG_K055673_PALETTE("palette")
@ -1057,6 +1061,9 @@ static MACHINE_CONFIG_DERIVED( viostorm, mystwarr )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(900)) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(900))
MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(40, 40+384-1, 16, 16+224-1) MCFG_SCREEN_VISIBLE_AREA(40, 40+384-1, 16, 16+224-1)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(mystwarr_state, game4bpp_tile_callback)
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( metamrph, mystwarr ) static MACHINE_CONFIG_DERIVED( metamrph, mystwarr )
@ -1083,6 +1090,9 @@ static MACHINE_CONFIG_DERIVED( metamrph, mystwarr )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(900)) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(900))
MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(24, 24+288-1, 15, 15+224-1) MCFG_SCREEN_VISIBLE_AREA(24, 24+288-1, 15, 15+224-1)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(mystwarr_state, game4bpp_tile_callback)
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr ) static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr )
@ -1109,6 +1119,9 @@ static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(600)) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(600))
MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(24, 24+288-1, 17, 17+224-1) MCFG_SCREEN_VISIBLE_AREA(24, 24+288-1, 17, 17+224-1)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(mystwarr_state, game5bpp_tile_callback)
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr ) static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr )
@ -1138,6 +1151,9 @@ static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(600)) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(600))
MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(40, 40+376-1, 16, 16+224-1) MCFG_SCREEN_VISIBLE_AREA(40, 40+376-1, 16, 16+224-1)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(mystwarr_state, game4bpp_tile_callback)
MACHINE_CONFIG_END MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( martchmp, mystwarr ) static MACHINE_CONFIG_DERIVED( martchmp, mystwarr )
@ -1166,6 +1182,9 @@ static MACHINE_CONFIG_DERIVED( martchmp, mystwarr )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(32, 32+384-1, 16, 16+224-1) MCFG_SCREEN_VISIBLE_AREA(32, 32+384-1, 16, 16+224-1)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(mystwarr_state, game5bpp_tile_callback)
MACHINE_CONFIG_END MACHINE_CONFIG_END
/**********************************************************************************/ /**********************************************************************************/

View File

@ -547,22 +547,6 @@ static const k054539_interface k054539_config =
* *
*************************************/ *************************************/
static const k056832_interface qdrmfgp_k056832_intf =
{
"gfx1", 0,
K056832_BPP_4dj,
1, 0,
qdrmfgp_tile_callback, "none"
};
static const k056832_interface qdrmfgp2_k056832_intf =
{
"gfx1", 0,
K056832_BPP_4dj,
1, 0,
qdrmfgp2_tile_callback, "none"
};
MACHINE_START_MEMBER(qdrmfgp_state,qdrmfgp) MACHINE_START_MEMBER(qdrmfgp_state,qdrmfgp)
{ {
save_item(NAME(m_control)); save_item(NAME(m_control));
@ -620,7 +604,10 @@ static MACHINE_CONFIG_START( qdrmfgp, qdrmfgp_state )
MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp) MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD("k056832", qdrmfgp_k056832_intf)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(qdrmfgp_state, qdrmfgp_tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4dj, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")
@ -664,7 +651,10 @@ static MACHINE_CONFIG_START( qdrmfgp2, qdrmfgp_state )
MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp2) MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp2)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD("k056832", qdrmfgp2_k056832_intf)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(qdrmfgp_state, qdrmfgp2_tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4dj, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")

View File

@ -40,6 +40,7 @@ public:
DECLARE_VIDEO_START(kongambl); DECLARE_VIDEO_START(kongambl);
UINT32 screen_update_kongambl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_kongambl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(kongambl_vblank); TIMER_DEVICE_CALLBACK_MEMBER(kongambl_vblank);
K056832_CB_MEMBER(tile_callback);
}; };
@ -538,7 +539,7 @@ static void kongambl_sprite_callback( running_machine &machine, int *code, int *
} }
static void kongambl_tile_callback( running_machine &machine, int layer, int *code, int *color, int *flags ) K056832_CB_MEMBER(kongambl_state::tile_callback)
{ {
} }
@ -560,15 +561,6 @@ static GFXDECODE_START( tasman )
GFXDECODE_END GFXDECODE_END
static const k056832_interface k056832_intf =
{
"gfx1", 0,
K056832_BPP_8TASMAN,
0, 0,
kongambl_tile_callback, "none"
};
static const k053247_interface k053247_intf = static const k053247_interface k053247_intf =
{ {
"gfx2", 1, "gfx2", 1,
@ -621,7 +613,9 @@ static MACHINE_CONFIG_START( kongambl, kongambl_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tasman) MCFG_GFXDECODE_ADD("gfxdecode", "palette", tasman)
MCFG_K056832_ADD("k056832", k056832_intf) MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(kongambl_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8TASMAN, 0, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")

View File

@ -454,14 +454,6 @@ static const k054539_interface k054539_config =
ym_set_mixing ym_set_mixing
}; };
static const k056832_interface xexex_k056832_intf =
{
"gfx1", 0,
K056832_BPP_4,
1, 0,
xexex_tile_callback, "none"
};
static const k053247_interface xexex_k053246_intf = static const k053247_interface xexex_k053246_intf =
{ {
"gfx2", 1, "gfx2", 1,
@ -543,9 +535,13 @@ static MACHINE_CONFIG_START( xexex, xexex_state )
MCFG_PALETTE_ENABLE_HILIGHTS() MCFG_PALETTE_ENABLE_HILIGHTS()
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD("k056832", xexex_k056832_intf)
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(xexex_state, tile_callback)
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")
MCFG_K053246_ADD("k053246", xexex_k053246_intf) MCFG_K053246_ADD("k053246", xexex_k053246_intf)
MCFG_K053246_GFXDECODE("gfxdecode") MCFG_K053246_GFXDECODE("gfxdecode")
MCFG_K053246_PALETTE("palette") MCFG_K053246_PALETTE("palette")

View File

@ -253,6 +253,7 @@ public:
INTERRUPT_GEN_MEMBER(zr107_vblank); INTERRUPT_GEN_MEMBER(zr107_vblank);
WRITE_LINE_MEMBER(k054539_irq_gen); WRITE_LINE_MEMBER(k054539_irq_gen);
ADC083X_INPUT_CB(adc0838_callback); ADC083X_INPUT_CB(adc0838_callback);
K056832_CB_MEMBER(tile_callback);
protected: protected:
virtual void machine_start(); virtual void machine_start();
@ -298,7 +299,7 @@ WRITE32_MEMBER(zr107_state::paletteram32_w)
#define NUM_LAYERS 2 #define NUM_LAYERS 2
static void game_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(zr107_state::tile_callback)
{ {
*color += layer * 0x40; *color += layer * 0x40;
} }
@ -737,14 +738,6 @@ WRITE_LINE_MEMBER(zr107_state::k054539_irq_gen)
} }
static const k056832_interface zr107_k056832_intf =
{
"gfx2", 1,
K056832_BPP_8,
1, 0,
game_tile_callback, "none"
};
/* PowerPC interrupts /* PowerPC interrupts
IRQ0: Vblank IRQ0: Vblank
@ -796,7 +789,9 @@ static MACHINE_CONFIG_START( zr107, zr107_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_K056832_ADD("k056832", zr107_k056832_intf) MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(zr107_state, tile_callback)
MCFG_K056832_CONFIG("gfx2", 1, K056832_BPP_8, 1, 0, "none")
MCFG_K056832_GFXDECODE("gfxdecode") MCFG_K056832_GFXDECODE("gfxdecode")
MCFG_K056832_PALETTE("palette") MCFG_K056832_PALETTE("palette")

View File

@ -61,11 +61,8 @@ public:
UINT32 screen_update_asterix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_asterix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(asterix_interrupt); INTERRUPT_GEN_MEMBER(asterix_interrupt);
K05324X_CB_MEMBER(sprite_callback); K05324X_CB_MEMBER(sprite_callback);
K056832_CB_MEMBER(tile_callback);
protected: protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
}; };
/*----------- defined in video/asterix.c -----------*/
extern void asterix_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);

View File

@ -56,7 +56,5 @@ public:
UINT32 screen_update_bishi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_bishi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(bishi_scanline); TIMER_DEVICE_CALLBACK_MEMBER(bishi_scanline);
DECLARE_WRITE_LINE_MEMBER(sound_irq_gen); DECLARE_WRITE_LINE_MEMBER(sound_irq_gen);
K056832_CB_MEMBER(tile_callback);
}; };
/*----------- defined in video/bishi.c -----------*/
extern void bishi_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);

View File

@ -71,8 +71,8 @@ public:
virtual void video_start(); virtual void video_start();
UINT32 screen_update_dbz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_dbz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(dbz_scanline); TIMER_DEVICE_CALLBACK_MEMBER(dbz_scanline);
K056832_CB_MEMBER(tile_callback);
}; };
/*----------- defined in video/dbz.c -----------*/ /*----------- defined in video/dbz.c -----------*/
extern void dbz_sprite_callback(running_machine &machine, int *code, int *color, int *priority_mask); extern void dbz_sprite_callback(running_machine &machine, int *code, int *color, int *priority_mask);
extern void dbz_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);

View File

@ -75,7 +75,5 @@ public:
required_device<gfxdecode_device> m_gfxdecode; required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette; required_device<palette_device> m_palette;
required_shared_ptr<UINT32> m_generic_paletteram_32; required_shared_ptr<UINT32> m_generic_paletteram_32;
K056832_CB_MEMBER(tile_callback);
}; };
/*----------- defined in video/djmain.c -----------*/
void djmain_tile_callback(running_machine& machine, int layer, int *code, int *color, int *flags);

View File

@ -60,9 +60,9 @@ public:
UINT32 screen_update_gijoe(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_gijoe(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(gijoe_interrupt); INTERRUPT_GEN_MEMBER(gijoe_interrupt);
TIMER_CALLBACK_MEMBER(dmaend_callback); TIMER_CALLBACK_MEMBER(dmaend_callback);
void gijoe_objdma( ); void gijoe_objdma();
K056832_CB_MEMBER(tile_callback);
}; };
/*----------- defined in video/gijoe.c -----------*/ /*----------- defined in video/gijoe.c -----------*/
extern void gijoe_sprite_callback(running_machine &machine, int *code, int *color, int *priority_mask); extern void gijoe_sprite_callback(running_machine &machine, int *code, int *color, int *priority_mask);
extern void gijoe_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);

View File

@ -133,6 +133,8 @@ public:
TIMER_CALLBACK_MEMBER(boothack_callback); TIMER_CALLBACK_MEMBER(boothack_callback);
TIMER_DEVICE_CALLBACK_MEMBER(konamigx_hbinterrupt); TIMER_DEVICE_CALLBACK_MEMBER(konamigx_hbinterrupt);
ADC083X_INPUT_CB(adc0834_callback); ADC083X_INPUT_CB(adc0834_callback);
K056832_CB_MEMBER(type2_tile_callback);
K056832_CB_MEMBER(alpha_tile_callback);
void _gxcommoninitnosprites(running_machine &machine); void _gxcommoninitnosprites(running_machine &machine);
void _gxcommoninit(running_machine &machine); void _gxcommoninit(running_machine &machine);

View File

@ -53,7 +53,5 @@ public:
UINT32 screen_update_lethalen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_lethalen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(lethalen_interrupt); INTERRUPT_GEN_MEMBER(lethalen_interrupt);
K05324X_CB_MEMBER(sprite_callback); K05324X_CB_MEMBER(sprite_callback);
K056832_CB_MEMBER(tile_callback);
}; };
/*----------- defined in video/lethal.c -----------*/
extern void lethalen_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);

View File

@ -82,8 +82,8 @@ public:
INTERRUPT_GEN_MEMBER(moobl_interrupt); INTERRUPT_GEN_MEMBER(moobl_interrupt);
TIMER_CALLBACK_MEMBER(dmaend_callback); TIMER_CALLBACK_MEMBER(dmaend_callback);
void moo_objdma(); void moo_objdma();
K056832_CB_MEMBER(tile_callback);
}; };
/*----------- defined in video/moo.c -----------*/ /*----------- defined in video/moo.c -----------*/
extern void moo_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);
extern void moo_sprite_callback(running_machine &machine, int *code, int *color, int *priority_mask); extern void moo_sprite_callback(running_machine &machine, int *code, int *color, int *priority_mask);

View File

@ -93,4 +93,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(metamrph_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(metamrph_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(mchamp_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(mchamp_interrupt);
void reset_sound_region(); void reset_sound_region();
K056832_CB_MEMBER(mystwarr_tile_callback);
K056832_CB_MEMBER(game5bpp_tile_callback);
K056832_CB_MEMBER(game4bpp_tile_callback);
}; };

View File

@ -64,8 +64,6 @@ public:
DECLARE_WRITE_LINE_MEMBER(ide_interrupt); DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
DECLARE_WRITE_LINE_MEMBER(gp2_ide_interrupt); DECLARE_WRITE_LINE_MEMBER(gp2_ide_interrupt);
DECLARE_WRITE_LINE_MEMBER(k054539_irq1_gen); DECLARE_WRITE_LINE_MEMBER(k054539_irq1_gen);
K056832_CB_MEMBER(qdrmfgp_tile_callback);
K056832_CB_MEMBER(qdrmfgp2_tile_callback);
}; };
/*----------- defined in video/qdrmfgp.c -----------*/
void qdrmfgp_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);
void qdrmfgp2_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);

View File

@ -94,9 +94,9 @@ public:
void xexex_postload(); void xexex_postload();
void xexex_objdma( int limiter ); void xexex_objdma( int limiter );
void parse_control2( ); void parse_control2( );
K056832_CB_MEMBER(tile_callback);
}; };
/*----------- defined in video/xexex.c -----------*/ /*----------- defined in video/xexex.c -----------*/
extern void xexex_sprite_callback(running_machine &machine, int *code, int *color, int *priority_mask); extern void xexex_sprite_callback(running_machine &machine, int *code, int *color, int *priority_mask);
extern void xexex_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags);

View File

@ -34,13 +34,11 @@ K05324X_CB_MEMBER(asterix_state::sprite_callback)
} }
void asterix_tile_callback( running_machine &machine, int layer, int *code, int *color, int *flags ) K056832_CB_MEMBER(asterix_state::tile_callback)
{ {
asterix_state *state = machine.driver_data<asterix_state>();
*flags = *code & 0x1000 ? TILE_FLIPX : 0; *flags = *code & 0x1000 ? TILE_FLIPX : 0;
*color = (state->m_layer_colorbase[layer] + ((*code & 0xe000) >> 13)) & 0x7f; *color = (m_layer_colorbase[layer] + ((*code & 0xe000) >> 13)) & 0x7f;
*code = (*code & 0x03ff) | state->m_tilebanks[(*code >> 10) & 3]; *code = (*code & 0x03ff) | m_tilebanks[(*code >> 10) & 3];
} }
UINT32 asterix_state::screen_update_asterix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) UINT32 asterix_state::screen_update_asterix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)

View File

@ -11,16 +11,14 @@
#include "includes/bishi.h" #include "includes/bishi.h"
void bishi_tile_callback( running_machine &machine, int layer, int *code, int *color, int *flags ) K056832_CB_MEMBER(bishi_state::tile_callback)
{ {
bishi_state *state = machine.driver_data<bishi_state>();
// *code -= '0'; // *code -= '0';
// *color = state->m_layer_colorbase[layer] | (*color>>2 & 0x0f); // *color = m_layer_colorbase[layer] | (*color>>2 & 0x0f);
// K055555GX_decode_vmixcolor(layer, color); // K055555GX_decode_vmixcolor(layer, color);
// if (*color) osd_printf_debug("plane %x col %x [55 %x %x]\n", layer, *color, layer_colorbase[layer], K055555_get_palette_index(layer)); // if (*color) osd_printf_debug("plane %x col %x [55 %x %x]\n", layer, *color, layer_colorbase[layer], K055555_get_palette_index(layer));
*color = state->m_layer_colorbase[layer] + ((*color & 0xf0)); *color = m_layer_colorbase[layer] + ((*color & 0xf0));
} }
void bishi_state::video_start() void bishi_state::video_start()

View File

@ -12,10 +12,9 @@
#include "includes/dbz.h" #include "includes/dbz.h"
void dbz_tile_callback( running_machine &machine, int layer, int *code, int *color, int *flags ) K056832_CB_MEMBER(dbz_state::tile_callback)
{ {
dbz_state *state = machine.driver_data<dbz_state>(); *color = (m_layer_colorbase[layer] << 1) + ((*color & 0x3c) >> 2);
*color = (state->m_layer_colorbase[layer] << 1) + ((*color & 0x3c) >> 2);
} }
void dbz_sprite_callback( running_machine &machine, int *code, int *color, int *priority_mask ) void dbz_sprite_callback( running_machine &machine, int *code, int *color, int *priority_mask )

View File

@ -127,7 +127,7 @@ void djmain_state::draw_sprites( bitmap_rgb32 &bitmap, const rectangle &cliprect
} }
void djmain_tile_callback(running_machine& machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(djmain_state::tile_callback)
{ {
} }

View File

@ -20,9 +20,8 @@ void gijoe_sprite_callback( running_machine &machine, int *code, int *color, int
*color = state->m_sprite_colorbase | (*color & 0x001f); *color = state->m_sprite_colorbase | (*color & 0x001f);
} }
void gijoe_tile_callback( running_machine &machine, int layer, int *code, int *color, int *flags ) K056832_CB_MEMBER(gijoe_state::tile_callback)
{ {
gijoe_state *state = machine.driver_data<gijoe_state>();
int tile = *code; int tile = *code;
if (tile >= 0xf000 && tile <= 0xf4ff) if (tile >= 0xf000 && tile <= 0xf4ff)
@ -30,23 +29,23 @@ void gijoe_tile_callback( running_machine &machine, int layer, int *code, int *c
tile &= 0x0fff; tile &= 0x0fff;
if (tile < 0x0310) if (tile < 0x0310)
{ {
state->m_avac_occupancy[layer] |= 0x0f00; m_avac_occupancy[layer] |= 0x0f00;
tile |= state->m_avac_bits[0]; tile |= m_avac_bits[0];
} }
else if (tile < 0x0470) else if (tile < 0x0470)
{ {
state->m_avac_occupancy[layer] |= 0xf000; m_avac_occupancy[layer] |= 0xf000;
tile |= state->m_avac_bits[1]; tile |= m_avac_bits[1];
} }
else else
{ {
state->m_avac_occupancy[layer] |= 0x00f0; m_avac_occupancy[layer] |= 0x00f0;
tile |= state->m_avac_bits[2]; tile |= m_avac_bits[2];
} }
*code = tile; *code = tile;
} }
*color = (*color >> 2 & 0x0f) | state->m_layer_colorbase[layer]; *color = (*color >> 2 & 0x0f) | m_layer_colorbase[layer];
} }
void gijoe_state::video_start() void gijoe_state::video_start()

View File

@ -189,7 +189,12 @@ k056832_device::k056832_device(const machine_config &mconfig, const char *tag, d
m_videoram(NULL), m_videoram(NULL),
m_num_gfx_banks(0), m_num_gfx_banks(0),
m_cur_gfx_banks(0), m_cur_gfx_banks(0),
m_rom_half(0), m_gfx_memory_region(NULL),
m_gfx_num(0),
m_bpp(-1),
m_big(0),
m_djmain_hack(0),
m_k055555_tag(NULL),
//m_layer_assoc_with_page[K056832_PAGE_COUNT], //m_layer_assoc_with_page[K056832_PAGE_COUNT],
//m_layer_offs[8][2], //m_layer_offs[8][2],
//m_lsram_page[8][2], //m_lsram_page[8][2],
@ -213,7 +218,7 @@ k056832_device::k056832_device(const machine_config &mconfig, const char *tag, d
m_use_ext_linescroll(0), m_use_ext_linescroll(0),
m_uses_tile_banks(0), m_uses_tile_banks(0),
m_cur_tile_bank(0), m_cur_tile_bank(0),
m_k055555(0), m_k055555(NULL),
m_gfxdecode(*this), m_gfxdecode(*this),
m_palette(*this) m_palette(*this)
{ {
@ -240,32 +245,6 @@ void k056832_device::static_set_palette_tag(device_t &device, const char *tag)
downcast<k056832_device &>(device).m_palette.set_tag(tag); downcast<k056832_device &>(device).m_palette.set_tag(tag);
} }
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
void k056832_device::device_config_complete()
{
// inherit a copy of the static data
const k056832_interface *intf = reinterpret_cast<const k056832_interface *>(static_config());
if (intf != NULL)
*static_cast<k056832_interface *>(this) = *intf;
// or initialize to defaults if none provided
else
{
m_gfx_memory_region = "";
m_gfx_num = 0;
m_bpp = -1;
m_big = 0;
m_djmain_hack = 0;
m_callback = NULL;
m_k055555_tag = "";
};
}
void k056832_device::create_tilemaps(running_machine &machine) void k056832_device::create_tilemaps(running_machine &machine)
{ {
tilemap_t *tmap; tilemap_t *tmap;
@ -387,11 +366,8 @@ void k056832_device::device_start()
memset(m_regs, 0x00, sizeof(m_regs) ); memset(m_regs, 0x00, sizeof(m_regs) );
memset(m_regsb, 0x00, sizeof(m_regsb) ); memset(m_regsb, 0x00, sizeof(m_regsb) );
// for non-interface cases we still use the vh_start call if (m_k055555_tag)
if (m_bpp == -1) m_k055555 = machine().device<k055555_device>(m_k055555_tag);
return;
m_k055555 = machine().device<k055555_device>(m_k055555_tag);
/* TODO: understand which elements MUST be init here (to keep correct layer /* TODO: understand which elements MUST be init here (to keep correct layer
associations) and which ones can can be init at RESET, if any */ associations) and which ones can can be init at RESET, if any */
@ -402,6 +378,8 @@ void k056832_device::device_start()
finalize_init(machine()); finalize_init(machine());
// bind callbacks
m_k056832_cb.bind_relative_to(*owner());
} }
/***************************************************************************** /*****************************************************************************
@ -557,7 +535,7 @@ void k056832_device::get_tile_info( tile_data &tileinfo, int tile_index, int pa
color = (attr & smptr->palm1) | (attr >> smptr->pals2 & smptr->palm2); color = (attr & smptr->palm1) | (attr >> smptr->pals2 & smptr->palm2);
flags = TILE_FLIPYX(flip); flags = TILE_FLIPYX(flip);
m_callback(machine(), layer, &code, &color, &flags); m_k056832_cb(layer, &code, &color, &flags);
SET_TILE_INFO_MEMBER(m_gfx_num, SET_TILE_INFO_MEMBER(m_gfx_num,
code, code,
@ -2185,25 +2163,6 @@ void k056832_device::create_gfx(running_machine &machine, const char *gfx_memory
} }
void k056832_device::altK056832_vh_start(running_machine &machine, const char *gfx_memory_region, int bpp, int big,
int (*scrolld)[4][2],
void (*callback)(running_machine &machine, int layer, int *code, int *color, int *flags),
int djmain_hack)
{
m_k055555 = 0;
m_callback = callback;
m_djmain_hack = djmain_hack;
create_gfx(machine, gfx_memory_region, bpp, big);
create_tilemaps(machine);
finalize_init(machine);
}
int k056832_device::altK056832_update_linemap(screen_device &screen, bitmap_rgb32 &bitmap, int page, int flags) int k056832_device::altK056832_update_linemap(screen_device &screen, bitmap_rgb32 &bitmap, int page, int flags)
{ {
if (m_page_tile_mode[page]) return(0); if (m_page_tile_mode[page]) return(0);
@ -2614,7 +2573,3 @@ int k056832_device::get_layer_association(void)
return(m_layer_association); return(m_layer_association);
} }
void k056832_device::K056832_set_k055555(k055555_device * mode)
{
m_k055555 = mode;
}

View File

@ -8,7 +8,15 @@
#include "video/k055555.h"// still needs k055555_get_palette_index #include "video/k055555.h"// still needs k055555_get_palette_index
typedef void (*k056832_callback)(running_machine &machine, int layer, int *code, int *color, int *flags); typedef device_delegate<void (int layer, int *code, int *color, int *flags)> k056832_cb_delegate;
#define K056832_CB_MEMBER(_name) void _name(int layer, int *code, int *color, int *flags)
#define MCFG_K056832_CB(_class, _method) \
k056832_device::set_k056832_callback(*device, k056832_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
#define MCFG_K056832_CONFIG(_gfx_reg, _gfx_num, _bpp, _big, _djmain_hack, _k055555) \
k056832_device::set_config(*device, _gfx_reg, _gfx_num, _bpp, _big, _djmain_hack, _k055555);
#define MCFG_K056832_ADD(_tag, _interface) \ #define MCFG_K056832_ADD(_tag, _interface) \
@ -21,14 +29,6 @@ typedef void (*k056832_callback)(running_machine &machine, int layer, int *code,
struct k056832_interface struct k056832_interface
{ {
const char *m_gfx_memory_region;
int m_gfx_num;
int m_bpp;
int m_big;
int m_djmain_hack;
k056832_callback m_callback;
const char *m_k055555_tag; // tbyahhoo uses the k056832 together with a k055555
}; };
@ -58,6 +58,18 @@ public:
m_k055555 = 0; m_k055555 = 0;
} }
static void set_k056832_callback(device_t &device, k056832_cb_delegate callback) { downcast<k056832_device &>(device).m_k056832_cb = callback; }
static void set_config(device_t &device, const char *gfx_reg, int gfx_num, int bpp, int big, int djmain_hack, const char *k055555)
{
k056832_device &dev = downcast<k056832_device &>(device);
dev.m_gfx_memory_region = gfx_reg;
dev.m_gfx_num = gfx_num;
dev.m_bpp = bpp;
dev.m_big = big;
dev.m_djmain_hack = djmain_hack;
dev.m_k055555_tag = k055555;
}
// static configuration // static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag); static void static_set_gfxdecode_tag(device_t &device, const char *tag);
static void static_set_palette_tag(device_t &device, const char *tag); static void static_set_palette_tag(device_t &device, const char *tag);
@ -122,7 +134,6 @@ public:
protected: protected:
// device-level overrides // device-level overrides
virtual void device_config_complete();
virtual void device_start(); virtual void device_start();
private: private:
@ -138,12 +149,16 @@ private:
int m_num_gfx_banks; // depends on size of graphics ROMs int m_num_gfx_banks; // depends on size of graphics ROMs
int m_cur_gfx_banks; // cached info for K056832_regs[0x1a] int m_cur_gfx_banks; // cached info for K056832_regs[0x1a]
k056832_cb_delegate m_k056832_cb;
//FIXME: device should be updated to use device_gfx_interface to get rid of most of these!
const char *m_gfx_memory_region;
int m_gfx_num;
int m_bpp;
int m_big;
int m_djmain_hack;
const char *m_k055555_tag; // tbyahhoo uses the k056832 together with a k055555
// ROM readback involves reading 2 halves of a word // ROM readback involves reading 2 halves of a word
@ -178,10 +193,6 @@ private:
k055555_device *m_k055555; /* used to choose colorbase */ k055555_device *m_k055555; /* used to choose colorbase */
void get_tile_info( tile_data &tileinfo, int tile_index, int pageIndex ); void get_tile_info( tile_data &tileinfo, int tile_index, int pageIndex );
@ -222,22 +233,12 @@ private:
required_device<gfxdecode_device> m_gfxdecode; required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette; required_device<palette_device> m_palette;
public: public:
// todo: collapse these into above
void altK056832_vh_start(running_machine &machine, const char *gfx_memory_region, int bpp, int big,
int (*scrolld)[4][2],
void (*callback)(running_machine &machine, int layer, int *code, int *color, int *flags),
int djmain_hack);
void K056832_set_k055555(k055555_device* mode); // k055555 hook
void m_tilemap_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority); void m_tilemap_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority);
private: private:
int altK056832_update_linemap(screen_device &screen, bitmap_rgb32 &bitmap, int page, int flags); int altK056832_update_linemap(screen_device &screen, bitmap_rgb32 &bitmap, int page, int flags);
}; };
extern const device_type K056832; extern const device_type K056832;

View File

@ -60,10 +60,6 @@ static bitmap_ind16 *gxtype1_roz_dstbitmap;
static bitmap_ind16 *gxtype1_roz_dstbitmap2; static bitmap_ind16 *gxtype1_roz_dstbitmap2;
static rectangle gxtype1_roz_dstbitmapclip; static rectangle gxtype1_roz_dstbitmapclip;
static void (*game_tile_callback)(running_machine &machine, int layer, int *code, int *color, int *flags);
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* 1st-Tier GX/MW Variables and Functions */ /* 1st-Tier GX/MW Variables and Functions */
@ -1110,7 +1106,7 @@ TILE_GET_INFO_MEMBER(konamigx_state::get_gx_psac1b_tile_info)
SET_TILE_INFO_MEMBER(0, tileno, colour, flip); SET_TILE_INFO_MEMBER(0, tileno, colour, flip);
} }
static void konamigx_type2_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(konamigx_state::type2_tile_callback)
{ {
int d = *code; int d = *code;
@ -1118,7 +1114,7 @@ static void konamigx_type2_tile_callback(running_machine &machine, int layer, in
K055555GX_decode_vmixcolor(layer, color); K055555GX_decode_vmixcolor(layer, color);
} }
static void konamigx_alpha_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(konamigx_state::alpha_tile_callback)
{ {
int mixcode; int mixcode;
int d = *code; int d = *code;
@ -1212,13 +1208,6 @@ void konamigx_state::_gxcommoninit(running_machine &machine)
VIDEO_START_MEMBER(konamigx_state,konamigx_5bpp) VIDEO_START_MEMBER(konamigx_state,konamigx_5bpp)
{ {
if (!strcmp(machine().system().name,"sexyparo") || !strcmp(machine().system().name,"sexyparoa"))
game_tile_callback = konamigx_alpha_tile_callback;
else
game_tile_callback = konamigx_type2_tile_callback;
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game_tile_callback, 0);
_gxcommoninit(machine()); _gxcommoninit(machine());
/* here are some hand tuned per game scroll offsets to go with the per game visible areas, /* here are some hand tuned per game scroll offsets to go with the per game visible areas,
@ -1226,7 +1215,6 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_5bpp)
if (!strcmp(machine().system().name,"tbyahhoo")) if (!strcmp(machine().system().name,"tbyahhoo"))
{ {
m_k056832->K056832_set_k055555(m_k055555);
gx_tilemode = 1; gx_tilemode = 1;
} else } else
@ -1254,7 +1242,6 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_5bpp)
VIDEO_START_MEMBER(konamigx_state,winspike) VIDEO_START_MEMBER(konamigx_state,winspike)
{ {
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_alpha_tile_callback, 2);
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_LE2, -53, -23, konamigx_type2_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_LE2, -53, -23, konamigx_type2_sprite_callback);
_gxcommoninitnosprites(machine()); _gxcommoninitnosprites(machine());
@ -1262,7 +1249,6 @@ VIDEO_START_MEMBER(konamigx_state,winspike)
VIDEO_START_MEMBER(konamigx_state,dragoonj) VIDEO_START_MEMBER(konamigx_state,dragoonj)
{ {
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 1, NULL, konamigx_type2_tile_callback, 0);
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_RNG, -53, -23, konamigx_dragoonj_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_RNG, -53, -23, konamigx_dragoonj_sprite_callback);
_gxcommoninitnosprites(machine()); _gxcommoninitnosprites(machine());
@ -1275,7 +1261,6 @@ VIDEO_START_MEMBER(konamigx_state,dragoonj)
VIDEO_START_MEMBER(konamigx_state,le2) VIDEO_START_MEMBER(konamigx_state,le2)
{ {
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 1, NULL, konamigx_type2_tile_callback, 0);
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_LE2, -46, -23, konamigx_le2_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_LE2, -46, -23, konamigx_le2_sprite_callback);
_gxcommoninitnosprites(machine()); _gxcommoninitnosprites(machine());
@ -1288,8 +1273,6 @@ VIDEO_START_MEMBER(konamigx_state,le2)
VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp) VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp)
{ {
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 0);
_gxcommoninit(machine()); _gxcommoninit(machine());
if (!strcmp(machine().system().name,"tokkae") || !strcmp(machine().system().name,"tkmmpzdm")) if (!strcmp(machine().system().name,"tokkae") || !strcmp(machine().system().name,"tkmmpzdm"))
@ -1303,8 +1286,6 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type3)
{ {
int width = m_screen->width(); int width = m_screen->width();
int height = m_screen->height(); int height = m_screen->height();
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 1);
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -132, -23, konamigx_type2_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -132, -23, konamigx_type2_sprite_callback);
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height); dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
@ -1343,7 +1324,6 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4)
int width = m_screen->width(); int width = m_screen->width();
int height = m_screen->height(); int height = m_screen->height();
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 0);
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -79, -24, konamigx_type2_sprite_callback); // -23 looks better in intro m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -79, -24, konamigx_type2_sprite_callback); // -23 looks better in intro
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height); dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
@ -1374,7 +1354,6 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_vsn)
int width = m_screen->width(); int width = m_screen->width();
int height = m_screen->height(); int height = m_screen->height();
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 2); // set djmain_hack to 2 to kill layer association or half the tilemaps vanish on screen 0
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -132, -23, konamigx_type2_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -132, -23, konamigx_type2_sprite_callback);
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height); dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
@ -1404,7 +1383,6 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_sd2)
int width = m_screen->width(); int width = m_screen->width();
int height = m_screen->height(); int height = m_screen->height();
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 0);
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -81, -23, konamigx_type2_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -81, -23, konamigx_type2_sprite_callback);
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height); dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
@ -1435,8 +1413,6 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_sd2)
VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp_2) VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp_2)
{ {
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_6, 1, NULL, konamigx_type2_tile_callback, 0);
if (!strcmp(machine().system().name,"salmndr2") || !strcmp(machine().system().name,"salmndr2a")) if (!strcmp(machine().system().name,"salmndr2") || !strcmp(machine().system().name,"salmndr2a"))
{ {
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -48, -23, konamigx_salmndr2_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -48, -23, konamigx_salmndr2_sprite_callback);
@ -1451,7 +1427,6 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp_2)
VIDEO_START_MEMBER(konamigx_state,opengolf) VIDEO_START_MEMBER(konamigx_state,opengolf)
{ {
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, konamigx_type2_tile_callback, 0);
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -53, -23, konamigx_type2_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -53, -23, konamigx_type2_sprite_callback);
_gxcommoninitnosprites(machine()); _gxcommoninitnosprites(machine());
@ -1489,7 +1464,6 @@ VIDEO_START_MEMBER(konamigx_state,opengolf)
VIDEO_START_MEMBER(konamigx_state,racinfrc) VIDEO_START_MEMBER(konamigx_state,racinfrc)
{ {
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 0);
m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX, -53, -23, konamigx_type2_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX, -53, -23, konamigx_type2_sprite_callback);
_gxcommoninitnosprites(machine()); _gxcommoninitnosprites(machine());

View File

@ -40,10 +40,9 @@ K05324X_CB_MEMBER(lethal_state::sprite_callback)
*code = (*code & 0x3fff); // | spritebanks[(*code >> 12) & 3]; *code = (*code & 0x3fff); // | spritebanks[(*code >> 12) & 3];
} }
void lethalen_tile_callback( running_machine &machine, int layer, int *code, int *color, int *flags ) K056832_CB_MEMBER(lethal_state::tile_callback)
{ {
lethal_state *state = machine.driver_data<lethal_state>(); *color = m_layer_colorbase[layer] + ((*color & 0x3c) << 2);
*color = state->m_layer_colorbase[layer] + ((*color & 0x3c) << 2);
} }
void lethal_state::video_start() void lethal_state::video_start()

View File

@ -28,10 +28,9 @@ void moo_sprite_callback( running_machine &machine, int *code, int *color, int *
*color = state->m_sprite_colorbase | (*color & 0x001f); *color = state->m_sprite_colorbase | (*color & 0x001f);
} }
void moo_tile_callback( running_machine &machine, int layer, int *code, int *color, int *flags ) K056832_CB_MEMBER(moo_state::tile_callback)
{ {
moo_state *state = machine.driver_data<moo_state>(); *color = m_layer_colorbase[layer] | (*color >> 2 & 0x0f);
*color = state->m_layer_colorbase[layer] | (*color >> 2 & 0x0f);
} }
VIDEO_START_MEMBER(moo_state,moo) VIDEO_START_MEMBER(moo_state,moo)

View File

@ -56,26 +56,22 @@ static void mystwarr_decode_tiles(running_machine &machine)
// Mystic Warriors requires tile based blending. // Mystic Warriors requires tile based blending.
static void mystwarr_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(mystwarr_state::mystwarr_tile_callback)
{ {
mystwarr_state *state = machine.driver_data<mystwarr_state>(); if (layer == 1) {if ((*code & 0xff00) + (*color) == 0x4101) m_cbparam++; else m_cbparam--;} //* water hack (TEMPORARY)
if (layer==1) {if ((*code&0xff00)+(*color)==0x4101) state->m_cbparam++; else state->m_cbparam--;} //* water hack (TEMPORARY) *color = m_layer_colorbase[layer] | (*color >> 1 & 0x1e);
*color = state->m_layer_colorbase[layer] | (*color>>1 & 0x1e);
} }
// for games with 5bpp tile data // for games with 5bpp tile data
static void game5bpp_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(mystwarr_state::game5bpp_tile_callback)
{ {
mystwarr_state *state = machine.driver_data<mystwarr_state>(); *color = m_layer_colorbase[layer] | (*color >> 1 & 0x1e);
*color = state->m_layer_colorbase[layer] | (*color>>1 & 0x1e);
} }
// for games with 4bpp tile data // for games with 4bpp tile data
static void game4bpp_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(mystwarr_state::game4bpp_tile_callback)
{ {
mystwarr_state *state = machine.driver_data<mystwarr_state>(); *color = m_layer_colorbase[layer] | (*color >> 2 & 0x0f);
*color = state->m_layer_colorbase[layer] | (*color>>2 & 0x0f);
} }
static void mystwarr_sprite_callback(running_machine &machine, int *code, int *color, int *priority) static void mystwarr_sprite_callback(running_machine &machine, int *code, int *color, int *priority)
@ -160,8 +156,6 @@ VIDEO_START_MEMBER(mystwarr_state,gaiapols)
{ {
m_gametype = 0; m_gametype = 0;
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
mystwarr_decode_tiles(machine()); mystwarr_decode_tiles(machine());
m_k055673->alt_k055673_vh_start(machine(), "gfx2", 1, -61, -22, gaiapols_sprite_callback); // stage2 brick walls m_k055673->alt_k055673_vh_start(machine(), "gfx2", 1, -61, -22, gaiapols_sprite_callback); // stage2 brick walls
@ -197,8 +191,6 @@ VIDEO_START_MEMBER(mystwarr_state,dadandrn)
{ {
m_gametype = 1; m_gametype = 1;
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game5bpp_tile_callback, 0);
mystwarr_decode_tiles(machine()); mystwarr_decode_tiles(machine());
m_k055673->alt_k055673_vh_start(machine(), "gfx2", 0, -42, -22, gaiapols_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", 0, -42, -22, gaiapols_sprite_callback);
@ -223,8 +215,6 @@ VIDEO_START_MEMBER(mystwarr_state,mystwarr)
{ {
m_gametype = 0; m_gametype = 0;
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, mystwarr_tile_callback, 0);
mystwarr_decode_tiles(machine()); mystwarr_decode_tiles(machine());
m_k055673->alt_k055673_vh_start(machine(), "gfx2", 0, -48, -24, mystwarr_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", 0, -48, -24, mystwarr_sprite_callback);
@ -243,8 +233,6 @@ VIDEO_START_MEMBER(mystwarr_state,metamrph)
{ {
m_gametype = 0; m_gametype = 0;
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
mystwarr_decode_tiles(machine()); mystwarr_decode_tiles(machine());
m_k055673->alt_k055673_vh_start(machine(), "gfx2", 1, -51, -24, metamrph_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", 1, -51, -24, metamrph_sprite_callback);
@ -262,8 +250,6 @@ VIDEO_START_MEMBER(mystwarr_state,viostorm)
{ {
m_gametype = 0; m_gametype = 0;
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
mystwarr_decode_tiles(machine()); mystwarr_decode_tiles(machine());
m_k055673->alt_k055673_vh_start(machine(), "gfx2", 1, -62, -23, metamrph_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", 1, -62, -23, metamrph_sprite_callback);
@ -280,8 +266,6 @@ VIDEO_START_MEMBER(mystwarr_state,martchmp)
{ {
m_gametype = 0; m_gametype = 0;
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game5bpp_tile_callback, 0);
mystwarr_decode_tiles(machine()); mystwarr_decode_tiles(machine());
m_k055673->alt_k055673_vh_start(machine(), "gfx2", 0, -58, -23, martchmp_sprite_callback); m_k055673->alt_k055673_vh_start(machine(), "gfx2", 0, -58, -23, martchmp_sprite_callback);

View File

@ -8,14 +8,12 @@
#include "includes/qdrmfgp.h" #include "includes/qdrmfgp.h"
K056832_CB_MEMBER(qdrmfgp_state::qdrmfgp_tile_callback)
void qdrmfgp_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags)
{ {
qdrmfgp_state *state = machine.driver_data<qdrmfgp_state>(); *color = ((*color>>2) & 0x0f) | m_pal;
*color = ((*color>>2) & 0x0f) | state->m_pal;
} }
void qdrmfgp2_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(qdrmfgp_state::qdrmfgp2_tile_callback)
{ {
*color = (*color>>1) & 0x7f; *color = (*color>>1) & 0x7f;
} }

View File

@ -24,10 +24,9 @@ void xexex_sprite_callback( running_machine &machine, int *code, int *color, int
*color = state->m_sprite_colorbase | (*color & 0x001f); *color = state->m_sprite_colorbase | (*color & 0x001f);
} }
void xexex_tile_callback(running_machine &machine, int layer, int *code, int *color, int *flags) K056832_CB_MEMBER(xexex_state::tile_callback)
{ {
xexex_state *state = machine.driver_data<xexex_state>(); *color = m_layer_colorbase[layer] | (*color >> 2 & 0x0f);
*color = state->m_layer_colorbase[layer] | (*color >> 2 & 0x0f);
} }
void xexex_state::video_start() void xexex_state::video_start()