microsoft / pxt-arcade

Arcade game editor based on Microsoft MakeCode
https://arcade.makecode.com
MIT License
473 stars 200 forks source link

doubleSize = false on ILI9341 #4706

Open x130844 opened 2 years ago

x130844 commented 2 years ago

Trying to get the full resolution 320x240 (NOT doubled) of ILI9341 when connected to SAMD51

I edit the screen.cpp
changed doubleSize to false for the ILI9341 statement. and edited the target overrides.ts to change resolutions. The WEB editor works and shows the correct resolution now (full nice 320x240) if I select hardware SAMD51. compile and download the new UF2 of my block test program demonstrating the screen size. (basically, move a sprite from 0 to max width) the code uploaded to the SAMD51 + ili9341 display is not showing any graphics. If I undo my changes in pxt arcade, recompile (nom run serve), it works again, but the resolution is doubled. (fully double scale 160x120, on the ILI9341) How to change the resolution on the hardware? so a real 320x240 can be used?

abchatra commented 2 years ago

@riknoll @mmoskal

AqeeAqee commented 1 year ago

Hi x130844 I just happened to this, hope following will help.

depends on how you edited the targetoverrides.ts if like this: control.getConfigValue(DAL.CFG_DISPLAY_WIDTH, 320), control.getConfigValue(DAL.CFG_DISPLAY_HEIGHT, 240)) it may work without a config, I guess. cause the 2nd param is default values if no config found, maybe that's why simulator works. And the UF2 file you got from "download" has a config for samd51 instance, in which the screen size is 128x160.

so I suggest try to attach/replace your config into uf2 file, or some thing like that. I am not expert about it and learning on it, hope this can give a clue.