Previous 15994 Revisions Next

r6426 Thursday 19th November, 2009 at 20:36:17 UTC by Wilbert Pol
[EXL100] Added tms5220. Implement some more communication between the several chips.
[src/mess/drivers]exelv.c

src/mess/drivers/exelv.c
r6425r6426
4545      presumably because the I/O processor is not emulated
4646
4747TODO:
48    * dump I/O CPU ROM???
48    * dump exeltel tms7042 I/O CPU ROM
4949    * everything
5050*/
5151
r6425r6426
5353#include "deprecat.h"
5454#include "cpu/tms7000/tms7000.h"
5555#include "video/tms3556.h"
56#include "sound/tms5220.h"
5657/*#include "devices/cartslot.h"
5758#include "devices/cassette.h"*/
5859
r6425r6426
6869   UINT8   tms7041_portb;
6970   UINT8   tms7041_portc;
7071   UINT8   tms7041_portd;
72
73   /* mailbox data */
74   UINT8   wx318;   /* data of 74ls374 labeled wx318 */
75   UINT8   wx319;   /* data of 74sl374 labeled wx319 */
7176} exelv_state;
7277
7378
7479static exelv_state exelv_driver_state;
7580
7681
77static void io_reset(void);
78
7982/*
8083    video initialization
8184*/
r6425r6426
8891static MACHINE_RESET( exelv )
8992{
9093   tms3556_reset();
91   io_reset();
9294   memory_set_bankptr( machine, 1, memory_region(machine, "user1") + 0x0200 );
9395}
9496
r6425r6426
180182        other values: I/O CPU reset?
181183*/
182184
183static enum
184{
185   IOS_NOP,
186   IOS_INIT,
187   IOS_RESET,
188   IOS_STSPEECH1,
189   IOS_STSPEECH2,
190   IOS_CHARDEF1,
191   IOS_CHARDEF2,
192   IOS_CHARDEF3,
193   IOS_CHARDEF4
194} io_state;
195static int io_counter;
196static int io_command_ack;
197static int io_hsk;
198static int io_ack;
199static int mailbox_out;
200185
201static void io_iterate(running_machine *machine);
202
203static void io_reset(void)
186static READ8_HANDLER(mailbox_wx319_r)
204187{
205   /* reset I/O state */
206   io_state = IOS_INIT;
207   io_command_ack = 1;
208   //io_hsk = 0;
209   /* clear mailbox */
210   mailbox_out = 0x00;
188   return exelv_driver_state.wx319;
211189}
212190
213static TIMER_CALLBACK( io_reset_timer )
214{
215   io_reset();
216}
217191
218static void io_iterate(running_machine *machine)
192static WRITE8_HANDLER(mailbox_wx318_w)
219193{
220   if (/*io_hsk &&*/ (mailbox_out == 0) && (! io_command_ack))
221   {
222      switch (io_state)
223      {
224      case IOS_NOP:
225         break;
226      case IOS_INIT:
227         mailbox_out = 0x08;
228         cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, ASSERT_LINE);
229         cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, CLEAR_LINE);
230         io_state = IOS_NOP;
231         break;
232      case IOS_RESET:
233         timer_set(machine, ATTOTIME_IN_USEC(100), NULL, 0, io_reset_timer);
234         break;
235      case IOS_STSPEECH1:
236         io_state = IOS_STSPEECH2;
237         break;
238      case IOS_STSPEECH2:
239         io_counter++;
240         if (io_counter == 24)
241            io_state = IOS_NOP;
242         break;
243      case IOS_CHARDEF1:
244         mailbox_out = 0x07;
245         cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, ASSERT_LINE);
246         cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, CLEAR_LINE);
247         io_state = IOS_CHARDEF2;
248         break;
249      case IOS_CHARDEF2:
250         mailbox_out = 0x04;
251         cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, ASSERT_LINE);
252         cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, CLEAR_LINE);
253         io_state = IOS_CHARDEF3;
254         break;
255      case IOS_CHARDEF3:
256         mailbox_out = 0xF5;
257         cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, ASSERT_LINE);
258         cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, CLEAR_LINE);
259         io_state = IOS_CHARDEF4;
260         io_counter = 0;
261         break;
262      case IOS_CHARDEF4:
263         {
264            static const UINT8 fontdata[10*127] =
265            {
266               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
267               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
268               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
269               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
270               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
271               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
272               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
273               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
274               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
275               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
276               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
277               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
278               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
279               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
280               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
281               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
282               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
283               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
284               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
285               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
286               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
287               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
288               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
289               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
290               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
291               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
292               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
293               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
294               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
295               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
296               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
297               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
298               0x00,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00,
299               0x00,0x50,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,
300               0x00,0x50,0x50,0xF8,0x50,0xF8,0x50,0x50,0x00,0x00,
301               0x00,0x20,0x70,0xA0,0x70,0x28,0x70,0x20,0x00,0x00,
302               0x00,0x48,0xA8,0x50,0x20,0x50,0xA8,0x90,0x00,0x00,
303               0x00,0x40,0xA0,0xA0,0x40,0xA8,0x90,0x68,0x00,0x00,
304               0x00,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
305               0x00,0x10,0x20,0x40,0x40,0x40,0x20,0x10,0x00,0x00,
306               0x00,0x40,0x20,0x10,0x10,0x10,0x20,0x40,0x00,0x00,
307               0x00,0x00,0x88,0x50,0xF8,0x50,0x88,0x00,0x00,0x00,
308               0x00,0x00,0x20,0x20,0xF8,0x20,0x20,0x00,0x00,0x00,
309               0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x20,0x40,0x00,
310               0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,
311               0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x70,0x20,0x00,
312               0x00,0x08,0x08,0x10,0x20,0x40,0x80,0x80,0x00,0x00,
313               0x00,0x20,0x50,0x88,0x88,0x88,0x50,0x20,0x00,0x00,
314               0x00,0x20,0x60,0xA0,0x20,0x20,0x20,0xF8,0x00,0x00,
315               0x00,0x70,0x88,0x08,0x30,0x40,0x80,0xF8,0x00,0x00,
316               0x00,0xF8,0x08,0x10,0x30,0x08,0x88,0x70,0x00,0x00,
317               0x00,0x10,0x30,0x50,0x90,0xF8,0x10,0x10,0x00,0x00,
318               0x00,0xF8,0x80,0xB0,0xC8,0x08,0x88,0x70,0x00,0x00,
319               0x00,0x30,0x40,0x80,0xB0,0xC8,0x88,0x70,0x00,0x00,
320               0x00,0xF8,0x08,0x10,0x10,0x20,0x40,0x40,0x00,0x00,
321               0x00,0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x00,0x00,
322               0x00,0x70,0x88,0x98,0x68,0x08,0x10,0x60,0x00,0x00,
323               0x00,0x00,0x20,0x70,0x20,0x00,0x20,0x70,0x20,0x00,
324               0x00,0x00,0x20,0x70,0x20,0x00,0x30,0x20,0x40,0x00,
325               0x00,0x08,0x10,0x20,0x40,0x20,0x10,0x08,0x00,0x00,
326               0x00,0x00,0x00,0xF8,0x00,0xF8,0x00,0x00,0x00,0x00,
327               0x00,0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00,0x00,
328               0x00,0x70,0x88,0x10,0x20,0x20,0x00,0x20,0x00,0x00,
329               0x00,0x70,0x88,0x98,0xA8,0xB0,0x80,0x70,0x00,0x00,
330               //0x00,0x20,0x50,0x88,0x88,0xF8,0x88,0x88,0x00,0x00,// original MAME font
331               //0x00,0x1C,0x22,0x22,0x3E,0x22,0x22,0x22,0x00,0x00,// original exeltel font
332               0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x00,0x00,   // original exeltel font shifted left twice
333               0x00,0xF0,0x48,0x48,0x70,0x48,0x48,0xF0,0x00,0x00,
334               0x00,0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x00,0x00,
335               0x00,0xF0,0x48,0x48,0x48,0x48,0x48,0xF0,0x00,0x00,
336               0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,0xF8,0x00,0x00,
337               0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,0x80,0x00,0x00,
338               0x00,0x70,0x88,0x80,0x80,0x98,0x88,0x70,0x00,0x00,
339               0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x00,0x00,
340               0x00,0x70,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00,
341               0x00,0x38,0x10,0x10,0x10,0x10,0x90,0x60,0x00,0x00,
342               0x00,0x88,0x90,0xA0,0xC0,0xA0,0x90,0x88,0x00,0x00,
343               0x00,0x80,0x80,0x80,0x80,0x80,0x80,0xF8,0x00,0x00,
344               0x00,0x88,0x88,0xD8,0xA8,0x88,0x88,0x88,0x00,0x00,
345               0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x00,0x00,
346               0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00,0x00,
347               0x00,0xF0,0x88,0x88,0xF0,0x80,0x80,0x80,0x00,0x00,
348               0x00,0x70,0x88,0x88,0x88,0x88,0xA8,0x70,0x08,0x00,
349               0x00,0xF0,0x88,0x88,0xF0,0xA0,0x90,0x88,0x00,0x00,
350               0x00,0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x00,0x00,
351               0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,
352               0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00,0x00,
353               0x00,0x88,0x88,0x88,0x50,0x50,0x50,0x20,0x00,0x00,
354               0x00,0x88,0x88,0x88,0xA8,0xA8,0xD8,0x88,0x00,0x00,
355               0x00,0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x00,0x00,
356               0x00,0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x00,0x00,
357               0x00,0xF8,0x08,0x10,0x20,0x40,0x80,0xF8,0x00,0x00,
358               0x00,0x70,0x40,0x40,0x40,0x40,0x40,0x70,0x00,0x00,
359               0x00,0x80,0x80,0x40,0x20,0x10,0x08,0x08,0x00,0x00,
360               0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x70,0x00,0x00,
361               0x00,0x20,0x50,0x88,0x00,0x00,0x00,0x00,0x00,0x00,
362               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,
363               0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
364               0x00,0x00,0x00,0x70,0x08,0x78,0x88,0x78,0x00,0x00,
365               0x00,0x80,0x80,0xB0,0xC8,0x88,0xC8,0xB0,0x00,0x00,
366               0x00,0x00,0x00,0x70,0x88,0x80,0x88,0x70,0x00,0x00,
367               0x00,0x08,0x08,0x68,0x98,0x88,0x98,0x68,0x00,0x00,
368               0x00,0x00,0x00,0x70,0x88,0xF8,0x80,0x70,0x00,0x00,
369               0x00,0x30,0x48,0x40,0xF0,0x40,0x40,0x40,0x00,0x00,
370               0x00,0x00,0x00,0x78,0x88,0x88,0x78,0x08,0x88,0x70,
371               0x00,0x80,0x80,0xB0,0xC8,0x88,0x88,0x88,0x00,0x00,
372               0x00,0x20,0x00,0x60,0x20,0x20,0x20,0x70,0x00,0x00,
373               0x00,0x08,0x00,0x18,0x08,0x08,0x08,0x48,0x48,0x30,
374               0x00,0x80,0x80,0x88,0x90,0xE0,0x90,0x88,0x00,0x00,
375               0x00,0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00,
376               0x00,0x00,0x00,0xD0,0xA8,0xA8,0xA8,0x88,0x00,0x00,
377               0x00,0x00,0x00,0xB0,0xC8,0x88,0x88,0x88,0x00,0x00,
378               0x00,0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x00,0x00,
379               0x00,0x00,0x00,0xB0,0xC8,0x88,0xC8,0xB0,0x80,0x80,
380               0x00,0x00,0x00,0x68,0x98,0x88,0x98,0x68,0x08,0x08,
381               0x00,0x00,0x00,0xB0,0xC8,0x80,0x80,0x80,0x00,0x00,
382               0x00,0x00,0x00,0x70,0x80,0x70,0x08,0xF0,0x00,0x00,
383               0x00,0x40,0x40,0xF0,0x40,0x40,0x48,0x30,0x00,0x00,
384               0x00,0x00,0x00,0x88,0x88,0x88,0x98,0x68,0x00,0x00,
385               0x00,0x00,0x00,0x88,0x88,0x50,0x50,0x20,0x00,0x00,
386               0x00,0x00,0x00,0x88,0x88,0xA8,0xA8,0x50,0x00,0x00,
387               0x00,0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x00,0x00,
388               0x00,0x00,0x00,0x88,0x88,0x98,0x68,0x08,0x88,0x70,
389               0x00,0x00,0x00,0xF8,0x10,0x20,0x40,0xF8,0x00,0x00,
390               0x00,0x18,0x20,0x10,0x60,0x10,0x20,0x18,0x00,0x00,
391               0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,
392               0x00,0x60,0x10,0x20,0x18,0x20,0x10,0x60,0x00,0x00,
393               0x00,0x48,0xA8,0x90,0x00,0x00,0x00,0x00,0x00,0x00,
394               0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
395            };
396            mailbox_out = fontdata[io_counter + 9 - 2 * (io_counter % 10)] >> 2;
397            cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, ASSERT_LINE);
398            cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, CLEAR_LINE);
399            io_counter++;
400            if (io_counter == 127 * 10)
401               io_state = IOS_NOP;
402         }
403         break;
404      }
405   }
406}
194   logerror("wx318 write 0x%02x\n", data);
407195
408static void set_io_hsk(running_machine *machine, int state)
409{
410   if (state != io_hsk)
411   {
412      io_hsk = state;
413      if (io_command_ack)
414      {
415         if (io_hsk) {
416            cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, ASSERT_LINE);
417            cputag_set_input_line(machine, "maincpu", TMS7000_IRQ1_LINE, CLEAR_LINE);
418         }
419         else
420         {
421            io_command_ack = 0;
422            io_iterate(machine);
423         }
424      }
425   }
196   exelv_driver_state.wx318 = data;
426197}
427198
428static void set_io_ack(int state)
429{
430   if (state != io_ack)
431   {
432      io_ack = state;
433      /* ??? */
434   }
435}
436
437static READ8_HANDLER(mailbox_r)
438{
439   int reply = mailbox_out;
440
441   /* clear mailbox */
442   mailbox_out = 0x00;
443
444   /* see if there are other messages to post */
445   io_iterate(space->machine);
446
447   return reply;
448}
449
450static WRITE8_HANDLER(mailbox_w)
451{
452   switch (io_state)
453   {
454   case IOS_STSPEECH2:
455      /*...*/
456      io_command_ack = 1;
457      break;
458   default:
459      switch (data)
460      {
461      case 0x09:
462         io_state = IOS_STSPEECH1;
463         io_counter = 0;
464         io_command_ack = 1;
465         break;
466      case 0x0b:
467         io_state = IOS_CHARDEF1;
468         io_command_ack = 1;
469         break;
470      case 0x01:
471      case 0x02:
472      case 0x03:
473      case 0x04:
474      case 0x05:
475      case 0x06:
476      case 0x07:
477      case 0x08:
478      case 0x0a:
479      case 0x0c:
480      case 0x0d:
481      case 0x0e:
482      case 0x0f:
483      case 0x10:
484      case 0x11:
485      case 0x12:
486      case 0x13:
487      case 0x14:
488      case 0x15:
489      case 0x16:
490      case 0x17:
491         logerror("unemulated I/O command %d", (int) data);
492      case 0x00:
493      default:
494         io_state = IOS_RESET;
495         io_command_ack = 1;
496         break;
497      }
498   }
499}
500
501199/*
502200    TMS7020 PORT A
503201    A0 - R - TMS7041 port B bit 7 (REV3)
r6425r6426
549247   logerror("tms7020_portb_w: data = 0x%02x\n", data);
550248
551249   exelv_driver_state.tms7020_portb = data;
552
553   set_io_hsk(space->machine, (data & 0x1) != 0);
554   set_io_ack((data & 0x2) != 0);
555250}
556251
557252
r6425r6426
568263*/
569264static READ8_HANDLER(tms7041_porta_r)
570265{
571   UINT8 data = 0x6D;
266   const device_config *tms5220c = devtag_get_device( space->machine, "tms5220c" );
267   UINT8 data = 0x00;
572268
573269   logerror("tms7041_porta_r\n");
574270
575271   data |= ( exelv_driver_state.tms7020_portb & 0x01 ) ? 0x04 : 0x00;
272   data |= tms5220_intq_r( tms5220c ) ? 0x08 : 0x00;
576273   data |= ( exelv_driver_state.tms7020_portb & 0x02 ) ? 0x10 : 0x00;
274   data |= tms5220_readyq_r( tms5220c ) ? 0x80 : 0x00;
577275
578276   return data;
579277}
r6425r6426
589287
590288/*
591289    TMS7041 PORT B
592    B0 - TMS5220 W
593    B1 - TMS5220 R
594    B2 - REV1 WX302-13
290    B0 - W - TMS5220 W
291    B1 - W - TMS5220 R
292    B2 - W - TMS7020 pin 13 / IRQ1
595293    B3 - X1 TXD A5 (version b) / WX301-8 (version a)
596294    B4 - TP3
597295    B5 - REV5 WX318-1
598    B6 - REV6 WX319-11
599    B7 - REV3 WX302-6
296    B6 - W - REV6 WX319-11
297    B7 - W - TMS7020 port A bit 0 (REV3)
600298*/
601299static READ8_HANDLER(tms7041_portb_r)
602300{
r6425r6426
610308
611309static WRITE8_HANDLER(tms7041_portb_w)
612310{
311   const device_config *tms5220c = devtag_get_device( space->machine, "tms5220c" );
312
613313   logerror("tms7041_portb_w: data = 0x%02x\n", data);
614314
315   tms5220_wsq_w( tms5220c, ( data & 0x01 ) ? 1 : 0 );
316   tms5220_rsq_w( tms5220c, ( data & 0x02 ) ? 1 : 0 );
317
318   cputag_set_input_line(space->machine, "maincpu", TMS7000_IRQ1_LINE, ( data & 0x04 ) ? CLEAR_LINE : ASSERT_LINE);
319
320   /* Check for low->high transition on B6 */
321   if ( ! ( exelv_driver_state.tms7041_portb & 0x40 ) && ( data & 0x40 ) )
322   {
323      logerror("wx319 write 0x%02x\n", exelv_driver_state.tms7041_portc);
324      exelv_driver_state.wx319 = exelv_driver_state.tms7041_portc;
325   }
326
615327   exelv_driver_state.tms7041_portb = data;
616328}
617329
r6425r6426
625337
626338   logerror("tms7041_portc_r\n");
627339
340   /* Check if wx318 output is enabled */
341   if ( ! ( exelv_driver_state.tms7041_portb & 0x20 ) )
342   {
343      data = exelv_driver_state.wx318;
344   }
345
628346   return data;
629347}
630348
r6425r6426
660378
661379static WRITE8_HANDLER(tms7041_portd_w)
662380{
381   const device_config *tms5220c = devtag_get_device( space->machine, "tms5220c" );
382
663383   logerror("tms7041_portd_w: data = 0x%02x\n", data);
664384
385   tms5220_data_w( tms5220c, 0, BITSWAP8(data,0,1,2,3,4,5,6,7) );
386
665387   exelv_driver_state.tms7041_portd = data;
666388}
667389
r6425r6426
697419   //AM_RANGE(0x010c, 0x01ff) AM_READWRITE(SMH_NOP, SMH_NOP)     /* external I/O ports */
698420   AM_RANGE(0x012d, 0x0012d) AM_READWRITE(tms3556_reg_r/*right???*/, tms3556_reg_w)
699421   AM_RANGE(0x012e, 0x0012e) AM_READWRITE(tms3556_vram_r/*right???*/, tms3556_vram_w)
700   AM_RANGE(0x0130, 0x00130) AM_READWRITE(mailbox_r, mailbox_w)
422   AM_RANGE(0x0130, 0x00130) AM_READWRITE(mailbox_wx319_r, mailbox_wx318_w)
701423   AM_RANGE(0x0200, 0x7fff) AM_ROMBANK(1)                        /* system ROM */
702424   AM_RANGE(0x8000, 0xbfff) AM_NOP
703425   AM_RANGE(0xc000, 0xc7ff) AM_RAM                              /* CPU RAM */
r6425r6426
732454   //AM_RANGE(0x010c, 0x01ff) AM_READWRITE(SMH_NOP, SMH_NOP)     /* external I/O ports */
733455   AM_RANGE(0x012d, 0x0012d) AM_READWRITE(tms3556_reg_r/*right???*/, tms3556_reg_w)
734456   AM_RANGE(0x012e, 0x0012e) AM_READWRITE(tms3556_vram_r/*right???*/, tms3556_vram_w)
735   AM_RANGE(0x0130, 0x00130) AM_READWRITE(mailbox_r, mailbox_w)
457   AM_RANGE(0x0130, 0x00130) AM_READWRITE(mailbox_wx319_r, mailbox_wx318_w)
736458   AM_RANGE(0x0200, 0x7fff) AM_ROMBANK(1)                        /* system ROM */
737459   AM_RANGE(0x8000, 0xbfff) AM_NOP
738460   AM_RANGE(0xc000, 0xc7ff) AM_RAM                              /* CPU RAM */
r6425r6426
755477INPUT_PORTS_END
756478
757479
480static const tms5220_interface exl100_tms5220_interface =
481{
482   DEVCB_NULL,                  /* no IRQ callback */
483   NULL,                     /* speech ROM read handler */
484   NULL,                     /* speech ROM load address handler */
485   NULL                     /* speech ROM read and branch handler */
486};
487
488
758489static MACHINE_DRIVER_START(exl100)
759490   /* basic machine hardware */
760491   MDRV_CPU_ADD("maincpu", TMS7000_EXL, XTAL_4_9152MHz)   /* TMS7020 */
r6425r6426
766497   MDRV_CPU_PROGRAM_MAP(tms7041_map)
767498   MDRV_CPU_IO_MAP(tms7041_port)
768499
769   MDRV_QUANTUM_TIME(HZ(60))
500   MDRV_QUANTUM_PERFECT_CPU("maincpu")
501   MDRV_QUANTUM_PERFECT_CPU("tms7041")
770502
771503   MDRV_MACHINE_RESET( exelv )
772504
r6425r6426
780512   MDRV_VIDEO_START(exelv)
781513
782514   /* sound */
783   /*MDRV_SOUND_ADD("tms5220", TMS5220, tms5220interface)*/
515   MDRV_SPEAKER_STANDARD_MONO("mono")
516   MDRV_SOUND_ADD("tms5220c", TMS5220C, 640000)   /* TMS5220C, clock frequency unknown */
517   MDRV_SOUND_CONFIG(exl100_tms5220_interface)
518   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
784519MACHINE_DRIVER_END
785520
786521
r6425r6426
795530   MDRV_CPU_PROGRAM_MAP(tms7042_map)
796531   MDRV_CPU_IO_MAP(tms7041_port)
797532
798   MDRV_QUANTUM_TIME(HZ(60))
533   MDRV_QUANTUM_PERFECT_CPU("maincpu")
534   MDRV_QUANTUM_PERFECT_CPU("tms7042")
799535
800536   MDRV_MACHINE_RESET( exelv )
801537
r6425r6426
809545   MDRV_VIDEO_START(exelv)
810546
811547   /* sound */
812   /*MDRV_SOUND_ADD("tms5220", TMS5220, tms5220interface)*/
548   MDRV_SPEAKER_STANDARD_MONO("mono")
549   MDRV_SOUND_ADD("tms5220c", TMS5220C, 640000)   /* TMS5220C, clock frequency unknown */
550   MDRV_SOUND_CONFIG(exl100_tms5220_interface)
551   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
813552MACHINE_DRIVER_END
814553
815554
r6425r6426
828567
829568
830569ROM_START(exeltel)
831   /*CPU memory space*/
832570   ROM_REGION(0x1000, "maincpu", 0)
833571   ROM_LOAD("exeltel_7040.bin", 0x0000, 0x1000, CRC(2792f02f) SHA1(442a852eb68ef78974733d169084752a131de23d))      /* TMS7040 internal ROM */
834572

Previous 15994 Revisions Next


© 1998-2018 The MESS Team