X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fcarthw%2Fsvp%2Fssp16.c;h=99a496d85a4543f0f146a09774d3733b269c24f1;hb=e122fae6f47c4ca4fce5a178d6d2055b3cef6423;hp=c3714924c3c8da3e920cb59f7402cdc48cfd46d1;hpb=e477f8f74fb04f920d1d381df6c2d337c58f3ab1;p=picodrive.git diff --git a/Pico/carthw/svp/ssp16.c b/Pico/carthw/svp/ssp16.c index c371492..99a496d 100644 --- a/Pico/carthw/svp/ssp16.c +++ b/Pico/carthw/svp/ssp16.c @@ -374,9 +374,6 @@ static int g_cycles; static int running = 0; static int last_iram = 0; #endif -#ifdef EMBED_INTERPRETER -static int iram_dirty = 0; -#endif // ----------------------------------------------------- // register i/o handlers @@ -454,7 +451,7 @@ static int get_inc(int mode) return inc; } -#define overwite_write(dst, d) \ +#define overwrite_write(dst, d) \ { \ if (d & 0xf000) { dst &= ~0xf000; dst |= d & 0xf000; } \ if (d & 0x0f00) { dst &= ~0x0f00; dst |= d & 0x0f00; } \ @@ -508,7 +505,7 @@ static u32 pm_io(int reg, int write, u32 d) elprintf(EL_SVP, "ssp PM%i DRAM w [%06x] %04x (inc %i, ovrw %i)", reg, CADDR, d, inc, (mode>>10)&1); if (mode & 0x0400) { - overwite_write(dram[addr], d); + overwrite_write(dram[addr], d); } else dram[addr] = d; ssp->pmac_write[reg] += inc; } @@ -517,7 +514,7 @@ static u32 pm_io(int reg, int write, u32 d) elprintf(EL_SVP, "ssp PM%i DRAM w [%06x] %04x (cell inc, ovrw %i) @ %04x", reg, CADDR, d, (mode>>10)&1, GET_PPC_OFFS()); if (mode & 0x0400) { - overwite_write(dram[addr], d); + overwrite_write(dram[addr], d); } else dram[addr] = d; ssp->pmac_write[reg] += (addr&1) ? 31 : 1; } @@ -530,7 +527,7 @@ static u32 pm_io(int reg, int write, u32 d) ((unsigned short *)svp->iram_rom)[addr&0x3ff] = d; ssp->pmac_write[reg] += inc; #ifdef EMBED_INTERPRETER - iram_dirty = 1; + ssp->drc.iram_dirty = 1; #endif } else @@ -721,10 +718,9 @@ static void write_PMC(u32 d) // 15 static u32 read_AL(void) { - if (*(PC-1) == 0x000f) { + if (*(PC-1) == 0x000f) elprintf(EL_SVP, "ssp dummy PM assign %08x @ %04x", rPMC.v, GET_PPC_OFFS()); - ssp->emu_status &= ~(SSP_PMC_SET|SSP_PMC_HAVE_ADDR); // ? - } + ssp->emu_status &= ~(SSP_PMC_SET|SSP_PMC_HAVE_ADDR); // ? return rAL; }