1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-14 22:05:24 +00:00
8bitworkshop/test/ecs/vcslib.txt

208 lines
3.4 KiB
Plaintext
Raw Normal View History

.scope Main
.zeropage
PFColor_pfcolor_b0:
.res 1
.res 1
TEMP:
2022-02-17 15:58:13 +00:00
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 7 main_init
.include "vcs-ca65.h"
.macpack longbranch
.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 1 start
FrameLoop__start__2__NextFrame:
FRAME_START
;;; start action StaticKernel 4 preframe
;;; start action StaticKernel 4 kernelsetup
lda #24
sta COLUBK
;;; end action StaticKernel 4 kernelsetup
;;; start action StaticKernel 4 kernelsetup
;;; end action StaticKernel 4 kernelsetup
;;; start action StaticKernel 4 kernelsetup
;;; end action StaticKernel 4 kernelsetup
;;; end action StaticKernel 4 preframe
KERNEL_START
;;; start action StaticKernel 4 kernel
ldx #0
2022-02-17 18:52:13 +00:00
StaticKernel__kernel__7____each:
sta WSYNC
;;; start action StaticKernel 4 kernelsetup
lda BGColor_bgcolor_b0,x
sta COLUBK
;;; end action StaticKernel 4 kernelsetup
;;; start action StaticKernel 4 kernelsetup
cpx #5+2
2022-02-17 18:52:13 +00:00
jcs StaticKernel__kernelsetup__9____skipxhi
cpx #5
2022-02-17 18:52:13 +00:00
jcc StaticKernel__kernelsetup__9____skipxlo
lda PFColor_pfcolor_b0-5,x
sta COLUPF
2022-02-17 18:52:13 +00:00
StaticKernel__kernelsetup__9____skipxlo:
2022-02-17 18:52:13 +00:00
StaticKernel__kernelsetup__9____skipxhi:
;;; end action StaticKernel 4 kernelsetup
;;; start action StaticKernel 4 kernelsetup
cpx #4
2022-02-17 18:52:13 +00:00
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
2022-02-17 18:52:13 +00:00
StaticKernel__kernelsetup__10____skipxlo:
;;; end action StaticKernel 4 kernelsetup
;;; start action StaticKernel 4 kerneldraw
ldy KernelSection_lines_b0,x
2022-02-17 18:52:13 +00:00
StaticKernel__kerneldraw__11__loop:
sta WSYNC
dey
2022-02-17 18:52:13 +00:00
bne StaticKernel__kerneldraw__11__loop
;;; end action StaticKernel 4 kerneldraw
inx
cpx #8
2022-02-17 18:52:13 +00:00
jne StaticKernel__kernel__7____each
StaticKernel__kernel__7____exit:
;;; end action StaticKernel 4 kernel
KERNEL_END
;;; start action JoyButton 5 postframe
lda INPT4 ;read button input
2022-02-17 18:52:13 +00:00
bmi JoyButton__postframe__12__NotPressed
;;; start action Local 6 joybutton
inc Local__6__tmp+0
inc PFColor_pfcolor_b0
;;; end action Local 6 joybutton
2022-02-17 18:52:13 +00:00
JoyButton__postframe__12__NotPressed:
;;; end action JoyButton 5 postframe
FRAME_END
;;; start action ResetSwitch 2 nextframe
lsr SWCHB ; test Game Reset switch
2022-02-17 18:52:13 +00:00
bcs ResetSwitch__nextframe__14__NoStart
;;; start action ResetConsole 3 resetswitch
jmp Main::__Reset ; jump to Reset handler
;;; end action ResetConsole 3 resetswitch
2022-02-17 18:52:13 +00:00
ResetSwitch__nextframe__14__NoStart:
;;; end action ResetSwitch 2 nextframe
jmp FrameLoop__start__2__NextFrame ; loop to next frame
;;; end action FrameLoop 1 start
; start main routine
.segment "VECTORS"
Return: .word $6060
VecNMI:
VecReset: .word Main::__Reset
VecBRK: .word Main::__BRK
;;; end action Init 7 main_init
.endscope
Main__Start = Main::__Start