X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.h;h=603c5e97f7a433b08e4b380915677abd216d1c42;hb=0a051f558c6585c94d06dbe670e70bcac4e0aadd;hp=e7dd52a79422aa06da5f24df6ab19f7b1530cf95;hpb=68cba51e206ea6089e8ebc04d7dcd9980bc9575c;p=picodrive.git diff --git a/Pico/Pico.h b/Pico/Pico.h index e7dd52a..603c5e9 100644 --- a/Pico/Pico.h +++ b/Pico/Pico.h @@ -47,6 +47,8 @@ extern void (*PicoWriteSound)(int len); // called once per frame at the best tim int PicoFrameMCD(void); +extern int PicoCDBuffers; + // Area.c typedef size_t (arearw)(void *p, size_t _size, size_t _n, void *file); typedef size_t (areaeof)(void *file); @@ -61,11 +63,29 @@ extern areaseek *areaSeek; extern areaclose *areaClose; extern void (*PicoStateProgressCB)(const char *str); +// cd/buffering.c +void PicoCDBufferInit(void); +void PicoCDBufferFree(void); + // 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);