Previous 15994 Revisions Next

r9729 Sunday 5th December, 2010 at 10:39:38 UTC by Sandro Ronco
[FIDELZ80]
- Added Advanced Bridge Challenger[Thanks to kevtris and Lord Nightmare]
- Improved abc emulation, now show display and accept inputs
- Refactored driver to define ADDRESS_MAP_MODERN
[docs]messnew.txt
[src/mess]mess.mak messdriv.c
[src/mess/drivers]fidelz80.c
[src/mess/includes]fidelz80.h*
[src/mess/layout]abc.lay*

src/mess/includes/fidelz80.h
r0r9729
1/***************************************************************************
2
3        fidelz80.h
4
5****************************************************************************/
6
7#pragma once
8
9#ifndef _FIDELZ80_H_
10#define _FIDELZ80_H_
11
12class fidelz80_state : public driver_device
13{
14public:
15   fidelz80_state(running_machine &machine, const driver_device_config_base &config)
16      : driver_device(machine, config),
17        m_maincpu(*this, "maincpu"),
18        m_speech(*this, "speech"),
19        m_beep(*this, "beep"),
20        m_i8041(*this, "mcu"),
21        m_i8243(*this, "i8243")
22      { }
23
24   required_device<cpu_device> m_maincpu;
25   optional_device<device_t> m_speech;
26   optional_device<device_t> m_beep;
27   optional_device<cpu_device> m_i8041;
28   optional_device<i8243_device> m_i8243;
29
30   UINT8 m_kp_matrix;         // keypad matrix
31   UINT8 m_led_data;         // data for the two individual leds, in 0bxxxx12xx format
32   UINT8 m_led_selected;      // 5 bit selects for 7 seg leds and for common other leds, bits are (7seg leds are 0 1 2 3, common other leds are C) 0bxx3210xc
33   UINT16 m_digit_data;      // data for seg leds
34   UINT8 m_digit_line_status[4];   // prevent overwrite of m_digit_data
35
36   virtual void machine_reset();
37   
38   void update_display(running_machine *machine);
39   DECLARE_READ8_MEMBER( fidelz80_portc_r );
40   DECLARE_WRITE8_MEMBER( fidelz80_portb_w );
41   DECLARE_WRITE8_MEMBER( fidelz80_portc_w );
42   DECLARE_READ8_MEMBER( cc10_portb_r );
43   DECLARE_WRITE8_MEMBER( cc10_porta_w );
44   DECLARE_READ8_MEMBER( vcc_portb_r );
45   DECLARE_WRITE8_MEMBER( vcc_porta_w );
46   DECLARE_WRITE8_MEMBER(kp_matrix_w);
47   DECLARE_READ8_MEMBER(unknown_r);
48   DECLARE_READ8_MEMBER(exp_i8243_p2_r);
49   DECLARE_WRITE8_MEMBER(exp_i8243_p2_w);
50   DECLARE_READ8_MEMBER(rand_r);
51   DECLARE_WRITE8_MEMBER(mcu_data_w);
52   DECLARE_WRITE8_MEMBER(mcu_command_w);
53   DECLARE_READ8_MEMBER(mcu_data_r);
54   DECLARE_READ8_MEMBER(mcu_status_r);
55};
56
57
58#endif   // _FIDELZ80_H_
src/mess/messdriv.c
r9728r9729
17511751   DRIVER( rvoicepc )
17521752   DRIVER( vcc )
17531753   DRIVER( uvc )
1754   DRIVER( abc )
17541755   DRIVER( victor9k )
17551756   DRIVER( phc25 )
17561757   DRIVER( phc25j )
src/mess/layout/abc.lay
r0r9729
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="digit" defstate="0">
4      <led14seg>
5         <color red="0.0" green="0.6" blue="1.0" />
6      </led14seg>
7   </element>
8   <element name="background">
9      <rect>
10         <bounds left="0" top="0" right="1" bottom="1" />
11         <color red="0.0" green="0.0" blue="0.0" />
12      </rect>
13   </element>
14
15   <view name="Simple display">
16      <!-- Black background -->
17      <bezel element="background">
18         <bounds left="00" top="00" right="430" bottom="90" />
19      </bezel>
20
21      <bezel name="digit1" element="digit">
22         <bounds x="10" y="5" width="50" height="80" />
23      </bezel>
24      <bezel name="digit2" element="digit">
25         <bounds x="70" y="5" width="50" height="80" />
26      </bezel>
27      <bezel name="digit3" element="digit">
28         <bounds x="130" y="5" width="50" height="80" />
29      </bezel>
30      <bezel name="digit4" element="digit">
31         <bounds x="190" y="5" width="50" height="80" />
32      </bezel>
33      <bezel name="digit5" element="digit">
34         <bounds x="250" y="5" width="50" height="80" />
35      </bezel>
36      <bezel name="digit6" element="digit">
37         <bounds x="310" y="5" width="50" height="80" />
38      </bezel>
39      <bezel name="digit7" element="digit">
40         <bounds x="370" y="5" width="50" height="80" />
41      </bezel>
42      <bezel name="digit8" element="digit">
43         <bounds x="430" y="5" width="50" height="80" />
44      </bezel>
45   </view>
46</mamelayout>
src/mess/mess.mak
r9728r9729
18201820$(MESS_DRIVERS)/elekscmp.o:   $(MESS_LAYOUT)/elekscmp.lh
18211821$(MESS_DRIVERS)/et3400.o:   $(MESS_LAYOUT)/et3400.lh
18221822$(MESS_DRIVERS)/ex800.o:   $(MESS_LAYOUT)/ex800.lh
1823$(MESS_DRIVERS)/fidelz80.o:   $(MESS_LAYOUT)/fidelz80.lh
1823$(MESS_DRIVERS)/fidelz80.o:   $(MESS_LAYOUT)/fidelz80.lh \
1824                     $(MESS_LAYOUT)/abc.lh
18241825$(MESS_DRIVERS)/glasgow.o:   $(MESS_LAYOUT)/glasgow.lh
18251826$(MESS_DRIVERS)/h8.o:      $(MESS_LAYOUT)/h8.lh
18261827$(MESS_DRIVERS)/k1003.o:   $(MESS_LAYOUT)/k1003.lh
src/mess/drivers/fidelz80.c
r9728r9729
11/******************************************************************************
22*
33*  Fidelity Electronics Z80 based board driver
4*  By Kevin 'kevtris' Horton and Jonathan Gevaryahu AKA Lord Nightmare
4*  By Kevin 'kevtris' Horton, Jonathan Gevaryahu AKA Lord Nightmare and Sandro Ronco
55*
66*  All detailed RE work done by Kevin 'kevtris' Horton
77*
r9728r9729
115115
116116******************************************************************************/
117117
118#define ADDRESS_MAP_MODERN
119
118120/* Core includes */
119121#include "emu.h"
120122#include "cpu/z80/z80.h"
123#include "cpu/mcs48/mcs48.h"
121124#include "machine/i8255a.h"
125#include "machine/i8243.h"
122126#include "sound/beep.h"
123127#include "sound/s14001a.h"
128#include "includes/fidelz80.h"
124129#include "fidelz80.lh"
130#include "abc.lh"
125131
126//#include "debugger.h"
132#include "debugger.h"
127133
128/* Defines */
129
130class fidelz80_state : public driver_device
131{
132public:
133   fidelz80_state(running_machine &machine, const driver_device_config_base &config)
134      : driver_device(machine, config) { }
135
136   UINT8 kp_matrix;      // keypad matrix
137   UINT8 led_7seg_data[4];   // data for the 4x 7seg leds, bits are 0bxABCDEFG
138   UINT8 led_data;         // data for the two individual leds, in 0bxxxx12xx format
139   UINT8 led_selected;      // 5 bit selects for 7 seg leds and for common other leds, bits are (7seg leds are 0 1 2 3, common other leds are C) 0bxx3210xc
140   UINT8 digit_data;      // data for 7 seg leds
141
142   device_t *beep;
143   device_t *speech;
144};
145
146134/* Devices */
147135
148136/******************************************************************************
149137    I8255 Device
150138******************************************************************************/
151139
152static void update_display(running_machine *machine)
140void fidelz80_state::update_display(running_machine *machine)
153141{
154   fidelz80_state *state = machine->driver_data<fidelz80_state>();
155   UINT8 digit_data = BITSWAP8( state->digit_data,7,0,1,2,3,4,5,6 ) & 0x7f;
142   // data for the 4x 7seg leds, bits are 0bxABCDEFG
143   UINT8 out_digit = BITSWAP8( m_digit_data,7,0,1,2,3,4,5,6 ) & 0x7f;
156144
157   if (state->led_selected&0x04)
145   if (m_led_selected&0x04)
158146   {
159      output_set_digit_value(0, digit_data);
160      state->led_7seg_data[0] = digit_data;
147      output_set_digit_value(0, out_digit);
161148
162      output_set_led_value(1, state->led_selected & 0x01);
149      output_set_led_value(1, m_led_selected & 0x01);
163150   }
164   if (state->led_selected&0x08)
151   if (m_led_selected&0x08)
165152   {
166      output_set_digit_value(1, digit_data);
167      state->led_7seg_data[1] = digit_data;
153      output_set_digit_value(1, out_digit);
168154
169      output_set_led_value(0, state->led_selected & 0x01);
155      output_set_led_value(0, m_led_selected & 0x01);
170156   }
171   if (state->led_selected&0x10)
157   if (m_led_selected&0x10)
172158   {
173      output_set_digit_value(2, digit_data);
174      state->led_7seg_data[2] = digit_data;
159      output_set_digit_value(2, out_digit);
175160   }
176   if (state->led_selected&0x20)
161   if (m_led_selected&0x20)
177162   {
178      output_set_digit_value(3, digit_data);
179      state->led_7seg_data[3] = digit_data;
163      output_set_digit_value(3, out_digit);
180164   }
181165}
182166
183static READ8_DEVICE_HANDLER( fidelz80_portc_r )
167READ8_MEMBER( fidelz80_state::fidelz80_portc_r )
184168{
185   fidelz80_state *state = device->machine->driver_data<fidelz80_state>();
186
187169   UINT8 data = 0xff;
188170
189   switch (state->kp_matrix & 0xf0)
171   switch (m_kp_matrix & 0xf0)
190172   {
191173      case 0xe0:
192         data = input_port_read(device->machine, "LINE1");
174         data = input_port_read(space.machine, "LINE1");
193175         break;
194176      case 0xd0:
195         data = input_port_read(device->machine, "LINE2");
177         data = input_port_read(space.machine, "LINE2");
196178         break;
197179      case 0xb0:
198         data = input_port_read(device->machine, "LINE3");
180         data = input_port_read(space.machine, "LINE3");
199181         break;
200182      case 0x70:
201         data = input_port_read(device->machine, "LINE4");
183         data = input_port_read(space.machine, "LINE4");
202184         break;
203185   }
204186
205187   return data;
206188}
207189
208static WRITE8_DEVICE_HANDLER( fidelz80_portb_w )
190WRITE8_MEMBER( fidelz80_state::fidelz80_portb_w )
209191{
210   fidelz80_state *state = device->machine->driver_data<fidelz80_state>();
211
212192   if (!(data & 0x80))
213193   {
214194      if (data&0x1) // common for two leds
215         state->led_data = (data&0xc);
195         m_led_data = (data&0xc);
216196
217      state->led_selected = data;
197      m_led_selected = data;
218198
219      update_display(device->machine);
199      update_display(space.machine);
220200   }
221201
222202   // ignoring the language switch enable for now, is bit 0x40
223203};
224204
225static WRITE8_DEVICE_HANDLER( fidelz80_portc_w )
205WRITE8_MEMBER( fidelz80_state::fidelz80_portc_w )
226206{
227   fidelz80_state *state = device->machine->driver_data<fidelz80_state>();
228
229   state->kp_matrix = data;
207   m_kp_matrix = data;
230208};
231209
232static READ8_DEVICE_HANDLER( cc10_portb_r )
210READ8_MEMBER( fidelz80_state::cc10_portb_r )
233211{
234212   /*
235   x--- ---- level select
236   -xxx xxxx ??
237   */
213    x--- ---- level select
214    -xxx xxxx ??
215    */
238216
239   return input_port_read(device->machine, "LEVEL");
217   return input_port_read(space.machine, "LEVEL");
240218}
241219
242static WRITE8_DEVICE_HANDLER( cc10_porta_w )
220WRITE8_MEMBER( fidelz80_state::cc10_porta_w )
243221{
244   fidelz80_state *state = device->machine->driver_data<fidelz80_state>();
222   beep_set_state(m_beep, (data & 0x80) ? 0 : 1);
245223
246   beep_set_state(state->beep, (data & 0x80) ? 0 : 1);
224   m_digit_data = data;
247225
248   state->digit_data = data;
249
250   update_display(device->machine);
226   update_display(space.machine);
251227}
252228
253static READ8_DEVICE_HANDLER( vcc_portb_r )
229READ8_MEMBER( fidelz80_state::vcc_portb_r )
254230{
255   fidelz80_state *state = device->machine->driver_data<fidelz80_state>();
256
257   if (s14001a_bsy_r(state->speech) != 0)
231   if (s14001a_bsy_r(m_speech) != 0)
258232      return 0x80;
259233   else
260234      return 0x00;
261235}
262236
263static WRITE8_DEVICE_HANDLER( vcc_porta_w )
237WRITE8_MEMBER( fidelz80_state::vcc_porta_w )
264238{
265   fidelz80_state *state = device->machine->driver_data<fidelz80_state>();
239   s14001a_set_volume(m_speech, 15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
240   s14001a_reg_w(m_speech, data & 0x3f);
241   s14001a_rst_w(m_speech, (data & 0x80)>>7);
266242
267   s14001a_set_volume(state->speech, 15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
268   s14001a_reg_w(state->speech, data & 0x3f);
269   s14001a_rst_w(state->speech, (data & 0x80)>>7);
270
271243   if (!(data & 0x80))
272244   {
273      state->digit_data = data;
245      m_digit_data = data;
274246
275      update_display(device->machine);
247      update_display(space.machine);
276248   }
277249}
278250
279251static I8255A_INTERFACE( cc10_ppi8255_intf )
280252{
281253   DEVCB_NULL,
282   DEVCB_HANDLER(cc10_portb_r),
283   DEVCB_HANDLER(fidelz80_portc_r),
284   DEVCB_HANDLER(cc10_porta_w),
285   DEVCB_HANDLER(fidelz80_portb_w),
286   DEVCB_HANDLER(fidelz80_portc_w)
254   DEVCB_DRIVER_MEMBER(fidelz80_state, cc10_portb_r),
255   DEVCB_DRIVER_MEMBER(fidelz80_state, fidelz80_portc_r),
256   DEVCB_DRIVER_MEMBER(fidelz80_state, cc10_porta_w),
257   DEVCB_DRIVER_MEMBER(fidelz80_state, fidelz80_portb_w),
258   DEVCB_DRIVER_MEMBER(fidelz80_state, fidelz80_portc_w)
287259};
288260
289261static I8255A_INTERFACE( vcc_ppi8255_intf )
290262{
291263   DEVCB_NULL, // only bit 6 is readable (and only sometimes) and I'm not emulating the language latch unless needed
292   DEVCB_HANDLER(vcc_portb_r), // bit 7 is readable and is the done line from the s14001a
293   DEVCB_HANDLER(fidelz80_portc_r), // bits 0,1,2,3 are readable, have to do with input
294   DEVCB_HANDLER(vcc_porta_w), // display segments and s14001a lines
295   DEVCB_HANDLER(fidelz80_portb_w), // display digits and led dots
296   DEVCB_HANDLER(fidelz80_portc_w), // bits 4,5,6,7 are writable, have to do with input
264   DEVCB_DRIVER_MEMBER(fidelz80_state, vcc_portb_r), // bit 7 is readable and is the done line from the s14001a
265   DEVCB_DRIVER_MEMBER(fidelz80_state, fidelz80_portc_r), // bits 0,1,2,3 are readable, have to do with input
266   DEVCB_DRIVER_MEMBER(fidelz80_state, vcc_porta_w), // display segments and s14001a lines
267   DEVCB_DRIVER_MEMBER(fidelz80_state, fidelz80_portb_w), // display digits and led dots
268   DEVCB_DRIVER_MEMBER(fidelz80_state, fidelz80_portc_w), // bits 4,5,6,7 are writable, have to do with input
297269};
298270
299271/******************************************************************************
300    basic machine
272    I8041 MCU
301273******************************************************************************/
302274
303static MACHINE_START(cc10)
275WRITE8_MEMBER(fidelz80_state::kp_matrix_w)
304276{
305   fidelz80_state *state = machine->driver_data<fidelz80_state>();
277   if (m_kp_matrix)
278   {
279      UINT16 out_data = BITSWAP16(m_digit_data,12,13,1,6,5,2,0,7,15,11,10,14,4,3,9,8);
280      UINT16 out_digit = out_data & 0x3fff;
281      //UINT8 out_led = BIT(out_data, 15);
306282
307   state->beep = machine->device("beep");
283      beep_set_state(m_beep, BIT(out_data, 14));
284
285      // output the digit before update the matrix
286      switch (m_kp_matrix)
287      {
288         case 0x01:
289            output_set_digit_value(1, out_digit);
290            break;
291         case 0x02:
292            output_set_digit_value(2, out_digit);
293            break;
294         case 0x04:
295            output_set_digit_value(3, out_digit);
296            break;
297         case 0x08:
298            output_set_digit_value(4, out_digit);
299            break;
300         case 0x10:
301            output_set_digit_value(5, out_digit);
302            break;
303         case 0x20:
304            output_set_digit_value(6, out_digit);
305            break;
306         case 0x40:
307            output_set_digit_value(7, out_digit);
308            break;
309         case 0x80:
310            output_set_digit_value(8, out_digit);
311            break;
312      }
313   }
314
315   m_digit_data = 0;
316   memset(m_digit_line_status, 0, ARRAY_LENGTH(m_digit_line_status));
317
318   m_kp_matrix = data;
308319}
309320
310static MACHINE_START(vcc)
321READ8_MEMBER(fidelz80_state::exp_i8243_p2_r)
311322{
312   fidelz80_state *state = machine->driver_data<fidelz80_state>();
323   UINT8 data = 0;
313324
314   state->speech = machine->device("speech");
325   switch (m_kp_matrix)
326   {
327      case 0x01:
328         data = input_port_read(space.machine, "LINE1");
329         break;
330      case 0x02:
331         data = input_port_read(space.machine, "LINE2");
332         break;
333      case 0x04:
334         data = input_port_read(space.machine, "LINE3");
335         break;
336      case 0x08:
337         data = input_port_read(space.machine, "LINE4");
338         break;
339      case 0x10:
340         data = input_port_read(space.machine, "LINE5");
341         break;
342      case 0x20:
343         data = input_port_read(space.machine, "LINE6");
344         break;
345      case 0x40:
346         data = input_port_read(space.machine, "LINE7");
347         break;
348      case 0x80:
349         data = input_port_read(space.machine, "LINE8");
350         break;
351      default:
352         data = 0xf0;
353   }
354   return (m_i8243->i8243_p2_r(offset)&0x0f) | (data&0xf0);
315355}
316356
317static MACHINE_RESET( fidelz80 )
357WRITE8_MEMBER(fidelz80_state::exp_i8243_p2_w)
318358{
319   fidelz80_state *state = machine->driver_data<fidelz80_state>();
359   m_i8243->i8243_p2_w(offset, data&0x0f);
360}
320361
321   // data for the 4x 7seg leds, bits are 0bxABCDEFG
322   memset(state->led_7seg_data, 0, ARRAY_LENGTH(state->led_7seg_data));
323   state->led_data = 0;
324   state->led_selected = 0;
325   state->kp_matrix = 0;
326   state->digit_data = 0;
362// probably related to the card scanner
363READ8_MEMBER(fidelz80_state::unknown_r)
364{
365   return 0;
327366}
328367
368READ8_MEMBER(fidelz80_state::rand_r)
369{
370   return mame_rand(space.machine);
371}
372
329373/******************************************************************************
374    I8243 expander
375******************************************************************************/
376
377static WRITE8_DEVICE_HANDLER( digit_w )
378{
379   fidelz80_state *state = device->machine->driver_data<fidelz80_state>();
380
381   if (state->m_kp_matrix)
382      switch (offset)
383      {
384         case 0:
385            if (state->m_digit_line_status[0] == 0)
386            {
387               state->m_digit_line_status[0] = 1;
388               state->m_digit_data = (state->m_digit_data&(~0x000f)) | ((data<<0)&0x000f);
389            }
390            break;
391         case 1:
392            if (state->m_digit_line_status[1] == 0)
393            {
394               state->m_digit_line_status[1] = 1;
395               state->m_digit_data = (state->m_digit_data&(~0x00f0)) | ((data<<4)&0x00f0);
396            }
397            break;
398         case 2:
399            if (state->m_digit_line_status[2] == 0)
400            {
401               state->m_digit_line_status[2] = 1;
402               state->m_digit_data = (state->m_digit_data&(~0x0f00)) | ((data<<8)&0x0f00);
403            }
404            break;
405         case 3:
406            if (state->m_digit_line_status[3] == 0)
407            {
408               state->m_digit_line_status[3] = 1;
409               state->m_digit_data = (state->m_digit_data&(~0xf000)) | ((data<<12)&0xf000);
410            }
411            break;
412      }
413}
414
415/******************************************************************************
416    basic machine
417******************************************************************************/
418
419WRITE8_MEMBER(fidelz80_state::mcu_data_w)
420{
421   upi41_master_w(m_i8041, 0, data);
422}
423
424WRITE8_MEMBER(fidelz80_state::mcu_command_w)
425{
426   upi41_master_w(m_i8041, 1, data);
427}
428
429READ8_MEMBER(fidelz80_state::mcu_data_r)
430{
431   return upi41_master_r(m_i8041, 0);
432}
433
434READ8_MEMBER(fidelz80_state::mcu_status_r)
435{
436   return upi41_master_r(m_i8041, 1);
437}
438
439void fidelz80_state::machine_reset()
440{
441   m_led_selected = 0;
442   m_kp_matrix = 0;
443   m_digit_data = 0;
444   memset(m_digit_line_status, 0, ARRAY_LENGTH(m_digit_line_status));
445}
446
447/******************************************************************************
330448    Address Maps
331449******************************************************************************/
332450
333static ADDRESS_MAP_START(cc10_z80_mem, ADDRESS_SPACE_PROGRAM, 8)
451static ADDRESS_MAP_START(cc10_z80_mem, ADDRESS_SPACE_PROGRAM, 8, fidelz80_state)
334452   ADDRESS_MAP_UNMAP_HIGH
335453   AM_RANGE(0x0000, 0x0fff) AM_ROM
336454   AM_RANGE(0x3000, 0x31ff) AM_RAM
337455ADDRESS_MAP_END
338456
339static ADDRESS_MAP_START(vcc_z80_mem, ADDRESS_SPACE_PROGRAM, 8)
457static ADDRESS_MAP_START(vcc_z80_mem, ADDRESS_SPACE_PROGRAM, 8, fidelz80_state)
340458    ADDRESS_MAP_UNMAP_HIGH
341459    AM_RANGE(0x0000, 0x0fff) AM_ROM // 4k rom
342460   AM_RANGE(0x1000, 0x1fff) AM_ROM // 4k rom
r9728r9729
344462   AM_RANGE(0x4000, 0x43ff) AM_RAM AM_MIRROR(0x1c00) // 1k ram (2114*2) mirrored 8 times
345463ADDRESS_MAP_END
346464
347static ADDRESS_MAP_START(fidel_z80_io, ADDRESS_SPACE_IO, 8)
465static ADDRESS_MAP_START(abc_z80_mem, ADDRESS_SPACE_PROGRAM, 8, fidelz80_state)
466    ADDRESS_MAP_UNMAP_HIGH
467    AM_RANGE(0x0000, 0x1fff) AM_ROM // 8k rom
468   AM_RANGE(0x2000, 0x3fff) AM_ROM // 8k rom
469   AM_RANGE(0x4000, 0x5fff) AM_ROM // 8k rom
470   AM_RANGE(0x6000, 0x67ff) AM_RAM // probably mirrored
471ADDRESS_MAP_END
472
473static ADDRESS_MAP_START(fidel_z80_io, ADDRESS_SPACE_IO, 8, fidelz80_state)
348474   ADDRESS_MAP_UNMAP_HIGH
349475   ADDRESS_MAP_GLOBAL_MASK(0xff)
350   AM_RANGE(0x00, 0x03) AM_MIRROR(0xFC) AM_DEVREADWRITE("ppi8255", i8255a_r, i8255a_w) // 8255 i/o chip
476   AM_RANGE(0x00, 0x03) AM_MIRROR(0xFC) AM_DEVREADWRITE_LEGACY("ppi8255", i8255a_r, i8255a_w) // 8255 i/o chip
351477ADDRESS_MAP_END
352478
479static ADDRESS_MAP_START(abc_z80_io, ADDRESS_SPACE_IO, 8, fidelz80_state)
480   ADDRESS_MAP_UNMAP_HIGH
481   ADDRESS_MAP_GLOBAL_MASK(0xff)
482   AM_RANGE(0x00, 0x00) AM_READWRITE(mcu_data_r, mcu_data_w)
483   AM_RANGE(0x01, 0x01) AM_READWRITE(mcu_status_r, mcu_command_w)
484ADDRESS_MAP_END
353485
486static ADDRESS_MAP_START(abc_mcu_io, ADDRESS_SPACE_IO, 8, fidelz80_state)
487   ADDRESS_MAP_UNMAP_LOW
488   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(kp_matrix_w)
489   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(exp_i8243_p2_r, exp_i8243_p2_w)
490   AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE_LEGACY("i8243", i8243_prog_w)
491   
492   // probably related to the card scanner
493   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(unknown_r)
494   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(rand_r)
495ADDRESS_MAP_END
496
354497/******************************************************************************
355498 Input Ports
356499******************************************************************************/
r9728r9729
386529      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8)
387530INPUT_PORTS_END
388531
532static INPUT_PORTS_START( abc )
533   PORT_START("LINE1")
534      PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
535      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
536      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("10") PORT_CODE(KEYCODE_0)
537      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
538      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
539
540   PORT_START("LINE2")
541      PORT_BIT(0x0f,  IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
542      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
543      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
544      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
545      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
546
547   PORT_START("LINE3")
548      PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
549      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
550      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
551      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
552      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
553
554   PORT_START("LINE4")
555      PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
556      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
557      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
558      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
559      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("NT") PORT_CODE(KEYCODE_N)
560
561   PORT_START("LINE5")
562      PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
563      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_E)
564      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("SC") PORT_CODE(KEYCODE_S)
565      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PL") PORT_CODE(KEYCODE_P)
566      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Spades") PORT_CODE(KEYCODE_1_PAD)
567
568   PORT_START("LINE6")
569      PORT_BIT(0x0f,  IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
570      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_C)
571      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("DB") PORT_CODE(KEYCODE_D)
572      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("VL") PORT_CODE(KEYCODE_V)
573      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Hearts") PORT_CODE(KEYCODE_2_PAD)
574
575   PORT_START("LINE7")
576      PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
577      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Beep on/off") PORT_CODE(KEYCODE_SPACE)
578      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_B)
579      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CV") PORT_CODE(KEYCODE_G)
580      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Diamonds") PORT_CODE(KEYCODE_3_PAD)
581
582   PORT_START("LINE8")
583      PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
584      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R)
585      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("BR") PORT_CODE(KEYCODE_T)
586      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("DL") PORT_CODE(KEYCODE_L)
587      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Clubs") PORT_CODE(KEYCODE_4_PAD)
588INPUT_PORTS_END
589
389590/******************************************************************************
390591 Machine Drivers
391592******************************************************************************/
r9728r9729
397598    MDRV_CPU_IO_MAP(fidel_z80_io)
398599    MDRV_QUANTUM_TIME(HZ(60))
399600
400   MDRV_MACHINE_START(cc10)
401    MDRV_MACHINE_RESET(fidelz80)
402
403601    /* video hardware */
404602   MDRV_DEFAULT_LAYOUT(layout_fidelz80)
405603
r9728r9729
419617    MDRV_CPU_IO_MAP(fidel_z80_io)
420618    MDRV_QUANTUM_TIME(HZ(60))
421619
422   MDRV_MACHINE_START(vcc)
423    MDRV_MACHINE_RESET(fidelz80)
424
425620    /* video hardware */
426621   MDRV_DEFAULT_LAYOUT(layout_fidelz80)
427622
r9728r9729
434629   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
435630MACHINE_CONFIG_END
436631
632static MACHINE_CONFIG_START( abc, fidelz80_state )
633    /* basic machine hardware */
634    MDRV_CPU_ADD("maincpu", Z80, XTAL_4MHz) // unknown clock/divider
635    MDRV_CPU_PROGRAM_MAP(abc_z80_mem)
636    MDRV_CPU_IO_MAP(abc_z80_io)
637    MDRV_QUANTUM_TIME(HZ(60))
437638
639    /* video hardware */
640   MDRV_DEFAULT_LAYOUT(layout_abc)
641
642   /* other hardware */
643   MDRV_CPU_ADD("mcu", I8041, XTAL_4MHz) // unknown clock/divider
644   MDRV_CPU_IO_MAP(abc_mcu_io)
645
646   MDRV_I8243_ADD("i8243", NULL, digit_w)
647
648   /* sound hardware */
649   MDRV_SPEAKER_STANDARD_MONO( "mono" )
650   MDRV_SOUND_ADD( "beep", BEEP, 0 )
651   MDRV_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
652MACHINE_CONFIG_END
653
654
438655/******************************************************************************
439656 ROM Definitions
440657******************************************************************************/
r9728r9729
463680    ROM_LOAD("101-32107.c4", 0x0000, 0x1000, CRC(F35784F9) SHA1(348E54A7FA1E8091F89AC656B4DA22F28CA2E44D)) // "NEC P9Y019 // D2332C 229 // 101-32107", == vcc-engl.bin on vcc
464681ROM_END
465682
683ROM_START(abc)
684    ROM_REGION(0x10000, "maincpu", 0)
685   ROM_LOAD("bridge_w.bin", 0x0000, 0x2000, CRC(eb1620ef) SHA1(987a9abc8c685f1a68678ea4ee65ec4a99419179))
686   ROM_LOAD("bridge_r.bin", 0x2000, 0x2000, CRC(74af0019) SHA1(8dc05950c254ca050b95b93e5d0cf48f913a6d49))
687   ROM_LOAD("bridge_b.bin", 0x4000, 0x2000, CRC(341d9ca6) SHA1(370876573bb9408e75f4fc797304b6c64af0590a))
466688
689    ROM_REGION(0x1000, "mcu", 0)
690    ROM_LOAD("100-1009.bin", 0x0000, 0x0400, CRC(60eb343f) SHA1(8a63e95ebd62e123bdecc330c0484a47c354bd1a))
691ROM_END
467692
468693/******************************************************************************
469694 Drivers
r9728r9729
473698COMP( 1978, cc10,       0,          0,      cc10,  fidelz80, 0,      "Fidelity Electronics",   "Chess Challenger 10",                  GAME_NOT_WORKING )
474699COMP( 1979, vcc,        0,          0,      vcc,   fidelz80, 0,      "Fidelity Electronics",   "Talking Chess Challenger (model VCC)", GAME_NOT_WORKING )
475700COMP( 1980, uvc,        vcc,          0,      vcc,   fidelz80, 0,      "Fidelity Electronics",   "Advanced Talking Chess Challenger (model UVC)", GAME_NOT_WORKING )
701COMP( 1980, abc,        0,          0,      abc,   abc,     0,      "Fidelity Electronics",   "Advanced Bridge Challenger (model ABC)",   GAME_NOT_WORKING )
476702
docs/messnew.txt
r9728r9729
55- Homebrew Z80 Computer by Kun-Szabo Marton [Miodrag Milanovic]
66- Microbee TeleTerm [Robbbert]
77- Impuls-03 [Miodrag Milanovic]
8- Advanced Bridge Challenger (not working) [Kevtris, Lord Nightmare, Sandro Ronco]
89
910
1011Systems Promoted from GAME_NOT_WORKING:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team