Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display character handling #4

Closed
vintagepc opened this issue Apr 6, 2020 · 10 comments
Closed

Fix display character handling #4

vintagepc opened this issue Apr 6, 2020 · 10 comments
Assignees
Labels
Hardware sim Simulated hardware

Comments

@vintagepc
Copy link
Owner

vintagepc commented Apr 6, 2020

There are a few issues with the stock display implementation:

  • Colour of text is black ✔️
  • No brightness support ✔️
  • Custom characters don't work ✔️
  • Possible wrap/RAM alignment issue. I think the stock does not map the memory correctly for 20x4 displays. I had to hack this to make it work, I probably missed something when chain-writing across boundaries. (Bootloader flashing display is an example) ✔️
@vintagepc vintagepc added the Hardware sim Simulated hardware label Apr 6, 2020
@vintagepc vintagepc self-assigned this Apr 8, 2020
@vintagepc
Copy link
Owner Author

I've fixed the alignment/wrapping on the display. Whoever implemented the LCD code did not appear to understand the internal VRAM mapping of these displays.

Also fixed some performance problems that suppressed a ridiculous frequency of display redraws. Now it actually only updates if it is flagged as dirty.

@vintagepc
Copy link
Owner Author

I spent some time cleaning up the GL code and display memory mapping. CGRAM is now supported, and the character handling is much reduced in footprint (no textures) and properly sized.

image

@leptun
Copy link
Collaborator

leptun commented Apr 8, 2020

That looks so cool! Well done!

@leptun
Copy link
Collaborator

leptun commented Apr 8, 2020

@vintagepc how do you plan to add brightness?

@vintagepc
Copy link
Owner Author

I'll fade the background color to black as brightness goes down. Doesn't have to be perfect, just a visual indication so we can test it in sim. :)

vintagepc added a commit that referenced this issue Apr 8, 2020
@vintagepc
Copy link
Owner Author

Brightness has been implemented. (in theory) It's wired to the pin but probably not passing the initial brightness check yet. I think we can close this initial hardware bringup task.

@leptun
Copy link
Collaborator

leptun commented Apr 8, 2020

Tie the pin low during detection and it will always pass as Backlight enabled.

@vintagepc
Copy link
Owner Author

Yup. Also helps if you have the connection wired the right way around 🤣

image

@leptun
Copy link
Collaborator

leptun commented Apr 8, 2020

Hmmm... what about that last custom character? It is the wrong one. Are these characters generated at runtime or is it just a font file that includes them?
We have 8 “regular” custom characters and 3 other that are used only occasionally. This is one of those instances where (I think) the degree sign is replaced by ✔️

@vintagepc
Copy link
Owner Author

vintagepc commented Apr 8, 2020

They are based on what we write to CG RAM (i.e. I implemented CGRAM support). I think there's still some unimplemented/wrong behaviour with the display somewhere in regards to blanking and screen updates. I haven't dived in as that's less of a roadblock to further activity; but I figured a 95% functional display is pretty critical until we resolve #3 .

Quite possible It's kicking the cursor on an update somewhere and clobbering that character when we write a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware sim Simulated hardware
Projects
None yet
Development

No branches or pull requests

2 participants