Abstracted hard disc image handling to separate file.

This commit is contained in:
SarahW 2017-07-02 18:10:36 +01:00
commit 6484baaf9f
15 changed files with 251 additions and 280 deletions

14
src/hdd_file.h Normal file
View file

@ -0,0 +1,14 @@
typedef struct hdd_file_t
{
FILE *f;
int spt;
int hpc;
int tracks;
int sectors;
} hdd_file_t;
void hdd_load(hdd_file_t *hdd, int d, const char *fn);
void hdd_close(hdd_file_t *hdd);
void hdd_read_sectors(hdd_file_t *hdd, int offset, int nr_sectors, void *buffer);
void hdd_write_sectors(hdd_file_t *hdd, int offset, int nr_sectors, void *buffer);
void hdd_format_sectors(hdd_file_t *hdd, int offset, int nr_sectors);