X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fvideoport.c;h=42f55c8200e4aeb428956873134f656a9a84b986;hb=92dfd9afa6e06a071c2e025ff7e0d4f1824a5e8d;hp=3d74f519bb93d97045935c1b84c6330b1a5c3126;hpb=1cfc5cc4ce06642b9bc45ca3b9d32793718e9455;p=picodrive.git diff --git a/pico/videoport.c b/pico/videoport.c index 3d74f51..42f55c8 100644 --- a/pico/videoport.c +++ b/pico/videoport.c @@ -1,11 +1,11 @@ -// PicoDrive - -// (c) Copyright 2004 Dave, All rights reserved. -// (c) Copyright 2006-2008, Grazvydas "notaz" Ignotas -// Free for non-commercial use. - -// For commercial use, separate licencing terms must be obtained. - +/* + * PicoDrive + * (c) Copyright Dave, 2004 + * (C) notaz, 2006-2009 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include "pico_int.h" #include "cd/gfx_cd.h" @@ -93,8 +93,7 @@ static void DmaSlow(int len) SekCyclesDone(), SekPc); Pico.m.dma_xfers += len; - if ((PicoAHW & PAHW_MCD) && (PicoOpt & POPT_EN_MCD_PSYNC)) SekCyclesBurn(CheckDMA()); - else SekSetCyclesLeftNoMCD(SekCyclesLeftNoMCD - CheckDMA()); + SekCyclesBurnRun(CheckDMA()); if ((source&0xe00000)==0xe00000) { // Ram pd=(u16 *)(Pico.ram+(source&0xfffe)); @@ -208,7 +207,8 @@ static void DmaSlow(int len) break; default: - elprintf(EL_VDPDMA|EL_ANOMALY, "DMA with bad type %i", Pico.video.type); + if (Pico.video.type != 0 || (EL_LOGMASK & EL_VDPDMA)) + elprintf(EL_VDPDMA|EL_ANOMALY, "DMA with bad type %i", Pico.video.type); break; } // remember addr @@ -316,7 +316,7 @@ static void CommandChange(void) if (cmd&0x80) CommandDma(); } -static __inline void DrawSync(int blank_on) +static void DrawSync(int blank_on) { if (Pico.m.scanline < 224 && !(PicoOpt & POPT_ALT_RENDERER) && !PicoSkipFrame && DrawScanline <= Pico.m.scanline) { @@ -361,8 +361,7 @@ PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d) pvid->lwrite_cnt++; if (pvid->lwrite_cnt >= 4) pvid->status|=0x100; // FIFO full if (pvid->lwrite_cnt > 4) { - SekCyclesBurn(32); // penalty // 488/12-8 - if (SekCycleCnt>=SekCycleAim) SekEndRun(0); + SekCyclesBurnRun(32); // penalty // 488/12-8 } elprintf(EL_ASVDP, "VDP data write: %04x [%06x] {%i} #%i @ %06x", d, Pico.video.addr, Pico.video.type, pvid->lwrite_cnt, SekPc); @@ -424,7 +423,7 @@ PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d) update_irq: #ifndef EMU_CORE_DEBUG // update IRQ level - if (!SekShouldInterrupt) // hack + if (!SekShouldInterrupt()) // hack { int lines, pints, irq=0; lines = (pvid->reg[1] & 0x20) | (pvid->reg[0] & 0x10); @@ -545,3 +544,5 @@ unsigned int PicoVideoRead8(unsigned int a) return 0; } + +// vim:shiftwidth=2:ts=2:expandtab