Previous 15994 Revisions Next

r9095 Saturday 11th September, 2010 at 18:01:46 UTC by Curt Coder
[CONKORT] Fixed DIP switches.
[src/mess/machine]conkort.c conkort.h

src/mess/machine/conkort.c
r9094r9095
55PCB Layout
66----------
77
8?
855 10900-01
99
1010|-----------------------------------|
1111|   LD1 SW1 LS132       CON2        |
r9094r9095
3131|                           LS373   |
3232|       Z80PIO                      |
3333|                           LS245   |
34|   S1                              |
35|   LS125   LS124     S20   DM8131  |
3436|                                   |
35|   LS125   LS124       S   DM8131  |
36|                                   |
3737|--|-----------------------------|--|
3838   |------------CON1-------------|
3939
r9094r9095
4646    MB8876  - Mitsubishi MB8876 Floppy Disc Controller (FD1791 compatible)
4747    TC5514  - Toshiba TC5514AP-2 1Kx4 bit Static RAM
4848    DM8131  - National Semiconductor DM8131N 6-Bit Unified Bus Comparator
49    C140E   - Ferranti ?C140E "copy protection device"
49    C140E   - Ferranti 2C140E "copy protection device"
5050    N8T97N  - SA N8T97N ?
5151    CON1    - ABC bus connector
5252    CON2    - 25-pin D sub floppy connector (AMP4284)
r9094r9095
170170        0704: rr   a
171171        0706: call $073F
172172
173    - FD1791 HLD/HLT callbacks
174173    - DS/DD SS/DS jumpers
175174    - S1-S5 jumpers
176175
r9094r9095
444443   switch (offset & 0x03)
445444   {
446445   case 0: data = wd17xx_status_r(device, 0); break;
447   case 1:   data = wd17xx_track_r(device, 0); break;
448   case 2:   data = wd17xx_sector_r(device, 0); break;
449   case 3:   data = wd17xx_data_r(device, 0); break;
446   case 1: data = wd17xx_track_r(device, 0); break;
447   case 2: data = wd17xx_sector_r(device, 0); break;
448   case 3: data = wd17xx_data_r(device, 0); break;
450449   }
451450
452451   /* FD1791 has inverted data lines */
r9094r9095
470469   switch (offset & 0x03)
471470   {
472471   case 0: wd17xx_command_w(device, 0, data); break;
473   case 1:   wd17xx_track_w(device, 0, data); break;
472   case 1: wd17xx_track_w(device, 0, data); break;
474473   case 2: wd17xx_sector_w(device, 0, data); break;
475474   case 3: wd17xx_data_w(device, 0, data); break;
476475   }
r9094r9095
510509   {
511510      data = conkort->data_out;
512511      conkort->busy = 1;
513      logerror("busy %u\n", conkort->busy);
514512   }
515513
516514   return data;
r9094r9095
524522   {
525523      conkort->data_in = data;
526524      conkort->busy = 1;
527      logerror("busy %u\n", conkort->busy);
528525   }
529526}
530527
r9094r9095
545542
546543   if (conkort->cs)
547544   {
548      cpu_set_input_line(conkort->cpu, INPUT_LINE_RESET, PULSE_LINE);
545      cpu_set_input_line(conkort->cpu, INPUT_LINE_RESET, ASSERT_LINE);
546      cpu_set_input_line(conkort->cpu, INPUT_LINE_RESET, CLEAR_LINE);
549547   }
550548}
551549
r9094r9095
577575   fast_t *conkort = get_safe_token_fast(device->owner());
578576
579577   conkort->busy = 0;
580   logerror("busy %u\n", conkort->busy);
581
578   logerror("3d read %02x\n", conkort->data_in);
582579   return conkort->data_in;
583580}
584581
r9094r9095
602599   fast_t *conkort = get_safe_token_fast(device->owner());
603600   
604601   conkort->busy = 0;
605   logerror("busy %u\n", conkort->busy);
606
602   logerror("4d write %02x\n", data);
607603   conkort->data_out = data;
608604}
609605
r9094r9095
631627   if (BIT(data, 0))
632628   {
633629      conkort->busy = 0;
634      logerror("busy %u\n", conkort->busy);
635630   }
636631}
637632
r9094r9095
701696      bit      description
702697
703698      0      3A.8 (busy)
704      1      SW1-2
699      1      50-pin floppy connector pin 10, not used
705700      2      3A.12 (SW2)
706      3      GND
701      3      ?
707702      4      SW1-1
708      5      GND
703      5      SW1-2
709704      6      SW1-3
710705      7      SW1-4
711706
r9094r9095
719714   data |= (conkort->busy & BIT(conkort->status, 0));
720715
721716   /* SW1 */
722   UINT8 sw1 = input_port_read(device->machine, "abc830:SW1");
717   UINT8 sw1 = input_port_read(device->machine, "abc830:SW1") & 0x0f;
723718
724   data |= BIT(sw1, 0) << 4;
725   data |= BIT(sw1, 1) << 1;
726   data |= BIT(sw1, 2) << 6;
727   data |= BIT(sw1, 3) << 7;
719   data |= sw1 << 4;
728720
729721   /* SW2 */
730   UINT8 sw2 = input_port_read(device->machine, "abc830:SW2");
722   UINT8 sw2 = input_port_read(device->machine, "abc830:SW2") & 0x0f;
731723
732724   int sw2_1 = BIT(offset, 8) & BIT(sw2, 0);
733725   int sw2_2 = BIT(offset, 9) & BIT(sw2, 1);
r9094r9095
761753// Fast Controller
762754
763755static ADDRESS_MAP_START( fast_map, ADDRESS_SPACE_PROGRAM, 8 )
764   AM_RANGE(0x0000, 0x1fff) AM_ROM AM_REGION("abc830:conkort", 0)
756   ADDRESS_MAP_UNMAP_HIGH
757   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
758   AM_RANGE(0x0000, 0x1fff) AM_ROM AM_REGION("abc830:conkort", 0) // TODO , 0x2000
765759   AM_RANGE(0x2000, 0x3fff) AM_RAM
766760ADDRESS_MAP_END
767761
768762static ADDRESS_MAP_START( fast_io_map, ADDRESS_SPACE_IO, 8 )
763   ADDRESS_MAP_UNMAP_HIGH
769764   AM_RANGE(0x00, 0x00) AM_MIRROR(0xff0f) AM_DEVREAD(SAB1793_TAG, fast_3d_r)
770765   AM_RANGE(0x10, 0x10) AM_MIRROR(0xff0f) AM_DEVWRITE(SAB1793_TAG, fast_4d_w)
771766   AM_RANGE(0x20, 0x20) AM_MIRROR(0xff0f) AM_DEVWRITE(SAB1793_TAG, fast_4b_w)
r9094r9095
779774
780775/* Input Ports */
781776
777INPUT_PORTS_START( luxor_55_10828 )
778   PORT_START("luxor_55_10828:SW1")
779   PORT_DIPNAME( 0x01, 0x00, "Drive 0 Sided" ) PORT_DIPLOCATION("SW1:1")
780   PORT_DIPSETTING(    0x00, DEF_STR( Single ) )
781   PORT_DIPSETTING(    0x01, "Double" )
782   PORT_DIPNAME( 0x02, 0x00, "Drive 1 Sided" ) PORT_DIPLOCATION("SW1:2")
783   PORT_DIPSETTING(    0x00, DEF_STR( Single ) )
784   PORT_DIPSETTING(    0x02, "Double" )
785   PORT_DIPNAME( 0x04, 0x00, "Drive 0 Density" ) PORT_DIPLOCATION("SW1:3")
786   PORT_DIPSETTING(    0x00, DEF_STR( Single ) )
787   PORT_DIPSETTING(    0x04, "Double" )
788   PORT_DIPNAME( 0x08, 0x00, "Drive 1 Density" ) PORT_DIPLOCATION("SW1:4")
789   PORT_DIPSETTING(    0x00, DEF_STR( Single ) )
790   PORT_DIPSETTING(    0x08, "Double" )
791INPUT_PORTS_END
792
782793INPUT_PORTS_START( luxor_55_21046 )
783794   PORT_START("abc830:SW1")
784   PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2e)
785   PORT_DIPNAME( 0x05, 0x00, "Drive 0" ) PORT_DIPLOCATION("SW1:1,3") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
786   PORT_DIPSETTING(    0x00, "SS SD" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
787   PORT_DIPSETTING(    0x04, "SS DD" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
788   PORT_DIPSETTING(    0x01, "DS SD" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
789   PORT_DIPSETTING(    0x05, "DS DD" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
790   PORT_DIPNAME( 0x0a, 0x00, "Drive 1" ) PORT_DIPLOCATION("SW1:2,4") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
791   PORT_DIPSETTING(    0x00, "SS SD" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
792   PORT_DIPSETTING(    0x08, "SS DD" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
793   PORT_DIPSETTING(    0x02, "DS SD" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
794   PORT_DIPSETTING(    0x0a, "DS DD" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
795   PORT_DIPNAME( 0x05, 0x01, "Drive 0" ) PORT_DIPLOCATION("SW1:1,3") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
796   PORT_DIPSETTING(    0x00, "SS DD 80" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
797   PORT_DIPSETTING(    0x04, "SS DD 40" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
798   PORT_DIPSETTING(    0x01, "DS DD 80" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
799   PORT_DIPSETTING(    0x05, "DS DD 40" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
800   PORT_DIPNAME( 0x0a, 0x02, "Drive 1" ) PORT_DIPLOCATION("SW1:2,4") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
801   PORT_DIPSETTING(    0x00, "SS DD 80" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
802   PORT_DIPSETTING(    0x08, "SS DD 40" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
803   PORT_DIPSETTING(    0x02, "DS DD 80" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
804   PORT_DIPSETTING(    0x0a, "DS DD 40" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
795   // ABC 838
796   PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:1,2,3,4") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2e)
797   PORT_DIPSETTING(    0x00, DEF_STR( Unused ) ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2e)
798   // ABC 830
799   PORT_DIPNAME( 0x01, 0x00, "Drive 0 Sided" ) PORT_DIPLOCATION("SW1:1") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
800   PORT_DIPSETTING(    0x00, DEF_STR( Single ) ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
801   PORT_DIPSETTING(    0x01, "Double" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
802   PORT_DIPNAME( 0x02, 0x00, "Drive 1 Sided" ) PORT_DIPLOCATION("SW1:2") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
803   PORT_DIPSETTING(    0x00, DEF_STR( Single ) ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
804   PORT_DIPSETTING(    0x02, "Double" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
805   PORT_DIPNAME( 0x04, 0x00, "Drive 0 Density" ) PORT_DIPLOCATION("SW1:3") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
806   PORT_DIPSETTING(    0x00, DEF_STR( Single ) ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
807   PORT_DIPSETTING(    0x04, "Double" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
808   PORT_DIPNAME( 0x08, 0x00, "Drive 1 Density" ) PORT_DIPLOCATION("SW1:4") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
809   PORT_DIPSETTING(    0x00, DEF_STR( Single ) ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
810   PORT_DIPSETTING(    0x08, "Double" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
811   // ABC 832/834/850
812   PORT_DIPNAME( 0x01, 0x01, "Drive 0 Sided" ) PORT_DIPLOCATION("SW1:1") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
813   PORT_DIPSETTING(    0x00, DEF_STR( Single ) ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
814   PORT_DIPSETTING(    0x01, "Double" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
815   PORT_DIPNAME( 0x02, 0x02, "Drive 1 Sided" ) PORT_DIPLOCATION("SW1:2") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
816   PORT_DIPSETTING(    0x00, DEF_STR( Single ) ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
817   PORT_DIPSETTING(    0x02, "Double" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
818   PORT_DIPNAME( 0x04, 0x00, "Drive 0 Tracks" ) PORT_DIPLOCATION("SW1:3") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
819   PORT_DIPSETTING(    0x00, "80" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
820   PORT_DIPSETTING(    0x04, "40" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
821   PORT_DIPNAME( 0x08, 0x00, "Drive 1 Tracks" ) PORT_DIPLOCATION("SW1:4") PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
822   PORT_DIPSETTING(    0x00, "80" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
823   PORT_DIPSETTING(    0x08, "40" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
805824
806825   PORT_START("abc830:SW2")
807   PORT_DIPNAME( 0x0f, 0x0b, "Disk Drive" ) PORT_DIPLOCATION("SW2:1,2,3,4")
808   PORT_DIPSETTING(    0x07, "BASF 6106/08 (ABC 830, 190 9206-16)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
809   PORT_DIPSETTING(    0x06, "MPI 51 (ABC 830, 190 9206-16)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d)
810   PORT_DIPSETTING(    0x0b, "BASF 6118 (ABC 832, 190 9711-16)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
811   PORT_DIPSETTING(    0x0c, "Micropolis 1015F (ABC 832, 190 9711-15)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
812   PORT_DIPSETTING(    0x0a, "Micropolis 1115F (ABC 832, 190 9711-17)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
813   PORT_DIPSETTING(    0x0e, "TEAC FD55F (ABC 834, 230 7802-01)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
814   PORT_DIPSETTING(    0x0d, "BASF 6138 (ABC 850, 230 8440-15)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c)
815   PORT_DIPSETTING(    0x01, "BASF 6105" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2e)
816   PORT_DIPSETTING(    0x00, "BASF 6106 (ABC 838, 230 8838-15)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2e)
826   PORT_DIPNAME( 0x0f, 0x0b, "Drive Type" ) PORT_DIPLOCATION("SW2:1,2,3,4")
827   PORT_DIPSETTING(    0x0e, "TEAC FD55F (ABC 834)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 230 7802-01
828   PORT_DIPSETTING(    0x0d, "BASF 6138 (ABC 850)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 230 8440-15
829   PORT_DIPSETTING(    0x0c, "Micropolis 1015F (ABC 832)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-15
830   PORT_DIPSETTING(    0x0b, "BASF 6118 (ABC 832)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-16
831   PORT_DIPSETTING(    0x0a, "Micropolis 1115F (ABC 832)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-17
832   PORT_DIPSETTING(    0x07, "BASF 6106/08 (ABC 830)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d) // 190 9206-16
833   PORT_DIPSETTING(    0x06, "MPI 51 (ABC 830)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2d) // 190 9206-16
834   PORT_DIPSETTING(    0x01, "BASF 6105 (ABC 838)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2e)
835   PORT_DIPSETTING(    0x00, "BASF 6106 (ABC 838)" ) PORT_CONDITION("abc830:SW3", 0x7f, PORTCOND_EQUALS, 0x2e) // 230 8838-15
817836   
818   PORT_START("abc830:SW3") // controller card ABC bus address
819   PORT_DIPNAME( 0x7f, 0x2d, "Disk Drive" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7")
820   PORT_DIPSETTING(    0x2c, "ABC 832/834/850" )
821   PORT_DIPSETTING(    0x2d, "ABC 830" )
822   PORT_DIPSETTING(    0x2e, "ABC 838" )
823
824   PORT_START("abc830:CONKORT_ROM")
825   PORT_CONFNAME( 0x07, 0x00, "Controller PROM" )
826   PORT_CONFSETTING(    0x00, "Luxor v1.07" )
827   PORT_CONFSETTING(    0x01, "Luxor v1.08" )
828   PORT_CONFSETTING(    0x02, "DIAB v2.07" )
837   PORT_START("abc830:SW3")
838   PORT_DIPNAME( 0x7f, 0x2c, "Card Address" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7")
839   PORT_DIPSETTING(    0x2c, "44 (ABC 832/834/850)" )
840   PORT_DIPSETTING(    0x2d, "45 (ABC 830)" )
841   PORT_DIPSETTING(    0x2e, "46 (ABC 838)" )
829842INPUT_PORTS_END
830843
831844/* Z80 PIO */
r9094r9095
10511064   fast_t *conkort = get_safe_token_fast(device->owner());
10521065
10531066   conkort->fdc_irq = state;
1054   logerror("FDC interrupt %u\n", state);
1067
10551068   cpu_set_input_line(conkort->cpu, INPUT_LINE_IRQ0, conkort->fdc_irq | conkort->dma_irq);
10561069}
10571070
src/mess/machine/conkort.h
r9094r9095
4343    PROTOTYPES
4444***************************************************************************/
4545/* configuration dips */
46INPUT_PORTS_EXTERN( luxor_55_10828 );
4647INPUT_PORTS_EXTERN( luxor_55_21046 );
4748
4849/* floppy options */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team