The performance of full screen drawing in Hi-Res mode (220x176, 4 colors) is not enough for games. To optimize drawing to the screen buffer Display::setClipRect() method was added. That can be used e.g. to draw only the "dirty rect" area of the background bitmap to the screen buffer. Another important speed optimization is drawing only the update rect from the screen buffer to the LCD in the lcdRefreshMode1() and lcdRefreshMode1Spr() methods. Updating always the whole screen to LCD easily kills performance.
Changes:
Added an update rect to the Core::update(), Display::update, and LCD/SIM refresh functions (2 bpp)
Added Display::setClipRect()
Added a clip rect to drawBitmap function (2 bpp)
Updated MicroPython libraries (update rect & clip rect)
Updated MicroPython bindings (update rect & clip rect)
The performance of full screen drawing in Hi-Res mode (220x176, 4 colors) is not enough for games. To optimize drawing to the screen buffer Display::setClipRect() method was added. That can be used e.g. to draw only the "dirty rect" area of the background bitmap to the screen buffer. Another important speed optimization is drawing only the update rect from the screen buffer to the LCD in the lcdRefreshMode1() and lcdRefreshMode1Spr() methods. Updating always the whole screen to LCD easily kills performance.
Changes: