-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
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_restlabel withldi state, IDLEDONE - Eventually: Use the remaining registers to hold constants to condense the
ldi tmp, CONSTop reg tmppattern into a single op (egenable_timerwould 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 anandandeor - 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
cpseinstruction, there may be some places in the code where it saves an opcode ijmpandicallshould 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.
ldsandstsare OK because they implicitly add 0x0040
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels