In case anyone is trying to do the same (unlikely, I know), the thing that was confusing me was that the 0x61 opcode, which skips to the end of the line, is also required at the end of each line (like a new line character). As such, you don’t need to keep track of the number of tiles in the x direction that have been processed.