mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
travrusa: revert bios option for color proms with exact same rom contents, small cleanup
This commit is contained in:
parent
749cb31cd6
commit
1e7cb67cd3
@ -74,7 +74,7 @@ public:
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_dsw2(*this, "DSW2")
|
||||
m_dsw(*this, "DSW%u", 1)
|
||||
{ }
|
||||
|
||||
void shtrider(machine_config &config);
|
||||
@ -86,7 +86,6 @@ public:
|
||||
void init_shtridrb();
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
virtual void video_start() override ATTR_COLD;
|
||||
|
||||
private:
|
||||
@ -97,7 +96,7 @@ private:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_ioport m_dsw2;
|
||||
required_ioport_array<2> m_dsw;
|
||||
|
||||
tilemap_t *m_bg_tilemap = nullptr;
|
||||
uint8_t m_scrollx[2]{};
|
||||
@ -324,53 +323,6 @@ void travrusa_state::video_start()
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Memory handlers
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void travrusa_state::videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
|
||||
void travrusa_state::set_scroll()
|
||||
{
|
||||
for (int i = 0; i <= 2; i++)
|
||||
m_bg_tilemap->set_scrollx(i, m_scrollx[0] + 256 * m_scrollx[1]);
|
||||
|
||||
m_bg_tilemap->set_scrollx(3, 0);
|
||||
}
|
||||
|
||||
void travrusa_state::scroll_x_low_w(uint8_t data)
|
||||
{
|
||||
m_scrollx[0] = data;
|
||||
set_scroll();
|
||||
}
|
||||
|
||||
void travrusa_state::scroll_x_high_w(uint8_t data)
|
||||
{
|
||||
m_scrollx[1] = data;
|
||||
set_scroll();
|
||||
}
|
||||
|
||||
|
||||
void travrusa_state::flipscreen_w(uint8_t data)
|
||||
{
|
||||
// screen flip is handled both by software and hardware
|
||||
data ^= ~m_dsw2->read() & 1;
|
||||
|
||||
flip_screen_set(data & 1);
|
||||
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x02);
|
||||
machine().bookkeeping().coin_counter_w(1, data & 0x20);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Display refresh
|
||||
@ -387,7 +339,6 @@ void travrusa_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
else
|
||||
clip &= spritevisiblearea;
|
||||
|
||||
|
||||
for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
|
||||
{
|
||||
int sx = ((m_spriteram[offs + 3] + 8) & 0xff) - 8;
|
||||
@ -423,6 +374,68 @@ uint32_t travrusa_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Memory handlers
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void travrusa_state::videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
|
||||
void travrusa_state::set_scroll()
|
||||
{
|
||||
for (int i = 0; i <= 2; i++)
|
||||
m_bg_tilemap->set_scrollx(i, m_scrollx[0] + 256 * m_scrollx[1]);
|
||||
|
||||
m_bg_tilemap->set_scrollx(3, 0);
|
||||
}
|
||||
|
||||
void travrusa_state::scroll_x_low_w(uint8_t data)
|
||||
{
|
||||
m_scrollx[0] = data;
|
||||
set_scroll();
|
||||
}
|
||||
|
||||
void travrusa_state::scroll_x_high_w(uint8_t data)
|
||||
{
|
||||
m_scrollx[1] = data;
|
||||
set_scroll();
|
||||
}
|
||||
|
||||
|
||||
void travrusa_state::flipscreen_w(uint8_t data)
|
||||
{
|
||||
// screen flip is handled both by software and hardware
|
||||
data ^= ~m_dsw[1]->read() & 1;
|
||||
|
||||
flip_screen_set(data & 1);
|
||||
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x02);
|
||||
machine().bookkeeping().coin_counter_w(1, data & 0x20);
|
||||
}
|
||||
|
||||
|
||||
uint8_t travrusa_state::shtriderb_port11_r()
|
||||
{
|
||||
logerror("shtriderb_port11_r %04x\n", m_maincpu->pc());
|
||||
// reads, masks with 0xa8, checks for 0x88, resets game if not happy with value?
|
||||
return 0x88;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Address maps
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void travrusa_state::program_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x7fff).rom();
|
||||
@ -443,6 +456,14 @@ void travrusa_state::shtriderb_io_map(address_map &map)
|
||||
map(0x0011, 0x0011).mirror(0xff00).r(FUNC(travrusa_state::shtriderb_port11_r));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Input ports
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static INPUT_PORTS_START( travrusa )
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
@ -533,8 +554,8 @@ static INPUT_PORTS_START( travrusa )
|
||||
PORT_DIPSETTING( 0x04, "Mode 1" )
|
||||
PORT_DIPSETTING( 0x00, "Mode 2" )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Speed Type" ) PORT_DIPLOCATION("DSW2:4")
|
||||
PORT_DIPSETTING( 0x08, "M/H" ) //mph ?
|
||||
PORT_DIPSETTING( 0x00, "Km/H" )
|
||||
PORT_DIPSETTING( 0x08, "mph" )
|
||||
PORT_DIPSETTING( 0x00, "km/h" )
|
||||
// In stop mode, press 2 to stop and 1 to restart
|
||||
PORT_DIPNAME( 0x10, 0x10, "Stop Mode (Cheat)") PORT_DIPLOCATION("DSW2:5")
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
@ -619,6 +640,12 @@ INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
GFX layouts
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static const gfx_layout spritelayout =
|
||||
{
|
||||
16,16,
|
||||
@ -655,11 +682,13 @@ static GFXDECODE_START( gfx_shtrider )
|
||||
GFXDECODE_ENTRY( "sprites", 0, shtrider_spritelayout, 16*8, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
void travrusa_state::machine_reset()
|
||||
{
|
||||
m_scrollx[0] = 0;
|
||||
m_scrollx[1] = 0;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Machine configuration
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void travrusa_state::travrusa(machine_config &config)
|
||||
{
|
||||
@ -701,30 +730,14 @@ void travrusa_state::shtriderb(machine_config &config)
|
||||
m_gfxdecode->set_info(gfx_shtrider);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Game driver(s)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/* The only difference between 'BIOSes' (not really a BIOS) is a different PROM setup (but same content) on the sprites PCB:
|
||||
Location One character palette PROM Two character palette PROMs
|
||||
F1 74LS32 PROM
|
||||
H1 74LS74 PROM
|
||||
K2 PROM empty
|
||||
*/
|
||||
#define TRAVRUSA_PROMS \
|
||||
ROM_REGION( 0x0320, "proms", 0 ) \
|
||||
ROM_SYSTEM_BIOS( 0, "1", "One character palette PROM" ) \
|
||||
ROMX_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef), ROM_BIOS(0) ) /* Character palette - last $100 are unused */ \
|
||||
ROMX_LOAD( "tbp18s.2", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce), ROM_BIOS(0) ) /* Sprite palette */ \
|
||||
ROMX_LOAD( "tbp24s10.3", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54), ROM_BIOS(0) ) /* Sprite lookup table */ \
|
||||
ROM_SYSTEM_BIOS( 1, "2", "Two character palette PROMs" ) \
|
||||
ROMX_LOAD( "prom.h1", 0x0000, 0x0100, CRC(2f98ddf0) SHA1(e90c3cebe3e788cbf8e23030f58a1153564207e2), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_BIOS(1) ) /* On tiles PCB */ \
|
||||
ROMX_LOAD( "prom.f1", 0x0000, 0x0100, CRC(adea1297) SHA1(8f365cc15cc3c26b388ba957d7cf3752584d5475), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_BIOS(1) ) /* On tiles PCB */ \
|
||||
ROMX_LOAD( "prom1.f1", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce), ROM_BIOS(1) ) /* On sprites PCB */ \
|
||||
ROMX_LOAD( "prom2.h2", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54), ROM_BIOS(1) ) /* On sprites PCB */
|
||||
|
||||
ROM_START( travrusa )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "zr1-0.m3", 0x0000, 0x2000, CRC(be066c0a) SHA1(fed0ef114b08519b99d77485b73768a838d2f06e) )
|
||||
@ -745,7 +758,14 @@ ROM_START( travrusa )
|
||||
ROM_LOAD( "zr1-9.l3", 0x2000, 0x2000, CRC(13be6a14) SHA1(47861910fe4c46cd72634cf7d834be2da2a0a4f9) )
|
||||
ROM_LOAD( "zr1-10.k3", 0x4000, 0x2000, CRC(6fcc9fdb) SHA1(88f878b9ebf07c5a16f8cb742016cac971ed3f10) )
|
||||
|
||||
TRAVRUSA_PROMS
|
||||
ROM_REGION( 0x0320, "proms", 0 )
|
||||
// a 2-PROM configuration for the character palette also exists, with the exact same contents
|
||||
// prom.h1 == prom.k2("mmi6349.ij") high nibbles, prom.f1 == prom.k2 low nibbles, like so:
|
||||
// ROMX_LOAD( "prom.h1", 0x0000, 0x0100, CRC(2f98ddf0) SHA1(e90c3cebe3e788cbf8e23030f58a1153564207e2), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI )
|
||||
// ROMX_LOAD( "prom.f1", 0x0000, 0x0100, CRC(adea1297) SHA1(8f365cc15cc3c26b388ba957d7cf3752584d5475), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO )
|
||||
ROM_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) // character palette - last $100 are unused
|
||||
ROM_LOAD( "tbp18s.2", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) // sprite palette
|
||||
ROM_LOAD( "tbp24s10.3", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) // sprite lookup table
|
||||
ROM_END
|
||||
|
||||
// Bootleg - "American Top" printed on title - (c) 1983 I.P. - Zippy Race graphic logo is blanked out - Main ROM0-ROM3 test NG
|
||||
@ -821,41 +841,19 @@ ROM_START( motorace )
|
||||
ROM_LOAD( "mr5.3m", 0x2000, 0x2000, CRC(f75f2aad) SHA1(e4a8a3da56cbc04f0c9041afac182d1bfceb1d0d) )
|
||||
ROM_LOAD( "mr6.3k", 0x4000, 0x2000, CRC(518889a0) SHA1(70b417104ce86132cb5542813c1e0509b2260756) )
|
||||
|
||||
TRAVRUSA_PROMS
|
||||
ROM_REGION( 0x0320, "proms", 0 ) // see notes in parent set for alternate character palette PROM configuration
|
||||
ROM_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) // character palette - last $100 are unused
|
||||
ROM_LOAD( "tbp18s.2", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) // sprite palette
|
||||
ROM_LOAD( "tbp24s10.3", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) // sprite lookup table
|
||||
ROM_END
|
||||
|
||||
/*
|
||||
|
||||
Moto Tour is a Tecfri licensed version of Traverse USA/Zippy Race from Irem
|
||||
|
||||
This version doesn't have the MSM5202 but still has the sounds produced by the 5202 with a lower quality, I guess it converts the sound data to analog in some way, also this version is unprotected, doesn't have the epoxy block.
|
||||
This version doesn't have the MSM5202 but still has the sounds produced by the 5202 with a lower quality,
|
||||
I guess it converts the sound data to analog in some way, also this version is unprotected, doesn't have the epoxy block.
|
||||
|
||||
Unfortunately the EPROMs' labels have disappeared, so I name it similar to Traverse USA but with the letters mt (Moto Tour)
|
||||
|
||||
Rom Info
|
||||
|
||||
snd.a1 ------ sound code, 100% identical to Traverse Usa/Zippy race
|
||||
|
||||
mt1-1.e3 \
|
||||
mt1-2.c3 -- Backgrounds?, 100% identical to Traverse Usa/Zippy race
|
||||
mt1-3.a3 /
|
||||
|
||||
mt1-4.m3 \
|
||||
mt1-5.l3 ==
|
||||
mt1-6.k3 == Main CPU. Different from the other sets
|
||||
mt1-7.j3 /
|
||||
|
||||
|
||||
mt1-8.n3 \
|
||||
mt1-9.m3 -- Sprites. Apparently all different from the other sets
|
||||
mt1-10.k3 /
|
||||
|
||||
mm6349.k2 \
|
||||
prom1.f1 -- color PROMs, identical to other versions (there are also versions with two character palette PROMs)
|
||||
prom2.h2 /
|
||||
|
||||
Ricky2001
|
||||
|
||||
*/
|
||||
|
||||
ROM_START( mototour )
|
||||
@ -878,7 +876,10 @@ ROM_START( mototour )
|
||||
ROM_LOAD( "mt1-9.m3", 0x2000, 0x2000, CRC(6f9f2a4e) SHA1(8ebdd69895a4dd5de7fe84505359cccaa0aca6f8) )
|
||||
ROM_LOAD( "mt1-10.k3", 0x4000, 0x2000, CRC(d958def5) SHA1(198adf7e87804bd018b8cfa8bbc68623255698a2) )
|
||||
|
||||
TRAVRUSA_PROMS
|
||||
ROM_REGION( 0x0320, "proms", 0 ) // see notes in parent set for alternate character palette PROM configuration
|
||||
ROM_LOAD( "mmi6349.k2", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) // character palette - last $100 are unused // == mmi6349.ij
|
||||
ROM_LOAD( "prom1.f1", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) // sprite palette // == tbp18s.2
|
||||
ROM_LOAD( "prom2.h2", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) // sprite lookup table // == tbp24s10.3
|
||||
ROM_END
|
||||
|
||||
|
||||
@ -986,13 +987,6 @@ void travrusa_state::init_shtridra()
|
||||
rom[A] = bitswap<8>(rom[A],7 ,5, 6, 3, 4, 2, 1, 0);
|
||||
}
|
||||
|
||||
uint8_t travrusa_state::shtriderb_port11_r()
|
||||
{
|
||||
logerror("shtriderb_port11_r %04x\n", m_maincpu->pc());
|
||||
// reads, masks with 0xa8, checks for 0x88, resets game if not happy with value?
|
||||
return 0x88;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
|
@ -838,7 +838,7 @@ static INPUT_PORTS_START( docastle )
|
||||
PORT_DIPNAME( 0x04, 0x04, "Rack Test" ) PORT_DIPLOCATION("SWA:6")
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Advance Credit & Level on Diamond" ) PORT_DIPLOCATION("SWA:5")
|
||||
PORT_DIPNAME( 0x08, 0x08, "Bonus Credit for Diamond" ) PORT_DIPLOCATION("SWA:5")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, "Difficulty of EXTRA" ) PORT_DIPLOCATION("SWA:4")
|
||||
|
Loading…
Reference in New Issue
Block a user