Annotation of hatari/src/includes/floppy.h, revision 1.1.1.12

1.1       root        1: /*
1.1.1.3   root        2:   Hatari - floppy.h
                      3: 
1.1.1.10  root        4:   This file is distributed under the GNU General Public License, version 2
                      5:   or at 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.9   root       13: 
                     14: 
                     15: #define MAX_FLOPPYDRIVES    2                                  /* A: and B: */
                     16: #define NUMBYTESPERSECTOR 512                                  /* All supported disk images are 512 bytes per sector */
                     17: 
                     18: #define        FLOPPY_DRIVE_TRANSITION_STATE_INSERT            1
                     19: #define        FLOPPY_DRIVE_TRANSITION_STATE_EJECT             2
                     20: #define        FLOPPY_DRIVE_TRANSITION_DELAY_VBL               18      /* min of 16 VBLs */
                     21: 
1.1.1.11  root       22: #define        FLOPPY_IMAGE_TYPE_NONE                  0               /* no recognized image inserted */
                     23: #define        FLOPPY_IMAGE_TYPE_ST                    1
                     24: #define        FLOPPY_IMAGE_TYPE_MSA                   2
                     25: #define        FLOPPY_IMAGE_TYPE_DIM                   3
                     26: #define        FLOPPY_IMAGE_TYPE_IPF                   4               /* handled by capsimage library */
                     27: #define        FLOPPY_IMAGE_TYPE_STX                   5
                     28: 
1.1.1.12! root       29: #define        FLOPPY_BOOT_SECTOR_EXE_SUM              0x1234
        !            30: 
        !            31: 
1.1.1.2   root       32: /* Structure for each drive connected as emulation */
1.1.1.3   root       33: typedef struct
                     34: {
1.1.1.11  root       35:        int ImageType;
1.1.1.8   root       36:        Uint8 *pBuffer;
                     37:        char sFileName[FILENAME_MAX];
                     38:        int nImageBytes;
                     39:        bool bDiskInserted;
                     40:        bool bContentsChanged;
                     41:        bool bOKToSave;
1.1       root       42: 
1.1.1.9   root       43:        /* For the emulation of the WPRT bit when a disk is changed */
                     44:        int TransitionState1;
                     45:        int TransitionState1_VBL;
                     46:        int TransitionState2;
                     47:        int TransitionState2_VBL;
                     48: } EMULATION_DRIVE;
1.1       root       49: 
1.1.1.7   root       50: extern EMULATION_DRIVE EmulationDrives[MAX_FLOPPYDRIVES];
1.1       root       51: extern int nBootDrive;
                     52: 
1.1.1.9   root       53: 
1.1       root       54: extern void Floppy_Init(void);
                     55: extern void Floppy_UnInit(void);
1.1.1.9   root       56: extern void Floppy_Reset(void);
1.1.1.7   root       57: extern void Floppy_MemorySnapShot_Capture(bool bSave);
1.1       root       58: extern void Floppy_GetBootDrive(void);
1.1.1.7   root       59: extern bool Floppy_IsWriteProtected(int Drive);
                     60: extern const char* Floppy_SetDiskFileNameNone(int Drive);
                     61: extern const char* Floppy_SetDiskFileName(int Drive, const char *pszFileName, const char *pszZipPath);
1.1.1.9   root       62: extern int Floppy_DriveTransitionUpdateState ( int Drive );
1.1.1.7   root       63: extern bool Floppy_InsertDiskIntoDrive(int Drive);
                     64: extern bool Floppy_EjectDiskFromDrive(int Drive);
                     65: extern void Floppy_FindDiskDetails(const Uint8 *pBuffer, int nImageBytes, Uint16 *pnSectorsPerTrack, Uint16 *pnSides);
1.1.1.11  root       66: extern bool Floppy_ReadSectors(int Drive, Uint8 **pBuffer, Uint16 Sector, Uint16 Track, Uint16 Side, short Count, int *pnSectorsPerTrack, int *pSectorSize);
1.1.1.9   root       67: extern bool Floppy_WriteSectors(int Drive, Uint8 *pBuffer, Uint16 Sector, Uint16 Track, Uint16 Side, short Count, int *pnSectorsPerTrack, int *pSectorSize);
1.1.1.3   root       68: 
                     69: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.