diff --git a/gr-sim/apple2_font.h b/gr-sim/apple2_font.h index b9cd7773..72b3531c 100644 --- a/gr-sim/apple2_font.h +++ b/gr-sim/apple2_font.h @@ -59,10 +59,10 @@ unsigned char a2_font[256][7]={ 0x10, // 10000 0x10, // 10000 }, // F - {0x1e, // 01111 + {0x0f, // 01111 + 0x10, // 10000 0x10, // 10000 0x10, // 10000 - 0x1e, // 10000 0x13, // 10011 0x11, // 10001 0x0f, // 01111 @@ -131,57 +131,393 @@ unsigned char a2_font[256][7]={ 0x11, // 10001 0x0e, // 01110 }, // O - {}, // P - {}, // Q - {}, // R - {}, // S - {}, // T - {}, // U - {}, // V - {}, // W - {}, // X - {}, // Y - {}, // Z - {}, // [ - {}, // \. - {}, // ] - {}, // ^ - {}, // _ + {0x1e, // 11110 + 0x11, // 10001 + 0x11, // 10001 + 0x1e, // 11110 + 0x10, // 10000 + 0x10, // 10000 + 0x10, // 10000 + }, // P + {0x0e, // 01110 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x15, // 10101 + 0x12, // 10010 + 0x0d, // 01101 + }, // Q + {0x1e, // 11110 + 0x11, // 10001 + 0x11, // 10001 + 0x1e, // 11110 + 0x14, // 10100 + 0x12, // 10010 + 0x11, // 10001 + }, // R + {0x0e, // 01110 + 0x11, // 10001 + 0x10, // 10000 + 0x0e, // 01110 + 0x01, // 00001 + 0x11, // 10001 + 0x0e, // 01110 + }, // S + {0x1f, // 11111 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + }, // T + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x0e, // 01110 + }, // U + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + }, // V + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x15, // 10101 + 0x15, // 10101 + 0x1b, // 11011 + 0x11, // 10001 + }, // W + {0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + 0x0a, // 01010 + 0x11, // 10001 + 0x11, // 10001 + }, // X + {0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + }, // Y + {0x1f, // 11111 + 0x01, // 00001 + 0x02, // 00010 + 0x04, // 00100 + 0x08, // 01000 + 0x10, // 10000 + 0x1f, // 11111 + }, // Z + {0x1f, // 11111 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x1f, // 11111 + }, // [ + {0x00, // 00000 + 0x10, // 10000 + 0x08, // 01000 + 0x04, // 00100 + 0x02, // 00010 + 0x01, // 00001 + 0x00, // 00000 + }, // \. + {0x1f, // 11111 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x1f, // 11111 + }, // ] + {0x00, // 00000 + 0x00, // 00000 + 0x04, // 00100 + 0x0a, // 01010 + 0x11, // 10001 + 0x00, // 00000 + 0x00, // 00000 + }, // ^ + {0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x1f, // 11111 + }, // _ /* Non-control chars */ - {}, // - {}, // ! - {}, // " - {}, // # - {}, // $ - {}, // % - {}, // & - {}, // ' - {}, // ( - {}, // ) - {}, // * - {}, // + - {}, // , - {}, // - - {}, // . - {}, // / - {}, // 0 - {}, // 1 - {}, // 2 - {}, // 3 - {}, // 4 - {}, // 5 - {}, // 6 - {}, // 7 - {}, // 8 - {}, // 9 - {}, // : - {}, // ; - {}, // < - {}, // = - {}, // > - {}, // ? + {0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + }, // ' ' + {0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x00, // 00000 + 0x04, // 00100 + }, // ! + {0x0a, // 01010 + 0x0a, // 01010 + 0x0a, // 01010 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + }, // " + {0x0a, // 01010 + 0x0a, // 01010 + 0x1f, // 11111 + 0x0a, // 01010 + 0x1f, // 11111 + 0x0a, // 01010 + 0x0a, // 01010 + }, // # + {0x04, // 00100 + 0x0f, // 01111 + 0x14, // 10100 + 0x0e, // 01110 + 0x05, // 00101 + 0x1e, // 11110 + 0x04, // 00100 + }, // $ + {0x18, // 11000 + 0x19, // 11001 + 0x02, // 00010 + 0x04, // 00100 + 0x08, // 01000 + 0x13, // 10011 + 0x03, // 00011 + }, // % + {0x08, // 01000 + 0x14, // 10100 + 0x14, // 10100 + 0x08, // 01000 + 0x15, // 10101 + 0x12, // 10010 + 0x0d, // 01101 + }, // & + {0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + }, // ' + {0x04, // 00100 + 0x08, // 01000 + 0x10, // 10000 + 0x10, // 10000 + 0x10, // 10000 + 0x08, // 01000 + 0x04, // 00100 + }, // ( + {0x04, // 00100 + 0x02, // 00010 + 0x01, // 00001 + 0x01, // 00001 + 0x01, // 00001 + 0x02, // 00010 + 0x04, // 00100 + }, // ) + {0x04, // 00100 + 0x15, // 10101 + 0x0e, // 01110 + 0x04, // 00100 + 0x0e, // 01110 + 0x15, // 10101 + 0x04, // 00100 + }, // * + {0x00, // 00000 + 0x04, // 00100 + 0x04, // 00100 + 0x1f, // 11111 + 0x04, // 00100 + 0x04, // 00100 + 0x00, // 00000 + }, // + + {0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x04, // 00100 + 0x04, // 00100 + 0x08, // 01000 + }, // , + {0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x1f, // 11111 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 01000 + }, // - + {0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x04, // 00100 + }, // . + {0x00, // 00000 + 0x01, // 00001 + 0x02, // 00010 + 0x04, // 00100 + 0x08, // 01000 + 0x10, // 10000 + 0x00, // 00100 + }, // / + {0x0e, // 01110 + 0x11, // 10001 + 0x13, // 10011 + 0x15, // 10101 + 0x19, // 11001 + 0x11, // 10001 + 0x0e, // 01110 + }, // 0 + {0x04, // 00100 + 0x0c, // 01100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x0e, // 01110 + }, // 1 + {0x0e, // 01110 + 0x11, // 10001 + 0x01, // 00001 + 0x06, // 00110 + 0x08, // 01000 + 0x10, // 10000 + 0x1f, // 11111 + }, // 2 + {0x1f, // 11111 + 0x01, // 00001 + 0x02, // 00010 + 0x06, // 00110 + 0x01, // 00001 + 0x11, // 10001 + 0x0e, // 01110 + }, // 3 + {0x02, // 00010 + 0x06, // 00110 + 0x0a, // 01010 + 0x12, // 10010 + 0x1f, // 11111 + 0x02, // 00010 + 0x02, // 00010 + }, // 4 + {0x1f, // 11111 + 0x10, // 10000 + 0x1e, // 11110 + 0x01, // 00001 + 0x01, // 00001 + 0x11, // 10001 + 0x0e, // 01110 + }, // 5 + {0x07, // 00111 + 0x08, // 01000 + 0x10, // 10000 + 0x1e, // 11110 + 0x11, // 10001 + 0x11, // 10001 + 0x0e, // 01110 + }, // 6 + {0x1f, // 11111 + 0x01, // 00001 + 0x02, // 00010 + 0x04, // 00100 + 0x08, // 01000 + 0x08, // 01000 + 0x08, // 01000 + }, // 7 + {0x0e, // 01110 + 0x11, // 10001 + 0x11, // 10001 + 0x0e, // 01110 + 0x11, // 10001 + 0x11, // 10001 + 0x0e, // 01110 + }, // 8 + {0x0e, // 01110 + 0x11, // 10001 + 0x11, // 10001 + 0x0f, // 01111 + 0x01, // 00001 + 0x02, // 00010 + 0x1c, // 11100 + }, // 9 + {0x00, // 00000 + 0x00, // 00000 + 0x04, // 00100 + 0x00, // 00000 + 0x04, // 00100 + 0x00, // 00000 + 0x00, // 00000 + }, // : + {0x00, // 00000 + 0x00, // 00000 + 0x04, // 00100 + 0x00, // 00000 + 0x04, // 00100 + 0x04, // 00100 + 0x08, // 01000 + }, // ; + {0x02, // 00010 + 0x04, // 00100 + 0x08, // 01000 + 0x10, // 10000 + 0x08, // 01000 + 0x04, // 00100 + 0x02, // 00010 + }, // < + {0x00, // 00000 + 0x00, // 00000 + 0x1f, // 11111 + 0x00, // 00000 + 0x1f, // 11111 + 0x00, // 00000 + 0x00, // 00000 + }, // = + {0x08, // 01000 + 0x04, // 00100 + 0x02, // 00010 + 0x01, // 00001 + 0x02, // 00010 + 0x04, // 00100 + 0x08, // 01000 + }, // > + {0x0e, // 01110 + 0x11, // 10001 + 0x02, // 00010 + 0x04, // 00100 + 0x04, // 00100 + 0x00, // 00000 + 0x04, // 00100 + }, // ? {0x0e, // 01110 0x11, // 10001 0x15, // 10101 @@ -238,10 +574,10 @@ unsigned char a2_font[256][7]={ 0x10, // 10000 0x10, // 10000 }, // F - {0x1e, // 01111 + {0x0f, // 01111 + 0x10, // 10000 0x10, // 10000 0x10, // 10000 - 0x1e, // 10000 0x13, // 10011 0x11, // 10001 0x0f, // 01111 @@ -310,22 +646,134 @@ unsigned char a2_font[256][7]={ 0x11, // 10001 0x0e, // 01110 }, // O - {}, // P - {}, // Q - {}, // R - {}, // S - {}, // T - {}, // U - {}, // V - {}, // W - {}, // X - {}, // Y - {}, // Z - {}, // [ - {}, // \. - {}, // ] - {}, // ^ - {}, // _ + {0x1e, // 11110 + 0x11, // 10001 + 0x11, // 10001 + 0x1e, // 11110 + 0x10, // 10000 + 0x10, // 10000 + 0x10, // 10000 + }, // P + {0x0e, // 01110 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x15, // 10101 + 0x12, // 10010 + 0x0d, // 01101 + }, // Q + {0x1e, // 11110 + 0x11, // 10001 + 0x11, // 10001 + 0x1e, // 11110 + 0x14, // 10100 + 0x12, // 10010 + 0x11, // 10001 + }, // R + {0x0e, // 01110 + 0x11, // 10001 + 0x10, // 10000 + 0x0e, // 01110 + 0x01, // 00001 + 0x11, // 10001 + 0x0e, // 01110 + }, // S + {0x1f, // 11111 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + }, // T + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x0e, // 01110 + }, // U + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + }, // V + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x15, // 10101 + 0x15, // 10101 + 0x1b, // 11011 + 0x11, // 10001 + }, // W + {0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + 0x0a, // 01010 + 0x11, // 10001 + 0x11, // 10001 + }, // X + {0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + }, // Y + {0x1f, // 11111 + 0x01, // 00001 + 0x02, // 00010 + 0x04, // 00100 + 0x08, // 01000 + 0x10, // 10000 + 0x1f, // 11111 + }, // Z + {0x1f, // 11111 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x1f, // 11111 + }, // [ + {0x00, // 00000 + 0x10, // 10000 + 0x08, // 01000 + 0x04, // 00100 + 0x02, // 00010 + 0x01, // 00001 + 0x00, // 00000 + }, // \. + {0x1f, // 11111 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x1f, // 11111 + }, // ] + {0x00, // 00000 + 0x00, // 00000 + 0x04, // 00100 + 0x0a, // 01010 + 0x11, // 10001 + 0x00, // 00000 + 0x00, // 00000 + }, // ^ + {0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x1f, // 11111 + }, // _ /* Lowercase */ @@ -385,10 +833,10 @@ unsigned char a2_font[256][7]={ 0x10, // 10000 0x10, // 10000 }, // F - {0x1e, // 01111 + {0x0f, // 01111 + 0x10, // 10000 0x10, // 10000 0x10, // 10000 - 0x1e, // 10000 0x13, // 10011 0x11, // 10001 0x0f, // 01111 @@ -457,21 +905,133 @@ unsigned char a2_font[256][7]={ 0x11, // 10001 0x0e, // 01110 }, // O - {}, // P - {}, // Q - {}, // R - {}, // S - {}, // T - {}, // U - {}, // V - {}, // W - {}, // X - {}, // Y - {}, // Z - {}, // [ - {}, // \. - {}, // ] - {}, // ^ - {}, // _ + {0x1e, // 11110 + 0x11, // 10001 + 0x11, // 10001 + 0x1e, // 11110 + 0x10, // 10000 + 0x10, // 10000 + 0x10, // 10000 + }, // P + {0x0e, // 01110 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x15, // 10101 + 0x12, // 10010 + 0x0d, // 01101 + }, // Q + {0x1e, // 11110 + 0x11, // 10001 + 0x11, // 10001 + 0x1e, // 11110 + 0x14, // 10100 + 0x12, // 10010 + 0x11, // 10001 + }, // R + {0x0e, // 01110 + 0x11, // 10001 + 0x10, // 10000 + 0x0e, // 01110 + 0x01, // 00001 + 0x11, // 10001 + 0x0e, // 01110 + }, // S + {0x1f, // 11111 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + }, // T + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x0e, // 01110 + }, // U + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + }, // V + {0x11, // 10001 + 0x11, // 10001 + 0x11, // 10001 + 0x15, // 10101 + 0x15, // 10101 + 0x1b, // 11011 + 0x11, // 10001 + }, // W + {0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + 0x0a, // 01010 + 0x11, // 10001 + 0x11, // 10001 + }, // X + {0x11, // 10001 + 0x11, // 10001 + 0x0a, // 01010 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + 0x04, // 00100 + }, // Y + {0x1f, // 11111 + 0x01, // 00001 + 0x02, // 00010 + 0x04, // 00100 + 0x08, // 01000 + 0x10, // 10000 + 0x1f, // 11111 + }, // Z + {0x1f, // 11111 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x18, // 11000 + 0x1f, // 11111 + }, // [ + {0x00, // 00000 + 0x10, // 10000 + 0x08, // 01000 + 0x04, // 00100 + 0x02, // 00010 + 0x01, // 00001 + 0x00, // 00000 + }, // \. + {0x1f, // 11111 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x03, // 00011 + 0x1f, // 11111 + }, // ] + {0x00, // 00000 + 0x00, // 00000 + 0x04, // 00100 + 0x0a, // 01010 + 0x11, // 10001 + 0x00, // 00000 + 0x00, // 00000 + }, // ^ + {0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x00, // 00000 + 0x1f, // 11111 + }, // _ }; diff --git a/gr-sim/gr-sim.c b/gr-sim/gr-sim.c index 249c511b..41cca4a6 100644 --- a/gr-sim/gr-sim.c +++ b/gr-sim/gr-sim.c @@ -44,10 +44,17 @@ unsigned char a,y,x; #define GBASH 0x27 #define BASL 0x28 #define BASH 0x29 +#define BAS2L 0x2A +#define BAS2H 0x2B #define H2 0x2C #define V2 0x2D #define MASK 0x2E #define COLOR 0x30 +#define INVFLG 0x32 +#define YSAV 0x34 +#define YSAV1 0x35 +#define CSWL 0x36 +#define CSWH 0x37 #define FIRST 0xF0 #define SPEEDZ 0xF1 #define FLASH 0xF3 @@ -268,9 +275,9 @@ int grsim_update(void) { /* FIXME: handle page2 */ - if (j>12) bit_set=0; - else if (i>10) bit_set=0; - else bit_set=(a2_font[ch][j/2])&(1<<(i/2)); + if (j>13) bit_set=0; + else if (i>11) bit_set=0; + else bit_set=(a2_font[ch][j/2])&(1<<(5-(i/2))); if (inverse) { if (bit_set) *t_pointer=color[0]; @@ -310,6 +317,13 @@ int grsim_update(void) { } +void setnorm(void) { + + y=0xff; + ram[INVFLG]=y; + +} + int grsim_init(void) { int mode; @@ -346,6 +360,10 @@ int grsim_init(void) { a=0; y=0; x=0; + //FA62 RESET + + setnorm(); + return 0; } @@ -508,7 +526,21 @@ clrsc3: ram[COLOR]=a; vline(); y--; - if (y>0) goto clrsc3; + if (y<=0x80) goto clrsc3; +} + +static void setgr(void) { + + // FB40 + // SETGR + soft_switch(TXTCLR); // LDA TXTCLR + soft_switch(MIXSET); // LDA MIXSET + + clrtop(); + + a=0x14; + setwnd(); + } int gr(void) { @@ -518,14 +550,7 @@ int gr(void) { soft_switch(MIXSET); // LDA SW.MIXSET //JMP MON.SETGR - // FB40 - soft_switch(TXTCLR); // LDA TXTCLR - soft_switch(MIXSET); // LDA MIXSET - - clrtop(); - - a=0x14; - setwnd(); + setgr(); return 0; } @@ -785,8 +810,176 @@ int text(void) { return 0; } +static void scroll(void) { + unsigned char s; + + // fc70 + + a=ram[WNDTOP]; + s=a; + vtabz(); + + // SCRL1 +scrl1: + a=ram[BASL]; + ram[BAS2L]=a; + a=ram[BASH]; + ram[BAS2H]=a; + y=ram[WNDWDTH]; + y--; + a=s; + a+=1; + if (a>=ram[WNDBTM]) { + // SCRL3 + y=0; + cleolz(); + vtab(); + return; + } + s=a; + vtabz(); + // SCRL2 +scrl2: + a=ram[y_indirect(BASL,y)]; + ram[y_indirect(BAS2L,y)]=a; + y--; + if (y<0x80) goto scrl2; + goto scrl1; +} + +static void lf(void) { + ram[CV]=ram[CV]+1; + a=ram[CV]; + if (aram[CV]) return; + + ram[CV]=ram[CV]-1; + vtab(); +} + +static void bs(void) { + + ram[CH]=ram[CH]-1; + + /* still positive */ + if (ram[CH]<0x80) return; + + a=ram[WNDWDTH]; + ram[CH]=a; + ram[CH]=ram[CH]-1; + + up(); +} + +static void storadv(void) { + + // fbf0 + + y=ram[CH]; + ram[y_indirect(BASL,y)]=a; + + // advance + + ram[CH]=ram[CH]+1; + a=ram[CH]; + if (a>=ram[WNDWDTH]) { + cr(); + } + +} + +static void vidout(void) { + // fbfd + + if (a>=0xa0) { + storadv(); + return; + } + + /* Control Characters */ + y=a; + // if bit 7 is set then we set negative flag + // BPL storadv + if (a<0x80) { + storadv(); + return; + } + + /* carriage return */ + if (a==0x8d) { + cr(); + return; + } + + /* linefeed */ + if (a==0x8a) { + lf(); + return; + } + + /* backspace */ + if (a==0x88) { + bs(); + return; + } + + /* any other control code, beep */ + bell1(); + return; + +} + +static void vidwait(void) { + // check if control-S being pressed + + vidout(); +} + +static void cout1(void) { + + unsigned char s; + + if (a<0xa0) { + } + else { + a=a&ram[INVFLG]; + } + // coutz + ram[YSAV1]=y; + s=a; + + vidwait(); + + a=s; + y=ram[YSAV1]; + +} + static void cout(void) { // FDED + // jmp (cswl) custom handler + cout1(); } static void wait(void) { @@ -837,12 +1030,11 @@ void basic_htab(int xpos) { } ram[CH]=a; // STA MON.CH - // KRW for the win! } -void basic_vtab(int y) { +void basic_vtab(int ypos) { } diff --git a/gr-sim/text.c b/gr-sim/text.c index 91670664..82700c01 100644 --- a/gr-sim/text.c +++ b/gr-sim/text.c @@ -6,7 +6,8 @@ int main(int argc, char **argv) { - int x,y,ch; + int x,y,ch,i; + char output[BUFSIZ]; grsim_init(); @@ -20,7 +21,12 @@ int main(int argc, char **argv) { basic_vtab(10); - basic_print("HELLO WORLD!\n"); + basic_print("HELLO WORLD!\r\r"); + + for(i=0;i<128;i++) { + sprintf(output,"%c",i); + basic_print(output); + } while(1) { grsim_update(); diff --git a/tfv/tfv.s b/tfv/tfv.s index c26d4c51..ad2f5ed2 100644 --- a/tfv/tfv.s +++ b/tfv/tfv.s @@ -465,6 +465,8 @@ put_sprite_pixel: cmp #$0 ; if all zero, transparent beq put_sprite_done_draw ; don't draw it + ; FIXME: use BIT? + sta COLOR ; save color for later and #$f0 ; check if top nibble zero bne put_sprite_bottom ; if not skip ahead