1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-26 10:49:17 +00:00
8bitworkshop/test/ecs/vcs1.txt
2022-02-24 13:31:09 -06:00

209 lines
3.5 KiB
Plaintext

EVENT__start = 1
EVENT__nextframe = 1
EVENT__resetswitch = 1
EVENT__preframe = 1
EVENT__kernel = 1
EVENT__kernelsetup = 1
EVENT__postframe = 1
EVENT__joybutton = 1
.scope Main
.zeropage
PFColor_pfcolor_b0:
.res 1
.res 1
TEMP:
Local__6__tmp:
.res 1
.code
KernelSection_lines_b0:
.byte 2
.byte 2
.byte 2
.byte 2
.byte 10
.byte 50
.byte 50
.byte 10
BGColor_bgcolor_b0:
.byte 24
.byte 22
.byte 20
.byte 18
.byte 20
.byte 20
.byte 22
.byte 24
Playfield_pf_b0:
.byte 68
.byte 68
.byte 36
.byte 0
Playfield_pf_b8:
.byte 82
.byte 34
.byte 1
.byte 0
Playfield_pf_b16:
.byte 18
.byte 17
.byte 0
.byte 0
Main__INITDATA:
.byte 0
.byte 0
__Start:
;;; start action Init__main_init__1
.include "vcs-ca65.h"
.define PAL 0
__NMI:
__Reset:
__BRK:
CLEAN_START
ldy #2
: lda Main__INITDATA-1,y
sta PFColor_pfcolor_b0-1,y
dey
bne :-
;;; start action FrameLoop__start__2
FrameLoop__start__2__NextFrame:
FRAME_START
;;; start action StaticKernel__preframe__3
;;; start action StaticKernel__kernelsetup__4
lda #24
sta COLUBK
;;; end action StaticKernel__kernelsetup__4
;;; start action StaticKernel__kernelsetup__5
;;; end action StaticKernel__kernelsetup__5
;;; start action StaticKernel__kernelsetup__6
;;; end action StaticKernel__kernelsetup__6
;;; end action StaticKernel__preframe__3
KERNEL_START
;;; start action StaticKernel__kernel__7
ldx #0
StaticKernel__kernel__7____each:
sta WSYNC
;;; start action StaticKernel__kernelsetup__8
lda BGColor_bgcolor_b0,x
sta COLUBK
;;; end action StaticKernel__kernelsetup__8
;;; start action StaticKernel__kernelsetup__9
cpx #5+2
jcs StaticKernel__kernelsetup__9____skipxhi
cpx #5
jcc StaticKernel__kernelsetup__9____skipxlo
lda PFColor_pfcolor_b0-5,x
sta COLUPF
StaticKernel__kernelsetup__9____skipxlo:
StaticKernel__kernelsetup__9____skipxhi:
;;; end action StaticKernel__kernelsetup__9
;;; start action StaticKernel__kernelsetup__10
cpx #4
jcc StaticKernel__kernelsetup__10____skipxlo
lda Playfield_pf_b0-4,x
sta PF0
lda Playfield_pf_b8-4,x
sta PF1
lda Playfield_pf_b16-4,x
sta PF2
StaticKernel__kernelsetup__10____skipxlo:
;;; end action StaticKernel__kernelsetup__10
ldy KernelSection_lines_b0,x
StaticKernel__kernel__7__loop:
sta WSYNC
dey
bne StaticKernel__kernel__7__loop
inx
cpx #8
jne StaticKernel__kernel__7____each
StaticKernel__kernel__7____exit:
;;; end action StaticKernel__kernel__7
KERNEL_END
;;; start action JoyButton__postframe__11
lda INPT4 ;read button input
bmi JoyButton__postframe__11__NotPressed
;;; start action Local__joybutton__12
inc Local__6__tmp+0
inc PFColor_pfcolor_b0
;;; end action Local__joybutton__12
JoyButton__postframe__11__NotPressed:
;;; end action JoyButton__postframe__11
FRAME_END
;;; start action ResetSwitch__nextframe__13
lsr SWCHB ; test Game Reset switch
bcs ResetSwitch__nextframe__13__NoStart
;;; start action ResetConsole__resetswitch__14
jmp Main::__Reset ; jump to Reset handler
;;; end action ResetConsole__resetswitch__14
ResetSwitch__nextframe__13__NoStart:
;;; end action ResetSwitch__nextframe__13
jmp FrameLoop__start__2__NextFrame ; loop to next frame
;;; end action FrameLoop__start__2
; start main routine
.segment "VECTORS"
Return: .word $6060
VecNMI:
VecReset: .word Main::__Reset
VecBRK: .word Main::__BRK
;;; end action Init__main_init__1
.endscope
Main__Start = Main::__Start