|
|
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.7 root 11: #include "configuration.h"
12:
1.1.1.2 root 13: /* Structure for each drive connected as emulation */
1.1.1.3 root 14: typedef struct
15: {
1.1.1.8 ! root 16: Uint8 *pBuffer;
! 17: char sFileName[FILENAME_MAX];
! 18: int nImageBytes;
! 19: bool bDiskInserted;
! 20: bool bMediaChanged;
! 21: bool bContentsChanged;
! 22: bool bOKToSave;
1.1 root 23: } EMULATION_DRIVE;
24:
1.1.1.7 root 25: #define MAX_FLOPPYDRIVES 2 /* A:, B: */
26: #define NUMBYTESPERSECTOR 512 /* All disks are 512 bytes per sector */
1.1 root 27:
1.1.1.7 root 28: extern EMULATION_DRIVE EmulationDrives[MAX_FLOPPYDRIVES];
1.1 root 29: extern int nBootDrive;
30:
31: extern void Floppy_Init(void);
32: extern void Floppy_UnInit(void);
1.1.1.7 root 33: extern void Floppy_MemorySnapShot_Capture(bool bSave);
1.1 root 34: extern void Floppy_GetBootDrive(void);
1.1.1.7 root 35: extern bool Floppy_IsWriteProtected(int Drive);
36: extern const char* Floppy_SetDiskFileNameNone(int Drive);
37: extern const char* Floppy_SetDiskFileName(int Drive, const char *pszFileName, const char *pszZipPath);
38: extern bool Floppy_InsertDiskIntoDrive(int Drive);
39: extern bool Floppy_EjectDiskFromDrive(int Drive);
40: extern void Floppy_FindDiskDetails(const Uint8 *pBuffer, int nImageBytes, Uint16 *pnSectorsPerTrack, Uint16 *pnSides);
41: extern bool Floppy_ReadSectors(int Drive, Uint8 *pBuffer, Uint16 Sector, Uint16 Track, Uint16 Side, short Count, int *pnSectorsPerTrack);
42: extern bool Floppy_WriteSectors(int Drive, Uint8 *pBuffer, Uint16 Sector, Uint16 Track, Uint16 Side, short Count, int *pnSectorsPerTrack);
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.