Excuse my probably mistake-full question. Im learning to make games for Atari 2600 for fun.
So this is my code:
; Welcome 
    processor 6502
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; include your macros 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    include "vcs.h"
    include "macro.h"
        
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; variable declaration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; cleaning memor
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    seg code 
    org $F000
Reset:
    CLEAN_START
    lda #$68  ; load color into A reg
    sta COLUBK  ; store A to bg color address ....> #09 
    lda #22
    sta COLUPF
        
        
        
        
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; frame
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Frame:
    ldx #2
    stx VSYNC
    stx VBLANK
  
; lets do a loop for VSYNC 
    ldy #3 
vsync_loop:
    sty WSYNC 
    dey 
    bne vsync_loop
    sty VSYNC
        
    REPEAT 37
        sta WSYNC
    REPEND 
    lda #0 
    sta VBLANK
        
    ; nada in visible lines for now
    REPEAT 192
        sta WSYNC
    REPEND
        
    ; overscan - 30 lines
    lda #2
    sta VBLANK
    REPEAT 30       
        sta WSYNC
    REPEND 
    lda #0 
    sta VBLANK
        
        
    
        
    jmp Frame
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; filling the ROM size
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    org $FFFC
    .word Frame
    .word Frame
        
It is incomplete. Could you explain why it matters that I should change the two "Frame" in the end with "Reset"?
When I do this, then I can see my background color appear. if I don't its pitch black. I thought we can fill the ROM in the end with any memory reference, or anything that is worth that amount of bytes.
Thank you.
 
                        
At the end of its memory map, the 6502 (and variants) has a vector table, at addresses
$FFFA-$FFFF:When one of those conditions happens, the processor reads an address from the corresponding location, and begins execution at that address (in addition to pushing some state depending on the reason for doing this).
The lines
Mean that the reset and interrupt vectors are both
Frame. However, on reset, you'd want to run initialization code, not run the next frame code.Instead, these lines should likely be
so that the
Resetis called on reset. It's not clear that it's appropriate to callFrameon interrupt.Instead, you may want to add dummy interrupt routines for
IRQandNMIuntil you want to use them:and adding routines that simply return from interrupt.