src/mess/machine/abc830.c
| r9137 | r9138 | |
| 176 | 176 | |
| 177 | 177 | Fast Controller |
| 178 | 178 | --------------- |
| 179 | | - controller reads a couple of sectors on boot, bails out, and starts to STEP_OUT ad infinitum |
| 180 | 179 | - Z80 DMA reset command is broken (it keeps resetting A/B port addresses) |
| 181 | 180 | - 2KB RAM option |
| 182 | | - some SW2 options make controller try to WRITE_TRK |
| 183 | | - 640KB disks have 7:1 sector interleave (logical sector numbering 1,8,F,6,D,4,B,2,9,10,7,E,5,C,3,A) |
| 181 | - 160KB disks need a 7:1 sector interleave to load (physical sectors: 1,8,F,6,D,4,B,2,9,10,7,E,5,C,3,A) |
| 184 | 182 | |
| 185 | 183 | */ |
| 186 | 184 | |
| r9137 | r9138 | |
| 620 | 618 | { |
| 621 | 619 | /* |
| 622 | 620 | |
| 623 | | bit description |
| 621 | bit signal description |
| 624 | 622 | |
| 625 | | 0 DS0 |
| 626 | | 1 DS1 |
| 627 | | 2 DS2 |
| 628 | | 3 MTRON |
| 629 | | 4 pin 2 of 50-pin floppy connector, not used |
| 630 | | 5 SIDE1 |
| 623 | 0 DS0 drive select 0 |
| 624 | 1 DS1 drive select 1 |
| 625 | 2 DS2 drive select 2 |
| 626 | 3 MTRON motor on |
| 627 | 4 TG43 track > 43 |
| 628 | 5 SIDE1 side 1 select |
| 631 | 629 | 6 |
| 632 | 630 | 7 |
| 633 | 631 | |
| r9137 | r9138 | |
| 655 | 653 | { |
| 656 | 654 | /* |
| 657 | 655 | |
| 658 | | bit description |
| 656 | bit signal description |
| 659 | 657 | |
| 660 | | 0 FD1793 _MR |
| 661 | | 1 FD1793 _DDEN, FDC9229 DENS |
| 662 | | 2 FDC9229 MINI |
| 663 | | 3 READY signal polarity (0=inverted) |
| 664 | | 4 FDC9229 P2 |
| 665 | | 5 FDC9229 P1 |
| 658 | 0 FD1793 _MR FDC master reset |
| 659 | 1 FD1793 _DDEN, FDC9229 DENS density select |
| 660 | 2 FDC9229 MINI |
| 661 | 3 READY signal polarity (0=inverted) |
| 662 | 4 FDC9229 P2 |
| 663 | 5 FDC9229 P1 |
| 666 | 664 | 6 |
| 667 | 665 | 7 |
| 668 | 666 | |
| r9137 | r9138 | |
| 681 | 679 | { |
| 682 | 680 | /* |
| 683 | 681 | |
| 684 | | bit description |
| 682 | bit signal description |
| 685 | 683 | |
| 686 | | 0 3A.8 (busy) |
| 687 | | 1 50-pin floppy connector pin 10, not used |
| 688 | | 2 3A.12 (SW2) |
| 689 | | 3 ? GND |
| 684 | 0 busy controller busy |
| 685 | 1 _FD2S double-sided disk |
| 686 | 2 SW2 |
| 687 | 3 _DCG ? disk changed |
| 690 | 688 | 4 SW1-1 |
| 691 | 689 | 5 SW1-2 |
| 692 | 690 | 6 SW1-3 |
| r9137 | r9138 | |
| 708 | 706 | |
| 709 | 707 | /* SW2 */ |
| 710 | 708 | UINT8 sw2 = input_port_read(device->machine, "luxor_55_21046:SW2") & 0x0f; |
| 711 | | |
| 712 | | int sw2_1 = BIT(offset, 8) & BIT(sw2, 0); |
| 713 | | int sw2_2 = BIT(offset, 9) & BIT(sw2, 1); |
| 714 | | int sw2_3 = BIT(offset, 10) & BIT(sw2, 2); |
| 715 | | int sw2_4 = BIT(offset, 11) & BIT(sw2, 3); |
| 709 | |
| 710 | // TTL inputs float high |
| 711 | int sw2_1 = BIT(sw2, 0) ? 1 : BIT(offset, 8); |
| 712 | int sw2_2 = BIT(sw2, 1) ? 1 : BIT(offset, 9); |
| 713 | int sw2_3 = BIT(sw2, 2) ? 1 : BIT(offset, 10); |
| 714 | int sw2_4 = BIT(sw2, 3) ? 1 : BIT(offset, 11); |
| 716 | 715 | int sw2_data = !(sw2_1 & sw2_2 & !(sw2_3 ^ sw2_4)); |
| 717 | 716 | |
| 718 | 717 | data |= sw2_data << 2; |
| r9137 | r9138 | |
| 816 | 815 | PORT_DIPSETTING( 0x08, "40" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) |
| 817 | 816 | |
| 818 | 817 | PORT_START("luxor_55_21046:SW2") |
| 819 | | PORT_DIPNAME( 0x0f, 0x0b, "Drive Type" ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 820 | | PORT_DIPSETTING( 0x0e, "TEAC FD55F (ABC 834)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 230 7802-01 |
| 821 | | PORT_DIPSETTING( 0x0d, "BASF 6138 (ABC 850)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 230 8440-15 |
| 822 | | PORT_DIPSETTING( 0x0c, "Micropolis 1015F (ABC 832)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-15 |
| 823 | | PORT_DIPSETTING( 0x0b, "BASF 6118 (ABC 832)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-16 |
| 824 | | PORT_DIPSETTING( 0x0a, "Micropolis 1115F (ABC 832)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-17 |
| 825 | | PORT_DIPSETTING( 0x07, "BASF 6106/08 (ABC 830)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2d) // 190 9206-16 |
| 826 | | PORT_DIPSETTING( 0x06, "MPI 51 (ABC 830)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2d) // 190 9206-16 |
| 827 | | PORT_DIPSETTING( 0x01, "BASF 6105 (ABC 838)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2e) |
| 828 | | PORT_DIPSETTING( 0x00, "BASF 6106 (ABC 838)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2e) // 230 8838-15 |
| 818 | PORT_DIPNAME( 0x0f, 0x01, "Drive Type" ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 819 | PORT_DIPSETTING( 0x01, "TEAC FD55F (ABC 834)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 230 7802-01 |
| 820 | PORT_DIPSETTING( 0x02, "BASF 6138 (ABC 850)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 230 8440-15 |
| 821 | PORT_DIPSETTING( 0x03, "Micropolis 1015F (ABC 832)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-15 |
| 822 | PORT_DIPSETTING( 0x04, "BASF 6118 (ABC 832)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-16 |
| 823 | PORT_DIPSETTING( 0x05, "Micropolis 1115F (ABC 832)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-17 |
| 824 | PORT_DIPSETTING( 0x08, "BASF 6106/08 (ABC 830)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2d) // 190 9206-16 |
| 825 | PORT_DIPSETTING( 0x09, "MPI 51 (ABC 830)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2d) // 190 9206-16 |
| 826 | PORT_DIPSETTING( 0x0e, "BASF 6105 (ABC 838)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2e) |
| 827 | PORT_DIPSETTING( 0x0f, "BASF 6106 (ABC 838)" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2e) // 230 8838-15 |
| 829 | 828 | |
| 830 | 829 | PORT_START("luxor_55_21046:SW3") |
| 831 | 830 | PORT_DIPNAME( 0x7f, 0x2c, "Card Address" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7") |
| r9137 | r9138 | |
| 851 | 850 | |
| 852 | 851 | /* Z80 PIO */ |
| 853 | 852 | |
| 854 | | static READ8_DEVICE_HANDLER( conkort_pio_port_a_r ) |
| 853 | static READ8_DEVICE_HANDLER( pio_pa_r ) |
| 855 | 854 | { |
| 856 | 855 | slow_t *conkort = get_safe_token_slow(device->owner()); |
| 857 | 856 | |
| 858 | 857 | return conkort->data; |
| 859 | 858 | } |
| 860 | 859 | |
| 861 | | static WRITE8_DEVICE_HANDLER( conkort_pio_port_a_w ) |
| 860 | static WRITE8_DEVICE_HANDLER( pio_pa_w ) |
| 862 | 861 | { |
| 863 | 862 | slow_t *conkort = get_safe_token_slow(device->owner()); |
| 864 | 863 | |
| 865 | 864 | conkort->data = data; |
| 866 | 865 | } |
| 867 | 866 | |
| 868 | | static READ8_DEVICE_HANDLER( conkort_pio_port_b_r ) |
| 867 | static READ8_DEVICE_HANDLER( pio_pb_r ) |
| 869 | 868 | { |
| 870 | 869 | /* |
| 871 | 870 | |
| r9137 | r9138 | |
| 910 | 909 | return data; |
| 911 | 910 | } |
| 912 | 911 | |
| 913 | | static WRITE8_DEVICE_HANDLER( conkort_pio_port_b_w ) |
| 912 | static WRITE8_DEVICE_HANDLER( pio_pb_w ) |
| 914 | 913 | { |
| 915 | 914 | /* |
| 916 | 915 | |
| r9137 | r9138 | |
| 936 | 935 | // wd17xx_hlt_w(conkort->fd1791, BIT(data, 5)); |
| 937 | 936 | } |
| 938 | 937 | |
| 939 | | static Z80PIO_INTERFACE( conkort_pio_intf ) |
| 938 | static Z80PIO_INTERFACE( pio_intf ) |
| 940 | 939 | { |
| 941 | | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt callback */ |
| 942 | | DEVCB_HANDLER(conkort_pio_port_a_r), /* port A read callback */ |
| 943 | | DEVCB_HANDLER(conkort_pio_port_a_w), /* port A write callback */ |
| 944 | | DEVCB_NULL, /* port A ready callback */ |
| 945 | | DEVCB_HANDLER(conkort_pio_port_b_r), /* port B read callback */ |
| 946 | | DEVCB_HANDLER(conkort_pio_port_b_w), /* port B write callback */ |
| 947 | | DEVCB_NULL /* port B ready callback */ |
| 940 | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt callback */ |
| 941 | DEVCB_HANDLER(pio_pa_r), /* port A read callback */ |
| 942 | DEVCB_HANDLER(pio_pa_w), /* port A write callback */ |
| 943 | DEVCB_NULL, /* port A ready callback */ |
| 944 | DEVCB_HANDLER(pio_pb_r), /* port B read callback */ |
| 945 | DEVCB_HANDLER(pio_pb_w), /* port B write callback */ |
| 946 | DEVCB_NULL /* port B ready callback */ |
| 948 | 947 | }; |
| 949 | 948 | |
| 950 | 949 | static const z80_daisy_config slow_daisy_chain[] = |
| r9137 | r9138 | |
| 1069 | 1068 | DEVCB_LINE(slow_fd1791_drq_w), |
| 1070 | 1069 | { FLOPPY_0, FLOPPY_1, NULL, NULL } |
| 1071 | 1070 | }; |
| 1072 | | |
| 1071 | /* |
| 1073 | 1072 | static FLOPPY_OPTIONS_START( fd2 ) |
| 1074 | 1073 | FLOPPY_OPTION(fd2, "dsk", "Scandia Metric FD2", basicdsk_identify_default, basicdsk_construct_default, |
| 1075 | 1074 | HEADS([1]) |
| r9137 | r9138 | |
| 1078 | 1077 | SECTOR_LENGTH([256]) |
| 1079 | 1078 | FIRST_SECTOR_ID([1])) |
| 1080 | 1079 | FLOPPY_OPTIONS_END |
| 1081 | | |
| 1080 | */ |
| 1082 | 1081 | static FLOPPY_OPTIONS_START( abc830 ) |
| 1083 | 1082 | FLOPPY_OPTION(abc830, "dsk", "ABC 830", basicdsk_identify_default, basicdsk_construct_default, |
| 1084 | 1083 | HEADS([1]) |
| r9137 | r9138 | |
| 1106 | 1105 | SECTOR_LENGTH([256]) |
| 1107 | 1106 | FIRST_SECTOR_ID([1])) |
| 1108 | 1107 | FLOPPY_OPTIONS_END |
| 1109 | | |
| 1108 | /* |
| 1110 | 1109 | static const floppy_config fd2_floppy_config = |
| 1111 | 1110 | { |
| 1112 | 1111 | DEVCB_NULL, |
| r9137 | r9138 | |
| 1118 | 1117 | FLOPPY_OPTIONS_NAME(fd2), |
| 1119 | 1118 | NULL |
| 1120 | 1119 | }; |
| 1121 | | |
| 1120 | */ |
| 1122 | 1121 | static const floppy_config abc830_floppy_config = |
| 1123 | 1122 | { |
| 1124 | 1123 | DEVCB_NULL, |
| r9137 | r9138 | |
| 1182 | 1181 | MDRV_CPU_IO_MAP(slow_io_map) |
| 1183 | 1182 | MDRV_CPU_CONFIG(slow_daisy_chain) |
| 1184 | 1183 | |
| 1185 | | MDRV_Z80PIO_ADD(Z80PIO_TAG, XTAL_4MHz/2, conkort_pio_intf) |
| 1184 | MDRV_Z80PIO_ADD(Z80PIO_TAG, XTAL_4MHz/2, pio_intf) |
| 1186 | 1185 | MDRV_WD179X_ADD(FD1791_TAG, slow_fdc_intf) |
| 1187 | 1186 | MACHINE_CONFIG_END |
| 1188 | 1187 | |
src/mess/machine/abc830.h
| r9137 | r9138 | |
| 13 | 13 | DECLARE_LEGACY_DEVICE(ABC832, abc832); |
| 14 | 14 | DECLARE_LEGACY_DEVICE(ABC838, abc838); |
| 15 | 15 | |
| 16 | | #define ADDRESS_ABC832 44 |
| 17 | | #define ADDRESS_ABC830 45 |
| 18 | | #define ADDRESS_ABC838 46 |
| 16 | #define ADDRESS_ABC832 44 |
| 17 | #define ADDRESS_ABC830 45 |
| 18 | #define ADDRESS_ABC838 46 |
| 19 | 19 | |
| 20 | | #define MDRV_ABC830_PIO_ADD(_tag, _bus_tag) \ |
| 20 | #define DRIVE_TEAC_FD55F 0x01 |
| 21 | #define DRIVE_BASF_6138 0x02 |
| 22 | #define DRIVE_MICROPOLIS_1015F 0x03 |
| 23 | #define DRIVE_BASF_6118 0x04 |
| 24 | #define DRIVE_MICROPOLIS_1115F 0x05 |
| 25 | #define DRIVE_BASF_6106_08 0x08 |
| 26 | #define DRIVE_MPI_51 0x09 |
| 27 | #define DRIVE_BASF_6105 0x0e |
| 28 | #define DRIVE_BASF_6106 0x0f |
| 29 | |
| 30 | #define MDRV_ABC830_PIO_ADD(_tag, _bus_tag, _drive) \ |
| 21 | 31 | MDRV_DEVICE_ADD(_tag, ABC830_PIO, 0) \ |
| 22 | 32 | MDRV_DEVICE_CONFIG_DATAPTR(conkort_config, bus_tag, _bus_tag) \ |
| 23 | 33 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw1, 0x03) \ |
| 34 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw2, _drive) \ |
| 24 | 35 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, address, ADDRESS_ABC830) |
| 25 | 36 | |
| 26 | | #define MDRV_ABC830_ADD(_tag, _bus_tag) \ |
| 37 | #define MDRV_ABC830_ADD(_tag, _bus_tag, _drive) \ |
| 27 | 38 | MDRV_DEVICE_ADD(_tag, ABC830, 0) \ |
| 28 | 39 | MDRV_DEVICE_CONFIG_DATAPTR(conkort_config, bus_tag, _bus_tag) \ |
| 29 | 40 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw1, 0x03) \ |
| 30 | | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw2, 0) \ |
| 41 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw2, _drive) \ |
| 31 | 42 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, address, ADDRESS_ABC830) |
| 32 | 43 | |
| 33 | | #define MDRV_ABC832_ADD(_tag, _bus_tag) \ |
| 44 | #define MDRV_ABC832_ADD(_tag, _bus_tag, _drive) \ |
| 34 | 45 | MDRV_DEVICE_ADD(_tag, ABC832, 0) \ |
| 35 | 46 | MDRV_DEVICE_CONFIG_DATAPTR(conkort_config, bus_tag, _bus_tag) \ |
| 36 | 47 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw1, 0x03) \ |
| 37 | | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw2, 0) \ |
| 48 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw2, _drive) \ |
| 38 | 49 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, address, ADDRESS_ABC832) |
| 39 | 50 | |
| 40 | | #define MDRV_ABC838_ADD(_tag, _bus_tag) \ |
| 51 | #define MDRV_ABC838_ADD(_tag, _bus_tag, _drive) \ |
| 41 | 52 | MDRV_DEVICE_ADD(_tag, ABC838, 0) \ |
| 42 | 53 | MDRV_DEVICE_CONFIG_DATAPTR(conkort_config, bus_tag, _bus_tag) \ |
| 43 | 54 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw1, 0x03) \ |
| 44 | | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw2, 0) \ |
| 55 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw2, _drive) \ |
| 45 | 56 | MDRV_DEVICE_CONFIG_DATA32(conkort_config, address, ADDRESS_ABC838) |
| 46 | 57 | |
| 47 | 58 | #define LUXOR_55_10828_ABCBUS(_tag) \ |