|
|
1.1 root 1: /*
2: Hatari
3: */
4:
1.1.1.2 ! root 5: /* Structure for each drive connected as emulation */
1.1 root 6: typedef struct {
7: unsigned char *pBuffer;
8: char szFileName[MAX_FILENAME_LENGTH];
9: int nImageBytes;
10: BOOL bDiscInserted;
11: BOOL bMediaChanged;
12: BOOL bContentsChanged;
13: BOOL bOKToSave;
14: } EMULATION_DRIVE;
15:
1.1.1.2 ! root 16: #define NUM_EMULATION_DRIVES 2 /* A:, B: */
! 17: #define DRIVE_BUFFER_BYTES (1536*1024) /* 1.5Mb area for each drive */
! 18: #define NUMBYTESPERSECTOR 512 /* All discs are 512 bytes per sector */
1.1 root 19:
20: extern EMULATION_DRIVE EmulationDrives[NUM_EMULATION_DRIVES];
21: extern int nBootDrive;
1.1.1.2 ! root 22: extern BOOL bFloppyChanged;
1.1 root 23: extern char *pszDiscImageNameExts[];
24:
25: extern void Floppy_Init(void);
26: extern void Floppy_UnInit(void);
27: extern void Floppy_MemorySnapShot_Capture(BOOL bSave);
28: extern void Floppy_GetBootDrive(void);
29: extern BOOL Floppy_InsertDiscIntoDrive(int Drive, char *pszFileName);
1.1.1.2 ! root 30: extern BOOL Floppy_ZipInsertDiscIntoDrive(int Drive, char *pszFileName, char *pszZipPath);
1.1 root 31: extern void Floppy_EjectDiscFromDrive(int Drive,BOOL bInformUser);
32: extern void Floppy_EjectBothDrives(void);
33: extern void Floppy_FindDiscDetails(unsigned char *pBuffer,int nImageBytes,unsigned short int *pnSectorsPerTrack,unsigned short int *pnSides);
34: extern BOOL Floppy_ReadSectors(int Drive,char *pBuffer,unsigned short int Sector,unsigned short int Track,unsigned short int Side, short int Count, int *pnSectorsPerTrack);
35: extern BOOL Floppy_WriteSectors(int Drive,char *pBuffer,unsigned short int Sector,unsigned short int Track,unsigned short int Side, short int Count, int *pnSectorsPerTrack);
36: extern int Floppy_GetPhysicalSectorsPerTrack(int Drive);
37: extern BOOL Floppy_ReadPhysicalSector(int Drive,char *pBuffer,unsigned short int Sector,unsigned short int Track,unsigned short int Side,unsigned short int Count);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.