mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
Color table removal
This commit is contained in:
parent
5b35164ee0
commit
6e1e95866d
@ -252,8 +252,8 @@ static const gfx_layout bulletlayout =
|
||||
|
||||
|
||||
static GFXDECODE_START( tankbatt )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 64 )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, bulletlayout, 0, 64 )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 256 )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, bulletlayout, 0, 256 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -292,8 +292,7 @@ static MACHINE_DRIVER_START( tankbatt )
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(tankbatt)
|
||||
MDRV_PALETTE_LENGTH(65)
|
||||
MDRV_COLORTABLE_LENGTH(128)
|
||||
MDRV_PALETTE_LENGTH(256*2)
|
||||
|
||||
MDRV_PALETTE_INIT(tankbatt)
|
||||
MDRV_VIDEO_START(tankbatt)
|
||||
|
@ -92,14 +92,14 @@ static UINT8 mAmazonProtReg[6];
|
||||
|
||||
extern UINT16 *amazon_videoram;
|
||||
|
||||
extern PALETTE_INIT( amazon );
|
||||
extern WRITE16_HANDLER( amazon_background_w );
|
||||
extern WRITE16_HANDLER( amazon_foreground_w );
|
||||
extern WRITE16_HANDLER( amazon_scrolly_w );
|
||||
extern WRITE16_HANDLER( amazon_scrollx_w );
|
||||
extern WRITE16_HANDLER( amazon_flipscreen_w );
|
||||
extern VIDEO_START( amazon );
|
||||
extern VIDEO_UPDATE( amazon );
|
||||
PALETTE_INIT( amazon );
|
||||
WRITE16_HANDLER( amazon_background_w );
|
||||
WRITE16_HANDLER( amazon_foreground_w );
|
||||
WRITE16_HANDLER( amazon_scrolly_w );
|
||||
WRITE16_HANDLER( amazon_scrollx_w );
|
||||
WRITE16_HANDLER( amazon_flipscreen_w );
|
||||
VIDEO_START( amazon );
|
||||
VIDEO_UPDATE( amazon );
|
||||
|
||||
static const UINT16 mAmazonProtData[] =
|
||||
{
|
||||
@ -622,8 +622,7 @@ static MACHINE_DRIVER_START( amazon )
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(terracre)
|
||||
MDRV_PALETTE_LENGTH(256)
|
||||
MDRV_COLORTABLE_LENGTH(1*16+16*16+16*256)
|
||||
MDRV_PALETTE_LENGTH(1*16+16*16+16*256)
|
||||
|
||||
MDRV_PALETTE_INIT(amazon)
|
||||
MDRV_VIDEO_START(amazon)
|
||||
@ -660,8 +659,7 @@ static MACHINE_DRIVER_START( ym3526 )
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(terracre)
|
||||
MDRV_PALETTE_LENGTH(256)
|
||||
MDRV_COLORTABLE_LENGTH(1*16+16*16+16*256)
|
||||
MDRV_PALETTE_LENGTH(1*16+16*16+16*256)
|
||||
|
||||
MDRV_PALETTE_INIT(amazon)
|
||||
MDRV_VIDEO_START(amazon)
|
||||
@ -698,8 +696,7 @@ static MACHINE_DRIVER_START( ym2203 )
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(terracre)
|
||||
MDRV_PALETTE_LENGTH(256)
|
||||
MDRV_COLORTABLE_LENGTH(1*16+16*16+16*256)
|
||||
MDRV_PALETTE_LENGTH(1*16+16*16+16*256)
|
||||
|
||||
MDRV_PALETTE_INIT(amazon)
|
||||
MDRV_VIDEO_START(amazon)
|
||||
@ -755,12 +752,14 @@ ROM_START( terracre )
|
||||
ROM_LOAD( "2a_6g.rom", 0x08000, 0x4000, CRC(4a9ec3e6) SHA1(0a35b82fb49ecf7edafd02744a48490e744c0a00) )
|
||||
ROM_LOAD( "2a_7g.rom", 0x0c000, 0x4000, CRC(450749fc) SHA1(376ab98ab8db56ed45f7d97a221dfd52e389cb5a) )
|
||||
|
||||
ROM_REGION( 0x0500, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "tc1a_10f.bin", 0x0000, 0x0100, CRC(ce07c544) SHA1(c3691cb420c88f1887a55e3035b5d017decbc17a) ) /* red component */
|
||||
ROM_LOAD( "tc1a_11f.bin", 0x0100, 0x0100, CRC(566d323a) SHA1(fe83585a0d9c7f942a5e54620b627a5a17a0fcf4) ) /* green component */
|
||||
ROM_LOAD( "tc1a_12f.bin", 0x0200, 0x0100, CRC(7ea63946) SHA1(d7b89694a80736c7605b5c83d25d8b706f4504ab) ) /* blue component */
|
||||
ROM_LOAD( "tc2a_2g.bin", 0x0300, 0x0100, CRC(08609bad) SHA1(e5daee3c3fea6620e3c2b91becd93bc4d3cdf011) ) /* sprite lookup table */
|
||||
ROM_LOAD( "tc2a_4e.bin", 0x0400, 0x0100, CRC(2c43991f) SHA1(312112832bee511b0545524295aa9bc2e756db0f) ) /* sprite palette bank */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_USER1, 0 )
|
||||
ROM_LOAD( "tc2a_4e.bin", 0x0000, 0x0100, CRC(2c43991f) SHA1(312112832bee511b0545524295aa9bc2e756db0f) ) /* sprite palette bank */
|
||||
ROM_END
|
||||
|
||||
/**********************************************************/
|
||||
@ -796,12 +795,14 @@ ROM_START( terracrb )
|
||||
ROM_LOAD( "2a_6g.rom", 0x08000, 0x4000, CRC(4a9ec3e6) SHA1(0a35b82fb49ecf7edafd02744a48490e744c0a00) )
|
||||
ROM_LOAD( "2a_7g.rom", 0x0c000, 0x4000, CRC(450749fc) SHA1(376ab98ab8db56ed45f7d97a221dfd52e389cb5a) )
|
||||
|
||||
ROM_REGION( 0x0500, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "tc1a_10f.bin", 0x0000, 0x0100, CRC(ce07c544) SHA1(c3691cb420c88f1887a55e3035b5d017decbc17a) ) /* red component */
|
||||
ROM_LOAD( "tc1a_11f.bin", 0x0100, 0x0100, CRC(566d323a) SHA1(fe83585a0d9c7f942a5e54620b627a5a17a0fcf4) ) /* green component */
|
||||
ROM_LOAD( "tc1a_12f.bin", 0x0200, 0x0100, CRC(7ea63946) SHA1(d7b89694a80736c7605b5c83d25d8b706f4504ab) ) /* blue component */
|
||||
ROM_LOAD( "tc2a_2g.bin", 0x0300, 0x0100, CRC(08609bad) SHA1(e5daee3c3fea6620e3c2b91becd93bc4d3cdf011) ) /* sprite lookup table */
|
||||
ROM_LOAD( "tc2a_4e.bin", 0x0400, 0x0100, CRC(2c43991f) SHA1(312112832bee511b0545524295aa9bc2e756db0f) ) /* sprite palette bank */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_USER1, 0 )
|
||||
ROM_LOAD( "tc2a_4e.bin", 0x0000, 0x0100, CRC(2c43991f) SHA1(312112832bee511b0545524295aa9bc2e756db0f) ) /* sprite palette bank */
|
||||
ROM_END
|
||||
|
||||
/**********************************************************/
|
||||
@ -836,12 +837,14 @@ ROM_START( terracra )
|
||||
ROM_LOAD( "2a_6g.rom", 0x08000, 0x4000, CRC(4a9ec3e6) SHA1(0a35b82fb49ecf7edafd02744a48490e744c0a00) )
|
||||
ROM_LOAD( "2a_7g.rom", 0x0c000, 0x4000, CRC(450749fc) SHA1(376ab98ab8db56ed45f7d97a221dfd52e389cb5a) )
|
||||
|
||||
ROM_REGION( 0x0500, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "tc1a_10f.bin", 0x0000, 0x0100, CRC(ce07c544) SHA1(c3691cb420c88f1887a55e3035b5d017decbc17a) ) /* red component */
|
||||
ROM_LOAD( "tc1a_11f.bin", 0x0100, 0x0100, CRC(566d323a) SHA1(fe83585a0d9c7f942a5e54620b627a5a17a0fcf4) ) /* green component */
|
||||
ROM_LOAD( "tc1a_12f.bin", 0x0200, 0x0100, CRC(7ea63946) SHA1(d7b89694a80736c7605b5c83d25d8b706f4504ab) ) /* blue component */
|
||||
ROM_LOAD( "tc2a_2g.bin", 0x0300, 0x0100, CRC(08609bad) SHA1(e5daee3c3fea6620e3c2b91becd93bc4d3cdf011) ) /* sprite lookup table */
|
||||
ROM_LOAD( "tc2a_4e.bin", 0x0400, 0x0100, CRC(2c43991f) SHA1(312112832bee511b0545524295aa9bc2e756db0f) ) /* sprite palette bank */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_USER1, 0 )
|
||||
ROM_LOAD( "tc2a_4e.bin", 0x0000, 0x0100, CRC(2c43991f) SHA1(312112832bee511b0545524295aa9bc2e756db0f) ) /* sprite palette bank */
|
||||
ROM_END
|
||||
|
||||
ROM_START( amazon )
|
||||
@ -870,15 +873,17 @@ ROM_START( amazon )
|
||||
ROM_LOAD( "6.6g", 0x8000, 0x4000, CRC(936ec941) SHA1(b4891e207d66f8b77c237fc23ffa48f87ab6993a) )
|
||||
ROM_LOAD( "7.7g", 0xc000, 0x4000, CRC(66dd718e) SHA1(80990c6199f63b215e1dead3b09cf6160dd75333) )
|
||||
|
||||
ROM_REGION( 0x2000, REGION_USER1, 0 ) /* unknown, mostly text */
|
||||
ROM_LOAD( "16.18g", 0x0000, 0x2000, CRC(1d8d592b) SHA1(be8d6df8b5926069ae2cbc1dc26e1fa92d63f297) )
|
||||
|
||||
ROM_REGION( 0x500, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "clr.10f", 0x000, 0x100, CRC(6440b341) SHA1(ccf89ac889f1653100f5b0a042dcd826c4ac628b) ) /* red */
|
||||
ROM_LOAD( "clr.11f", 0x100, 0x100, CRC(271e947f) SHA1(3d1f44fe92cc5fdff001ef80e07aa46a1ca68fe5) ) /* green */
|
||||
ROM_LOAD( "clr.12f", 0x200, 0x100, CRC(7d38621b) SHA1(7904c3c2c32006d4f4608b6ee84d44ecd601de73) ) /* blue */
|
||||
ROM_LOAD( "2g", 0x300, 0x100, CRC(44ca16b9) SHA1(1893f24d1c7f4d8e24b5484b19f9284f2ec9be08) ) /* clut */
|
||||
ROM_LOAD( "4e", 0x400, 0x100, CRC(035f2c7b) SHA1(36e32a50146631e763711b586936b2815600f52d) ) /* ctable */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_USER1, 0 )
|
||||
ROM_LOAD( "4e", 0x000, 0x100, CRC(035f2c7b) SHA1(36e32a50146631e763711b586936b2815600f52d) ) /* ctable */
|
||||
|
||||
ROM_REGION( 0x2000, REGION_USER2, 0 ) /* unknown, mostly text */
|
||||
ROM_LOAD( "16.18g", 0x0000, 0x2000, CRC(1d8d592b) SHA1(be8d6df8b5926069ae2cbc1dc26e1fa92d63f297) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( amatelas )
|
||||
@ -907,15 +912,17 @@ ROM_START( amatelas )
|
||||
ROM_LOAD( "6.6g", 0x8000, 0x4000, CRC(936ec941) SHA1(b4891e207d66f8b77c237fc23ffa48f87ab6993a) )
|
||||
ROM_LOAD( "7.7g", 0xc000, 0x4000, CRC(66dd718e) SHA1(80990c6199f63b215e1dead3b09cf6160dd75333) )
|
||||
|
||||
ROM_REGION( 0x2000, REGION_USER1, 0 ) /* unknown, mostly text */
|
||||
ROM_LOAD( "16.18g", 0x0000, 0x2000, CRC(1d8d592b) SHA1(be8d6df8b5926069ae2cbc1dc26e1fa92d63f297) )
|
||||
|
||||
ROM_REGION( 0x500, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "clr.10f", 0x000, 0x100, CRC(6440b341) SHA1(ccf89ac889f1653100f5b0a042dcd826c4ac628b) ) /* red */
|
||||
ROM_LOAD( "clr.11f", 0x100, 0x100, CRC(271e947f) SHA1(3d1f44fe92cc5fdff001ef80e07aa46a1ca68fe5) ) /* green */
|
||||
ROM_LOAD( "clr.12f", 0x200, 0x100, CRC(7d38621b) SHA1(7904c3c2c32006d4f4608b6ee84d44ecd601de73) ) /* blue */
|
||||
ROM_LOAD( "2g", 0x300, 0x100, CRC(44ca16b9) SHA1(1893f24d1c7f4d8e24b5484b19f9284f2ec9be08) ) /* clut */
|
||||
ROM_LOAD( "4e", 0x400, 0x100, CRC(035f2c7b) SHA1(36e32a50146631e763711b586936b2815600f52d) ) /* ctable */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_USER1, 0 )
|
||||
ROM_LOAD( "4e", 0x000, 0x100, CRC(035f2c7b) SHA1(36e32a50146631e763711b586936b2815600f52d) ) /* ctable */
|
||||
|
||||
ROM_REGION( 0x2000, REGION_USER2, 0 ) /* unknown, mostly text */
|
||||
ROM_LOAD( "16.18g", 0x0000, 0x2000, CRC(1d8d592b) SHA1(be8d6df8b5926069ae2cbc1dc26e1fa92d63f297) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( horekid )
|
||||
@ -945,15 +952,17 @@ ROM_START( horekid )
|
||||
ROM_LOAD( "horekid.14", 0x10000, 0x8000, CRC(e300747a) SHA1(5875a46c215b12f1e9a889819215bca40e4459a6) )
|
||||
ROM_LOAD( "horekid.15", 0x18000, 0x8000, CRC(51105741) SHA1(01c3bb2c03ce1ca959d62d64be3a019e74f677ba) )
|
||||
|
||||
ROM_REGION( 0x2000, REGION_USER1, 0 ) /* unknown, mostly text */
|
||||
ROM_LOAD( "horekid.17", 0x0000, 0x2000, CRC(1d8d592b) SHA1(be8d6df8b5926069ae2cbc1dc26e1fa92d63f297) )
|
||||
|
||||
ROM_REGION( 0x500, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "kid_prom.10f", 0x000, 0x100, CRC(ca13ce23) SHA1(46f0ed22f601721fa35bab12ce8816f30b102f59) ) /* red */
|
||||
ROM_LOAD( "kid_prom.11f", 0x100, 0x100, CRC(fb44285a) SHA1(f9605e82f63188daeff044fd48d81c1dfc4d4f2a) ) /* green */
|
||||
ROM_LOAD( "kid_prom.12f", 0x200, 0x100, CRC(40d41237) SHA1(b33082540d739a3bfe096f68f3359fbf1360b5be) ) /* blue */
|
||||
ROM_LOAD( "kid_prom.2g", 0x300, 0x100, CRC(4b9be0ed) SHA1(81aa7bb24fe6ea13f5dffdb67ea699adf0b3129a) ) /* clut */
|
||||
ROM_LOAD( "kid_prom.4e", 0x400, 0x100, CRC(e4fb54ee) SHA1(aba89d347b24dc6680e6f25b4a6c0d6657bb6a83) ) /* ctable */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_USER1, 0 )
|
||||
ROM_LOAD( "kid_prom.4e", 0x000, 0x100, CRC(e4fb54ee) SHA1(aba89d347b24dc6680e6f25b4a6c0d6657bb6a83) ) /* ctable */
|
||||
|
||||
ROM_REGION( 0x2000, REGION_USER2, 0 ) /* unknown, mostly text */
|
||||
ROM_LOAD( "horekid.17", 0x0000, 0x2000, CRC(1d8d592b) SHA1(be8d6df8b5926069ae2cbc1dc26e1fa92d63f297) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( horekidb )
|
||||
@ -983,15 +992,17 @@ ROM_START( horekidb )
|
||||
ROM_LOAD( "horekid.14", 0x10000, 0x8000, CRC(e300747a) SHA1(5875a46c215b12f1e9a889819215bca40e4459a6) )
|
||||
ROM_LOAD( "horekid.15", 0x18000, 0x8000, CRC(51105741) SHA1(01c3bb2c03ce1ca959d62d64be3a019e74f677ba) )
|
||||
|
||||
ROM_REGION( 0x2000, REGION_USER1, 0 ) /* unknown, mostly text */
|
||||
ROM_LOAD( "horekid.17", 0x0000, 0x2000, CRC(1d8d592b) SHA1(be8d6df8b5926069ae2cbc1dc26e1fa92d63f297) )
|
||||
|
||||
ROM_REGION( 0x500, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "kid_prom.10f", 0x000, 0x100, CRC(ca13ce23) SHA1(46f0ed22f601721fa35bab12ce8816f30b102f59) ) /* red */
|
||||
ROM_LOAD( "kid_prom.11f", 0x100, 0x100, CRC(fb44285a) SHA1(f9605e82f63188daeff044fd48d81c1dfc4d4f2a) ) /* green */
|
||||
ROM_LOAD( "kid_prom.12f", 0x200, 0x100, CRC(40d41237) SHA1(b33082540d739a3bfe096f68f3359fbf1360b5be) ) /* blue */
|
||||
ROM_LOAD( "kid_prom.2g", 0x300, 0x100, CRC(4b9be0ed) SHA1(81aa7bb24fe6ea13f5dffdb67ea699adf0b3129a) ) /* clut */
|
||||
ROM_LOAD( "kid_prom.4e", 0x400, 0x100, CRC(e4fb54ee) SHA1(aba89d347b24dc6680e6f25b4a6c0d6657bb6a83) ) /* ctable */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_USER1, 0 )
|
||||
ROM_LOAD( "kid_prom.4e", 0x000, 0x100, CRC(e4fb54ee) SHA1(aba89d347b24dc6680e6f25b4a6c0d6657bb6a83) ) /* ctable */
|
||||
|
||||
ROM_REGION( 0x2000, REGION_USER2, 0 ) /* unknown, mostly text */
|
||||
ROM_LOAD( "horekid.17", 0x0000, 0x2000, CRC(1d8d592b) SHA1(be8d6df8b5926069ae2cbc1dc26e1fa92d63f297) )
|
||||
ROM_END
|
||||
|
||||
static DRIVER_INIT( amazon )
|
||||
|
@ -298,7 +298,7 @@ static const gfx_layout spritelayout =
|
||||
32*8
|
||||
};
|
||||
|
||||
static const gfx_layout sht_spritelayout =
|
||||
static const gfx_layout shtrider_spritelayout =
|
||||
{
|
||||
16,16,
|
||||
RGN_FRAC(1,3),
|
||||
@ -316,9 +316,9 @@ static GFXDECODE_START( travrusa )
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 16*8, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( sht )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 )
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, sht_spritelayout, 16*8, 16 )
|
||||
static GFXDECODE_START( shtrider )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 )
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, shtrider_spritelayout, 16*8, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -342,8 +342,7 @@ static MACHINE_DRIVER_START( travrusa )
|
||||
MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 0*8, 32*8-1)
|
||||
MDRV_GFXDECODE(travrusa)
|
||||
|
||||
MDRV_PALETTE_LENGTH(128+16)
|
||||
MDRV_COLORTABLE_LENGTH(16*8+16*8)
|
||||
MDRV_PALETTE_LENGTH(16*8+16*8)
|
||||
|
||||
MDRV_PALETTE_INIT(travrusa)
|
||||
MDRV_VIDEO_START(travrusa)
|
||||
@ -358,8 +357,7 @@ static MACHINE_DRIVER_START( shtrider )
|
||||
MDRV_IMPORT_FROM(travrusa)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_GFXDECODE(sht)
|
||||
|
||||
MDRV_GFXDECODE(shtrider)
|
||||
MDRV_PALETTE_INIT(shtrider)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
@ -392,10 +390,10 @@ ROM_START( travrusa )
|
||||
ROM_LOAD( "zr1-9.l3", 0x02000, 0x2000, CRC(13be6a14) SHA1(47861910fe4c46cd72634cf7d834be2da2a0a4f9) )
|
||||
ROM_LOAD( "zr1-10.k3", 0x04000, 0x2000, CRC(6fcc9fdb) SHA1(88f878b9ebf07c5a16f8cb742016cac971ed3f10) )
|
||||
|
||||
ROM_REGION( 0x0220, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0320, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) /* character palette - last $100 are unused */
|
||||
ROM_LOAD( "tbp18s.2", 0x0100, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) /* sprite palette */
|
||||
ROM_LOAD( "tbp24s10.3", 0x0120, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) /* sprite lookup table */
|
||||
ROM_LOAD( "tbp18s.2", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) /* sprite palette */
|
||||
ROM_LOAD( "tbp24s10.3", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) /* sprite lookup table */
|
||||
ROM_END
|
||||
|
||||
ROM_START( motorace )
|
||||
@ -418,10 +416,10 @@ ROM_START( motorace )
|
||||
ROM_LOAD( "mr5.3m", 0x02000, 0x2000, CRC(f75f2aad) SHA1(e4a8a3da56cbc04f0c9041afac182d1bfceb1d0d) )
|
||||
ROM_LOAD( "mr6.3k", 0x04000, 0x2000, CRC(518889a0) SHA1(70b417104ce86132cb5542813c1e0509b2260756) )
|
||||
|
||||
ROM_REGION( 0x0220, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0320, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) /* character palette - last $100 are unused */
|
||||
ROM_LOAD( "tbp18s.2", 0x0100, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) /* sprite palette */
|
||||
ROM_LOAD( "tbp24s10.3", 0x0120, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) /* sprite lookup table */
|
||||
ROM_LOAD( "tbp18s.2", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) /* sprite palette */
|
||||
ROM_LOAD( "tbp24s10.3", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) /* sprite lookup table */
|
||||
ROM_END
|
||||
|
||||
/* it's probably a bootleg of the original Seibu version with the roms decrypted (no epoxy block) */
|
||||
|
@ -36,11 +36,11 @@ Daughterboard: Custom made, plugged in the 2 roms and Z80 mainboard sockets.
|
||||
#include "sound/dac.h"
|
||||
|
||||
/* from video */
|
||||
extern WRITE8_HANDLER( trucocl_videoram_w );
|
||||
extern WRITE8_HANDLER( trucocl_colorram_w );
|
||||
extern PALETTE_INIT( trucocl );
|
||||
extern VIDEO_START( trucocl );
|
||||
extern VIDEO_UPDATE( trucocl );
|
||||
WRITE8_HANDLER( trucocl_videoram_w );
|
||||
WRITE8_HANDLER( trucocl_colorram_w );
|
||||
PALETTE_INIT( trucocl );
|
||||
VIDEO_START( trucocl );
|
||||
VIDEO_UPDATE( trucocl );
|
||||
|
||||
|
||||
static WRITE8_HANDLER( irq_enable_w)
|
||||
@ -157,7 +157,6 @@ static MACHINE_DRIVER_START( trucocl )
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
|
||||
MDRV_GFXDECODE(trucocl)
|
||||
MDRV_PALETTE_LENGTH(32)
|
||||
MDRV_COLORTABLE_LENGTH(32)
|
||||
|
||||
MDRV_PALETTE_INIT(trucocl)
|
||||
MDRV_VIDEO_START(trucocl)
|
||||
|
@ -850,33 +850,6 @@ INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Graphics definitions
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static const gfx_layout charlayout =
|
||||
{
|
||||
8, 8, /* 8*8 characters */
|
||||
512, /* 512 characters */
|
||||
1, /* 1 bit per pixel */
|
||||
{ 0 },
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7 },
|
||||
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
|
||||
8*8 /* every char takes 8 consecutive bytes */
|
||||
};
|
||||
|
||||
static GFXDECODE_START( tubep )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 32 ) /* 32 color codes */
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( rjammer )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) /* 16 color codes */
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Sound definitions
|
||||
@ -951,9 +924,7 @@ static MACHINE_DRIVER_START( tubep )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(256, 264)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(tubep)
|
||||
MDRV_PALETTE_LENGTH(32 + 256*64)
|
||||
MDRV_COLORTABLE_LENGTH(32*2)
|
||||
|
||||
MDRV_PALETTE_INIT(tubep)
|
||||
MDRV_VIDEO_START(tubep)
|
||||
@ -1017,9 +988,7 @@ static MACHINE_DRIVER_START( rjammer )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(256, 264)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(rjammer)
|
||||
MDRV_PALETTE_LENGTH(64)
|
||||
MDRV_COLORTABLE_LENGTH(2*16 + 16*2)
|
||||
|
||||
MDRV_PALETTE_INIT(rjammer)
|
||||
MDRV_VIDEO_START(tubep)
|
||||
|
@ -115,21 +115,6 @@ PALETTE_INIT( galivan )
|
||||
|
||||
colortable_entry_set_value(machine->colortable, 0x180 + i_swapped, ctabentry);
|
||||
}
|
||||
|
||||
// for (i = 0;i < TOTAL_COLORS(2)/16;i++)
|
||||
// {
|
||||
// int j;
|
||||
|
||||
// for (j = 0;j < 16;j++)
|
||||
// {
|
||||
// if (i & 8)
|
||||
// COLOR(2,i + j * (TOTAL_COLORS(2)/16)) = 128 + ((j & 0x0c) << 2) + (*color_prom & 0x0f);
|
||||
// else
|
||||
// COLOR(2,i + j * (TOTAL_COLORS(2)/16)) = 128 + ((j & 0x03) << 4) + (*color_prom & 0x0f);
|
||||
// }
|
||||
|
||||
// color_prom++;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,20 +25,19 @@ PALETTE_INIT( tankbatt )
|
||||
#define RES_1 0xc0 /* this is a guess */
|
||||
#define RES_2 0x3f /* this is a guess */
|
||||
|
||||
/* Stick black in there */
|
||||
palette_set_color(machine,0,MAKE_RGB(0,0,0));
|
||||
/* allocate the colortable */
|
||||
machine->colortable = colortable_alloc(machine, 0x100);
|
||||
|
||||
/* ? Skip the first byte ? */
|
||||
color_prom++;
|
||||
|
||||
for (i = 1;i < machine->config->total_colors;i++)
|
||||
/* create a lookup table for the palette */
|
||||
for (i = 0; i < 0x100; i++)
|
||||
{
|
||||
int bit0, bit1, bit2, bit3, r, g, b;
|
||||
int bit0, bit1, bit2, bit3;
|
||||
int r, g, b;
|
||||
|
||||
bit0 = (*color_prom >> 0) & 0x01; /* intensity */
|
||||
bit1 = (*color_prom >> 1) & 0x01; /* red */
|
||||
bit2 = (*color_prom >> 2) & 0x01; /* green */
|
||||
bit3 = (*color_prom >> 3) & 0x01; /* blue */
|
||||
bit0 = (color_prom[i] >> 0) & 0x01; /* intensity */
|
||||
bit1 = (color_prom[i] >> 1) & 0x01; /* red */
|
||||
bit2 = (color_prom[i] >> 2) & 0x01; /* green */
|
||||
bit3 = (color_prom[i] >> 3) & 0x01; /* blue */
|
||||
|
||||
/* red component */
|
||||
r = RES_1 * bit1;
|
||||
@ -52,14 +51,13 @@ PALETTE_INIT( tankbatt )
|
||||
b = RES_1 * bit3;
|
||||
if (bit3) b += RES_2 * bit0;
|
||||
|
||||
palette_set_color(machine,i,MAKE_RGB(r,g,b));
|
||||
color_prom += 4;
|
||||
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
for (i = 0;i < 128;i++)
|
||||
for (i = 0; i < 0x200; i += 2)
|
||||
{
|
||||
colortable[i++] = 0;
|
||||
colortable[i] = (i/2) + 1;
|
||||
colortable_entry_set_value(machine->colortable, i + 0, 0);
|
||||
colortable_entry_set_value(machine->colortable, i + 1, i >> 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,15 +70,14 @@ WRITE8_HANDLER( tankbatt_videoram_w )
|
||||
static TILE_GET_INFO( get_bg_tile_info )
|
||||
{
|
||||
int code = videoram[tile_index];
|
||||
int color = videoram[tile_index] >> 2;
|
||||
int color = videoram[tile_index] | 0x01;
|
||||
|
||||
SET_TILE_INFO(0, code, color, 0);
|
||||
}
|
||||
|
||||
VIDEO_START( tankbatt )
|
||||
{
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
|
||||
8, 8, 32, 32);
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
}
|
||||
|
||||
static void draw_bullets(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
@ -89,7 +86,7 @@ static void draw_bullets(running_machine *machine, mame_bitmap *bitmap, const re
|
||||
|
||||
for (offs = 0;offs < tankbatt_bulletsram_size;offs += 2)
|
||||
{
|
||||
int color = 63; /* cyan, same color as the tanks */
|
||||
int color = 0xff; /* cyan, same color as the tanks */
|
||||
int x = tankbatt_bulletsram[offs + 1];
|
||||
int y = 255 - tankbatt_bulletsram[offs] - 2;
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
static UINT16 xscroll;
|
||||
static UINT16 yscroll;
|
||||
static tilemap *background, *foreground;
|
||||
static const UINT8 *spritepalettebank;
|
||||
|
||||
UINT16 *amazon_videoram;
|
||||
|
||||
@ -35,6 +34,7 @@ TILE_GET_INFO( get_fg_tile_info )
|
||||
|
||||
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect )
|
||||
{
|
||||
const UINT8 *spritepalettebank = memory_region(REGION_USER1);
|
||||
const gfx_element *pGfx = machine->gfx[2];
|
||||
const UINT16 *pSource = spriteram16;
|
||||
int i;
|
||||
@ -95,48 +95,41 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
|
||||
|
||||
PALETTE_INIT( amazon )
|
||||
{
|
||||
#define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
|
||||
#define COLOR(gfxn,offs) (colortable[machine->config->gfxdecodeinfo[gfxn].color_codes_start + offs])
|
||||
int i;
|
||||
for( i = 0; i<machine->config->total_colors; i++)
|
||||
|
||||
/* allocate the colortable */
|
||||
machine->colortable = colortable_alloc(machine, 0x100);
|
||||
|
||||
/* create a lookup table for the palette */
|
||||
for (i = 0; i < 0x100; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,bit3,r,g,b;
|
||||
int r = pal4bit(color_prom[i + 0x000]);
|
||||
int g = pal4bit(color_prom[i + 0x100]);
|
||||
int b = pal4bit(color_prom[i + 0x200]);
|
||||
|
||||
bit0 = (color_prom[0] >> 0) & 0x01;
|
||||
bit1 = (color_prom[0] >> 1) & 0x01;
|
||||
bit2 = (color_prom[0] >> 2) & 0x01;
|
||||
bit3 = (color_prom[0] >> 3) & 0x01;
|
||||
r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
|
||||
bit0 = (color_prom[machine->config->total_colors] >> 0) & 0x01;
|
||||
bit1 = (color_prom[machine->config->total_colors] >> 1) & 0x01;
|
||||
bit2 = (color_prom[machine->config->total_colors] >> 2) & 0x01;
|
||||
bit3 = (color_prom[machine->config->total_colors] >> 3) & 0x01;
|
||||
g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
|
||||
bit0 = (color_prom[2*machine->config->total_colors] >> 0) & 0x01;
|
||||
bit1 = (color_prom[2*machine->config->total_colors] >> 1) & 0x01;
|
||||
bit2 = (color_prom[2*machine->config->total_colors] >> 2) & 0x01;
|
||||
bit3 = (color_prom[2*machine->config->total_colors] >> 3) & 0x01;
|
||||
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
|
||||
|
||||
palette_set_color(machine,i,MAKE_RGB(r,g,b));
|
||||
color_prom++;
|
||||
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
color_prom += 2*machine->config->total_colors;
|
||||
/* color_prom now points to the beginning of the lookup table */
|
||||
color_prom += 0x300;
|
||||
|
||||
/* characters use colors 0-0x0f */
|
||||
for (i = 0; i < 0x10; i++)
|
||||
colortable_entry_set_value(machine->colortable, i, i);
|
||||
|
||||
/* characters use colors 0-15 */
|
||||
for (i = 0;i < TOTAL_COLORS(0);i++)
|
||||
COLOR(0,i) = i;
|
||||
|
||||
/* background tiles use colors 192-255 in four banks */
|
||||
/* background tiles use colors 0xc0-0xff in four banks */
|
||||
/* the bottom two bits of the color code select the palette bank for */
|
||||
/* pens 0-7; the top two bits for pens 8-15. */
|
||||
for (i = 0;i < TOTAL_COLORS(1);i++)
|
||||
/* pens 0-7; the top two bits for pens 8-0x0f. */
|
||||
for (i = 0; i < 0x100; i++)
|
||||
{
|
||||
if (i & 8) COLOR(1,i) = 192 + (i & 0x0f) + ((i & 0xc0) >> 2);
|
||||
else COLOR(1,i) = 192 + (i & 0x0f) + ((i & 0x30) >> 0);
|
||||
UINT8 ctabentry;
|
||||
|
||||
if (i & 0x08)
|
||||
ctabentry = 0xc0 | (i & 0x0f) | ((i & 0xc0) >> 2);
|
||||
else
|
||||
ctabentry = 0xc0 | (i & 0x0f) | ((i & 0x30) >> 0);
|
||||
|
||||
colortable_entry_set_value(machine->colortable, 0x10 + i, ctabentry);
|
||||
}
|
||||
|
||||
/* sprites use colors 128-191 in four banks */
|
||||
@ -144,23 +137,18 @@ PALETTE_INIT( amazon )
|
||||
/* the bank is selected by another PROM and depends on the top 8 bits of */
|
||||
/* the sprite code. The PROM selects the bank *separately* for pens 0-7 and */
|
||||
/* 8-15 (like for tiles). */
|
||||
for (i = 0;i < TOTAL_COLORS(2)/16;i++)
|
||||
for (i = 0; i < 0x1000; i++)
|
||||
{
|
||||
int j;
|
||||
UINT8 ctabentry;
|
||||
int i_swapped = ((i & 0x0f) << 8) | ((i & 0xff0) >> 4);
|
||||
|
||||
for (j = 0;j < 16;j++)
|
||||
{
|
||||
if (i & 8)
|
||||
COLOR(2,i + j * (TOTAL_COLORS(2)/16)) = 128 + ((j & 0x0c) << 2) + (*color_prom & 0x0f);
|
||||
else
|
||||
COLOR(2,i + j * (TOTAL_COLORS(2)/16)) = 128 + ((j & 0x03) << 4) + (*color_prom & 0x0f);
|
||||
}
|
||||
if (i & 0x80)
|
||||
ctabentry = 0x80 | ((i & 0x0c) << 2) | (color_prom[i >> 4] & 0x0f);
|
||||
else
|
||||
ctabentry = 0x80 | ((i & 0x03) << 4) | (color_prom[i >> 4] & 0x0f);
|
||||
|
||||
color_prom++;
|
||||
colortable_entry_set_value(machine->colortable, 0x110 + i_swapped, ctabentry);
|
||||
}
|
||||
|
||||
/* color_prom now points to the beginning of the sprite palette bank table */
|
||||
spritepalettebank = color_prom; /* we'll need it at run time */
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( amazon_background_w )
|
||||
@ -201,7 +189,7 @@ VIDEO_START( amazon )
|
||||
{
|
||||
background = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,64,32);
|
||||
foreground = tilemap_create(get_fg_tile_info,tilemap_scan_cols,8,8,64,32);
|
||||
tilemap_set_transparent_pen(foreground,0xf);
|
||||
tilemap_set_transparent_pen(foreground,0xf);
|
||||
|
||||
/* register for saving */
|
||||
state_save_register_global(xscroll);
|
||||
@ -211,13 +199,10 @@ VIDEO_START( amazon )
|
||||
VIDEO_UPDATE( amazon )
|
||||
{
|
||||
if( xscroll&0x2000 )
|
||||
{
|
||||
fillbitmap( bitmap,get_black_pen(machine),cliprect );
|
||||
}
|
||||
else
|
||||
{
|
||||
tilemap_draw( bitmap,cliprect, background, 0, 0 );
|
||||
}
|
||||
|
||||
draw_sprites( machine, bitmap,cliprect );
|
||||
tilemap_draw( bitmap,cliprect, foreground, 0, 0 );
|
||||
return 0;
|
||||
|
@ -45,137 +45,151 @@ static tilemap *bg_tilemap;
|
||||
PALETTE_INIT( travrusa )
|
||||
{
|
||||
int i;
|
||||
#define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
|
||||
#define COLOR(gfxn,offs) (colortable[machine->config->gfxdecodeinfo[gfxn].color_codes_start + offs])
|
||||
|
||||
/* allocate the colortable */
|
||||
machine->colortable = colortable_alloc(machine, 0x90);
|
||||
|
||||
/* character palette */
|
||||
for (i = 0;i < 128;i++)
|
||||
/* create a lookup table for the palette */
|
||||
for (i = 0; i < 0x80; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = 0;
|
||||
bit1 = (color_prom[i] >> 6) & 0x01;
|
||||
bit2 = (color_prom[i] >> 7) & 0x01;
|
||||
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* green component */
|
||||
bit0 = (color_prom[i] >> 3) & 0x01;
|
||||
bit1 = (color_prom[i] >> 4) & 0x01;
|
||||
bit2 = (color_prom[i] >> 5) & 0x01;
|
||||
g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* blue component */
|
||||
bit0 = (color_prom[i] >> 0) & 0x01;
|
||||
bit1 = (color_prom[i] >> 1) & 0x01;
|
||||
bit2 = (color_prom[i] >> 2) & 0x01;
|
||||
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette_set_color(machine,i,MAKE_RGB(r,g,b));
|
||||
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
color_prom += 256;
|
||||
|
||||
/* sprite palette */
|
||||
for (i = 0;i < 16;i++)
|
||||
for (i = 0x80; i < 0x90; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = 0;
|
||||
bit1 = (color_prom[i] >> 6) & 0x01;
|
||||
bit2 = (color_prom[i] >> 7) & 0x01;
|
||||
bit1 = (color_prom[(i - 0x80) + 0x200] >> 6) & 0x01;
|
||||
bit2 = (color_prom[(i - 0x80) + 0x200] >> 7) & 0x01;
|
||||
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* green component */
|
||||
bit0 = (color_prom[i] >> 3) & 0x01;
|
||||
bit1 = (color_prom[i] >> 4) & 0x01;
|
||||
bit2 = (color_prom[i] >> 5) & 0x01;
|
||||
bit0 = (color_prom[(i - 0x80) + 0x200] >> 3) & 0x01;
|
||||
bit1 = (color_prom[(i - 0x80) + 0x200] >> 4) & 0x01;
|
||||
bit2 = (color_prom[(i - 0x80) + 0x200] >> 5) & 0x01;
|
||||
g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* blue component */
|
||||
bit0 = (color_prom[i] >> 0) & 0x01;
|
||||
bit1 = (color_prom[i] >> 1) & 0x01;
|
||||
bit2 = (color_prom[i] >> 2) & 0x01;
|
||||
bit0 = (color_prom[(i - 0x80) + 0x200] >> 0) & 0x01;
|
||||
bit1 = (color_prom[(i - 0x80) + 0x200] >> 1) & 0x01;
|
||||
bit2 = (color_prom[(i - 0x80) + 0x200] >> 2) & 0x01;
|
||||
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette_set_color(machine,i+128,MAKE_RGB(r,g,b));
|
||||
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
color_prom += 32;
|
||||
|
||||
/* color_prom now points to the beginning of the lookup table */
|
||||
color_prom += 0x220;
|
||||
|
||||
/* sprite lookup table */
|
||||
for (i = 0;i < TOTAL_COLORS(1);i++)
|
||||
COLOR(1,i) = (color_prom[i] & 0x0f) + 128;
|
||||
/* characters */
|
||||
for (i = 0; i < 0x80; i++)
|
||||
colortable_entry_set_value(machine->colortable, i, i);
|
||||
|
||||
/* sprites */
|
||||
for (i = 0x80; i < 0x100; i++)
|
||||
{
|
||||
UINT8 ctabentry = (color_prom[i - 0x80] & 0x0f) | 0x80;
|
||||
colortable_entry_set_value(machine->colortable, i, ctabentry);
|
||||
}
|
||||
}
|
||||
|
||||
PALETTE_INIT( shtrider )
|
||||
{
|
||||
int i;
|
||||
#define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
|
||||
#define COLOR(gfxn,offs) (colortable[machine->config->gfxdecodeinfo[gfxn].color_codes_start + offs])
|
||||
|
||||
/* allocate the colortable */
|
||||
machine->colortable = colortable_alloc(machine, 0x90);
|
||||
|
||||
/* character palette */
|
||||
for (i = 0;i < 128;i++)
|
||||
/* create a lookup table for the palette */
|
||||
for (i = 0; i < 0x80; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = 0;
|
||||
bit1 = (color_prom[i] >> 2) & 0x01;
|
||||
bit2 = (color_prom[i] >> 3) & 0x01;
|
||||
bit1 = (color_prom[i + 0x000] >> 2) & 0x01;
|
||||
bit2 = (color_prom[i + 0x000] >> 3) & 0x01;
|
||||
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* green component */
|
||||
bit0 = (color_prom[i+256] >> 3) & 0x01;
|
||||
bit1 = (color_prom[i] >> 0) & 0x01;
|
||||
bit2 = (color_prom[i] >> 1) & 0x01;
|
||||
bit0 = (color_prom[i + 0x100] >> 3) & 0x01;
|
||||
bit1 = (color_prom[i + 0x000] >> 0) & 0x01;
|
||||
bit2 = (color_prom[i + 0x000] >> 1) & 0x01;
|
||||
g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* blue component */
|
||||
bit0 = (color_prom[i+256] >> 0) & 0x01;
|
||||
bit1 = (color_prom[i+256] >> 1) & 0x01;
|
||||
bit2 = (color_prom[i+256] >> 2) & 0x01;
|
||||
bit0 = (color_prom[i + 0x100] >> 0) & 0x01;
|
||||
bit1 = (color_prom[i + 0x100] >> 1) & 0x01;
|
||||
bit2 = (color_prom[i + 0x100] >> 2) & 0x01;
|
||||
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette_set_color(machine,i,MAKE_RGB(r,g,b));
|
||||
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
color_prom += 512;
|
||||
|
||||
/* color_prom now points to the beginning of the sprite palette */
|
||||
|
||||
/* sprite palette */
|
||||
for (i = 0;i < 16;i++)
|
||||
for (i = 0x80; i < 0x90; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = 0;
|
||||
bit1 = (color_prom[i] >> 6) & 0x01;
|
||||
bit2 = (color_prom[i] >> 7) & 0x01;
|
||||
bit1 = (color_prom[(i - 0x80) + 0x200] >> 6) & 0x01;
|
||||
bit2 = (color_prom[(i - 0x80) + 0x200] >> 7) & 0x01;
|
||||
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* green component */
|
||||
bit0 = (color_prom[i] >> 3) & 0x01;
|
||||
bit1 = (color_prom[i] >> 4) & 0x01;
|
||||
bit2 = (color_prom[i] >> 5) & 0x01;
|
||||
bit0 = (color_prom[(i - 0x80) + 0x200] >> 3) & 0x01;
|
||||
bit1 = (color_prom[(i - 0x80) + 0x200] >> 4) & 0x01;
|
||||
bit2 = (color_prom[(i - 0x80) + 0x200] >> 5) & 0x01;
|
||||
g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* blue component */
|
||||
bit0 = (color_prom[i] >> 0) & 0x01;
|
||||
bit1 = (color_prom[i] >> 1) & 0x01;
|
||||
bit2 = (color_prom[i] >> 2) & 0x01;
|
||||
bit0 = (color_prom[(i - 0x80) + 0x200] >> 0) & 0x01;
|
||||
bit1 = (color_prom[(i - 0x80) + 0x200] >> 1) & 0x01;
|
||||
bit2 = (color_prom[(i - 0x80) + 0x200] >> 2) & 0x01;
|
||||
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette_set_color(machine,i+128,MAKE_RGB(r,g,b));
|
||||
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
color_prom += 32;
|
||||
/* color_prom now points to the beginning of the sprite lookup table */
|
||||
/* color_prom now points to the beginning of the lookup table */
|
||||
color_prom += 0x220;
|
||||
|
||||
/* sprite lookup table */
|
||||
for (i = 0;i < TOTAL_COLORS(1);i++)
|
||||
COLOR(1,i) = (color_prom[i] & 0x0f) + 128;
|
||||
/* characters */
|
||||
for (i = 0; i < 0x80; i++)
|
||||
colortable_entry_set_value(machine->colortable, i, i);
|
||||
|
||||
/* sprites */
|
||||
for (i = 0x80; i < 0x100; i++)
|
||||
{
|
||||
UINT8 ctabentry = (color_prom[i - 0x80] & 0x0f) | 0x80;
|
||||
colortable_entry_set_value(machine->colortable, i, ctabentry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -170,9 +170,6 @@ PALETTE_INIT( tubep )
|
||||
{
|
||||
int i,r,g,b;
|
||||
|
||||
#define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
|
||||
#define COLOR(gfxn,offs) (colortable[machine->config->gfxdecodeinfo[gfxn].color_codes_start + offs])
|
||||
|
||||
/* background/sprites palette variables */
|
||||
|
||||
static const int resistors_0[6] = { 33000, 15000, 8200, 4700, 2200, 1000 };
|
||||
@ -227,13 +224,6 @@ PALETTE_INIT( tubep )
|
||||
color_prom++;
|
||||
}
|
||||
|
||||
/* text lookup */
|
||||
for (i = 0; i < TOTAL_COLORS(0)/2; i++)
|
||||
{
|
||||
COLOR(0, 2*i+0 ) = 0; /* transparent "black" */
|
||||
COLOR(0, 2*i+1 ) = i;
|
||||
}
|
||||
|
||||
/* sprites use the second PROM to control 8 x LS368. We copy content of this PROM over here */
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
@ -590,26 +580,40 @@ void tubep_vblank_end(void)
|
||||
|
||||
VIDEO_UPDATE( tubep )
|
||||
{
|
||||
int offs;
|
||||
int DISP_ = DISP^1;
|
||||
|
||||
/* draw background ram */
|
||||
const pen_t *pens = &machine->pens[ 32 ]; //change it later
|
||||
|
||||
UINT32 v;
|
||||
UINT8 *text_gfx_base = memory_region(REGION_GFX1);
|
||||
UINT8 *romBxx = memory_region(REGION_USER1) + 0x2000*background_romsel;
|
||||
|
||||
/* logerror(" update: from DISP=%i y_min=%3i y_max=%3i\n", DISP_, cliprect->min_y, cliprect->max_y+1); */
|
||||
|
||||
for (v = cliprect->min_y; v <= cliprect->max_y; v++) /* only for current scanline */
|
||||
{
|
||||
const pen_t *pens = &machine->pens[ 32 ]; //change it later
|
||||
|
||||
UINT32 h,v;
|
||||
UINT8 * romBxx = memory_region(REGION_USER1) + 0x2000*background_romsel;
|
||||
|
||||
/* logerror(" update: from DISP=%i y_min=%3i y_max=%3i\n", DISP_, cliprect->min_y, cliprect->max_y+1); */
|
||||
|
||||
for (v = cliprect->min_y; v <= cliprect->max_y; v++) /* only for current scanline */
|
||||
UINT32 h;
|
||||
UINT32 sp_data0=0,sp_data1=0,sp_data2=0;
|
||||
for (h = 0*8; h < 32*8; h++)
|
||||
{
|
||||
UINT32 sp_data0=0,sp_data1=0,sp_data2=0;
|
||||
for (h = 0*8; h < 32*8; h++)
|
||||
offs_t text_offs;
|
||||
UINT8 text_code;
|
||||
UINT8 text_gfx_data;
|
||||
|
||||
sp_data2 = sp_data1;
|
||||
sp_data1 = sp_data0;
|
||||
sp_data0 = spritemap[ h + v*256 +(DISP_*256*256) ];
|
||||
|
||||
text_offs = ((v >> 3) << 6) | ((h >> 3) << 1);
|
||||
text_code = tubep_textram[text_offs];
|
||||
text_gfx_data = text_gfx_base[(text_code << 3) | (v & 0x07)];
|
||||
|
||||
if (text_gfx_data & (0x80 >> (h & 0x07)))
|
||||
*BITMAP_ADDR16(bitmap, v, h) = machine->pens[(tubep_textram[text_offs + 1] & 0x0f) | color_A4];
|
||||
else
|
||||
{
|
||||
UINT32 bg_data;
|
||||
UINT32 sp_data;
|
||||
UINT32 sel0,sel1,sel2;
|
||||
|
||||
UINT32 romB_addr = (((h>>1)&0x3f)^((h&0x80)?0x00:0x3f)) | (((v&0x7f)^((v&0x80)?0x00:0x7f))<<6);
|
||||
|
||||
@ -638,27 +642,12 @@ VIDEO_UPDATE( tubep )
|
||||
|
||||
romB_data_h>>=2;
|
||||
|
||||
sp_data2 = sp_data1;
|
||||
sp_data1 = sp_data0;
|
||||
sp_data0 = spritemap[ h + v*256 +(DISP_*256*256) ];
|
||||
sel0 = 0;
|
||||
if (sp_data0 != 0x0f)
|
||||
sel0 = 1;
|
||||
|
||||
sel1 = 1;
|
||||
if (sp_data1 != 0x0f)
|
||||
sel1 = 0;
|
||||
|
||||
sel2 = 0;
|
||||
if (sp_data2 != 0x0f)
|
||||
sel2 = 1;
|
||||
|
||||
if (sel0&sel1&sel2)
|
||||
if ((sp_data0 != 0x0f) && (sp_data1 == 0x0f) && (sp_data2 != 0x0f))
|
||||
sp_data = sp_data2;
|
||||
else
|
||||
sp_data = sp_data1;
|
||||
|
||||
if (sp_data!=0x0f)
|
||||
if (sp_data != 0x0f)
|
||||
bg_data = prom2[sp_data | color_A4];
|
||||
|
||||
*BITMAP_ADDR16(bitmap, v, h) = pens[ bg_data*64 + romB_data_h ];
|
||||
@ -666,28 +655,6 @@ VIDEO_UPDATE( tubep )
|
||||
}
|
||||
}
|
||||
|
||||
/* draw the character mapped graphics */
|
||||
for (offs = 0;offs < 0x800; offs+=2)
|
||||
{
|
||||
int sx,sy;
|
||||
|
||||
sx = (offs/2) % 32;
|
||||
//if (flipscreen[0]) sx = 31 - sx;
|
||||
sy = (offs/2) / 32;
|
||||
//if (flipscreen[1]) sy = 31 - sy;
|
||||
|
||||
if ((cliprect->min_y&(~0x07)) == 8*sy)
|
||||
{
|
||||
drawgfx(bitmap,machine->gfx[0],
|
||||
tubep_textram[offs],
|
||||
((tubep_textram[offs+1]) & 0x0f) | color_A4,
|
||||
0,0, /*flipscreen[0],flipscreen[1],*/
|
||||
8*sx,8*sy,
|
||||
cliprect, TRANSPARENCY_PEN, machine->pens[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -717,8 +684,6 @@ VIDEO_UPDATE( tubep )
|
||||
PALETTE_INIT( rjammer )
|
||||
{
|
||||
int i;
|
||||
#define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
|
||||
#define COLOR(gfxn,offs) (colortable[machine->config->gfxdecodeinfo[gfxn].color_codes_start + offs])
|
||||
|
||||
static const int resistors_rg[3] = { 1000, 470, 220 };
|
||||
static const int resistors_b [2] = { 470, 220 };
|
||||
@ -753,14 +718,6 @@ PALETTE_INIT( rjammer )
|
||||
|
||||
color_prom++;
|
||||
}
|
||||
|
||||
|
||||
/* text: colors 0, 17-31 from PROM @16B */
|
||||
for (i = 0; i < TOTAL_COLORS(0)/2; i++)
|
||||
{
|
||||
COLOR(0, 2*i + 0) = 0; /* transparent "black" */
|
||||
COLOR(0, 2*i + 1) = i+16; /* /SOFF is on the A4 line */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -778,66 +735,62 @@ WRITE8_HANDLER( rjammer_background_page_w )
|
||||
|
||||
VIDEO_UPDATE( rjammer )
|
||||
{
|
||||
int offs;
|
||||
int DISP_ = DISP^1;
|
||||
|
||||
/* draw background ram */
|
||||
{
|
||||
const pen_t *pens = &machine->pens[ 0x00 ];
|
||||
|
||||
UINT32 h,v;
|
||||
UINT8 * rom13D = memory_region(REGION_USER1);
|
||||
UINT8 * rom11BD = memory_region(REGION_USER1)+0x1000;
|
||||
UINT8 * rom19C = memory_region(REGION_USER1)+0x5000;
|
||||
const pen_t *pens = &machine->pens[ 0x00 ];
|
||||
|
||||
UINT32 v;
|
||||
UINT8 *text_gfx_base = memory_region(REGION_GFX1);
|
||||
UINT8 *rom13D = memory_region(REGION_USER1);
|
||||
UINT8 *rom11BD = memory_region(REGION_USER1)+0x1000;
|
||||
UINT8 *rom19C = memory_region(REGION_USER1)+0x5000;
|
||||
|
||||
/* this can be optimized further by extracting constants out of the loop */
|
||||
/* especially read from ROM19C can be done once per 8 pixels*/
|
||||
/* and the data could be bitswapped beforehand */
|
||||
|
||||
for (v = cliprect->min_y; v <= cliprect->max_y; v++) /* only for current scanline */
|
||||
for (v = cliprect->min_y; v <= cliprect->max_y; v++) /* only for current scanline */
|
||||
{
|
||||
UINT32 h;
|
||||
UINT32 sp_data0=0,sp_data1=0,sp_data2=0;
|
||||
UINT8 pal14h4_pin19;
|
||||
UINT8 pal14h4_pin18;
|
||||
UINT8 pal14h4_pin13;
|
||||
|
||||
UINT32 addr = (v*2) | page;
|
||||
UINT32 ram_data = rjammer_backgroundram[ addr ] + 256*(rjammer_backgroundram[ addr+1 ]&0x2f);
|
||||
|
||||
addr = (v>>3) | ((ls377_data&0x1f)<<5);
|
||||
pal14h4_pin13 = (rom19C[addr] >> ((v&7)^7) ) &1;
|
||||
pal14h4_pin19 = (ram_data>>13) & 1;
|
||||
|
||||
for (h = 0*8; h < 32*8; h++)
|
||||
{
|
||||
UINT32 sp_data0=0,sp_data1=0,sp_data2=0;
|
||||
UINT8 pal14h4_pin19;
|
||||
UINT8 pal14h4_pin18;
|
||||
UINT8 pal14h4_pin13;
|
||||
offs_t text_offs;
|
||||
UINT8 text_code;
|
||||
UINT8 text_gfx_data;
|
||||
|
||||
UINT32 addr = (v*2) | page;
|
||||
UINT32 ram_data = rjammer_backgroundram[ addr ] + 256*(rjammer_backgroundram[ addr+1 ]&0x2f);
|
||||
sp_data2 = sp_data1;
|
||||
sp_data1 = sp_data0;
|
||||
sp_data0 = spritemap[ h + v*256 +(DISP_*256*256) ];
|
||||
|
||||
addr = (v>>3) | ((ls377_data&0x1f)<<5);
|
||||
pal14h4_pin13 = (rom19C[addr] >> ((v&7)^7) ) &1;
|
||||
pal14h4_pin19 = (ram_data>>13) & 1;
|
||||
text_offs = ((v >> 3) << 6) | ((h >> 3) << 1);
|
||||
text_code = tubep_textram[text_offs];
|
||||
text_gfx_data = text_gfx_base[(text_code << 3) | (v & 0x07)];
|
||||
|
||||
for (h = 0*8; h < 32*8; h++)
|
||||
if (text_gfx_data & (0x80 >> (h & 0x07)))
|
||||
*BITMAP_ADDR16(bitmap, v, h) = machine->pens[0x10 | (tubep_textram[text_offs + 1] & 0x0f)];
|
||||
else
|
||||
{
|
||||
UINT32 sp_data;
|
||||
UINT32 sel0,sel1,sel2;
|
||||
|
||||
sp_data2 = sp_data1;
|
||||
sp_data1 = sp_data0;
|
||||
sp_data0 = spritemap[ h + v*256 +(DISP_*256*256) ];
|
||||
sel0 = 0;
|
||||
if (sp_data0 != 0x0f)
|
||||
sel0 = 1;
|
||||
|
||||
sel1 = 1;
|
||||
if (sp_data1 != 0x0f)
|
||||
sel1 = 0;
|
||||
|
||||
sel2 = 0;
|
||||
if (sp_data2 != 0x0f)
|
||||
sel2 = 1;
|
||||
|
||||
if (sel0&sel1&sel2)
|
||||
if ((sp_data0 != 0x0f) && (sp_data1 == 0x0f) && (sp_data2 != 0x0f))
|
||||
sp_data = sp_data2;
|
||||
else
|
||||
sp_data = sp_data1;
|
||||
|
||||
if (sp_data!=0x0f)
|
||||
{
|
||||
if (sp_data != 0x0f)
|
||||
*BITMAP_ADDR16(bitmap, v, h) = pens[0x00+ sp_data ];
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT32 bg_data;
|
||||
@ -864,34 +817,29 @@ VIDEO_UPDATE( rjammer )
|
||||
addr = (h>>3) | (ls377_data<<5);
|
||||
pal14h4_pin18 = (rom19C[addr] >> ((h&7)^7) ) &1;
|
||||
|
||||
/*
|
||||
PAL14H4 @15A functions:
|
||||
/*
|
||||
PAL14H4 @15A funct
|
||||
|
||||
PIN6 = disable color on offscreen area
|
||||
PIN6 = disable color on offscreen area
|
||||
PIN19,PIN18,PIN13 = arguments for PIN17 function
|
||||
PIN17 = background color bank (goes to A4 line on PROM @16A)
|
||||
formula for PIN17 is:
|
||||
|
||||
PIN19,PIN18,PIN13 = arguments for PIN17 function
|
||||
PIN17 = ( PIN13 & PIN8 & PIN9 & !PIN11 & PIN12 )
|
||||
| ( PIN18 & PIN8 & PIN9 & PIN11 & !PIN12 )
|
||||
| ( PIN19 )
|
||||
where:
|
||||
PIN 8 = bit 3 of bg_data
|
||||
PIN 9 = bit 2 of bg_data
|
||||
PIN 11= bit 1 of bg_data
|
||||
PIN 12= bit 0 of bg_data
|
||||
|
||||
PIN17 = background color bank (goes to A4 line on PROM @16A)
|
||||
formula for PIN17 is:
|
||||
not used by now, but for the record:
|
||||
|
||||
PIN17 = ( PIN13 & PIN8 & PIN9 & !PIN11 & PIN12 )
|
||||
| ( PIN18 & PIN8 & PIN9 & PIN11 & !PIN12 )
|
||||
| ( PIN19 )
|
||||
|
||||
where:
|
||||
PIN 8 = bit 3 of bg_data
|
||||
PIN 9 = bit 2 of bg_data
|
||||
PIN 11= bit 1 of bg_data
|
||||
PIN 12= bit 0 of bg_data
|
||||
|
||||
|
||||
not used by now, but for the record:
|
||||
|
||||
PIN15 = select prom @16B (active low)
|
||||
PIN16 = select prom @16A (active low)
|
||||
PINs: 1,2,3,4,5 and 7,14 are used for priority system
|
||||
|
||||
*/
|
||||
PIN15 = select prom @16B (active low)
|
||||
PIN16 = select prom @16A (active low)
|
||||
PINs: 1,2,3,4,5 and 7,14 are used for priority system
|
||||
*/
|
||||
color_bank = (pal14h4_pin13 & ((bg_data&0x08)>>3) & ((bg_data&0x04)>>2) & (((bg_data&0x02)>>1)^1) & (bg_data&0x01) )
|
||||
| (pal14h4_pin18 & ((bg_data&0x08)>>3) & ((bg_data&0x04)>>2) & ((bg_data&0x02)>>1) & ((bg_data&0x01)^1) )
|
||||
| (pal14h4_pin19);
|
||||
@ -901,27 +849,6 @@ VIDEO_UPDATE( rjammer )
|
||||
}
|
||||
}
|
||||
|
||||
/* draw the character mapped graphics */
|
||||
for (offs = 0;offs < 0x800; offs+=2)
|
||||
{
|
||||
int sx,sy;
|
||||
|
||||
sx = (offs/2) % 32;
|
||||
//if (flipscreen[0]) sx = 31 - sx;
|
||||
sy = (offs/2) / 32;
|
||||
//if (flipscreen[1]) sy = 31 - sy;
|
||||
|
||||
if ((cliprect->min_y&(~0x07)) == 8*sy)
|
||||
{
|
||||
drawgfx(bitmap,machine->gfx[0],
|
||||
tubep_textram[offs],
|
||||
(tubep_textram[offs+1]) & 0x0f,
|
||||
0,0, /*flipscreen[0],flipscreen[1],*/
|
||||
8*sx,8*sy,
|
||||
cliprect, TRANSPARENCY_PEN, machine->pens[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user