X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fvideoport.c;h=35ece48086a8c5caebb8d6a7e1acd5606dc28c8b;hb=7feeb8806243f9f0bc6c3d6e957b97d12cecb7df;hp=1e60686847095cdec9f78306e13345d9c0cfe220;hpb=53f948c9014404685aaacce497755794c25bc5b6;p=picodrive.git diff --git a/pico/videoport.c b/pico/videoport.c index 1e60686..35ece48 100644 --- a/pico/videoport.c +++ b/pico/videoport.c @@ -8,7 +8,7 @@ */ #include "pico_int.h" -#include "cd/gfx_cd.h" +#include "memory.h" int line_base_cycles; extern const unsigned char hcounts_32[]; @@ -37,7 +37,7 @@ static void VideoWrite(u16 d) case 1: if(a&1) d=(u16)((d<<8)|(d>>8)); // If address is odd, bytes are swapped (which game needs this?) Pico.vram [(a>>1)&0x7fff]=d; if (a - ((unsigned)(Pico.video.reg[5]&0x7f) << 9) < 0x400) - rendstatus |= PDRAW_DIRTY_SPRITES; + Pico.est.rendstatus |= PDRAW_DIRTY_SPRITES; break; case 3: Pico.m.dirtyPal = 1; Pico.cram [(a>>1)&0x003f]=d; break; // wraps (Desert Strike) @@ -135,10 +135,10 @@ static void DmaSlow(int len) // if we have DmaHook, let it handle ROM because of possible DMA delay if (PicoDmaHook && PicoDmaHook(source, len, &pd, &pdend)); else if (source%04x: invalid src", Pico.video.type, source, a); return; } @@ -173,7 +173,7 @@ static void DmaSlow(int len) //if(pd >= pdend) pd-=0x8000; // should be good for RAM, bad for ROM } } - rendstatus |= PDRAW_DIRTY_SPRITES; + Pico.est.rendstatus |= PDRAW_DIRTY_SPRITES; break; case 3: // cram @@ -242,7 +242,7 @@ static void DmaCopy(int len) } // remember addr Pico.video.addr=a; - rendstatus |= PDRAW_DIRTY_SPRITES; + Pico.est.rendstatus |= PDRAW_DIRTY_SPRITES; } // check: Contra, Megaman @@ -281,7 +281,7 @@ static void DmaFill(int data) // update length Pico.video.reg[0x13] = Pico.video.reg[0x14] = 0; // Dino Dini's Soccer (E) (by Haze) - rendstatus |= PDRAW_DIRTY_SPRITES; + Pico.est.rendstatus |= PDRAW_DIRTY_SPRITES; } static void CommandDma(void) @@ -320,7 +320,7 @@ static void CommandChange(void) static void DrawSync(int blank_on) { if (Pico.m.scanline < 224 && !(PicoOpt & POPT_ALT_RENDERER) && - !PicoSkipFrame && DrawScanline <= Pico.m.scanline) { + !PicoSkipFrame && Pico.est.DrawScanline <= Pico.m.scanline) { //elprintf(EL_ANOMALY, "sync"); PicoDrawSync(Pico.m.scanline, blank_on); } @@ -413,7 +413,7 @@ PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d) goto update_irq; case 0x05: //elprintf(EL_STATUS, "spritep moved to %04x", (unsigned)(Pico.video.reg[5]&0x7f) << 9); - if (d^dold) rendstatus |= PDRAW_SPRITES_MOVED; + if (d^dold) Pico.est.rendstatus |= PDRAW_SPRITES_MOVED; break; case 0x0c: // renderers should update their palettes if sh/hi mode is changed