component Kernel lines: 0..255 bgcolor: 0..255 end component Bitmap bitmapdata: array of 0..255 end component HasBitmap bitmap: [Bitmap] end component Colormap colormapdata: array of 0..255 end component HasColormap colormap: [Colormap] end component Sprite height: 0..255 plyrindex: 0..1 end component Player end component PlayerFlags plyrflags: 0..63 end component HasXpos xpos: 0..255 end component HasYpos ypos: 0..255 end component HasXYVel xyvel: 0..255 end system FrameLoop on start do once [Kernel] emit (preframe, kernel, postframe) --- {{@NextFrame}}: FRAME_START {{!preframe}} KERNEL_START {{!kernel}} KERNEL_END {{!postframe}} FRAME_END lsr SWCHB ; test Game Reset switch bcs {{@NoStart}} jmp Start {{@NoStart}}: jmp {{@NextFrame}} --- end system SimpleKernel locals 12 on preframe do each [Sprite,HasBitmap,HasColormap,HasYpos] --- lda #192 ; TODO: numlines sec sbc {{Bitmap.bitmapdata}},y sbc #0 sta {{$2}},x ldy {{Colormap.colormapdata}},y sbc #0 sta {{$6}},x lda {{ L0 H0 L1 H1 lda {{$1}} ldy {{$2}} sty {{$1}} sta {{$2}} lda {{$5}} ldy {{$6}} sty {{$5}} sta {{$6}} --- on kernel do once [Kernel] --- lda {{