X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fpico.h;h=e15f3160196267b073969afeed7e12bd592fb4d0;hb=cff531af94bd9c9c89ae162e80f48ddc26a4e504;hp=bde9a5a829dddbaa92f17460929134675f2abe32;hpb=fcdefcf62cb71969b456a6f27688adbeb5890bb9;p=picodrive.git diff --git a/pico/pico.h b/pico/pico.h index bde9a5a..e15f316 100644 --- a/pico/pico.h +++ b/pico/pico.h @@ -1,18 +1,16 @@ - -// -------------------- Pico Library -------------------- - -// Pico Library - Header File - -// (c) Copyright 2004 Dave, All rights reserved. -// (c) Copyright 2006-2009 notaz, All rights reserved. -// Free for non-commercial use. - -// For commercial use, separate licencing terms must be obtained. +/* + * PicoDrive + * (c) Copyright Dave, 2004 + * (C) notaz, 2006-2010 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #ifndef PICO_H #define PICO_H -#include +#include // size_t // port-specific compile-time settings #include @@ -22,8 +20,8 @@ extern "C" { #endif // external funcs for Sega/Mega CD -extern int mp3_get_bitrate(FILE *f, int size); -extern void mp3_start_play(FILE *f, int pos); +extern int mp3_get_bitrate(void *f, int size); +extern void mp3_start_play(void *f, int pos); extern void mp3_update(int *buffer, int length, int stereo); // this function should write-back d-cache and invalidate i-cache @@ -33,7 +31,7 @@ extern void cache_flush_d_inval_i(const void *start_addr, const void *end_addr); // attempt to alloc mem at specified address. // alloc anywhere else if that fails (callers should handle that) -extern void *plat_mmap(unsigned long addr, size_t size); +extern void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed); extern void *plat_mremap(void *ptr, size_t oldsize, size_t newsize); extern void plat_munmap(void *ptr, size_t size); @@ -90,7 +88,7 @@ void PicoLoopPrepare(void); void PicoFrame(void); void PicoFrameDrawOnly(void); extern int PicoPad[2]; // Joypads, format is MXYZ SACB RLDU -extern void (*PicoWriteSound)(int len); // called once per frame at the best time to send sound buffer (PsndOut) to hardware +extern void (*PicoWriteSound)(int bytes); // 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 typedef enum { PI_ROM, PI_ISPAL, PI_IS40_CELL, PI_IS240_LINES } pint_t; typedef union { int vint; void *vptr; } pint_ret_t; @@ -101,7 +99,7 @@ extern void (*PicoMCDopenTray)(void); extern void (*PicoMCDcloseTray)(void); extern int PicoCDBuffers; -// Pico/Pico.c +// pico.c #define XPCM_BUFFER_SIZE (320+160) typedef struct { @@ -170,10 +168,9 @@ typedef enum } pdso_t; void PicoDrawSetOutFormat(pdso_t which, int allow_32x); void PicoDrawSetOutBuf(void *dest, int increment); +void PicoDrawSetCallbacks(int (*begin)(unsigned int num), int (*end)(unsigned int num)); extern void *DrawLineDest; extern unsigned char *HighCol; -extern int (*PicoScanBegin)(unsigned int num); -extern int (*PicoScanEnd)(unsigned int num); // utility #ifdef _ASM_DRAW_C void vidConvCpyRGB565(void *to, void *from, int pixels); @@ -209,7 +206,7 @@ extern unsigned char *PicoDraw2FB; // buffer for fast renderer in format (8+32 extern unsigned short *PicoCramHigh; // pointer to CRAM buff (0x40 shorts), converted to native device color (works only with 16bit for now) extern void (*PicoPrepareCram)(); // prepares PicoCramHigh for renderer to use -// 32x/32x.c +// pico.c (32x) // multipliers against 68k clock extern int p32x_msh2_multiplier; extern int p32x_ssh2_multiplier; @@ -219,8 +216,6 @@ extern int p32x_ssh2_multiplier; // 32x/draw.c void PicoDraw32xSetFrameMode(int is_on, int only_32x); -extern int (*PicoScan32xBegin)(unsigned int num); -extern int (*PicoScan32xEnd)(unsigned int num); // sound.c extern int PsndRate,PsndLen; @@ -228,13 +223,6 @@ extern short *PsndOut; extern void (*PsndMix_32_to_16l)(short *dest, int *src, int count); void PsndRerate(int preserve_state); -// Utils.c -extern int PicuAnd; -int PicuQuick(unsigned short *dest,unsigned short *src); -int PicuShrink(unsigned short *dest,int destLen,unsigned short *src,int srcLen); -int PicuShrinkReverse(unsigned short *dest,int destLen,unsigned short *src,int srcLen); -int PicuMerge(unsigned short *dest,int destLen,unsigned short *src,int srcLen); - #ifdef __cplusplus } // End of extern "C" #endif