One of the coolest BASICs for the Mac is free ware, Chipmunk BASIC (I'm going to abbeviate it with CB). It works almost exactly like Commodore BASIC with no need to worry about resources & memory or GUI (unless you really want to).
To make the template first I had to be able to get the character set, fortunately the Commodore character ROMs are a direct bit image. Each byte represents one line and eight lines is a complete 8×8 character. For readability in the legends I chose the VIC-20 set because it matches the C64 set and is not double wide like like the 64 legends. I was able to locate the needed ROM in the VIC directory of VICE, the file name is chargen.
As a to make sure reading was not a problem, I wrote out this test. this reads both the uppercase/graphics set and the second upper/lower case set.
1000 open "chargen" for data input as #3 1010 graphics 0 1020 graphics window 50,50,500,400 1030 xo = 5 : yo = 5 : c = 0 : p = 0 1040 graphics color 50,50,50 1050 graphics rect xo,yo,xo+18,yo+18 1060 graphics color 0,0,0 : l = 0 1070 fp = c*8+l : fseek #3,fp : x = fgetbyte(3) : p = 0 1080 if x and 2^p then graphics fillrect xo+1+(7-p)*2,yo+1+l*2,xo+3+(7-p)*2,yo+3+l*2 1090 p = p+1 : if p < 8 then 1080 1100 l = l+1 : if l < 8 then 1070 1110 c = c+1 : xo = xo+18 : if xo > 460 then xo = 5 : yo = yo+18 1120 if c < 512 then 1040
⇐Sample Output (click to enlarge)
Besides the changing of some symbols to letters, do you notice the four other characters that differ from set to set? (note I added the grey border around each character, which I think improves judging its shape then without it.)
Recently I got a chance to play with the CommodoreOne being developed by Jeri Ellsworth, and found that even though it was great working on a P2S/2 style keyboard, it was darned hard to do any stuff with graphics symbols since they aren't printed on the keys. (one of the reasons I don't do serious Commodore stuff via the emulators too) So, knowing 'I can do something about this' I have went to work on generating the key legends for IBM/Mac Keyboards.
There are two main pieces of information needed, the fist is what are the codes that you get whrn you type shift-key and commodore-key on the 64, and second is getting the graphic images for the key legends.
The first was easy, go to the 64 and write a BASIC program with data statements each statement included the shifted and commodore symbol and the regular key. It generated a number list of the screen codes of the characters with the un-modified key in ASCII from that I generated a DATA statement list for CB:
10 data "+",102,91,"-",92,93,"\",104,105,"Q",107,81,"W",115,87,"E",113,69 20 data "R",114,82,"T",99,84,"Y",119,89,"U",120,85,"I",98,73,"O",121,79 30 data "P",111,80,"@",100,122,"*",95,64,"A",112,65,"S",110,83,"D",108,68 40 data "F",123,70,"G",101,71,"H",116,72,"J",117,74,"K",97,75,"L",118,76 50 data "Z",109,90,"X",125,88,"C",124,67,"V",126,86,"B",127,66,"N",106,78 60 data "M",103,77
There are 31 keys with Commodore/Shift symbols (all the letters, +._,@ and *).
10 data "+",102,91,"-",92,93,"\",104,105,"Q",107,81,"W",115,87,"E",113,69 20 data "R",114,82,"T",99,84,"Y",119,89,"U",120,85,"I",98,73,"O",121,79 30 data "P",111,80,"@",100,122,"*",95,64,"A",112,65,"S",110,83,"D",108,68 40 data "F",123,70,"G",101,71,"H",116,72,"J",117,74,"K",97,75,"L",118,76 50 data "Z",109,90,"X",125,88,"C",124,67,"V",126,86,"B",127,66,"N",106,78 60 data "M",103,77 1000 open "chargen" for data input as #3 1010 graphics 0 1020 graphics window 10,100,30,50 1030 xo = 5 : yo = 5 : c = 0 : p = 0 : z = 0 1035 for z = 1 to 31 1036 print z : read k$,kc,ks 1037 graphics moveto 12,12 : graphics drawtext k$ 1038 c = kc : xo = 4 : yo = 37 : gosub 1040 : c = ks : xo = 16 : gosub 1040 1039 graphics 0 : t$ = "key "+k$ : print t$ : call "savepicture",t$ : cls : next : end 1040 graphics color 20,20,20 1050 graphics rect xo,yo,xo+10,yo+10 1060 graphics color 0,0,0 : l = 0 1070 fp = c*8+l : fseek #3,fp : x = fgetbyte(3) : p = 0 1080 if x and 2^p then graphics rect xo+1+(7-p),yo+1+l,xo+2+(7-p),yo+2+l 1090 p = p+1 : if p < 8 then 1080 1100 l = l+1 : if l < 8 then 1070 1110 return