From: notaz Date: Sun, 3 Feb 2008 20:29:22 +0000 (+0000) Subject: added PicoGetStat() for win32 X-Git-Tag: v1.85~583 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e5427a06854695302a879dba5f0cbb3886e7253;p=picodrive.git added PicoGetStat() for win32 git-svn-id: file:///home/notaz/opt/svn/PicoDrive@344 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/Pico/Pico.c b/Pico/Pico.c index bf8b707..0e9ee6c 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -502,6 +502,17 @@ void PicoFrameDrawOnly(void) for (y=0;y<224;y++) PicoLine(y); } +int PicoGetStat(pstat_t which) +{ + switch (which) + { + case PS_PAL: return Pico.m.pal; + case PS_40_CELL: return Pico.video.reg[12]&1; + case PS_240_LINES: return Pico.m.pal && (Pico.video.reg[1]&8); + } + return 0; +} + // callback to output message from emu void (*PicoMessage)(const char *msg)=NULL; diff --git a/Pico/Pico.h b/Pico/Pico.h index 23e9e0b..efedc81 100644 --- a/Pico/Pico.h +++ b/Pico/Pico.h @@ -49,6 +49,8 @@ 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 (*PicoMessage)(const char *msg); // callback to output text message from emu +typedef enum { PS_PAL, PS_40_CELL, PS_240_LINES } pstat_t; +int PicoGetStat(pstat_t which); // cd/Pico.c extern void (*PicoMCDopenTray)(void); @@ -125,7 +127,7 @@ void vidConvCpyRGB565(void *to, void *from, int pixels); // Draw2.c // stuff below is optional -extern unsigned char *PicoDraw2FB; // buffer for fasr renderer in format (8+320)x(8+224+8) (eights for borders) +extern unsigned char *PicoDraw2FB; // buffer for fast renderer in format (8+320)x(8+224+8) (eights for borders) 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