From 4c436138e4f9f49726352c34499a2de76a7c1c79 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 14 Jul 2008 14:59:49 +0000 Subject: [PATCH] stupid sprite limit bug fixed git-svn-id: file:///home/notaz/opt/svn/PicoDrive@544 be3aeb3a-fb24-0410-a615-afba39da0efa --- Pico/Draw.c | 4 ++-- Pico/VideoPort.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Pico/Draw.c b/Pico/Draw.c index c076624..d3d80ff 100644 --- a/Pico/Draw.c +++ b/Pico/Draw.c @@ -958,7 +958,7 @@ void PrepareSprites(int full) { int pack; // updates: tilecode, sx - for (u=0; u < max_lines && (pack = *pd); u++, pd+=2) + for (u=0; u < max_sprites && (pack = *pd); u++, pd+=2) { unsigned int *sprite; int code2, sx, sy, height; @@ -1010,7 +1010,7 @@ found:; for (u = 0; u < max_lines; u++) *((int *)&HighLnSpr[u][0]) = 0; - for (u = 0; u < max_lines; u++) + for (u = 0; u < max_sprites; u++) { unsigned int *sprite; int code, code2, sx, sy, hv, height, width; diff --git a/Pico/VideoPort.c b/Pico/VideoPort.c index 7852b25..3663732 100644 --- a/Pico/VideoPort.c +++ b/Pico/VideoPort.c @@ -364,7 +364,8 @@ PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d) SekCyclesBurn(32); // penalty // 488/12-8 if (SekCycleCnt>=SekCycleAim) SekEndRun(0); } - elprintf(EL_ASVDP, "VDP data write: %04x {%i} #%i @ %06x", d, Pico.video.type, pvid->lwrite_cnt, SekPc); + elprintf(EL_ASVDP, "VDP data write: %04x [%06x] {%i} #%i @ %06x", d, Pico.video.addr, + Pico.video.type, pvid->lwrite_cnt, SekPc); } VideoWrite(d); } @@ -410,6 +411,7 @@ PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d) update_irq = 1; break; case 0x05: + //elprintf(EL_STATUS, "spritep moved to %04x", (unsigned)(Pico.video.reg[5]&0x7f) << 9); if (d^dold) rendstatus |= PDRAW_SPRITES_MOVED; break; case 0x0c: -- 2.39.2