Previous 15994 Revisions Next

r6419 Wednesday 18th November, 2009 at 21:30:16 UTC by Wilbert Pol
[EXL100] Hooked up tms702x-tms704x communication i/o port bits.
[src/mess/drivers]exelv.c

src/mess/drivers/exelv.c
r6418r6419
5959
6060typedef struct _exelv_state
6161{
62   /* tms7020 i/o ports */
63   UINT8   tms7020_porta;
64   UINT8   tms7020_portb;
65
66   /* tms7041 i/o ports */
6267   UINT8   tms7040_porta;
6368   UINT8   tms7040_portb;
6469   UINT8   tms7040_portc;
r6418r6419
493498   }
494499}
495500
496static READ8_HANDLER(exelv_porta_r)
501/*
502    TMS7020 PORT A
503    A0 - R - TMS7041 port B bit 7 (REV3)
504    A1 -
505    A2 -
506    A3 -
507    A4 -
508    A5 -
509    A6 -
510    A7 -
511*/
512static READ8_HANDLER(tms7020_porta_r)
497513{
498   return (io_command_ack || io_ack) ? 1 : 0;
514   return ( exelv_driver_state.tms7040_portb & 0x80 ) ? 0x01 : 0x00;
499515}
500516
501static WRITE8_HANDLER(exelv_portb_w)
517
518static WRITE8_HANDLER(tms7020_porta_w)
502519{
520   exelv_driver_state.tms7020_porta = data;
521}
522
523
524/*
525    TMS7020 PORT B
526    B0 - W - TMS7041 port A bit 2 (REV2)
527    B1 - W - TMS7041 port A bit 4 (REV4)
528    B2 -
529    B3 -
530    B4 -
531    B5 -
532    B6 -
533    B7 -
534*/
535static READ8_HANDLER(tms7020_portb_r)
536{
537   return 0x00;
538}
539
540
541static WRITE8_HANDLER(tms7020_portb_w)
542{
543   exelv_driver_state.tms7020_portb = data;
544
503545   set_io_hsk(space->machine, (data & 0x1) != 0);
504546   set_io_ack((data & 0x2) != 0);
505547}
r6418r6419
509551    TMS7041 PORT A
510552    A0 - X1 NDSR A8
511553    A1 - X1 MDTR A9
512    A2 - REV2 WX302-3
554    A2 - R - TMS7020 port B bit 0 (REV2)
513555    A3 - TMS5220 IRQ
514    A4 - REV4 WX302-4
556    A4 - R - TMS7020 port B bit 1 (REV4)
515557    A5 - X1 RXD A4 (version b) / WX301-14 (version a)
516558    A6 - X1 SCLK A9
517559    A7 - TMS5220 RDY
518560*/
519561static READ8_HANDLER(tms7040_porta_r)
520562{
521   UINT8 data = 0xFF;
563   UINT8 data = 0xED;
522564
523565   logerror("tms7040_porta_r\n");
524566
567   data |= ( exelv_driver_state.tms7020_portb & 0x01 ) ? 0x04 : 0x00;
568   data |= ( exelv_driver_state.tms7020_portb & 0x02 ) ? 0x10 : 0x00;
569
525570   return data;
526571}
527572
r6418r6419
656701
657702static ADDRESS_MAP_START(exelv_portmap, ADDRESS_SPACE_IO, 8)
658703
659   AM_RANGE(TMS7000_PORTA, TMS7000_PORTA) AM_READ(exelv_porta_r)
660   AM_RANGE(TMS7000_PORTB, TMS7000_PORTB) AM_WRITE(exelv_portb_w)
704   AM_RANGE(TMS7000_PORTA, TMS7000_PORTA) AM_READWRITE(tms7020_porta_r, tms7020_porta_w)
705   AM_RANGE(TMS7000_PORTB, TMS7000_PORTB) AM_READWRITE(tms7020_portb_r, tms7020_portb_w)
661706
662707ADDRESS_MAP_END
663708
r6418r6419
668713
669714
670715static ADDRESS_MAP_START(exelv_tms7040_port, ADDRESS_SPACE_IO, 8)
671   AM_RANGE(TMS7000_PORTA, TMS7000_PORTA)   AM_READWRITE(tms7040_porta_r, tms7040_porta_w)   /* interfacing to modem port, tms5200, and main cpu */
672   AM_RANGE(TMS7000_PORTB, TMS7000_PORTB)   AM_READWRITE(tms7040_portb_r, tms7040_portb_w)   /* Various */
673   AM_RANGE(TMS7000_PORTC, TMS7000_PORTC)   AM_READWRITE(tms7040_portc_r, tms7040_portc_w)   /* Connected to mailbox */
674   AM_RANGE(TMS7000_PORTD, TMS7000_PORTD)   AM_READWRITE(tms7040_portd_r, tms7040_portd_w)   /*(Reverse) connected to tms5220 data pins */
716   AM_RANGE(TMS7000_PORTA, TMS7000_PORTA)   AM_READWRITE(tms7040_porta_r, tms7040_porta_w)
717   AM_RANGE(TMS7000_PORTB, TMS7000_PORTB)   AM_READWRITE(tms7040_portb_r, tms7040_portb_w)
718   AM_RANGE(TMS7000_PORTC, TMS7000_PORTC)   AM_READWRITE(tms7040_portc_r, tms7040_portc_w)
719   AM_RANGE(TMS7000_PORTD, TMS7000_PORTD)   AM_READWRITE(tms7040_portd_r, tms7040_portd_w)
675720ADDRESS_MAP_END
676721
677722

Previous 15994 Revisions Next


© 1998-2018 The MESS Team