; ; Copyright (c) 2020 Raspberry Pi (Trading) Ltd. ; ; SPDX-License-Identifier: BSD-3-Clause ; ; Default scanline program (|| means aligned word boundary, | means hword boundary) .program video_24mhz_composable_default .origin 0 ; must load at zero (offsets are hardcoded in instruction stream) .define extra0 0 ; set later by code based on xscale .define extra1 0 ; set later by code (1 more than extra0) ; note bpp must be a factor of 32 .define bpp 16 ;.define bpp 8 public end_of_scanline_skip_ALIGN: ; || jmp end_of_scanline_skip_ALIGN | ignored || ; was 16 but we just discard the reset of the OSR ; so as to also support 8 bit grayscale out null, 32; public end_of_scanline_ALIGN: ; | jmp end_of_scanline_ALIGN || public entry_point: wait irq, 4 ; todo perhaps change this to out exec, 16... so that we can do multiple things (including setting black pixel) public nop_raw: out pc, bpp public delay_h_0: public color_run: ; | jmp color_run | color | count-3 | out pins, bpp out x, bpp color_loop: public delay_a_1: jmp x-- color_loop [extra1] public nop_extra1: public delay_b_1: out pc, bpp [extra1] public raw_run: ; | jmp raw_run | color | n | | public delay_c_0: out pins, bpp [extra0] out x, bpp pixel_loop: public delay_d_0: out pins, bpp [extra0] jmp x-- pixel_loop .wrap_target public raw_1p: ; | jmp raw_1p | color | public delay_e_0: out pins, bpp [extra0] out pc, bpp public raw_2p: ; | jmp raw_2p | color | color | public delay_f_1: out pins, bpp [extra1] .wrap public raw_1p_skip_ALIGN: ; | jmp raw_1p_skip_ALIGN | color | ignored || out pins, 32 ; requires correct out mask public nop_extra0: public delay_g_0: out pc, bpp [extra0] ; note moved extra0 from above line, so we can use this instruction for ; Variant that replaces raw_1p_skip_work_ALIGN with raw1p_2cycle .program video_24mhz_composable_raw1p_2cycle .origin 0 ; must load at zero (offsets are hardcoded in instruction stream) .define extra0 0 ; set later by code based on xscale .define extra1 0 ; set later by code (1 more than extra0) ; note bpp must be a factor of 32 .define bpp 16 ;.define bpp 8 public end_of_scanline_skip_ALIGN: ; || jmp end_of_scanline_skip_ALIGN | ignored || ; was 16 but we just discard the reset of the OSR ; so as to also support 8 bit grayscale out null, 32; public end_of_scanline_ALIGN: ; | jmp end_of_scanline_ALIGN || public entry_point: wait irq, 4 ; todo perhaps change this to out exec, 16... so that we can do multiple things (including setting black pixel) public nop_raw: out pc, bpp public color_run: ; | jmp color_run | color | count-3 | public delay_h_0: out pins, bpp out x, bpp color_loop: public delay_a_1: jmp x-- color_loop [extra1] public nop_extra1: public delay_b_1: out pc, bpp [extra1] public raw_run: ; | jmp raw_run | color | n | | public delay_c_0: out pins, bpp [extra0] out x, bpp pixel_loop: public delay_d_0: out pins, bpp [extra0] jmp x-- pixel_loop .wrap_target public raw_1p: ; | jmp raw_1p | color | public delay_e_0: out pins, bpp [extra0] out pc, bpp public raw_2p: ; | jmp raw_2p | color | color | public delay_f_1: out pins, bpp [extra1] .wrap public raw_1p_2cycle: public delay_g_0: out pins, bpp out pc, bpp