r7279 Saturday 6th February, 2010 at 17:30:34 UTC by Curt Coder
Implemented 'disk changed' floppy drive signal.
[docs]messnew.txt
[src/mess/devices]flopdrv.c flopdrv.h

src/mess/devices/flopdrv.c
r7278r7279
88  - set unit id
99
1010  TODO:
11    - Disk change handling.
1211    - Override write protect if disk image has been opened in read mode
1312*/
1413
r7278r7279
5049   int tk00; /* track 00 */
5150   int wpt;  /* write protect */
5251   int rdy;  /* ready */
52   int dskchg;      /* disk changed */
5353
5454   /* drive select logic */
5555   int drive_id;
r7278r7279
452452   pDrive->tk00 = (pDrive->current_track == 0) ? CLEAR_LINE : ASSERT_LINE;
453453   devcb_call_write_line(&pDrive->out_tk00_func, pDrive->tk00);
454454
455   /* clear disk changed flag */
456   pDrive->dskchg = ASSERT_LINE;
457
455458   /* inform disk image of step operation so it can cache information */
456459   if (image_exists(img))
457460      flopimg_seek_callback(img, pDrive->current_track);
r7278r7279
633636   /* motor off */
634637   floppy->mon = ASSERT_LINE;
635638
639   /* disk changed */
640   floppy->dskchg = CLEAR_LINE;
641
636642   /* resolve callbacks */
637643   devcb_resolve_write_line(&floppy->out_idx_func, &floppy->config->out_idx_func, device);
638644   devcb_resolve_read_line(&floppy->in_mon_func, &floppy->config->in_mon_func, device);
r7278r7279
717723
718724   floppy_close(flopimg->floppy);
719725   flopimg->floppy = NULL;
726
727   /* disk changed */
728   flopimg->dskchg = CLEAR_LINE;
720729}
721730
722731running_device *floppy_get_device(running_machine *machine,int drive)
r7278r7279
954963   return drive->tk00;
955964}
956965
966/* disk changed */
967READ_LINE_DEVICE_HANDLER( floppy_dskchg_r )
968{
969   floppy_drive *drive = get_safe_token(device);
970   return drive->dskchg;
971}
957972
958973/*************************************
959974 *
src/mess/devices/flopdrv.h
r7278r7279
146146/* track 0 detect */
147147READ_LINE_DEVICE_HANDLER( floppy_tk00_r );
148148
149/* disk changed */
150READ_LINE_DEVICE_HANDLER( floppy_dskchg_r );
149151
150152#define FLOPPY   DEVICE_GET_INFO_NAME(floppy)
151153DEVICE_GET_INFO(floppy);
docs/messnew.txt
r7278r7279
9595- Placed floppy drive head initially on track 0 to fix alignment issues
9696  with Commodore drives, where physical track 1 is a half track. [Curt Coder]
9797
98- Implemented 'disk changed' floppy drive signal. [Curt Coder]
9899
100
101
991020.136
100103
101104New System Drivers Supported:

Previous 509077 RevisionsNext 50


© 1998-2010 The MESS Team