src/ppu.c
void render_pixel(){
    static uint colour;
    colour = current_bg_data[TILE_WIDTH * (current_scanline % TILE_WIDTH ) + current_cycle_scanline % TILE_WIDTH];
    ppu_back_buffer[NES_PPU_TEXTURE_HEIGHT * current_scanline + current_cycle_scanline] = colour;
}
/**
 * So here's the deal. We've got a array representing the current background data, I know it's 8x8 and it doesn't need
 * to be since it only represents a scanline....  but hey, ship it :D
 *
 * We get the current scanline and the current cycle within the scanline %8 and that gives us the local coordinate
 * to display in the screen which is given by the current scanline and the cycle within the scanline
 */
So here's the deal. We've got a array representing the current background data, I know it's 8x8 and it doesn't need
to be since it only represents a scanline....  but hey, ship it :D

We get the current scanline and the current cycle within the scanline %8 and that gives us the local coordinate
to display in the screen which is given by the current scanline and the cycle within the scanline
So here ' s the deal . We ' ve got a array representing the current background data I know it ' s 8x8 and it doesn ' t need to be since it only represents a scanline .... but hey ship it : D We get the current scanline and the current cycle within the scanline %8 and that gives us the local coordinate to display in the screen which is given by the current scanline and the cycle within the scanline
void render_pixel(){
    static uint colour;
    colour = current_bg_data[TILE_WIDTH * (current_scanline % TILE_WIDTH ) + current_cycle_scanline % TILE_WIDTH];
    ppu_back_buffer[NES_PPU_TEXTURE_HEIGHT * current_scanline + current_cycle_scanline] = colour;
}
void render_pixel ( ) { static uint colour ; colour = current_bg_data [ TILE_WIDTH * ( current_scanline % TILE_WIDTH ) + current_cycle_scanline % TILE_WIDTH ] ; ppu_back_buffer [ NES_PPU_TEXTURE_HEIGHT * current_scanline + current_cycle_scanline ] = colour ; }
So here's the deal.
So here ' s the deal .