src/mess/machine/trs80.c
| r4440 | r4441 | |
| 33 | 33 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 34 | 34 | |
| 35 | 35 | |
| 36 | | static UINT8 trs80_port_e0 = 0; |
| 37 | | UINT8 trs80_mode = 0; |
| 36 | static UINT8 trs80_int=0; /* interrupting devices */ |
| 37 | static UINT8 trs80_mask= 0; /* interrupt mask */ |
| 38 | static UINT8 trs80_port_ec=0; /* bit d6..d1 of port EC to be read by port FF */ |
| 39 | UINT8 trs80_mode = 0; /* Control bits passed to video output routine */ |
| 38 | 40 | |
| 39 | 41 | #define IRQ_TIMER 0x80 /* RTC on Model I */ |
| 40 | 42 | #define IRQ_RTC 0x04 /* RTC on Model 4 */ |
| r4440 | r4441 | |
| 52 | 54 | #ifdef USE_SECTOR |
| 53 | 55 | static UINT8 sector[4] = {0, }; /* current sector per drive */ |
| 54 | 56 | #endif |
| 55 | | static UINT8 irq_mask = 0; |
| 57 | |
| 56 | 58 | static UINT8 trs80_reg_load=1; |
| 57 | 59 | |
| 58 | 60 | #define FW TRS80_FONT_W |
| r4440 | r4441 | |
| 224 | 226 | trs80_cass = devtag_get_device(machine, "cassette"); |
| 225 | 227 | trs80_speaker = devtag_get_device(machine, "speaker"); |
| 226 | 228 | trs80_fdc = devtag_get_device(machine, "wd179x"); |
| 229 | videoram_size = 0x800; |
| 227 | 230 | } |
| 228 | 231 | |
| 229 | 232 | |
| r4440 | r4441 | |
| 340 | 343 | |
| 341 | 344 | READ8_HANDLER( trs80m4_e0_r ) |
| 342 | 345 | { |
| 343 | | return ~trs80_port_e0; |
| 346 | /* Indicates which devices are interrupting - only d2 is emulated |
| 347 | d6 RS232 Error |
| 348 | d5 RS232 Rcv |
| 349 | d4 RS232 Xmit |
| 350 | d3 I/O Bus |
| 351 | d2 RTC |
| 352 | d1 Cass 1500 baud Falling |
| 353 | d0 Cass 1500 baud Rising */ |
| 354 | |
| 355 | return ~(trs80_mask & trs80_int); |
| 344 | 356 | } |
| 345 | 357 | |
| 358 | READ8_HANDLER( trs80m4_e4_r ) |
| 359 | { |
| 360 | /* NMI status bits from the FDC - not emulated |
| 361 | d7 status of FDC INTREQ (0=true) |
| 362 | d6 status of Motor Timeout (0=true) |
| 363 | d5 status of Reset signal (0=true) */ |
| 364 | |
| 365 | return 0xff; |
| 366 | } |
| 367 | |
| 346 | 368 | READ8_HANDLER( trs80m4_e8_r ) |
| 347 | 369 | { |
| 348 | 370 | /* These bits directly read pins on the RS-232 socket, and are not emulated |
| 349 | | d7 Clear-to-Send (CTS), Pin 5 |
| 350 | | d6 Data-Set-Ready (DSR), pin 6 |
| 351 | | d5 Carrier Detect (CD), pin 8 |
| 352 | | d4 Ring Indicator (RI), pin 22 |
| 353 | | d3,d2,d0 Not used |
| 371 | d7 Clear-to-Send (CTS), Pin 5 |
| 372 | d6 Data-Set-Ready (DSR), pin 6 |
| 373 | d5 Carrier Detect (CD), pin 8 |
| 374 | d4 Ring Indicator (RI), pin 22 |
| 375 | d3,d2,d0 Not used |
| 354 | 376 | d1 UART Receiver Input, pin 20 (pin 20 is also DTR) */ |
| 355 | 377 | |
| 356 | | return 0; // this is a guess |
| 378 | return 0; |
| 357 | 379 | } |
| 358 | 380 | |
| 359 | 381 | READ8_HANDLER( trs80m4_ea_r ) |
| r4440 | r4441 | |
| 390 | 412 | READ8_HANDLER( trs80m4_ec_r ) |
| 391 | 413 | { |
| 392 | 414 | /* Reset the RTC interrupt */ |
| 393 | | // trs80_port_e0 &= ~IRQ_RTC; |
| 415 | trs80_int &= ~IRQ_RTC; |
| 394 | 416 | return 0; |
| 395 | 417 | } |
| 396 | 418 | |
| r4440 | r4441 | |
| 420 | 442 | |
| 421 | 443 | READ8_HANDLER( trs80_ff_r ) |
| 422 | 444 | { |
| 423 | | UINT8 data = (~trs80_mode & 1) << 5; // MODESEL bit (32 or 64 chars per line) |
| 445 | /* ModeSel and cassette data |
| 446 | d7 cassette data from tape |
| 447 | d2 modesel setting */ |
| 448 | |
| 449 | UINT8 data = (~trs80_mode & 1) << 5; |
| 424 | 450 | return data | cassette_data; |
| 425 | 451 | } |
| 426 | 452 | |
| r4440 | r4441 | |
| 428 | 454 | { |
| 429 | 455 | /* Return of cassette data stream from tape |
| 430 | 456 | d7 Low-speed data |
| 457 | d6..d1 info from write of port EC |
| 431 | 458 | d0 High-speed data (not emulated yet) */ |
| 432 | 459 | |
| 433 | | UINT8 data = trs80m4_ec_r(space, 0); // this is a mirror of 0xec |
| 434 | | data++; // get rid of compile error |
| 435 | | return cassette_data; |
| 460 | trs80_int &= 0xfc; /* clear cassette interrupts */ |
| 461 | return trs80_port_ec | cassette_data; |
| 436 | 462 | } |
| 437 | 463 | |
| 464 | |
| 438 | 465 | WRITE8_HANDLER( trs80m4_84_w ) |
| 439 | 466 | { |
| 440 | | /* Hi-res graphics control (not emulated) |
| 467 | /* Hi-res graphics control (only d2,d3,d7 are emulated) |
| 441 | 468 | d7 Page Control |
| 442 | 469 | d6 Fix upper memory |
| 443 | 470 | d5 Memory bit 1 |
| r4440 | r4441 | |
| 446 | 473 | d2 80/64 width |
| 447 | 474 | d1 Select bit 1 |
| 448 | 475 | d0 Select bit 0 */ |
| 476 | |
| 477 | trs80_mode = (trs80_mode & 0x73) | (data & 0x8c); |
| 449 | 478 | } |
| 450 | 479 | |
| 451 | 480 | WRITE8_HANDLER( trs80m4_90_w ) |
| r4440 | r4441 | |
| 455 | 484 | |
| 456 | 485 | WRITE8_HANDLER( trs80m4_e0_w ) |
| 457 | 486 | { |
| 458 | | /* Interrupt settings |
| 487 | /* Interrupt settings - which devices are allowed to interrupt - bits align with read of E0 |
| 459 | 488 | d6 Enable Rec Err |
| 460 | 489 | d5 Enable Rec Data |
| 461 | 490 | d4 Enable Xmit Emp |
| r4440 | r4441 | |
| 464 | 493 | d1 C fall Int |
| 465 | 494 | d0 C Rise Int */ |
| 466 | 495 | |
| 467 | | trs80_port_e0 = data; |
| 496 | trs80_mask = data; |
| 468 | 497 | } |
| 469 | 498 | |
| 499 | WRITE8_HANDLER( trs80m4_e4_w ) |
| 500 | { |
| 501 | /* Disk to NMI interface (not emulated) |
| 502 | d7 1=enable disk INTRQ to generate NMI |
| 503 | d6 1=enable disk Motor Timeout to generate NMI */ |
| 504 | } |
| 505 | |
| 470 | 506 | WRITE8_HANDLER( trs80m4_e8_w ) |
| 471 | 507 | { |
| 472 | 508 | /* d1 when '1' enables control register load (see below) */ |
| 509 | |
| 473 | 510 | trs80_reg_load = data & 2; |
| 474 | 511 | } |
| 475 | 512 | |
| r4440 | r4441 | |
| 524 | 561 | ay31015_set_input_pin( trs80_ay31015, AY31015_CS, 1 ); |
| 525 | 562 | } |
| 526 | 563 | else |
| 564 | { |
| 527 | 565 | |
| 528 | 566 | /* These directly adjust levels at the RS-232 socket - not emulated |
| 529 | 567 | d7,d6 Not used |
| r4440 | r4441 | |
| 534 | 572 | d1 Data-Terminal-Ready (DTR), pin 20 |
| 535 | 573 | d0 Request-to-Send (RTS), pin 4 */ |
| 536 | 574 | |
| 537 | | { |
| 538 | 575 | } |
| 539 | 576 | } |
| 540 | 577 | |
| r4440 | r4441 | |
| 547 | 584 | { |
| 548 | 585 | /* Hardware settings - d5..d3 not emulated |
| 549 | 586 | d6 CPU fast (1=4MHz, 0=2MHz) |
| 550 | | d5 Enable Video Wait |
| 551 | | d4 Enable External I/O bus |
| 552 | | d3 Enable Alternate Character Set |
| 587 | d5 1=Enable Video Wait |
| 588 | d4 1=Enable External I/O bus |
| 589 | d3 1=Enable Alternate Character Set |
| 553 | 590 | d2 Mode Select (0=64 chars, 1=32chars) |
| 554 | 591 | d1 Cassette Motor (1=On) */ |
| 555 | 592 | |
| r4440 | r4441 | |
| 559 | 596 | if (changed & 0x40) |
| 560 | 597 | cpu_set_clock(space->machine->cpu[0], data & 0x40 ? MODEL4_MASTER_CLOCK/5 : MODEL4_MASTER_CLOCK/10); |
| 561 | 598 | |
| 562 | | if (data & 0x04) |
| 563 | | trs80_mode |= 1; |
| 564 | | else |
| 565 | | trs80_mode &= 2; |
| 599 | trs80_mode = (trs80_mode & 0xfe) | ((data & 4) ? 1 : 0); |
| 566 | 600 | |
| 567 | 601 | if (changed & 0x02) |
| 568 | 602 | cassette_change_state( trs80_cass, ( data & 2 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); |
| 569 | 603 | |
| 570 | 604 | settings = data; |
| 605 | trs80_port_ec = data & 0x7e; |
| 571 | 606 | } |
| 572 | 607 | |
| 608 | WRITE8_HANDLER( trs80m4_f4_w ) |
| 609 | { |
| 610 | /* Selection of drive and parameters - not emulated. |
| 611 | A write also causes the selected drive motor to turn on for about 3 seconds. |
| 612 | When the motor turns off, the drive is deselected. |
| 613 | d7 1=MFM, 0=FM |
| 614 | d6 1=Wait |
| 615 | d5 1=Write Precompensation enabled |
| 616 | d4 0=Side 0, 1=Side 1 |
| 617 | d3 1=select drive 3 |
| 618 | d2 1=select drive 2 |
| 619 | d1 1=select drive 1 |
| 620 | d0 1=select drive 0 */ |
| 621 | } |
| 622 | |
| 573 | 623 | WRITE8_HANDLER( sys80_f8_w ) |
| 574 | 624 | { |
| 575 | 625 | /* These adjust levels at the socket pins - not emulated |
| r4440 | r4441 | |
| 578 | 628 | d0 RTS */ |
| 579 | 629 | } |
| 580 | 630 | |
| 631 | WRITE8_HANDLER( sys80_fe_w ) |
| 632 | { |
| 633 | /* not emulated |
| 634 | d4 select internal or external cassette player */ |
| 635 | } |
| 636 | |
| 637 | WRITE8_HANDLER( lnw80_fe_w ) |
| 638 | { |
| 639 | /* not emulated |
| 640 | d3 bankswitch lower 16k between roms and hires ram |
| 641 | d2 enable colour |
| 642 | d0 inverse video (whole screen) */ |
| 643 | |
| 644 | trs80_mode = (trs80_mode & 0xf7) | ((data & 1) ? 8 : 0); |
| 645 | } |
| 646 | |
| 581 | 647 | WRITE8_HANDLER( trs80_ff_w ) |
| 582 | 648 | { |
| 649 | /* Standard output port of Model I |
| 650 | d3 ModeSel bit |
| 651 | d1, d0 Cassette output */ |
| 652 | |
| 583 | 653 | static const double levels[4] = { 0.0, -1.0, 0.0, 1.0 }; |
| 584 | 654 | |
| 585 | 655 | cassette_change_state( trs80_cass, ( data & 4 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); |
| r4440 | r4441 | |
| 591 | 661 | |
| 592 | 662 | WRITE8_HANDLER( trs80m4_ff_w ) |
| 593 | 663 | { |
| 664 | /* Cassette port |
| 665 | d1, d0 Cassette output */ |
| 666 | |
| 594 | 667 | static const double levels[4] = { 0.0, -1.0, 0.0, 1.0 }; |
| 595 | 668 | cassette_output( trs80_cass, levels[data & 3]); |
| 596 | 669 | cassette_data &= ~0x80; |
| r4440 | r4441 | |
| 605 | 678 | |
| 606 | 679 | INTERRUPT_GEN( trs80_timer_interrupt ) |
| 607 | 680 | { |
| 608 | | if( (irq_status & IRQ_TIMER) == 0 ) |
| 681 | if( (trs80_int & IRQ_TIMER) == 0 ) |
| 609 | 682 | { |
| 610 | | irq_status |= IRQ_TIMER; |
| 683 | trs80_int |= IRQ_TIMER; |
| 611 | 684 | cpu_set_input_line(device, 0, HOLD_LINE); |
| 612 | 685 | } |
| 613 | 686 | } |
| 614 | 687 | |
| 615 | 688 | INTERRUPT_GEN( trs80m4_rtc_interrupt ) |
| 616 | 689 | { |
| 617 | | // if( (irq_status & IRQ_RTC) == 0 ) |
| 618 | | if( (irq_status & 1) == 0 ) |
| 690 | /* This enables the processing of interrupts, particularly the clock and the flashing cursor. |
| 691 | We alternately raise and lower the INT line. The OS counts one tick for each interrupt. |
| 692 | There are 30 ticks per second. */ |
| 693 | |
| 694 | if (irq_status) |
| 619 | 695 | { |
| 620 | | irq_status |= IRQ_RTC; |
| 621 | | irq_status |= 1; // indicate irq in progress |
| 622 | | cpu_set_input_line(device, 0, HOLD_LINE); |
| 696 | irq_status = 0; |
| 697 | cpu_set_input_line(device, 0, CLEAR_LINE); |
| 623 | 698 | } |
| 624 | 699 | else |
| 625 | | if (irq_status & 1) |
| 626 | 700 | { |
| 627 | | irq_status &= 0xfe; |
| 628 | | cpu_set_input_line(device, 0, CLEAR_LINE); |
| 701 | trs80_int |= IRQ_RTC; |
| 702 | irq_status = 1; |
| 703 | cpu_set_input_line(device, 0, HOLD_LINE); |
| 629 | 704 | } |
| 630 | 705 | } |
| 631 | 706 | |
| 632 | 707 | static void trs80_fdc_interrupt_internal(running_machine *machine) |
| 633 | 708 | { |
| 634 | | if ((irq_status & IRQ_FDC) == 0) |
| 709 | if ((trs80_int & IRQ_FDC) == 0) |
| 635 | 710 | { |
| 636 | | irq_status |= IRQ_FDC; |
| 711 | trs80_int |= IRQ_FDC; |
| 637 | 712 | cpu_set_input_line(machine->cpu[0], 0, HOLD_LINE); |
| 638 | 713 | } |
| 639 | 714 | } |
| r4440 | r4441 | |
| 648 | 723 | switch (state) |
| 649 | 724 | { |
| 650 | 725 | case WD17XX_IRQ_CLR: |
| 651 | | irq_status &= ~IRQ_FDC; |
| 726 | trs80_int &= ~IRQ_FDC; |
| 652 | 727 | break; |
| 653 | 728 | case WD17XX_IRQ_SET: |
| 654 | 729 | trs80_fdc_interrupt_internal(device->machine); |
| r4440 | r4441 | |
| 663 | 738 | const wd17xx_interface trs80_wd17xx_interface = { trs80_fdc_callback, NULL }; |
| 664 | 739 | |
| 665 | 740 | |
| 666 | | INTERRUPT_GEN( trs80_frame_interrupt ) |
| 667 | | { |
| 668 | | } |
| 669 | | |
| 670 | 741 | /************************************* |
| 671 | 742 | * * |
| 672 | 743 | * Memory handlers * |
| 673 | 744 | * * |
| 674 | 745 | *************************************/ |
| 675 | 746 | |
| 676 | | READ8_HANDLER ( trs80_printer_r ) |
| 747 | READ8_HANDLER ( trs80_printer_r ) |
| 677 | 748 | { |
| 678 | 749 | /* Bit 7 - 1 = Busy; 0 = Not Busy |
| 679 | 750 | Bit 6 - 1 = Out of Paper; 0 = Paper |
| r4440 | r4441 | |
| 691 | 762 | centronics_strobe_w(trs80_printer, 0); |
| 692 | 763 | } |
| 693 | 764 | |
| 694 | | READ8_HANDLER( trs80_irq_status_r ) |
| 765 | READ8_HANDLER( trs80_irq_status_r ) |
| 695 | 766 | { |
| 696 | | int result = irq_status; |
| 697 | | irq_status &= ~(IRQ_TIMER | IRQ_FDC); |
| 767 | int result = trs80_int; |
| 768 | trs80_int &= ~(IRQ_TIMER | IRQ_FDC); |
| 698 | 769 | return result; |
| 699 | 770 | } |
| 700 | 771 | |
| 701 | | WRITE8_HANDLER( trs80_irq_mask_w ) |
| 702 | | { |
| 703 | | irq_mask = data; |
| 704 | | } |
| 705 | 772 | |
| 706 | 773 | WRITE8_HANDLER( trs80_motor_w ) |
| 707 | 774 | { |
src/mess/drivers/trs80.c
| r4440 | r4441 | |
| 89 | 89 | Expansion interface for more floppy drives. The drives use 8-inch floppies holding 0.5mb of data. |
| 90 | 90 | It was extremely expensive, non-standard, and not many were sold. A rom dump does not seem to exist. |
| 91 | 91 | |
| 92 | | About the Model 4 - Our emulation is incorrect. The correct display size is 80x24. We possibly |
| 93 | | have the wrong roms - to be checked. |
| 92 | About the Model 4 - This has 4 memory maps. |
| 93 | We emulate Map 1 except for the legacy printer port (see address map for Model 3). |
| 94 | Map 2 - RAM=0..37FF, Keyboard=3800..3Bff, Video=3C00..3FFF, RAM=4000..FFFF |
| 95 | Map 3 - RAM=0..F3FF, Keyboard=F400..F7FF, Video=F800..FFFF |
| 96 | Map 4 - RAM=0..FFFF |
| 94 | 97 | |
| 95 | 98 | *************************************************************************** |
| 96 | 99 | |
| 97 | | Not dumped: |
| 100 | Not dumped (to our knowledge): |
| 98 | 101 | TRS80 Japanese bios |
| 99 | 102 | TRS80 Katakana Character Generator |
| 100 | | TRS80 Model III and 4 Character Generators |
| 103 | TRS80 Model III/4 Character Generators |
| 104 | TRS80 Model 4P bios and boot disk |
| 105 | TRS80 Model II bios and boot disk |
| 101 | 106 | |
| 102 | 107 | Not emulated: |
| 103 | 108 | TRS80 Japanese kana/ascii switch and alternate keyboard |
| 104 | | TRS80 Model III and 4 hardware above what is in a Model I. |
| 109 | TRS80 Model III/4 Hard drive, Graphics board, Alternate Character set |
| 105 | 110 | LNW80 1.77 / 4.0 MHz switch |
| 106 | 111 | LNW80 Colour board |
| 107 | 112 | LNW80 Hires graphics |
| r4440 | r4441 | |
| 147 | 152 | static ADDRESS_MAP_START( trs80_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 148 | 153 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 149 | 154 | AM_RANGE(0x3800, 0x38ff) AM_READ(trs80_keyboard_r) |
| 150 | | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(SMH_RAM, trs80_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 155 | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE(&videoram) |
| 151 | 156 | AM_RANGE(0x4000, 0x7fff) AM_RAM |
| 152 | 157 | ADDRESS_MAP_END |
| 153 | 158 | |
| r4440 | r4441 | |
| 168 | 173 | AM_RANGE(0x37ee, 0x37ee) AM_DEVREADWRITE("wd179x", wd17xx_sector_r, wd17xx_sector_w) |
| 169 | 174 | AM_RANGE(0x37ef, 0x37ef) AM_DEVREADWRITE("wd179x", wd17xx_data_r, wd17xx_data_w) |
| 170 | 175 | AM_RANGE(0x3800, 0x38ff) AM_MIRROR(0x300) AM_READ(trs80_keyboard_r) |
| 171 | | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(SMH_RAM, trs80_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 176 | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 172 | 177 | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 173 | 178 | ADDRESS_MAP_END |
| 174 | 179 | |
| r4440 | r4441 | |
| 182 | 187 | AM_RANGE(0xf8, 0xf8) AM_READWRITE(trs80m4_eb_r, sys80_f8_w) |
| 183 | 188 | AM_RANGE(0xf9, 0xf9) AM_READWRITE(sys80_f9_r, trs80m4_eb_w) |
| 184 | 189 | AM_RANGE(0xfd, 0xfd) AM_READWRITE(trs80_printer_r, trs80_printer_w) |
| 185 | | // AM_RANGE(0xfe, 0xfe) AM_WRITE(sys80_fe_w) |
| 190 | AM_RANGE(0xfe, 0xfe) AM_WRITE(sys80_fe_w) |
| 186 | 191 | AM_RANGE(0xff, 0xff) AM_READWRITE(trs80_ff_r, trs80_ff_w) |
| 187 | 192 | ADDRESS_MAP_END |
| 188 | 193 | |
| 189 | 194 | static ADDRESS_MAP_START( model3_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 190 | 195 | AM_RANGE(0x0000, 0x37ff) AM_ROM |
| 191 | 196 | AM_RANGE(0x3800, 0x38ff) AM_MIRROR(0x300) AM_READ(trs80_keyboard_r) |
| 192 | | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(SMH_RAM, trs80_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 197 | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 193 | 198 | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 194 | 199 | ADDRESS_MAP_END |
| 195 | 200 | |
| 196 | 201 | static ADDRESS_MAP_START( model3_io, ADDRESS_SPACE_IO, 8 ) |
| 197 | 202 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 198 | 203 | AM_RANGE(0x84, 0x87) AM_WRITE(trs80m4_84_w) |
| 204 | AM_RANGE(0x88, 0x89) AM_WRITE(trs80m4_88_w) |
| 199 | 205 | AM_RANGE(0x90, 0x93) AM_WRITE(trs80m4_90_w) |
| 200 | 206 | AM_RANGE(0xe0, 0xe3) AM_READWRITE(trs80m4_e0_r, trs80m4_e0_w) |
| 201 | | // AM_RANGE(0xe4, 0xe4) AM_READWRITE(SMH_NOP,SMH_NOP) // read nmi status, write nmi mask |
| 207 | AM_RANGE(0xe4, 0xe4) AM_READWRITE(trs80m4_e4_r, trs80m4_e4_w) |
| 202 | 208 | AM_RANGE(0xe8, 0xe8) AM_READWRITE(trs80m4_e8_r, trs80m4_e8_w) |
| 203 | 209 | AM_RANGE(0xe9, 0xe9) AM_READ_PORT("E9") AM_WRITE(trs80m4_e9_w) |
| 204 | 210 | AM_RANGE(0xea, 0xea) AM_READWRITE(trs80m4_ea_r, trs80m4_ea_w) |
| r4440 | r4441 | |
| 208 | 214 | AM_RANGE(0xf1, 0xf1) AM_DEVREADWRITE("wd179x", wd17xx_track_r, wd17xx_track_w) |
| 209 | 215 | AM_RANGE(0xf2, 0xf2) AM_DEVREADWRITE("wd179x", wd17xx_sector_r, wd17xx_sector_w) |
| 210 | 216 | AM_RANGE(0xf3, 0xf3) AM_DEVREADWRITE("wd179x", wd17xx_data_r, wd17xx_data_w) |
| 211 | | AM_RANGE(0xf4, 0xf4) AM_WRITE(trs80_motor_w) |
| 217 | AM_RANGE(0xf4, 0xf4) AM_WRITE(trs80m4_f4_w) |
| 212 | 218 | AM_RANGE(0xf8, 0xfb) AM_READWRITE(trs80_printer_r, trs80_printer_w) |
| 213 | 219 | AM_RANGE(0xfc, 0xff) AM_READWRITE(trs80m4_ff_r, trs80m4_ff_w) |
| 214 | 220 | ADDRESS_MAP_END |
| r4440 | r4441 | |
| 450 | 456 | |
| 451 | 457 | MDRV_MACHINE_RESET( trs80 ) |
| 452 | 458 | |
| 453 | | /* video hardware */ |
| 459 | /* video hardware */ |
| 454 | 460 | MDRV_SCREEN_ADD("screen", RASTER) |
| 455 | 461 | MDRV_SCREEN_REFRESH_RATE(60) |
| 456 | 462 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| r4440 | r4441 | |
| 466 | 472 | /* sound hardware */ |
| 467 | 473 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 468 | 474 | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 469 | | // MDRV_SOUND_CONFIG(trs80_speaker_interface) |
| 470 | 475 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 471 | 476 | MDRV_SOUND_WAVE_ADD("wave", "cassette") |
| 472 | 477 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| r4440 | r4441 | |
| 495 | 500 | MDRV_CPU_MODIFY( "maincpu" ) |
| 496 | 501 | MDRV_CPU_PROGRAM_MAP( model3_map, 0 ) |
| 497 | 502 | MDRV_CPU_IO_MAP( model3_io, 0 ) |
| 498 | | // MDRV_CPU_VBLANK_INT_HACK(trs80_frame_interrupt, 2) |
| 499 | 503 | MDRV_CPU_PERIODIC_INT(trs80m4_rtc_interrupt, 60) |
| 500 | 504 | MACHINE_DRIVER_END |
| 501 | 505 | |