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

Add basic support for 16-bit color output (not tested) #268

Closed
wants to merge 3 commits into from

Conversation

v1993
Copy link

@v1993 v1993 commented Jun 11, 2020

Just a quick thing I tried to do. As mentioned in the title, not tested. Please review this if you have time.

As for why, I'm currently trying to port SameBoy onto microcontroller and buffer of uint32_t is a serious waste of memory, especially considering that actual color is 16-bit value anyways.

I'm not familiar with internals of SameBoy, so I might have either missed something or changed something I shouldn't had.

struct GB_gameboy_s;
typedef struct GB_gameboy_s GB_gameboy_t;

#ifdef GB_16BIT_OUTPUT_COLOR
Copy link
Author

@v1993 v1993 Jun 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if gc_struct_def.h is a good location for this define, but it seems that it is only working option.

@LIJI32 LIJI32 force-pushed the master branch 4 times, most recently from 4ebe973 to 0989ee2 Compare December 30, 2022 17:45
@ISSOtm
Copy link
Contributor

ISSOtm commented Jun 18, 2024

Does this belong to upstream? Especially if it's not tested, and no front-end uses it...

@LIJI32
Copy link
Owner

LIJI32 commented Jun 19, 2024

Honestly, I think I replacing uint32_t uses with GB_pixel_t where relevant is a generally good change, then you can #ifdef the definition of that type to allow setting it to some other type. Nothing in the core actually assumes the data size of a pixel as far as I remember. This allows better generalization, and can potentially allow other color depths too, including 8-bit and 24-bit.

@v1993 v1993 closed this by deleting the head repository Aug 27, 2024
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

Successfully merging this pull request may close these issues.

3 participants