X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fpico_int.h;h=b9a4418fb5594aa2c11a223664dc2ac4489c73de;hb=cbf31d2c254c956a0b497e3021610ce3a5ff0748;hp=7447db94d2bc7f9d2c0a621e62e9fae15465aa6c;hpb=f47d0a28983cc999d2cc9d050b4badcd41652c27;p=picodrive.git diff --git a/pico/pico_int.h b/pico/pico_int.h index 7447db9..b9a4418 100644 --- a/pico/pico_int.h +++ b/pico/pico_int.h @@ -32,6 +32,11 @@ extern "C" { #endif +#ifdef _MSC_VER +#define snprintf _snprintf +#define strcasecmp _stricmp +#define strncasecmp _strnicmp +#endif // ----------------------- 68000 CPU ----------------------- #ifdef EMU_C68K @@ -328,6 +333,19 @@ struct PicoMS unsigned char pad[0x4e]; }; +// emu state and data for the asm code +struct PicoEState +{ + int DrawScanline; + int rendstatus; + void *DrawLineDest; // draw estination + unsigned char *HighCol; + int *HighPreSpr; + void *Pico_video; + void *Pico_vram; + int *PicoOpt; +}; + // some assembly stuff depend on these, do not touch! struct Pico { @@ -348,6 +366,7 @@ struct Pico struct PicoMisc m; struct PicoVideo video; struct PicoMS ms; + struct PicoEState est; }; // sram @@ -574,13 +593,13 @@ extern void (*PicoCartUnloadHook)(void); int CM_compareRun(int cyc, int is_sub); // draw.c +void PicoDrawInit(void); PICO_INTERNAL void PicoFrameStart(void); void PicoDrawSync(int to, int blank_last_line); -void BackFill(int reg7, int sh); -void FinalizeLine555(int sh, int line); +void BackFill(int reg7, int sh, struct PicoEState *est); +void FinalizeLine555(int sh, int line, struct PicoEState *est); extern int (*PicoScanBegin)(unsigned int num); extern int (*PicoScanEnd)(unsigned int num); -extern int DrawScanline; #define MAX_LINE_SPRITES 29 extern unsigned char HighLnSpr[240][3 + MAX_LINE_SPRITES]; extern void *DrawLineDestBase; @@ -768,7 +787,7 @@ PICO_INTERNAL_ASM unsigned int PicoVideoRead8(unsigned int a); extern int (*PicoDmaHook)(unsigned int source, int len, unsigned short **srcp, unsigned short **limitp); // misc.c -PICO_INTERNAL_ASM void memcpy16(unsigned short *dest, unsigned short *src, int count); +PICO_INTERNAL_ASM void pmemcpy16(unsigned short *dest, unsigned short *src, int count); PICO_INTERNAL_ASM void memcpy16bswap(unsigned short *dest, void *src, int count); PICO_INTERNAL_ASM void memcpy32(int *dest, int *src, int count); // 32bit word count PICO_INTERNAL_ASM void memset32(int *dest, int c, int count); @@ -856,7 +875,7 @@ void p32x_sh2_poll_event(SH2 *sh2, unsigned int flags, unsigned int m68k_cycles) // 32x/draw.c void PicoDrawSetOutFormat32x(pdso_t which, int use_32x_line_mode); -void FinalizeLine32xRGB555(int sh, int line); +void FinalizeLine32xRGB555(int sh, int line, struct PicoEState *est); void PicoDraw32xLayer(int offs, int lines, int mdbg); void PicoDraw32xLayerMdOnly(int offs, int lines); extern int (*PicoScan32xBegin)(unsigned int num); @@ -907,7 +926,7 @@ void REGPARM(3) sh2_peripheral_write32(unsigned int a, unsigned int d, SH2 *sh2) #endif /* avoid dependency on newer glibc */ -static __inline int isspace_(int c) +static INLINE int isspace_(int c) { return (0x09 <= c && c <= 0x0d) || c == ' '; }