processor 6502 include "../vcs.h" include "../macro.h" SEG ORG $F000 Reset CLEAN_START StartOfFrame ; VSync + VBlank ;--------------- LDA #2 ; VSync D1 = 1 STA VSYNC ; 3 scanlines of VSync signal... STA WSYNC STA WSYNC STA WSYNC LDA #0 ; VSync D1 = 0 STA VSYNC LDA #2 ; VBlank D1 = 1 STA VBLANK ; 37 scanlines of vertical blank... LDX #37 VerticalBlank STA WSYNC DEX BNE VerticalBlank LDA #0 ; VBlank D1 = 0 STA VBLANK ; 242 scanlines of picture... ;---------------------------- Picture LDX #0 REPEAT 242 ; this will copy instead of creating a loop INX STX COLUBK STA WSYNC REPEND ; Overscan ---------- LDX #30 ; 30 scanlines Overscan STA WSYNC DEX BNE Overscan JMP StartOfFrame ; starting the next frame ; Subroutines & Gfx & Sfx & Other data ;------------------------------------- ;... ; End of 4k ;---------- ORG $FFFA .word Reset ; NMI .word Reset ; RESET .word Reset ; IRQ END