X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.h;h=f997c5cc52fd9bdc90e102344ad5148f448a93de;hb=83bd0b76aba19ff62368cfee76089e15579e3b7c;hp=e7dd52a79422aa06da5f24df6ab19f7b1530cf95;hpb=b67ef287e73ed2c8e92a1d8fa53aac7d58998d37;p=picodrive.git diff --git a/Pico/Pico.h b/Pico/Pico.h index e7dd52a..f997c5c 100644 --- a/Pico/Pico.h +++ b/Pico/Pico.h @@ -62,10 +62,24 @@ extern areaclose *areaClose; extern void (*PicoStateProgressCB)(const char *str); // Cart.c -int PicoCartLoad(FILE *f,unsigned char **prom,unsigned int *psize); +typedef enum +{ + PMT_UNCOMPRESSED = 0, + PMT_ZIP +} pm_type; +typedef struct +{ + void *file; /* file handle */ + void *param; /* additional file related field */ + unsigned int size; /* size */ + pm_type type; +} pm_file; +pm_file *pm_open(const char *path); +size_t pm_read(void *ptr, size_t bytes, pm_file *stream); +int pm_seek(pm_file *stream, long offset, int whence); +int pm_close(pm_file *fp); +int PicoCartLoad(pm_file *f,unsigned char **prom,unsigned int *psize); int PicoCartInsert(unsigned char *rom,unsigned int romsize); -// notaz -int CartLoadZip(const char *fname, unsigned char **prom, unsigned int *psize); void Byteswap(unsigned char *data,int len); // anotherguest int PicoUnloadCart(unsigned char* romdata);