notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
handle 'bad' dma better
[picodrive.git]
/
pico
/
videoport.c
diff --git
a/pico/videoport.c
b/pico/videoport.c
index
b5e3f86
..
9def819
100644
(file)
--- a/
pico/videoport.c
+++ b/
pico/videoport.c
@@
-100,7
+100,7
@@
static void DmaSlow(int len, unsigned int source)
Pico.video.type, source, a, len, inc, (Pico.video.status&8)||!(Pico.video.reg[1]&0x40),
\r
SekCyclesDone(), SekPc);
\r
\r
Pico.video.type, source, a, len, inc, (Pico.video.status&8)||!(Pico.video.reg[1]&0x40),
\r
SekCyclesDone(), SekPc);
\r
\r
- Pico.m.dma_xfers
+
= len;
\r
+ Pico.m.dma_xfers = len;
\r
if (Pico.m.dma_xfers < len) // lame 16bit var
\r
Pico.m.dma_xfers = ~0;
\r
SekCyclesBurnRun(CheckDMA());
\r
if (Pico.m.dma_xfers < len) // lame 16bit var
\r
Pico.m.dma_xfers = ~0;
\r
SekCyclesBurnRun(CheckDMA());
\r
@@
-109,7
+109,7
@@
static void DmaSlow(int len, unsigned int source)
base = (u16 *)PicoMem.ram;
\r
mask = 0xffff;
\r
}
\r
base = (u16 *)PicoMem.ram;
\r
mask = 0xffff;
\r
}
\r
- else if (PicoAHW & PAHW_MCD)
\r
+ else if (Pico
In.
AHW & PAHW_MCD)
\r
{
\r
u8 r3 = Pico_mcd->s68k_regs[3];
\r
elprintf(EL_VDPDMA, "DmaSlow CD, r3=%02x", r3);
\r
{
\r
u8 r3 = Pico_mcd->s68k_regs[3];
\r
elprintf(EL_VDPDMA, "DmaSlow CD, r3=%02x", r3);
\r
@@
-225,10
+225,10
@@
static void DmaCopy(int len)
int source;
\r
elprintf(EL_VDPDMA, "DmaCopy len %i [%u]", len, SekCyclesDone());
\r
\r
int source;
\r
elprintf(EL_VDPDMA, "DmaCopy len %i [%u]", len, SekCyclesDone());
\r
\r
- Pico.m.dma_xfers
+
= len;
\r
+ Pico.m.dma_xfers = len;
\r
if (Pico.m.dma_xfers < len)
\r
Pico.m.dma_xfers = ~0;
\r
if (Pico.m.dma_xfers < len)
\r
Pico.m.dma_xfers = ~0;
\r
- Pico.video.status |=
2; // dma busy
\r
+ Pico.video.status |=
SR_DMA;
\r
\r
source =Pico.video.reg[0x15];
\r
source|=Pico.video.reg[0x16]<<8;
\r
\r
source =Pico.video.reg[0x15];
\r
source|=Pico.video.reg[0x16]<<8;
\r
@@
-256,10
+256,10
@@
static NOINLINE void DmaFill(int data)
len = GetDmaLength();
\r
elprintf(EL_VDPDMA, "DmaFill len %i inc %i [%u]", len, inc, SekCyclesDone());
\r
\r
len = GetDmaLength();
\r
elprintf(EL_VDPDMA, "DmaFill len %i inc %i [%u]", len, inc, SekCyclesDone());
\r
\r
- Pico.m.dma_xfers
+
= len;
\r
+ Pico.m.dma_xfers = len;
\r
if (Pico.m.dma_xfers < len) // lame 16bit var
\r
Pico.m.dma_xfers = ~0;
\r
if (Pico.m.dma_xfers < len) // lame 16bit var
\r
Pico.m.dma_xfers = ~0;
\r
- Pico.video.status |=
2; // dma busy
\r
+ Pico.video.status |=
SR_DMA;
\r
\r
switch (Pico.video.type)
\r
{
\r
\r
switch (Pico.video.type)
\r
{
\r
@@
-306,6
+306,10
@@
static NOINLINE void CommandDma(void)
\r
if ((pvid->reg[1]&0x10)==0) return; // DMA not enabled
\r
\r
\r
if ((pvid->reg[1]&0x10)==0) return; // DMA not enabled
\r
\r
+ if (Pico.m.dma_xfers)
\r
+ elprintf(EL_VDPDMA|EL_ANOMALY, "Dma overlap, left=%d @ %06x",
\r
+ Pico.m.dma_xfers, SekPc);
\r
+
\r
len = GetDmaLength();
\r
source =Pico.video.reg[0x15];
\r
source|=Pico.video.reg[0x16] << 8;
\r
len = GetDmaLength();
\r
source =Pico.video.reg[0x15];
\r
source|=Pico.video.reg[0x16] << 8;
\r
@@
-346,8
+350,8
@@
static NOINLINE void CommandChange(void)
\r
static void DrawSync(int blank_on)
\r
{
\r
\r
static void DrawSync(int blank_on)
\r
{
\r
- if (Pico.m.scanline < 224 && !(Pico
O
pt & POPT_ALT_RENDERER) &&
\r
- !Pico
S
kipFrame && Pico.est.DrawScanline <= Pico.m.scanline) {
\r
+ if (Pico.m.scanline < 224 && !(Pico
In.o
pt & POPT_ALT_RENDERER) &&
\r
+ !Pico
In.s
kipFrame && Pico.est.DrawScanline <= Pico.m.scanline) {
\r
//elprintf(EL_ANOMALY, "sync");
\r
PicoDrawSync(Pico.m.scanline, blank_on);
\r
}
\r
//elprintf(EL_ANOMALY, "sync");
\r
PicoDrawSync(Pico.m.scanline, blank_on);
\r
}
\r
@@
-376,7
+380,7
@@
PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d)
pvid->pending=0;
\r
}
\r
\r
pvid->pending=0;
\r
}
\r
\r
- if (!(pvid->status & SR_VB) && !(Pico
O
pt&POPT_DIS_VDP_FIFO))
\r
+ if (!(pvid->status & SR_VB) && !(Pico
In.o
pt&POPT_DIS_VDP_FIFO))
\r
{
\r
int use = pvid->type == 1 ? 2 : 1;
\r
pvid->lwrite_cnt -= use;
\r
{
\r
int use = pvid->type == 1 ? 2 : 1;
\r
pvid->lwrite_cnt -= use;
\r