(:toc:) (:include Site.ForumLink topic=12472:) !!What is it? It's the cable used to connect two GG consoles for two-player games. %lfloat%Attach:GearToGearCable.jpg|The cable itself Attach:GearToGearCablePlugs.jpg|View of plugs !!Pinouts %rfloat%Attach:GearToGearPinNumbers.jpg|Pin numbering guide Attach:GearToGearCablePinouts.png ||border=1 ||!Signal (Function) ||!One end ||!Other end || || PC0 || 1 || 3 || || PC1 || 2 || 4 || || PC2 || 3 || 1 || || PC3 || 4 || 2 || || +5V || 5 || NC || || PC4 (TX) || 6 || 9 || || PC6 (NMI) || 7 || 7 || || GND || 8 || 8 || || PC5 (RX) || 9 || 6 || || NC || 10 || NC || !!Usage There are two modes: "Parallel" and "Serial". Both are only available in "GG mode" on the Game Gear - in SMS mode, the console acts as a Master System. !!!"Parallel" mode * There are seven parallel bits that can be configured in either direction. * Write to port $02 to configure the direction: 0 = output, 1 = input. * Read or write port $03 to receive or transmit. * Bits get mixed up along the way: ||!Sent as bit ||!Received as bit || || 0 || 2 || || 1 || 3 || || 2 || 0 || || 3 || 1 || || 4 || 5 || || 5 || 4 || || 6 || 6 || || 7 || NC || The disadvantage of this mode is that there is no flow control or handshaking, and you have to poll the port. It is only known to be used by the "Jon's Squinky Tennis" minigame in some Codemasters games. !!!"Serial" mode This offers full handshaking and flow control. It works by raising an NMI whenever there is a byte to be received or the connected GG is powered off (or just disconnected?). Inside the NMI, you should read the status port and act accordingly. !!!!Status port $05 ||border=1 ||!Bit ||!Meaning || 0 ||1 if send buffer is occupied (do not send while occupied) || || 1 ||1 if receive buffer is occupied (do not receive while not occupied) || || 2 ||1 if connected console is not powered on (or there was an error) || || 3 ||1 to enable the NMI when receiving new data || || 4-5 ||Must be 1 to enable Gear-to-Gear operation || || 6-7 ||Speed (00=4800bps, 01=2400bps, 10=1200bps, 11=300bps) || Note that the "GG powered off" signal is apparently raised repeatedly, so you should disable the connection (by resetting bits 3-5) when that happens, and only enable it temporarily when attempting to detect a connected system. If NMI is disabled, you will have to poll status port bit 1 to check if there's new data to read (bit 1 = 1). !!!!Send port $03 Sends a complete byte to the connected console. You should check the status port bit 0 before sending. !!!!Receive port $04 Receives a complete byte from the connected console. Should only be read when the status port indicates there is data. !!!Usage in SMS mode In SMS mode, the Gear-to-Gear port can be used for a [[GearToGearPortSMSControllerAdaptor|second controller port via an adaptor]]. It is unknown whether in this mode software may use any of the pins as outputs to enable two-way communication; there are no 2-player [[Tags/SMS-GG]] games. !!Hardware !!!Serial Serial mode operates as a 5V TTL UART device transmitting on pin 6 (PC4) and receiving on pin 9 (PC5). The protocol uses 8 data bits with the least significant bit first, no parity bit, and 1 stop bit. Logical 1 is represented by +5v and logical 0 by 0v. Attach:serialprotocol.png !!!Dimensions [[Attach:GearToGearPinDimensions.jpg | Attach:GearToGearPinDimensions-Thumb.jpg"Click To Enlarge"]] !!Thanks Thanks to [[~Tom]] and [[~thatawesomeguy]] for the pinouts info and photos.