Previous 15994 Revisions Next

r5746 Wednesday 16th September, 2009 at 17:09:37 UTC by Miodrag Milanović
Fixed floppy for PC
[src/mess/devices]flopdrv.c flopdrv.h
[src/mess/machine]pc_fdc.c

src/mess/machine/pc_fdc.c
r5745r5746
268268   int selected_drive;
269269   int floppy_count;
270270
271   floppy_count = 4;//device_count(machine, IO_FLOPPY);
271   floppy_count = floppy_get_count(machine);
272272
273273   if (floppy_count > (fdc->digital_output_register & 0x03))
274274      floppy_drive_set_ready_state(floppy_get_device(machine, fdc->digital_output_register & 0x03), 1, 0);
r5745r5746
375375{
376376   int floppy_count;
377377
378   floppy_count = 4;//device_count(machine, IO_FLOPPY);
378   floppy_count = floppy_get_count(machine);
379379
380380   /* set floppy drive motor state */
381381   if (floppy_count > 0)
src/mess/devices/flopdrv.c
r5745r5746
822822   return drive;
823823}
824824
825int floppy_get_count(running_machine *machine)
826{
827   int cnt = 0;
828   if (devtag_get_device(machine,FLOPPY_0)) cnt++;
829    if (devtag_get_device(machine,FLOPPY_1)) cnt++;
830    if (devtag_get_device(machine,FLOPPY_2)) cnt++;
831    if (devtag_get_device(machine,FLOPPY_3)) cnt++;   
832   return cnt;
833}
825834/*************************************
826835 *
827836 *  Device specification function
src/mess/devices/flopdrv.h
r5745r5746
122122void floppy_install_tracktranslate_proc(const device_config *image, int (*proc)(const device_config *image, floppy_image *floppy, int physical_track));
123123
124124const device_config *floppy_get_device(running_machine *machine,int drive);
125int floppy_get_count(running_machine *machine);
125126
126127int floppy_get_drive(const device_config *image);
127128

Previous 15994 Revisions Next


© 1998-2018 The MESS Team