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

[Question]How to make 8bit(256color) mode? #79

Open
riraosan opened this issue Dec 1, 2022 · 4 comments
Open

[Question]How to make 8bit(256color) mode? #79

riraosan opened this issue Dec 1, 2022 · 4 comments

Comments

@riraosan
Copy link

riraosan commented Dec 1, 2022

Hi. @bitluni

I would like to use your results to create an 8BIT(256colors) mode VGA class.
Rough question, do I need to create a VGA class for 8BIT mode?
Or can I use it as 8BIT mode by omitting the pins on the 554 in 14 bit mode?

@riraosan
Copy link
Author

riraosan commented Dec 1, 2022

For example, can I use 14bit mode VGA as 8bit mode using the ports R2, R3, R4, G2, G3, G4, B2 ,B3, hsync, vsync?

@Martin-Laclaustra
Copy link
Collaborator

Have you tried 6BIT mode?
What do you aim to do?

  • In terms of memory savings, you will not get any with 8bit, as you will be using 10 bits and wasting the rest of the 16 bits that support 14bit mode.
  • If your original image data is in 8bit, you can decimate it to 6bit easily.
  • If your original image data is in 8bit, and you increase color depth to 14bit naively (bit-shifting), when you render it in 14bit hardware you would lose the top brightness as you will have the last low bits off... if you need more accuracy you will need to write some conversion algorithm. If you render it in the hardware that you propose you may be ok, but you will be redefining the meaning of the colors and that may bring trouble if you use other conversion functions of the library (in terms of color inaccuracy).
  • If you use 14bit images in your proposed incomplete 8bit output hardware you probably will be ok. (however, just buy yourself some more resistors and implement the complete 14bit output!)

@Martin-Laclaustra
Copy link
Collaborator

Check the development branch for a bunch of other options.

@riraosan
Copy link
Author

riraosan commented Dec 5, 2022

Hi @Martin-Laclaustra

Have you tried 6BIT mode?

No, I have not tried 6bit mode.
I tried 14bit mode.
Of course, when I used 14bit mode on the circuit for the 332, the white background was not white and the lines drew a pattern.
I understand a little more what you are saying. Thank you very much.

I have confirmed that the RGBA() API converts 16 bits of pixel color to 14 bits.
I assume that the process of rounding to 6 bits is the same. After this I would like to confirm.

I have three main objectives.

  1. to save memory (this seems impossible in 8bit mode)
  2. to connect and use the VGA library and lovyanGFX(very fast GFX Library for M5Stack. 8bit Composite and lovyanGFX sample movie)
  3. enjoy (JOKE)

1 doesn't seem possible. 2 could do it.

I would like to replace your GFX with lovyanGFX using 6bit mode after this.

I appreciate your contribution. Thank you very much.

@riraosan

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

No branches or pull requests

2 participants