X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.h;h=597f021158376867e08fe784b8c94e25a66d447e;hb=782f8f2211d098b22b5805a720d2aa38884d47ac;hp=e7dd52a79422aa06da5f24df6ab19f7b1530cf95;hpb=68cba51e206ea6089e8ebc04d7dcd9980bc9575c;p=picodrive.git diff --git a/Pico/Pico.h b/Pico/Pico.h index e7dd52a..597f021 100644 --- a/Pico/Pico.h +++ b/Pico/Pico.h @@ -42,11 +42,13 @@ void PicoExit(void); int PicoReset(int hard); int PicoFrame(void); extern int PicoPad[2]; // Joypads, format is MXYZ SACB RLDU -extern int (*PicoCram)(int cram); // Callback to convert colour ram 0000bbb0 ggg0rrr0 extern void (*PicoWriteSound)(int len); // called once per frame at the best time to send sound buffer (PsndOut) to hardware +extern void (*PicoMessage)(const char *msg); // callback to output text message from emu 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);