//#resource "vcs-ca65.h" import "vcslib.ecs" component Bitmap48 bitmap0: array of 0..0xff bitmap1: array of 0..0xff bitmap2: array of 0..0xff bitmap3: array of 0..0xff bitmap4: array of 0..0xff bitmap5: array of 0..0xff height: 0..255 end system Kernel48Pixel locals 2 on kernelsetup do if [Bitmap48] --- lda {{ [GRP0] lda {{data bitmap1}},y ; load B1 -> A sta GRP1 ; B1 -> [GRP1], B0 -> GRP0 lda {{data bitmap2}},y ; load B2 -> A sta GRP0 ; B2 -> [GRP0], B1 -> GRP1 lda {{data bitmap5}},y ; load B5 -> A sta {{$1}} ; B5 -> temp ldx {{data bitmap4}},y ; load B4 -> X lda {{data bitmap3}},y ; load B3 -> A ldy {{$1}} ; load B5 -> Y sta GRP1 ; B3 -> [GRP1]; B2 -> GRP0 stx GRP0 ; B4 -> [GRP0]; B3 -> GRP1 sty GRP1 ; B5 -> [GRP1]; B4 -> GRP0 sta GRP0 ; ?? -> [GRP0]; B5 -> GRP1 dec {{$0}} ; go to next line bpl @Loop ; repeat until < 0 pla tax --- end demo Main //using FrameLoop, StaticKernel, Kernel48Pixel using FrameLoop, Kernel48Pixel, StaticKernel // TODO entity [KernelSection, BGColor] const lines = 10 const bgcolor = $a0 end entity [KernelSection, BGColor] const lines = 10 const bgcolor = $a2 end entity [KernelSection, BGColor, PFColor, Bitmap48] const lines = 2 const bgcolor = 0xa4 const pfcolor = 0xfc decode vcs_bitmap48 --- x.............................................xx xx.........................................xxx.x xxxx....................................xxx....x xx..xxxx..............................xx.......x xx......xx...........................x.........x xx...x....x............xx............x.........x xx...x....x...........x..x.........xx..........x xx...x..x..x....x......xx.....x...x............x xx...xxxx...x...xxx...x..x..xxx..x.............x xx...x..x..x......x....xx...x.....x............x xx...x....x...........x..x.........xx..........x xx......xx.............xx............x.........x xx..xxxx..............................xx.......x xxxx....................................xxxxxxxx ................................................ --- end entity [KernelSection, BGColor] const lines = 10 const bgcolor = $a2 end entity [KernelSection, BGColor] const lines = 10 const bgcolor = $a0 end end