The ultimate goal is to be able to display some image and move the whole image fluidly in any cardinal direction or diagonally.
If the LCD display could be controlled like a 2D array it would very simple to implement. You simply take the image's coordinates and make necessary shifts in the array index to move the image. With the only tricky part being figuring out how to wrap the image on boundaries.
However, with having to first specify a page, column, then writing a chunk of data at once I am not certain how to go about effectively moving an image.
My first idea is to generate a 2D array to keep track of the 128x64 pixel display (can only write to LCD anyway through serial with my display), then make all adjustments to this array. From here I can take this array and write all of its contents to the LCD display. Therefore, I am effectively refreshing the ENTIRE screen at a certain rate or when I need to make a change. The problems with this method is any update to the screen (even like a pixel) will be 1024 data writes (8 pages and 128 columns with auto-column address increments).
I am using the hardware SPI to have access to a data transfer rate of 84 MHz to 0.329 MHz. I believe with 128x64 and black and white this is not that much of an issue. However, if I ever had to use a display with a larger resolution or transmit more data like color I believe this process becomes incredibly slow. It would be preferred if I could somehow update the screen only when a change was made.
I guess I could have 2 2D arrays. One of the present image and one to be updated. I could somehow compare the two arrays and flag any page/column that needs to be updated. Then, use this to generate a list of data writes. However, this might be hardware resource heavy doing all of those compares and keeping track of all of this stuff.
So, I am asking for any feedback on what might be a better idea or alternative method.