Previous 199869 Revisions Next

r23695 Friday 14th June, 2013 at 04:46:28 UTC by Barry Rodewald
attache: switched around the RTC read and write operations, now the CMOS and RTC play nice with each other, although the date/time still cannot be set. (no whatsnew)
[src/mess/drivers]attache.c

trunk/src/mess/drivers/attache.c
r23694r23695
111111   {
112112      PIO_SEL_8910_ADDR = 0,
113113      PIO_SEL_8910_DATA,
114      PIO_SEL_5832_READ,
114115      PIO_SEL_5832_WRITE,
115      PIO_SEL_5832_READ,
116116      PIO_SEL_5101_WRITE,
117117      PIO_SEL_5101_READ,
118118      PIO_SEL_LATCH,
r23694r23695
510510      break;
511511   case PIO_SEL_5832_READ:
512512      m_rtc->cs_w(1);
513      m_rtc->write_w(1);
513      m_rtc->write_w(0);
514514      m_rtc->read_w(0);
515515      m_rtc->address_w((data & 0xf0) >> 4);
516516      logerror("RTC: write %01x to %01x (read)\n",data & 0x0f,(data & 0xf0) >> 4);
r23694r23695
561561   //  B2-4 = OPERATION SELECT
562562   //  0 = 8910 ADDR LOAD
563563   //  1 = 8910 DATA LOAD
564   //  2 = 5832 WRITE
565   //  3 = 5832 READ
564   //  2 = 5832 WRITE  -- the CP/M BIOS dumped from an actual disc seems to switch the RTC operations around
565   //  3 = 5832 READ      this differs from the BIOS source listings available for both CP/M 2.2.3 and 2.2.5
566566   //  4 = 5101 WRITE
567567   //  5 = 5101 READ
568568   //  6 = LATCH LOAD
r23694r23695
570570   //B5 = /'138 OPERATION STROBE
571571   //B6 = /KEYBOARD DATA IN
572572   //B7 = /KEYBOARD CLOCK OUT
573   m_pio_select = (data & 0x1c) >> 2;
574573   m_cmos_select = ((data & 0x03) << 4) | (m_cmos_select & 0x0f);
575   if((data & 0x20) && !(m_pio_portb & 0x20))
574   if(!(data & 0x20) && (m_pio_portb & 0x20))
575   {
576      m_pio_select = (data & 0x1c) >> 2;
576577      operation_strobe(space,m_pio_porta);
578   }
577579   m_pio_portb = data;
578580   keyboard_clock_w(data & 0x80);
579581}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team