You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are notes I made during work for how the code could be improved:
Add a new mode for monitoring the CEC bus (ie read all messages into the buffer to be read back to the i2c master)
In command processing, a few opcodes can be saved (and flow made more intuitive) by adding an i2c_ignore_rest label with ldi state, IDLEDONE
Eventually: Use the remaining registers to hold constants to condense the ldi tmp, CONSTop reg tmp pattern into a single op (eg enable_timer would benefit). Already have zero_reg which we can be assured can't be non-zero in normal program operation
May be possible to condense reading/writing into the buffer into a subroutine and actually use the stack, since in either mode they use the same registers
grep "sanity check" - forgot to comment an if-else pair, among a few other things
cec_notpoll - why are we processing EOM when we don't know if it's for us? Need to move the address check up a few blocks
In PCINT0, OLD_CEC^OLD_SDA = 1, we should be able to adjust gbf with an and and eor
Add note to readme about how the second HDMI cable can be used as a programming interface even if the wires were badly cut
Set the timer overflow interrupt to ensure that it never overflows and retriggers the compa interrupt - overflow only takes like 8 seconds
It should be possible to use the RESET/Pin 3 as a UART debug output if we count cpu cycles. This may give something to put in the rest of the program memory (debug messages)!
I've totally ignored the cpse instruction, there may be some places in the code where it saves an opcode
ijmp and icall should be carefully considered as possibilities for enabling extremely common global branches.
Forgot to apply memory mapping for indirect addressing, SRAM begins at 0x0040, not 0x0000. lds and sts are OK because they implicitly add 0x0040
The text was updated successfully, but these errors were encountered:
These are notes I made during work for how the code could be improved:
i2c_ignore_rest
label withldi state, IDLE
DONE
ldi tmp, CONST
op reg tmp
pattern into a single op (egenable_timer
would benefit). Already have zero_reg which we can be assured can't be non-zero in normal program operationcec_notpoll
- why are we processing EOM when we don't know if it's for us? Need to move the address check up a few blocksPCINT0
,OLD_CEC^OLD_SDA = 1
, we should be able to adjust gbf with anand
andeor
cpse
instruction, there may be some places in the code where it saves an opcodeijmp
andicall
should be carefully considered as possibilities for enabling extremely common global branches.lds
andsts
are OK because they implicitly add 0x0040The text was updated successfully, but these errors were encountered: