|
|
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: {
16: Uint8 *pBuffer;
1.1 root 17: int nImageBytes;
1.1.1.7 ! root 18: bool bDiskInserted;
! 19: bool bMediaChanged;
! 20: bool bContentsChanged;
! 21: bool bOKToSave;
1.1 root 22: } EMULATION_DRIVE;
23:
1.1.1.7 ! root 24: #define MAX_FLOPPYDRIVES 2 /* A:, B: */
! 25: #define NUMBYTESPERSECTOR 512 /* All disks are 512 bytes per sector */
1.1 root 26:
1.1.1.7 ! root 27: extern EMULATION_DRIVE EmulationDrives[MAX_FLOPPYDRIVES];
1.1 root 28: extern int nBootDrive;
29:
30: extern void Floppy_Init(void);
31: extern void Floppy_UnInit(void);
1.1.1.7 ! root 32: extern void Floppy_MemorySnapShot_Capture(bool bSave);
1.1 root 33: extern void Floppy_GetBootDrive(void);
1.1.1.7 ! root 34: extern bool Floppy_IsWriteProtected(int Drive);
! 35: extern const char* Floppy_SetDiskFileNameNone(int Drive);
! 36: extern const char* Floppy_SetDiskFileName(int Drive, const char *pszFileName, const char *pszZipPath);
! 37: extern bool Floppy_InsertDiskIntoDrive(int Drive);
! 38: extern bool Floppy_EjectDiskFromDrive(int Drive);
! 39: extern bool Floppy_EjectBothDrives(void);
! 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 root 43: extern int Floppy_GetPhysicalSectorsPerTrack(int Drive);
1.1.1.7 ! root 44: extern bool Floppy_ReadPhysicalSector(int Drive,char *pBuffer, Uint16 Sector, Uint16 Track, Uint16 Side, short Count);
1.1.1.3 root 45:
46: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.