ceda2vga/src/crtc.pio

38 lines
529 B
Plaintext

.program crtc_pixel
entrypoint_crtc_pixel:
pull
.wrap_target
mov y, osr
wait irq 6
visible_line_loop:
in pins, 1 [2]
jmp y-- visible_line_loop
.wrap
.program crtc_hsync
pull
.wrap_target
mov y, osr
wait irq 1
scanlines_loop:
set x, 7
wait 1 gpio 14
wait 0 gpio 14
back_porch_loop:
jmp x-- back_porch_loop [31]
irq set 6
jmp y-- scanlines_loop
.wrap
.program crtc_vsync
entrypoint_ceda_crt_vsync:
.wrap_target
wait 0 gpio 15
wait 1 gpio 15
irq set 1
.wrap