Previous 199869 Revisions Next

r26244 Sunday 17th November, 2013 at 23:44:25 UTC by Michael Zapf
(MESS) ti99_8: More hexbus stuff and corrected checksum. (nw)
[src/mess/drivers]ti99_8.c
[src/mess/machine/ti99]mapper8.c mapper8.h

trunk/src/mess/drivers/ti99_8.c
r26243r26244
11341134
11351135   // Physical memory space: ROM1
11361136   ROM_REGION(0x8000, ROM1_TAG, 0)
1137   ROM_LOAD("u25_rom1.bin", 0x0000, 0x8000, CRC(5df17dfa) SHA1(134ae025f1b43f8e0e2aef4278f9d0c9fcffd68e))
1137   ROM_LOAD("u25_rom1.bin", 0x0000, 0x8000, CRC(b574461a) SHA1(42c6aed44802cfabdd26b565d6e5ddfcd689f11e))
11381138
11391139   // Speech ROMs
11401140   ROM_REGION(0x8000, SPEECH_TAG, 0)
trunk/src/mess/machine/ti99/mapper8.c
r26243r26244
129129#define TRACE_MEM 0
130130#define TRACE_MAP 0
131131#define TRACE_CONFIG 0
132#define TRACE_OSO 0
132133
133134#define LOG logerror
134135
r26243r26244
711712/***************************************************************************
712713
713714  Custom chips of the TI-99/8
714  OSO: Hexbus interface
715715
716  ===== OSO: Hexbus interface =====
717
718  The Hexbus is a 4-bit peripheral bus with master/slave coordination. Bytes
719  are written over the bus in two passes. Hexbus was the designated standard
720  peripheral bus for TI computers before TI left the home computer market.
721
722  Existing devices are floppy drive, RS232 serial adapter, and
723  a "Wafertape" drive (kind of tape streamer)
724
725  Registers:  Read   Write  Bits of register
726  ----------------------------------------------------------------------------
727  Data     :  5FF8     -    ADB3  ADB2  ADB1    ADB0    ADB3  ADB2  ADB1  ADB0
728  Status   :  5FFA     -    HSKWT HSKRD BAVIAS  BAVAIS  SBAV  WBUSY RBUSY SHSK
729  Control  :  5FFC   5FFA   WIEN  RIEN  BAVIAEN BAVAIEN BAVC  WEN   REN   CR7
730  Xmit     :  5FFE   5FF8   XDR0  XDR1  XDR2    XDR3    XDR4  XDR5  XDR6  XDR7
731
732  ADBx = Hexbus data bit X
733  HSKWT = Set when a byte has been sent over the bus and HSK has been asserted
734  HSKRD = Set when a byte has been received
735  BAVIAS = set when the BAV* signal (bus available) transits to active state
736  BAVAIS = set when the BAV* signal transits to inactive state (=1)
737  SBAV = set when BAV* = 0 (active)
738  WBUSY = set when a write action is in progress (two transfers @ 4 bits)
739  Reset when HSKWT is set
740  RBUSY = set when a read action is in progress (two transfers @ 4 bits)
741  Reset when HSKRD is set
742  SHSK = set when HSK* is active (0)
743
744  WIEN = Enable interrupt for write completion
745  RIEN = Enable interrupt for read completion
746  BAVIAEN = BAVIA enable (slave mode)
747  BAVAIEN = BAVAI enable (slave mode)
748  BAVC = set BAV* line (0=active)
749  WEN = set write enable (byte is written from xmit reg)
750  REN = set read enable (latch HSK and read byte into data reg)
751  CR7 = future extension
752  XDRx = transmit register bit
753
754  Hexbus connector (console)
755  +---+---+---+---+
756  | 4 | 3 | 2 | 1 |      4 = L;    3 = BAV*; 2 = ADB1; 1 = ADB0
757  +---+---+---+---+
758  | 8 | 7 | 6 | 5 |      8 = ADB3; 7 = ADB2; 6 = nc;   5 = HSK*
759  +---+---+---+---+
760
761  TODO: This is just a preliminary implementation to satisfy the operating
762        system. When completed we can hopefully emulate a Hexbus floppy and
763        use it in Extended Basic II which refuses to work with the PEB cards.
764        The Hexbus should then be designed as a slot device.
765
716766****************************************************************************/
717767
768/* Status register bits */
718769enum
719770{
720   HSKWT = 0x80
771   HSKWT = 0x80,
772   HSKRD = 0x40,
773   BAVIAS = 0x20,
774   BAVAIS = 0x10,
775   SBAV = 0x08,
776   WBUSY = 0x04,
777   RBUSY = 0x02,
778   SHSK = 0x01
721779};
722780
723781ti998_oso_device::ti998_oso_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
724782: device_t(mconfig, OSO, "OSO Hexbus interface", tag, owner, clock, "ti998_oso", __FILE__)
725783{
726   LOG("ti998/oso: Creating OSO\n");
784   if (TRACE_OSO) LOG("ti998/oso: Creating OSO\n");
727785}
728786
729787READ8_MEMBER( ti998_oso_device::read )
730788{
731789   int value = 0;
732790   offset &= 0x03;
733   LOG("ti998/oso: OSO chip read access %04x -> %02x\n", (offset<<1) | 0x5ff0, value);
734791   switch (offset)
735792   {
736793   case 0:
737794      // read 5FF8: read data register
795      if (TRACE_OSO) LOG("ti998/oso: Read data register = %02x\n", value);
796      value = m_data;
738797      break;
739798   case 1:
740799      // read 5FFA: read status register
741      // We return handshake_write=1 to prevent lock-ups (until the hexbus is properly implemented)
742      value = HSKWT;
800      value = m_status;
801      if (TRACE_OSO) LOG("ti998/oso: Read status %02x\n", value);
743802      break;
744803   case 2:
745804      // read 5FFC: read control register
805      value = m_control;
806      if (TRACE_OSO) LOG("ti998/oso: Read control register = %02x\n", value);
746807      break;
747808   case 3:
748809      // read 5FFE: read transmit register
810      value = m_xmit;
811      if (TRACE_OSO) LOG("ti998/oso: Read transmit register = %02x\n", value);
749812      break;
750813   }
751
752814   return value;
753815}
754816
755817WRITE8_MEMBER( ti998_oso_device::write )
756818{
757819   offset &= 0x03;
758   LOG("ti998/oso: OSO chip write access %04x <- %02x\n", (offset<<1) | 0x5ff0, data);
820   switch (offset)
821   {
822   case 0:
823      // write 5FF8: write transmit register
824      if (TRACE_OSO) LOG("ti998/oso: Write transmit register %02x\n", data);
825      m_xmit = data;
826      // We set the status register directly in order to prevent lock-ups
827      // until we have a complete Hexbus implementation
828      m_status |= HSKWT;
829      break;
830   case 1:
831      // write 5FFA: write control register
832      if (TRACE_OSO) LOG("ti998/oso: Write control register %02x\n", data);
833      m_control = data;
834      break;
835   default:
836      // write 5FFC, 5FFE: undefined
837      if (TRACE_OSO) LOG("ti998/oso: Invalid write on %04x: %02x\n", (offset<<1) | 0x5ff0, data);
838      break;
839   }
759840}
760841
761842void ti998_oso_device::device_start()
762843{
844   m_status = m_xmit = m_control = m_data = 0;
763845}
764846
765847const device_type OSO = &device_creator<ti998_oso_device>;
trunk/src/mess/machine/ti99/mapper8.h
r26243r26244
121121   DECLARE_READ8_MEMBER( read );
122122   DECLARE_WRITE8_MEMBER( write );
123123   void device_start();
124
125private:
126   UINT8 m_data;
127   UINT8 m_status;
128   UINT8 m_control;
129   UINT8 m_xmit;
124130};
125131
126132

Previous 199869 Revisions Next


© 1997-2024 The MAME Team