Previous 15994 Revisions Next

r7181 Wednesday 27th January, 2010 at 03:47:53 UTC by Jonathan Gevaryahu
Add preliminary driver for Fidelity Electronics Z80-based systems; currently just supports the Talking Chess Challenger model VCC.
Inputs and LED displays are not hooked up, will need artwork support. [Kevtris, Lord Nightmare]
[src/mess]mess.mak messdriv.c
[src/mess/drivers]fidelz80.c*

src/mess/messdriv.c
r7180r7181
16421642   DRIVER( dms86 )
16431643   DRIVER( codata )
16441644   DRIVER( rvoicepc )
1645   DRIVER( vcc )
16451646
16461647#endif /* DRIVER_RECURSIVE */
src/mess/mess.mak
r7180r7181
219219#SOUNDS += VOTRAX
220220#SOUNDS += ES8712
221221SOUNDS += CDP1869
222#SOUNDS += S14001A
222SOUNDS += S14001A
223223SOUNDS += WAVE
224224SOUNDS += SID6581
225225SOUNDS += SID8580
r7180r7181
15971597   $(MESS_DRIVERS)/codata.o   \
15981598   $(MESS_DRIVERS)/eti660.o   \
15991599   $(MESS_DRIVERS)/rvoice.o   \
1600   $(MESS_DRIVERS)/fidelz80.o   \
16001601
16011602
16021603
src/mess/drivers/fidelz80.c
r0r7181
1/******************************************************************************
2*
3*  Fidelity Electronics Z80 based board driver
4*  By Kevin 'kevtris' Horton and Jonathan Gevaryahu AKA Lord Nightmare
5*
6*  All detailed RE work done by Kevin 'kevtris' Horton
7*
8*  TODO:
9*  * Inputs: 4x4 keypad matrix
10*  * LED displays (four 7seg, two leds, currently is using terminal as a hack so it doesn't crash due to the screenless system bug)
11     The four arrays are populated with the proper data, all thats needed is a callback to draw said data to screen or to artwork
12*  * Figure out why it says the first speech line twice; it shouldn't.
13*  * Get rom locations from pcb
14*  * Add sensory chess challenger to driver, similar hardware.
15*
16***********************************************************************
17
18Voice Chess Challenger
19----------------------
20
21The CPU is a Z80 running at 4MHz.  The TSI chip runs at around 25KHz, using a
22470K / 100pf RC network.  This system is very very basic, and is composed of just
23the Z80, 4 ROMs, the TSI chip, and an 8255.
24
25
26The Z80's interrupt inputs are all pulled to VCC, so no interrupts are used.
27
28Reset is connected to a power-on reset circuit and a button on the keypad (marked RE).
29
30The TSI chip connects to a 4K ROM marked VCC-ENGL.  All of the Voice Chess Challengers
31use this same ROM  (three).  The later chess boards use a slightly different part
32number, but the contents are identical.
33
34Memory map:
35-----------
360000-0FFF: 4K ROM 101-32103
371000-1FFF: 4K ROM VCC2
382000-3FFF: 4K ROM VCC3 [LN edit: should be 2000-2FFF]
394000-5FFF: 1K RAM (2114 * 2)
406000-FFFF: empty
41
42I/O map:
43--------
4400-FF: 8255 port chip [LN edit: 00-03, mirrored over the 00-FF range; program accesses F4-F7]
45
46
478255 connections:
48-----------------
49
50PA.0 - segment G, TSI A0
51PA.1 - segment F, TSI A1
52PA.2 - segment E, TSI A2
53PA.3 - segment D, TSI A3
54PA.4 - segment C, TSI A4
55PA.5 - segment B, TSI A5
56PA.6 - segment A, language latch Data
57PA.7 - TSI START line, language latch clock (see below)
58
59PB.0 - dot commons
60PB.1 - NC
61PB.2 - digit 0, bottom dot
62PB.3 - digit 1, top dot
63PB.4 - digit 2
64PB.5 - digit 3
65PB.6 - enable language switches (see below)
66PB.7 - TSI DONE line
67
68(button rows pulled up to 5V thru 2.2K resistors)
69PC.0 - button row 0, german language jumper
70PC.1 - button row 1, french language jumper
71PC.2 - button row 2, spanish language jumper
72PC.3 - button row 3, special language jumper
73PC.4 - button column A
74PC.5 - button column B
75PC.6 - button column C
76PC.7 - button column D
77
78
79language switches:
80------------------
81
82When PB.6 is pulled low, the language switches can be read.  There are four.
83They connect to the button rows.  When enabled, the row(s) will read low if
84the jumper is present.  English only VCC's do not have the 367 or any pads stuffed.
85The jumpers are labelled: french, german, spanish, and special.
86
87
88language latch:
89---------------
90
91There's an unstuffed 7474 on the board that connects to PA.6 and PA.7.  It allows
92one to latch the state of A12 to the speech ROM.  The english version has the chip
93missing, and a jumper pulling "A12" to ground.  This line is really a negative
94enable.
95
96To make the VCC multi-language, one would install the 74367 (note: it must be a 74367
97or possibly a 74LS367.  A 74HC367 would not work since they rely on the input current
98to keep the inputs pulled up), solder a piggybacked ROM to the existing english
99speech ROM, and finally install a 7474 dual flipflop.
100
101This way, the game can then detect which secondary language is present, and then it can
102automatically select the correct ROM(s).  I have to test wether it will do automatic
103determination and give you a language option on power up or something.
104
105***********************************************************************
106
107Sensory Chess Challenger
108add me
109
110******************************************************************************/
111
112/* Core includes */
113#include "emu.h"
114#include "cpu/z80/z80.h"
115#include "machine/i8255a.h"
116#include "sound/s14001a.h"
117//#include "dectalk.lh" //  hack to avoid screenless system crash
118#include "machine/terminal.h"
119
120/* Defines */
121
122/* Components */
123
124static struct
125{
126UINT8 data[8]; // what is this for? to suppress the scalar initializer warning?
127UINT8 led_7seg_data[4]; // data for the 4x 7seg leds, bits are 0bxABCDEFG
128UINT8 led_data; // data for the two individual leds, in 0bxxxx12xx format
129UINT8 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
130UINT8 columnlatch;
131} fidelz80={ {0}};
132
133/* Devices */
134
135/* I8255 Device */
136
137/*static READ8_DEVICE_HANDLER( vcc_porta_r )
138{
139   return 0;
140};*/
141
142static READ8_DEVICE_HANDLER( vcc_portb_r )
143{
144   device = devtag_get_device(device->machine, "speech");
145   if (s14001a_bsy_r(device) == 0)
146      return 0;
147   else
148      return 0xFF;
149};
150
151static READ8_DEVICE_HANDLER( vcc_portc_r )
152{
153   return 0xFF; // TODO: emulate button input
154};
155
156static WRITE8_DEVICE_HANDLER( vcc_porta_w )
157{
158   device = devtag_get_device(device->machine, "speech");
159   s14001a_set_volume(device, 15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
160   s14001a_reg_w(device, data & 0x3f);
161   s14001a_rst_w(device, (data & 0x80)>>7);
162   /* handle digits below */
163   if (fidelz80.led_selected & 0x4)
164      fidelz80.led_7seg_data[0] = data&0x7F;
165   if (fidelz80.led_selected & 0x8)
166      fidelz80.led_7seg_data[1] = data&0x7F;
167   if (fidelz80.led_selected & 0x10)
168      fidelz80.led_7seg_data[2] = data&0x7F;
169   if (fidelz80.led_selected & 0x20)
170      fidelz80.led_7seg_data[3] = data&0x7F;
171};
172
173static WRITE8_DEVICE_HANDLER( vcc_portb_w )
174{
175   if (data&0x1) // common for two leds
176   {
177      fidelz80.led_data = (data&0xc);
178   }
179   fidelz80.led_selected = (data&0x3d);
180   // ignoring the language switch enable for now, is bit 0x40
181};
182
183static WRITE8_DEVICE_HANDLER( vcc_portc_w )
184{
185   fidelz80.columnlatch = (data&0x80);
186};
187
188static I8255A_INTERFACE( vcc_ppi8255_intf )
189{
190   DEVCB_NULL, // only bit 6 is readable (and only sometimes) and I'm not emulating the language latch unless needed
191   DEVCB_HANDLER(vcc_portb_r), // bit 7 is readable and is the done line from the s14001a
192   DEVCB_HANDLER(vcc_portc_r), // bits 0,1,2,3 are readable, have to do with input
193   DEVCB_HANDLER(vcc_porta_w), // display segments and s14001a lines
194   DEVCB_HANDLER(vcc_portb_w), // display digits and led dots
195   DEVCB_HANDLER(vcc_portc_w), // bits 4,5,6,7 are writable, have to do with input
196};
197
198static MACHINE_RESET( fidelz80 )
199{
200   // data for the 4x 7seg leds, bits are 0bxABCDEFG
201   fidelz80.led_7seg_data[0] = 0;
202   fidelz80.led_7seg_data[1] = 0;
203   fidelz80.led_7seg_data[2] = 0;
204   fidelz80.led_7seg_data[3] = 0;
205   fidelz80.led_data = 0;
206   fidelz80.led_selected = 0;
207   fidelz80.columnlatch = 0;
208}
209
210
211
212/******************************************************************************
213 Address Maps
214******************************************************************************/
215
216static ADDRESS_MAP_START(vcc_z80_mem, ADDRESS_SPACE_PROGRAM, 8)
217    ADDRESS_MAP_UNMAP_HIGH
218    AM_RANGE(0x0000, 0x0fff) AM_ROM // 4k rom
219   AM_RANGE(0x1000, 0x1fff) AM_ROM // 4k rom
220   AM_RANGE(0x2000, 0x2fff) AM_ROM // 4k rom
221   AM_RANGE(0x4000, 0x43ff) AM_RAM AM_MIRROR(0x1c00) // 1k ram (2114*2) mirrored 8 times
222ADDRESS_MAP_END
223
224static ADDRESS_MAP_START(vcc_z80_io, ADDRESS_SPACE_IO, 8)
225   ADDRESS_MAP_UNMAP_HIGH
226   ADDRESS_MAP_GLOBAL_MASK(0xff)
227   AM_RANGE(0x00, 0x03) AM_MIRROR(0xFC) AM_DEVREADWRITE("vcc_ppi8255", i8255a_r, i8255a_w) // 8255 i/o chip 
228ADDRESS_MAP_END
229
230
231/******************************************************************************
232 Input Ports
233******************************************************************************/
234INPUT_PORTS_START( fidelz80 )
235   PORT_INCLUDE(generic_terminal)
236INPUT_PORTS_END
237
238/******************************************************************************
239 Machine Drivers
240******************************************************************************/
241
242static WRITE8_DEVICE_HANDLER( null_kbd_put )
243{
244}
245
246static GENERIC_TERMINAL_INTERFACE( dectalk_terminal_intf )
247{
248   DEVCB_HANDLER(null_kbd_put)
249};
250
251static MACHINE_DRIVER_START(vcc)
252    /* basic machine hardware */
253    MDRV_CPU_ADD("maincpu", Z80, XTAL_4MHz) 
254    MDRV_CPU_PROGRAM_MAP(vcc_z80_mem)
255    MDRV_CPU_IO_MAP(vcc_z80_io)
256    MDRV_QUANTUM_TIME(HZ(60))
257    MDRV_MACHINE_RESET(fidelz80)
258
259    /* video hardware */
260    //MDRV_DEFAULT_LAYOUT(layout_dectalk) // hack to avoid screenless system crash
261   MDRV_IMPORT_FROM( generic_terminal )
262   MDRV_GENERIC_TERMINAL_ADD(TERMINAL_TAG,dectalk_terminal_intf)
263   
264   /* other hardware */
265   MDRV_I8255A_ADD("vcc_ppi8255", vcc_ppi8255_intf)
266   
267   /* sound hardware */
268   MDRV_SPEAKER_STANDARD_MONO("mono")
269   MDRV_SOUND_ADD("speech", S14001A, 25000) // around 25khz
270   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
271
272MACHINE_DRIVER_END
273
274
275
276/******************************************************************************
277 ROM Definitions
278******************************************************************************/
279
280ROM_START(vcc)
281
282    ROM_REGION(0x10000, "maincpu", 0)
283    ROM_LOAD("101-32103.bin", 0x0000, 0x1000, CRC(257BB5AB) SHA1(F7589225BB8E5F3EAC55F23E2BD526BE780B38B5)) // 32014.VCC???
284    ROM_LOAD("vcc2.bin", 0x1000, 0x1000, CRC(F33095E7) SHA1(692FCAB1B88C910B74D04FE4D0660367AEE3F4F0))
285    ROM_LOAD("vcc3.bin", 0x2000, 0x1000, CRC(624F0CD5) SHA1(7C1A4F4497FE5882904DE1D6FECF510C07EE6FC6))
286
287    ROM_REGION(0x2000, "speech", 0)
288    ROM_LOAD("vcc-engl.bin", 0x0000, 0x1000, CRC(F35784F9) SHA1(348E54A7FA1E8091F89AC656B4DA22F28CA2E44D))
289ROM_END
290
291
292
293/******************************************************************************
294 Drivers
295******************************************************************************/
296
297/*    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT   INIT      COMPANY                     FULLNAME                                                    FLAGS */
298COMP( 1982, vcc,        0,          0,      vcc,   fidelz80, 0,      "Fidelity Electronics",   "Talking Chess Challenger (model VCC)", GAME_NOT_WORKING )
299

Previous 15994 Revisions Next


© 1998-2018 The MESS Team