notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for load-state-after-load crash
[picodrive.git]
/
Pico
/
carthw
/
svp
/
Memory.c
diff --git
a/Pico/carthw/svp/Memory.c
b/Pico/carthw/svp/Memory.c
index
29d2efc
..
e835d32
100644
(file)
--- a/
Pico/carthw/svp/Memory.c
+++ b/
Pico/carthw/svp/Memory.c
@@
-1,3
+1,12
@@
+// The SVP chip emulator, mem I/O stuff
+
+// (c) Copyright 2008, Grazvydas "notaz" Ignotas
+// Free for non-commercial use.
+
+// For commercial use, separate licencing terms must be obtained.
+
+
+#include "../../PicoInt.h"
#include "../../PicoInt.h"
#ifndef UTYPES_DEFINED
#include "../../PicoInt.h"
#ifndef UTYPES_DEFINED
@@
-11,7
+20,7
@@
typedef unsigned int u32;
if (d == 0 && SekPc >= pc_start && SekPc < pc_end) \
{ \
if (!clearing_ram) \
if (d == 0 && SekPc >= pc_start && SekPc < pc_end) \
{ \
if (!clearing_ram) \
- elprintf(EL_
UIO
, text); \
+ elprintf(EL_
SVP
, text); \
clearing_ram = 1; \
return; \
}
clearing_ram = 1; \
return; \
}
@@
-57,10
+66,10
@@
unsigned int PicoSVPRead16(unsigned int a, int realsize)
}
}
else
}
}
else
- elprintf(EL_UIO|EL_ANOMALY, "SVP FIXME: unhandled r%i: [%06x] %04x @%06x", realsize, a&0xffffff, d, SekPc);
+ elprintf(EL_UIO|EL_
SVP|EL_
ANOMALY, "SVP FIXME: unhandled r%i: [%06x] %04x @%06x", realsize, a&0xffffff, d, SekPc);
if (!a15004_looping)
if (!a15004_looping)
- elprintf(EL_
UIO
, "SVP r%i: [%06x] %04x @%06x", realsize, a&0xffffff, d, SekPc);
+ elprintf(EL_
SVP
, "SVP r%i: [%06x] %04x @%06x", realsize, a&0xffffff, d, SekPc);
if (a == 0xa15004 && !(d&1)) {
if (!a15004_looping)
if (a == 0xa15004 && !(d&1)) {
if (!a15004_looping)
@@
-69,14
+78,15
@@
unsigned int PicoSVPRead16(unsigned int a, int realsize)
}
else a15004_looping = 0;
}
else a15004_looping = 0;
- // if (a == 0x30fe02) d = 1;
+ //if (a == 0x30fe02 && d == 0)
+ // elprintf(EL_ANOMALY, "SVP lag?");
return d;
}
void PicoSVPWrite8(unsigned int a, unsigned int d, int realsize)
{
return d;
}
void PicoSVPWrite8(unsigned int a, unsigned int d, int realsize)
{
- elprintf(EL_UIO, "!!! SVP w%i: [%06x], %08x @%06x", realsize, a&0xffffff, d, SekPc);
+ elprintf(EL_UIO
|EL_SVP|EL_ANOMALY
, "!!! SVP w%i: [%06x], %08x @%06x", realsize, a&0xffffff, d, SekPc);
}
void PicoSVPWrite16(unsigned int a, unsigned int d, int realsize)
}
void PicoSVPWrite16(unsigned int a, unsigned int d, int realsize)
@@
-98,6
+108,8
@@
void PicoSVPWrite16(unsigned int a, unsigned int d, int realsize)
//else if (a == 0xa15006) svp->ssp1601.gr[SSP_PM0].h = d | (d << 1);
// 0xa15006 probably has 'halt'
}
//else if (a == 0xa15006) svp->ssp1601.gr[SSP_PM0].h = d | (d << 1);
// 0xa15006 probably has 'halt'
}
+ else
+ elprintf(EL_UIO|EL_SVP|EL_ANOMALY, "SVP FIXME: unhandled w%i: [%06x] %04x @%06x", realsize, a&0xffffff, d, SekPc);
if (a == 0x30fe06 && d != 0)
if (a == 0x30fe06 && d != 0)
@@
-113,6
+125,6
@@
void PicoSVPWrite16(unsigned int a, unsigned int d, int realsize)
CLEAR_DETECT(0x0220b0, 0x0220cc, "SVP RAM CLEAR 300000-31ffbf (2) @ 022096");
clearing_ram = 0;
CLEAR_DETECT(0x0220b0, 0x0220cc, "SVP RAM CLEAR 300000-31ffbf (2) @ 022096");
clearing_ram = 0;
- elprintf(EL_
UIO
, "SVP w%i: [%06x] %04x @%06x", realsize, a&0xffffff, d, SekPc);
+ elprintf(EL_
SVP
, "SVP w%i: [%06x] %04x @%06x", realsize, a&0xffffff, d, SekPc);
}
}