MEGA65 / mega65-core

MEGA65 FPGA core
Other
240 stars 85 forks source link

Implement DMA with source and dest stride with length and count #606

Open RetroCogs opened 2 years ago

RetroCogs commented 2 years ago

Currently when doing something like updating RRB data you have to DMA a line at a time because each row is a subset of the complete rowline, this results in large DMA chains (630 bytes to update 26 lines of RRB data).

My request is to have a DMA command that give Source Dest Source Stride Dest Stride Length (bytes per DMA) Count (number of DMAs)

This would allow a single small DMA command (20ish bytes) that could update tile or color data for every line of the display.

My example timings show :-

Chained DMAs = 630 bytes of DMA commands ~5 raster lines Self mod code = 15 bytes of DMA commands ~8 raster lines

This request would yield the best of both of these with small data and small raster time.

ki-bo commented 1 year ago

Would a maximum "Count" of 255 and a maximum "Length" (bytes per DMA) of 255 be sufficient?