Serial Port (SIO) | Contents Index | Prev Next |
0-7 Data to be sent 8-31 Not used |
0-7 Received Data (1st RX FIFO entry) (oldest entry) 8-15 Preview (2nd RX FIFO entry) 16-23 Preview (3rd RX FIFO entry) 24-31 Preview (4th RX FIFO entry) (5th..8th cannot be previewed) |
0 TX Ready Flag 1 (1=Ready/Started) (depends on CTS) (TX requires CTS) 1 RX FIFO Not Empty (0=Empty, 1=Not Empty) 2 TX Ready Flag 2 (1=Ready/Finished) (depends on TXEN and on CTS) 3 RX Parity Error (0=No, 1=Error; Wrong Parity, when enabled) (sticky) 4 RX FIFO Overrun (0=No, 1=Error; Received more than 8 bytes) (sticky) 5 RX Bad Stop Bit (0=No, 1=Error; Bad Stop Bit) (when RXEN) (sticky) 6 RX Input Level (0=Normal, 1=Inverted) ;only AFTER receiving Stop Bit 7 DSR Input Level (0=Off, 1=On) (remote DTR) ;DSR not required to be on 8 CTS Input Level (0=Off, 1=On) (remote RTS) ;CTS required for TX 9 Interrupt Request (0=None, 1=IRQ) (sticky) 10 Unknown (always zero) 11-25 Baudrate Timer (15bit timer, decrementing at 33MHz) 26-31 Unknown (usually zero, sometimes all bits set) |
0-1 Baudrate Reload Factor (1=MUL1, 2=MUL16, 3=MUL64) (or 0=STOP) 2-3 Character Length (0=5bits, 1=6bits, 2=7bits, 3=8bits) 4 Parity Enable (0=No, 1=Enable) 5 Parity Type (0=Even, 1=Odd) (seems to be vice-versa...?) 6-7 Stop bit length (0=Reserved/1bit, 1=1bit, 2=1.5bits, 3=2bits) 8-15 Not used (always zero) |
0 TX Enable (TXEN) (0=Disable, 1=Enable, when CTS=On) 1 DTR Output Level (0=Off, 1=On) 2 RX Enable (RXEN) (0=Disable, 1=Enable) ;Disable also clears RXFIFO 3 TX Output Level (0=Normal, 1=Inverted, during Inactivity & Stop bits) 4 Acknowledge (0=No change, 1=Reset SIO_STAT.Bits 3,4,5,9) (W) 5 RTS Output Level (0=Off, 1=On) 6 Reset (0=No change, 1=Reset most SIO_registers to zero) (W) 7 Unknown? (read/write-able when FACTOR non-zero) (otherwise always zero) 8-9 RX Interrupt Mode (0..3 = IRQ when RX FIFO contains 1,2,4,8 bytes) 10 TX Interrupt Enable (0=Disable, 1=Enable) ;when SIO_STAT.0-or-2 ;Ready 11 RX Interrupt Enable (0=Disable, 1=Enable) ;when N bytes in RX FIFO 12 DSR Interrupt Enable (0=Disable, 1=Enable) ;when SIO_STAT.7 ;DSR=On 13-15 Not used (always zero) |
0-15 Baudrate Reload value for decrementing Baudrate Timer |
BitsPerSecond = (44100Hz*300h) / MIN(((Reload*Factor) AND NOT 1),Factor) |
JOY_BAUD is multiplied by Factor, and does then ellapse "2" times per bit. SIO_BAUD is NOT multiplied, and, instead, ellapses "2*Factor" times per bit. |
extracted from no$psx v2.2 - homepage - patreon - whole doc htm/txt - copyright 2022 martin korth (nocash) |