2018-08-13 22:17:36 +00:00
|
|
|
|
2016-12-16 01:21:51 +00:00
|
|
|
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?
|
2018-08-27 00:22:50 +00:00
|
|
|
; 1 + 3 lines of VSYNC
|
2016-12-16 01:21:51 +00:00
|
|
|
VERTICAL_SYNC
|
|
|
|
; 37 lines of underscan
|
|
|
|
TIMER_SETUP 37
|
|
|
|
TIMER_WAIT
|
|
|
|
; 192 lines of frame
|
|
|
|
TIMER_SETUP 192
|
|
|
|
TIMER_WAIT
|
2018-08-27 00:22:50 +00:00
|
|
|
; 29 lines of overscan
|
|
|
|
TIMER_SETUP 29
|
2016-12-16 01:21:51 +00:00
|
|
|
TIMER_WAIT
|
2018-08-27 00:22:50 +00:00
|
|
|
; total = 262 lines, go to next frame
|
2016-12-16 01:21:51 +00:00
|
|
|
jmp NextFrame
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; Epilogue
|
|
|
|
|
|
|
|
org $fffc
|
|
|
|
.word Start ; reset vector
|
|
|
|
.word Start ; BRK vector
|