X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=Pico%2FPico.c;h=b07af08d508c635c82bc742f147a7c4d30430080;hb=e807ac752b4653487ec5bdf516205e24a1c657eb;hp=71add131e6e7e99611bbceb8a85664169cc342bb;hpb=03a265e5ebabff7adbb4f97387f81e9b0428dbee;p=picodrive.git diff --git a/Pico/Pico.c b/Pico/Pico.c index 71add13..b07af08 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -38,6 +38,7 @@ int PicoInit(void) z80_init(); // init even if we aren't going to use it PicoInitMCD(); + PicoSVPInit(); SRam.data=0; @@ -256,6 +257,7 @@ static int CheckIdle(void) static __inline void getSamples(int y) { #if SIMPLE_WRITE_SOUND + if (y != 224) return; PsndRender(0, PsndLen); if (PicoWriteSound) PicoWriteSound(PsndLen); PsndClear(); @@ -501,6 +503,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;