Previous 199869 Revisions Next

r18746 Sunday 28th October, 2012 at 13:24:39 UTC by Robbbert
Pennant Fever is now WORKING [Robbbert].
[src/mame/drivers]s8.c
[src/mame/layout]s8.lay

trunk/src/mame/layout/s8.lay
r18745r18746
66
77   <element name="digit" defstate="0">
88      <led7seg>
9         <color red="1.0" green="0.25" blue="0.0" />
9         <color red="1.0" green="1.0" blue="0.0" />
1010      </led7seg>
1111   </element>
12   <element name="red_led">
13      <disk><color red="1.0" green="0.0" blue="0.0" /></disk>
12   <element name="diag" defstate="0">
13      <led7seg>
14         <color red="1.0" green="0.0" blue="0.0" />
15      </led7seg>
1416   </element>
1517   <element name="background">
1618      <rect>
r18745r18746
1820         <color red="0.0" green="0.0" blue="0.0" />
1921      </rect>
2022   </element>
21   <element name="P0"><text string="Ball / Match"><color red="1.0" green="1.0" blue="1.0" /></text></element>
22   <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element>
23   <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
24   <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element>
25   <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element>
26   <element name="P6"><text string="Player 4"><color red="1.0" green="1.0" blue="1.0" /></text></element>
23   <element name="P0"><text string="Diag"><color red="1.0" green="1.0" blue="1.0" /></text></element>
24   <element name="P1"><text string="Innings"><color red="1.0" green="1.0" blue="1.0" /></text></element>
25   <element name="P3"><text string="Visitors"><color red="1.0" green="1.0" blue="1.0" /></text></element>
26   <element name="P4"><text string="Home"><color red="1.0" green="1.0" blue="1.0" /></text></element>
27   <element name="P5"><text string="Strikes"><color red="1.0" green="1.0" blue="1.0" /></text></element>
28   <element name="P6"><text string="Outs"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2729
2830   <view name="Default Layout">
2931
3032      <!-- Background -->
3133      <backdrop element="background">
32         <bounds left="0" top="20" right="274" bottom="394" />
34         <bounds left="0" top="20" right="318" bottom="154" />
3335      </backdrop>
3436
3537      <!-- LEDs -->
3638
37      <!-- Player 1 Score -->
38
39      <bezel name="digit0" element="digit">
39      <bezel name="digit1" element="digit">
4040         <bounds left="10" top="45" right="44" bottom="84" />
4141      </bezel>
42      <bezel name="digit1" element="digit">
42      <bezel name="digit2" element="digit">
4343         <bounds left="54" top="45" right="88" bottom="84" />
4444      </bezel>
45      <bezel name="digit2" element="digit">
45      <bezel name="digit3" element="digit">
4646         <bounds left="98" top="45" right="132" bottom="84" />
4747      </bezel>
48      <bezel name="digit3" element="digit">
48      <bezel name="digit4" element="digit">
4949         <bounds left="142" top="45" right="176" bottom="84" />
5050      </bezel>
51      <bezel name="digit4" element="digit">
51      <bezel name="digit5" element="digit">
5252         <bounds left="186" top="45" right="220" bottom="84" />
5353      </bezel>
54      <bezel name="digit5" element="digit">
54      <bezel name="digit6" element="digit">
5555         <bounds left="230" top="45" right="264" bottom="84" />
5656      </bezel>
57      <bezel name="digit7" element="digit">
58         <bounds left="274" top="45" right="308" bottom="84" />
59      </bezel>
5760
58      <!-- Player 2 Score -->
59      <bezel name="digit8" element="digit">
61      <!-- Player 4 Score -->
62      <bezel name="digit9" element="digit">
6063         <bounds left="10" top="105" right="44" bottom="144" />
6164      </bezel>
62      <bezel name="digit9" element="digit">
65      <bezel name="digit10" element="digit">
6366         <bounds left="54" top="105" right="88" bottom="144" />
6467      </bezel>
65      <bezel name="digit10" element="digit">
68      <bezel name="digit11" element="digit">
6669         <bounds left="98" top="105" right="132" bottom="144" />
6770      </bezel>
68      <bezel name="digit11" element="digit">
71      <bezel name="digit12" element="digit">
6972         <bounds left="142" top="105" right="176" bottom="144" />
7073      </bezel>
71      <bezel name="digit12" element="digit">
74      <bezel name="digit13" element="digit">
7275         <bounds left="186" top="105" right="220" bottom="144" />
7376      </bezel>
74      <bezel name="digit13" element="digit">
77      <bezel name="digit60" element="diag">
7578         <bounds left="230" top="105" right="264" bottom="144" />
7679      </bezel>
77
78      <!-- Player 3 Score -->
79      <bezel name="digit16" element="digit">
80         <bounds left="10" top="165" right="44" bottom="204" />
81      </bezel>
82      <bezel name="digit17" element="digit">
83         <bounds left="54" top="165" right="88" bottom="204" />
84      </bezel>
85      <bezel name="digit18" element="digit">
86         <bounds left="98" top="165" right="132" bottom="204" />
87      </bezel>
88      <bezel name="digit19" element="digit">
89         <bounds left="142" top="165" right="176" bottom="204" />
90      </bezel>
91      <bezel name="digit20" element="digit">
92         <bounds left="186" top="165" right="220" bottom="204" />
93      </bezel>
94      <bezel name="digit21" element="digit">
95         <bounds left="230" top="165" right="264" bottom="204" />
96      </bezel>
97
98      <!-- Player 4 Score -->
99      <bezel name="digit24" element="digit">
100         <bounds left="10" top="225" right="44" bottom="264" />
101      </bezel>
102      <bezel name="digit25" element="digit">
103         <bounds left="54" top="225" right="88" bottom="264" />
104      </bezel>
105      <bezel name="digit26" element="digit">
106         <bounds left="98" top="225" right="132" bottom="264" />
107      </bezel>
108      <bezel name="digit27" element="digit">
109         <bounds left="142" top="225" right="176" bottom="264" />
110      </bezel>
111      <bezel name="digit28" element="digit">
112         <bounds left="186" top="225" right="220" bottom="264" />
113      </bezel>
114      <bezel name="digit29" element="digit">
115         <bounds left="230" top="225" right="264" bottom="264" />
116      </bezel>
117
118      <!-- Credits and Balls -->
119      <bezel name="digit14" element="digit">
120         <bounds left="10" top="345" right="44" bottom="384" />
121      </bezel>
12280      <bezel name="digit15" element="digit">
123         <bounds left="54" top="345" right="88" bottom="384" />
81         <bounds left="274" top="105" right="308" bottom="144" />
12482      </bezel>
125      <bezel name="digit8" element="digit">
126         <bounds left="186" top="345" right="220" bottom="384" />
127      </bezel>
128      <bezel name="digit7" element="digit">
129         <bounds left="230" top="345" right="264" bottom="384" />
130      </bezel>
131      <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel>
132      <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel>
133      <bezel name="text3" element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel>
134      <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel>
135      <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel>
136      <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel>
137      <bezel name="led0" element="red_led">
138         <bounds left="110" right="125" top="360" bottom="375" /></bezel>
139      <bezel name="led1" element="red_led">
140         <bounds left="144" right="159" top="360" bottom="375" /></bezel>
83
84      <bezel element="P0"><bounds left="230" right="258" top="90" bottom="102" /></bezel>
85      <bezel element="P1"><bounds left="30" right="88" top="90" bottom="102" /></bezel>
86      <bezel element="P3"><bounds left="45" right="95" top="30" bottom="42" /></bezel>
87      <bezel element="P4"><bounds left="220" right="274" top="30" bottom="42" /></bezel>
88      <bezel element="P5"><bounds left="170" right="230" top="90" bottom="102" /></bezel>
89      <bezel element="P6"><bounds left="270" right="310" top="90" bottom="102" /></bezel>
14190   </view>
14291</mamelayout>
trunk/src/mame/drivers/s8.c
r18745r18746
77
88    - Pennant Fever, which isn't a true pinball, it is a baseball game where you aim
99      for targets at the top of the playfield, and the players advance towards a
10      home run. There are no bumpers or other 'usual' pinball items.
10      home run. There are no bumpers or other 'usual' pinball items. 1 or 2 players.
11      How to play:
12      - Insert coin (credits shows in innings)
13      - Start game
14      - Player 1 is 'Visitors'; optional Player 2 is 'Home'
15      - Press one of L,B,C,V to hit the ball; or comma,period,slash for a home run;
16        or (F then A) for a Strike; or N,Z for Out.
17      - Wait for score to start flashing (this can take minutes, literally)
18      - Press another key, etc
19      - When you have 3 strikes, you are Out
20      - When you have 3 Outs, your Innings ends (other player gets a turn)
21      - After 3 Innings, it's game over.
22      - Match digit appears in Outs digit.     
1123
1224    - Still Crazy, a novelty game where the playfield is completely vertical. It has
1325      4 flippers and the idea is to get the ball up to the alcohol 'still' before
1426      the 'revenuers' do. The idea didn't catch on, and the game was not officially
15      released.
27      released. 1 player.
1628
1729ToDo:
18- Everything
19- Identify devices at 200x and 210x
20- Pennant Fever maincpu goes into lala-land after a rti.
30- Get Still Crazy to work.
2131
2232************************************************************************************/
2333
r18745r18746
3747   m_maincpu(*this, "maincpu"),
3848   m_audiocpu(*this, "audiocpu"),
3949   m_dac(*this, "dac"),
40   m_pia0(*this, "pia0"),
41   m_pia1(*this, "pia1"),
42   m_pia2(*this, "pia2"),
43   m_pia3(*this, "pia3"),
44   m_pia4(*this, "pia4")
50   m_pia(*this, "pia"),
51   m_pia21(*this, "pia21"),
52   m_pia24(*this, "pia24"),
53   m_pia28(*this, "pia28"),
54   m_pia30(*this, "pia30")
4555   { }
4656
4757   DECLARE_READ8_MEMBER(dac_r);
r18745r18746
4959   DECLARE_WRITE8_MEMBER(dig0_w);
5060   DECLARE_WRITE8_MEMBER(dig1_w);
5161   DECLARE_WRITE8_MEMBER(lamp0_w);
52   DECLARE_WRITE8_MEMBER(lamp1_w);
53   DECLARE_WRITE8_MEMBER(sol0_w);
54   DECLARE_WRITE8_MEMBER(sol1_w);
62   DECLARE_WRITE8_MEMBER(lamp1_w) { };
63   DECLARE_WRITE8_MEMBER(sol2_w) { }; // solenoids 8-15
64   DECLARE_WRITE8_MEMBER(sol3_w); // solenoids 0-7
65   DECLARE_WRITE8_MEMBER(sound_w);
5566   DECLARE_READ8_MEMBER(dips_r);
5667   DECLARE_READ8_MEMBER(switch_r);
5768   DECLARE_WRITE8_MEMBER(switch_w);
58   DECLARE_READ_LINE_MEMBER(pia2_ca1_r);
59   DECLARE_READ_LINE_MEMBER(pia2_cb1_r);
60   DECLARE_READ_LINE_MEMBER(pia4_cb1_r);
61   DECLARE_WRITE_LINE_MEMBER(pia0_ca2_w) { }; //ST5
62   DECLARE_WRITE_LINE_MEMBER(pia0_cb2_w) { }; //ST-solenoids enable
63   DECLARE_WRITE_LINE_MEMBER(pia1_ca2_w) { }; //ST2
64   DECLARE_WRITE_LINE_MEMBER(pia1_cb2_w) { }; //ST1
65   DECLARE_WRITE_LINE_MEMBER(pia2_ca2_w) { }; //diag leds enable
66   DECLARE_WRITE_LINE_MEMBER(pia2_cb2_w) { }; //ST6
67   DECLARE_WRITE_LINE_MEMBER(pia3_ca2_w) { }; //ST4
68   DECLARE_WRITE_LINE_MEMBER(pia3_cb2_w) { }; //ST3
69   DECLARE_READ_LINE_MEMBER(pia_ca1_r);
70   DECLARE_READ_LINE_MEMBER(pia21_ca1_r);
71   DECLARE_READ_LINE_MEMBER(pia28_ca1_r);
72   DECLARE_READ_LINE_MEMBER(pia28_cb1_r);
73   DECLARE_WRITE_LINE_MEMBER(pia_ca2_w);
74   DECLARE_WRITE_LINE_MEMBER(pia_cb2_w);
75   DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w);
76   DECLARE_WRITE_LINE_MEMBER(pia21_cb2_w) { }; // enable solenoids
77   DECLARE_WRITE_LINE_MEMBER(pia28_ca2_w) { }; // comma3&4
78   DECLARE_WRITE_LINE_MEMBER(pia28_cb2_w) { }; // comma1&2
6979   TIMER_DEVICE_CALLBACK_MEMBER(irq);
7080   DECLARE_INPUT_CHANGED_MEMBER(main_nmi);
7181   DECLARE_INPUT_CHANGED_MEMBER(audio_nmi);
7282   DECLARE_MACHINE_RESET(s8);
73   DECLARE_MACHINE_RESET(s8a);
7483protected:
7584
7685   // devices
7786   required_device<cpu_device> m_maincpu;
7887   optional_device<cpu_device> m_audiocpu;
7988   optional_device<dac_device> m_dac;
80   required_device<pia6821_device> m_pia0;
81   required_device<pia6821_device> m_pia1;
82   required_device<pia6821_device> m_pia2;
83   required_device<pia6821_device> m_pia3;
84   optional_device<pia6821_device> m_pia4;
89   optional_device<pia6821_device> m_pia;
90   required_device<pia6821_device> m_pia21;
91   required_device<pia6821_device> m_pia24;
92   required_device<pia6821_device> m_pia28;
93   required_device<pia6821_device> m_pia30;
8594private:
8695   UINT8 m_t_c;
8796   UINT8 m_sound_data;
8897   UINT8 m_strobe;
8998   UINT8 m_kbdrow;
90   bool m_cb1;
99   bool m_ca1;
91100   bool m_data_ok;
92   bool m_chimes;
93101};
94102
95103static ADDRESS_MAP_START( s8_main_map, AS_PROGRAM, 8, s8_state )
96104   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
97   AM_RANGE(0x0000, 0x07ff) AM_RAM
98   //AM_RANGE(0x0100, 0x01ff) AM_RAM AM_SHARE("nvram")
99   AM_RANGE(0x2200, 0x2203) AM_DEVREADWRITE("pia0", pia6821_device, read, write) // solenoids
100   AM_RANGE(0x2400, 0x2403) AM_DEVREADWRITE("pia1", pia6821_device, read, write) // lamps
101   AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia2", pia6821_device, read, write) // display
102   AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("pia3", pia6821_device, read, write) // inputs
103   AM_RANGE(0x6000, 0x7fff) AM_ROM
105   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
106   AM_RANGE(0x2100, 0x2103) AM_DEVREADWRITE("pia21", pia6821_device, read, write) // sound+solenoids
107   AM_RANGE(0x2200, 0x2200) AM_WRITE(sol3_w) // solenoids
108   AM_RANGE(0x2400, 0x2403) AM_DEVREADWRITE("pia24", pia6821_device, read, write) // lamps
109   AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia28", pia6821_device, read, write) // display
110   AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("pia30", pia6821_device, read, write) // inputs
111   AM_RANGE(0x5000, 0x7fff) AM_ROM
104112ADDRESS_MAP_END
105113
106114static ADDRESS_MAP_START( s8_audio_map, AS_PROGRAM, 8, s8_state )
107115   AM_RANGE(0x0000, 0x00ff) AM_RAM
108   AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x8000) AM_DEVREADWRITE("pia4", pia6821_device, read, write) // sounds
116   AM_RANGE(0x2000, 0x2003) AM_DEVREADWRITE("pia", pia6821_device, read, write) // stillcra sounds
117   AM_RANGE(0x4000, 0x4003) AM_DEVREADWRITE("pia", pia6821_device, read, write) // pfevr sounds
109118   AM_RANGE(0x8000, 0xffff) AM_ROM
110119ADDRESS_MAP_END
111120
r18745r18746
179188   PORT_START("X80")
180189   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
181190
182   PORT_START("SND")
183   PORT_BIT( 0x9f, IP_ACTIVE_LOW, IPT_UNUSED )
184   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Music1") PORT_CODE(KEYCODE_3) PORT_TOGGLE
185   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Music2") PORT_CODE(KEYCODE_4) PORT_TOGGLE
186
187191   PORT_START("DIAGS")
188192   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Audio Diag") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, s8_state, audio_nmi, 1)
189193   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Main Diag") PORT_CODE(KEYCODE_F2) PORT_CHANGED_MEMBER(DEVICE_SELF, s8_state, main_nmi, 1)
190194   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Advance") PORT_CODE(KEYCODE_0)
191   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Manual/Auto") PORT_CODE(KEYCODE_9)
192   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Enter") PORT_CODE(KEYCODE_8)
193
194   PORT_START("DSW0")
195   PORT_DIPNAME( 0x01, 0x01, "SW01" )
196   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
197   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
198   PORT_DIPNAME( 0x02, 0x02, "SW02" )
199   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
200   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
201   PORT_DIPNAME( 0x04, 0x04, "SW03" )
202   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
203   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
204   PORT_DIPNAME( 0x08, 0x08, "SW04" )
205   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
206   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
207   PORT_DIPNAME( 0x10, 0x10, "SW05" )
208   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
209   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
210   PORT_DIPNAME( 0x20, 0x20, "SW06" )
211   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
212   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
213   PORT_DIPNAME( 0x40, 0x40, "SW07" )
214   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
215   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
216   PORT_DIPNAME( 0x80, 0x80, "SW08" )
217   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
218   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
219
220   PORT_START("DSW1")
221   PORT_DIPNAME( 0x01, 0x01, "SW11" )
222   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
223   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
224   PORT_DIPNAME( 0x02, 0x02, "SW12" )
225   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
226   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
227   PORT_DIPNAME( 0x04, 0x04, "SW13" )
228   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
229   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
230   PORT_DIPNAME( 0x08, 0x08, "SW14" )
231   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
232   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
233   PORT_DIPNAME( 0x10, 0x10, "SW15" )
234   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
235   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
236   PORT_DIPNAME( 0x20, 0x20, "SW16" )
237   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
238   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
239   PORT_DIPNAME( 0x40, 0x40, "SW17" )
240   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
241   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
242   PORT_DIPNAME( 0x80, 0x80, "SW18" )
243   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
244   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
195   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Up/Down") PORT_CODE(KEYCODE_9)
245196INPUT_PORTS_END
246197
247198MACHINE_RESET_MEMBER( s8_state, s8 )
248199{
249200   m_t_c = 0;
250   m_chimes = 1;
251201}
252202
253MACHINE_RESET_MEMBER( s8_state, s8a )
254{
255   m_t_c = 0;
256   m_chimes = 0;
257}
258
259203INPUT_CHANGED_MEMBER( s8_state::main_nmi )
260204{
261205   // Diagnostic button sends a pulse to NMI pin
r18745r18746
266210INPUT_CHANGED_MEMBER( s8_state::audio_nmi )
267211{
268212   // Diagnostic button sends a pulse to NMI pin
269   if ((newval==CLEAR_LINE) && !m_chimes)
213   if (newval==CLEAR_LINE)
270214      m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
271215}
272216
273WRITE8_MEMBER( s8_state::sol0_w )
217WRITE8_MEMBER( s8_state::sol3_w )
274218{
275   if (BIT(data, 4))
276      m_samples->start(2, 5); // outhole
219   if (BIT(data, 1))
220      m_samples->start(0, 6); // knocker
277221}
278222
279WRITE8_MEMBER( s8_state::sol1_w )
223WRITE8_MEMBER( s8_state::sound_w )
280224{
281   if (m_chimes)
282   {
283      if (BIT(data, 0))
284         m_samples->start(1, 1); // 10 chime
225   m_sound_data = data;
226}
285227
286      if (BIT(data, 1))
287         m_samples->start(2, 2); // 100 chime
228READ_LINE_MEMBER( s8_state::pia21_ca1_r )
229{
230// sound busy
231   return 1;
232}
288233
289      if (BIT(data, 2))
290         m_samples->start(3, 3); // 1000 chime
291
292      // we don't have a 10k chime in samples yet
293      //if (BIT(data, 3))
294         //m_samples->start(1, x); // 10k chime
295   }
296   else
297   {printf("%X ",data);
298      m_sound_data = ioport("SND")->read();
299      if (BIT(data, 0))
300         m_sound_data &= 0xfe;
301
302      if (BIT(data, 1))
303         m_sound_data &= 0xfd;
304
305      if (BIT(data, 2))
306         m_sound_data &= 0xfb;
307
308      if (BIT(data, 3))
309         m_sound_data &= 0xf7;
310
311      if (BIT(data, 4))
312         m_sound_data &= 0x7f;
313
314      m_cb1 = ((m_sound_data & 0x7f) != 0x7f);
315
316      m_pia4->cb1_w(m_cb1);
317   }
318
319   if (BIT(data, 5))
320      m_samples->start(0, 6); // knocker
234WRITE_LINE_MEMBER( s8_state::pia21_ca2_w )
235{
236// sound ns
237   m_ca1 = state;
238   m_pia->ca1_w(m_ca1);
321239}
322240
323static const pia6821_interface pia0_intf =
241static const pia6821_interface pia21_intf =
324242{
325   DEVCB_NULL,      /* port A in */
243   DEVCB_DRIVER_MEMBER(s8_state, dac_r),      /* port A in */
326244   DEVCB_NULL,      /* port B in */
327   DEVCB_LINE_GND,      /* line CA1 in */
245   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia21_ca1_r),      /* line CA1 in */
328246   DEVCB_LINE_GND,      /* line CB1 in */
329247   DEVCB_NULL,      /* line CA2 in */
330248   DEVCB_NULL,      /* line CB2 in */
331   DEVCB_DRIVER_MEMBER(s8_state, sol0_w),      /* port A out */
332   DEVCB_DRIVER_MEMBER(s8_state, sol1_w),      /* port B out */
333   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia0_ca2_w),      /* line CA2 out */
334   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia0_cb2_w),      /* line CB2 out */
249   DEVCB_DRIVER_MEMBER(s8_state, sound_w),      /* port A out */
250   DEVCB_DRIVER_MEMBER(s8_state, sol2_w),      /* port B out */
251   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia21_ca2_w),      /* line CA2 out */
252   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia21_cb2_w),      /* line CB2 out */
335253   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE),      /* IRQA */
336254   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE)      /* IRQB */
337255};
r18745r18746
341259   m_maincpu->set_input_line(M6800_IRQ_LINE, CLEAR_LINE);
342260}
343261
344WRITE8_MEMBER( s8_state::lamp1_w )
262static const pia6821_interface pia24_intf =
345263{
346}
347
348static const pia6821_interface pia1_intf =
349{
350264   DEVCB_NULL,      /* port A in */
351265   DEVCB_NULL,      /* port B in */
352266   DEVCB_LINE_GND,      /* line CA1 in */
353267   DEVCB_LINE_GND,      /* line CB1 in */
354   DEVCB_NULL,      /* line CA2 in */
355   DEVCB_NULL,      /* line CB2 in */
268   DEVCB_LINE_VCC,      /* line CA2 in */
269   DEVCB_LINE_VCC,      /* line CB2 in */
356270   DEVCB_DRIVER_MEMBER(s8_state, lamp0_w),      /* port A out */
357271   DEVCB_DRIVER_MEMBER(s8_state, lamp1_w),      /* port B out */
358   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia1_ca2_w),      /* line CA2 out */
359   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia1_cb2_w),      /* line CB2 out */
272   DEVCB_NULL,      /* line CA2 out */
273   DEVCB_NULL,      /* line CB2 out */
360274   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE),      /* IRQA */
361275   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE)      /* IRQB */
362276};
363277
364READ_LINE_MEMBER( s8_state::pia2_ca1_r )
278READ_LINE_MEMBER( s8_state::pia28_ca1_r )
365279{
366280   return BIT(ioport("DIAGS")->read(), 2); // advance button
367281}
368282
369READ_LINE_MEMBER( s8_state::pia2_cb1_r )
283READ_LINE_MEMBER( s8_state::pia28_cb1_r )
370284{
371   return BIT(ioport("DIAGS")->read(), 3); // auto/manual switch
285   return BIT(ioport("DIAGS")->read(), 3); // up/down switch
372286}
373287
374READ8_MEMBER( s8_state::dips_r )
375{
376   if (BIT(ioport("DIAGS")->read(), 4) )
377   {
378      switch (m_strobe)
379      {
380      case 0:
381         return ioport("DSW0")->read() & 15;
382         break;
383      case 1:
384         return ioport("DSW0")->read() << 4;
385         break;
386      case 2:
387         return ioport("DSW1")->read() & 15;
388         break;
389      case 3:
390         return ioport("DSW1")->read() << 4;
391         break;
392      }
393   }
394   return 0xff;
395}
396
397288WRITE8_MEMBER( s8_state::dig0_w )
398289{
290   static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0 }; // 7447
291   data &= 0x7f;
399292   m_strobe = data & 15;
400293   m_data_ok = true;
401   output_set_value("led0", BIT(data, 4));
402   output_set_value("led1", BIT(data, 5));
294   output_set_digit_value(60, patterns[data>>4]); // diag digit
403295}
404296
405297WRITE8_MEMBER( s8_state::dig1_w )
r18745r18746
413305   m_data_ok = false;
414306}
415307
416static const pia6821_interface pia2_intf =
308static const pia6821_interface pia28_intf =
417309{
418   DEVCB_DRIVER_MEMBER(s8_state, dips_r),      /* port A in */
310   DEVCB_NULL,      /* port A in */
419311   DEVCB_NULL,      /* port B in */
420   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia2_ca1_r),      /* line CA1 in */
421   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia2_cb1_r),      /* line CB1 in */
312   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia28_ca1_r),      /* line CA1 in */
313   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia28_cb1_r),      /* line CB1 in */
422314   DEVCB_NULL,      /* line CA2 in */
423315   DEVCB_NULL,      /* line CB2 in */
424316   DEVCB_DRIVER_MEMBER(s8_state, dig0_w),      /* port A out */
425317   DEVCB_DRIVER_MEMBER(s8_state, dig1_w),      /* port B out */
426   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia2_ca2_w),      /* line CA2 out */
427   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia2_cb2_w),      /* line CB2 out */
318   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia28_ca2_w),      /* line CA2 out */
319   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia28_cb2_w),      /* line CB2 out */
428320   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE),      /* IRQA */
429321   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE)      /* IRQB */
430322};
r18745r18746
433325{
434326   char kbdrow[8];
435327   sprintf(kbdrow,"X%X",m_kbdrow);
436   return ioport(kbdrow)->read();
328   return ~ioport(kbdrow)->read();
437329}
438330
439331WRITE8_MEMBER( s8_state::switch_w )
r18745r18746
441333   m_kbdrow = data;
442334}
443335
444static const pia6821_interface pia3_intf =
336static const pia6821_interface pia30_intf =
445337{
446338   DEVCB_DRIVER_MEMBER(s8_state, switch_r),      /* port A in */
447339   DEVCB_NULL,      /* port B in */
448340   DEVCB_LINE_GND,      /* line CA1 in */
449341   DEVCB_LINE_GND,      /* line CB1 in */
450   DEVCB_NULL,      /* line CA2 in */
451   DEVCB_NULL,      /* line CB2 in */
342   DEVCB_LINE_VCC,      /* line CA2 in */
343   DEVCB_LINE_VCC,      /* line CB2 in */
452344   DEVCB_NULL,      /* port A out */
453345   DEVCB_DRIVER_MEMBER(s8_state, switch_w),      /* port B out */
454   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia3_ca2_w),      /* line CA2 out */
455   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia3_cb2_w),      /* line CB2 out */
456   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE),      /* IRQA */
346   DEVCB_NULL,      /* line CA2 out */
347   DEVCB_NULL,      /* line CB2 out */
348   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE),   /* IRQA */
457349   DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE)      /* IRQB */
458350};
459351
460READ_LINE_MEMBER( s8_state::pia4_cb1_r )
352READ_LINE_MEMBER( s8_state::pia_ca1_r )
461353{
462   return m_cb1;
354   return m_ca1;
463355}
464356
357WRITE_LINE_MEMBER( s8_state::pia_ca2_w )
358{
359// speech clock
360}
361
362WRITE_LINE_MEMBER( s8_state::pia_cb2_w )
363{
364// speech data
365}
366
465367READ8_MEMBER( s8_state::dac_r )
466{printf("%X ",m_sound_data);
368{
467369   return m_sound_data;   
468370}
469371
r18745r18746
472374   m_dac->write_unsigned8(data);
473375}
474376
475static const pia6821_interface pia4_intf =
377static const pia6821_interface pia_intf =
476378{
477   DEVCB_NULL,      /* port A in */
478   DEVCB_DRIVER_MEMBER(s8_state, dac_r),      /* port B in */
479   DEVCB_NULL,      /* line CA1 in */
480   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia4_cb1_r),      /* line CB1 in */
379   DEVCB_DRIVER_MEMBER(s8_state, dac_r),      /* port A in */
380   DEVCB_NULL,      /* port B in */
381   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia_ca1_r),      /* line CA1 in */
382   DEVCB_LINE_GND,      /* line CB1 in */
481383   DEVCB_NULL,      /* line CA2 in */
482384   DEVCB_NULL,      /* line CB2 in */
483   DEVCB_DRIVER_MEMBER(s8_state, dac_w),      /* port A out */
484   DEVCB_NULL,      /* port B out */
485   DEVCB_NULL,      /* line CA2 out */
486   DEVCB_NULL,      /* line CB2 out */
385   DEVCB_DRIVER_MEMBER(s8_state, sound_w),      /* port A out */
386   DEVCB_DRIVER_MEMBER(s8_state, dac_w),      /* port B out */
387   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia_ca2_w),      /* line CA2 out */
388   DEVCB_DRIVER_LINE_MEMBER(s8_state, pia_cb2_w),      /* line CB2 out */
487389   DEVCB_CPU_INPUT_LINE("audiocpu", M6800_IRQ_LINE),      /* IRQA */
488390   DEVCB_CPU_INPUT_LINE("audiocpu", M6800_IRQ_LINE)      /* IRQB */
489391};
r18745r18746
510412   MCFG_FRAGMENT_ADD( genpin_audio )
511413
512414   /* Devices */
513   MCFG_PIA6821_ADD("pia0", pia0_intf)
514   MCFG_PIA6821_ADD("pia1", pia1_intf)
515   MCFG_PIA6821_ADD("pia2", pia2_intf)
516   MCFG_PIA6821_ADD("pia3", pia3_intf)
517   //MCFG_NVRAM_ADD_1FILL("nvram")
415   MCFG_PIA6821_ADD("pia21", pia21_intf)
416   MCFG_PIA6821_ADD("pia24", pia24_intf)
417   MCFG_PIA6821_ADD("pia28", pia28_intf)
418   MCFG_PIA6821_ADD("pia30", pia30_intf)
419   MCFG_NVRAM_ADD_1FILL("nvram")
518420   /* Add the soundcard */
519   MCFG_CPU_ADD("audiocpu", M6808, 3580000)
421   MCFG_CPU_ADD("audiocpu", M6808, 4000000)
520422   MCFG_CPU_PROGRAM_MAP(s8_audio_map)
521   MCFG_MACHINE_RESET_OVERRIDE(s8_state, s8a)
522423   MCFG_SPEAKER_STANDARD_MONO("mono")
523424   MCFG_SOUND_ADD("dac", DAC, 0)
524   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
525   MCFG_PIA6821_ADD("pia4", pia4_intf)
425   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
426   MCFG_PIA6821_ADD("pia", pia_intf)
526427MACHINE_CONFIG_END
527428
528429/*------------------------------
r18745r18746
535436
536437   ROM_REGION(0x10000, "audiocpu", 0)
537438   ROM_LOAD("cpu_u49.128", 0xc000, 0x4000, CRC(b0161712) SHA1(5850f1f1f11e3ac9b9629cff2b26c4ad32436b55))
538   ROM_RELOAD(0x8000, 0x4000)
539439ROM_END
540440
541441ROM_START(pfevr_p3)
r18745r18746
545445
546446   ROM_REGION(0x10000, "audiocpu", 0)
547447   ROM_LOAD("cpu_u49.128", 0xc000, 0x4000, CRC(b0161712) SHA1(5850f1f1f11e3ac9b9629cff2b26c4ad32436b55))
548   ROM_RELOAD(0x8000, 0x4000)
549448ROM_END
550449
551450/*----------------------------
r18745r18746
557456
558457   ROM_REGION(0x10000, "audiocpu", 0)
559458   ROM_LOAD("ic49.bin", 0xc000, 0x4000, CRC(bcc8ccc4) SHA1(2312f9cc4f5a2dadfbfa61d13c31bb5838adf152) )
560   ROM_RELOAD(0x8000, 0x4000)
561459ROM_END
562460
563GAME(1984,pfevr_l2, 0,        s8, s8, driver_device, 0, ROT0, "Williams", "Pennant Fever (L-2)", GAME_IS_SKELETON_MECHANICAL)
564GAME(1984,pfevr_p3, pfevr_l2, s8, s8, driver_device, 0, ROT0, "Williams", "Pennant Fever (P-3)", GAME_IS_SKELETON_MECHANICAL)
565GAME(1984,stillcra, 0,        s8, s8, driver_device, 0, ROT0, "Williams", "Still Crazy", GAME_IS_SKELETON_MECHANICAL)
461GAME(1984,pfevr_l2, 0,        s8, s8, driver_device, 0, ROT0, "Williams", "Pennant Fever (L-2)", GAME_MECHANICAL)
462GAME(1984,pfevr_p3, pfevr_l2, s8, s8, driver_device, 0, ROT0, "Williams", "Pennant Fever (P-3)", GAME_MECHANICAL)
463GAME(1984,stillcra, 0,        s8, s8, driver_device, 0, ROT0, "Williams", "Still Crazy", GAME_MECHANICAL | GAME_NOT_WORKING)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team