- int emu_opt = currentConfig.EmuOpt;
-
- if (PicoOpt&0x10)
- {
-#if 1
- draw2_clut();
-#else
- extern void amips_clut(unsigned short *dst, unsigned char *src, unsigned short *pal, int count);
- int i; // , lines_flags = 224;
- unsigned short *pd = psp_screen;
- unsigned char *ps = PicoDraw2FB+328*8+8;
- // 8bit fast renderer
- if (Pico.m.dirtyPal) {
- int *dpal = (void *)localPal;
- int *spal = (int *)Pico.cram;
- Pico.m.dirtyPal = 0;
- for (i = 0x3f/2; i >= 0; i--)
- dpal[i] = ((spal[i]&0x000f000f)<< 1)|((spal[i]&0x00f000f0)<<3)|((spal[i]&0x0f000f00)<<4);
- }
- // if (!(Pico.video.reg[12]&1)) lines_flags|=0x10000;
- // if (currentConfig.EmuOpt&0x4000)
- // lines_flags|=0x40000; // (Pico.m.frame_count&1)?0x20000:0x40000;
- //vidCpy8to16((unsigned short *)giz_screen+321*8, PicoDraw2FB+328*8, localPal, lines_flags);
- for (i = 224; i > 0; i--, pd+=512, ps+=328)
- amips_clut(pd, ps, localPal, 320);
-#endif
- }
-#if 0
- else if (!(emu_opt&0x80))
- {
- int lines_flags;
- // 8bit accurate renderer
- if (Pico.m.dirtyPal) {
- Pico.m.dirtyPal = 0;
- vidConvCpyRGB565(localPal, Pico.cram, 0x40);
- if (Pico.video.reg[0xC]&8) { // shadow/hilight mode
- //vidConvCpyRGB32sh(localPal+0x40, Pico.cram, 0x40);
- //vidConvCpyRGB32hi(localPal+0x80, Pico.cram, 0x40); // TODO?
- blockcpy(localPal+0xc0, localPal+0x40, 0x40*2);
- localPal[0xc0] = 0x0600;
- localPal[0xd0] = 0xc000;
- localPal[0xe0] = 0x0000; // reserved pixels for OSD
- localPal[0xf0] = 0xffff;
- }
- /* no support
- else if (rendstatus & 0x20) { // mid-frame palette changes
- vidConvCpyRGB565(localPal+0x40, HighPal, 0x40);
- vidConvCpyRGB565(localPal+0x80, HighPal+0x40, 0x40);
- } */
- }
- lines_flags = (Pico.video.reg[1]&8) ? 240 : 224;
- if (!(Pico.video.reg[12]&1)) lines_flags|=0x10000;
- if (currentConfig.EmuOpt&0x4000)
- lines_flags|=0x40000; // (Pico.m.frame_count&1)?0x20000:0x40000;
- vidCpy8to16((unsigned short *)giz_screen+321*8, PicoDraw2FB+328*8, localPal, lines_flags);
- }
-#endif