From c410ceeb2a653872ab18ce37e8a6b28a033d6126 Mon Sep 17 00:00:00 2001 From: David Haywood <28625134+DavidHaywood@users.noreply.github.com> Date: Sun, 18 Jun 2023 16:39:07 +0100 Subject: edevices/stlforce.cpp: Added Mortal Race. (#11341) edevices/edevices.cpp: Added additional video priority modes used by Mortal Race. New working systems --------------- Mortal Race [Museo del Recreativo, David Haywood, ClawGrip] --- src/mame/edevices/edevices.cpp | 19 +++-- src/mame/edevices/mwarr.cpp | 1 + src/mame/edevices/stlforce.cpp | 155 ++++++++++++++++++++++++++++++++++++----- src/mame/mame.lst | 1 + 4 files changed, 155 insertions(+), 21 deletions(-) diff --git a/src/mame/edevices/edevices.cpp b/src/mame/edevices/edevices.cpp index 47859c589ee..13f11d7aa4a 100644 --- a/src/mame/edevices/edevices.cpp +++ b/src/mame/edevices/edevices.cpp @@ -172,9 +172,22 @@ int edevices_device::get_priority(const uint16_t *source) } // the Steel Force type hardware uses an entirely different bit for priority and only appears to have 2 levels +// Mortal Race uses additional priorities int edevices_sforce_device::get_priority(const uint16_t *source) { - return (source[1] & 0x0020) ? 0xc : 0x2; + switch (source[1] & 0x0030) + { + case 0x00: + return 0x02; + case 0x10: + return 0x04; + case 0x20: + return 0x0c; + case 0x30: + return 0x0e; + } + + return 0x00; } void edevices_device::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -190,7 +203,7 @@ void edevices_device::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, if (source[0] & 0x0800) { y = 0x1ff - (source[0] & 0x01ff); - x = (source[3] & 0x3ff) - 9; + x = (source[3] & 0x3ff) - m_spritexoffs; color = source[1] & 0x000f; flipx = source[1] & 0x0200; @@ -200,8 +213,6 @@ void edevices_device::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, pri = get_priority(source); pri_mask = ~((1 << (pri + 1)) - 1); // Above the first "pri" levels - x += m_spritexoffs; - for (i = 0; i <= dy; i++) { gfx->prio_transpen(bitmap, diff --git a/src/mame/edevices/mwarr.cpp b/src/mame/edevices/mwarr.cpp index eb98ca0c8d5..8b3b6c722d8 100644 --- a/src/mame/edevices/mwarr.cpp +++ b/src/mame/edevices/mwarr.cpp @@ -337,6 +337,7 @@ void mwarr_state::mwarr(machine_config &config) m_video->set_spriteram_tag("spriteram"); m_video->set_gfxdecode_tag("gfxdecode"); m_video->set_palette_tag("palette"); + m_video->set_spritexoffset(9); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/edevices/stlforce.cpp b/src/mame/edevices/stlforce.cpp index 5859aa7cd6c..c2479e9a144 100644 --- a/src/mame/edevices/stlforce.cpp +++ b/src/mame/edevices/stlforce.cpp @@ -61,10 +61,13 @@ lev 7 : 0x7c : 0000 0100 - just rte TO DO : - unknown registers - - clipping issues? + - clipping issues? (maybe visible area should just be 384 wide, with glitches expected at edges?) + - layer offsets (need verifying in different situations for each game, might also be based on layer enables?) - priority issues? - same sprites buffer used in Mighty Warriors - clocks don't match on the games? + - in mortalr turning on 'TEST MODE' in Service Mode causes game to use the 8x8 tilemap for some kind of debugging info, but no tiles for it exist + (should it render a corrupt layer or not?) */ @@ -95,8 +98,10 @@ public: { } void stlforce(machine_config &config); + void mortalr(machine_config &config); void program_map(address_map &map); + void mortalr_map(address_map &map); required_device m_maincpu; @@ -153,7 +158,7 @@ void twinbrat_state::oki_bank_w(uint8_t data) void stlforce_state::program_map(address_map &map) { - map(0x000000, 0x03ffff).rom(); + map(0x000000, 0x0fffff).rom(); map(0x100000, 0x1007ff).ram().w("video", FUNC(edevices_device::bg_videoram_w)).share("bg_videoram"); map(0x100800, 0x100fff).ram().w("video", FUNC(edevices_device::mlow_videoram_w)).share("mlow_videoram"); map(0x101000, 0x1017ff).ram().w("video", FUNC(edevices_device::mhigh_videoram_w)).share("mhigh_videoram"); @@ -175,6 +180,13 @@ void stlforce_state::program_map(address_map &map) map(0x410001, 0x410001).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); } +void stlforce_state::mortalr_map(address_map& map) +{ + stlforce_state::program_map(map); + + map(0x120000, 0x12ffff).ram(); // mortal race has piggybacked RAM chips to double RAM capacity +} + void twinbrat_state::program_map(address_map &map) { stlforce_state::program_map(map); @@ -222,18 +234,18 @@ INPUT_PORTS_END static const gfx_layout stlforce_bglayout = { 16,16, - RGN_FRAC(1,4), + RGN_FRAC(1,1), 4, {0,1,2,3}, {12,8,4,0,28,24,20,16,16*32+12,16*32+8,16*32+4,16*32+0,16*32+28,16*32+24,16*32+20,16*32+16}, - {0*32,1*32,2*32,3*32,4*32,5*32,6*32,7*32,8*32,9*32,10*32,11*32,12*32,13*32,14*32,15*32}, + {STEP16(0, 32)}, 32*32 }; static const gfx_layout stlforce_txlayout = { 8,8, - RGN_FRAC(1,4), + RGN_FRAC(1,1), 4, {0,1,2,3}, {12,8,4,0,28,24,20,16}, @@ -246,21 +258,20 @@ static const gfx_layout stlforce_splayout = 16,16, RGN_FRAC(1,4), 4, - {0x040000*3*8,0x040000*2*8,0x040000*1*8,0x040000*0*8}, + {RGN_FRAC(3,4),RGN_FRAC(2,4),RGN_FRAC(1,4),RGN_FRAC(0,4)}, {16*8+7,16*8+6,16*8+5,16*8+4,16*8+3,16*8+2,16*8+1,16*8+0,7,6,5,4,3,2,1,0}, {0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8}, 32*8 }; static GFXDECODE_START( gfx_stlforce ) - GFXDECODE_ENTRY( "sprites", 0, stlforce_splayout, 1024, 16 ) - GFXDECODE_ENTRY( "tiles", 0x180000, stlforce_txlayout, 384, 8 ) - GFXDECODE_ENTRY( "tiles", 0x100000, stlforce_bglayout, 256, 8 ) - GFXDECODE_ENTRY( "tiles", 0x080000, stlforce_bglayout, 128, 8 ) - GFXDECODE_ENTRY( "tiles", 0x000000, stlforce_bglayout, 0, 8 ) + GFXDECODE_ENTRY( "sprites", 0x000000, stlforce_splayout, 1024, 16 ) + GFXDECODE_ENTRY( "txtile", 0x000000, stlforce_txlayout, 384, 8 ) + GFXDECODE_ENTRY( "midhightile", 0x000000, stlforce_bglayout, 256, 8 ) + GFXDECODE_ENTRY( "midlowtile", 0x000000, stlforce_bglayout, 128, 8 ) + GFXDECODE_ENTRY( "bgtile", 0x000000, stlforce_bglayout, 0, 8 ) GFXDECODE_END - void stlforce_state::stlforce(machine_config &config) { // basic machine hardware @@ -294,6 +305,7 @@ void stlforce_state::stlforce(machine_config &config) video.set_spriteram_tag("spriteram"); video.set_gfxdecode_tag("gfxdecode"); video.set_palette_tag("palette"); + video.set_spritexoffset(7); // sound hardware SPEAKER(config, "mono").front_center(); @@ -311,14 +323,22 @@ void twinbrat_state::twinbrat(machine_config &config) subdevice("screen")->set_visarea(3*8, 44*8-1, 0*8, 30*8-1); - subdevice("video")->set_spritexoffset(10); + subdevice("video")->set_spritexoffset(-2); subdevice("oki")->set_clock(XTAL(30'000'000) / 32); // verified on 2 PCBs subdevice("oki")->set_addrmap(0, &twinbrat_state::oki_map); } +void stlforce_state::mortalr(machine_config &config) +{ + stlforce(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &stlforce_state::mortalr_map); +} + + ROM_START( stlforce ) - ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code + ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF ) // 68000 code ROM_LOAD16_BYTE( "stlforce.105", 0x00000, 0x20000, CRC(3ec804ca) SHA1(4efcf3321b7111644ac3ee0a83ad95d0571a4021) ) ROM_LOAD16_BYTE( "stlforce.104", 0x00001, 0x20000, CRC(69b5f429) SHA1(5bd20fad91a22f4d62f85a5190d72dd824ee26a5) ) @@ -328,6 +348,18 @@ ROM_START( stlforce ) ROM_LOAD16_BYTE( "stlforce.u29", 0x100001, 0x080000, CRC(30488f44) SHA1(af0d92d8952ce3cd893ab9569afdda12e17795e7) ) ROM_LOAD16_BYTE( "stlforce.u30", 0x100000, 0x080000, CRC(cf19d43a) SHA1(dc04930548ac5b7e2b74c6041325eac06e773ed5) ) + ROM_REGION( 0x080000, "bgtile", 0 ) + ROM_COPY( "tiles", 0x000000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "midlowtile", 0 ) + ROM_COPY( "tiles", 0x080000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "midhightile", 0 ) + ROM_COPY( "tiles", 0x100000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "txtile", 0 ) + ROM_COPY( "tiles", 0x180000, 0x000000, 0x080000) + ROM_REGION( 0x100000, "sprites", 0 ) // 16x16 ROM_LOAD( "stlforce.u36", 0x00000, 0x40000, CRC(037dfa9f) SHA1(224f5cd1a95d55b065aef5c0bd03b50cabcb619b) ) ROM_LOAD( "stlforce.u31", 0x40000, 0x40000, CRC(305a8eb5) SHA1(3a8d26f8bc4ec2e8246d1c59115e21cad876630d) ) @@ -342,6 +374,49 @@ ROM_START( stlforce ) ROM_LOAD( "eeprom-stlforce.bin", 0x0000, 0x0080, CRC(3fb83951) SHA1(0cbf09751e46f100db847cf0594a4440126a7b6e) ) ROM_END +/* PCB has the following markings ('Steell' typo is correct) + +Elettronica Video Games S.r.l + +Made in Italy Steell Force + +*/ + +ROM_START( mortalr ) + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "2.u105", 0x00000, 0x80000, CRC(550c48e3) SHA1(cdd2a00a6377273c73f37944f1ee6acfb4d41e82) ) + ROM_LOAD16_BYTE( "3.u104", 0x00001, 0x80000, CRC(92fad747) SHA1(0b41f31e2f14607b572ef56751b3cb201cec1bf2) ) + + ROM_REGION( 0x300000, "tiles", ROMREGION_ERASE00 ) // 16x16 bg tiles + // 2 pairs of piggyback ROMs to give double usual capacity + ROM_LOAD16_BYTE( "8_bot.u27", 0x000001, 0x080000, CRC(042297f3) SHA1(08640cb7997d10baae776f377a605fa70499f6ef) ) + ROM_LOAD16_BYTE( "9_bot.u28", 0x000000, 0x080000, CRC(ab330185) SHA1(6403d472499897395e47a05f73e3760ef632ab8a) ) + ROM_LOAD16_BYTE( "12_top.u27", 0x100001, 0x080000, CRC(fa95773c) SHA1(849f3ab4950b34200e3043d849273622e4bdbfa3) ) + ROM_LOAD16_BYTE( "13_top.u28", 0x100000, 0x080000, CRC(f2342348) SHA1(0f197e88a1911715d3b98af9e303fd1f137e5fe3) ) + ROM_LOAD16_BYTE( "10.u29", 0x200001, 0x080000, CRC(fb39b032) SHA1(c2dfb24fccd4b588d92214addee2a9bbb6e45065) ) + ROM_LOAD16_BYTE( "11.u30", 0x200000, 0x080000, CRC(a82f2421) SHA1(b0787decd1b668af5b2ed032947ca5c0ccc020e8) ) + + ROM_REGION( 0x100000, "bgtile", 0 ) + ROM_COPY( "tiles", 0x000000, 0x000000, 0x100000) + + ROM_REGION( 0x100000, "midlowtile", 0 ) + ROM_COPY( "tiles", 0x100000, 0x000000, 0x100000) + + ROM_REGION( 0x100000, "midhightile", 0 ) + ROM_COPY( "tiles", 0x200000, 0x000000, 0x100000) + + ROM_REGION( 0x100000, "txtile", ROMREGION_ERASE00 ) + // no 8x8 tiles present, but layer gets enabled if you turn on the debug mode + + ROM_REGION( 0x200000, "sprites", 0 ) // 16x16 + ROM_LOAD( "4.u36", 0x000000, 0x80000, CRC(6d1e6367) SHA1(4e6d315206b4ebc75abe9cbec1a53a9ca0b29128) ) + ROM_LOAD( "5.u31", 0x080000, 0x80000, CRC(54b223bf) SHA1(43e2a7f1d56f341f08cb04b979c4d930b58c4587) ) + ROM_LOAD( "6.u32", 0x100000, 0x80000, CRC(dab08a04) SHA1(68e26cf52ebf86a6b1e96b35fb86fcafc57c9805) ) + ROM_LOAD( "7.u33", 0x180000, 0x80000, CRC(9a856797) SHA1(265628d3b5c137ae8260ed530b7778496d863fc2) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "1.u1", 0x00000, 0x80000, CRC(e5c730c2) SHA1(a153a204c1452a0c95fe207d750b2df07c5e63f3) ) +ROM_END /* @@ -383,7 +458,7 @@ Notes: ROM_START( twinbrat ) - ROM_REGION( 0x40000, "maincpu", 0 ) // 68000 code + ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF ) // 68000 code ROM_LOAD16_BYTE( "12.u105", 0x00000, 0x20000, CRC(552529b1) SHA1(bf23680335e1c5b05b80ab139609bee9f239b910) ) // higher numbers are newer?? ROM_LOAD16_BYTE( "13.u104", 0x00001, 0x20000, CRC(9805ba90) SHA1(cdc188fa38220d18c60c9f438520ee574e6ce0f7) ) // higher numbers are newer?? @@ -393,6 +468,18 @@ ROM_START( twinbrat ) ROM_LOAD16_BYTE( "4.bin", 0x100000, 0x80000, CRC(1ae8a751) SHA1(5f30306580c6ab4af0ddbdc4519eb4e0ab9bd23a) ) ROM_LOAD16_BYTE( "5.bin", 0x100001, 0x80000, CRC(cf235eeb) SHA1(d067e2dd4f28a8986dd76ec0eba90e1adbf5787c) ) + ROM_REGION( 0x080000, "bgtile", 0 ) + ROM_COPY( "tiles", 0x000000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "midlowtile", 0 ) + ROM_COPY( "tiles", 0x080000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "midhightile", 0 ) + ROM_COPY( "tiles", 0x100000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "txtile", 0 ) + ROM_COPY( "tiles", 0x180000, 0x000000, 0x080000) + ROM_REGION( 0x100000, "sprites", 0 ) ROM_LOAD( "11.bin", 0x000000, 0x40000, CRC(00eecb03) SHA1(5913da4d2ad97c1ce5e8e601a22b499cd93af744) ) ROM_LOAD( "10.bin", 0x040000, 0x40000, CRC(7556bee9) SHA1(3fe99c7e9378791b79c43b04f5d0a36404448beb) ) @@ -407,7 +494,7 @@ ROM_START( twinbrat ) ROM_END ROM_START( twinbrata ) - ROM_REGION( 0x40000, "maincpu", 0 ) // 68000 code + ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF ) // 68000 code ROM_LOAD16_BYTE( "2.u105", 0x00000, 0x20000, CRC(33a9bb82) SHA1(0f54239397c93e264b9b211f67bf626acf1246a9) ) ROM_LOAD16_BYTE( "3.u104", 0x00001, 0x20000, CRC(b1186a67) SHA1(502074063101885874db76ae707db1082313efcf) ) @@ -417,6 +504,22 @@ ROM_START( twinbrata ) ROM_LOAD16_BYTE( "4.bin", 0x100000, 0x80000, CRC(1ae8a751) SHA1(5f30306580c6ab4af0ddbdc4519eb4e0ab9bd23a) ) ROM_LOAD16_BYTE( "5.bin", 0x100001, 0x80000, CRC(cf235eeb) SHA1(d067e2dd4f28a8986dd76ec0eba90e1adbf5787c) ) + ROM_REGION( 0x080000, "bgtile", 0 ) + ROM_COPY( "tiles", 0x000000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "midlowtile", 0 ) + ROM_COPY( "tiles", 0x080000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "midhightile", 0 ) + ROM_COPY( "tiles", 0x100000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "txtile", 0 ) + ROM_COPY( "tiles", 0x180000, 0x000000, 0x080000) + + ROM_REGION( 0x100000, "tiles2", 0 ) + ROM_LOAD16_BYTE( "4.bin", 0x000000, 0x80000, CRC(1ae8a751) SHA1(5f30306580c6ab4af0ddbdc4519eb4e0ab9bd23a) ) + ROM_LOAD16_BYTE( "5.bin", 0x000001, 0x80000, CRC(cf235eeb) SHA1(d067e2dd4f28a8986dd76ec0eba90e1adbf5787c) ) + ROM_REGION( 0x100000, "sprites", 0 ) ROM_LOAD( "11.bin", 0x000000, 0x40000, CRC(00eecb03) SHA1(5913da4d2ad97c1ce5e8e601a22b499cd93af744) ) ROM_LOAD( "10.bin", 0x040000, 0x40000, CRC(7556bee9) SHA1(3fe99c7e9378791b79c43b04f5d0a36404448beb) ) @@ -431,7 +534,7 @@ ROM_START( twinbrata ) ROM_END ROM_START( twinbratb ) - ROM_REGION( 0x40000, "maincpu", 0 ) // 68000 code + ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF ) // 68000 code ROM_LOAD16_BYTE( "2.bin", 0x00000, 0x20000, CRC(5e75f568) SHA1(f42d2a73d737e6b01dd049eea2a10fc8c8096d8f) ) ROM_LOAD16_BYTE( "3.bin", 0x00001, 0x20000, CRC(0e3fa9b0) SHA1(0148cc616eac84dc16415e1557ec6040d14392d4) ) @@ -441,6 +544,22 @@ ROM_START( twinbratb ) ROM_LOAD16_BYTE( "4.bin", 0x100000, 0x80000, CRC(1ae8a751) SHA1(5f30306580c6ab4af0ddbdc4519eb4e0ab9bd23a) ) ROM_LOAD16_BYTE( "5.bin", 0x100001, 0x80000, CRC(cf235eeb) SHA1(d067e2dd4f28a8986dd76ec0eba90e1adbf5787c) ) + ROM_REGION( 0x080000, "bgtile", 0 ) + ROM_COPY( "tiles", 0x000000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "midlowtile", 0 ) + ROM_COPY( "tiles", 0x080000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "midhightile", 0 ) + ROM_COPY( "tiles", 0x100000, 0x000000, 0x080000) + + ROM_REGION( 0x080000, "txtile", 0 ) + ROM_COPY( "tiles", 0x180000, 0x000000, 0x080000) + + ROM_REGION( 0x100000, "tiles2", 0 ) + ROM_LOAD16_BYTE( "4.bin", 0x000000, 0x80000, CRC(1ae8a751) SHA1(5f30306580c6ab4af0ddbdc4519eb4e0ab9bd23a) ) + ROM_LOAD16_BYTE( "5.bin", 0x000001, 0x80000, CRC(cf235eeb) SHA1(d067e2dd4f28a8986dd76ec0eba90e1adbf5787c) ) + ROM_REGION( 0x100000, "sprites", 0 ) ROM_LOAD( "11.bin", 0x000000, 0x40000, CRC(00eecb03) SHA1(5913da4d2ad97c1ce5e8e601a22b499cd93af744) ) ROM_LOAD( "10.bin", 0x040000, 0x40000, CRC(7556bee9) SHA1(3fe99c7e9378791b79c43b04f5d0a36404448beb) ) @@ -459,6 +578,8 @@ ROM_END GAME( 1994, stlforce, 0, stlforce, stlforce, stlforce_state, empty_init, ROT0, "Electronic Devices Italy / Ecogames S.L. Spain", "Steel Force", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, mortalr, 0, mortalr, stlforce, stlforce_state, empty_init, ROT0, "New Dream Games", "Mortal Race", MACHINE_SUPPORTS_SAVE ) // based on the same rough codebase as Top Driving tch/topdrive.cpp but not the same game, so not a clone + GAME( 1995, twinbrat, 0, twinbrat, stlforce, twinbrat_state, empty_init, ROT0, "Elettronica Video-Games S.R.L.", "Twin Brats (set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, twinbrata, twinbrat, twinbrat, stlforce, twinbrat_state, empty_init, ROT0, "Elettronica Video-Games S.R.L.", "Twin Brats (set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, twinbratb, twinbrat, twinbrat, stlforce, twinbrat_state, empty_init, ROT0, "Elettronica Video-Games S.R.L.", "Twin Brats (set 3)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 7f483578429..d201bebd255 100755 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -17308,6 +17308,7 @@ ppmast93 // (c) 1993 Electronic Devices S.R.L. pzletime // @source:edevices/stlforce.cpp +mortalr stlforce // (c) 1994 Electronic Devices (Italy) / Ecogames S.L. (Spain) twinbrat // (c) 1995 twinbrata // (c) 1995 -- cgit v1.2.3