Flicker: Boots up, some buttons working. WIP [Robbbert]

This commit is contained in:
Robbbert 2012-08-23 10:24:22 +00:00
parent 3c9c19604e
commit 259433e545
4 changed files with 171 additions and 5 deletions

1
.gitattributes vendored
View File

@ -4273,6 +4273,7 @@ src/mame/layout/fashion.lay svneol=native#text/plain
src/mame/layout/fhunter.lay svneol=native#text/plain
src/mame/layout/finallap.lay svneol=native#text/plain
src/mame/layout/firebeat.lay svneol=native#text/plain
src/mame/layout/flicker.lay svneol=native#text/plain
src/mame/layout/fortecrd.lay svneol=native#text/plain
src/mame/layout/galaxi.lay -text svneol=native#plain/text
src/mame/layout/gamball.lay svneol=native#text/plain

View File

@ -1,6 +1,25 @@
/***********************************************************************************
Flicker Pinball
Prototype create by Nutting Associates for Bally.
Seems to be the first ever microprocessor-controlled pinball machine.
2012-08-23 Made working [Robbbert]
Inputs from US Patent 4093232
Some clues from PinMAME
ToDo:
- Add remaining inputs
************************************************************************************/
#include "emu.h"
#include "cpu/i4004/i4004.h"
#include "flicker.lh"
class flicker_state : public driver_device
{
@ -9,6 +28,10 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu")
{ }
DECLARE_WRITE8_MEMBER(port00_w);
DECLARE_WRITE8_MEMBER(port01_w);
DECLARE_WRITE8_MEMBER(port10_w);
DECLARE_READ8_MEMBER(port02_r);
protected:
@ -23,22 +46,72 @@ public:
static ADDRESS_MAP_START( flicker_rom, AS_PROGRAM, 8, flicker_state )
AM_RANGE(0x0000, 0xffff) AM_NOP
AM_RANGE(0x0000, 0x03FF) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START(flicker_map, AS_DATA, 8, flicker_state )
AM_RANGE(0x0000, 0xffff) AM_NOP
AM_RANGE(0x0000, 0x00FF) AM_RAM
ADDRESS_MAP_END
static ADDRESS_MAP_START( flicker_io , AS_IO, 8, flicker_state )
AM_RANGE(0x0000, 0xffff) AM_NOP
AM_RANGE(0x0000, 0x0000) AM_WRITE(port00_w)
AM_RANGE(0x0001, 0x0001) AM_WRITE(port01_w)
AM_RANGE(0x0002, 0x0002) AM_READ(port02_r)
AM_RANGE(0x0010, 0x0010) AM_WRITE(port10_w)
ADDRESS_MAP_END
// from us patent 4093232
static INPUT_PORTS_START( flicker )
PORT_START("TEST")
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_HOME)
PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4 coins")
PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3 coins")
PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("2 coins")
PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("1 coin credit") PORT_CODE(KEYCODE_5)
PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("2 credit") PORT_CODE(KEYCODE_6)
PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3 credit") PORT_CODE(KEYCODE_7)
PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4 credit") PORT_CODE(KEYCODE_8)
PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("5 credit") PORT_CODE(KEYCODE_9)
PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("6 credit") PORT_CODE(KEYCODE_0)
PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Tilt") PORT_CODE(KEYCODE_T)
PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Start") PORT_CODE(KEYCODE_1)
PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test") PORT_CODE(KEYCODE_W)
PORT_START("B1")
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Bumper") PORT_CODE(KEYCODE_M)
INPUT_PORTS_END
READ8_MEMBER( flicker_state::port02_r )
{
offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x20; // we need the full address
if (offset == 0)
return ioport("B1")->read();
else
return 0;
}
WRITE8_MEMBER( flicker_state::port00_w )
{
static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 };
offset = cpu_get_reg(m_maincpu, I4004_RAM); // we need the full address
output_set_digit_value(offset, patterns[data]);
}
WRITE8_MEMBER( flicker_state::port01_w )
{
offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x10; // we need the full address
if (offset < 0x10)
i4004_set_test(m_maincpu, BIT(ioport("TEST")->read(), offset));
}
WRITE8_MEMBER( flicker_state::port10_w )
{
//offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x10; // we need the full address
}
void flicker_state::machine_reset()
{
}
@ -53,6 +126,9 @@ static MACHINE_CONFIG_START( flicker, flicker_state )
MCFG_CPU_PROGRAM_MAP(flicker_rom)
MCFG_CPU_DATA_MAP(flicker_map)
MCFG_CPU_IO_MAP(flicker_io)
/* Video */
MCFG_DEFAULT_LAYOUT(layout_flicker)
MACHINE_CONFIG_END
@ -61,5 +137,5 @@ ROM_START(flicker)
ROM_LOAD("flicker.rom", 0x0000, 0x0400, CRC(c692e586) SHA1(5cabb28a074d18b589b5b8f700c57e1610071c68))
ROM_END
GAME(1974, flicker, 0, flicker, flicker, flicker_state, flicker, ROT0, "Nutting Associates", "Flicker (Prototype)", GAME_IS_SKELETON_MECHANICAL)
// YEAR GAME PARENT MACHINE INPUT CLASS INIT ORIENTATION COMPANY DESCRIPTION FLAGS
GAME(1974, flicker, 0, flicker, flicker, flicker_state, flicker, ROT0, "Nutting Associates", "Flicker (Prototype)", GAME_IS_SKELETON_MECHANICAL)

