diff --git a/build.sh b/build.sh index ba05efd..572c5a5 100755 --- a/build.sh +++ b/build.sh @@ -32,7 +32,7 @@ else fi echo "Assembling.." -./bin/assembler projects/examples/gui.mouse.usm bin/boot.rom +./bin/assembler projects/examples/dev.screen.usm bin/boot.rom echo "Running.." if [ "${2}" = '--cli' ]; diff --git a/src/ppu.c b/src/ppu.c index 907447d..8f23479 100644 --- a/src/ppu.c +++ b/src/ppu.c @@ -130,7 +130,7 @@ putchr(Ppu *p, Uint8 *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color) for(h = 0; h < 8; h++) { Uint8 ch1 = ((sprite[v] >> (7 - h)) & 0x1) * color; Uint8 ch2 = ((sprite[v + 8] >> (7 - h)) & 0x1) * color; - putpixel(p, layer, x + h, y + v, (((ch1 + ch2 * 2) + color - 1) & 0x3)); + putpixel(p, layer, x + h, y + v, (((ch1 + ch2 * 2) + color / 4) & 0x3)); } }