mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
midway/williams.cpp: Added missing item to save states for Mystic Marathon, further simplified class hierarchy.
This commit is contained in:
parent
76fdb9e645
commit
fbaf6548ee
@ -569,13 +569,6 @@ void williams_state::main_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Sinistar memory handlers
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void sinistar_state::main_map(address_map &map)
|
||||
{
|
||||
williams_state::main_map(map);
|
||||
@ -585,13 +578,6 @@ void sinistar_state::main_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Bubbles memory handlers
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void williams_state::bubbles_main_map(address_map &map)
|
||||
{
|
||||
main_map(map);
|
||||
@ -601,13 +587,6 @@ void williams_state::bubbles_main_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Speed Ball memory handlers
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void williams_state::spdball_main_map(address_map &map)
|
||||
{
|
||||
main_map(map);
|
||||
@ -623,6 +602,14 @@ void williams_state::spdball_main_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
void williams_state::alienar_main_map(address_map &map)
|
||||
{
|
||||
main_map(map);
|
||||
|
||||
map(0xcbff, 0xcbff).nopw();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -1661,7 +1648,7 @@ void defender_state::jin(machine_config &config)
|
||||
}
|
||||
|
||||
|
||||
void wms_muxed_state::williams_muxed(machine_config &config)
|
||||
void williams_state::williams_muxed(machine_config &config)
|
||||
{
|
||||
// pia
|
||||
m_pia[0]->readpa_handler().set_ioport("IN0").mask(0x30);
|
||||
@ -1672,27 +1659,34 @@ void wms_muxed_state::williams_muxed(machine_config &config)
|
||||
m_pia[0]->cb2_handler().set("mux_0", FUNC(ls157_device::select_w));
|
||||
m_pia[0]->cb2_handler().append("mux_1", FUNC(ls157_device::select_w));
|
||||
|
||||
LS157(config, m_mux0, 0); // IC3 on interface board (actually LS257 with OC tied low)
|
||||
m_mux0->a_in_callback().set_ioport("INP2");
|
||||
m_mux0->b_in_callback().set_ioport("INP1");
|
||||
ls157_device &mux0(LS157(config, "mux_0", 0)); // IC3 on interface board (actually LS257 with OC tied low)
|
||||
mux0.a_in_callback().set_ioport("INP2");
|
||||
mux0.b_in_callback().set_ioport("INP1");
|
||||
|
||||
LS157(config, m_mux1, 0); // IC4 on interface board (actually LS257 with OC tied low)
|
||||
m_mux1->a_in_callback().set_ioport("INP2A");
|
||||
m_mux1->b_in_callback().set_ioport("INP1A");
|
||||
ls157_device &mux1(LS157(config, "mux_1", 0)); // IC4 on interface board (actually LS257 with OC tied low)
|
||||
mux1.a_in_callback().set_ioport("INP2A");
|
||||
mux1.b_in_callback().set_ioport("INP1A");
|
||||
}
|
||||
|
||||
void wms_muxed_state::joust(machine_config &config)
|
||||
void williams_state::joust(machine_config &config)
|
||||
{
|
||||
williams_b1(config);
|
||||
williams_muxed(config);
|
||||
}
|
||||
|
||||
void wms_muxed_state::splat(machine_config &config)
|
||||
void williams_state::splat(machine_config &config)
|
||||
{
|
||||
williams_b2(config);
|
||||
williams_muxed(config);
|
||||
}
|
||||
|
||||
void williams_state::alienar(machine_config &config)
|
||||
{
|
||||
joust(config);
|
||||
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &williams_state::alienar_main_map);
|
||||
}
|
||||
|
||||
|
||||
void williams_state::bubbles(machine_config &config)
|
||||
{
|
||||
@ -3858,12 +3852,6 @@ void defender_state::init_defndjeu()
|
||||
}
|
||||
|
||||
|
||||
void wms_muxed_state::init_alienar()
|
||||
{
|
||||
m_maincpu->space(AS_PROGRAM).nop_write(0xcbff, 0xcbff);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -3917,15 +3905,15 @@ GAME( 1987, robotron87, robotron, williams_b1, robotron, williams_state, e
|
||||
GAME( 2012, robotron12, robotron, williams_b1, robotron, williams_state, empty_init, ROT0, "hack", "Robotron: 2084 (2012 'wave 201 start' hack)", MACHINE_SUPPORTS_SAVE ) // includes sitc bug fix, used for competitive play.
|
||||
GAME( 2015, robotrontd, robotron, williams_b1, robotron, williams_state, empty_init, ROT0, "hack", "Robotron: 2084 (2015 'tie-die V2' hack)", MACHINE_SUPPORTS_SAVE ) // inc. sitc fix, mods by some of the original developers, see backstory here http://www.robotron2084guidebook.com/gameplay/raceto100million/robo2k14_tie-die-romset/ (I guess there's a tie-die V1 before it was released to the public?)
|
||||
|
||||
GAME( 1982, joust, 0, joust, joust, wms_muxed_state, empty_init, ROT0, "Williams", "Joust (Green label)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, joustr, joust, joust, joust, wms_muxed_state, empty_init, ROT0, "Williams", "Joust (Red label)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, jousty, joust, joust, joust, wms_muxed_state, empty_init, ROT0, "Williams", "Joust (Yellow label)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, joust, 0, joust, joust, williams_state, empty_init, ROT0, "Williams", "Joust (Green label)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, joustr, joust, joust, joust, williams_state, empty_init, ROT0, "Williams", "Joust (Red label)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, jousty, joust, joust, joust, williams_state, empty_init, ROT0, "Williams", "Joust (Yellow label)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1982, bubbles, 0, bubbles, bubbles, williams_state, empty_init, ROT0, "Williams", "Bubbles", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, bubblesr, bubbles, bubbles, bubbles, williams_state, empty_init, ROT0, "Williams", "Bubbles (Solid Red label)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, bubblesp, bubbles, bubbles, bubbles, williams_state, empty_init, ROT0, "Williams", "Bubbles (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1982, splat, 0, splat, splat, wms_muxed_state, empty_init, ROT0, "Williams", "Splat!", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, splat, 0, splat, splat, williams_state, empty_init, ROT0, "Williams", "Splat!", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1982, sinistar, 0, upright, sinistar, sinistar_state, empty_init, ROT270, "Williams", "Sinistar (revision 3, upright)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1982, sinistarc, sinistar, cockpit, sinistar, sinistar_state, empty_init, ROT270, "Williams", "Sinistar (revision 3, cockpit)", MACHINE_SUPPORTS_SAVE )
|
||||
@ -3941,8 +3929,8 @@ GAME( 1983, blasterkit, blaster, blastkit, blastkit, blaster_state, e
|
||||
|
||||
GAME( 1985, spdball, 0, spdball, spdball, williams_state, empty_init, ROT0, "Williams", "Speed Ball - Contest at Neonworld (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1985, alienar, 0, joust, alienar, wms_muxed_state, init_alienar, ROT0, "Duncan Brown", "Alien Arena", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1985, alienaru, alienar, joust, alienar, wms_muxed_state, init_alienar, ROT0, "Duncan Brown", "Alien Arena (Stargate upgrade)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1985, alienar, 0, alienar, alienar, williams_state, empty_init, ROT0, "Duncan Brown", "Alien Arena", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1985, alienaru, alienar, alienar, alienar, williams_state, empty_init, ROT0, "Duncan Brown", "Alien Arena (Stargate upgrade)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1987, lottofun, 0, lottofun, lottofun, williams_state, empty_init, ROT0, "HAR Management", "Lotto Fun", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "screen.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
|
||||
// base Williams hardware
|
||||
class williams_state : public driver_device
|
||||
{
|
||||
@ -46,14 +47,16 @@ public:
|
||||
m_49way_y(*this, "49WAYY")
|
||||
{ }
|
||||
|
||||
void williams_base(machine_config &config);
|
||||
void williams_b0(machine_config &config);
|
||||
void williams_b1(machine_config &config);
|
||||
void williams_b2(machine_config &config);
|
||||
|
||||
void joust(machine_config &config);
|
||||
void bubbles(machine_config &config);
|
||||
void splat(machine_config &config);
|
||||
void playball(machine_config &config);
|
||||
void spdball(machine_config &config);
|
||||
void alienar(machine_config &config);
|
||||
void lottofun(machine_config &config);
|
||||
|
||||
u8 port_0_49way_r();
|
||||
@ -131,9 +134,13 @@ protected:
|
||||
inline void blit_pixel(address_space &space, int dstaddr, int srcdata, int controlbyte);
|
||||
int blitter_core(address_space &space, int sstart, int dstart, int w, int h, int data);
|
||||
|
||||
void williams_base(machine_config &config);
|
||||
void williams_muxed(machine_config &config);
|
||||
|
||||
virtual void main_map(address_map &map);
|
||||
void bubbles_main_map(address_map &map);
|
||||
void spdball_main_map(address_map &map);
|
||||
void alienar_main_map(address_map &map);
|
||||
virtual void sound_map(address_map &map);
|
||||
void sound2_map(address_map &map); // for Blaster and Sinistar cockpit
|
||||
};
|
||||
@ -214,28 +221,6 @@ private:
|
||||
required_ioport m_dial;
|
||||
};
|
||||
|
||||
// Joust, Splat: muxed inputs
|
||||
class wms_muxed_state : public williams_state
|
||||
{
|
||||
public:
|
||||
wms_muxed_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
williams_state(mconfig, type, tag),
|
||||
m_mux0(*this, "mux_0"),
|
||||
m_mux1(*this, "mux_1")
|
||||
{ }
|
||||
|
||||
void joust(machine_config &config);
|
||||
void splat(machine_config &config);
|
||||
|
||||
void init_alienar();
|
||||
|
||||
private:
|
||||
void williams_muxed(machine_config &config);
|
||||
|
||||
required_device<ls157_device> m_mux0;
|
||||
required_device<ls157_device> m_mux1;
|
||||
};
|
||||
|
||||
// Blaster: extra sound hardware
|
||||
class blaster_state : public williams_state
|
||||
{
|
||||
@ -365,6 +350,8 @@ public:
|
||||
void mysticm(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override;
|
||||
|
||||
private:
|
||||
|
@ -454,6 +454,21 @@ void williams2_state::video_control_w(u8 data)
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Mystic Marathon-specific routines
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void mysticm_state::machine_start()
|
||||
{
|
||||
williams2_state::machine_start();
|
||||
|
||||
save_item(NAME(m_bg_color));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Turkey Shoot-specific routines
|
||||
|
Loading…
Reference in New Issue
Block a user