src/mess/drivers/trs80.c
| r4433 | r4434 | |
| 32 | 32 | IRQ mode 1 |
| 33 | 33 | NMI |
| 34 | 34 | |
| 35 | | Printer: Level II usually 37e8; System80 uses port FD; Model 4 uses port F8 |
| 36 | | Uart: TR1602, equivalent to the uart used in the Exidy Sorcerer |
| 35 | Printer: Level II usually 37e8; System80 uses port FD; Model 4 uses port F8. |
| 36 | Uart: TR1602, equivalent to the uart used in the Exidy Sorcerer. |
| 37 | System80 has non-addressable dip switches to set the UART control register. |
| 38 | System80 and LNW80 have non-addressable links to set the baud rate. Receive and Transmit clocks are tied together. |
| 39 | It is assumed that the TRS80L2 UART setup is identical to the System80, apart from the address ports used. |
| 40 | Due to the above, the only working emulated UART is for the Model 3. |
| 37 | 41 | |
| 38 | 42 | I/O ports |
| 39 | 43 | FF: |
| r4433 | r4434 | |
| 82 | 86 | d4 Stop Bit Select ('1'=two stop bits, '0'=one stop bit) |
| 83 | 87 | d3 Parity Inhibit ('1'=disable; No parity, '0'=parity enabled) |
| 84 | 88 | d2 Break ('0'=disable transmit data; continuous RS232 'SPACE' condition) |
| 85 | | d1 Data-Terminal-Ready (DTR), pin 20 |
| 86 | | d0 Request-to-Send (RTS), pin 4 |
| 89 | d1 Request-to-Send (RTS), pin 4 |
| 90 | d0 Data-Terminal-Ready (DTR), pin 20 |
| 87 | 91 | EAh Output (Write), when E8h bit d1 is '0' (Control Register disabled): bits d5..d3 are secondary line control, and could even be used for steering or multiplexing logic; d2..d0 are Modem line control same as above |
| 88 | 92 | d7,d6 Not used |
| 89 | 93 | d5 Secondary Unassigned, pin 18 |
| r4433 | r4434 | |
| 131 | 135 | d6 Data-Set-Ready (DSR), pin 6 |
| 132 | 136 | d5 Carrier Detect (CD), pin 8 |
| 133 | 137 | d4 Ring Indicator (RI), pin 22 |
| 134 | | d3..d1 Not used |
| 135 | | d0 ?? UART Receiver Input, pin 20 (pin 20 is also DTR) |
| 138 | d3..d2,d0 Not used |
| 139 | d1 UART Receiver Input, pin 20 (pin 20 is also DTR) |
| 136 | 140 | |
| 137 | 141 | *************************************************************************** |
| 138 | 142 | |
| r4433 | r4434 | |
| 200 | 204 | /* memory from 3700-37ff, 8000-ffff only exists when expansion box is used */ |
| 201 | 205 | static ADDRESS_MAP_START( model1_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 202 | 206 | AM_RANGE(0x0000, 0x35ff) AM_ROM |
| 207 | AM_RANGE(0x37de, 0x37de) AM_READWRITE(sys80_f9_r, sys80_f8_w) |
| 208 | AM_RANGE(0x37df, 0x37df) AM_READWRITE(trs80m3_eb_r, trs80m3_eb_w) |
| 203 | 209 | AM_RANGE(0x37e0, 0x37e3) AM_READWRITE(trs80_irq_status_r, trs80_motor_w) |
| 204 | 210 | // AM_RANGE(0x37e4, 0x37e7) AM_NOP |
| 205 | 211 | AM_RANGE(0x37e8, 0x37eb) AM_READWRITE(trs80_printer_r, trs80_printer_w) |
| r4433 | r4434 | |
| 221 | 227 | |
| 222 | 228 | static ADDRESS_MAP_START( sys80_io, ADDRESS_SPACE_IO, 8 ) |
| 223 | 229 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 230 | AM_RANGE(0xf8, 0xf8) AM_READWRITE(trs80m3_eb_r, sys80_f8_w) |
| 231 | AM_RANGE(0xf9, 0xf9) AM_READWRITE(sys80_f9_r, trs80m3_eb_w) |
| 224 | 232 | AM_RANGE(0xfd, 0xfd) AM_READWRITE(trs80_printer_r, trs80_printer_w) |
| 225 | 233 | AM_RANGE(0xfe, 0xfe) AM_READ(trs80_fe_r) |
| 226 | 234 | AM_RANGE(0xff, 0xff) AM_READWRITE(trs80_ff_r, trs80_ff_w) |
| r4433 | r4434 | |
| 228 | 236 | |
| 229 | 237 | static ADDRESS_MAP_START( model3_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 230 | 238 | AM_RANGE(0x0000, 0x37ff) AM_ROM |
| 231 | | AM_RANGE(0x3800, 0x38ff) AM_READ(trs80_keyboard_r) |
| 239 | AM_RANGE(0x3800, 0x38ff) AM_MIRROR(0x300) AM_READ(trs80_keyboard_r) |
| 232 | 240 | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(SMH_RAM, trs80_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 233 | 241 | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 234 | 242 | ADDRESS_MAP_END |
| r4433 | r4434 | |
| 236 | 244 | static ADDRESS_MAP_START( model3_io, ADDRESS_SPACE_IO, 8 ) |
| 237 | 245 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 238 | 246 | /* the ports marked NOP are not emulated yet */ |
| 239 | | // AM_RANGE(0xe0, 0xe3) AM_READWRITE(trs80_irq_status_r, trs80_irq_mask_w) // needs to be fixed because it breaks the keyboard |
| 247 | // AM_RANGE(0xe0, 0xe3) AM_READWRITE(trs80_irq_status_r, trs80_irq_mask_w) // it breaks the keyboard |
| 240 | 248 | AM_RANGE(0xe4, 0xe4) AM_READWRITE(SMH_NOP,trs80_motor_w) |
| 241 | 249 | AM_RANGE(0xe8, 0xe8) AM_READWRITE(trs80m3_e8_r, trs80m3_e8_w) |
| 242 | | AM_RANGE(0xe9, 0xe9) AM_WRITE(trs80m3_e9_w) |
| 250 | AM_RANGE(0xe9, 0xe9) AM_READ_PORT("E9") AM_WRITE(trs80m3_e9_w) |
| 243 | 251 | AM_RANGE(0xea, 0xea) AM_READWRITE(trs80m3_ea_r, trs80m3_ea_w) |
| 244 | 252 | AM_RANGE(0xeb, 0xeb) AM_READWRITE(trs80m3_eb_r, trs80m3_eb_w) |
| 245 | | AM_RANGE(0xec, 0xec) AM_WRITENOP |
| 253 | // AM_RANGE(0xec, 0xec) AM_WRITENOP |
| 246 | 254 | AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("wd179x", trs80_wd179x_r, wd17xx_command_w) |
| 247 | 255 | AM_RANGE(0xf1, 0xf1) AM_DEVREADWRITE("wd179x", wd17xx_track_r, wd17xx_track_w) |
| 248 | 256 | AM_RANGE(0xf2, 0xf2) AM_DEVREADWRITE("wd179x", wd17xx_sector_r, wd17xx_sector_w) |
| 249 | 257 | AM_RANGE(0xf3, 0xf3) AM_DEVREADWRITE("wd179x", wd17xx_data_r, wd17xx_data_w) |
| 250 | | AM_RANGE(0xf4, 0xf4) AM_WRITENOP |
| 258 | // AM_RANGE(0xf4, 0xf4) AM_WRITENOP |
| 251 | 259 | AM_RANGE(0xf8, 0xf8) AM_READWRITE(trs80_printer_r, trs80_printer_w) |
| 252 | 260 | AM_RANGE(0xff, 0xff) AM_READWRITE(trs80_ff_r, trs80_ff_w) |
| 253 | 261 | ADDRESS_MAP_END |
| r4433 | r4434 | |
| 409 | 417 | #endif |
| 410 | 418 | INPUT_PORTS_END |
| 411 | 419 | |
| 420 | INPUT_PORTS_START( trs80m3 ) |
| 421 | PORT_INCLUDE (trs80) |
| 422 | PORT_START("E9") |
| 423 | PORT_BIT(0x07, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 424 | PORT_DIPNAME( 0x88, 0x08, "Parity") |
| 425 | PORT_DIPSETTING( 0x08, DEF_STR(None)) |
| 426 | PORT_DIPSETTING( 0x00, "Odd") |
| 427 | PORT_DIPSETTING( 0x80, "Even") |
| 428 | PORT_DIPNAME( 0x10, 0x10, "Stop Bits") |
| 429 | PORT_DIPSETTING( 0x10, "2") |
| 430 | PORT_DIPSETTING( 0x00, "1") |
| 431 | PORT_DIPNAME( 0x60, 0x60, "Bits") |
| 432 | PORT_DIPSETTING( 0x00, "5") |
| 433 | PORT_DIPSETTING( 0x20, "6") |
| 434 | PORT_DIPSETTING( 0x40, "7") |
| 435 | PORT_DIPSETTING( 0x60, "8") |
| 436 | INPUT_PORTS_END |
| 412 | 437 | |
| 413 | 438 | static const gfx_layout trs80_charlayout = |
| 414 | 439 | { |
| r4433 | r4434 | |
| 501 | 526 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 502 | 527 | MDRV_SOUND_WAVE_ADD("wave", "cassette") |
| 503 | 528 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 529 | |
| 504 | 530 | /* devices */ |
| 505 | | |
| 506 | 531 | MDRV_CASSETTE_ADD( "cassette", default_cassette_config ) |
| 507 | | |
| 508 | 532 | MACHINE_DRIVER_END |
| 509 | 533 | |
| 510 | 534 | static MACHINE_DRIVER_START( model1 ) |
| r4433 | r4434 | |
| 513 | 537 | MDRV_CPU_PROGRAM_MAP( model1_map, 0 ) |
| 514 | 538 | MDRV_CPU_IO_MAP( model1_io, 0 ) |
| 515 | 539 | |
| 540 | /* devices */ |
| 516 | 541 | MDRV_CASSETTE_MODIFY( "cassette", trs80l2_cassette_config ) |
| 517 | 542 | MDRV_QUICKLOAD_ADD("quickload", trs80_cmd, "cmd", 0.5) |
| 518 | 543 | MDRV_WD179X_ADD("wd179x", trs80_wd17xx_interface ) |
| 519 | | /* printer */ |
| 520 | 544 | MDRV_CENTRONICS_ADD("centronics", standard_centronics) |
| 545 | MDRV_AY31015_ADD( "tr1602", trs80_ay31015_config ) |
| 521 | 546 | MACHINE_DRIVER_END |
| 522 | 547 | |
| 523 | 548 | |
| r4433 | r4434 | |
| 527 | 552 | MDRV_CPU_PROGRAM_MAP( model3_map, 0 ) |
| 528 | 553 | MDRV_CPU_IO_MAP( model3_io, 0 ) |
| 529 | 554 | MDRV_CPU_VBLANK_INT_HACK(trs80_frame_interrupt, 2) |
| 530 | | MDRV_AY31015_ADD( "tr1602", trs80_ay31015_config ) |
| 531 | 555 | MACHINE_DRIVER_END |
| 532 | 556 | |
| 533 | 557 | static MACHINE_DRIVER_START( sys80 ) |
| 534 | 558 | MDRV_IMPORT_FROM( model1 ) |
| 535 | 559 | MDRV_CPU_MODIFY( "maincpu" ) |
| 536 | 560 | MDRV_CPU_IO_MAP( sys80_io, 0 ) |
| 537 | | //MDRV_AY31015_ADD( "tr1602", trs80_ay31015_config ) // need more info |
| 538 | 561 | MACHINE_DRIVER_END |
| 539 | 562 | |
| 540 | 563 | static MACHINE_DRIVER_START( ht1080z ) |
| r4433 | r4434 | |
| 673 | 696 | SYSTEM_CONFIG_END |
| 674 | 697 | |
| 675 | 698 | |
| 676 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 677 | | COMP( 1977, trs80, 0, 0, trs80, trs80, trs80, 0, "Tandy Radio Shack", "TRS-80 Model I (Level I Basic)" , 0) |
| 678 | | COMP( 1978, trs80l2, trs80, 0, model1, trs80, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model I (Level II Basic)" , 0) |
| 679 | | COMP( 1983, radionic, trs80, 0, model1, trs80, radionic, trs8012, "Komtek", "Radionic" , 0) |
| 680 | | COMP( 1980, sys80, trs80, 0, sys80, trs80, trs80, trs8012, "EACA Computers Ltd.","System-80" , 0) |
| 681 | | COMP( 1981, lnw80, trs80, 0, model1, trs80, lnw80, trs8012, "LNW Research","LNW-80", 0 ) |
| 682 | | COMP( 1980, trs80m3, trs80, 0, model3, trs80, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model III", 0 ) |
| 683 | | COMP( 1980, trs80m4, trs80, 0, model3, trs80, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model 4", 0 ) |
| 684 | | COMP( 1983, ht1080z, trs80, 0, ht1080z, trs80, ht1080z, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z Series I" , 0) |
| 685 | | COMP( 1984, ht1080z2, trs80, 0, ht1080z, trs80, ht1080z, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z Series II" , 0) |
| 686 | | COMP( 1985, ht108064, trs80, 0, ht1080z, trs80, ht108064, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z/64" , 0) |
| 699 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 700 | COMP( 1977, trs80, 0, 0, trs80, trs80, trs80, 0, "Tandy Radio Shack", "TRS-80 Model I (Level I Basic)" , 0) |
| 701 | COMP( 1978, trs80l2, trs80, 0, model1, trs80, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model I (Level II Basic)" , 0) |
| 702 | COMP( 1983, radionic, trs80, 0, model1, trs80, radionic, trs8012, "Komtek", "Radionic" , 0) |
| 703 | COMP( 1980, sys80, trs80, 0, sys80, trs80, trs80, trs8012, "EACA Computers Ltd.","System-80" , 0) |
| 704 | COMP( 1981, lnw80, trs80, 0, model1, trs80m3, lnw80, trs8012, "LNW Research","LNW-80", 0 ) |
| 705 | COMP( 1980, trs80m3, trs80, 0, model3, trs80m3, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model III", 0 ) |
| 706 | COMP( 1980, trs80m4, trs80, 0, model3, trs80m3, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model 4", 0 ) |
| 707 | COMP( 1983, ht1080z, trs80, 0, ht1080z, trs80, ht1080z, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z Series I" , 0) |
| 708 | COMP( 1984, ht1080z2, trs80, 0, ht1080z, trs80, ht1080z, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z Series II" , 0) |
| 709 | COMP( 1985, ht108064, trs80, 0, ht1080z, trs80, ht108064, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z/64" , 0) |