Commodore 64 で 6510 アセンブリを使用して、安定したラスター効果を作成しようとしています。二重 IRQ の原則を使用して、画面上にいくつかのラスター ラインを描画します。通常のスキャンラインごとに 63 サイクル、バッドラインごとに 23 サイクルに一致するように NOP をパディングします。8回目の反復をバッドラインと一致させるために設定する必要がある特定のスタートラインがあることを認識していますが、最初のラインをどのラインに配置したり、使用するNOPの組み合わせに関係なく、適切なタイミング。「壊れていない」完全な行が必要です。誰かが私が間違っていることを見ることができますか? コードは Kick Assembler 形式です。そして、ここにスクリーンショットがあります:

.pc = $0801 "Basic upstart"
:BasicUpstart($8000)
.pc = $8000 "Program"
  jsr $ff81
  sei
  lda #$35
  sta $01
  jsr setupInterrupts
  cli
  jmp *
setupInterrupts:
  lda #<int1
  ldy #>int1
  sta $fffe
  sty $ffff
  lda #$01
  sta $d01a
  lda #$7f
  sta $dc0d
  sta $dd0d
  lda $dc0d  
  lda $dd0d
  lda #$1b
  sta $d011
  lda #$01
  sta $d019
  lda start
  sta $d012
  rts
start:
  .byte 56
int1:
  pha txa pha tya pha
  :STABILIZE()
.for (var i=0; i<7; i++) {
  inc $d020   // 6 cycles
  inc $d021   // 6 cycles
  nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop // 24*2=48 cycles
  bit $ea     // 3 cycles
              // = 63 cycles
}
  inc $d020   // 6 cycles
  inc $d021   // 6 cycles
  nop nop nop nop // 4*2=8 cycles
  bit $ea     // 3 cycles
              // = 23 cycles (badline)
  lda #$00
  sta $d020
  sta $d021
  lda start
  sta $d012
  lda #<int1 
  ldy #>int1 
  sta $fffe
  sty $ffff
  lda #$01
  sta $d019
  pla tay pla tax pla
  rti
.macro STABILIZE() {
  lda #<nextRasterLineIRQ
  sta $fffe
  lda #>nextRasterLineIRQ
  sta $ffff   
  inc $d012
  lda #$01
  sta $d019
  tsx
  cli
  nop nop nop nop nop nop nop nop
nextRasterLineIRQ:
  txs
  ldx #$08
  dex
  bne *-1
  bit $00
  lda $d012
  cmp $d012
  beq *+2      
}