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

Use DMA to flip screen in double buffer "cumulative" mode #50

Open
CHiPs44 opened this issue Sep 24, 2024 · 1 comment
Open

Use DMA to flip screen in double buffer "cumulative" mode #50

CHiPs44 opened this issue Sep 24, 2024 · 1 comment
Assignees

Comments

@CHiPs44
Copy link
Owner

CHiPs44 commented Sep 24, 2024

cf.

Prototype:

void * dma_memcpy( void * restrict destination, const void * restrict source, size_t size );

For now, if source and destination do overlap:

  • NB: determining memory overlapping can be a challenge: if src points to "striped" sram and dst to "sequential" ram, they could overlap and pointer arithmetic wouldn't notice
  • use memcpy()

else:

  • use DMA_SIZE_32 if destination % 4 == 0 && source % 4 == 0 && size % 4 == 0
  • use DMA_SIZE_16 if destination % 2 == 0 && source % 2 == 0 && size % 2 == 0
  • use DMA_SIZE_8 otherwise
@CHiPs44 CHiPs44 changed the title Use DMA to flip in double buffer mode Use DMA to flip screen in double buffer mode Oct 3, 2024
@CHiPs44
Copy link
Owner Author

CHiPs44 commented Oct 10, 2024

see https://github.com/tvlad1234/pico-vgaDisplay for dma_memset and dma_memcpy.

@CHiPs44 CHiPs44 self-assigned this Oct 10, 2024
@CHiPs44 CHiPs44 changed the title Use DMA to flip screen in double buffer mode Use DMA to flip screen in double buffer "cumulative" mode Nov 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

No branches or pull requests

1 participant