So the IRQ is triggered exactly at the scanline's begining (Nintendulator does this a bit early, I think)
Whow, your timing demo is *very* impressive, you get a code that jump to itself at a specific place to have a exactly # of clock cycles !!
But I don't got exactly how works macros...
Ah, you're able to trigger an hardware IRQ every scanline, I see. Interessing (but software $5204 checking is much easier I found)
Note : With a red color this could look a cool flame (warping borders will look normal).
Note 2 : Instead of (jmp here) loops you shold try to do something like (bcc here), so this instruction take 3 cycles intead of 6 and can fix the warp thing a lot.
Note 3 : When you're doing the "sta $2001" instruction, it'll take 4 cycles (I think 1 to fetch opcode, 2 to fetch adress and 1 to write the actual data to the bus). So the actual write will be at the 4th cycle of "sta" instruction, right ?
Long live to Chrono Trigger !