Ok so what changed from last time? mostly ppu changes
first of all, i fixed the input bug that prevented most games from being playable by treating writes to the input register P1 as queries and internally saving the state of the input until it’s queried in which case P1 is updated with the state in the “Joypad” struct.
then I made 3 changes to the PPU, I started by fixing bugs here and there in the background layer by introducing a simpler drawing pipeline (instead of looping over tiles we loop over pixels and calculate what tile we are in and do modulo 8 to get the tile column), introduced correct LYC and H-Blank interrupts (too long to discuss here) and all these changes fixed a lot of things that were broken from last time.
then i turned my attention to drawing the window layer, took a while to figure out because i kept confusing tile indices with pixel indices but eventually figured it out, and the window layer now works perfectly (hopefully anyways).
anyways next i noticed how blurry the image from the emulator got from scaling and remembered a teckquickie video talking about scaling algorithms and how nearest neighbor was the best for pixel art so i changed the scaling algo that SDL used to nearest neighbor and now the picture is very sharp and clear.
and finally, refactored sprites to use that simpler drawing pipeline i mentioned which resulted in a bug being fixed (sprites at the very left edge were being clipped).
now i will go figure out how gameboy audio works then come back to the missing PPU features later.
bye :>
Log in to leave a comment