Skip to main content
AndyJT
Associate III
Nov 7, 2018 11:47 AM UTC
Question

Can DMA2D do a repeat buffer copy/fill from image ?

Hi,

I have DMA2D (ChromArt) working fine for drawing images from memory to display buffer.

However, to save on image storage, I would like to create single pixel image "strips" which I can repeat a number of times in X or Y.

eg, for drawing a top border using a 1px wide by 20px high source image and outputting to the display buffer,say, 200 times across the screen.

I can't find any examples of this online.

Many thanks,

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
Nov 7, 2018 9:34 PM UTC

There no such feature in the hardware.

You can emulate it in software by performing the transfer of 1x20 strip 200 times; but probably it would be more efficient to draw 20 single-color 200x1 lines using the register-to-memory mode.

The transferring the 1x20 strip 200 times should be somewhat optimizable by halving and copying the already drawn piece.

JW

AndyJT
AndyJTAuthor
Associate III
Nov 7, 2018 9:50 PM UTC

Hi, thanks for letting me know for sure that it's not possible... Maybe something to be added to the hardware in the future... ?

I've already implemented horizontal copying using register to memory mode. Just working on a bug which is corrupting memory in the vertical version of the routine which must be related to offset(stride) setup being incorrect.

Thanks again!