1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-28 23:49:20 +00:00
8bitworkshop/test/ecs/vcslib.txt

242 lines
4.0 KiB
Plaintext
Raw Normal View History

2022-02-23 17:16:47 +00:00
EVENT__start = 1
2022-02-28 01:46:26 +00:00
EVENT__postframe = 1
2022-02-23 17:16:47 +00:00
EVENT__resetswitch = 1
2022-02-28 01:46:26 +00:00
EVENT__wsync = 1
2022-02-23 17:16:47 +00:00
EVENT__preframe = 1
EVENT__kernel = 1
EVENT__kerneldraw = 1
EVENT__kernelsetup = 1
EVENT__joybutton = 1
.scope Main
.zeropage
PFColor_pfcolor_b0:
.res 1
.res 1
TEMP:
2022-02-28 01:46:26 +00:00
Local__5__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:
2022-02-23 14:43:19 +00:00
;;; start action Init__main_init__1
.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 :-
2022-02-27 15:31:09 +00:00
;;; start action FrameLoop__start__3
2022-02-28 01:46:26 +00:00
2022-02-27 15:31:09 +00:00
FrameLoop__start__4__NextFrame:
2022-02-28 01:46:26 +00:00
FRAME_END
FRAME_START
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__preframe__5
;;; start action StandardKernel__wsync__8
sta WSYNC
;;; end action StandardKernel__wsync__8
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__kernelsetup__10
lda #24
sta COLUBK
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__kernelsetup__10
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__kernelsetup__13
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__kernelsetup__13
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__kernelsetup__14
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__kernelsetup__14
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__preframe__5
2022-02-28 01:46:26 +00:00
KERNEL_START
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__kernel__15
ldx #0
2022-02-28 01:46:26 +00:00
StandardKernel__kernel__16____each:
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__wsync__18
sta WSYNC
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__wsync__18
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__kernelsetup__20
lda BGColor_bgcolor_b0,x
sta COLUBK
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__kernelsetup__20
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__kernelsetup__23
cpx #5+2
2022-02-28 01:46:26 +00:00
jcs StandardKernel__kernelsetup__24____skipxhi
cpx #5
2022-02-28 01:46:26 +00:00
jcc StandardKernel__kernelsetup__24____skipxlo
lda PFColor_pfcolor_b0-5,x
sta COLUPF
2022-02-28 01:46:26 +00:00
StandardKernel__kernelsetup__24____skipxlo:
2022-02-28 01:46:26 +00:00
StandardKernel__kernelsetup__24____skipxhi:
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__kernelsetup__23
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__kernelsetup__26
cpx #4
2022-02-28 01:46:26 +00:00
jcc StandardKernel__kernelsetup__27____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-28 01:46:26 +00:00
StandardKernel__kernelsetup__27____skipxlo:
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__kernelsetup__26
2022-02-28 01:46:26 +00:00
;;; start action StandardKernel__kerneldraw__29
ldy KernelSection_lines_b0,x
2022-02-28 01:46:26 +00:00
StandardKernel__kerneldraw__31__loop:
;;; start action StandardKernel__wsync__32
sta WSYNC
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__wsync__32
dey
2022-02-28 01:46:26 +00:00
bne StandardKernel__kerneldraw__31__loop
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__kerneldraw__29
inx
cpx #8
2022-02-28 01:46:26 +00:00
jne StandardKernel__kernel__16____each
StandardKernel__kernel__16____exit:
2022-02-28 01:46:26 +00:00
;;; end action StandardKernel__kernel__15
KERNEL_END
2022-02-28 01:46:26 +00:00
;;; start action FrameLoop__postframe__34
lsr SWCHB ; test Game Reset switch
2022-02-28 01:46:26 +00:00
bcs FrameLoop__postframe__35__NoStart
2022-02-27 15:31:09 +00:00
;;; start action ResetConsole__resetswitch__36
jmp Main::__Reset ; jump to Reset handler
2022-02-27 15:31:09 +00:00
;;; end action ResetConsole__resetswitch__36
2022-02-28 01:46:26 +00:00
FrameLoop__postframe__35__NoStart:
2022-02-28 01:46:26 +00:00
;;; end action FrameLoop__postframe__34
;;; start action JoyButton__postframe__38
lda INPT4 ;read button input
bmi JoyButton__postframe__40__NotPressed
;;; start action Local__joybutton__41
inc Local__5__tmp+0
inc PFColor_pfcolor_b0
;;; end action Local__joybutton__41
JoyButton__postframe__40__NotPressed:
;;; end action JoyButton__postframe__38
2022-02-27 15:31:09 +00:00
jmp FrameLoop__start__4__NextFrame ; loop to next frame
2022-02-27 15:31:09 +00:00
;;; end action FrameLoop__start__3
; start main routine
.segment "VECTORS"
2022-02-28 01:46:26 +00:00
ZeroByte: .byte $00
Return: .byte $60
VecNMI:
2022-02-28 01:46:26 +00:00
VecReset: .word __Reset
VecBRK: .word __BRK
.code
2022-02-23 14:43:19 +00:00
;;; end action Init__main_init__1
.endscope
Main__Start = Main::__Start