I'm not nearly good enough at 6502 assembly for that XD
C is also a solution. There's also NESMaker out there.