New working clones

------------------
Rail Chase (Japan, Rev B) [CoolMod, The Dumping Union]
Run Run (Do! Run Run bootleg) [Bisboch]

- unico/unico.cpp: consolidated driver in single file
This commit is contained in:
Ivan Vangelista 2024-03-04 18:12:55 +01:00
parent 9d332ed7be
commit 3c3bfa7883
7 changed files with 651 additions and 636 deletions

View File

@ -55,20 +55,11 @@ public:
}
void attack(machine_config &config);
void deathrac(machine_config &config);
void destdrby(machine_config &config);
private:
// devices
required_device<netlist_mame_device> m_maincpu;
required_device<fixedfreq_device> m_video;
// driver_device overrides
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
};
@ -86,20 +77,6 @@ static NETLIST_START(attack)
}
void exidyttl_state::machine_start()
{
}
void exidyttl_state::machine_reset()
{
}
void exidyttl_state::video_start()
{
}
void exidyttl_state::attack(machine_config &config)
{
/* basic machine hardware */
@ -115,25 +92,6 @@ void exidyttl_state::attack(machine_config &config)
m_video->set_threshold(0.30);
}
void exidyttl_state::destdrby(machine_config &config)
{
/* basic machine hardware */
NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_attack);
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
FIXFREQ(config, m_video).set_screen("screen");
m_video->set_monitor_clock(MASTER_CLOCK);
m_video->set_horz_params(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL);
m_video->set_vert_params(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL);
m_video->set_fieldcount(1);
m_video->set_threshold(0.30);
}
void exidyttl_state::deathrac(machine_config& config)
{
destdrby(config);
}
/***************************************************************************
@ -154,7 +112,7 @@ ROM_START( attckexd )
ROM_LOAD( "attack.k6", 0x0000, 0x0100, CRC(e120839f) SHA1(74dc19a732238d35e467d814ead581a60463aaa2) )
ROM_END
ROM_START( attckexd2 ) // These are likely an overdump, but we are waiting for confirmation before removing the files
ROM_START( attckexd2 ) // These are likely an overdump, but confirmation is needed before removing the files
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_REGION( 0x0400, "roms", ROMREGION_ERASE00 )
@ -254,24 +212,24 @@ ROM_START( deathrac )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_REGION( 0x0400, "roms", ROMREGION_ERASE00 )
ROM_LOAD( "6331-31.a11", 0x0000, 0x0020, CRC(f304a1fb) SHA1(0f029274bb99723ebcc271d761e1500ca50b2738) )
ROM_LOAD( "6331-32.c12", 0x0000, 0x0020, CRC(f8dbd779) SHA1(55bdaf9eb1ba6185e20512c4874ebb625861508e) )
ROM_LOAD( "6331-33.p14", 0x0000, 0x0020, CRC(2e83bf80) SHA1(02fcc1e879c06759a21ef4f004fe7aa790814112) )
ROM_LOAD( "6331-31.11a", 0x0000, 0x0020, CRC(f304a1fb) SHA1(0f029274bb99723ebcc271d761e1500ca50b2738) )
ROM_LOAD( "6331-32.12c", 0x0000, 0x0020, CRC(f8dbd779) SHA1(55bdaf9eb1ba6185e20512c4874ebb625861508e) )
ROM_LOAD( "6331-33.14p", 0x0000, 0x0020, CRC(2e83bf80) SHA1(02fcc1e879c06759a21ef4f004fe7aa790814112) )
// Note: Image for 36 has all zeros in the second half, which is unused. This is verified correct from a real board.
// Other roms in this series (34,35) all have duplicate content in the second half
ROM_LOAD( "6331-36.e7", 0x0000, 0x0020, CRC(bb743b79) SHA1(8eb73782bcea7dbba7b75db32307e562248691bb) )
ROM_LOAD( "6331-35.g7", 0x0000, 0x0020, CRC(5ed8cdd2) SHA1(d193d819ad634c43d648ce49073799b4df6dfd2f) )
ROM_LOAD( "6331-36.r7", 0x0000, 0x0020, CRC(bb743b79) SHA1(8eb73782bcea7dbba7b75db32307e562248691bb) )
ROM_LOAD( "6331-35.t7", 0x0000, 0x0020, CRC(5ed8cdd2) SHA1(d193d819ad634c43d648ce49073799b4df6dfd2f) )
// Other ROMs in this series (34,35) all have duplicate content in the second half
ROM_LOAD( "6331-36.7e", 0x0000, 0x0020, CRC(bb743b79) SHA1(8eb73782bcea7dbba7b75db32307e562248691bb) )
ROM_LOAD( "6331-35.7g", 0x0000, 0x0020, CRC(5ed8cdd2) SHA1(d193d819ad634c43d648ce49073799b4df6dfd2f) )
ROM_LOAD( "6331-36.7r", 0x0000, 0x0020, CRC(bb743b79) SHA1(8eb73782bcea7dbba7b75db32307e562248691bb) )
ROM_LOAD( "6331-35.7t", 0x0000, 0x0020, CRC(5ed8cdd2) SHA1(d193d819ad634c43d648ce49073799b4df6dfd2f) )
ROM_LOAD( "6301-91.j10", 0x0000, 0x0100, CRC(c3823f0b) SHA1(42fe8c1e0f54b3f968a630dd564a8941410c5d86) )
ROM_LOAD( "6301-91.v10", 0x0000, 0x0100, CRC(c3823f0b) SHA1(42fe8c1e0f54b3f968a630dd564a8941410c5d86) )
ROM_LOAD( "6301-92.j5", 0x0000, 0x0100, CRC(82d7d25f) SHA1(d4b3a6655f91647545d493c2ff996daa66df0395) )
ROM_LOAD( "6301-92.v5", 0x0000, 0x0100, CRC(82d7d25f) SHA1(d4b3a6655f91647545d493c2ff996daa66df0395) )
ROM_LOAD( "6301-97.m11", 0x0000, 0x0100, CRC(2b02444f) SHA1(e1fc01f7271109515438542a223efc0042f794a5) )
ROM_LOAD( "6301-98.l11", 0x0000, 0x0100, CRC(0bdaf1eb) SHA1(67976e73bfdc4d42a520212d020dd52d51667674) )
ROM_LOAD( "6301-99.k11", 0x0000, 0x0100, CRC(34763c8f) SHA1(2012ace666e8b82a89a0c15511ee80173d9700bc) )
ROM_LOAD( "6301-100.j11", 0x0000, 0x0100, CRC(d751bd57) SHA1(a6208af40661bf3cd50363d2ece38cd3b9f6a7a0) )
ROM_LOAD( "6301-91.10j", 0x0000, 0x0100, CRC(c3823f0b) SHA1(42fe8c1e0f54b3f968a630dd564a8941410c5d86) )
ROM_LOAD( "6301-91.10v", 0x0000, 0x0100, CRC(c3823f0b) SHA1(42fe8c1e0f54b3f968a630dd564a8941410c5d86) )
ROM_LOAD( "6301-92.5j", 0x0000, 0x0100, CRC(82d7d25f) SHA1(d4b3a6655f91647545d493c2ff996daa66df0395) )
ROM_LOAD( "6301-92.5v", 0x0000, 0x0100, CRC(82d7d25f) SHA1(d4b3a6655f91647545d493c2ff996daa66df0395) )
ROM_LOAD( "6301-97.11m", 0x0000, 0x0100, CRC(2b02444f) SHA1(e1fc01f7271109515438542a223efc0042f794a5) )
ROM_LOAD( "6301-98.11l", 0x0000, 0x0100, CRC(0bdaf1eb) SHA1(67976e73bfdc4d42a520212d020dd52d51667674) )
ROM_LOAD( "6301-99.11k", 0x0000, 0x0100, CRC(34763c8f) SHA1(2012ace666e8b82a89a0c15511ee80173d9700bc) )
ROM_LOAD( "6301-100.11j", 0x0000, 0x0100, CRC(d751bd57) SHA1(a6208af40661bf3cd50363d2ece38cd3b9f6a7a0) )
ROM_END
#define rom_rhunting rom_deathrac
@ -279,8 +237,8 @@ ROM_END
} // anonymous namespace
GAME( 1977, attckexd, 0, attack, 0, exidyttl_state, empty_init, ROT0, "Exidy", "Attack (set 1) [TTL]", MACHINE_IS_SKELETON )
GAME( 1977, attckexd2, attckexd, attack, 0, exidyttl_state, empty_init, ROT0, "Exidy", "Attack (set 2) [TTL]", MACHINE_IS_SKELETON )
GAME( 1976, deathrac, 0, deathrac, 0, exidyttl_state, empty_init, ROT0, "Exidy", "Death Race [TTL]", MACHINE_IS_SKELETON )
GAME( 1976, destdrby, 0, destdrby, 0, exidyttl_state, empty_init, ROT0, "Exidy", "Destruction Derby [TTL]", MACHINE_IS_SKELETON)
GAME( 1976, rhunting, deathrac, deathrac, 0, exidyttl_state, empty_init, ROT0, "bootleg", "Robot Hunting (bootleg of Death Race) [TTL]",MACHINE_IS_SKELETON )
GAME( 1977, attckexd, 0, attack, 0, exidyttl_state, empty_init, ROT0, "Exidy", "Attack (set 1) [TTL]", MACHINE_IS_SKELETON )
GAME( 1977, attckexd2, attckexd, attack, 0, exidyttl_state, empty_init, ROT0, "Exidy", "Attack (set 2) [TTL]", MACHINE_IS_SKELETON )
GAME( 1976, deathrac, 0, attack, 0, exidyttl_state, empty_init, ROT0, "Exidy", "Death Race [TTL]", MACHINE_IS_SKELETON )
GAME( 1976, destdrby, 0, attack, 0, exidyttl_state, empty_init, ROT0, "Exidy", "Destruction Derby [TTL]", MACHINE_IS_SKELETON)
GAME( 1976, rhunting, deathrac, attack, 0, exidyttl_state, empty_init, ROT0, "bootleg", "Robot Hunting (bootleg of Death Race) [TTL]",MACHINE_IS_SKELETON )

View File

@ -40164,6 +40164,7 @@ pdriftj // 1988.09 Power Drift (Japan)
pdriftl //
rchase // 1991.09 Rail Chase (World)
rchasej // 1991.09 Rail Chase (Japan)
rchasejb // 1991.09 Rail Chase (Japan)
strkfgtr // 1991.06 Strike Fighter (World)
strkfgtrj // 1991.06 Strike Fighter (Japan)
@ -45334,6 +45335,7 @@ idsoccera // ???? (c) 1985
idsoccert // 8461A (c) 1985
jjack // ???? (c) 1984
kickridr // ???? (c) 1984
runrun // bootleg
spiero // ???? (c) 1987
@source:universal/getaway.cpp

View File

@ -2744,6 +2744,62 @@ ROM_START( rchasej )
ROM_LOAD( "mpr-13994.105", 0x100000, 0x80000, CRC(76095538) SHA1(aab830e3675116c475fe69e0e991118c045b131b) )
ROM_END
ROM_START( rchasejb ) // only the "suby" CPU ROMs were updated (?)
ROM_REGION( 0x080000, "maincpu", 0 ) // M
ROM_LOAD16_BYTE( "epr-13986.25", 0x000000, 0x20000, CRC(388b2365) SHA1(0f006f9120b96b8d8be968878ce1d6dd853cd977) )
ROM_LOAD16_BYTE( "epr-13985.24", 0x000001, 0x20000, CRC(14dba5d4) SHA1(ad09c55273ab1105630f2f76019aedc234fb9292) )
ROM_LOAD16_BYTE( "epr-13988.27", 0x040000, 0x20000, CRC(dc1cd5a4) SHA1(3b2b6afbeb7daa7c0cc75279bc495221c2508e25) )
ROM_LOAD16_BYTE( "epr-13987.26", 0x040001, 0x20000, CRC(43be9e60) SHA1(107a9c126c2bff9030fe621f6b4ab8f29c994ef2) )
ROM_REGION( 0x040000, "subx", 0 ) // X
ROM_LOAD16_BYTE( "epr-13992a.81", 0x000000, 0x20000, CRC(c5d525b6) SHA1(1fab7f761be67b67ee346a1af1f1fe12aef87dc5) )
ROM_LOAD16_BYTE( "epr-13991a.80", 0x000001, 0x20000, CRC(299e3c7c) SHA1(e4903816ec364e9352abd1180e8a609fed75e1a7) )
ROM_REGION( 0x040000, "suby", 0 ) // Y
ROM_LOAD16_BYTE( "epr-13990b.54", 0x000000, 0x20000, CRC(eeffbeeb) SHA1(5f2f808cd37158d14dd2e4a0a68a41514d3954fb) )
ROM_LOAD16_BYTE( "epr-13989b.53", 0x000001, 0x20000, CRC(fea9f1e9) SHA1(54daad8bf25b17c494615fd4ec619d9693d85ba0) )
ROM_REGION16_BE( 0x080000, "bsprites", 0 )
ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) )
ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) )
ROM_REGION64_BE( 0xc00000, "ysprites", 0)
ROM_LOAD64_BYTE( "mpr-14021.67", 0x000000, 0x80000, CRC(9fa88781) SHA1(a035fd0fe1d37a589adf3a5029c20d237d5cc827) )
ROM_LOAD64_BYTE( "mpr-14022.75", 0x000001, 0x80000, CRC(49e824bb) SHA1(c1330719b5718aa664b5788244d8cb7b7103a57c) )
ROM_LOAD64_BYTE( "mpr-14009.63", 0x000002, 0x80000, CRC(35b5187e) SHA1(6f0f6471c4135d07a2c852cdc50322b99176712e) )
ROM_LOAD64_BYTE( "mpr-14010.71", 0x000003, 0x80000, CRC(9a538b9b) SHA1(cd84a39bd3858fa6c1d8eb4a349d939261cea6b6) )
ROM_LOAD64_BYTE( "mpr-14023.86", 0x000004, 0x80000, CRC(e11c6c67) SHA1(839e71690e75e47d11b758f5b525452bcc75b823) )
ROM_LOAD64_BYTE( "mpr-14024.114", 0x000005, 0x80000, CRC(16344535) SHA1(a9bd101ae93c24a2e8002ad6a111cf0d0d3b1a64) )
ROM_LOAD64_BYTE( "mpr-14011.82", 0x000006, 0x80000, CRC(78e9983b) SHA1(c0f6577b55acda2cc8cdf0884d5c0517f79de4e9) )
ROM_LOAD64_BYTE( "mpr-14012.110", 0x000007, 0x80000, CRC(e9daa1a4) SHA1(24ad782e88a586fbb31f7ad86be4cdeb38823102) )
ROM_LOAD64_BYTE( "mpr-14017.66", 0x400000, 0x80000, CRC(b83df159) SHA1(f0cf99e6ddae1d26fd68240a731f3e28e9c6073b) )
ROM_LOAD64_BYTE( "mpr-14018.74", 0x400001, 0x80000, CRC(76dbe9ce) SHA1(2f5af8d015cf8fb90a0862bc37235bc20d4dac0d) )
ROM_LOAD64_BYTE( "mpr-14005.62", 0x400002, 0x80000, CRC(9e998209) SHA1(c0d39d11d554fd6a43db77ccf96ac04dd634edff) )
ROM_LOAD64_BYTE( "mpr-14006.70", 0x400003, 0x80000, CRC(2caddf1a) SHA1(a2e891e65c7cd156a3131a084ff51ae9b1663bc0) )
ROM_LOAD64_BYTE( "mpr-14019.85", 0x400004, 0x80000, CRC(b15e19ff) SHA1(947c35301875b4842835f2ba6aca216f087a3fc7) )
ROM_LOAD64_BYTE( "mpr-14020.113", 0x400005, 0x80000, CRC(84c7008f) SHA1(b92f3c636c5d91c5b1c6090a48be7bb1be6b927e) )
ROM_LOAD64_BYTE( "mpr-14007.81", 0x400006, 0x80000, CRC(c3cf5faa) SHA1(02bca1b248fcb6313cd529ca2aa0f7516177166b) )
ROM_LOAD64_BYTE( "mpr-14008.109", 0x400007, 0x80000, CRC(7e91beb2) SHA1(bc1a7ce68d6b825daf93ca437dda803857cee0a2) )
ROM_LOAD64_BYTE( "mpr-14013.65", 0x800000, 0x80000, CRC(31dbb2c3) SHA1(3efeff785d78056e2615dc2267f7bb80a6d4c663) )
ROM_LOAD64_BYTE( "mpr-14014.73", 0x800001, 0x80000, CRC(7e68257d) SHA1(600d1066cfa83f5df46e240a473a8f04179e70f8) )
ROM_LOAD64_BYTE( "mpr-14001.61", 0x800002, 0x80000, CRC(71031ad0) SHA1(02b6240461d66907199f846310e72d37faa5fb50) )
ROM_LOAD64_BYTE( "mpr-14002.69", 0x800003, 0x80000, CRC(27e70a5e) SHA1(fa767f6cc8e46c0e804c37666a8499376c09b025) )
ROM_LOAD64_BYTE( "mpr-14015.84", 0x800004, 0x80000, CRC(7540bf85) SHA1(e8f9208aea6ecedb6ae810a362476cdf1d424319) )
ROM_LOAD64_BYTE( "mpr-14016.112", 0x800005, 0x80000, CRC(7d87b94d) SHA1(4ef5b7b114c25b9e274e3f3dd7e3d7bd29d2d8b9) )
ROM_LOAD64_BYTE( "mpr-14003.80", 0x800006, 0x80000, CRC(87725d74) SHA1(d284512ad15362a886072aaa1a3af98f7a0bddf9) )
ROM_LOAD64_BYTE( "mpr-14004.108", 0x800007, 0x80000, CRC(73477291) SHA1(1fe9d7666d89ee55a0178dceb7cfea7ce94b9e18) )
ROM_REGION( 0x10000, "soundcpu", 0 ) // Z80 sound CPU
ROM_LOAD( "epr-13993.102", 0x000000, 0x10000, CRC(7cc3b543) SHA1(c5e6a2dca891d0b6528e6d66ccd18b24ed4a9464) )
ROM_REGION( 0x200000, "pcm", ROMREGION_ERASEFF ) // SegaPCM samples
ROM_LOAD( "mpr-13996.107", 0x000000, 0x80000, CRC(345f5a41) SHA1(d414c3485ba31863c2b36282756709e06a41d262) )
ROM_LOAD( "mpr-13995.106", 0x080000, 0x80000, CRC(f604c270) SHA1(02023786fec2f2702c2f19f51aff5b7e4928ae91) )
ROM_LOAD( "mpr-13994.105", 0x100000, 0x80000, CRC(76095538) SHA1(aab830e3675116c475fe69e0e991118c045b131b) )
ROM_END
//*************************************************************************************************************************
//*************************************************************************************************************************
@ -2983,6 +3039,7 @@ GAMEL(1988, pdriftl, 0, yboard_link, pdriftl, segaybd_state, init_pd
GAME( 1991, rchase, 0, yboard, rchase, segaybd_state, init_rchase, ROT0, "Sega", "Rail Chase (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, rchasej, rchase, yboard, rchase, segaybd_state, init_rchase, ROT0, "Sega", "Rail Chase (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, rchasejb, rchase, yboard, rchase, segaybd_state, init_rchase, ROT0, "Sega", "Rail Chase (Japan, Rev B)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, strkfgtr, 0, yboard, strkfgtr, segaybd_state, init_gloc, ROT0, "Sega", "Strike Fighter (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, strkfgtrj, strkfgtr, yboard, strkfgtr, segaybd_state, init_gloc, ROT0, "Sega", "Strike Fighter (Japan)", MACHINE_SUPPORTS_SAVE )

File diff suppressed because it is too large Load Diff

View File

@ -1,126 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Luca Elia
#ifndef MAME_UNICO_UNICO_H
#define MAME_UNICO_UNICO_H
#pragma once
#include "sound/okim6295.h"
#include "machine/eepromser.h"
#include "emupal.h"
#include "screen.h"
#include "tilemap.h"
class unico_state : public driver_device
{
public:
unico_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette"),
m_gfxdecode(*this, "gfxdecode"),
m_oki(*this, "oki"),
m_leds(*this, "led%u", 0U),
m_vram(*this, "vram", 0xc000, ENDIANNESS_BIG),
m_scroll(*this, "scroll", 22, ENDIANNESS_BIG),
m_spriteram(*this, "spriteram", 0x800, ENDIANNESS_BIG)
{ }
void burglarx(machine_config &config);
protected:
static rgb_t unico_R6G6B6X(uint32_t raw);
uint16_t vram_r(offs_t offset);
void vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
uint16_t scroll_r(offs_t offset);
void scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
uint16_t spriteram_r(offs_t offset);
void spriteram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void burglarx_okibank_w(uint8_t data);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect);
void burglarx_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
required_device<gfxdecode_device> m_gfxdecode;
optional_device<okim6295_device> m_oki;
output_finder<2> m_leds;
private:
memory_share_creator<uint16_t> m_vram;
memory_share_creator<uint16_t> m_scroll;
tilemap_t *m_tilemap[3]{};
int m_sprites_scrolldx = 0;
int m_sprites_scrolldy = 0;
memory_share_creator<uint16_t> m_spriteram;
};
class zeropnt_state : public unico_state
{
public:
zeropnt_state(const machine_config &mconfig, device_type type, const char *tag) :
unico_state(mconfig, type, tag),
m_okibank(*this, "okibank"),
m_screen(*this, "screen"),
m_gun_axes(*this, { "Y0", "X0", "Y1", "X1" })
{ }
void zeropnt(machine_config &config);
protected:
virtual void machine_start() override;
void zeropnt_okibank_leds_w(uint8_t data);
uint16_t gunx_0_msb_r();
uint16_t guny_0_msb_r();
uint16_t gunx_1_msb_r();
uint16_t guny_1_msb_r();
required_memory_bank m_okibank;
required_device<screen_device> m_screen;
void zeropnt_map(address_map &map);
void zeropnt_oki_map(address_map &map);
private:
enum { Y0, X0, Y1, X1 }; // gun axis indices
required_ioport_array<4> m_gun_axes;
};
class zeropnt2_state : public zeropnt_state
{
public:
zeropnt2_state(const machine_config &mconfig, device_type type, const char *tag) :
zeropnt_state(mconfig, type, tag),
m_eeprom(*this, "eeprom")
{ }
void zeropnt2(machine_config &config);
protected:
virtual void machine_start() override;
uint32_t zeropnt2_gunx_0_msb_r();
uint32_t zeropnt2_guny_0_msb_r();
uint32_t zeropnt2_gunx_1_msb_r();
uint32_t zeropnt2_guny_1_msb_r();
void zeropnt2_okibank(uint8_t data);
void leds_w(uint8_t data);
void eeprom_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
void zeropnt2_map(address_map &map);
private:
required_device<eeprom_serial_93cxx_device> m_eeprom;
};
#endif // MAME_UNICO_UNICO_H

View File

@ -1,269 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Luca Elia
/***************************************************************************
-= Unico Games =-
driver by Luca Elia (l.elia@tin.it)
Note: if MAME_DEBUG is defined, pressing Z with:
Q / W / E Shows Layer 0 / 1 / 2
A Shows Sprites
Keys can be used together!
[ 3 Scrolling Layers ]
Tile Size: 16 x 16 x 8
Layer Size (tiles): 64 x 64
[ 512 Sprites ]
Sprites are made of 16 x 16 x 8 tiles. Size can vary from 1 to
16 tiles horizontally, while their height is always 1 tile.
There seems to be 4 levels of priority (wrt layers) for each
sprite, following this simple scheme:
[if we denote the three layers with 0-3 (0 being the backmost)
and the sprite with S]
Sprite Priority Order (back -> front)
0 S 0 1 2
1 0 S 1 2
2 0 1 S 2
3 0 1 2 S
***************************************************************************/
#include "emu.h"
#include "unico.h"
/***************************************************************************
Palette
Byte: 0 1 2 3
Gun: R G B 0
6 Bits x Gun
***************************************************************************/
rgb_t unico_state::unico_R6G6B6X(uint32_t raw)
{
int const red = (raw >> 24) & 0xfc;
int const green = (raw >> 16) & 0xfc;
int const blue = (raw >> 8) & 0xfc;
return rgb_t(red | (red >> 6), green | (green >> 6), blue | (blue >> 6));
}
/***************************************************************************
Tilemaps
Offset: Bits: Value:
0.w Code
2.w fedc ba98 7--- ----
---- ---- -6-- ---- Flip Y
---- ---- --5- ---- Flip X
---- ---- ---4 3210 Color
***************************************************************************/
TILE_GET_INFO_MEMBER(unico_state::get_tile_info)
{
uint16_t *vram = (uint16_t *)tilemap.user_data();
uint16_t code = vram[2 * tile_index + 0 ];
uint16_t attr = vram[2 * tile_index + 1 ];
tileinfo.set(1, code, attr & 0x1f, TILE_FLIPYX( attr >> 5 ));
}
uint16_t unico_state::vram_r(offs_t offset) { return m_vram[offset]; }
void unico_state::vram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
int tile = ((offset / 0x2000) + 1) % 3;
COMBINE_DATA(&m_vram[offset]);
m_tilemap[tile]->mark_tile_dirty((offset & 0x1fff)/2);
}
uint16_t unico_state::scroll_r(offs_t offset) { return m_scroll[offset]; }
void unico_state::scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_scroll[offset]); }
uint16_t unico_state::spriteram_r(offs_t offset) { return m_spriteram[offset]; }
void unico_state::spriteram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_spriteram[offset]); }
/***************************************************************************
Video Hardware Init
***************************************************************************/
void unico_state::video_start()
{
m_tilemap[0] = &machine().tilemap().create(
*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(unico_state::get_tile_info)), TILEMAP_SCAN_ROWS,
16,16, 0x40, 0x40);
m_tilemap[1] = &machine().tilemap().create(
*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(unico_state::get_tile_info)), TILEMAP_SCAN_ROWS,
16,16, 0x40, 0x40);
m_tilemap[2] = &machine().tilemap().create(
*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(unico_state::get_tile_info)), TILEMAP_SCAN_ROWS,
16,16, 0x40, 0x40);
m_tilemap[0]->set_user_data(&m_vram[0x8000/2]);
m_tilemap[1]->set_user_data(&m_vram[0x0000/2]);
m_tilemap[2]->set_user_data(&m_vram[0x4000/2]);
m_sprites_scrolldx = -0x3f;
m_sprites_scrolldy = -0x0e;
m_tilemap[0]->set_scrolldx(-0x32,0);
m_tilemap[1]->set_scrolldx(-0x30,0);
m_tilemap[2]->set_scrolldx(-0x2e,0);
m_tilemap[0]->set_scrolldy(-0x0f,0);
m_tilemap[1]->set_scrolldy(-0x0f,0);
m_tilemap[2]->set_scrolldy(-0x0f,0);
m_tilemap[0]->set_transparent_pen(0x00);
m_tilemap[1]->set_transparent_pen(0x00);
m_tilemap[2]->set_transparent_pen(0x00);
}
/***************************************************************************
Sprites Drawing
0.w X
2.w Y
4.w Code
6.w fe-- ---- ---- ----
--dc ---- ---- ---- Priority
---- ba98 ---- ---- Number of tiles along X, minus 1
---- ---- 7--- ----
---- ---- -6-- ---- Flip Y?
---- ---- --5- ---- Flip X
---- ---- ---4 3210 Color
***************************************************************************/
void unico_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect)
{
int offs;
/* Draw them backwards, for pdrawgfx */
for ( offs = (0x800-8)/2; offs >= 0 ; offs -= 8/2 )
{
int x, startx, endx, incx;
int sx = m_spriteram[ offs + 0 ];
int sy = m_spriteram[ offs + 1 ];
int code = m_spriteram[ offs + 2 ];
int attr = m_spriteram[ offs + 3 ];
int flipx = attr & 0x020;
int flipy = attr & 0x040; // not sure
int dimx = ((attr >> 8) & 0xf) + 1;
int priority = ((attr >> 12) & 0x3);
int pri_mask;
switch( priority )
{
case 0: pri_mask = 0xfe; break; // below all
case 1: pri_mask = 0xf0; break; // above layer 0
case 2: pri_mask = 0xfc; break; // above layer 1
default:
case 3: pri_mask = 0x00; // above all
}
sx += m_sprites_scrolldx;
sy += m_sprites_scrolldy;
sx = (sx & 0x1ff) - (sx & 0x200);
sy = (sy & 0x1ff) - (sy & 0x200);
if (flipx) { startx = sx+(dimx-1)*16; endx = sx-16; incx = -16; }
else { startx = sx; endx = sx+dimx*16; incx = +16; }
for (x = startx ; x != endx ; x += incx)
{
m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect,
code++,
attr & 0x1f,
flipx, flipy,
x, sy,
screen.priority(),
pri_mask,0x00 );
}
}
}
/***************************************************************************
Screen Drawing
***************************************************************************/
uint32_t unico_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int layers_ctrl = -1;
m_tilemap[0]->set_scrollx(0, m_scroll[0x00]);
m_tilemap[0]->set_scrolly(0, m_scroll[0x01]);
m_tilemap[1]->set_scrollx(0, m_scroll[0x05]);
m_tilemap[1]->set_scrolly(0, m_scroll[0x0a]);
m_tilemap[2]->set_scrollx(0, m_scroll[0x04]);
m_tilemap[2]->set_scrolly(0, m_scroll[0x02]);
#ifdef MAME_DEBUG
if ( machine().input().code_pressed(KEYCODE_Z) || machine().input().code_pressed(KEYCODE_X) )
{
int msk = 0;
if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1;
if (machine().input().code_pressed(KEYCODE_W)) msk |= 2;
if (machine().input().code_pressed(KEYCODE_E)) msk |= 4;
if (machine().input().code_pressed(KEYCODE_A)) msk |= 8;
if (msk != 0) layers_ctrl &= msk;
}
#endif
/* The background color is the first of the last palette */
bitmap.fill(0x1f00, cliprect);
screen.priority().fill(0, cliprect);
if (layers_ctrl & 1) m_tilemap[0]->draw(screen, bitmap, cliprect, 0,1);
if (layers_ctrl & 2) m_tilemap[1]->draw(screen, bitmap, cliprect, 0,2);
if (layers_ctrl & 4) m_tilemap[2]->draw(screen, bitmap, cliprect, 0,4);
/* Sprites are drawn last, using pdrawgfx */
if (layers_ctrl & 8) draw_sprites(screen,bitmap,cliprect);
return 0;
}

