Previous 15994 Revisions Next

r7393 Wednesday 17th February, 2010 at 14:27:16 UTC by Curt Coder
[KAYPRO] Fixed floppy regression.
[src/emu/machine]z80pio.c
[src/mess/drivers]kaypro.c
[src/mess/includes]kaypro.h
[src/mess/machine]kaypro.c

src/emu/machine/z80pio.c
r7392r7393
394394      break;
395395
396396   case MODE_INPUT:
397      /* do nothing */
397      /* latch output data */
398      port->output = data;
398399      break;
399400
400401   case MODE_BIDIRECTIONAL:
r7392r7393
854855      /* set mode 1 */
855856      set_mode(device, index, MODE_INPUT);
856857
857      /* reset port mask registers */
858      port->mask = 0;
859
860858      /* reset interrupt enable flip-flops */
861859      port->icw &= ~ICW_ENABLE_INT;
862860      port->ie = 0;
src/mess/includes/kaypro.h
r7392r7393
1111
1212extern const z80pio_interface kayproii_pio_g_intf;
1313extern const z80pio_interface kayproii_pio_s_intf;
14extern const z80pio_interface kaypro4_pio_s_intf;
1415extern const z80sio_interface kaypro_sio_intf;
1516extern const wd17xx_interface kaypro_wd1793_interface;
1617
src/mess/machine/kaypro.c
r7392r7393
3333
3434static READ8_DEVICE_HANDLER( pio_system_r )
3535{
36/* d3 Centronics ready flag */
36   UINT8 data = 0;
3737
38   UINT8 data = ~centronics_busy_r(kaypro_printer) << 3;
39   return (kaypro_system_port & 0xf7) | (data & 8) ;
38   /* centronics busy */
39   data |= centronics_not_busy_r(kaypro_printer) << 3;
40
41   /* PA7 is pulled high */
42   data |= 0x80;
43
44   return data;
4045}
4146
42static WRITE8_DEVICE_HANDLER( pio_system_w )
47static WRITE8_DEVICE_HANDLER( common_pio_system_w )
4348{
4449/*  d7 bank select
4550    d6 disk drive motors - (0=on)
r7392r7393
7883   if (data & 2)
7984      wd17xx_set_drive(kaypro_fdc, 1);
8085
81   wd17xx_set_side(kaypro_fdc, (data & 4) ? 1 : 0);   /* only has one side but this circuit exists... */
82
8386   output_set_value("ledA",(data & 1) ? 1 : 0);      /* LEDs in artwork */
8487   output_set_value("ledB",(data & 2) ? 1 : 0);
8588
r7392r7393
9093   kaypro_system_port = data;
9194}
9295
96static WRITE8_DEVICE_HANDLER( kayproii_pio_system_w )
97{
98   common_pio_system_w(device, offset, data);
99
100   /* side select */
101   wd17xx_set_side(kaypro_fdc, !BIT(data, 2));
102}
103
104static WRITE8_DEVICE_HANDLER( kaypro4_pio_system_w )
105{
106   common_pio_system_w(device, offset, data);
107
108   /* side select */
109   wd17xx_set_side(kaypro_fdc, BIT(data, 2));
110}
111
93112const z80pio_interface kayproii_pio_g_intf =
94113{
95114   DEVCB_LINE(kaypro_interrupt),
r7392r7393
105124{
106125   DEVCB_LINE(kaypro_interrupt),
107126   DEVCB_HANDLER(pio_system_r),   /* read printer status */
108   DEVCB_HANDLER(pio_system_w),   /* activate various internal devices */
127   DEVCB_HANDLER(kayproii_pio_system_w),   /* activate various internal devices */
109128   DEVCB_NULL,         /* portA ready active callback */
110129   DEVCB_NULL,
111130   DEVCB_NULL,
112131   DEVCB_NULL         /* portB ready active callback */
113132};
114133
134const z80pio_interface kaypro4_pio_s_intf =
135{
136   DEVCB_LINE(kaypro_interrupt),
137   DEVCB_HANDLER(pio_system_r),   /* read printer status */
138   DEVCB_HANDLER(kaypro4_pio_system_w),   /* activate various internal devices */
139   DEVCB_NULL,         /* portA ready active callback */
140   DEVCB_NULL,
141   DEVCB_NULL,
142   DEVCB_NULL         /* portB ready active callback */
143};
144
115145/***********************************************************
116146
117147    KAYPRO2X SYSTEM PORT
r7392r7393
359389   kaypro_z80sio = devtag_get_device(machine, "z80sio");
360390   kaypro_printer = devtag_get_device(machine, "centronics");
361391   kaypro_fdc = devtag_get_device(machine, "wd1793");
392
393   z80pio_astb_w(kayproii_z80pio_s, 0);
362394}
363395
364396MACHINE_RESET( kayproii )
365397{
366   pio_system_w(kayproii_z80pio_s, 0, 0x80);
367398   MACHINE_RESET_CALL(kay_kbd);
368399}
369400
r7392r7393
410441
411442//  if (input_port_read(image->machine, "CONFIG") & 1)
412443   {
413      pio_system_w(kayproii_z80pio_s, 0, kaypro_system_port & 0x7f);   // switch TPA in
444      common_pio_system_w(kayproii_z80pio_s, 0, kaypro_system_port & 0x7f);   // switch TPA in
414445      RAM[0x80]=0;                     // clear out command tail
415446      RAM[0x81]=0;
416447      cpu_set_reg(cpu, REG_GENPC, 0x100);            // start program
src/mess/drivers/kaypro.c
r7392r7393
260260   MDRV_FLOPPY_2_DRIVES_ADD(kayproii_floppy_config)
261261MACHINE_DRIVER_END
262262
263static MACHINE_DRIVER_START( kaypro4 )
264   MDRV_IMPORT_FROM(kayproii)
265
266   MDRV_DEVICE_REMOVE("z80pio_s")
267   MDRV_Z80PIO_ADD( "z80pio_s", 2500000, kaypro4_pio_s_intf )
268MACHINE_DRIVER_END
269
263270static MACHINE_DRIVER_START( kaypro2x )
264271   /* basic machine hardware */
265272   MDRV_CPU_ADD("maincpu", Z80, 4000000)   /* 4 MHz */
r7392r7393
398405
399406/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT    INIT    COMPANY  FULLNAME */
400407COMP( 1982, kayproii,   0,        0,    kayproii, kay_kbd, 0,      "Non Linear Systems",  "Kaypro II - 2/83" , 0 )
401COMP( 1983, kaypro4,    kayproii, 0,    kayproii, kay_kbd, 0,      "Non Linear Systems",  "Kaypro 4 - 4/83" , 0 ) // model 81-004
408COMP( 1983, kaypro4,    kayproii, 0,    kaypro4, kay_kbd, 0,      "Non Linear Systems",  "Kaypro 4 - 4/83" , 0 ) // model 81-004
402409COMP( 1983, kaypro4p88, kayproii, 0,    kayproii, kay_kbd, 0,      "Non Linear Systems",  "Kaypro 4 plus88 - 4/83" , GAME_NOT_WORKING ) // model 81-004 with an added 8088 daughterboard and rom
403410COMP( 198?, omni2,      kayproii, 0,    omni2,    kay_kbd, 0,      "Non Linear Systems",  "Omni II" , 0 )
404411COMP( 1984, kaypro2x,   0,        0,    kaypro2x, kay_kbd, 0,      "Non Linear Systems",  "Kaypro 2x" , GAME_NOT_WORKING ) // model 81-025

Previous 15994 Revisions Next


© 1998-2018 The MESS Team