Tricking c64 basic into clearing a hi-res screen quickly

Creating bitmap graphics with Commodore 64 BASIC 2.0 is challenging due to the lack of specific commands. However, by manipulating memory and utilizing string storage area, it is possible to efficiently manage hi-res graphics. Clearing the bitmap screen can be done by creating long strings filled with CHR$(0) characters. By changing the String Storage Area Pointer, strings can be created backwards from the end of the screen, effectively clearing all 8000 bytes fast. A BASIC program is provided to demonstrate this technique, plotting cosine functions and showcasing the practicality of using garbage strings to achieve desired outcomes. The program also includes subroutines for clearing the screen, setting colors, and plotting points.

https://retro64.altervista.org/blog/hi-res-bitmap-graphics-with-commodore-64-basic-2-0-fast-screen-clearing-routine/

To top