#include #include #include #include #include #include #include #include typedef uint8_t byte; typedef uint16_t word; typedef int8_t sbyte; #define COLS 40 #define ROWS 25 void raster_wait(unsigned char line) { while (VIC.rasterline < line) ; } void wait_vblank() { raster_wait(255); // TODO } sbyte scroll_fine_x; sbyte scroll_fine_y; byte origin_x; byte origin_y; byte curbuf; byte* scrnbuf[2]; // screen buffer(s) byte tempbuf[COLS*ROWS]; void draw_cell(byte x, byte y) { byte xx = x + origin_x; byte yy = y + origin_y; byte ch = xx ^ yy; word ofs = x+y*COLS; scrnbuf[curbuf][ofs] = ch; // character tempbuf[ofs] = ch; // color } void scroll_draw_column(byte col) { byte y; for (y=0; y