View File

@ -420,6 +420,15 @@ static INPUT_PORTS_START( dorunrun )
PORT_DIPSETTING( 0x00, "5" )
INPUT_PORTS_END
static INPUT_PORTS_START( runrun )
PORT_INCLUDE( dorunrun )
PORT_MODIFY("DSW1")
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:1")
PORT_DIPSETTING( 0x80, "1" )
PORT_DIPSETTING( 0x00, "2" )
INPUT_PORTS_END
static INPUT_PORTS_START( dowild )
PORT_INCLUDE( docastle )
@ -819,6 +828,33 @@ ROM_START( dorunrunca )
ROM_LOAD( "dorunrun.clr", 0x0000, 0x0100, CRC(d5bab5d5) SHA1(7a465fe30b6008793d33f6e07086c89111e1e407) )
ROM_END
// Italian bootleg of dorunrunc. Main PCB + 040285C riser board. Differences are just revised number of lives and the 'Do!' and copyright drawing routines NOPed out.
ROM_START( runrun )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "electric_1.bin", 0x0000, 0x2000, CRC(9f23896b) SHA1(609103729b0d9721166ee5e50e4adab09d343f0a) ) // only different ROM
ROM_LOAD( "electric_2.bin", 0x2000, 0x2000, CRC(dbe3e7db) SHA1(168026aacce73941329a72e78423f83f7c4f0f04) )
ROM_LOAD( "electric_3.bin", 0x4000, 0x2000, CRC(e9b8181a) SHA1(6b960c3503589e62b61f9a2af372b98c48412bc0) )
ROM_LOAD( "electric_4.bin", 0x6000, 0x2000, CRC(a63d0b89) SHA1(d2ab3b76149e6620f1eb93a051c802b208b8d6dc) )
ROM_REGION( 0x10000, "slave", 0 )
ROM_LOAD( "electric_10.bin", 0x0000, 0x4000, CRC(6dac2fa3) SHA1(cd583f379f01788ce20f611f17689105d32ef97a) )
ROM_REGION( 0x10000, "cpu3", 0 )
ROM_LOAD( "bprom2.bin", 0x0000, 0x0200, BAD_DUMP CRC(2747ca77) SHA1(abc0ca05925974c4b852827605ee2f1caefb8524) ) // not dumped for this set
ROM_REGION( 0x4000, "gfx1", 0 )
ROM_LOAD( "electric_5.bin", 0x0000, 0x4000, CRC(e20795b7) SHA1(ae4366d2c45580f3e60ae36f81a5fc912d1eb899) )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_LOAD( "electric_6.bin", 0x0000, 0x2000, CRC(4bb231a0) SHA1(350423a1e602e23b229095021942d4b14a4736a7) )
ROM_LOAD( "electric_7.bin", 0x2000, 0x2000, CRC(0c08508a) SHA1(1e235a0f44207c53af2c8da631e5a8e08b231258) )
ROM_LOAD( "electric_8.bin", 0x4000, 0x2000, CRC(79287039) SHA1(e2e3c056f35a22e48115557e10fcd172ad2f91f1) )
ROM_LOAD( "electric_9.bin", 0x6000, 0x2000, CRC(523aa999) SHA1(1d4aa0af79a2ed7b935d4ce92d978bf738f08eb3) )
ROM_REGION( 0x0100, "proms", 0 )
ROM_LOAD( "dorunrun.clr", 0x0000, 0x0100, BAD_DUMP CRC(d5bab5d5) SHA1(7a465fe30b6008793d33f6e07086c89111e1e407) ) // not dumped for this set
ROM_END
ROM_START( dorunrun )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "2764.p1", 0x0000, 0x2000, CRC(95c86f8e) SHA1(9fe44911e0aa8d4c7299472a31c401e064d63d17) )
@ -1118,6 +1154,7 @@ GAME( 1984, dorunrun, 0, dorunrun, dorunrun, docastle_state, empty_init
GAME( 1984, dorunrun2, dorunrun, dorunrun, dorunrun, docastle_state, empty_init, ROT0, "Universal", "Do! Run Run (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, dorunrunc, dorunrun, docastle, dorunrun, docastle_state, empty_init, ROT0, "Universal", "Do! Run Run (Do's Castle hardware, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, dorunrunca, dorunrun, docastle, dorunrun, docastle_state, empty_init, ROT0, "Universal", "Do! Run Run (Do's Castle hardware, set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, runrun, dorunrun, docastle, runrun, docastle_state, empty_init, ROT0, "bootleg", "Run Run (Do! Run Run bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1987, spiero, dorunrun, dorunrun, dorunrun, docastle_state, empty_init, ROT0, "Universal", "Super Pierrot (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, dowild, 0, dorunrun, dowild, docastle_state, empty_init, ROT0, "Universal", "Mr. Do's Wild Ride", MACHINE_SUPPORTS_SAVE )
GAME( 1984, jjack, 0, dorunrun, jjack, docastle_state, empty_init, ROT270, "Universal", "Jumping Jack", MACHINE_SUPPORTS_SAVE )