src/mess/drivers/dectalk.c
| r5532 | r5533 | |
| 21 | 21 | * * emulate/simulate the MT8060 dtmf decoder as a 16-key input device? |
| 22 | 22 | * * discuss and figure out how to have an external application send data to the two serial ports to be spoken |
| 23 | 23 | * |
| 24 | * LED error code list (found by experimentation): |
| 25 | * FF 00 - M68k address register check fail (if data registers fail the processor just spins forever and no led code is generated) |
| 26 | * FF 01 - ROM check fail @ 0x00000, rom at E8 or E22 |
| 27 | * FF 02 - ROM check fail @ 0x08000, rom at E7 or E21 |
| 28 | * FF 03 - ROM check fail @ 0x10000, rom at E6 or E20 |
| 29 | * FF 04 - ROM check fail @ 0x18000, rom at E5 or E19 |
| 30 | * FF 05 - ROM check fail @ 0x20000, rom at E4 or E18 |
| 31 | * FF 06 - ROM check fail @ 0x28000, rom at E3 or E17 |
| 32 | * FF 07 - ROM check fail @ 0x30000, rom at E2 or E16 |
| 33 | * FF 08 - ROM check fail @ 0x38000, rom at E1 or E15 |
| 34 | * FF 0F - ROM check fail at multiple addresses |
| 35 | * FE 01 - RAM check fail @ 0x80000-0x83fff, ram at E36 or E49 |
| 36 | * FE 02 - RAM check fail @ 0x84000-0x87fff, ram at E35 or E48 |
| 37 | * FE 03 - RAM check fail @ 0x88000-0x8bfff, ram at E34 or E47 |
| 38 | * FE 04 - RAM check fail @ 0x8c000-0x8ffff, ram at E33 or E46 |
| 39 | * FE 05 - RAM check fail @ 0x90000-0x93fff, ram at E32 or E44 |
| 40 | * FD 00 - unknown, probably either duart interface failure, interrupt failure, or duart timer failure |
| 41 | |
| 24 | 42 | *******************************************************************************/ |
| 25 | 43 | /*the 68k memory map is such: |
| 26 | 44 | 0x000000-0x007fff: E22 low, E8 high |
| r5532 | r5533 | |
| 132 | 150 | DRIVER_INIT( dectalk ) |
| 133 | 151 | { |
| 134 | 152 | dectalk_clear_all_fifos(machine); |
| 135 | | dectalk.outfifo_writable_latch = 0; |
| 136 | | dectalk.spc_error_latch = 0; |
| 153 | dectalk.outfifo_writable_latch = 0; // on the original dectalk pcb revision, this is a semaphore for the INPUT fifo, later dec hacked on a check for the 3 output fifo chips to see if they're in sync, and set both of these latches if true. |
| 154 | dectalk.spc_error_latch = 1; // normally would be 0, but if set to 1 on startup the dectalk should recover as well |
| 137 | 155 | } |
| 138 | 156 | |
| 139 | 157 | /* Machine reset: stuff that needs setting up which IS directly affected by reset */ |
| r5532 | r5533 | |
| 216 | 234 | { |
| 217 | 235 | dectalk_clear_all_fifos(space->machine); |
| 218 | 236 | /* write me */ // data&1 also forces the CLR line active on the tms32010, we need to do that here as well |
| 237 | // clear the two speech side latches |
| 238 | dectalk.spc_error_latch = 0; |
| 239 | dectalk.outfifo_writable_latch = 0; |
| 219 | 240 | } |
| 220 | 241 | if ((data&0x2) == 0x2) // bit 1 |
| 221 | 242 | { |
| 222 | | // clear the two speech side latches |
| 223 | | dectalk.spc_error_latch = 0; |
| 224 | | dectalk.outfifo_writable_latch = 0; |
| 243 | // clear the two speech side latches |
| 244 | dectalk.spc_error_latch = 0; |
| 245 | dectalk.outfifo_writable_latch = 0; |
| 225 | 246 | } |
| 226 | 247 | if ((data&0x40) == 0x40) // bit 6 |
| 227 | 248 | { |
| r5532 | r5533 | |
| 253 | 274 | /* End 68k i/o handlers */ |
| 254 | 275 | |
| 255 | 276 | /* Begin tms32010 i/o handlers */ |
| 256 | | WRITE16_HANDLER( spc_latch_outfifo_error_stats ) // latch 74ls74 @ E64 upper and lower halves with d0 and fifo status respectively |
| 277 | WRITE16_HANDLER( spc_latch_outfifo_error_stats ) // latch 74ls74 @ E64 upper and lower halves with d0 and 1 respectively |
| 257 | 278 | { |
| 258 | | dectalk.outfifo_writable_latch = (dectalk.outfifo_tail_ptr == ((dectalk.outfifo_head_ptr-1)&0xF)?0:1); // may have polarity backwards |
| 279 | dectalk.outfifo_writable_latch = 1; // always set to 1 here. |
| 259 | 280 | dectalk.spc_error_latch = data&1; |
| 260 | 281 | } |
| 261 | 282 | |
| r5532 | r5533 | |
| 329 | 350 | ADDRESS_MAP_END |
| 330 | 351 | |
| 331 | 352 | static ADDRESS_MAP_START(tms32010_io, ADDRESS_SPACE_IO, 16) |
| 332 | | AM_RANGE(0, 0) AM_WRITE(spc_latch_outfifo_error_stats) // latch fifo status to be read by outfifo_status_r, and also latch the error bit at D0. |
| 353 | AM_RANGE(0, 0) AM_WRITE(spc_latch_outfifo_error_stats) // *set* the outfifo_status_r semaphore, and also latch the error bit at D0. |
| 333 | 354 | AM_RANGE(1, 1) AM_READWRITE(spc_infifo_data_r, spc_outfifo_data_w) //read from input fifo, write to sound fifo |
| 334 | 355 | AM_RANGE(TMS32010_BIO, TMS32010_BIO) AM_READ(spc_outfifo_writable_r) //read output fifo writable status |
| 335 | 356 | ADDRESS_MAP_END |
| r5532 | r5533 | |
| 378 | 399 | |
| 379 | 400 | ROM_START( dectalk ) |
| 380 | 401 | ROM_REGION16_BE(0x40000,"maincpu", 0) |
| 381 | | // dectalk dtc-01 firmware v1.2? (first half: 23Jul84 tag; second half: 02Jul84 tag), all roms are 27128 eproms |
| 402 | // dectalk dtc-01 firmware v?.? (probably 1.4 or 2.1) (first half: 23Jul84 tag; second half: 02Jul84 tag), all roms are 27128 eproms |
| 382 | 403 | ROM_LOAD16_BYTE("dtc01_e5.123", 0x00000, 0x4000, CRC(03e1eefa) SHA1(e586de03e113683c2534fca1f3f40ba391193044)) // Label: "SP8510123E5" @ E8 |
| 383 | 404 | ROM_LOAD16_BYTE("dtc01_e5.119", 0x00001, 0x4000, CRC(af20411f) SHA1(7954bb56b7591f8954403a22d34de31c7d5441ac)) // Label: "SP8510119E5" @ E22 |
| 384 | 405 | ROM_LOAD16_BYTE("dtc01_e5.124", 0x08000, 0x4000, CRC(9edeafcb) SHA1(7724babf4ae5d77c0b4200f608d599058d04b25c)) // Label: "SP8510124E5" @ E7 |