fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
at master 59 lines 2.1 kB view raw
1/***************************************************************************** 2 * pce * 3 *****************************************************************************/ 4 5/***************************************************************************** 6 * File name: src/drivers/block/blkpri.h * 7 * Created: 2017-10-28 by Hampa Hug <hampa@hampa.ch> * 8 * Copyright: (C) 2017-2019 Hampa Hug <hampa@hampa.ch> * 9 *****************************************************************************/ 10 11/***************************************************************************** 12 * This program is free software. You can redistribute it and / or modify it * 13 * under the terms of the GNU General Public License version 2 as published * 14 * by the Free Software Foundation. * 15 * * 16 * This program is distributed in the hope that it will be useful, but * 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 * Public License for more details. * 20 *****************************************************************************/ 21 22 23#ifndef PCE_BLOCK_BLKPRI_H 24#define PCE_BLOCK_BLKPRI_H 1 25 26 27#include <config.h> 28 29#include <drivers/block/block.h> 30 31#include <drivers/pri/pri.h> 32#include <drivers/pri/pri-img.h> 33 34#include <stdint.h> 35#include <stdio.h> 36 37 38typedef struct { 39 disk_t dsk; 40 41 pri_img_t *img; 42 43 char dirty; 44 45 unsigned type; 46} disk_pri_t; 47 48 49disk_t *dsk_pri_open_fp (FILE *fp, unsigned type, int ro); 50disk_t *dsk_pri_open (const char *fname, unsigned type, int ro); 51 52int dsk_pri_create_fp (FILE *fp, unsigned type, uint32_t c, uint32_t h, uint32_t s); 53int dsk_pri_create (const char *name, unsigned type, uint32_t c, uint32_t h, uint32_t s); 54 55unsigned dsk_pri_probe_fp (FILE *fp); 56unsigned dsk_pri_probe (const char *fname); 57 58 59#endif