Skip to content

Is DISPLAY_CROPPED_AND_SCALING possible ? (with integer factor) #107

@dglaude

Description

@dglaude

Your software is great and works out of the box for the WAVESHARE_ST7735S_HAT.
My use case is to play pixel perfect Pico-8 but I would like a simultaneous HDMI display.

I want pixel perfect on the SPI LCD, but I want bigger that 128x128 on the HDMI.

So rather than to define my HDMI to be 128x128:
hdmi_group=2
hdmi_mode=87
hdmi_cvt=128 128 60 1 0 0 0

I would like a standard resolution, so that I can connect an HDMI screen.

So the idea would be to use a kind of DISPLAY_CROPPED_INSTEAD_OF_SCALING but every pixel from the LCD would match 4x4 or 5x5 ... or 8x8 pixels on the HDMI side.

That would require to define DISPLAY_CROPPED_AND_SCALING and a scaling factor.

In my case all the pixels should be of the same color, but I guess otherwise the GPU would average the color in the downscaling process... can it do that?

Do you think it would be easy to implement?
I am looking in gpu.cpp and maybe by changing the math I could make it work...

Or maybe there is already a set or parameter that would archieve something similar?

Regards

PS: Right now here are the alternative I found:

  • I can display a tiny 128x128 in the middle of a 1920x1080, but this is too small. So if I could display a 1024x1024 made of 8x8 "pixels" it would be perfect.

  • I can display in 1024x768 perfectly(?) scaled to 128x128, but then the aspect ratio is not respected, it should be 1:1 on screen where my resolution is 4:3 on a 16:9 screen/TV.

https://twitter.com/DavidGlaude/status/1163942579001593858?s=20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions