mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-18 18:07:35 +00:00
46 lines
840 B
Plaintext
46 lines
840 B
Plaintext
processor 6502
|
|
include "vcs.h"
|
|
include "macro.h"
|
|
include "xmacro.h"
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; Variables segment
|
|
|
|
seg.u Variables
|
|
org $80
|
|
|
|
Temp .byte
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; Code segment
|
|
|
|
seg Code
|
|
org $f000
|
|
|
|
Start
|
|
CLEAN_START
|
|
|
|
NextFrame
|
|
lsr SWCHB ; test Game Reset switch
|
|
bcc Start ; reset?
|
|
; 3 lines of VSYNC
|
|
VERTICAL_SYNC
|
|
; 37 lines of underscan
|
|
TIMER_SETUP 37
|
|
TIMER_WAIT
|
|
; 192 lines of frame
|
|
TIMER_SETUP 192
|
|
TIMER_WAIT
|
|
; 30 lines of overscan
|
|
TIMER_SETUP 30
|
|
TIMER_WAIT
|
|
; go to next frame
|
|
jmp NextFrame
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; Epilogue
|
|
|
|
org $fffc
|
|
.word Start ; reset vector
|
|
.word Start ; BRK vector
|