mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
Added layout for Midway V-Unit games: Cruis'n USA, Cruis'n World, and Off Road Challenge
This commit is contained in:
parent
1e544bd0af
commit
49e932bb5a
@ -34,6 +34,7 @@ Known to exist but not dumped:
|
||||
#include "machine/ataintf.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/midvunit.h"
|
||||
#include "crusnusa.lh"
|
||||
|
||||
|
||||
#define CPU_CLOCK 50000000
|
||||
@ -54,6 +55,7 @@ void midvunit_state::machine_start()
|
||||
save_item(NAME(m_last_port0));
|
||||
save_item(NAME(m_shifter_state));
|
||||
save_item(NAME(m_timer_rate));
|
||||
save_item(NAME(lamps));
|
||||
}
|
||||
|
||||
|
||||
@ -1723,21 +1725,38 @@ READ32_MEMBER(midvunit_state::generic_speedup_r)
|
||||
return m_generic_speedup[offset];
|
||||
}
|
||||
|
||||
READ32_MEMBER(midvunit_state::lamps_r)
|
||||
{
|
||||
return lamps;
|
||||
}
|
||||
|
||||
void midvunit_state::init_crusnusa_common(offs_t speedup)
|
||||
WRITE32_MEMBER(midvunit_state::lamps_w)
|
||||
{
|
||||
COMBINE_DATA(&lamps);
|
||||
|
||||
int bit;
|
||||
for (bit = 0; bit < 8; bit++) {
|
||||
output().set_lamp_value(bit, (lamps >> bit) & 0x1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void midvunit_state::init_crusnusa_common(offs_t speedup, offs_t lamp)
|
||||
{
|
||||
m_adc_shift = 24;
|
||||
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(lamp, lamp, read32_delegate(FUNC(midvunit_state::lamps_r),this), write32_delegate(FUNC(midvunit_state::lamps_w),this));
|
||||
|
||||
/* speedups */
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(speedup, speedup + 1, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
|
||||
m_generic_speedup = m_ram_base + speedup;
|
||||
}
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnusa) { init_crusnusa_common(0xc93e); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnu40) { init_crusnusa_common(0xc957); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnu21) { init_crusnusa_common(0xc051); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnusa) { init_crusnusa_common(0xc93e, 0xc8cd); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnu40) { init_crusnusa_common(0xc957, 0xc8e5); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnu21) { init_crusnusa_common(0xc051, 0xbf2c); }
|
||||
|
||||
|
||||
void midvunit_state::init_crusnwld_common(offs_t speedup)
|
||||
void midvunit_state::init_crusnwld_common(offs_t speedup, offs_t lamp)
|
||||
{
|
||||
m_adc_shift = 16;
|
||||
|
||||
@ -1752,19 +1771,26 @@ void midvunit_state::init_crusnwld_common(offs_t speedup)
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x9d0000, 0x9d1fff, read32_delegate(FUNC(midvunit_state::bit_data_r),this));
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0x9d0000, 0x9d0000, write32_delegate(FUNC(midvunit_state::bit_reset_w),this));
|
||||
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(lamp, lamp, read32_delegate(FUNC(midvunit_state::lamps_r),this), write32_delegate(FUNC(midvunit_state::lamps_w),this));
|
||||
|
||||
/* speedups */
|
||||
if (speedup) {
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(speedup, speedup + 1, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
|
||||
m_generic_speedup = m_ram_base + speedup;
|
||||
}
|
||||
}
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnwld) { init_crusnwld_common(0xd4c0); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnwld) { init_crusnwld_common(0xd4c0, 0xcc43); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnw23) { init_crusnwld_common(0xd4c0, 0xcc47); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnw20) { init_crusnwld_common(0xd4c0, 0xcc23); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnw19) { init_crusnwld_common(0xd4c0, 0xcc20); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnw17) { init_crusnwld_common(0xd4c0, 0xcc04); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnw13) { init_crusnwld_common(0xd4c0, 0xccc1); }
|
||||
#if 0
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnw20) { init_crusnwld_common(0xd49c); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,crusnw13) { init_crusnwld_common(0); }
|
||||
#endif
|
||||
|
||||
DRIVER_INIT_MEMBER(midvunit_state,offroadc)
|
||||
void midvunit_state::init_offroadc_common(offs_t speedup, offs_t lamp)
|
||||
{
|
||||
m_adc_shift = 16;
|
||||
|
||||
@ -1774,10 +1800,14 @@ DRIVER_INIT_MEMBER(midvunit_state,offroadc)
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x991030, 0x991030, read32_delegate(FUNC(midvunit_state::offroadc_serial_status_r),this));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x996000, 0x996000, read32_delegate(FUNC(midvunit_state::offroadc_serial_data_r),this), write32_delegate(FUNC(midvunit_state::offroadc_serial_data_w),this));
|
||||
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(lamp, lamp, read32_delegate(FUNC(midvunit_state::lamps_r),this), write32_delegate(FUNC(midvunit_state::lamps_w),this));
|
||||
|
||||
/* speedups */
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x195aa, 0x195aa, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
|
||||
m_generic_speedup = m_ram_base + 0x195aa;
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(speedup, speedup, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
|
||||
m_generic_speedup = m_ram_base + speedup;
|
||||
}
|
||||
DRIVER_INIT_MEMBER(midvunit_state,offroadc) { init_offroadc_common(0x195aa, 0x19e16); }
|
||||
DRIVER_INIT_MEMBER(midvunit_state,offroadc1) { init_offroadc_common(0x195aa, 0x19e17); }
|
||||
|
||||
|
||||
DRIVER_INIT_MEMBER(midvunit_state,wargods)
|
||||
@ -1811,23 +1841,23 @@ DRIVER_INIT_MEMBER(midvunit_state,wargods)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1994, crusnusa, 0, midvunit, crusnusa, midvunit_state, crusnusa, ROT0, "Midway", "Cruis'n USA (rev L4.1)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1994, crusnusa40, crusnusa, midvunit, crusnusa, midvunit_state, crusnu40, ROT0, "Midway", "Cruis'n USA (rev L4.0)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1994, crusnusa21, crusnusa, midvunit, crusnusa, midvunit_state, crusnu21, ROT0, "Midway", "Cruis'n USA (rev L2.1)", MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1994, crusnusa, 0, midvunit, crusnusa, midvunit_state, crusnusa, ROT0, "Midway", "Cruis'n USA (rev L4.1)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1994, crusnusa40, crusnusa, midvunit, crusnusa, midvunit_state, crusnu40, ROT0, "Midway", "Cruis'n USA (rev L4.0)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1994, crusnusa21, crusnusa, midvunit, crusnusa, midvunit_state, crusnu21, ROT0, "Midway", "Cruis'n USA (rev L2.1)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
|
||||
GAME( 1996, crusnwld, 0, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.5)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1996, crusnwld24, crusnwld, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.4)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1996, crusnwld23, crusnwld, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.3)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1996, crusnwld20, crusnwld, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.0)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1996, crusnwld19, crusnwld, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L1.9)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1996, crusnwld17, crusnwld, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L1.7)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1996, crusnwld13, crusnwld, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L1.3)", MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1996, crusnwld, 0, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.5)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1996, crusnwld24, crusnwld, crusnwld, crusnwld, midvunit_state, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.4)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1996, crusnwld23, crusnwld, crusnwld, crusnwld, midvunit_state, crusnw23, ROT0, "Midway", "Cruis'n World (rev L2.3)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1996, crusnwld20, crusnwld, crusnwld, crusnwld, midvunit_state, crusnw20, ROT0, "Midway", "Cruis'n World (rev L2.0)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1996, crusnwld19, crusnwld, crusnwld, crusnwld, midvunit_state, crusnw19, ROT0, "Midway", "Cruis'n World (rev L1.9)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1996, crusnwld17, crusnwld, crusnwld, crusnwld, midvunit_state, crusnw17, ROT0, "Midway", "Cruis'n World (rev L1.7)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1996, crusnwld13, crusnwld, crusnwld, crusnwld, midvunit_state, crusnw13, ROT0, "Midway", "Cruis'n World (rev L1.3)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
|
||||
GAME( 1997, offroadc, 0, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.63)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1997, offroadc5, offroadc, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.50)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1997, offroadc4, offroadc, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.40)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1997, offroadc3, offroadc, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.30)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1997, offroadc1, offroadc, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.10)", MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1997, offroadc, 0, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.63)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1997, offroadc5, offroadc, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.50)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1997, offroadc4, offroadc, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.40)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1997, offroadc3, offroadc, offroadc, offroadc, midvunit_state, offroadc, ROT0, "Midway", "Off Road Challenge (v1.30)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
GAMEL( 1997, offroadc1, offroadc, offroadc, offroadc, midvunit_state, offroadc1, ROT0, "Midway", "Off Road Challenge (v1.10)", MACHINE_SUPPORTS_SAVE, layout_crusnusa )
|
||||
|
||||
GAME( 1995, wargods, 0, midvplus, wargods, midvunit_state, wargods, ROT0, "Midway", "War Gods (HD 10/09/1996 - Dual Resolution)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1995, wargodsa, wargods, midvplus, wargodsa, midvunit_state, wargods, ROT0, "Midway", "War Gods (HD 08/15/1996)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -96,6 +96,7 @@ public:
|
||||
UINT8 m_video_changed;
|
||||
emu_timer *m_scanline_timer;
|
||||
std::unique_ptr<midvunit_renderer> m_poly;
|
||||
UINT32 lamps;
|
||||
DECLARE_WRITE32_MEMBER(midvunit_dma_queue_w);
|
||||
DECLARE_READ32_MEMBER(midvunit_dma_queue_entries_r);
|
||||
DECLARE_READ32_MEMBER(midvunit_dma_trigger_r);
|
||||
@ -131,14 +132,23 @@ public:
|
||||
DECLARE_WRITE32_MEMBER(midvplus_misc_w);
|
||||
DECLARE_WRITE8_MEMBER(midvplus_xf1_w);
|
||||
DECLARE_READ32_MEMBER(generic_speedup_r);
|
||||
DECLARE_READ32_MEMBER(lamps_r);
|
||||
DECLARE_WRITE32_MEMBER(lamps_w);
|
||||
DECLARE_DRIVER_INIT(crusnu40);
|
||||
DECLARE_DRIVER_INIT(crusnu21);
|
||||
DECLARE_DRIVER_INIT(crusnwld);
|
||||
DECLARE_DRIVER_INIT(crusnw23);
|
||||
DECLARE_DRIVER_INIT(crusnw20);
|
||||
DECLARE_DRIVER_INIT(crusnw19);
|
||||
DECLARE_DRIVER_INIT(crusnw17);
|
||||
DECLARE_DRIVER_INIT(crusnw13);
|
||||
DECLARE_DRIVER_INIT(wargods);
|
||||
DECLARE_DRIVER_INIT(offroadc);
|
||||
DECLARE_DRIVER_INIT(offroadc1);
|
||||
DECLARE_DRIVER_INIT(crusnusa);
|
||||
void init_crusnwld_common(offs_t speedup);
|
||||
void init_crusnusa_common(offs_t speedup);
|
||||
void init_crusnwld_common(offs_t speedup, offs_t lamp);
|
||||
void init_crusnusa_common(offs_t speedup, offs_t lamp);
|
||||
void init_offroadc_common(offs_t speedup, offs_t lamp);
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
107
src/mame/layout/crusnusa.lay
Normal file
107
src/mame/layout/crusnusa.lay
Normal file
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0"?>
|
||||
<mamelayout version="2">
|
||||
<element name="lamp" defstate="0">
|
||||
<rect state="0">
|
||||
<color red="0.1" green="0.1" blue="0.0" />
|
||||
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
|
||||
</rect>
|
||||
<rect state="1">
|
||||
<color red="1.0" green="1.0" blue="0.0" />
|
||||
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
|
||||
</rect>
|
||||
</element>
|
||||
|
||||
<element name="start" defstate="0">
|
||||
<disk state="0">
|
||||
<bounds x="0" y="0" width="2.0" height="2.0" />
|
||||
<color red="0.0" green="0.1" blue="0.061" />
|
||||
</disk>
|
||||
<disk state="1">
|
||||
<bounds x="0" y="0" width="2.0" height="2.0" />
|
||||
<color red="0.0" green="1.0" blue="0.61" />
|
||||
</disk>
|
||||
<text string="START">
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
<bounds x="0.25" y="0.5" width="1.5" height="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="view1" defstate="0">
|
||||
<rect state="0">
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
<color red="0.1" green="0.024" blue="0.027" />
|
||||
</rect>
|
||||
<rect state="1">
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
<color red="1.0" green="0.24" blue="0.27" />
|
||||
</rect>
|
||||
<text string="VIEW 1">
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="view2" defstate="0">
|
||||
<rect state="0">
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
<color red="0.087" green="0.089" blue="0.1" />
|
||||
</rect>
|
||||
<rect state="1">
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
<color red="0.87" green="0.89" blue="1.0" />
|
||||
</rect>
|
||||
<text string="VIEW 2">
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="view3" defstate="0">
|
||||
<rect state="0">
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
<color red="0.023" green="0.072" blue="0.1" />
|
||||
</rect>
|
||||
<rect state="1">
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
<color red="0.23" green="0.72" blue="1.0" />
|
||||
</rect>
|
||||
<text string="VIEW 3">
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
<bounds x="0.0" y="0.0" width="5.0" height="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<view name="Simple LEDs">
|
||||
<bounds left="0" top="0" right="4" bottom="3.472" />
|
||||
|
||||
<screen index="0">
|
||||
<bounds left="0" top="0" right="4" bottom="3" />
|
||||
</screen>
|
||||
|
||||
<bezel name="lamp0" element="start">
|
||||
<bounds x="3.60" y="3.1" width="0.3" height="0.3" />
|
||||
</bezel>
|
||||
<bezel name="lamp1" element="view1">
|
||||
<bounds x="0.1" y="3.075" width="0.5" height="0.1" />
|
||||
</bezel>
|
||||
<bezel name="lamp2" element="view2">
|
||||
<bounds x="0.1" y="3.2" width="0.5" height="0.1" />
|
||||
</bezel>
|
||||
<bezel name="lamp3" element="view3">
|
||||
<bounds x="0.1" y="3.325" width="0.5" height="0.1" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="lamp4" element="lamp">
|
||||
<bounds x="1.785" y="3.2" width="0.1" height="0.1" />
|
||||
</bezel>
|
||||
<bezel name="lamp5" element="lamp">
|
||||
<bounds x="1.895" y="3.2" width="0.1" height="0.1" />
|
||||
</bezel>
|
||||
<bezel name="lamp6" element="lamp">
|
||||
<bounds x="2.005" y="3.2" width="0.1" height="0.1" />
|
||||
</bezel>
|
||||
<bezel name="lamp7" element="lamp">
|
||||
<bounds x="2.115" y="3.2" width="0.1" height="0.1" />
|
||||
</bezel>
|
||||
</view>
|
||||
</mamelayout>
|
Loading…
Reference in New Issue
Block a user