Previous 15994 Revisions Next

r4659 Sunday 10th May, 2009 at 09:41:13 UTC by Robbbert
--
[src/mess/machine]kaypro.c wd17xx.c

src/mess/machine/wd17xx.c
r4658r4659
2727         -               wd17xx_complete_command(device, DELAY_DATADONE);
2828         +               wd17xx_set_data_request();
2929
30   2009-May-10 Robbbert:
31      Further change to get the Kaypro II to work
32      - When wd17xx_read_id has generated the 6 data bytes, it should make
33        an IRQ and turn off the busy status. The timing for Osborne is
34        critical, it must be between 300 and 700 usec, I've settled on 400.
35        The Kaypro doesn't care timewise, but the busy flag must turn off
36        sometime or it hangs.
37         -      w->status |= STA_2_BUSY;
38         +      wd17xx_set_busy(device, ATTOTIME_IN_USEC(400));
39
3040   TODO:
3141      - Multiple record write
3242      - What happens if a track is read that doesn't have any id's on it?
r4658r4659
200210   /* this is the head currently selected */
201211   UINT8 hd;
202212
203   /* pause time when writeing/reading sector */
213   /* pause time when writing/reading sector */
204214   int pause_time;
205215   
206216   /* Pointer to interface */
r4658r4659
623633      w->buffer[5] = crc & 255;
624634
625635      w->sector = id.C;
626
627      w->status |= STA_2_BUSY;
636      wd17xx_set_busy(device, ATTOTIME_IN_USEC(400));
628637      w->busy_count = 0;
629638
630639      wd17xx_set_data_request(device);
r4658r4659
12381247
12391248      w->data_count = 0;
12401249      w->data_offset = 0;
1241      w->status &= ~(STA_2_BUSY);
1250      w->status &= ~STA_2_BUSY;
12421251
12431252      wd17xx_clear_data_request(device);
12441253
r4658r4659
13621371         if (floppy_drive_get_flag_state(wd17xx_current_image(device), FLOPPY_DRIVE_READY))
13631372            wd17xx_read_id(device);
13641373         else
1365         wd17xx_complete_command(device, DELAY_NOTREADY);
1374            wd17xx_complete_command(device, DELAY_NOTREADY);
13661375
13671376         return;
13681377      }
src/mess/machine/kaypro.c
r4658r4659
2121
2222   PIO
2323
24   It seems there must have been a bulk-purchase
25   special on pios - port B is unused on both of them
24   Port B is unused on both PIOs
2625
2726************************************************************/
2827
29static WRITE8_DEVICE_HANDLER( kaypro_interrupt )
28static void kaypro_interrupt(const device_config *device, int state)
3029{
31   cputag_set_input_line(device->machine, "maincpu", 0, data);
30   cputag_set_input_line(device->machine, "maincpu", 0, state);
3231}
3332
3433static READ8_DEVICE_HANDLER( pio_system_r )
r4658r4659
8180
8281const z80pio_interface kayproii_pio_g_intf =
8382{
84   DEVCB_HANDLER(kaypro_interrupt),
83   DEVCB_LINE(kaypro_interrupt),
8584   DEVCB_NULL,
8685   DEVCB_NULL,
8786   DEVCB_DEVICE_HANDLER("centronics", centronics_data_w),
r4658r4659
9291
9392const z80pio_interface kayproii_pio_s_intf =
9493{
95   DEVCB_HANDLER(kaypro_interrupt),
94   DEVCB_LINE(kaypro_interrupt),
9695   DEVCB_HANDLER(pio_system_r),   /* read printer status */
9796   DEVCB_NULL,
9897   DEVCB_HANDLER(pio_system_w),   /* activate various internal devices */
r4658r4659
243242//   z80sio_set_tx_clock( kaypro2x_z80sio, baud_clock[data], 0);
244243}
245244
246
247/* when sio devcb'ed like pio is, change to use pio's int handler */
248static void kaypro_int_sio(const device_config *device, int state)
249{
250   cputag_set_input_line(device->machine, "maincpu", 0, state);
251}
252
253245const z80sio_interface kaypro_sio_intf =
254246{
255   kaypro_int_sio,      /* interrupt handler */
247   kaypro_interrupt,   /* interrupt handler */
256248   0,         /* DTR changed handler */
257249   0,         /* RTS changed handler */
258250   0,         /* BREAK changed handler */
r4658r4659
342334{
343335   if ((state == WD17XX_DRQ_SET) || (state == WD17XX_IRQ_SET))
344336   {
345      timer_set(device->machine, ATTOTIME_IN_USEC(10), NULL, 0, kaypro_timer_callback);
337      timer_set(device->machine, ATTOTIME_IN_USEC(25), NULL, 0, kaypro_timer_callback);
346338   }
347339   else
348340   {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team