Previous 15994 Revisions Next

r9138 Wednesday 15th September, 2010 at 09:44:46 UTC by Curt Coder
[ABC830] Added drive type configuration to device macro.
[src/mess/drivers]abc80.c abc80x.c
[src/mess/machine]abc830.c abc830.h

src/mess/machine/abc830.c
r9137r9138
176176
177177    Fast Controller
178178    ---------------
179   - controller reads a couple of sectors on boot, bails out, and starts to STEP_OUT ad infinitum
180179   - Z80 DMA reset command is broken (it keeps resetting A/B port addresses)
181180   - 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)
184182
185183*/
186184
r9137r9138
620618{
621619   /*
622620
623      bit      description
621      bit      signal      description
624622
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
631629      6
632630      7
633631
r9137r9138
655653{
656654   /*
657655
658      bit      description
656      bit      signal                     description
659657
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                 
666664      6
667665      7
668666
r9137r9138
681679{
682680   /*
683681
684      bit      description
682      bit      signal      description
685683
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
690688      4      SW1-1
691689      5      SW1-2
692690      6      SW1-3
r9137r9138
708706
709707   /* SW2 */
710708   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);
716715   int sw2_data = !(sw2_1 & sw2_2 & !(sw2_3 ^ sw2_4));
717716   
718717   data |= sw2_data << 2;
r9137r9138
816815   PORT_DIPSETTING(    0x08, "40" ) PORT_CONDITION("luxor_55_21046:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
817816
818817   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
829828   
830829   PORT_START("luxor_55_21046:SW3")
831830   PORT_DIPNAME( 0x7f, 0x2c, "Card Address" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7")
r9137r9138
851850
852851/* Z80 PIO */
853852
854static READ8_DEVICE_HANDLER( conkort_pio_port_a_r )
853static READ8_DEVICE_HANDLER( pio_pa_r )
855854{
856855   slow_t *conkort = get_safe_token_slow(device->owner());
857856
858857   return conkort->data;
859858}
860859
861static WRITE8_DEVICE_HANDLER( conkort_pio_port_a_w )
860static WRITE8_DEVICE_HANDLER( pio_pa_w )
862861{
863862   slow_t *conkort = get_safe_token_slow(device->owner());
864863
865864   conkort->data = data;
866865}
867866
868static READ8_DEVICE_HANDLER( conkort_pio_port_b_r )
867static READ8_DEVICE_HANDLER( pio_pb_r )
869868{
870869   /*
871870
r9137r9138
910909   return data;
911910}
912911
913static WRITE8_DEVICE_HANDLER( conkort_pio_port_b_w )
912static WRITE8_DEVICE_HANDLER( pio_pb_w )
914913{
915914   /*
916915
r9137r9138
936935//  wd17xx_hlt_w(conkort->fd1791, BIT(data, 5));
937936}
938937
939static Z80PIO_INTERFACE( conkort_pio_intf )
938static Z80PIO_INTERFACE( pio_intf )
940939{
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 */
948947};
949948
950949static const z80_daisy_config slow_daisy_chain[] =
r9137r9138
10691068   DEVCB_LINE(slow_fd1791_drq_w),
10701069   { FLOPPY_0, FLOPPY_1, NULL, NULL }
10711070};
1072
1071/*
10731072static FLOPPY_OPTIONS_START( fd2 )
10741073   FLOPPY_OPTION(fd2, "dsk", "Scandia Metric FD2", basicdsk_identify_default, basicdsk_construct_default,
10751074      HEADS([1])
r9137r9138
10781077      SECTOR_LENGTH([256])
10791078      FIRST_SECTOR_ID([1]))
10801079FLOPPY_OPTIONS_END
1081
1080*/
10821081static FLOPPY_OPTIONS_START( abc830 )
10831082   FLOPPY_OPTION(abc830, "dsk", "ABC 830", basicdsk_identify_default, basicdsk_construct_default,
10841083      HEADS([1])
r9137r9138
11061105      SECTOR_LENGTH([256])
11071106      FIRST_SECTOR_ID([1]))
11081107FLOPPY_OPTIONS_END
1109
1108/*
11101109static const floppy_config fd2_floppy_config =
11111110{
11121111    DEVCB_NULL,
r9137r9138
11181117    FLOPPY_OPTIONS_NAME(fd2),
11191118    NULL
11201119};
1121
1120*/
11221121static const floppy_config abc830_floppy_config =
11231122{
11241123    DEVCB_NULL,
r9137r9138
11821181   MDRV_CPU_IO_MAP(slow_io_map)
11831182   MDRV_CPU_CONFIG(slow_daisy_chain)
11841183
1185   MDRV_Z80PIO_ADD(Z80PIO_TAG, XTAL_4MHz/2, conkort_pio_intf)
1184   MDRV_Z80PIO_ADD(Z80PIO_TAG, XTAL_4MHz/2, pio_intf)
11861185   MDRV_WD179X_ADD(FD1791_TAG, slow_fdc_intf)
11871186MACHINE_CONFIG_END
11881187
src/mess/machine/abc830.h
r9137r9138
1313DECLARE_LEGACY_DEVICE(ABC832, abc832);
1414DECLARE_LEGACY_DEVICE(ABC838, abc838);
1515
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
1919
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) \
2131   MDRV_DEVICE_ADD(_tag, ABC830_PIO, 0) \
2232   MDRV_DEVICE_CONFIG_DATAPTR(conkort_config, bus_tag, _bus_tag) \
2333    MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw1, 0x03) \
34    MDRV_DEVICE_CONFIG_DATA32(conkort_config, sw2, _drive) \
2435    MDRV_DEVICE_CONFIG_DATA32(conkort_config, address, ADDRESS_ABC830)
2536
26#define MDRV_ABC830_ADD(_tag, _bus_tag) \
37#define MDRV_ABC830_ADD(_tag, _bus_tag, _drive) \
2738   MDRV_DEVICE_ADD(_tag, ABC830, 0) \
2839   MDRV_DEVICE_CONFIG_DATAPTR(conkort_config, bus_tag, _bus_tag) \
2940    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) \
3142    MDRV_DEVICE_CONFIG_DATA32(conkort_config, address, ADDRESS_ABC830)
3243
33#define MDRV_ABC832_ADD(_tag, _bus_tag) \
44#define MDRV_ABC832_ADD(_tag, _bus_tag, _drive) \
3445   MDRV_DEVICE_ADD(_tag, ABC832, 0) \
3546   MDRV_DEVICE_CONFIG_DATAPTR(conkort_config, bus_tag, _bus_tag) \
3647    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) \
3849    MDRV_DEVICE_CONFIG_DATA32(conkort_config, address, ADDRESS_ABC832)
3950
40#define MDRV_ABC838_ADD(_tag, _bus_tag) \
51#define MDRV_ABC838_ADD(_tag, _bus_tag, _drive) \
4152   MDRV_DEVICE_ADD(_tag, ABC838, 0) \
4253   MDRV_DEVICE_CONFIG_DATAPTR(conkort_config, bus_tag, _bus_tag) \
4354    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) \
4556    MDRV_DEVICE_CONFIG_DATA32(conkort_config, address, ADDRESS_ABC838)
4657
4758#define LUXOR_55_10828_ABCBUS(_tag) \
src/mess/drivers/abc80.c
r9137r9138
537537
538538   /* Luxor Conkort 55-10828 */
539539   MDRV_ABCBUS_ADD(ABCBUS_TAG, abcbus_daisy, Z80_TAG)
540   MDRV_ABC830_PIO_ADD("luxor_55_10828", ABCBUS_TAG)
540   MDRV_ABC830_PIO_ADD("luxor_55_10828", ABCBUS_TAG, DRIVE_MPI_51)
541541
542542   /* video hardware */
543543   MDRV_FRAGMENT_ADD(abc80_video)
src/mess/drivers/abc80x.c
r9137r9138
11811181
11821182   /* ABC bus */
11831183   MDRV_ABCBUS_ADD(ABCBUS_TAG, abcbus_daisy, Z80_TAG)
1184   MDRV_ABC830_ADD("luxor_55_21046", ABCBUS_TAG)
1184   MDRV_ABC830_ADD("luxor_55_21046", ABCBUS_TAG, DRIVE_BASF_6106_08)
11851185
11861186   /* fake keyboard */
11871187   MDRV_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, USEC(2500))
r9137r9138
12231223
12241224   /* ABC bus */
12251225   MDRV_ABCBUS_ADD(ABCBUS_TAG, abcbus_daisy, Z80_TAG)
1226   MDRV_ABC830_ADD("luxor_55_21046", ABCBUS_TAG)
1226   MDRV_ABC830_ADD("luxor_55_21046", ABCBUS_TAG, DRIVE_BASF_6106_08)
12271227
12281228   /* fake keyboard */
12291229   MDRV_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, USEC(2500))
r9137r9138
12651265
12661266   /* ABC bus */
12671267   MDRV_ABCBUS_ADD(ABCBUS_TAG, abcbus_daisy, Z80_TAG)
1268   MDRV_ABC832_ADD("luxor_55_21046", ABCBUS_TAG)
1268   MDRV_ABC832_ADD("luxor_55_21046", ABCBUS_TAG, DRIVE_TEAC_FD55F)
12691269
12701270   /* fake keyboard */
12711271   MDRV_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, USEC(2500))
r9137r9138
13041304
13051305   /* ABC bus */
13061306   MDRV_ABCBUS_ADD(ABCBUS_TAG, abcbus_daisy, Z80_TAG)
1307   MDRV_ABC832_ADD("luxor_55_21046", ABCBUS_TAG)
1307   MDRV_ABC832_ADD("luxor_55_21046", ABCBUS_TAG, DRIVE_TEAC_FD55F)
13081308
13091309   /* fake keyboard */
13101310   MDRV_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, USEC(2500))

Previous 15994 Revisions Next


© 1998-2018 The MESS Team