processor 6502 include vcs.h include macro.h SEG org $F000 VarPf = $80 Reset ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Clear RAM and all TIA registers ldx #0 lda #0 Clear sta 0,x inx bne Clear ;total 9 bytes! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;load test playfield bits LDA #%10001000 STA VarPf StartOfFrame ;///////////////////////////////////////////////// VERTICAL_SYNC ;//////////////////////////////////////////////// ldx #37 ; 37 scanlines of vertical blank... vblankloop sta WSYNC dex bne vblankloop LDA #%00000001 STA CTRLPF LDA #0 STA VBLANK ;draw the viewable screen ldx 192 LDA VarPf LDY #$16 STY COLUPF sta PF0 sta PF1 sta PF2 DrawLoop sta WSYNC dex bne DrawLoop LDA #%01000010 ; Disable TIA Output STA VBLANK ;overscan ;initialize graphics LDA #$00 ; put $00 in A STA WSYNC STA PF0; clear out first playfield section STA PF1; clear out second playfield section STA PF2; clear out third playfield section STA GRP0 ; clear out player graphic 0 STA GRP1 ; clear out player graphic 1 STA ENAM0 ; clear out missile 0 STA ENAM1 ; clear out missile 1 STA ENABL ; clear out ball STA COLUP0 ; set player 0 to black STA COLUP1 ; set player 1 to black STA COLUPF ; set playfield to black STA COLUBK ; set background to black ;end initialize graphics ldx #30 overscanLoop sta WSYNC dex bne overscanLoop JMP StartOfFrame ;this is the end. change origin to the end of the 4k rom org $FFFA TheEnd .word Reset ;NMI;used in 7800? .word Reset ;RESET .word Reset ;IRQ;used in 7800? ;end of file END
thanks,
Jim













