fixed the arrow problem in VR
authornotaz <notasas@gmail.com>
Sat, 26 Jan 2008 15:49:24 +0000 (15:49 +0000)
committernotaz <notasas@gmail.com>
Sat, 26 Jan 2008 15:49:24 +0000 (15:49 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@331 be3aeb3a-fb24-0410-a615-afba39da0efa

Pico/VideoPort.c
Pico/carthw/svp/svp.c

index 59a57b2..c448873 100644 (file)
@@ -134,11 +134,12 @@ static void DmaSlow(int len)
       return;\r
     }\r
   } else {\r
-    if (source<Pico.romsize) { // Rom\r
+    // if we have DmaHook, let it handle ROM because of possible DMA delay\r
+    if (PicoDmaHook && PicoDmaHook(source, len, &pd, &pdend));\r
+    else if (source<Pico.romsize) { // Rom\r
       pd=(u16 *)(Pico.rom+(source&~1));\r
       pdend=(u16 *)(Pico.rom+Pico.romsize);\r
     }\r
-    else if (PicoDmaHook && PicoDmaHook(source, len, &pd, &pdend));\r
     else {\r
       elprintf(EL_VDPDMA|EL_ANOMALY, "DmaSlow[%i] %06x->%04x: invalid src", Pico.video.type, source, a);\r
       return;\r
index bc7cddb..a196fa1 100644 (file)
@@ -26,7 +26,13 @@ static void PicoSVPLine(int count)
 
 static int PicoSVPDma(unsigned int source, int len, unsigned short **srcp, unsigned short **limitp)
 {
-       if ((source & 0xfe0000) == 0x300000)
+       if (source < Pico.romsize) { // Rom
+               source -= 2;
+               *srcp = (unsigned short *)(Pico.rom + (source&~1));
+               *limitp = (unsigned short *)(Pico.rom + Pico.romsize);
+               return 1;
+       }
+       else if ((source & 0xfe0000) == 0x300000)
        {
                elprintf(EL_VDPDMA|EL_SVP, "SVP DmaSlow from %06x, len=%i", source, len);
                source &= 0x1fffe;