MCUME/MCUME_pico/vga_t4/scanvideo.pio

40 wiersze
1.2 KiB
Plaintext

;
; 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
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 entry_point:
wait irq, 4 ; todo perhaps change this to out exec, 16... so that we can do multiple things (including setting black pixel)
out pc, bpp
public raw_run: ; | jmp raw_run | color | n | <n + 2 colors> |
out x, bpp
pixel_loop:
public delay_d_0:
out pins, 8 [extra0]
jmp x-- pixel_loop
.wrap_target
;public raw_1p: ; | jmp raw_1p | color |
public delay_e_0:
out pins, 8 [extra0]
out pc, bpp