font8x8: Shrink font, compensate for base change
authorAlan Cox <alan@linux.intel.com>
Tue, 16 Dec 2014 18:32:40 +0000 (18:32 +0000)
committerAlan Cox <alan@linux.intel.com>
Tue, 16 Dec 2014 18:32:40 +0000 (18:32 +0000)
It's dumb having the small font 128 symbols long when the first 32 are
weird stuff. Make it 96, and shift by 32 chars when printing. Saves us 256
bytes

Kernel/font8x8.c
Kernel/platform-zx128/zxvideo.s

index c64d97f..b769bc0 100644 (file)
@@ -7,13 +7,13 @@
  */
 
 #ifdef CONFIG_FONT8X8SMALL
-#define FONTDATAMAX 1024
+#define FONTDATAMAX 768
 #else
 #define FONTDATAMAX 2048
 #endif
 
 const unsigned char fontdata_8x8[FONTDATAMAX] = {
-
+#ifndef CONFIG_FONT8X8SMALL
        /* 0 0x00 '^@' */
        0x00, /* 00000000 */
        0x00, /* 00000000 */
@@ -333,7 +333,7 @@ const unsigned char fontdata_8x8[FONTDATAMAX] = {
        0x18, /* 00011000 */
        0x00, /* 00000000 */
        0x00, /* 00000000 */
-
+#endif
        /* 32 0x20 ' ' */
        0x00, /* 00000000 */
        0x00, /* 00000000 */
index 23bbc84..a59da81 100644 (file)
@@ -54,7 +54,7 @@ _plot_char:
         rl b
         ld c, a
 
-        ld hl, #_fontdata_8x8
+        ld hl, #_fontdata_8x8 - 256
         add hl, bc          ; hl points to first byte of char data
 
         ; printing