diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp index 8ab7c33347c..02d0c4d5062 100644 --- a/src/mame/drivers/galastrm.cpp +++ b/src/mame/drivers/galastrm.cpp @@ -166,7 +166,6 @@ static const gfx_layout tile16x16_layout = static GFXDECODE_START( gfx_galastrm ) GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 0, 4096/16 ) - GFXDECODE_ENTRY( "tc0480scp", 0x0, gfx_16x16x4_packed_lsb, 0, 4096/16 ) GFXDECODE_END @@ -217,10 +216,8 @@ void galastrm_state::galastrm(machine_config &config) m_tc0100scn->set_palette(m_tc0110pcr); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_tc0110pcr); m_tc0480scp->set_offsets(-40, -3); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0110PCR(config, m_tc0110pcr, 0); diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp index f369eb6d706..5cca976c7bf 100644 --- a/src/mame/drivers/groundfx.cpp +++ b/src/mame/drivers/groundfx.cpp @@ -194,10 +194,21 @@ static const gfx_layout tile16x16_layout = 16*16 /* every sprite takes 128 consecutive bytes */ }; +static const gfx_layout layout_scc_6bpp_hi = +{ + 8,8, + RGN_FRAC(1,1), + 2, + { STEP2(0,1) }, + { STEP8(0,2) }, + { STEP8(0,8*2) }, + 8*8*2 +}; + static GFXDECODE_START( gfx_groundfx ) - GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 4096, 512 ) - GFXDECODE_ENTRY( "tc0480scp", 0x0, gfx_16x16x4_packed_lsb, 0, 512 ) - GFXDECODE_ENTRY( "tc0100scn", 0x0, gfx_8x8x4_packed_msb, 0, 512 ) + GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 4096, 512 ) + GFXDECODE_ENTRY( "tc0100scn", 0x0, gfx_8x8x4_packed_msb, 0, 512 ) // low 4bpp of 6bpp scc tiles + GFXDECODE_ENTRY( "tc0100scn:hi_gfx", 0x0, layout_scc_6bpp_hi, 0, 512 ) // hi 2bpp of 6bpp scc tiles GFXDECODE_END @@ -250,17 +261,15 @@ void groundfx_state::groundfx(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 16384); TC0100SCN(config, m_tc0100scn, 0); - m_tc0100scn->set_gfx_region(2); + m_tc0100scn->set_gfx_region(1); m_tc0100scn->set_offsets(50, 8); m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); m_tc0100scn->set_palette(m_palette); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x24, 0); m_tc0480scp->set_offsets_tx(-1, 0); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ TAITO_EN(config, "taito_en", 0); @@ -337,8 +346,8 @@ void groundfx_state::init_groundfx() m_maincpu->space(AS_PROGRAM).install_read_handler(0x20b574, 0x20b577, read32_delegate(FUNC(groundfx_state::irq_speedup_r),this)); /* make SCC tile GFX format suitable for gfxdecode */ - u8 *gfx_hi = memregion("tc0100scn:hi_gfx")->base(); - gfx_element *gx0 = m_gfxdecode->gfx(2); + gfx_element *gx0 = m_gfxdecode->gfx(1); + gfx_element *gx1 = m_gfxdecode->gfx(2); // allocate memory for the assembled data u8 *srcdata = auto_alloc_array(machine(), u8, gx0->elements() * gx0->width() * gx0->height()); @@ -348,28 +357,27 @@ void groundfx_state::init_groundfx() for (int c = 0; c < gx0->elements(); c++) { const u8 *c0base = gx0->get_data(c); + const u8 *c1base = gx1->get_data(c); // loop over height for (int y = 0; y < gx0->height(); y++) { const u8 *c0 = c0base; + const u8 *c1 = c1base; - for (int x = 0; x < gx0->width();) + for (int x = 0; x < gx0->width(); x++) { - u8 hipix = *gfx_hi++; - for (int i = 0; i < 4; i++) - { - *dest++ = (*c0++ & 0xf) | ((hipix >> 2) & 0x30); - x++; - hipix <<= 2; - } + u8 hipix = *c1++; + *dest++ = (*c0++ & 0xf) | ((hipix << 4) & 0x30); } c0base += gx0->rowbytes(); + c1base += gx1->rowbytes(); } } gx0->set_raw_layout(srcdata, gx0->width(), gx0->height(), gx0->elements(), 8 * gx0->width(), 8 * gx0->width() * gx0->height()); gx0->set_granularity(64); + m_gfxdecode->set_gfx(2, nullptr); m_tc0100scn->update_granularity(); } diff --git a/src/mame/drivers/gunbustr.cpp b/src/mame/drivers/gunbustr.cpp index d95f4c94356..6c52edd33f3 100644 --- a/src/mame/drivers/gunbustr.cpp +++ b/src/mame/drivers/gunbustr.cpp @@ -202,26 +202,14 @@ static const gfx_layout tile16x16_layout = 16,16, /* 16*16 sprites */ RGN_FRAC(1,1), 4, /* 4 bits per pixel */ - { STEP4(0,8) }, - { STEP8(8*4,1), STEP8(0,1) }, - { STEP16(0,8*4*2) }, + { STEP4(0,16) }, + { STEP16(0,1) }, + { STEP16(0,16*4) }, 16*16*4 /* every sprite takes 128 consecutive bytes */ }; -static const gfx_layout charlayout = -{ - 16,16, /* 16*16 characters */ - RGN_FRAC(1,1), - 4, /* 4 bits per pixel */ - { STEP4(0,1) }, - { STEP8(7*4,-4), STEP8(15*4,-4) }, - { STEP16(0,16*4) }, - 16*16*4 /* every sprite takes 128 consecutive bytes */ -}; - static GFXDECODE_START( gfx_gunbustr ) - GFXDECODE_ENTRY( "gfx2", 0x0, tile16x16_layout, 0, 256 ) - GFXDECODE_ENTRY( "gfx1", 0x0, charlayout, 0, 256 ) + GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 0, 256 ) GFXDECODE_END @@ -261,12 +249,10 @@ void gunbustr_state::gunbustr(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 4096); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x20, 0x07); m_tc0480scp->set_offsets_tx(-1, -1); m_tc0480scp->set_offsets_flip(-1, 0); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ TAITO_EN(config, "taito_en", 0); @@ -285,15 +271,15 @@ ROM_START( gunbustr ) ROM_LOAD16_BYTE( "d27-25.bin", 0x100000, 0x20000, CRC(c88203cf) SHA1(a918d395b471acdce56dacabd7a1e1e023948365) ) ROM_LOAD16_BYTE( "d27-24.bin", 0x100001, 0x20000, CRC(084bd8bd) SHA1(93229bc7de4550ead1bb12f666ddbacbe357488d) ) - ROM_REGION( 0x100000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d27-01.bin", 0x00002, 0x80000, CRC(f41759ce) SHA1(30789f43dd09b56399e1dfdb8c6a1e01a21562bd) ) /* SCR 16x16 tiles */ - ROM_LOAD32_WORD_SWAP( "d27-02.bin", 0x00000, 0x80000, CRC(92ab6430) SHA1(28ed80391c732b09d10c74ed6b78ac76cb62e083) ) + ROM_REGION( 0x100000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d27-01.bin", 0x00000, 0x80000, CRC(f41759ce) SHA1(30789f43dd09b56399e1dfdb8c6a1e01a21562bd) ) /* SCR 16x16 tiles */ + ROM_LOAD32_WORD( "d27-02.bin", 0x00002, 0x80000, CRC(92ab6430) SHA1(28ed80391c732b09d10c74ed6b78ac76cb62e083) ) - ROM_REGION( 0x400000, "gfx2", 0 ) - ROM_LOAD32_BYTE( "d27-04.bin", 0x000003, 0x100000, CRC(ff8b9234) SHA1(6095b7daf9b7e9a22b0d44d9d6a642ddecb2bd29) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ - ROM_LOAD32_BYTE( "d27-05.bin", 0x000002, 0x100000, CRC(96d7c1a5) SHA1(93b6a7aea397280a5a778e736d433a85cb7da52c) ) - ROM_LOAD32_BYTE( "d27-06.bin", 0x000001, 0x100000, CRC(bbb934db) SHA1(9e9b5cf05b9275f1182f5b499b8ee897c4f25b96) ) - ROM_LOAD32_BYTE( "d27-07.bin", 0x000000, 0x100000, CRC(8ab4854e) SHA1(bd2750cdaa2918e56f8aef3732875952a1eeafea) ) + ROM_REGION( 0x400000, "sprites", 0 ) + ROM_LOAD64_WORD_SWAP( "d27-04.bin", 0x000006, 0x100000, CRC(ff8b9234) SHA1(6095b7daf9b7e9a22b0d44d9d6a642ddecb2bd29) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ + ROM_LOAD64_WORD_SWAP( "d27-05.bin", 0x000004, 0x100000, CRC(96d7c1a5) SHA1(93b6a7aea397280a5a778e736d433a85cb7da52c) ) + ROM_LOAD64_WORD_SWAP( "d27-06.bin", 0x000002, 0x100000, CRC(bbb934db) SHA1(9e9b5cf05b9275f1182f5b499b8ee897c4f25b96) ) + ROM_LOAD64_WORD_SWAP( "d27-07.bin", 0x000000, 0x100000, CRC(8ab4854e) SHA1(bd2750cdaa2918e56f8aef3732875952a1eeafea) ) ROM_REGION16_LE( 0x80000, "spritemap", 0 ) ROM_LOAD16_WORD( "d27-03.bin", 0x00000, 0x80000, CRC(23bf2000) SHA1(49b29e771a47fcd7e6cd4e2704b217f9727f8299) ) /* STY, used to create big sprites on the fly */ @@ -319,15 +305,15 @@ ROM_START( gunbustru ) ROM_LOAD16_BYTE( "d27-25.bin", 0x100000, 0x20000, CRC(c88203cf) SHA1(a918d395b471acdce56dacabd7a1e1e023948365) ) ROM_LOAD16_BYTE( "d27-24.bin", 0x100001, 0x20000, CRC(084bd8bd) SHA1(93229bc7de4550ead1bb12f666ddbacbe357488d) ) - ROM_REGION( 0x100000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d27-01.bin", 0x00002, 0x80000, CRC(f41759ce) SHA1(30789f43dd09b56399e1dfdb8c6a1e01a21562bd) ) /* SCR 16x16 tiles */ - ROM_LOAD32_WORD_SWAP( "d27-02.bin", 0x00000, 0x80000, CRC(92ab6430) SHA1(28ed80391c732b09d10c74ed6b78ac76cb62e083) ) + ROM_REGION( 0x100000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d27-01.bin", 0x00000, 0x80000, CRC(f41759ce) SHA1(30789f43dd09b56399e1dfdb8c6a1e01a21562bd) ) /* SCR 16x16 tiles */ + ROM_LOAD32_WORD( "d27-02.bin", 0x00002, 0x80000, CRC(92ab6430) SHA1(28ed80391c732b09d10c74ed6b78ac76cb62e083) ) - ROM_REGION( 0x400000, "gfx2", 0 ) - ROM_LOAD32_BYTE( "d27-04.bin", 0x000003, 0x100000, CRC(ff8b9234) SHA1(6095b7daf9b7e9a22b0d44d9d6a642ddecb2bd29) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ - ROM_LOAD32_BYTE( "d27-05.bin", 0x000002, 0x100000, CRC(96d7c1a5) SHA1(93b6a7aea397280a5a778e736d433a85cb7da52c) ) - ROM_LOAD32_BYTE( "d27-06.bin", 0x000001, 0x100000, CRC(bbb934db) SHA1(9e9b5cf05b9275f1182f5b499b8ee897c4f25b96) ) - ROM_LOAD32_BYTE( "d27-07.bin", 0x000000, 0x100000, CRC(8ab4854e) SHA1(bd2750cdaa2918e56f8aef3732875952a1eeafea) ) + ROM_REGION( 0x400000, "sprites", 0 ) + ROM_LOAD64_WORD_SWAP( "d27-04.bin", 0x000006, 0x100000, CRC(ff8b9234) SHA1(6095b7daf9b7e9a22b0d44d9d6a642ddecb2bd29) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ + ROM_LOAD64_WORD_SWAP( "d27-05.bin", 0x000004, 0x100000, CRC(96d7c1a5) SHA1(93b6a7aea397280a5a778e736d433a85cb7da52c) ) + ROM_LOAD64_WORD_SWAP( "d27-06.bin", 0x000002, 0x100000, CRC(bbb934db) SHA1(9e9b5cf05b9275f1182f5b499b8ee897c4f25b96) ) + ROM_LOAD64_WORD_SWAP( "d27-07.bin", 0x000000, 0x100000, CRC(8ab4854e) SHA1(bd2750cdaa2918e56f8aef3732875952a1eeafea) ) ROM_REGION16_LE( 0x80000, "spritemap", 0 ) ROM_LOAD16_WORD( "d27-03.bin", 0x00000, 0x80000, CRC(23bf2000) SHA1(49b29e771a47fcd7e6cd4e2704b217f9727f8299) ) /* STY, used to create big sprites on the fly */ @@ -353,15 +339,15 @@ ROM_START( gunbustrj ) ROM_LOAD16_BYTE( "d27-25.bin", 0x100000, 0x20000, CRC(c88203cf) SHA1(a918d395b471acdce56dacabd7a1e1e023948365) ) ROM_LOAD16_BYTE( "d27-24.bin", 0x100001, 0x20000, CRC(084bd8bd) SHA1(93229bc7de4550ead1bb12f666ddbacbe357488d) ) - ROM_REGION( 0x100000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d27-01.bin", 0x00002, 0x80000, CRC(f41759ce) SHA1(30789f43dd09b56399e1dfdb8c6a1e01a21562bd) ) /* SCR 16x16 tiles */ - ROM_LOAD32_WORD_SWAP( "d27-02.bin", 0x00000, 0x80000, CRC(92ab6430) SHA1(28ed80391c732b09d10c74ed6b78ac76cb62e083) ) + ROM_REGION( 0x100000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d27-01.bin", 0x00000, 0x80000, CRC(f41759ce) SHA1(30789f43dd09b56399e1dfdb8c6a1e01a21562bd) ) /* SCR 16x16 tiles */ + ROM_LOAD32_WORD( "d27-02.bin", 0x00002, 0x80000, CRC(92ab6430) SHA1(28ed80391c732b09d10c74ed6b78ac76cb62e083) ) - ROM_REGION( 0x400000, "gfx2", 0 ) - ROM_LOAD32_BYTE( "d27-04.bin", 0x000003, 0x100000, CRC(ff8b9234) SHA1(6095b7daf9b7e9a22b0d44d9d6a642ddecb2bd29) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ - ROM_LOAD32_BYTE( "d27-05.bin", 0x000002, 0x100000, CRC(96d7c1a5) SHA1(93b6a7aea397280a5a778e736d433a85cb7da52c) ) - ROM_LOAD32_BYTE( "d27-06.bin", 0x000001, 0x100000, CRC(bbb934db) SHA1(9e9b5cf05b9275f1182f5b499b8ee897c4f25b96) ) - ROM_LOAD32_BYTE( "d27-07.bin", 0x000000, 0x100000, CRC(8ab4854e) SHA1(bd2750cdaa2918e56f8aef3732875952a1eeafea) ) + ROM_REGION( 0x400000, "sprites", 0 ) + ROM_LOAD64_WORD_SWAP( "d27-04.bin", 0x000006, 0x100000, CRC(ff8b9234) SHA1(6095b7daf9b7e9a22b0d44d9d6a642ddecb2bd29) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ + ROM_LOAD64_WORD_SWAP( "d27-05.bin", 0x000004, 0x100000, CRC(96d7c1a5) SHA1(93b6a7aea397280a5a778e736d433a85cb7da52c) ) + ROM_LOAD64_WORD_SWAP( "d27-06.bin", 0x000002, 0x100000, CRC(bbb934db) SHA1(9e9b5cf05b9275f1182f5b499b8ee897c4f25b96) ) + ROM_LOAD64_WORD_SWAP( "d27-07.bin", 0x000000, 0x100000, CRC(8ab4854e) SHA1(bd2750cdaa2918e56f8aef3732875952a1eeafea) ) ROM_REGION16_LE( 0x80000, "spritemap", 0 ) ROM_LOAD16_WORD( "d27-03.bin", 0x00000, 0x80000, CRC(23bf2000) SHA1(49b29e771a47fcd7e6cd4e2704b217f9727f8299) ) /* STY, used to create big sprites on the fly */ diff --git a/src/mame/drivers/slapshot.cpp b/src/mame/drivers/slapshot.cpp index f8a34b69e7f..280c547b272 100644 --- a/src/mame/drivers/slapshot.cpp +++ b/src/mame/drivers/slapshot.cpp @@ -375,31 +375,20 @@ INPUT_PORTS_END ***********************************************************/ -static const gfx_layout tilelayout = +static const gfx_layout layout_6bpp_hi = { 16,16, - RGN_FRAC(1,2), - 6, - { RGN_FRAC(1,2)+0, RGN_FRAC(1,2)+1, STEP4(0,1) }, - { STEP4(3*4,-4), STEP4(7*4,-4), STEP4(11*4,-4), STEP4(15*4,-4), }, - { STEP16(0,16*4) }, - 128*8 /* every sprite takes 128 consecutive bytes */ -}; - -static const gfx_layout charlayout = -{ - 16,16, /* 16*16 characters */ RGN_FRAC(1,1), - 4, /* 4 bits per pixel */ - { STEP4(0,1) }, - { STEP8(7*4,-4), STEP8(15*4,-4) }, - { STEP16(0,16*4) }, - 128*8 /* every sprite takes 128 consecutive bytes */ + 2, + { STEP2(0,1) }, + { STEP4(3*2,-2), STEP4(7*2,-2), STEP4(11*2,-2), STEP4(15*2,-2) }, + { STEP16(0,16*2) }, + 16*16*2 }; static GFXDECODE_START( gfx_slapshot ) - GFXDECODE_ENTRY( "gfx2", 0x0, tilelayout, 0, 256 ) /* sprite parts */ - GFXDECODE_ENTRY( "gfx1", 0x0, charlayout, 4096, 256 ) /* playfield */ + GFXDECODE_ENTRY( "sprites", 0x0, gfx_16x16x4_packed_lsb, 0, 256 ) // low 4bpp of 6bpp sprites + GFXDECODE_ENTRY( "sprites_hi", 0x0, layout_6bpp_hi, 0, 256 ) // hi 2bpp of 6bpp sprites GFXDECODE_END @@ -448,13 +437,11 @@ void slapshot_state::slapshot(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 8192); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(30 + 3, 9); m_tc0480scp->set_offsets_tx(-1, -1); m_tc0480scp->set_offsets_flip(0, 2); m_tc0480scp->set_col_base(4096); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0360PRI(config, m_tc0360pri, 0); @@ -516,13 +503,11 @@ void slapshot_state::opwolf3(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 8192); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(30 + 3, 9); m_tc0480scp->set_offsets_tx(-1, -1); m_tc0480scp->set_offsets_flip(0, 2); m_tc0480scp->set_col_base(4096); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0360PRI(config, m_tc0360pri, 0); @@ -557,15 +542,16 @@ ROM_START( slapshot ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */ ROM_LOAD ( "d71-07.77", 0x00000, 0x10000, CRC(dd5f670c) SHA1(743a9563c40fe40178c9ec8eece71a08380c2239) ) - ROM_REGION( 0x100000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d71-04.79", 0x00002, 0x80000, CRC(b727b81c) SHA1(9f56160e2b3e4d59cfa96b5c013f4e368781666e) ) /* SCR */ - ROM_LOAD32_WORD_SWAP( "d71-05.80", 0x00000, 0x80000, CRC(7b0f5d6d) SHA1(a54e4a651dc7cdc160286afb3d38531c7b9396b1) ) + ROM_REGION( 0x100000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d71-04.79", 0x00000, 0x80000, CRC(b727b81c) SHA1(9f56160e2b3e4d59cfa96b5c013f4e368781666e) ) /* SCR */ + ROM_LOAD32_WORD( "d71-05.80", 0x00002, 0x80000, CRC(7b0f5d6d) SHA1(a54e4a651dc7cdc160286afb3d38531c7b9396b1) ) - ROM_REGION( 0x400000, "gfx2", 0 ) - ROM_LOAD16_BYTE( "d71-01.23", 0x000001, 0x100000, CRC(0b1e8c27) SHA1(ffa452f7414f3d61edb69bb61b29a0cc8d9176d0) ) /* OBJ 6bpp */ - ROM_LOAD16_BYTE( "d71-02.24", 0x000000, 0x100000, CRC(ccaaea2d) SHA1(71b507f215f37e991abae5523642417a6b23a70d) ) - ROM_LOAD ( "d71-03.25", 0x300000, 0x100000, CRC(dccef9ec) SHA1(ee7a49727b822cf4c1d7acff994b77ea6191c423) ) - ROM_FILL ( 0x200000, 0x100000, 0x00 ) + ROM_REGION( 0x200000, "sprites", 0 ) + ROM_LOAD16_BYTE( "d71-01.23", 0x000000, 0x100000, CRC(0b1e8c27) SHA1(ffa452f7414f3d61edb69bb61b29a0cc8d9176d0) ) /* OBJ 4bpp */ + ROM_LOAD16_BYTE( "d71-02.24", 0x000001, 0x100000, CRC(ccaaea2d) SHA1(71b507f215f37e991abae5523642417a6b23a70d) ) + + ROM_REGION( 0x100000, "sprites_hi", 0 ) + ROM_LOAD ( "d71-03.25", 0x000000, 0x100000, CRC(dccef9ec) SHA1(ee7a49727b822cf4c1d7acff994b77ea6191c423) ) /* OBJ 2bpp */ ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */ ROM_LOAD( "d71-06.37", 0x00000, 0x80000, CRC(f3324188) SHA1(70dd724441eae8614218bc7f0f51860bd2462f0c) ) @@ -591,15 +577,16 @@ ROM_START( opwolf3 ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */ ROM_LOAD ( "d74_22.77", 0x00000, 0x10000, CRC(118374a6) SHA1(cc1d0d28efdf1df3e648e7d932405811854ba4ee) ) - ROM_REGION( 0x400000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d74_05.80", 0x000002, 0x200000, CRC(85ea64cc) SHA1(1960a934191c451df1554323d47f6fc64939b0ce) ) /* SCR */ - ROM_LOAD32_WORD_SWAP( "d74_06.81", 0x000000, 0x200000, CRC(2fa1e08d) SHA1(f1f34b308202fe08e73535424b5b4e3d91295224) ) + ROM_REGION( 0x400000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d74_05.80", 0x000000, 0x200000, CRC(85ea64cc) SHA1(1960a934191c451df1554323d47f6fc64939b0ce) ) /* SCR */ + ROM_LOAD32_WORD( "d74_06.81", 0x000002, 0x200000, CRC(2fa1e08d) SHA1(f1f34b308202fe08e73535424b5b4e3d91295224) ) - ROM_REGION( 0x800000, "gfx2", 0 ) - ROM_LOAD16_BYTE( "d74_02.23", 0x000001, 0x200000, CRC(aab86332) SHA1(b9133407504e9ef4fd5ae7d284cdb0c7f78f9a99) ) /* OBJ 6bpp */ - ROM_LOAD16_BYTE( "d74_03.24", 0x000000, 0x200000, CRC(3f398916) SHA1(4b6a3ee0baf5f32e24e5040f233300f1ca347fe7) ) - ROM_LOAD ( "d74_04.25", 0x600000, 0x200000, CRC(2f385638) SHA1(1ba2ec7d9b1c491e1cc6d7e646e09ef2bc063f25) ) - ROM_FILL ( 0x400000, 0x200000, 0x00 ) + ROM_REGION( 0x400000, "sprites", 0 ) + ROM_LOAD16_BYTE( "d74_02.23", 0x000000, 0x200000, CRC(aab86332) SHA1(b9133407504e9ef4fd5ae7d284cdb0c7f78f9a99) ) /* OBJ 4bpp */ + ROM_LOAD16_BYTE( "d74_03.24", 0x000001, 0x200000, CRC(3f398916) SHA1(4b6a3ee0baf5f32e24e5040f233300f1ca347fe7) ) + + ROM_REGION( 0x200000, "sprites_hi", 0 ) + ROM_LOAD ( "d74_04.25", 0x000000, 0x200000, CRC(2f385638) SHA1(1ba2ec7d9b1c491e1cc6d7e646e09ef2bc063f25) ) /* OBJ 2bpp */ ROM_REGION( 0x200000, "ymsnd", 0 ) /* ADPCM samples */ ROM_LOAD( "d74_01.37", 0x000000, 0x200000, CRC(115313e0) SHA1(51a69e7a26960b1328ccefeaec0fb26bdccc39f2) ) @@ -617,15 +604,16 @@ ROM_START( opwolf3u ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */ ROM_LOAD ( "d74_19.77", 0x00000, 0x10000, CRC(05d53f06) SHA1(48b0cd68ad3758f424552a4e3833c5a1c2f1825b) ) - ROM_REGION( 0x400000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d74_05.80", 0x000002, 0x200000, CRC(85ea64cc) SHA1(1960a934191c451df1554323d47f6fc64939b0ce) ) /* SCR */ - ROM_LOAD32_WORD_SWAP( "d74_06.81", 0x000000, 0x200000, CRC(2fa1e08d) SHA1(f1f34b308202fe08e73535424b5b4e3d91295224) ) + ROM_REGION( 0x400000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d74_05.80", 0x000000, 0x200000, CRC(85ea64cc) SHA1(1960a934191c451df1554323d47f6fc64939b0ce) ) /* SCR */ + ROM_LOAD32_WORD( "d74_06.81", 0x000002, 0x200000, CRC(2fa1e08d) SHA1(f1f34b308202fe08e73535424b5b4e3d91295224) ) - ROM_REGION( 0x800000, "gfx2", 0 ) - ROM_LOAD16_BYTE( "d74_02.23", 0x000001, 0x200000, CRC(aab86332) SHA1(b9133407504e9ef4fd5ae7d284cdb0c7f78f9a99) ) /* OBJ 6bpp */ - ROM_LOAD16_BYTE( "d74_03.24", 0x000000, 0x200000, CRC(3f398916) SHA1(4b6a3ee0baf5f32e24e5040f233300f1ca347fe7) ) - ROM_LOAD ( "d74_04.25", 0x600000, 0x200000, CRC(2f385638) SHA1(1ba2ec7d9b1c491e1cc6d7e646e09ef2bc063f25) ) - ROM_FILL ( 0x400000, 0x200000, 0x00 ) + ROM_REGION( 0x400000, "sprites", 0 ) + ROM_LOAD16_BYTE( "d74_02.23", 0x000000, 0x200000, CRC(aab86332) SHA1(b9133407504e9ef4fd5ae7d284cdb0c7f78f9a99) ) /* OBJ 6bpp */ + ROM_LOAD16_BYTE( "d74_03.24", 0x000001, 0x200000, CRC(3f398916) SHA1(4b6a3ee0baf5f32e24e5040f233300f1ca347fe7) ) + + ROM_REGION( 0x200000, "sprites_hi", 0 ) + ROM_LOAD ( "d74_04.25", 0x000000, 0x200000, CRC(2f385638) SHA1(1ba2ec7d9b1c491e1cc6d7e646e09ef2bc063f25) ) ROM_REGION( 0x200000, "ymsnd", 0 ) /* ADPCM samples */ ROM_LOAD( "d74_01.37", 0x000000, 0x200000, CRC(115313e0) SHA1(51a69e7a26960b1328ccefeaec0fb26bdccc39f2) ) @@ -636,25 +624,40 @@ ROM_END void slapshot_state::driver_init() { - u8 *gfx = memregion("gfx2")->base(); - const u32 size = memregion("gfx2")->bytes(); + /* convert from 2bits into 4bits format */ + gfx_element *gx0 = m_gfxdecode->gfx(0); + gfx_element *gx1 = m_gfxdecode->gfx(1); - u32 offset = size / 2; - for (u32 i = size / 2 + size / 4; i < size; i++) + // allocate memory for the assembled data + u8 *srcdata = auto_alloc_array(machine(), u8, gx0->elements() * gx0->width() * gx0->height()); + + // loop over elements + u8 *dest = srcdata; + for (int c = 0; c < gx0->elements(); c++) { - /* Expand 2bits into 4bits format */ - const u8 data = gfx[i]; - const u8 d1 = (data >> 0) & 3; - const u8 d2 = (data >> 2) & 3; - const u8 d3 = (data >> 4) & 3; - const u8 d4 = (data >> 6) & 3; + const u8 *c0base = gx0->get_data(c); + const u8 *c1base = gx1->get_data(c); - gfx[offset] = (d3 << 2) | (d4 << 6); - offset++; + // loop over height + for (int y = 0; y < gx0->height(); y++) + { + const u8 *c0 = c0base; + const u8 *c1 = c1base; - gfx[offset] = (d1 << 2) | (d2 << 6); - offset++; + for (int x = 0; x < gx0->width(); x++) + { + u8 hipix = *c1++; + *dest++ = (*c0++ & 0xf) | ((hipix << 4) & 0x30); + } + c0base += gx0->rowbytes(); + c1base += gx1->rowbytes(); + } } + + gx0->set_raw_layout(srcdata, gx0->width(), gx0->height(), gx0->elements(), 8 * gx0->width(), 8 * gx0->width() * gx0->height()); + gx0->set_colors(4096 / 64); + gx0->set_granularity(64); + m_gfxdecode->set_gfx(1, nullptr); } GAME( 1994, slapshot, 0, slapshot, slapshot, slapshot_state, driver_init, ROT0, "Taito Corporation", "Slap Shot (Japan)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/superchs.cpp b/src/mame/drivers/superchs.cpp index c0faeec7458..1de84063936 100644 --- a/src/mame/drivers/superchs.cpp +++ b/src/mame/drivers/superchs.cpp @@ -184,26 +184,14 @@ static const gfx_layout tile16x16_layout = 16,16, /* 16*16 sprites */ RGN_FRAC(1,1), 4, /* 4 bits per pixel */ - { STEP4(0,8) }, - { STEP8(8*4,1), STEP8(0,1) }, - { STEP16(0,8*4*2) }, + { STEP4(0,16) }, + { STEP16(0,1) }, + { STEP16(0,16*4) }, 16*16*4 /* every sprite takes 128 consecutive bytes */ }; -static const gfx_layout charlayout = -{ - 16,16, /* 16*16 characters */ - RGN_FRAC(1,1), - 4, /* 4 bits per pixel */ - { STEP4(0,1) }, - { STEP8(7*4,-4), STEP8(15*4,-4) }, - { STEP16(0,16*4) }, - 16*16*4 /* every sprite takes 128 consecutive bytes */ -}; - static GFXDECODE_START( gfx_superchs ) - GFXDECODE_ENTRY( "gfx2", 0x0, tile16x16_layout, 0, 512 ) - GFXDECODE_ENTRY( "gfx1", 0x0, charlayout, 0, 512 ) + GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 4096, 256 ) GFXDECODE_END @@ -255,11 +243,9 @@ void superchs_state::superchs(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 8192); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x20, 0x08); m_tc0480scp->set_offsets_tx(-1, 0); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ TAITO_EN(config, "taito_en", 0); @@ -290,15 +276,15 @@ ROM_START( superchs ) ROM_LOAD16_BYTE( "d46-24.ic127", 0x00000, 0x20000, CRC(a006baa1) SHA1(e691ddab6cb79444bd6c3fc870e0dff3051d8cf9) ) ROM_LOAD16_BYTE( "d46-23.ic112", 0x00001, 0x20000, CRC(9a69dbd0) SHA1(13eca492f1db834c599656750864e7003514f3d4) ) - ROM_REGION( 0x200000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d46-05.ic87", 0x00002, 0x100000, CRC(150d0e4c) SHA1(9240b32900be733b8f44868ed5d64f5f1aaadb47) ) /* SCR 16x16 tiles */ - ROM_LOAD32_WORD_SWAP( "d46-06.ic88", 0x00000, 0x100000, CRC(321308be) SHA1(17e724cce39b1331650c1f08d693d057dcd43a3f) ) + ROM_REGION( 0x200000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d46-05.ic87", 0x00000, 0x100000, CRC(150d0e4c) SHA1(9240b32900be733b8f44868ed5d64f5f1aaadb47) ) /* SCR 16x16 tiles */ + ROM_LOAD32_WORD( "d46-06.ic88", 0x00002, 0x100000, CRC(321308be) SHA1(17e724cce39b1331650c1f08d693d057dcd43a3f) ) - ROM_REGION( 0x800000, "gfx2", 0 ) - ROM_LOAD32_BYTE( "d46-01.ic64", 0x000003, 0x200000, CRC(5c2ae92d) SHA1(bee2caed4729a27fa0569d952d6d12170c2aa2a8) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ - ROM_LOAD32_BYTE( "d46-02.ic65", 0x000002, 0x200000, CRC(a83ca82e) SHA1(03759be87a8d62c0044e8a44e90c47308e32d3e5) ) - ROM_LOAD32_BYTE( "d46-03.ic66", 0x000001, 0x200000, CRC(e0e9cbfd) SHA1(b7deb2c58320af9d1b4273ad2758ce927d2e279c) ) - ROM_LOAD32_BYTE( "d46-04.ic67", 0x000000, 0x200000, CRC(832769a9) SHA1(136ead19edeee90b5be91a6e2f434193dc670fd8) ) + ROM_REGION( 0x800000, "sprites", 0 ) + ROM_LOAD64_WORD_SWAP( "d46-01.ic64", 0x000006, 0x200000, CRC(5c2ae92d) SHA1(bee2caed4729a27fa0569d952d6d12170c2aa2a8) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ + ROM_LOAD64_WORD_SWAP( "d46-02.ic65", 0x000004, 0x200000, CRC(a83ca82e) SHA1(03759be87a8d62c0044e8a44e90c47308e32d3e5) ) + ROM_LOAD64_WORD_SWAP( "d46-03.ic66", 0x000002, 0x200000, CRC(e0e9cbfd) SHA1(b7deb2c58320af9d1b4273ad2758ce927d2e279c) ) + ROM_LOAD64_WORD_SWAP( "d46-04.ic67", 0x000000, 0x200000, CRC(832769a9) SHA1(136ead19edeee90b5be91a6e2f434193dc670fd8) ) ROM_REGION16_LE( 0x80000, "spritemap", 0 ) ROM_LOAD16_WORD( "d46-07.ic34", 0x00000, 0x80000, CRC(c3b8b093) SHA1(f34364248ca7fdaaa1a0f8f6f795f9b4bc935fb9) ) /* STY, used to create big sprites on the fly */ @@ -340,15 +326,15 @@ ROM_START( superchsu ) ROM_LOAD16_BYTE( "d46-24.ic127", 0x00000, 0x20000, CRC(a006baa1) SHA1(e691ddab6cb79444bd6c3fc870e0dff3051d8cf9) ) ROM_LOAD16_BYTE( "d46-23.ic112", 0x00001, 0x20000, CRC(9a69dbd0) SHA1(13eca492f1db834c599656750864e7003514f3d4) ) - ROM_REGION( 0x200000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d46-05.ic87", 0x00002, 0x100000, CRC(150d0e4c) SHA1(9240b32900be733b8f44868ed5d64f5f1aaadb47) ) /* SCR 16x16 tiles */ - ROM_LOAD32_WORD_SWAP( "d46-06.ic88", 0x00000, 0x100000, CRC(321308be) SHA1(17e724cce39b1331650c1f08d693d057dcd43a3f) ) + ROM_REGION( 0x200000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d46-05.ic87", 0x00000, 0x100000, CRC(150d0e4c) SHA1(9240b32900be733b8f44868ed5d64f5f1aaadb47) ) /* SCR 16x16 tiles */ + ROM_LOAD32_WORD( "d46-06.ic88", 0x00002, 0x100000, CRC(321308be) SHA1(17e724cce39b1331650c1f08d693d057dcd43a3f) ) - ROM_REGION( 0x800000, "gfx2", 0 ) - ROM_LOAD32_BYTE( "d46-01.ic64", 0x000003, 0x200000, CRC(5c2ae92d) SHA1(bee2caed4729a27fa0569d952d6d12170c2aa2a8) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ - ROM_LOAD32_BYTE( "d46-02.ic65", 0x000002, 0x200000, CRC(a83ca82e) SHA1(03759be87a8d62c0044e8a44e90c47308e32d3e5) ) - ROM_LOAD32_BYTE( "d46-03.ic66", 0x000001, 0x200000, CRC(e0e9cbfd) SHA1(b7deb2c58320af9d1b4273ad2758ce927d2e279c) ) - ROM_LOAD32_BYTE( "d46-04.ic67", 0x000000, 0x200000, CRC(832769a9) SHA1(136ead19edeee90b5be91a6e2f434193dc670fd8) ) + ROM_REGION( 0x800000, "sprites", 0 ) + ROM_LOAD64_WORD_SWAP( "d46-01.ic64", 0x000006, 0x200000, CRC(5c2ae92d) SHA1(bee2caed4729a27fa0569d952d6d12170c2aa2a8) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ + ROM_LOAD64_WORD_SWAP( "d46-02.ic65", 0x000004, 0x200000, CRC(a83ca82e) SHA1(03759be87a8d62c0044e8a44e90c47308e32d3e5) ) + ROM_LOAD64_WORD_SWAP( "d46-03.ic66", 0x000002, 0x200000, CRC(e0e9cbfd) SHA1(b7deb2c58320af9d1b4273ad2758ce927d2e279c) ) + ROM_LOAD64_WORD_SWAP( "d46-04.ic67", 0x000000, 0x200000, CRC(832769a9) SHA1(136ead19edeee90b5be91a6e2f434193dc670fd8) ) ROM_REGION16_LE( 0x80000, "spritemap", 0 ) ROM_LOAD16_WORD( "d46-07.ic34", 0x00000, 0x80000, CRC(c3b8b093) SHA1(f34364248ca7fdaaa1a0f8f6f795f9b4bc935fb9) ) /* STY, used to create big sprites on the fly */ @@ -390,15 +376,15 @@ ROM_START( superchsj ) ROM_LOAD16_BYTE( "d46-24.ic127", 0x00000, 0x20000, CRC(a006baa1) SHA1(e691ddab6cb79444bd6c3fc870e0dff3051d8cf9) ) ROM_LOAD16_BYTE( "d46-23.ic112", 0x00001, 0x20000, CRC(9a69dbd0) SHA1(13eca492f1db834c599656750864e7003514f3d4) ) - ROM_REGION( 0x200000, "gfx1", 0 ) - ROM_LOAD32_WORD_SWAP( "d46-05.ic87", 0x00002, 0x100000, CRC(150d0e4c) SHA1(9240b32900be733b8f44868ed5d64f5f1aaadb47) ) /* SCR 16x16 tiles */ - ROM_LOAD32_WORD_SWAP( "d46-06.ic88", 0x00000, 0x100000, CRC(321308be) SHA1(17e724cce39b1331650c1f08d693d057dcd43a3f) ) + ROM_REGION( 0x200000, "tc0480scp", 0 ) + ROM_LOAD32_WORD( "d46-05.ic87", 0x00000, 0x100000, CRC(150d0e4c) SHA1(9240b32900be733b8f44868ed5d64f5f1aaadb47) ) /* SCR 16x16 tiles */ + ROM_LOAD32_WORD( "d46-06.ic88", 0x00002, 0x100000, CRC(321308be) SHA1(17e724cce39b1331650c1f08d693d057dcd43a3f) ) - ROM_REGION( 0x800000, "gfx2", 0 ) - ROM_LOAD32_BYTE( "d46-01.ic64", 0x000003, 0x200000, CRC(5c2ae92d) SHA1(bee2caed4729a27fa0569d952d6d12170c2aa2a8) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ - ROM_LOAD32_BYTE( "d46-02.ic65", 0x000002, 0x200000, CRC(a83ca82e) SHA1(03759be87a8d62c0044e8a44e90c47308e32d3e5) ) - ROM_LOAD32_BYTE( "d46-03.ic66", 0x000001, 0x200000, CRC(e0e9cbfd) SHA1(b7deb2c58320af9d1b4273ad2758ce927d2e279c) ) - ROM_LOAD32_BYTE( "d46-04.ic67", 0x000000, 0x200000, CRC(832769a9) SHA1(136ead19edeee90b5be91a6e2f434193dc670fd8) ) + ROM_REGION( 0x800000, "sprites", 0 ) + ROM_LOAD64_WORD_SWAP( "d46-01.ic64", 0x000006, 0x200000, CRC(5c2ae92d) SHA1(bee2caed4729a27fa0569d952d6d12170c2aa2a8) ) /* OBJ 16x16 tiles: each rom has 1 bitplane */ + ROM_LOAD64_WORD_SWAP( "d46-02.ic65", 0x000004, 0x200000, CRC(a83ca82e) SHA1(03759be87a8d62c0044e8a44e90c47308e32d3e5) ) + ROM_LOAD64_WORD_SWAP( "d46-03.ic66", 0x000002, 0x200000, CRC(e0e9cbfd) SHA1(b7deb2c58320af9d1b4273ad2758ce927d2e279c) ) + ROM_LOAD64_WORD_SWAP( "d46-04.ic67", 0x000000, 0x200000, CRC(832769a9) SHA1(136ead19edeee90b5be91a6e2f434193dc670fd8) ) ROM_REGION16_LE( 0x80000, "spritemap", 0 ) ROM_LOAD16_WORD( "d46-07.ic34", 0x00000, 0x80000, CRC(c3b8b093) SHA1(f34364248ca7fdaaa1a0f8f6f795f9b4bc935fb9) ) /* STY, used to create big sprites on the fly */ @@ -440,29 +426,29 @@ ROM_START( superchsp ) ROM_LOAD16_BYTE( "ic112_3a05.bin", 0x00001, 0x40000, CRC(f95a477d) SHA1(c3ad1987ecd1f48084fba08687bd75ae804342b3) ) ROM_LOAD16_BYTE( "ic127_ae27.bin", 0x00000, 0x40000, CRC(8c8cd2a1) SHA1(178ab2df0ea7371ce275d38051643ea19ba88047) ) - ROM_REGION( 0x200000, "gfx1", 0 ) /* SCR 16x16 tiles */ - ROM_LOAD32_BYTE( "0scn.ic9", 0x00003, 0x080000, CRC(d54e80ec) SHA1(83460cf97b0da8523486ede5bd504710c790b1a6) ) - ROM_LOAD32_BYTE( "8scn.ic8", 0x00002, 0x080000, CRC(b3da122d) SHA1(1e4198b2d5ce2144a7ca01f418aca33f799dcad2) ) - ROM_LOAD32_BYTE( "16scn.ic12", 0x00001, 0x080000, CRC(dd26932c) SHA1(31bcc4e0195a6d966829976b89e81e6eb7dde8b6) ) - ROM_LOAD32_BYTE( "24scn.ic13", 0x00000, 0x080000, CRC(4f560680) SHA1(6398013b8fa5aebc905bf31918e990dd7f5d9490) ) + ROM_REGION( 0x200000, "tc0480scp", 0 ) /* SCR 16x16 tiles */ + ROM_LOAD32_BYTE( "0scn.ic9", 0x00000, 0x080000, CRC(d54e80ec) SHA1(83460cf97b0da8523486ede5bd504710c790b1a6) ) + ROM_LOAD32_BYTE( "8scn.ic8", 0x00001, 0x080000, CRC(b3da122d) SHA1(1e4198b2d5ce2144a7ca01f418aca33f799dcad2) ) + ROM_LOAD32_BYTE( "16scn.ic12", 0x00002, 0x080000, CRC(dd26932c) SHA1(31bcc4e0195a6d966829976b89e81e6eb7dde8b6) ) + ROM_LOAD32_BYTE( "24scn.ic13", 0x00003, 0x080000, CRC(4f560680) SHA1(6398013b8fa5aebc905bf31918e990dd7f5d9490) ) - ROM_REGION( 0x800000, "gfx2", 0 ) - ROM_LOAD64_BYTE( "0lobj.ic14", 0x000003, 0x80000, CRC(972d0866) SHA1(7787312ba99d971eee30d50ddff12629e3bdc8b9) ) - ROM_LOAD64_BYTE( "16lobj.ic15", 0x000002, 0x80000, CRC(ceefdf0d) SHA1(4463f5d1d81b0fcaa29276c995c31dc89cb97680) ) - ROM_LOAD64_BYTE( "32lobj.ic16", 0x000001, 0x80000, CRC(1e86a77a) SHA1(886080d3872fe2d592269f6541569a290885a475) ) - ROM_LOAD64_BYTE( "48lobj.ic17", 0x000000, 0x80000, CRC(1d8f3c72) SHA1(92670fc4d331d1243457b67ec7d98a273d9c9540) ) - ROM_LOAD64_BYTE( "8lobj.ic4", 0x000007, 0x80000, CRC(e138a3f7) SHA1(94f1deb05286af73f5af60a08944017540ae3387) ) - ROM_LOAD64_BYTE( "24lobj.ic5", 0x000006, 0x80000, CRC(927e0539) SHA1(8adbd77ae5bf8fa3761ac7c315d1c96f616a0197) ) - ROM_LOAD64_BYTE( "40lobj.ic6", 0x000005, 0x80000, CRC(3810a203) SHA1(f269c5bea5db18626b716d8c204dace7ab681e28) ) - ROM_LOAD64_BYTE( "56lobj.ic7", 0x000004, 0x80000, CRC(d66d6b30) SHA1(32e08dacffa706e0b3634fc52cabb2a5fe0f5cf5) ) - ROM_LOAD64_BYTE( "0h-obj.ic22", 0x400003, 0x80000, CRC(985d31b0) SHA1(8e3c899792de0530f1176af992a90dbbbd3938a8) ) - ROM_LOAD64_BYTE( "16h-obj.ic23", 0x400002, 0x80000, CRC(1be705e8) SHA1(497ee154ee43e81ee7d7e8106663374be0d5a550) ) - ROM_LOAD64_BYTE( "32h-obj.ic24", 0x400001, 0x80000, CRC(f9fde123) SHA1(8cdd4c98e2eaca542c9916da1fb933606d3c8e3f) ) - ROM_LOAD64_BYTE( "48h-obj.ic25", 0x400000, 0x80000, CRC(1c5d28c6) SHA1(9844fd41f7d190b8b11b23e01687f7c40cf8b18a) ) - ROM_LOAD64_BYTE( "8h-obj.ic30", 0x400007, 0x80000, CRC(5559a1a1) SHA1(cdc2f2f0b086cf2468fb5e2289c2308313be6668) ) - ROM_LOAD64_BYTE( "24h-obj.ic31", 0x400006, 0x80000, CRC(83e724fb) SHA1(0f93163afa4af328b813502cecaf6824b3717bc7) ) - ROM_LOAD64_BYTE( "40h-obj.ic32", 0x400005, 0x80000, CRC(6a3b2fa0) SHA1(5a8e7875afe3ba8443811729ede21d23fa7b5082) ) - ROM_LOAD64_BYTE( "56h-obj.ic33", 0x400004, 0x80000, CRC(3e78a619) SHA1(b37bd46b2098db6c8857ffac7444216c617e4e97) ) + ROM_REGION( 0x800000, "sprites", 0 ) + ROM_LOAD64_BYTE( "0lobj.ic14", 0x000007, 0x80000, CRC(972d0866) SHA1(7787312ba99d971eee30d50ddff12629e3bdc8b9) ) + ROM_LOAD64_BYTE( "8lobj.ic4", 0x000006, 0x80000, CRC(e138a3f7) SHA1(94f1deb05286af73f5af60a08944017540ae3387) ) + ROM_LOAD64_BYTE( "16lobj.ic15", 0x000005, 0x80000, CRC(ceefdf0d) SHA1(4463f5d1d81b0fcaa29276c995c31dc89cb97680) ) + ROM_LOAD64_BYTE( "24lobj.ic5", 0x000004, 0x80000, CRC(927e0539) SHA1(8adbd77ae5bf8fa3761ac7c315d1c96f616a0197) ) + ROM_LOAD64_BYTE( "32lobj.ic16", 0x000003, 0x80000, CRC(1e86a77a) SHA1(886080d3872fe2d592269f6541569a290885a475) ) + ROM_LOAD64_BYTE( "40lobj.ic6", 0x000002, 0x80000, CRC(3810a203) SHA1(f269c5bea5db18626b716d8c204dace7ab681e28) ) + ROM_LOAD64_BYTE( "48lobj.ic17", 0x000001, 0x80000, CRC(1d8f3c72) SHA1(92670fc4d331d1243457b67ec7d98a273d9c9540) ) + ROM_LOAD64_BYTE( "56lobj.ic7", 0x000000, 0x80000, CRC(d66d6b30) SHA1(32e08dacffa706e0b3634fc52cabb2a5fe0f5cf5) ) + ROM_LOAD64_BYTE( "0h-obj.ic22", 0x400007, 0x80000, CRC(985d31b0) SHA1(8e3c899792de0530f1176af992a90dbbbd3938a8) ) + ROM_LOAD64_BYTE( "8h-obj.ic30", 0x400006, 0x80000, CRC(5559a1a1) SHA1(cdc2f2f0b086cf2468fb5e2289c2308313be6668) ) + ROM_LOAD64_BYTE( "16h-obj.ic23", 0x400005, 0x80000, CRC(1be705e8) SHA1(497ee154ee43e81ee7d7e8106663374be0d5a550) ) + ROM_LOAD64_BYTE( "24h-obj.ic31", 0x400004, 0x80000, CRC(83e724fb) SHA1(0f93163afa4af328b813502cecaf6824b3717bc7) ) + ROM_LOAD64_BYTE( "32h-obj.ic24", 0x400003, 0x80000, CRC(f9fde123) SHA1(8cdd4c98e2eaca542c9916da1fb933606d3c8e3f) ) + ROM_LOAD64_BYTE( "40h-obj.ic32", 0x400002, 0x80000, CRC(6a3b2fa0) SHA1(5a8e7875afe3ba8443811729ede21d23fa7b5082) ) + ROM_LOAD64_BYTE( "48h-obj.ic25", 0x400001, 0x80000, CRC(1c5d28c6) SHA1(9844fd41f7d190b8b11b23e01687f7c40cf8b18a) ) + ROM_LOAD64_BYTE( "56h-obj.ic33", 0x400000, 0x80000, CRC(3e78a619) SHA1(b37bd46b2098db6c8857ffac7444216c617e4e97) ) ROM_REGION16_LE( 0x80000, "spritemap", 0 ) ROM_LOAD16_BYTE( "0style.ic28", 0x00000, 0x40000, CRC(161263e5) SHA1(3b501dd9c543a9505c3fd7627aa42434eeb1a531) ) @@ -497,29 +483,29 @@ ROM_START( superchsp2 ) ROM_LOAD16_BYTE( "ic112.ic112", 0x00001, 0x40000, CRC(98b4b89e) SHA1(f28054e76d08aa104bfabeb0eb2d42b9f3487608) ) ROM_LOAD16_BYTE( "ic127.ic127", 0x00000, 0x40000, CRC(41a7a06f) SHA1(80ffe9167ba490ed3c153dc279df65ee758d8d35) ) - ROM_REGION( 0x200000, "gfx1", 0 ) /* SCR 16x16 tiles */ - ROM_LOAD32_BYTE( "9.ic9", 0x00003, 0x080000, CRC(c0494e23) SHA1(35f94ae1b2f663a7046896f2ae10eacaa8f7c813) ) - ROM_LOAD32_BYTE( "8.ic8", 0x00002, 0x080000, CRC(e668dd6c) SHA1(619278598c89c828846068399cdadb8206284da6) ) - ROM_LOAD32_BYTE( "12.ic12", 0x00001, 0x080000, CRC(b4d20bc2) SHA1(2f9fa38447200a3718e3bc23baceb64e903387dc) ) - ROM_LOAD32_BYTE( "13.ic13", 0x00000, 0x080000, CRC(54090800) SHA1(66aac7896daa843918679b50a6a179ad06921ca1) ) + ROM_REGION( 0x200000, "tc0480scp", 0 ) /* SCR 16x16 tiles */ + ROM_LOAD32_BYTE( "9.ic9", 0x00000, 0x080000, CRC(c0494e23) SHA1(35f94ae1b2f663a7046896f2ae10eacaa8f7c813) ) + ROM_LOAD32_BYTE( "8.ic8", 0x00001, 0x080000, CRC(e668dd6c) SHA1(619278598c89c828846068399cdadb8206284da6) ) + ROM_LOAD32_BYTE( "12.ic12", 0x00002, 0x080000, CRC(b4d20bc2) SHA1(2f9fa38447200a3718e3bc23baceb64e903387dc) ) + ROM_LOAD32_BYTE( "13.ic13", 0x00003, 0x080000, CRC(54090800) SHA1(66aac7896daa843918679b50a6a179ad06921ca1) ) - ROM_REGION( 0x800000, "gfx2", 0 ) - ROM_LOAD64_BYTE( "14.ic14", 0x000003, 0x80000, CRC(9fbd8237) SHA1(392deb7534a61878e282684a9611f374fd14562a) ) - ROM_LOAD64_BYTE( "15.ic15", 0x000002, 0x80000, CRC(1665c890) SHA1(aede1554c7f71338654f62bc2699763bc4e400a9) ) - ROM_LOAD64_BYTE( "16.ic16", 0x000001, 0x80000, CRC(a71fa648) SHA1(95dffff8a20e84a6434627255d89837a70de3a6f) ) - ROM_LOAD64_BYTE( "17.ic17", 0x000000, 0x80000, CRC(2a33d21b) SHA1(b86a0414c4b2108a06572dac5a9f7b0656c3aa88) ) - ROM_LOAD64_BYTE( "4.ic4", 0x000007, 0x80000, CRC(5cbd609c) SHA1(11985aaa9ce92ac5170f2ffc330583c9104e3e96) ) - ROM_LOAD64_BYTE( "5.ic5", 0x000006, 0x80000, CRC(5cd6b545) SHA1(2b176ffa60a680b7e20da430dbc62a700aabceab) ) - ROM_LOAD64_BYTE( "6.ic6", 0x000005, 0x80000, CRC(4996bc41) SHA1(b5c53bbd64cf603fa11088f681d8d48773f18098) ) - ROM_LOAD64_BYTE( "7.ic7", 0x000004, 0x80000, CRC(24a96745) SHA1(e9fafade59a44d3dcc8937ca918e9f2e0f00732e) ) - ROM_LOAD64_BYTE( "22.ic22", 0x400003, 0x80000, CRC(3769316a) SHA1(70e8ba5222ab3f1ba9bb3c71d8e9e737ee01c544) ) - ROM_LOAD64_BYTE( "23.ic23", 0x400002, 0x80000, CRC(875862d9) SHA1(7e26100ada8d88d6ea5443983c18a0f26fe0dbbc) ) - ROM_LOAD64_BYTE( "24.ic24", 0x400001, 0x80000, CRC(ebf3ac6b) SHA1(93b887302081d104c36ea6f75a4bf7664ea055a0) ) - ROM_LOAD64_BYTE( "25.ic25", 0x400000, 0x80000, CRC(053f2717) SHA1(a4f398fcc1a0d82f2782fe885fa52fd470744a1e) ) - ROM_LOAD64_BYTE( "30.ic30", 0x400007, 0x80000, CRC(f9683857) SHA1(5acab4a6fa55692329a8909323bfd0b4e3e2aeec) ) - ROM_LOAD64_BYTE( "31.ic31", 0x400006, 0x80000, CRC(67afe831) SHA1(016dc96701d30ae97764b58bc5d5e0011e77557c) ) - ROM_LOAD64_BYTE( "32.ic32", 0x400005, 0x80000, CRC(1c55ac47) SHA1(2b7cd44cd3fb3cbbd49c4ed717b6e6774f600577) ) - ROM_LOAD64_BYTE( "33.ic33", 0x400004, 0x80000, CRC(0392a90e) SHA1(abdff64a0db9e3293f8fa50042a8ed9cd29edab6) ) + ROM_REGION( 0x800000, "sprites", 0 ) + ROM_LOAD64_BYTE( "14.ic14", 0x000007, 0x80000, CRC(9fbd8237) SHA1(392deb7534a61878e282684a9611f374fd14562a) ) + ROM_LOAD64_BYTE( "4.ic4", 0x000006, 0x80000, CRC(5cbd609c) SHA1(11985aaa9ce92ac5170f2ffc330583c9104e3e96) ) + ROM_LOAD64_BYTE( "15.ic15", 0x000005, 0x80000, CRC(1665c890) SHA1(aede1554c7f71338654f62bc2699763bc4e400a9) ) + ROM_LOAD64_BYTE( "5.ic5", 0x000004, 0x80000, CRC(5cd6b545) SHA1(2b176ffa60a680b7e20da430dbc62a700aabceab) ) + ROM_LOAD64_BYTE( "16.ic16", 0x000003, 0x80000, CRC(a71fa648) SHA1(95dffff8a20e84a6434627255d89837a70de3a6f) ) + ROM_LOAD64_BYTE( "6.ic6", 0x000002, 0x80000, CRC(4996bc41) SHA1(b5c53bbd64cf603fa11088f681d8d48773f18098) ) + ROM_LOAD64_BYTE( "17.ic17", 0x000001, 0x80000, CRC(2a33d21b) SHA1(b86a0414c4b2108a06572dac5a9f7b0656c3aa88) ) + ROM_LOAD64_BYTE( "7.ic7", 0x000000, 0x80000, CRC(24a96745) SHA1(e9fafade59a44d3dcc8937ca918e9f2e0f00732e) ) + ROM_LOAD64_BYTE( "22.ic22", 0x400007, 0x80000, CRC(3769316a) SHA1(70e8ba5222ab3f1ba9bb3c71d8e9e737ee01c544) ) + ROM_LOAD64_BYTE( "30.ic30", 0x400006, 0x80000, CRC(f9683857) SHA1(5acab4a6fa55692329a8909323bfd0b4e3e2aeec) ) + ROM_LOAD64_BYTE( "23.ic23", 0x400005, 0x80000, CRC(875862d9) SHA1(7e26100ada8d88d6ea5443983c18a0f26fe0dbbc) ) + ROM_LOAD64_BYTE( "31.ic31", 0x400004, 0x80000, CRC(67afe831) SHA1(016dc96701d30ae97764b58bc5d5e0011e77557c) ) + ROM_LOAD64_BYTE( "24.ic24", 0x400003, 0x80000, CRC(ebf3ac6b) SHA1(93b887302081d104c36ea6f75a4bf7664ea055a0) ) + ROM_LOAD64_BYTE( "32.ic32", 0x400002, 0x80000, CRC(1c55ac47) SHA1(2b7cd44cd3fb3cbbd49c4ed717b6e6774f600577) ) + ROM_LOAD64_BYTE( "25.ic25", 0x400001, 0x80000, CRC(053f2717) SHA1(a4f398fcc1a0d82f2782fe885fa52fd470744a1e) ) + ROM_LOAD64_BYTE( "33.ic33", 0x400000, 0x80000, CRC(0392a90e) SHA1(abdff64a0db9e3293f8fa50042a8ed9cd29edab6) ) ROM_REGION16_LE( 0x80000, "spritemap", 0 ) ROM_LOAD16_BYTE( "27.ic28", 0x00000, 0x40000, CRC(2686bb57) SHA1(ec793ccd5b1bc40ceda91f8aa913e4a423d1ba0a) ) diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp index 2df2827c9eb..efb9fe2b856 100644 --- a/src/mame/drivers/taito_f2.cpp +++ b/src/mame/drivers/taito_f2.cpp @@ -2691,11 +2691,28 @@ INPUT_PORTS_END GFX DECODING ***********************************************************/ +static const gfx_layout layout_6bpp_hi = +{ + 16,16, + RGN_FRAC(1,1), + 2, + { STEP2(0,1) }, + { STEP4(3*2,-2), STEP4(7*2,-2), STEP4(11*2,-2), STEP4(15*2,-2) }, + { STEP16(0,16*2) }, + 16*16*2 +}; + static GFXDECODE_START( gfx_taitof2 ) GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_lsb, 0, 256 ) /* sprites */ GFXDECODE_ENTRY( "tc0100scn_1", 0, gfx_8x8x4_packed_msb, 0, 256 ) /* playfield */ GFXDECODE_END +static GFXDECODE_START( gfx_finalb ) + GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_lsb, 0, 256 ) // low 4bpp of 6bpp sprites + GFXDECODE_ENTRY( "tc0100scn_1", 0, gfx_8x8x4_packed_msb, 0, 256 ) /* playfield */ + GFXDECODE_ENTRY( "sprites_hi", 0, layout_6bpp_hi, 0, 256 ) // hi 2bpp of 6bpp sprites +GFXDECODE_END + static GFXDECODE_START( gfx_thundfox ) GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_lsb, 0, 256 ) /* sprites */ GFXDECODE_ENTRY( "tc0100scn_1", 0, gfx_8x8x4_packed_msb, 0, 256 ) /* playfield */ @@ -2708,8 +2725,7 @@ static GFXDECODE_START( gfx_yuyugogo ) GFXDECODE_END static GFXDECODE_START( gfx_deadconx ) - GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_lsb, 0, 256 ) /* sprites */ - GFXDECODE_ENTRY( "tc0480scp", 0, gfx_16x16x4_packed_lsb, 0, 256 ) /* playfield */ + GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_lsb, 0, 256 ) /* sprites */ GFXDECODE_END static const gfx_layout footchmpbl_tilelayout = @@ -2723,22 +2739,8 @@ static const gfx_layout footchmpbl_tilelayout = 16*16 /* every sprite takes 128 consecutive bytes */ }; -static const gfx_layout footchmpbl_charlayout = -{ - 8,8, /* 16*16 sprites */ - 256, /* the ROMs are mostly empty */ - 4, /* 4 bits per pixel */ - { RGN_FRAC(0,4), RGN_FRAC(1,4),RGN_FRAC(2,4),RGN_FRAC(3,4) }, - { STEP8(0,1) }, - { STEP8(0,8) }, - 8*8 /* every sprite takes 128 consecutive bytes */ -}; - static GFXDECODE_START( gfx_footchmpbl ) - GFXDECODE_ENTRY( "sprites", 0, footchmpbl_tilelayout, 0, 256 ) /* sprites */ - GFXDECODE_ENTRY( "tc0480scp", 0, footchmpbl_tilelayout, 0, 256 ) /* playfield */ - GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_charlayout, 0, 256 ) // gets wiped out by the dynamic decode atm - GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_charlayout, 0, 256 ) // bootleg should clearly use this instead of the uploaded tiles + GFXDECODE_ENTRY( "sprites", 0, footchmpbl_tilelayout, 0, 256 ) /* sprites */ GFXDECODE_END @@ -2871,7 +2873,7 @@ void taitof2_state::finalb(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &taitof2_state::finalb_map); /* video hardware */ - m_gfxdecode->set_info(gfx_taitof2); + m_gfxdecode->set_info(gfx_finalb); MCFG_VIDEO_START_OVERRIDE(taitof2_state,finalb) m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed)); @@ -3151,12 +3153,10 @@ void taitof2_state::footchmp(machine_config &config) m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_full_buffer_delayed)); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x1d + 3, 0x08); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_offsets_flip(-1, 0); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0360PRI(config, m_tc0360pri, 0); } @@ -3166,6 +3166,7 @@ void taitof2_state::footchmpbl(machine_config &config) footchmp(config); /* video hardware */ + m_tc0480scp->set_gfxlayout(TC0480SCP_LAYOUT_BOOTLEG); m_gfxdecode->set_info(gfx_footchmpbl); } @@ -3185,12 +3186,10 @@ void taitof2_state::hthero(machine_config &config) TC0360PRI(config, m_tc0360pri, 0); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x33 + 3, -0x04); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_offsets_flip(-1, 0); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); } void taitof2_state::koshien(machine_config &config) @@ -3345,13 +3344,11 @@ void taitof2_state::metalb(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_metalb)); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x32 + 3, -0x04); m_tc0480scp->set_offsets_tx(1, 0); m_tc0480scp->set_offsets_flip(-1, 0); m_tc0480scp->set_col_base(4096); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0360PRI(config, m_tc0360pri, 0); } @@ -3414,12 +3411,10 @@ void taitof2_state::deadconx(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_deadconx)); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x1e + 3, 0x08); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_offsets_flip(-1, 0); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0360PRI(config, m_tc0360pri, 0); } @@ -3437,12 +3432,10 @@ void taitof2_state::deadconxj(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_deadconx)); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x34 + 3, -0x05); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_offsets_flip(-1, 0); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0360PRI(config, m_tc0360pri, 0); } @@ -4750,7 +4743,7 @@ ROM_START( footchmpbl ) ROM_LOAD( "ob14.rom4", 0x180000, 0x80000, CRC(28fcaefa) SHA1(f92a19dc24d5faac57a5934e7001e5b0bf9d847c) ) // ?? more gfx? - should it ignore the uploaded text data and use these? - ROM_REGION( 0x40000, "gfx3", 0 ) /* SCR */ + ROM_REGION( 0x40000, "tc0480scp:textrom", 0 ) /* SCR */ ROM_LOAD( "bk33.rom16", 0x000000, 0x10000, CRC(07a371fe) SHA1(27e7ba4ed7f0868206c9d7ca653322ca73929567) ) ROM_LOAD( "bk32.rom15", 0x010000, 0x10000, CRC(89020973) SHA1(30174e504734a851a016acf0746d726981edb8f1) ) ROM_LOAD( "bk31.rom14", 0x020000, 0x10000, CRC(02a0de4f) SHA1(7446d75608126e3d5693913e5dcb5636ae1e5500) ) @@ -5379,8 +5372,8 @@ ROM_END void taitof2_state::init_finalb() { /* convert from 2bits into 4bits format */ - u8 *gfx_hi = memregion("sprites_hi")->base(); gfx_element *gx0 = m_gfxdecode->gfx(0); + gfx_element *gx1 = m_gfxdecode->gfx(2); // allocate memory for the assembled data u8 *srcdata = auto_alloc_array(machine(), u8, gx0->elements() * gx0->width() * gx0->height()); @@ -5390,29 +5383,28 @@ void taitof2_state::init_finalb() for (int c = 0; c < gx0->elements(); c++) { const u8 *c0base = gx0->get_data(c); + const u8 *c1base = gx1->get_data(c); // loop over height for (int y = 0; y < gx0->height(); y++) { const u8 *c0 = c0base; + const u8 *c1 = c1base; - for (int x = 0; x < gx0->width();) + for (int x = 0; x < gx0->width(); x++) { - u8 hipix = *gfx_hi++; - for (int i = 0; i < 4; i++) - { - *dest++ = (*c0++ & 0xf) | ((hipix << 4) & 0x30); - x++; - hipix >>= 2; - } + u8 hipix = *c1++; + *dest++ = (*c0++ & 0xf) | ((hipix << 4) & 0x30); } c0base += gx0->rowbytes(); + c1base += gx1->rowbytes(); } } gx0->set_raw_layout(srcdata, gx0->width(), gx0->height(), gx0->elements(), 8 * gx0->width(), 8 * gx0->width() * gx0->height()); gx0->set_colors(4096 / 64); gx0->set_granularity(64); + m_gfxdecode->set_gfx(2, nullptr); } void taitof2_state::init_cameltry() diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp index 5ae807cf28f..9610e574786 100644 --- a/src/mame/drivers/taito_z.cpp +++ b/src/mame/drivers/taito_z.cpp @@ -3065,8 +3065,7 @@ static GFXDECODE_START( gfx_chasehq ) GFXDECODE_END static GFXDECODE_START( gfx_dblaxle ) - GFXDECODE_ENTRY( "sprites", 0x0, tile16x8_layout, 0, 256 ) /* sprite parts */ - GFXDECODE_ENTRY( "tc0480scp", 0x0, gfx_16x16x4_packed_lsb, 0, 256 ) /* playfield */ + GFXDECODE_ENTRY( "sprites", 0x0, tile16x8_layout, 0, 256 ) /* sprite parts */ GFXDECODE_END @@ -3746,10 +3745,8 @@ void taitoz_state::dblaxle(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette("palette"); m_tc0480scp->set_offsets(0x1f, 0x08); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0150ROD(config, m_tc0150rod, 0); @@ -3815,10 +3812,8 @@ void taitoz_state::racingb(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette("palette"); m_tc0480scp->set_offsets(0x1f, 0x08); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); TC0150ROD(config, m_tc0150rod, 0); diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp index 813988e3054..9ba9e0ca685 100644 --- a/src/mame/drivers/undrfire.cpp +++ b/src/mame/drivers/undrfire.cpp @@ -497,16 +497,21 @@ static const gfx_layout tile16x16_layout = 16*16 /* every sprite takes 128 consecutive bytes */ }; -static GFXDECODE_START( gfx_undrfire ) - GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 0, 512 ) - GFXDECODE_ENTRY( "tc0480scp", 0x0, gfx_16x16x4_packed_lsb, 0, 512 ) - GFXDECODE_ENTRY( "tc0100scn", 0x0, gfx_8x8x4_packed_msb, 0, 512 ) -GFXDECODE_END +static const gfx_layout layout_scc_6bpp_hi = +{ + 8,8, + RGN_FRAC(1,1), + 2, + { STEP2(0,1) }, + { STEP8(0,2) }, + { STEP8(0,8*2) }, + 8*8*2 +}; -static GFXDECODE_START( gfx_cbombers ) - GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 0, 512 ) - GFXDECODE_ENTRY( "tc0480scp", 0x0, gfx_16x16x4_packed_lsb, 0x1000, 512 ) - GFXDECODE_ENTRY( "tc0100scn", 0x0, gfx_8x8x4_packed_msb, 0, 512 ) +static GFXDECODE_START( gfx_undrfire ) + GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 0, 512 ) + GFXDECODE_ENTRY( "tc0100scn", 0x0, gfx_8x8x4_packed_msb, 0, 512 ) // low 4bpp of 6bpp scc tiles + GFXDECODE_ENTRY( "tc0100scn:hi_gfx", 0x0, layout_scc_6bpp_hi, 0, 512 ) // hi 2bpp of 6bpp scc tiles GFXDECODE_END /*********************************************************** @@ -553,17 +558,15 @@ void undrfire_state::undrfire(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 16384); TC0100SCN(config, m_tc0100scn, 0); - m_tc0100scn->set_gfx_region(2); + m_tc0100scn->set_gfx_region(1); m_tc0100scn->set_offsets(50, 8); m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); m_tc0100scn->set_palette(m_palette); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x24, 0); m_tc0480scp->set_offsets_tx(-1, 0); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ TAITO_EN(config, "taito_en", 0); @@ -610,22 +613,20 @@ void undrfire_state::cbombers(machine_config &config) screen.set_screen_update(FUNC(undrfire_state::screen_update_cbombers)); screen.set_palette(m_palette); - GFXDECODE(config, m_gfxdecode, m_palette, gfx_cbombers); + GFXDECODE(config, m_gfxdecode, m_palette, gfx_undrfire); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 16384); TC0100SCN(config, m_tc0100scn, 0); - m_tc0100scn->set_gfx_region(2); + m_tc0100scn->set_gfx_region(1); m_tc0100scn->set_offsets(50, 8); m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); m_tc0100scn->set_palette(m_palette); TC0480SCP(config, m_tc0480scp, 0); - m_tc0480scp->set_gfx_region(1); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x24, 0); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_col_base(4096); - m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ TAITO_EN(config, "taito_en", 0); @@ -969,8 +970,8 @@ ROM_END void undrfire_state::driver_init() { /* make SCC tile GFX format suitable for gfxdecode */ - u8 *gfx_hi = memregion("tc0100scn:hi_gfx")->base(); - gfx_element *gx0 = m_gfxdecode->gfx(2); + gfx_element *gx0 = m_gfxdecode->gfx(1); + gfx_element *gx1 = m_gfxdecode->gfx(2); // allocate memory for the assembled data u8 *srcdata = auto_alloc_array(machine(), u8, gx0->elements() * gx0->width() * gx0->height()); @@ -980,28 +981,27 @@ void undrfire_state::driver_init() for (int c = 0; c < gx0->elements(); c++) { const u8 *c0base = gx0->get_data(c); + const u8 *c1base = gx1->get_data(c); // loop over height for (int y = 0; y < gx0->height(); y++) { const u8 *c0 = c0base; + const u8 *c1 = c1base; - for (int x = 0; x < gx0->width();) + for (int x = 0; x < gx0->width(); x++) { - u8 hipix = *gfx_hi++; - for (int i = 0; i < 4; i++) - { - *dest++ = (*c0++ & 0xf) | ((hipix >> 2) & 0x30); - x++; - hipix <<= 2; - } + u8 hipix = *c1++; + *dest++ = (*c0++ & 0xf) | ((hipix << 4) & 0x30); } c0base += gx0->rowbytes(); + c1base += gx1->rowbytes(); } } gx0->set_raw_layout(srcdata, gx0->width(), gx0->height(), gx0->elements(), 8 * gx0->width(), 8 * gx0->width() * gx0->height()); gx0->set_granularity(64); + m_gfxdecode->set_gfx(2, nullptr); m_tc0100scn->update_granularity(); } diff --git a/src/mame/video/superchs.cpp b/src/mame/video/superchs.cpp index 455fc781922..352018a83dd 100644 --- a/src/mame/video/superchs.cpp +++ b/src/mame/video/superchs.cpp @@ -81,8 +81,6 @@ void superchs_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, c int zoomy = (data & 0x0001fc00) >> 10; int y = (data & 0x000003ff); - color |= 0x100; - if (!tilenum) continue; flipy = !flipy; diff --git a/src/mame/video/tc0480scp.cpp b/src/mame/video/tc0480scp.cpp index 6324f5a6369..b5cfaa7efff 100644 --- a/src/mame/video/tc0480scp.cpp +++ b/src/mame/video/tc0480scp.cpp @@ -153,19 +153,17 @@ Control registers DEFINE_DEVICE_TYPE(TC0480SCP, tc0480scp_device, "tc0480scp", "Taito TC0480SCP") tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : device_t(mconfig, TC0480SCP, tag, owner, clock), - device_gfx_interface(mconfig, *this), - m_pri_reg(0), - m_dblwidth(0), - m_gfxnum(0), - m_x_offset(0), - m_y_offset(0), - m_text_xoffs(0), - m_text_yoffs(0), - m_flip_xoffs(0), - m_flip_yoffs(0), - m_col_base(0), - m_gfxdecode(*this, finder_base::DUMMY_TAG) + : device_t(mconfig, TC0480SCP, tag, owner, clock) + , device_gfx_interface(mconfig, *this) + , m_pri_reg(0) + , m_dblwidth(0) + , m_x_offset(0) + , m_y_offset(0) + , m_text_xoffs(0) + , m_text_yoffs(0) + , m_flip_xoffs(0) + , m_flip_yoffs(0) + , m_col_base(0) { memset(m_ctrl, 0, sizeof(m_ctrl)); @@ -179,16 +177,61 @@ tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *ta } } +/************************************* + * + * Graphics definitions + * + *************************************/ + +GFXDECODE_MEMBER(tc0480scp_device::gfxinfo_default) + GFXDECODE_DEVICE(DEVICE_SELF, 0, gfx_16x16x4_packed_lsb, 0, 256) +GFXDECODE_END + +static const gfx_layout bootleg_tilelayout = +{ + 16,16, /* 16*16 tiles */ + RGN_FRAC(1,4), + 4, /* 4 bits per pixel */ + { RGN_FRAC(0,4),RGN_FRAC(1,4),RGN_FRAC(2,4),RGN_FRAC(3,4) }, + { STEP16(0,1) }, + { STEP16(0,16) }, + 16*16 /* every tile takes 128 consecutive bytes */ +}; + +static const gfx_layout bootleg_charlayout = +{ + 8,8, /* 8*8 tiles */ + 256, /* the ROMs are mostly empty */ + 4, /* 4 bits per pixel */ + { RGN_FRAC(0,4),RGN_FRAC(1,4),RGN_FRAC(2,4),RGN_FRAC(3,4) }, + { STEP8(0,1) }, + { STEP8(0,8) }, + 8*8 /* every tile takes 8 consecutive bytes */ +}; + +GFXDECODE_MEMBER(tc0480scp_device::gfxinfo_bootleg) + GFXDECODE_DEVICE(DEVICE_SELF, 0, bootleg_tilelayout, 0, 256) + GFXDECODE_DEVICE("textrom", 0, bootleg_charlayout, 0, 64) // bootleg should clearly use this instead of the uploaded tiles +GFXDECODE_END + //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- void tc0480scp_device::device_start() { - if(!m_gfxdecode->started()) - throw device_missing_dependencies(); - - int xd, yd; + switch (m_gfxlayout) + { + case TC0480SCP_LAYOUT_COMMON: + default: + decode_gfx(gfxinfo_default); + break; + case TC0480SCP_LAYOUT_BOOTLEG: + decode_gfx(gfxinfo_bootleg); + gfx(1)->set_colorbase(m_col_base); + break; + } + gfx(0)->set_colorbase(m_col_base); static const gfx_layout tc0480scp_charlayout = { @@ -201,20 +244,19 @@ void tc0480scp_device::device_start() 32*8 /* every sprite takes 32 consecutive bytes */ }; - /* Single width versions */ - m_tilemap[0][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x0000>),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); - m_tilemap[1][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x0800>),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); - m_tilemap[2][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x1000>),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); - m_tilemap[3][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x1800>),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); - m_tilemap[4][0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); + m_tilemap[0][0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x0000>),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); + m_tilemap[1][0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x0800>),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); + m_tilemap[2][0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x1000>),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); + m_tilemap[3][0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x1800>),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); + m_tilemap[4][0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); /* Double width versions */ - m_tilemap[0][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x0000>),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); - m_tilemap[1][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x1000>),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); - m_tilemap[2][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x2000>),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); - m_tilemap[3][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x3000>),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); - m_tilemap[4][1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); + m_tilemap[0][1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x0000>),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); + m_tilemap[1][1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x1000>),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); + m_tilemap[2][1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x2000>),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); + m_tilemap[3][1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_bg_tile_info<0x3000>),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); + m_tilemap[4][1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(tc0480scp_device::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); for (int i = 0; i < 2; i++) { @@ -225,8 +267,8 @@ void tc0480scp_device::device_start() m_tilemap[4][i]->set_transparent_pen(0); } - xd = -m_x_offset; - yd = m_y_offset; + const int xd = -m_x_offset; + const int yd = m_y_offset; /* Metalb and Deadconx have minor screenflip issues: blue planet is off on x axis by 1 and in Deadconx the dark blue screen @@ -274,8 +316,8 @@ void tc0480scp_device::device_start() set_layer_ptrs(); /* create the char set (gfx will then be updated dynamically from RAM) */ - set_gfx(0, std::make_unique(&palette(), tc0480scp_charlayout, (u8 *)&m_ram[0x7000], NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, m_col_base)); //e000 - m_gfxdecode->gfx(m_gfxnum)->set_colorbase(m_col_base); + if (!gfx(1)) + set_gfx(1, std::make_unique(&palette(), tc0480scp_charlayout, (u8 *)&m_ram[0x7000], NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, m_col_base)); //e000 save_item(NAME(m_ram)); save_item(NAME(m_ctrl)); @@ -305,9 +347,9 @@ void tc0480scp_device::device_reset() template TILE_GET_INFO_MEMBER(tc0480scp_device::get_bg_tile_info) { - int code = m_ram[(2 * tile_index) + 1 + Offset] & 0x7fff; - int attr = m_ram[(2 * tile_index) + Offset]; - SET_TILE_INFO_MEMBER(m_gfxnum, + const u32 code = m_ram[(2 * tile_index) + 1 + Offset] & 0x7fff; + const u16 attr = m_ram[(2 * tile_index) + Offset]; + SET_TILE_INFO_MEMBER(0, code, (attr & 0xff), TILE_FLIPYX((attr & 0xc000) >> 14)); @@ -315,8 +357,8 @@ TILE_GET_INFO_MEMBER(tc0480scp_device::get_bg_tile_info) TILE_GET_INFO_MEMBER(tc0480scp_device::get_tx_tile_info) { - int attr = m_ram[0x6000 + tile_index]; //c000 - SET_TILE_INFO_MEMBER(0, + const u16 attr = m_ram[0x6000 + tile_index]; //c000 + SET_TILE_INFO_MEMBER(1, attr & 0xff, ((attr & 0x3f00) >> 8), TILE_FLIPYX((attr & 0xc000) >> 14)); @@ -377,7 +419,8 @@ void tc0480scp_device::ram_w(offs_t offset, u16 data, u16 mem_mask) } else if (offset <= 0x7fff) { - gfx(0)->mark_dirty((offset - 0x7000) / 16); + if (m_gfxlayout != TC0480SCP_LAYOUT_BOOTLEG) + gfx(1)->mark_dirty((offset - 0x7000) / 16); } } diff --git a/src/mame/video/tc0480scp.h b/src/mame/video/tc0480scp.h index d399aa27ac8..5cc5bb9c1eb 100644 --- a/src/mame/video/tc0480scp.h +++ b/src/mame/video/tc0480scp.h @@ -5,14 +5,19 @@ #pragma once +enum +{ + TC0480SCP_LAYOUT_COMMON = 0, // default layout + TC0480SCP_LAYOUT_BOOTLEG // bootleg layout (footchmpbl need this) +}; + class tc0480scp_device : public device_t, public device_gfx_interface { public: tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration - template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } - void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; } + void set_gfxlayout(int gfxlayout) { m_gfxlayout = gfxlayout; } void set_col_base(int col) { m_col_base = col; } void set_offsets(int x_offset, int y_offset) { @@ -68,19 +73,21 @@ private: int m_bgscrolly[4]; int m_pri_reg; + // decoding info + DECLARE_GFXDECODE_MEMBER(gfxinfo_default); + DECLARE_GFXDECODE_MEMBER(gfxinfo_bootleg); + /* We keep two tilemaps for each of the 5 actual tilemaps: one at standard width, one double */ tilemap_t *m_tilemap[5][2]; s32 m_dblwidth; - int m_gfxnum; + int m_gfxlayout; int m_x_offset, m_y_offset; int m_text_xoffs, m_text_yoffs; int m_flip_xoffs, m_flip_yoffs; int m_col_base; - required_device m_gfxdecode; - template TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info);