Skip to content

Using less pico ram, a different approach (not for everyone)... #33

@AndrewCapon

Description

@AndrewCapon

Hi Guys,

I have some hacked code here that keeps the frame buffer in PSRAM and reduces the use of the pico ram. Especially useful for 480x480. And only useful (at the moment) for native pixel format.

Basically all it does is use this bit of pico memory as a cache, the PSRAM is copied to the cache vie the end of scanline interrupt and the PIO stuff is then reading from this cache. This seems to work well with no glitching and gets over the problem of the PIO stuff reading from PSRAM while anything else may be updating PSRAM which causes screen corruption (I'm guessing something to do with the DMA not being able to read it quickly enough?)

The only real advantage to it is that is only uses 4 scanlines of memory for the buffer in pico ram that is sent to the display.

It has disadvantages though:

Due to the reduced memory use the normal Update where the display is updated behind the current scanline is no longer used, so if you run with a single back buffer then you will see some flicker. You can run with two back buffers then you do have the speed of the psram to deal with when keeping them in sync.

So it's not for everyone :)

I wondered if it was something you would like a PR for, if so I can do a much tidier version, one of these:

  1. Subclass the ST7701 into a new class that works this way
  2. Modify the ST7701 code.

Anyone interested?

Cheers

Andy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions