- }\r
-\r
- // here we render sound if ym2612 is disabled\r
- if (!(PicoOpt&1) && PsndOut) {\r
- int len = PsndRender(0, PsndLen);\r
- if (PicoWriteSound) PicoWriteSound(len);\r
- // clear sound buffer\r
- PsndClear();\r
- }\r
-\r
- // a gap between flags set and vint\r
- pv->pending_ints|=0x20;\r
- pv->status|=8; // go into vblank\r
- SekRunM68k(68+4);\r
-\r
- // ---- V-Blanking period ----\r
- // fix line counts\r
- if(Pico.m.pal) {\r
- if(pv->reg[1]&8) { // 240 lines\r
- lines = line = 240;\r
- sects = 3;\r
- lines_step = 24;\r
- } else {\r
- lines = line = 224;\r
- sects = 4;\r
- lines_step = 22;\r
- }\r
- } else {\r
- lines = line = 224;\r
- sects = 2;\r
- lines_step = 19;\r
- }\r
-\r
- if (pv->reg[1]&0x20) SekInterrupt(6); // Set IRQ\r
- if (Pico.m.z80Run && (PicoOpt&4))\r
- z80_int();\r
-\r
- while (sects) {\r
- lines += lines_step;\r
-\r
- SekRunM68k(cycles_68k_vblock);\r
-\r
- PicoRunZ80Simple(line, lines);\r
- if (PicoLineHook) PicoLineHook(lines_step);\r
- line=lines;\r
-\r
- sects--;\r
- if (sects && CheckIdle()) break;\r
- }\r
-\r
- // run Z80 for remaining sections\r
- if (sects) {\r
- lines += sects*lines_step;\r
- PicoRunZ80Simple(line, lines);\r
- if (PicoLineHook) PicoLineHook(sects*lines_step);\r
- }\r
-\r
- return 0;\r
-}\r
-\r
-int PicoFrame(void)\r
-{\r
- int acc;\r