View File

@ -0,0 +1,87 @@
<!-- flicker.lay -->
<!-- 2012-08-22: Initial version. [Robbbert] -->
<mamelayout version="2">
<element name="digit" defstate="0">
<led7seg>
<color red="1.0" green="0.0" blue="0.0" />
</led7seg>
</element>
<element name="background">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.0" green="0.0" blue="0.0" />
</rect>
</element>
<element name="P0"><text string="Ball"><color red="1.0" green="1.0" blue="1.0" /></text></element>
<element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element>
<element name="P2"><text string="Match"><color red="1.0" green="1.0" blue="1.0" /></text></element>
<element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
<element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element>
<view name="Default Layout">
<!-- Background -->
<backdrop element="background">
<bounds left="0" top="0" right="674" bottom="194" />
</backdrop>
<!-- LEDs -->
<bezel name="digit15" element="digit">
<bounds left="10" top="45" right="44" bottom="84" />
</bezel>
<bezel name="digit14" element="digit">
<bounds left="54" top="45" right="88" bottom="84" />
</bezel>
<bezel name="digit13" element="digit">
<bounds left="98" top="45" right="132" bottom="84" />
</bezel>
<bezel name="digit12" element="digit">
<bounds left="142" top="45" right="176" bottom="84" />
</bezel>
<bezel name="digit11" element="digit">
<bounds left="186" top="45" right="220" bottom="84" />
</bezel>
<bezel name="digit10" element="digit">
<bounds left="230" top="45" right="264" bottom="84" />
</bezel>
<bezel name="digit8" element="digit">
<bounds left="410" top="45" right="444" bottom="84" />
</bezel>
<bezel name="digit7" element="digit">
<bounds left="454" top="45" right="488" bottom="84" />
</bezel>
<bezel name="digit6" element="digit">
<bounds left="498" top="45" right="532" bottom="84" />
</bezel>
<bezel name="digit5" element="digit">
<bounds left="542" top="45" right="576" bottom="84" />
</bezel>
<bezel name="digit4" element="digit">
<bounds left="586" top="45" right="620" bottom="84" />
</bezel>
<bezel name="digit3" element="digit">
<bounds left="630" top="45" right="664" bottom="84" />
</bezel>
<bezel name="digit9" element="digit">
<bounds left="123" top="145" right="157" bottom="184" />
</bezel>
<bezel name="digit2" element="digit">
<bounds left="528" top="145" right="562" bottom="184" />
</bezel>
<bezel name="digit1" element="digit">
<bounds left="311" top="145" right="345" bottom="184" />
</bezel>
<bezel name="digit0" element="digit">
<bounds left="355" top="145" right="389" bottom="184" />
</bezel>
<bezel element="P0"><bounds left="120" right="160" top="110" bottom="135" /></bezel>
<bezel element="P1"><bounds left="320" right="380" top="110" bottom="135" /></bezel>
<bezel element="P2"><bounds left="520" right="570" top="110" bottom="135" /></bezel>
<bezel element="P3"><bounds left="100" right="200" top="10" bottom="35" /></bezel>
<bezel element="P4"><bounds left="500" right="600" top="10" bottom="35" /></bezel>
</view>
</mamelayout>

View File

@ -2033,6 +2033,8 @@ $(DRIVERS)/dlair.o: $(LAYOUT)/dlair.lh
$(DRIVERS)/firebeat.o: $(LAYOUT)/firebeat.lh
$(DRIVERS)/flicker.o: $(LAYOUT)/flicker.lh
$(DRIVERS)/fortecar.o: $(LAYOUT)/fortecrd.lh
$(DRIVERS)/funworld.o: $(LAYOUT)/jollycrd.lh \