This is the default output, with timing on each instruction plus a return to
the control loop after every instruction.  The PC is kept updated on every instruction.

This is the least efficient version and is mainly for comparing against a
known emulator as it executes instruction by instruction.

(Instructions marked by /**/ are the ones that would be omitted if dead store
 optimisations were enabled.)

Ignore the fact that the actual timing data may be wrong, I haven't started to maintain that yet.

// =============== S U B R O U T I N E =======================================
  case 0x670D:
                                                     mon("L670D    LDX   #$496F                  ; 670D: 8E 49 6F      \n"); // "Bank 1"
    clockticks = clockticks + 3; 
    X = 0x496f; 
/**/Z = X; 
/**/N = (X) >> 8; 
/**/V = 0; 
    PC = 0x6710; JUMP; // sstep
case 0x6710:
                                                     mon("         LDA   #$00                    ; 6710: 86 00         \n");
    clockticks = clockticks + 2; 
    val = (UINT8)0x00; 
    A = val; 
/**/N = val; 
/**/Z = val; 
/**/V = 0; 
    PC = 0x6712; JUMP; // sstep
case 0x6712:
                                                     mon("L6712    STA   ,X+                     ; 6712: A7 80         \n");
    clockticks = clockticks + 6; 
    val = A; 
/**/Z = val; 
/**/N = val; 
/**/V = 0; 
    ea = X; 
    wr_mem(ea, val); 
    X = X + 1; 
    PC = 0x6714; JUMP; // sstep
case 0x6714:
                                                     mon("         CMPX  #$4989                  ; 6714: 8C 49 89      \n");
    clockticks = clockticks + 4; 
    val = X; 
    arg = 0x4989; 
    res = val - arg; 
    C = res & 0x10000; 
    res = (UINT16)res; 
    Z = res; 
    N = res >> 8; 
    V = ((val ^ arg) & (val ^ res)) >> 8; 
    PC = 0x6717; JUMP; // sstep
case 0x6717:
                                                     mon("         BCS   $6712                   ; 6717: 25 F9         \n");
    // temp fix to ensure flags synched
    if (C) {
      clockticks = clockticks + 1; // added by hand for the moment, data is missing from the translator
      PC = 0x6712; 
      JUMP;
    }
    clockticks = clockticks + 3; 
    PC = 0x6719; JUMP; // sstep
case 0x6719:
                                                     mon("         LDA   #$60                    ; 6719: 86 60         \n");
    clockticks = clockticks + 2; 
    val = (UINT8)0x60; 
    A = val; 
/**/N = val; 
/**/Z = val; 
/**/V = 0; 
    PC = 0x671B; JUMP; // sstep
case 0x671B:
                                                     mon("         LSRA                          ; 671B: 44            \n");
    val = (UINT8)A; 
    C = val & 1; 
    val = val >> 1; 
    A = val; 
/**/N = 0; 
/**/Z = val; 
    clockticks = clockticks + 2; 
    PC = 0x671C; JUMP; // sstep
case 0x671C:
                                                     mon("         STA   <$D2                    ; 671C: 97 D2         \n");
    clockticks = clockticks + 4; 
    val = A; 
/**/Z = val; 
/**/N = val; 
/**/V = 0; 
    ea = DP|0xd2; 
    wr_mem(ea, val); 
    PC = 0x671E; JUMP; // sstep
case 0x671E:
                                                     mon("         LDD   #$5300                  ; 671E: CC 53 00      \n");
    clockticks = clockticks + 3; 
    A = 0x53; 
    B = 0x00; 
/**/Z = A|B; 
/**/N = A; 
/**/V = 0; 
    PC = 0x6721; JUMP; // sstep
case 0x6721:
                                                     mon("         STD   <$D4                    ; 6721: DD D4         \n");
    clockticks = clockticks + 4; 
    Z = A | B; 
    N = A; 
    V = 0; 
    ea = DP|0xd4; 
    wr_mem(ea, A); // Care needed with I/O space and word fetches
    wr_mem(ea + 1, B); 
    // End of function sub_670D
    PC = 0x6723; JUMP; // sstep
case 0x6723:
                                                     mon("         RTS                           ; 6723: 39            \n");
    clockticks = clockticks + 5; 
    clockticks = clockticks + 1; 
    PC = rd_mem(S)<<8; 
    S = S + 1; 
    PC = PC | rd_mem(S); 
    S = S + 1; 
    JUMP;
    
Next we move to basic blocks with no return to the dispatch loop between instructions...
We drop the saving of the PC, but still include timing on each instruction.

// =============== S U B R O U T I N E =======================================
  case 0x670D:
L670D:
                                                     mon("L670D    LDX   #$496F                  ; 670D: 8E 49 6F      \n"); // "Bank 1"
    clockticks = clockticks + 3; 
    X = 0x496f; 
 // Z = X; 
 // N = (X) >> 8; 
 // V = 0; 
                                                     mon("         LDA   #$00                    ; 6710: 86 00         \n");
    clockticks = clockticks + 2; 
    val = (UINT8)0x00; 
    A = val; 
 // N = val; 
 // Z = val; 
 // V = 0; 
  case 0x6712:
