Re: Lisa Fonts

From: Ray Arachelian <ray_at_email.domain.hidden>
Date: Fri, 06 Apr 2007 17:58:58 -0400

Hi Rebecca,

I'm not sure if this will help or not, however, the Lisa boot ROM compresses its icons with some sort of RLE algorithm that stores a flag in bit 0. Here's the source code to decode them - it's a bit obfuscated because that's a fairly straight translation from the 68K assembly to C.

Perhaps the same format is used for the fonts?

When passed a pointer to one of the compressed icons in the ROM, it will output an ASCII text version of the icon using "##" and " " for black and white bits respectively.

unsigned char *decode_icon(unsigned char *icon, unsigned char *text) {
int iindex=0, oindex=0;

int x,y, octals, mapbyte, obit;
static unsigned char output[6*33+1 ];

      memset(output,0,6*33 );

      for (octals=0; octals<24; octals++)
       {  mapbyte=icon[iindex++]|256;
          while(mapbyte)
          {  obit=mapbyte & 1; mapbyte=mapbyte>>1; if (!mapbyte) break;
             if (obit) output[oindex++]=0;
             else      output[oindex++]=icon[iindex++];
          }
       }
       for (iindex=0,oindex=6,y=0; y<31*6; y++) 
output[oindex++]^=output[iindex++];
       puts("\n------------------------------------------------");
       printf("------------------%s---------------------------\n\n",text);
       for (oindex=0, y=0; y<31; y++)          // row
       {   for (x=0; x<6; x++, oindex++)          // x-byte
               for (obit=128; obit; obit=obit>>1)
                    if (output[oindex] & obit) printf("##"); else 
printf("  ");
         puts("");
       }
       puts("\n------------------------------------------------\n\n");

       return output;

}

Rebecca Bettencourt wrote:
> It
> doesn't contain a raw bitmap as far as I know. My current theory is
> that it is somehow compressed, since there are certain patterns
> mapping bytes in the font part to bytes in the metrics part. So I'm
> asking if anybody has documentation on the Lisa font manager, or
> disassemblies from when the Lisa is drawing text, or anything else
> helpful.
>

--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "LisaList" group. To post to this group, send email to lisalist_at_email.domain.hidden To unsubscribe from this group, send email to lisalist-unsubscribe_at_email.domain.hidden For more options, visit this group at http://groups.google.com/group/lisalist?hl=en -~----------~----~----~----~------~----~------~--~---

. Received on 2015-07-15 16:37:12

This archive was generated by hypermail 2.4.0 : 2020-01-13 12:15:14 EST