Previous 199869 Revisions Next

r17417 Thursday 23rd August, 2012 at 10:24:22 UTC by Robbbert
Flicker: Boots up, some buttons working. WIP [Robbbert]
[src/mame]mame.mak
[src/mame/drivers]flicker.c
[src/mame/layout]flicker.lay*

trunk/src/mame/mame.mak
r17416r17417
20332033
20342034$(DRIVERS)/firebeat.o:   $(LAYOUT)/firebeat.lh
20352035
2036$(DRIVERS)/flicker.o:   $(LAYOUT)/flicker.lh
2037
20362038$(DRIVERS)/fortecar.o:   $(LAYOUT)/fortecrd.lh
20372039
20382040$(DRIVERS)/funworld.o:   $(LAYOUT)/jollycrd.lh \
trunk/src/mame/layout/flicker.lay
r0r17417
1<!-- flicker.lay -->
2
3<!-- 2012-08-22: Initial version.  [Robbbert] -->
4
5<mamelayout version="2">
6
7   <element name="digit" defstate="0">
8      <led7seg>
9         <color red="1.0" green="0.0" blue="0.0" />
10      </led7seg>
11   </element>
12
13   <element name="background">
14      <rect>
15         <bounds left="0" top="0" right="1" bottom="1" />
16         <color red="0.0" green="0.0" blue="0.0" />
17      </rect>
18   </element>
19   <element name="P0"><text string="Ball"><color red="1.0" green="1.0" blue="1.0" /></text></element>
20   <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element>
21   <element name="P2"><text string="Match"><color red="1.0" green="1.0" blue="1.0" /></text></element>
22   <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
23   <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element>
24
25   <view name="Default Layout">
26
27      <!-- Background -->
28      <backdrop element="background">
29         <bounds left="0" top="0" right="674" bottom="194" />
30      </backdrop>
31
32      <!-- LEDs -->
33      <bezel name="digit15" element="digit">
34         <bounds left="10" top="45" right="44" bottom="84" />
35      </bezel>
36      <bezel name="digit14" element="digit">
37         <bounds left="54" top="45" right="88" bottom="84" />
38      </bezel>
39      <bezel name="digit13" element="digit">
40         <bounds left="98" top="45" right="132" bottom="84" />
41      </bezel>
42      <bezel name="digit12" element="digit">
43         <bounds left="142" top="45" right="176" bottom="84" />
44      </bezel>
45      <bezel name="digit11" element="digit">
46         <bounds left="186" top="45" right="220" bottom="84" />
47      </bezel>
48      <bezel name="digit10" element="digit">
49         <bounds left="230" top="45" right="264" bottom="84" />
50      </bezel>
51      <bezel name="digit8" element="digit">
52         <bounds left="410" top="45" right="444" bottom="84" />
53      </bezel>
54      <bezel name="digit7" element="digit">
55         <bounds left="454" top="45" right="488" bottom="84" />
56      </bezel>
57      <bezel name="digit6" element="digit">
58         <bounds left="498" top="45" right="532" bottom="84" />
59      </bezel>
60      <bezel name="digit5" element="digit">
61         <bounds left="542" top="45" right="576" bottom="84" />
62      </bezel>
63      <bezel name="digit4" element="digit">
64         <bounds left="586" top="45" right="620" bottom="84" />
65      </bezel>
66      <bezel name="digit3" element="digit">
67         <bounds left="630" top="45" right="664" bottom="84" />
68      </bezel>
69      <bezel name="digit9" element="digit">
70         <bounds left="123" top="145" right="157" bottom="184" />
71      </bezel>
72      <bezel name="digit2" element="digit">
73         <bounds left="528" top="145" right="562" bottom="184" />
74      </bezel>
75      <bezel name="digit1" element="digit">
76         <bounds left="311" top="145" right="345" bottom="184" />
77      </bezel>
78      <bezel name="digit0" element="digit">
79         <bounds left="355" top="145" right="389" bottom="184" />
80      </bezel>
81      <bezel element="P0"><bounds left="120" right="160" top="110" bottom="135" /></bezel>
82      <bezel element="P1"><bounds left="320" right="380" top="110" bottom="135" /></bezel>
83      <bezel element="P2"><bounds left="520" right="570" top="110" bottom="135" /></bezel>
84      <bezel element="P3"><bounds left="100" right="200" top="10" bottom="35" /></bezel>
85      <bezel element="P4"><bounds left="500" right="600" top="10" bottom="35" /></bezel>
86   </view>
87</mamelayout>
trunk/src/mame/drivers/flicker.c
r17416r17417
1/***********************************************************************************
12
3  Flicker Pinball
4
5  Prototype create by Nutting Associates for Bally.
6
7  Seems to be the first ever microprocessor-controlled pinball machine.
8
9  2012-08-23 Made working [Robbbert]
10
11  Inputs from US Patent 4093232
12  Some clues from PinMAME
13
14ToDo:
15- Add remaining inputs
16
17
18************************************************************************************/
19
220#include "emu.h"
321#include "cpu/i4004/i4004.h"
22#include "flicker.lh"
423
524class flicker_state : public driver_device
625{
r17416r17417
928      : driver_device(mconfig, type, tag),
1029        m_maincpu(*this, "maincpu")
1130   { }
31   DECLARE_WRITE8_MEMBER(port00_w);
32   DECLARE_WRITE8_MEMBER(port01_w);
33   DECLARE_WRITE8_MEMBER(port10_w);
34   DECLARE_READ8_MEMBER(port02_r);
1235
1336protected:
1437
r17416r17417
2346
2447
2548static ADDRESS_MAP_START( flicker_rom, AS_PROGRAM, 8, flicker_state )
26   AM_RANGE(0x0000, 0xffff) AM_NOP
2749   AM_RANGE(0x0000, 0x03FF) AM_ROM
2850ADDRESS_MAP_END
2951
3052static ADDRESS_MAP_START(flicker_map, AS_DATA, 8, flicker_state )
31   AM_RANGE(0x0000, 0xffff) AM_NOP
3253   AM_RANGE(0x0000, 0x00FF) AM_RAM
3354ADDRESS_MAP_END
3455
3556static ADDRESS_MAP_START( flicker_io , AS_IO, 8, flicker_state )
36   AM_RANGE(0x0000, 0xffff) AM_NOP
57   AM_RANGE(0x0000, 0x0000) AM_WRITE(port00_w)
58   AM_RANGE(0x0001, 0x0001) AM_WRITE(port01_w)
59   AM_RANGE(0x0002, 0x0002) AM_READ(port02_r)
60   AM_RANGE(0x0010, 0x0010) AM_WRITE(port10_w)
3761ADDRESS_MAP_END
3862
63// from us patent 4093232
3964static INPUT_PORTS_START( flicker )
65   PORT_START("TEST")
66   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_HOME)
67   PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4 coins")
68   PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3 coins")
69   PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("2 coins")
70   PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("1 coin credit") PORT_CODE(KEYCODE_5)
71   PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("2 credit") PORT_CODE(KEYCODE_6)
72   PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3 credit") PORT_CODE(KEYCODE_7)
73   PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4 credit") PORT_CODE(KEYCODE_8)
74   PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("5 credit") PORT_CODE(KEYCODE_9)
75   PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("6 credit") PORT_CODE(KEYCODE_0)
76   PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Tilt") PORT_CODE(KEYCODE_T)
77   PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Start") PORT_CODE(KEYCODE_1)
78   PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test") PORT_CODE(KEYCODE_W)
79
80   PORT_START("B1")
81   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Bumper") PORT_CODE(KEYCODE_M)
4082INPUT_PORTS_END
4183
84READ8_MEMBER( flicker_state::port02_r )
85{
86   offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x20; // we need the full address
87
88   if (offset == 0)
89      return ioport("B1")->read();
90   else
91      return 0;
92}
93
94WRITE8_MEMBER( flicker_state::port00_w )
95{
96   static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 };
97   offset = cpu_get_reg(m_maincpu, I4004_RAM); // we need the full address
98   output_set_digit_value(offset, patterns[data]);
99}
100
101WRITE8_MEMBER( flicker_state::port01_w )
102{
103   offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x10; // we need the full address
104
105   if (offset < 0x10)
106      i4004_set_test(m_maincpu, BIT(ioport("TEST")->read(), offset));
107}
108
109WRITE8_MEMBER( flicker_state::port10_w )
110{
111   //offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x10; // we need the full address
112}
113
114
42115void flicker_state::machine_reset()
43116{
44117}
r17416r17417
53126   MCFG_CPU_PROGRAM_MAP(flicker_rom)
54127   MCFG_CPU_DATA_MAP(flicker_map)
55128   MCFG_CPU_IO_MAP(flicker_io)
129
130   /* Video */
131   MCFG_DEFAULT_LAYOUT(layout_flicker)
56132MACHINE_CONFIG_END
57133
58134
r17416r17417
61137   ROM_LOAD("flicker.rom", 0x0000, 0x0400, CRC(c692e586) SHA1(5cabb28a074d18b589b5b8f700c57e1610071c68))
62138ROM_END
63139
64
65GAME(1974,  flicker,  0,  flicker,  flicker, flicker_state,  flicker,  ROT0,  "Nutting Associates",    "Flicker (Prototype)",    GAME_IS_SKELETON_MECHANICAL)
140//   YEAR    GAME     PARENT  MACHINE   INPUT    CLASS           INIT      ORIENTATION    COMPANY             DESCRIPTION             FLAGS
141GAME(1974,  flicker,  0,      flicker,  flicker, flicker_state,  flicker,  ROT0,        "Nutting Associates", "Flicker (Prototype)", GAME_IS_SKELETON_MECHANICAL)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team