A custom game console implementation in Rust for the LILYGO T-Display-S3.
Bluetooth controller support was a struggle. Parsing the byte data over bluetooth was done via trial and error.
The final byte layout I discovered:
- Byte 0: D-pad hat switch
- Bytes 1 through 4: Analog sticks
- Bytes 5 and 6: Analog triggers
- Byte 7: A, B, X, Y buttons and the L1 and R1 bumpers
- Byte 8: L2 and R2 digital buttons, Select, Start, stick clicks, and the Home button
- Some bugs remain with reading buttons still
- Division by zero causes an LC-3 exception somehow, (something very strange is going on since it should just be changing RESULT_MSG and halting)
- Output buffer can be overflowed easily (easy fix)
- Messy LC-3 code (codebase is very large, moving things around causes labels to be too far from their uses. Needs a refactor and cleanup)