/*************************************************************************************
 i8272 emulation - Floppy Drive Controller + 4 floppy drives connected

 intended to speedup floppy emulation compared to MESS nec765 detailed modelling

   Copyright Matt Knoth 2008

   - This source code is released as freeware for non-commercial purposes.
   - You are free to use and redistribute this code in modified or
     unmodified form, provided you list me in the credits.
   - If you modify this source code, you must add a notice to each modified
     source file that it has been changed.
   - The author of this copywritten work reserves the right to change the
     terms of its usage and license at any time, including retroactively
   - This entire notice must remain in the source code.

   TODO: - functionality beyond the P8000EMU requirements (unimplemented commands)

 *************************************************************************************/

#ifndef I8272_FLOPPY_H
#define I8272_FLOPPY_H

struct _i8272_floppy_intf {

   void (*intr)(int state);  // interrupt callback
   void (*dmar)(int state);  // dma request callback

};

typedef struct _i8272_floppy_intf i8272_floppy_intf;

void i8272_floppy_init( const i8272_floppy_intf* intf );
void i8272_floppy_reset( void );
READ8_HANDLER( i8272_fdc_r  );
WRITE8_HANDLER( i8272_fdc_w );
READ8_HANDLER( i8272_fdc_disk_r  );
WRITE8_HANDLER( i8272_fdc_disk_w );
void i8272_floppy_tc( void );
void i8272_floppy_change_ready( UINT8 which, const char* fname, UINT8 wrten );

#endif // I8272_FLOPPY_H

