X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fcarthw%2Fsvp%2FMemory.c;fp=Pico%2Fcarthw%2Fsvp%2FMemory.c;h=1dcaedbd64c43589daf2bc1447972d9fe016f65e;hb=5de27868df4df82d38901a804ec6fb32eb6ab5a6;hp=84d942c29b2991f9892978d1efabcb00d04c84f4;hpb=017512f2823405ea2d02fa04b4c0754d7c4cba65;p=picodrive.git diff --git a/Pico/carthw/svp/Memory.c b/Pico/carthw/svp/Memory.c index 84d942c..1dcaedb 100644 --- a/Pico/carthw/svp/Memory.c +++ b/Pico/carthw/svp/Memory.c @@ -21,7 +21,7 @@ unsigned int PicoSVPRead16(unsigned int a, int realsize) unsigned int d = 0; if ((a & 0xfe0000) == 0x300000) - *(u16 *)(svp->ram + (a&0x1fffe)) = d; + d = *(u16 *)(svp->dram + (a&0x1fffe)); elprintf(EL_UIO, "SVP r%i: [%06x] %04x @%06x", realsize, a&0xffffff, d, SekPc); @@ -40,7 +40,7 @@ void PicoSVPWrite16(unsigned int a, unsigned int d, int realsize) static int clearing_ram = 0; if ((a & 0xfe0000) == 0x300000) - *(u16 *)(svp->ram + (a&0x1fffe)) = d; + *(u16 *)(svp->dram + (a&0x1fffe)) = d; // debug: detect RAM clears.. CLEAR_DETECT(0x0221dc, 0x0221f0, "SVP RAM CLEAR (1)"); @@ -49,5 +49,9 @@ void PicoSVPWrite16(unsigned int a, unsigned int d, int realsize) clearing_ram = 0; elprintf(EL_UIO, "SVP w%i: [%06x], %04x @%06x", realsize, a&0xffffff, d, SekPc); + + // just guessing here + if (a == 0xa15002) svp->ssp1601.gr[SSP_XST].h = d; + else if (a == 0xa15006) svp->ssp1601.gr[SSP_PM0].h = d; }