Permalink
Browse files

Fix up sprite bug

  • Loading branch information...
mattgodbolt committed Jul 6, 2011
1 parent 7c3cb78 commit 00815f8ed8b20c3d5bd360723996cd899d837c18
Showing with 2 additions and 3 deletions.
  1. +1 −1 miracle.html
  2. +1 −2 vdp.js
View
@@ -72,7 +72,7 @@
function frame() {
var vdp_status = 0;
while ((vdp_status & 2) == 0) {
- event_next_event = 220; // TASK: not 220?
+ event_next_event = 220; // TODO: not 220?
tstates -= 220;
z80_do_opcodes();
vdp_status = vdp_hblank();
View
3 vdp.js
@@ -125,7 +125,7 @@ function findSprites(line) {
}
if (line >= y && line < (y + spriteHeight)) {
if (active.length === 8) {
- vdp_status |= 64; // TASK: and also on opaque overlap?
+ vdp_status |= 0x40; // Sprite overflow
break;
}
active.push([vram[spriteInfo + 128 + i * 2],
@@ -300,7 +300,6 @@ function vdp_hblank() {
rasterize_line(vdp_current_line - firstDisplayLine);
if (--vdp_hblank_counter < 0) {
vdp_hblank_counter = vdp_regs[10];
- vdp_status |= 64;
if (vdp_regs[0] & 16) {
needIrq |= 1;
}

0 comments on commit 00815f8

Please sign in to comment.