- // V-Interrupt:\r
- if (y == lines_vis)\r
- {\r
- pv->status|=0x08; // go into vblank\r
- //pv->status|=0x80; // V-Int happened\r
- //if(!Pico.m.dma_bytes||(Pico.video.reg[0x17]&0x80)) {\r
- // there must be a gap between H and V ints, also after vblank bit set (Mazin Saga, Bram Stoker's Dracula)\r
- SekRun(68); SekCycleAim-=68; // 128; ?\r
- SekCycleAim-=148;\r
-// SekRun(vint_delay); SekCycleAim-=vint_delay; // 128; ?\r
-// SekCycleAim-=as_delay;\r
- //}\r
- pv->pending_ints|=0x20;\r
- if(pv->reg[1]&0x20) {\r
- elprintf(EL_INTS, "vint: @ %06x [%i]", SekPc, SekCycleCnt);\r
- SekInterrupt(6);\r
- }\r
- if(Pico.m.z80Run && (PicoOpt&4)) // ?\r
- z80_int();\r
- //dprintf("zint: [%i|%i] zPC=%04x", Pico.m.scanline, SekCyclesDone(), mz80GetRegisterValue(NULL, 0));\r
- }\r
-\r
- // decide if we draw this line\r
-#if CAN_HANDLE_240_LINES\r
- if(!skip && ((!(pv->reg[1]&8) && y<224) || ((pv->reg[1]&8) && y<240)) )\r
-#else\r
- if(!skip && y<224)\r
-#endif\r
- PicoLine(y);\r
-\r
- if(PicoOpt&1)\r
- sound_timers_and_dac(y);\r
-\r
- // get samples from sound chips\r
- if(y == 32 && PsndOut)\r
- emustatus &= ~1;\r
- else if((y == 224 || y == line_sample) && PsndOut)\r
- getSamples(y);\r
-\r
- // Run scanline:\r
- if (Pico.m.dma_xfers) SekCyclesBurn(CheckDMA());\r
- SekRun(cycles_68k);\r
- if ((PicoOpt&4) && Pico.m.z80Run) {\r
- if (Pico.m.z80Run & 2) z80CycleAim+=cycles_z80;\r
- else {\r
- int cnt = SekCyclesDone() - z80startCycle;\r
- cnt = (cnt>>1)-(cnt>>5);\r
- //if (cnt > cycles_z80) printf("FIXME: z80 cycles: %i\n", cnt);\r
- if (cnt > cycles_z80) cnt = cycles_z80;\r
- Pico.m.z80Run |= 2;\r
- z80CycleAim+=cnt;\r
- }\r
- total_z80+=z80_run(z80CycleAim-total_z80);\r
- }\r
- }\r