X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.c;h=0e9ee6c2bf8a9198bc9f05773494b28020c319fb;hb=259ed0ea6635845527a3da94a67a6260463861e6;hp=93d6876460f887e3fa5624e724b9fdd7889865eb;hpb=0ffefdb8bd172c258497ce0cd14d1f2ea1358f69;p=picodrive.git diff --git a/Pico/Pico.c b/Pico/Pico.c index 93d6876..0e9ee6c 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -255,6 +255,12 @@ static int CheckIdle(void) // to be called on 224 or line_sample scanlines only static __inline void getSamples(int y) { +#if SIMPLE_WRITE_SOUND + if (y != 224) return; + PsndRender(0, PsndLen); + if (PicoWriteSound) PicoWriteSound(PsndLen); + PsndClear(); +#else static int curr_pos = 0; if(y == 224) { @@ -271,6 +277,7 @@ static __inline void getSamples(int y) emustatus&=~1; curr_pos = PsndRender(0, PsndLen/2); } +#endif } @@ -495,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;