mirror of
https://github.com/holub/mame
synced 2025-06-26 22:29:10 +03:00
Merge pull request #2023 from SailorSat/master
polyplay: lightorgan + optional layout
This commit is contained in:
commit
29414640d6
@ -104,9 +104,9 @@ i/o ports:
|
|||||||
bit 7 = coin sensor (+IRQ to make the game acknowledge it)
|
bit 7 = coin sensor (+IRQ to make the game acknowledge it)
|
||||||
|
|
||||||
85 PIO PORT B
|
85 PIO PORT B
|
||||||
bit 0-4 = light organ (unemulated :)) )
|
bit 0-2 = light organ
|
||||||
bit 5-7 = sound parameter (unemulated, it's very difficult to
|
bit 3-4 = control panel (not connected)
|
||||||
figure out how those work)
|
bit 5-7 = sound parameter (not used on production units?)
|
||||||
|
|
||||||
86 PIO CTRL A
|
86 PIO CTRL A
|
||||||
|
|
||||||
@ -135,6 +135,7 @@ this.)
|
|||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "cpu/z80/z80daisy.h"
|
#include "cpu/z80/z80daisy.h"
|
||||||
#include "includes/polyplay.h"
|
#include "includes/polyplay.h"
|
||||||
|
#include "polyplay.lh"
|
||||||
|
|
||||||
static const z80_daisy_config daisy_chain_zre[] =
|
static const z80_daisy_config daisy_chain_zre[] =
|
||||||
{
|
{
|
||||||
@ -151,6 +152,11 @@ static const z80_daisy_config daisy_chain_zrepp[] =
|
|||||||
{ nullptr }
|
{ nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
INTERRUPT_GEN_MEMBER(polyplay_state::nmi_handler)
|
||||||
|
{
|
||||||
|
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||||
|
}
|
||||||
|
|
||||||
/* I/O Port handling */
|
/* I/O Port handling */
|
||||||
WRITE_LINE_MEMBER(polyplay_state::ctc_zc2_w)
|
WRITE_LINE_MEMBER(polyplay_state::ctc_zc2_w)
|
||||||
{
|
{
|
||||||
@ -176,14 +182,47 @@ READ8_MEMBER(polyplay_state::pio_portb_r)
|
|||||||
|
|
||||||
WRITE8_MEMBER(polyplay_state::pio_portb_w)
|
WRITE8_MEMBER(polyplay_state::pio_portb_w)
|
||||||
{
|
{
|
||||||
/* ZRE
|
uint8_t lightState = data & 0x07;
|
||||||
pio_portb_w: 78
|
//uint8_t soundState = data & 0xe0;
|
||||||
*/
|
|
||||||
|
|
||||||
/* ZRE-PP
|
// there is a DS8205D attached to bit 0 and 1
|
||||||
pio_portb_w: f8
|
switch (lightState)
|
||||||
*/
|
{
|
||||||
osd_printf_verbose("pio_portb_w: %02x\n", data);
|
case 0:
|
||||||
|
output().set_lamp_value(1, 1);
|
||||||
|
output().set_lamp_value(2, 0);
|
||||||
|
output().set_lamp_value(3, 0);
|
||||||
|
output().set_lamp_value(4, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
output().set_lamp_value(1, 0);
|
||||||
|
output().set_lamp_value(2, 1);
|
||||||
|
output().set_lamp_value(3, 0);
|
||||||
|
output().set_lamp_value(4, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
output().set_lamp_value(1, 0);
|
||||||
|
output().set_lamp_value(2, 0);
|
||||||
|
output().set_lamp_value(3, 1);
|
||||||
|
output().set_lamp_value(4, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
output().set_lamp_value(1, 0);
|
||||||
|
output().set_lamp_value(2, 0);
|
||||||
|
output().set_lamp_value(3, 0);
|
||||||
|
output().set_lamp_value(4, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
output().set_lamp_value(1, 0);
|
||||||
|
output().set_lamp_value(2, 0);
|
||||||
|
output().set_lamp_value(3, 0);
|
||||||
|
output().set_lamp_value(4, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INPUT_CHANGED_MEMBER(polyplay_state::input_changed)
|
INPUT_CHANGED_MEMBER(polyplay_state::input_changed)
|
||||||
@ -274,6 +313,7 @@ static MACHINE_CONFIG_START( polyplay_zre, polyplay_state )
|
|||||||
MCFG_Z80_DAISY_CHAIN(daisy_chain_zre)
|
MCFG_Z80_DAISY_CHAIN(daisy_chain_zre)
|
||||||
MCFG_CPU_PROGRAM_MAP(polyplay_mem_zre)
|
MCFG_CPU_PROGRAM_MAP(polyplay_mem_zre)
|
||||||
MCFG_CPU_IO_MAP(polyplay_io_zre)
|
MCFG_CPU_IO_MAP(polyplay_io_zre)
|
||||||
|
MCFG_CPU_PERIODIC_INT_DRIVER(polyplay_state, nmi_handler, 100) /* A302 - zero cross detection from AC (50Hz) */
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
MCFG_DEVICE_ADD(Z80CTC_TAG, Z80CTC, POLYPLAY_MAIN_CLOCK / 4) /* UB857D */
|
MCFG_DEVICE_ADD(Z80CTC_TAG, Z80CTC, POLYPLAY_MAIN_CLOCK / 4) /* UB857D */
|
||||||
@ -393,6 +433,6 @@ ROM_START( polyplay2c )
|
|||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
/* game driver */
|
/* game driver */
|
||||||
GAME( 1986, polyplay, 0, polyplay_zre, polyplay, driver_device, 0, ROT0, "VEB Polytechnik Karl-Marx-Stadt", "Poly-Play (ZRE)", 0 )
|
GAMEL( 1986, polyplay, 0, polyplay_zre, polyplay, driver_device, 0, ROT0, "VEB Polytechnik Karl-Marx-Stadt", "Poly-Play (ZRE)", 0, layout_polyplay )
|
||||||
GAME( 1989, polyplay2, 0, polyplay_zrepp, polyplay, driver_device, 0, ROT0, "VEB Polytechnik Karl-Marx-Stadt", "Poly-Play (ZRE-PP)", 0 )
|
GAMEL( 1989, polyplay2, 0, polyplay_zrepp, polyplay, driver_device, 0, ROT0, "VEB Polytechnik Karl-Marx-Stadt", "Poly-Play (ZRE-PP)", 0, layout_polyplay )
|
||||||
GAME( 1989, polyplay2c, polyplay2, polyplay_zrepp, polyplay, driver_device, 0, ROT0, "VEB Polytechnik Karl-Marx-Stadt", "Poly-Play (ZRE-PP - Czech)", 0 )
|
GAMEL( 1989, polyplay2c, polyplay2, polyplay_zrepp, polyplay, driver_device, 0, ROT0, "VEB Polytechnik Karl-Marx-Stadt", "Poly-Play (ZRE-PP - Czech)", 0, layout_polyplay )
|
||||||
|
@ -42,6 +42,8 @@ public:
|
|||||||
required_device<gfxdecode_device> m_gfxdecode;
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
|
|
||||||
|
INTERRUPT_GEN_MEMBER(nmi_handler);
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
DECLARE_WRITE_LINE_MEMBER(ctc_zc0_w);
|
DECLARE_WRITE_LINE_MEMBER(ctc_zc0_w);
|
||||||
DECLARE_WRITE_LINE_MEMBER(ctc_zc1_w);
|
DECLARE_WRITE_LINE_MEMBER(ctc_zc1_w);
|
||||||
|
117
src/mame/layout/polyplay.lay
Normal file
117
src/mame/layout/polyplay.lay
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<mamelayout version="2">
|
||||||
|
<element name="red1">
|
||||||
|
<text state ="0" string="Y">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.3" green="0.1" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
<text state ="1" string="Y">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="1.0" green="0.1" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
<element name="blue1">
|
||||||
|
<text state ="0" string="A">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.1" green="0.1" blue="0.3" />
|
||||||
|
</text>
|
||||||
|
<text state ="1" string="A">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.1" green="0.1" blue="1.0" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
<element name="yellow1">
|
||||||
|
<text state ="0" string="L">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.3" green="0.3" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
<text state ="1" string="L">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="1.0" green="1.0" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
<element name="green1">
|
||||||
|
<text state ="0" string="P">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.1" green="0.3" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
<text state ="1" string="P">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.1" green="1.0" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
<element name="red2">
|
||||||
|
<text state ="0" string="Y">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.3" green="0.1" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
<text state ="1" string="Y">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="1.0" green="0.1" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
<element name="blue2">
|
||||||
|
<text state ="0" string="L">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.1" green="0.1" blue="0.3" />
|
||||||
|
</text>
|
||||||
|
<text state ="1" string="L">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.1" green="0.1" blue="1.0" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
<element name="yellow2">
|
||||||
|
<text state ="0" string="O">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.3" green="0.3" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
<text state ="1" string="O">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="1.0" green="1.0" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
<element name="green2">
|
||||||
|
<text state ="0" string="P">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.1" green="0.3" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
<text state ="1" string="P">
|
||||||
|
<bounds x="0" y="0" width="7" height="7" />
|
||||||
|
<color red="0.1" green="1.0" blue="0.1" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
<view name="Screen only">
|
||||||
|
<screen index="0">
|
||||||
|
<bounds x="0" y="0" width="4" height="3" />
|
||||||
|
</screen>
|
||||||
|
</view>
|
||||||
|
<view name="Screen + Lights">
|
||||||
|
<backdrop name="lamp1" element="red1" state="0">
|
||||||
|
<bounds x="7" y="0" width="1" height="1"/>
|
||||||
|
</backdrop>
|
||||||
|
<backdrop name="lamp2" element="blue1" state="0">
|
||||||
|
<bounds x="6" y="0" width="1" height="1"/>
|
||||||
|
</backdrop>
|
||||||
|
<backdrop name="lamp3" element="yellow1" state="0">
|
||||||
|
<bounds x="5" y="0" width="1" height="1"/>
|
||||||
|
</backdrop>
|
||||||
|
<backdrop name="lamp4" element="green1" state="0">
|
||||||
|
<bounds x="4" y="0" width="1" height="1"/>
|
||||||
|
</backdrop>
|
||||||
|
<backdrop name="lamp1" element="red2" state="0">
|
||||||
|
<bounds x="3" y="0" width="1" height="1"/>
|
||||||
|
</backdrop>
|
||||||
|
<backdrop name="lamp2" element="blue2" state="0">
|
||||||
|
<bounds x="2" y="0" width="1" height="1"/>
|
||||||
|
</backdrop>
|
||||||
|
<backdrop name="lamp3" element="yellow2" state="0">
|
||||||
|
<bounds x="1" y="0" width="1" height="1"/>
|
||||||
|
</backdrop>
|
||||||
|
<backdrop name="lamp4" element="green2" state="0">
|
||||||
|
<bounds x="0" y="0" width="1" height="1"/>
|
||||||
|
</backdrop>
|
||||||
|
<screen index="0">
|
||||||
|
<bounds x="0" y="1" width="8" height="6" />
|
||||||
|
</screen>
|
||||||
|
</view>
|
||||||
|
</mamelayout>
|
Loading…
Reference in New Issue
Block a user