From 8e5427a06854695302a879dba5f0cbb3886e7253 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 3 Feb 2008 20:29:22 +0000 Subject: [PATCH] added PicoGetStat() for win32 git-svn-id: file:///home/notaz/opt/svn/PicoDrive@344 be3aeb3a-fb24-0410-a615-afba39da0efa --- Pico/Pico.c | 11 +++++++++++ Pico/Pico.h | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Pico/Pico.c b/Pico/Pico.c index bf8b707d..0e9ee6c2 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 23e9e0b5..efedc810 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 -- 2.39.5