|
|
1.1 root 1: /*
1.1.1.3 root 2: Hatari - floppy.h
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
1.1 root 6: */
7:
1.1.1.3 root 8: #ifndef HATARI_FLOPPY_H
9: #define HATARI_FLOPPY_H
10:
1.1.1.2 root 11: /* Structure for each drive connected as emulation */
1.1.1.3 root 12: typedef struct
13: {
14: Uint8 *pBuffer;
15: char szFileName[FILENAME_MAX];
1.1 root 16: int nImageBytes;
1.1.1.5 ! root 17: BOOL bDiskInserted;
1.1 root 18: BOOL bMediaChanged;
19: BOOL bContentsChanged;
20: BOOL bOKToSave;
21: } EMULATION_DRIVE;
22:
1.1.1.2 root 23: #define NUM_EMULATION_DRIVES 2 /* A:, B: */
1.1.1.5 ! root 24: #define NUMBYTESPERSECTOR 512 /* All disks are 512 bytes per sector */
1.1 root 25:
26: extern EMULATION_DRIVE EmulationDrives[NUM_EMULATION_DRIVES];
27: extern int nBootDrive;
28:
29: extern void Floppy_Init(void);
30: extern void Floppy_UnInit(void);
31: extern void Floppy_MemorySnapShot_Capture(BOOL bSave);
32: extern void Floppy_GetBootDrive(void);
1.1.1.4 root 33: extern BOOL Floppy_IsWriteProtected(int Drive);
1.1.1.5 ! root 34: extern BOOL Floppy_InsertDiskIntoDrive(int Drive, char *pszFileName);
! 35: extern BOOL Floppy_ZipInsertDiskIntoDrive(int Drive, char *pszFileName, char *pszZipPath);
! 36: extern void Floppy_EjectDiskFromDrive(int Drive,BOOL bInformUser);
1.1 root 37: extern void Floppy_EjectBothDrives(void);
1.1.1.5 ! root 38: extern void Floppy_FindDiskDetails(const Uint8 *pBuffer, int nImageBytes, unsigned short *pnSectorsPerTrack, unsigned short *pnSides);
! 39: extern BOOL Floppy_ReadSectors(int Drive, Uint8 *pBuffer, unsigned short Sector, unsigned short Track, unsigned short Side, short Count, int *pnSectorsPerTrack);
! 40: extern BOOL Floppy_WriteSectors(int Drive, Uint8 *pBuffer, unsigned short Sector, unsigned short Track, unsigned short Side, short Count, int *pnSectorsPerTrack);
1.1 root 41: extern int Floppy_GetPhysicalSectorsPerTrack(int Drive);
42: extern BOOL Floppy_ReadPhysicalSector(int Drive,char *pBuffer,unsigned short int Sector,unsigned short int Track,unsigned short int Side,unsigned short int Count);
1.1.1.3 root 43:
44: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.