|
|
1.1 root 1: /*
2: Hatari
3: */
4:
5: // Structure for each drive connected as emulation
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:
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
19:
20: extern EMULATION_DRIVE EmulationDrives[NUM_EMULATION_DRIVES];
21: extern int nBootDrive;
22: extern char *pszDiscImageNameExts[];
23:
24: extern void Floppy_Init(void);
25: extern void Floppy_UnInit(void);
26: extern void Floppy_MemorySnapShot_Capture(BOOL bSave);
27: extern void Floppy_GetBootDrive(void);
28: extern BOOL Floppy_InsertDiscIntoDrive(int Drive, char *pszFileName);
29: extern void Floppy_EjectDiscFromDrive(int Drive,BOOL bInformUser);
30: extern void Floppy_EjectBothDrives(void);
31: extern void Floppy_FindDiscDetails(unsigned char *pBuffer,int nImageBytes,unsigned short int *pnSectorsPerTrack,unsigned short int *pnSides);
32: 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);
33: 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);
34: extern int Floppy_GetPhysicalSectorsPerTrack(int Drive);
35: 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.