L6712:
                                                     mon("L6712    STA   ,X+                     ; 6712: A7 80         \n");
    clockticks = clockticks + 6; 
    val = A; 
 // Z = val; 
 // N = val; 
 // V = 0; 
    ea = X; 
    wr_mem(ea, val); 
    X = X + 1; 
                                                     mon("         CMPX  #$4989                  ; 6714: 8C 49 89      \n");
    clockticks = clockticks + 4; 
    val = X; 
    arg = 0x4989; 
    res = val - arg; 
    C = res & 0x10000; 
    res = (UINT16)res; 
    Z = res; 
    N = res >> 8; 
    V = ((val ^ arg) & (val ^ res)) >> 8; 
                                                     mon("         BCS   $6712                   ; 6717: 25 F9         \n");
    // temp fix to ensure flags synched
    if (C) {
      clockticks = clockticks + 1; //  for when the conditional branch is taken.  Again temporarily added by hand
      goto L6712;
    }
    clockticks = clockticks + 3; 
                                                     mon("         LDA   #$60                    ; 6719: 86 60         \n");
    clockticks = clockticks + 2; 
    val = (UINT8)0x60; 
    A = val; 
 // N = val; 
 // Z = val; 
 // V = 0; 
                                                     mon("         LSRA                          ; 671B: 44            \n");
    val = (UINT8)A; 
    C = val & 1; 
    val = val >> 1; 
    A = val; 
 // N = 0; 
 // Z = val; 
    clockticks = clockticks + 2; 
                                                     mon("         STA   <$D2                    ; 671C: 97 D2         \n");
    clockticks = clockticks + 4; 
    val = A; 
 // Z = val; 
 // N = val; 
 // V = 0; 
    ea = DP|0xd2; 
    wr_mem(ea, val); 
                                                     mon("         LDD   #$5300                  ; 671E: CC 53 00      \n");
    clockticks = clockticks + 3; 
    A = 0x53; 
    B = 0x00; 
 // Z = A|B; 
 // N = A; 
 // V = 0; 
                                                     mon("         STD   <$D4                    ; 6721: DD D4         \n");
    clockticks = clockticks + 4; 
    Z = A | B; 
    N = A; 
    V = 0; 
    ea = DP|0xd4; 
    wr_mem(ea, A); // Care needed with I/O space and word fetches
    wr_mem(ea + 1, B); 
    // End of function sub_670D
                                                     mon("         RTS                           ; 6723: 39            \n");
    clockticks = clockticks + 5; 
    clockticks = clockticks + 1; 
    PC = rd_mem(S)<<8; 
    S = S + 1; 
    PC = PC | rd_mem(S); 
    S = S + 1; 
    JUMP;

The next example is exactly the same as above, but the clocktick increments are added up and only output at
the end of basic blocks.  Special handling would be done for conditional branches, where the
ticks are added up and forced out within the "if (test) { ... ; JUMP; }" code but not the drop-through case.

(it's not in the code yet but I've inserted it by hand)
  
// =============== S U B R O U T I N E =======================================
  case 0x670D:
L670D:
                                                     mon("L670D    LDX   #$496F                  ; 670D: 8E 49 6F      \n"); // "Bank 1"
    X = 0x496f; 
 // Z = X; 
 // N = (X) >> 8; 
 // V = 0; 
                                                     mon("         LDA   #$00                    ; 6710: 86 00         \n");
    val = (UINT8)0x00; 
    A = val; 
 // N = val; 
 // Z = val; 
 // V = 0; 
    clockticks = clockticks + 3+2; // individual numbers would be folded into a single constant, this is just to show where the numbers come from)
  case 0x6712:
L6712:
                                                     mon("L6712    STA   ,X+                     ; 6712: A7 80         \n");
    val = A; 
 // Z = val; 
 // N = val; 
 // V = 0; 
    ea = X; 
    wr_mem(ea, val); 
    X = X + 1; 
                                                     mon("         CMPX  #$4989                  ; 6714: 8C 49 89      \n");
    val = X; 
    arg = 0x4989; 
    res = val - arg; 
    C = res & 0x10000; 
    res = (UINT16)res; 
    Z = res; 
    N = res >> 8; 
    V = ((val ^ arg) & (val ^ res)) >> 8; 
                                                     mon("         BCS   $6712                   ; 6717: 25 F9         \n");
    // temp fix to ensure flags synched
    if (C) {
      clockticks = clockticks + 3+2+6+4+1;
      goto L6712;
    }
                                                     mon("         LDA   #$60                    ; 6719: 86 60         \n");
    val = (UINT8)0x60; 
    A = val; 
 // N = val; 
 // Z = val; 
 // V = 0; 
                                                     mon("         LSRA                          ; 671B: 44            \n");
    val = (UINT8)A; 
    C = val & 1; 
    val = val >> 1; 
    A = val; 
 // N = 0; 
 // Z = val; 
                                                     mon("         STA   <$D2                    ; 671C: 97 D2         \n");
    val = A; 
 // Z = val; 
 // N = val; 
 // V = 0; 
    ea = DP|0xd2; 
    wr_mem(ea, val); 
                                                     mon("         LDD   #$5300                  ; 671E: CC 53 00      \n");
    A = 0x53; 
    B = 0x00; 
 // Z = A|B; 
 // N = A; 
 // V = 0; 
                                                     mon("         STD   <$D4                    ; 6721: DD D4         \n");
    Z = A | B; 
    N = A; 
    V = 0; 
    ea = DP|0xd4; 
    wr_mem(ea, A); // Care needed with I/O space and word fetches
    wr_mem(ea + 1, B); 
    // End of function sub_670D
                                                     mon("         RTS                           ; 6723: 39            \n");
    PC = rd_mem(S)<<8; 
    S = S + 1; 
    PC = PC | rd_mem(S); 
    S = S + 1; 
    clockticks = clockticks + 6+4+3+2+2+4+3+4+5+1; 
    JUMP;

If there is a long straight-line section of code that doesn't branch, an update to clockticks and a return to
the dispatch loop can be forced every time the delta clockticks exceeds some threshold, so that interrupt timing
is never off by more than some fixed time period, chosen to be compatible with the game logic (eg a 1/30s interrupts
could be tested every 1/600s without significant delay to the event)
