vertical line, scrolling from left to right
sufficiently handles the back/front porch without disrupting the sync signal todo improvement: compute a sensible amount of cycles to waste during the porch
This commit is contained in:
parent
14fd0412d4
commit
f3ce016a06
2
const.h
2
const.h
@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#define VERTICAL_OFFSET 30
|
||||
|
||||
#define HORIZONTAL_OFFSET_CYCLE 50
|
||||
|
26
main.S
26
main.S
@ -58,30 +58,43 @@ int_horizontal_sync:
|
||||
in r31, IO(SREG) ; status register
|
||||
push r31
|
||||
|
||||
#if 0
|
||||
lds r31, vertical_offset
|
||||
cpi r31, 0
|
||||
breq enter1
|
||||
breq enter
|
||||
dec r31
|
||||
sts vertical_offset, r31
|
||||
jmp int_horizontal_sync_end
|
||||
|
||||
enter1:
|
||||
enter:
|
||||
lds r31, line
|
||||
cpi r31, 0
|
||||
breq int_horizontal_sync_end
|
||||
inc r31
|
||||
sts line, r31
|
||||
|
||||
ldi r31, HORIZONTAL_OFFSET_CYCLE ; skip back porch
|
||||
1:
|
||||
dec r31
|
||||
brne 1b
|
||||
|
||||
; do things
|
||||
lds r31, frame
|
||||
lsr r31
|
||||
lsr r31
|
||||
cpi r31, 0
|
||||
breq 2f
|
||||
1:
|
||||
dec r31
|
||||
brne 1b
|
||||
#endif
|
||||
2:
|
||||
|
||||
sbi IO(PORTB), 4
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
cbi IO(PORTB), 4
|
||||
|
||||
#if 0
|
||||
ldi r31, 140
|
||||
1:
|
||||
dec r31
|
||||
@ -99,6 +112,7 @@ enter1:
|
||||
nop
|
||||
nop
|
||||
cbi IO(PORTB), 4
|
||||
#endif
|
||||
|
||||
int_horizontal_sync_end:
|
||||
pop r31
|
||||
|
Loading…
Reference in New Issue
Block a user