2022-02-23 17:16:47 +00:00
|
|
|
EVENT__start = 1
|
|
|
|
EVENT__nextframe = 1
|
|
|
|
EVENT__resetswitch = 1
|
|
|
|
EVENT__preframe = 1
|
|
|
|
EVENT__kernel = 1
|
|
|
|
EVENT__kernelsetup = 1
|
2022-02-24 19:30:10 +00:00
|
|
|
EVENT__postframe = 1
|
2022-02-23 17:16:47 +00:00
|
|
|
EVENT__joybutton = 1
|
2022-02-07 20:58:03 +00:00
|
|
|
.scope Main
|
|
|
|
.zeropage
|
|
|
|
PFColor_pfcolor_b0:
|
|
|
|
.res 1
|
|
|
|
.res 1
|
2022-02-09 13:39:41 +00:00
|
|
|
TEMP:
|
2022-02-17 15:58:13 +00:00
|
|
|
Local__6__tmp:
|
2022-02-07 20:58:03 +00:00
|
|
|
.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-19 08:37:19 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action Init__main_init__1
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
.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 :-
|
2022-02-19 08:37:19 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action FrameLoop__start__2
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
FrameLoop__start__2__NextFrame:
|
|
|
|
FRAME_START
|
2022-02-19 10:06:25 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action StaticKernel__preframe__3
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-19 10:06:25 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action StaticKernel__kernelsetup__4
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
lda #24
|
|
|
|
sta COLUBK
|
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action StaticKernel__kernelsetup__4
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action StaticKernel__kernelsetup__5
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action StaticKernel__kernelsetup__5
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action StaticKernel__kernelsetup__6
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action StaticKernel__kernelsetup__6
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action StaticKernel__preframe__3
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
KERNEL_START
|
2022-02-19 10:06:25 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action StaticKernel__kernel__7
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
ldx #0
|
2022-02-17 18:52:13 +00:00
|
|
|
StaticKernel__kernel__7____each:
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
sta WSYNC
|
2022-02-19 10:06:25 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action StaticKernel__kernelsetup__8
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
lda BGColor_bgcolor_b0,x
|
|
|
|
sta COLUBK
|
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action StaticKernel__kernelsetup__8
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action StaticKernel__kernelsetup__9
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
cpx #5+2
|
2022-02-17 18:52:13 +00:00
|
|
|
jcs StaticKernel__kernelsetup__9____skipxhi
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
cpx #5
|
2022-02-17 18:52:13 +00:00
|
|
|
jcc StaticKernel__kernelsetup__9____skipxlo
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
lda PFColor_pfcolor_b0-5,x
|
|
|
|
sta COLUPF
|
|
|
|
|
2022-02-17 18:52:13 +00:00
|
|
|
StaticKernel__kernelsetup__9____skipxlo:
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-17 18:52:13 +00:00
|
|
|
StaticKernel__kernelsetup__9____skipxhi:
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action StaticKernel__kernelsetup__9
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action StaticKernel__kernelsetup__10
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
cpx #4
|
2022-02-17 18:52:13 +00:00
|
|
|
jcc StaticKernel__kernelsetup__10____skipxlo
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
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:
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action StaticKernel__kernelsetup__10
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
ldy KernelSection_lines_b0,x
|
2022-02-17 18:52:13 +00:00
|
|
|
StaticKernel__kernel__7__loop:
|
2022-02-07 20:58:03 +00:00
|
|
|
sta WSYNC
|
|
|
|
|
|
|
|
dey
|
2022-02-17 18:52:13 +00:00
|
|
|
bne StaticKernel__kernel__7__loop
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
cpx #8
|
2022-02-17 18:52:13 +00:00
|
|
|
jne StaticKernel__kernel__7____each
|
|
|
|
StaticKernel__kernel__7____exit:
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action StaticKernel__kernel__7
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
KERNEL_END
|
2022-02-19 10:06:25 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action JoyButton__postframe__11
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
lda INPT4 ;read button input
|
2022-02-17 18:52:13 +00:00
|
|
|
bmi JoyButton__postframe__11__NotPressed
|
2022-02-19 10:06:25 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action Local__joybutton__12
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-10 21:51:03 +00:00
|
|
|
inc Local__6__tmp+0
|
2022-02-07 20:58:03 +00:00
|
|
|
inc PFColor_pfcolor_b0
|
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action Local__joybutton__12
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-17 18:52:13 +00:00
|
|
|
JoyButton__postframe__11__NotPressed:
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action JoyButton__postframe__11
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
FRAME_END
|
2022-02-19 10:06:25 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action ResetSwitch__nextframe__13
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
lsr SWCHB ; test Game Reset switch
|
2022-02-17 18:52:13 +00:00
|
|
|
bcs ResetSwitch__nextframe__13__NoStart
|
2022-02-19 10:06:25 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; start action ResetConsole__resetswitch__14
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
jmp Main::__Reset ; jump to Reset handler
|
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action ResetConsole__resetswitch__14
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-17 18:52:13 +00:00
|
|
|
ResetSwitch__nextframe__13__NoStart:
|
2022-02-07 20:58:03 +00:00
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action ResetSwitch__nextframe__13
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action FrameLoop__start__2
|
2022-02-07 20:58:03 +00:00
|
|
|
; start main routine
|
|
|
|
.segment "VECTORS"
|
|
|
|
Return: .word $6060
|
|
|
|
VecNMI:
|
|
|
|
VecReset: .word Main::__Reset
|
|
|
|
VecBRK: .word Main::__BRK
|
|
|
|
|
2022-02-23 14:43:19 +00:00
|
|
|
;;; end action Init__main_init__1
|
2022-02-07 20:58:03 +00:00
|
|
|
|
|
|
|
.endscope
|
|
|
|
Main__Start = Main::__Start
|