After a week of tiresome debugging of assembly code I found the disassembler defect that caused the sprite rendering function to skip a big part of the code.