src/mess/drivers/ql.c
| r1271 | r1272 | |
| 48 | 48 | UINT16 ctr; |
| 49 | 49 | UINT8 idr; |
| 50 | 50 | int ipc_bits; |
| 51 | | |
| 52 | 51 | int ser1_rxd, ser1_cts; |
| 53 | 52 | int ser2_txd, ser2_dtr; |
| 54 | 53 | } zx8302; |
| r1271 | r1272 | |
| 113 | 112 | break; |
| 114 | 113 | } |
| 115 | 114 | } |
| 116 | | else |
| 117 | | { |
| 118 | | // receive data from the IPC |
| 119 | | |
| 120 | | zx8302.idr <<= 1; |
| 121 | | zx8302.idr |= zx8302.comdata; |
| 122 | | } |
| 123 | 115 | } |
| 124 | 116 | } |
| 125 | 117 | |
| r1271 | r1272 | |
| 185 | 177 | |
| 186 | 178 | static WRITE8_HANDLER( zx8302_ipc_w ) |
| 187 | 179 | { |
| 188 | | /* |
| 189 | | process 8049 commands (p92) |
| 190 | | WR 18003: 8049 commands |
| 191 | | 0: |
| 192 | | 1: get interrupt status |
| 193 | | 2: open ser1 |
| 194 | | 3: open ser2 |
| 195 | | 4: close ser1/ser2 |
| 196 | | 5: |
| 197 | | 6: serial1 receive |
| 198 | | 7: serial2 receive |
| 199 | | 8: read keyboard |
| 200 | | 9: keyrow |
| 201 | | a: set sound |
| 202 | | b: kill sound |
| 203 | | c: |
| 204 | | d: set serial baudrate |
| 205 | | e: get response |
| 206 | | f: test |
| 207 | | |
| 208 | | write nibble to 8049: |
| 209 | | 'dbca' in 4 writes to 18003: 000011d0, 000011c0, 000011b0, 000011a0. |
| 210 | | each write is acknowledged by 8049 with a '0' in bit 6 of 18020. |
| 211 | | |
| 212 | | response from 8049: |
| 213 | | repeat for any number of bits to be received (MSB first) |
| 214 | | 970718 |
| 215 | | { write 00001101 to 18003; wait for '0' in bit6 18020; read bit7 of 18020 } |
| 216 | | |
| 217 | | */ |
| 218 | | |
| 219 | 180 | zx8302.idr = data; |
| 220 | 181 | zx8302.ipc_bits = ZX8302_IPC_START; |
| 221 | 182 | } |