X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2Fdraw.c;h=e59fabbfa8a910aab22bf29c81e72c762fee6e93;hb=6add7875b54904ff2a6c4b49a1b6e82a3c888a6d;hp=7e0911e953fb06161a021fc4c64b3b1414f057ce;hpb=266c6afa84bde8d77a54d61ced8f227480247e24;p=picodrive.git diff --git a/pico/32x/draw.c b/pico/32x/draw.c index 7e0911e..e59fabb 100644 --- a/pico/32x/draw.c +++ b/pico/32x/draw.c @@ -42,6 +42,10 @@ void FinalizeLine32xRGB555(int sh, int line) if ((Pico32x.vdp_regs[0] & P32XV_Mx) == 0) return; // blanking + // XXX: how is 32col mode hadled by real hardware? + if (!(Pico.video.reg[12] & 1)) + return; + if (!(PicoDrawMask & PDRAW_32X_ON)) return; @@ -79,7 +83,13 @@ void FinalizeLine32xRGB555(int sh, int line) } } else { // Run Length Mode - + unsigned short len, t; + for (i = 320; i > 0; ps++) { + t = pal[*ps & 0xff]; + for (len = (*ps >> 8) + 1; len > 0 && i > 0; len--, i--, pd++, pb++) + if (*pb == 0 || (t & 0x20)) + *pd = t; + } } }