Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:57 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PC "line drawing" characters in a font

Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 04:17pm 23 Feb 2019
Copy link to clipboard 
Print this post

Following up on matherp's micro-font thread which I pretty much hijacked, here is an 8x8 font with the single-line "box drawing" graphics characters based on those of the old IBM PC Code Page 437 encoding.

Below is the program which drew that screen, including the font definition. I placed the characters not where they are on Code Page 437, but right above the normal ascii characters, positions 128-139 (&h80-&h8B).

As I said in the other thread, it may seem silly to want these characters on a device which has the true graphics ability of the micromite, but I had a use for them, it familiarized me to a degree with how fonts are defined in MMBasic, and I had fun. What more can you ask?
[code]
' pcgraphics.bas
dim string A
dim integer i,j,k,ifont,iStep,nLines,vLoc
dim float fScale

cls
ifont=8
fScale=1.25
A = "FONT: "+str$(ifont)+"; scale: "+str$(fScale)
text 0,0,A,L,ifont,fScale,rgb(white)

A="1 "
for i = 0 to 15 : A = A + chr$(asc("A") + i) + " " : next i
text 0,20,A,L,ifont,fScale,rgb(white)

A="2 "
for i = 0 to 15 : A = A + chr$(asc("Q")+ i) + " " : next i
text 0,40,A,L,ifont,fScale,rgb(white)

A="3 "
for i = 0 to 15 : A = A + chr$(asc("a") + i) + " " : next i
text 0,60,A,L,ifont,fScale,rgb(white)

A="4 "
for i = 0 to 15 : A = A + chr$(asc("q") + i) + " " : next i
text 0,80,A,L,ifont,fScale,rgb(white)

A="5 "
for i = 2 to 15 : A = A + chr$(asc("~") + i) + " " : next i
text 0,100,A,L,ifont,fScale,rgb(white)

vLoc=120
A=chr$(130)+string$(32, chr$(128))+chr$(131)
text 0,vLoc,A,L,ifont,fScale,rgb(white)

A=chr$(129)+string$(32, " ")+chr$(129)
for i = 1 to 10 : vLoc=vLoc+8 : text 0,vLoc,A,L,ifont,fScale,rgb(white) : next i

vLoc=vLoc+8
A=chr$(133)+string$(32, chr$(128))+chr$(132)
text 0,vLoc,A,L,ifont,fScale,rgb(white)

' PCgraphics.bas
' from lizby
' Font type : Standard 8x8 plus PC graphics (109 characters)
' Font size : 8x8 pixels
DefineFont #8
6D200808
00000000 00000000 08080808 00080008 00001414 00000000 247E2400 00247E24
7C507C10 00107C14 08646200 00462610 10281000 003A442A 00100800 00000000
10100800 00081010 08081000 00100808 10280000 0028107C 10100000 0010107C
00000000 10080800 00000000 0000007C 00000000 00181800 08040000 00402010

948C7800 0078C4A4 20A06000 00F82020 04847800 00FC8078 18847800 00788404
50301000 0010FC90 F880FC00 00788404 F8807800 00788484 0804FC00 00202010
78847800 00788484 84847800 0078047C 10000000 00100000 00100000 20101000
10080000 00081020 7C000000 00007C00 10200000 00201008 04423C00 00080008

564A3C00 003C405E 84847800 008484FC F884F800 00F88484 80847800 00788480
8488F000 00F08884 F880FC00 00FC8080 F880FC00 00808080 80847800 0078849C
FC848400 00848484 10107C00 007C1010 04040400 00788484 E0908800 00848890
80808000 00FC8080 B4CC8400 00848484 A4C48400 00848C94 84847800 00788484

8484F800 008080F8 84847800 007894A4 8484F800 008488F8 78807800 00788404
1010FE00 00101010 84848400 00788484 84848400 00304884 84848400 0048B484
30488400 00844830 28448200 00101010 1008FC00 00FC4020 20203800 00382020
20400000 00040810 08083800 00380808 54381000 00101010 00000000 FE000000

A199423C 3C4299A1 04380000 003C443C 78404000 00784444 201C0000 001C2020
3C040400 003C4444 44380000 003C4078 18100C00 00101010 423E0000 3C023E42
78404000 00444444 18000800 001C0808 04000400 18240404 60504000 00485060
10101000 000C1010 54680000 00545454 44780000 00444444 44380000 00384444

44780000 40407844 443C0000 06043C44 201C0000 00202020 40380000 00780438
10381000 000C1010 44440000 00384444 44440000 00102828 54440000 00285454
28440000 00442810 44440000 38043C44 087C0000 007C2010 60101C00 001C1010
10101000 00101010 0C107000 00701010 00281400 00000000 00000000 00000000

ff000000 000000ff 18181818 18181818 1f000000 1818181f f8000000 181818f8
f8181818 000000f8 1f181818 0000001f 1f181818 1818181f f8181818 181818f8
ff181818 000000ff ff000000 181818ff ff181818 181818ff 00ffff00 00ffff00
66666666 66666666

End DefineFont
[/code]
Edited by lizby 2019-02-25
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 05:28pm 23 Feb 2019
Copy link to clipboard 
Print this post

That's great!

Micromites and Maximites! - Beginning Maximite
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 05:51pm 23 Feb 2019
Copy link to clipboard 
Print this post

Corrected because I had horizontal uptic and downtic wrong. Also added "+". Code has been corrected in first post, but CG was too quick for me to get the photo corrected.


(Note that "Scale" in the photo is not effective--only values 1-15 are allowed.)


Edited by lizby 2019-02-25
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 05:57pm 23 Feb 2019
Copy link to clipboard 
Print this post

  lizby said   CG was too quick for me to get the photo corrected.


Sorry, man!
Micromites and Maximites! - Beginning Maximite
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 11:55pm 25 Feb 2019
Copy link to clipboard 
Print this post

4 more line drawing fonts
These are all the upper 127 characters of the IBM fonts.







Sizes are 8x8, 8x14, 8x16, 9x16

2019-02-26_094934_IBMfonts.zip

Jim
VK7JH
MMedit
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 03:39pm 26 Feb 2019
Copy link to clipboard 
Print this post

I ran into various problems with the PC drawing characters at positions above 0x7f--immediately above there some were "magic" characters, so that when I downloaded them, "AUTOSAVE" and "RUN" were invoked. I moved them up 32 positions and still had trouble reading them into an mmbasic program from a file, or inserting strings of them as CONST statements.

My solution was to move them down to the lower case ascii slots, specifically 0x60-0x6e. This eliminates those lower case characters, but they are available by using another 8x8 font. I also added the block character--all bits are 1.

Sorry for the blurryness of the photo. The display itself, a 4.3" SSD1963 on a Nucleo H7 backpack, is quite crisp.


[code]
' pcgraphics.bas
dim string A
dim integer i,j,k,ifont,iStep,nLines,vLoc

cls
ifont=8
A = "FONT: "+str$(ifont)
text 0,0,A,L,ifont,,rgb(white)

A="1 "
for i = 0 to 15 : A = A + chr$(asc("A") + i - 1) + " " : next i
text 0,20,A,L,ifont,,rgb(white)

A="2 "
for i = 0 to 15 : A = A + chr$(asc("P")+ i) + " " : next i
text 0,40,A,L,ifont,,rgb(white)

A="3 "
for i = 0 to 15 : A = A + chr$(asc("`") + i ) + " " : next i
text 0,60,A,L,ifont,,rgb(white)

A="4 "
for i = 0 to 15 : A = A + chr$(asc("p") + i) + " " : next i
text 0,80,A,L,ifont,,rgb(white)

A="5 "
for i = 2 to 15 : A = A + chr$(asc("~") + i) + " " : next i
' text 0,100,A,L,ifont,,rgb(white)

vLoc=120
A=chr$(130)+string$(32, chr$(128))+chr$(131)
' text 0,vLoc,A,L,ifont,,rgb(white)

A=chr$(129)+string$(32, " ")+chr$(129)
' for i = 1 to 10 : vLoc=vLoc+8 : text 0,vLoc,A,L,ifont,,rgb(white) : next i

vLoc=vLoc+8
A=chr$(133)+string$(32, chr$(128))+chr$(132)
' text 0,vLoc,A,L,ifont,,rgb(white)

' PCgraphics.bas
' from lizby
' Font type : Standard 8x8 plus PC graphics replacing lower case (95 characters)
' Font size : 8x8 pixels
DefineFont #8
5F200808
00000000 00000000 08080808 00080008 00001414 00000000 247E2400 00247E24
7C507C10 00107C14 08646200 00462610 10281000 003A442A 00100800 00000000
10100800 00081010 08081000 00100808 10280000 0028107C 10100000 0010107C
00000000 10080800 00000000 0000007C 00000000 00181800 08040000 00402010

948C7800 0078C4A4 20A06000 00F82020 04847800 00FC8078 18847800 00788404
50301000 0010FC90 F880FC00 00788404 F8807800 00788484 0804FC00 00202010
78847800 00788484 84847800 0078047C 10000000 00100000 00100000 20101000
10080000 00081020 7C000000 00007C00 10200000 00201008 04423C00 00080008

564A3C00 003C405E 84847800 008484FC F884F800 00F88484 80847800 00788480
8488F000 00F08884 F880FC00 00FC8080 F880FC00 00808080 80847800 0078849C
FC848400 00848484 10107C00 007C1010 04040400 00788484 E0908800 00848890
80808000 00FC8080 B4CC8400 00848484 A4C48400 00848C94 84847800 00788484

8484F800 008080F8 84847800 007894A4 8484F800 008488F8 78807800 00788404
1010FE00 00101010 84848400 00788484 84848400 00304884 84848400 0048B484
30488400 00844830 28448200 00101010 1008FC00 00FC4020 20203800 00382020
20400000 00040810 08083800 00380808 54381000 00101010 00000000 FE000000

ff000000 000000ff 18181818 18181818 1f000000 1818181f f8000000 181818f8
f8181818 000000f8 1f181818 0000001f ff181818 000000ff ff000000 181818ff
f8181818 181818f8 1f181818 1818181f ffffffff ffffffff ff181818 181818ff
00ffff00 00ffff00 66666666 66666666 44780000 00444444 44380000 00384444

44780000 40407844 443C0000 06043C44 201C0000 00202020 40380000 00780438
10381000 000C1010 44440000 00384444 44440000 00102828 54440000 00285454
28440000 00442810 44440000 38043C44 087C0000 007C2010 60101C00 001C1010
10101000 00101010 0C107000 00701010 00281400 00000000 00000000 00000000

End DefineFont
[/code]

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 04:49pm 26 Feb 2019
Copy link to clipboard 
Print this post

Thanks for those fonts, Jim. For display purposes, I replaced the first character with a space (all zeros). Here's the 8x8 font.



The program:
[code]
dim string A
dim integer i,j,k,ifont,iStep,nLines,vLoc

cls
ifont=8
font 8
print "font ";ifont;": ";mm.fontheight;" ";mm.fontwidth

for k = 1 to 8
A=str$(k,2,0)+" "
print A
text 0,vLoc,A,L,7,,rgb(white)
A=""
for i = 1 to 16 : A = A + chr$((k-1)*16 + i) + chr$(1) : next i
text mm.fontwidth*3,vLoc,A,L,ifont,,rgb(white)
vLoc=vLoc+mm.fontheight*2
next k

' IBM_BIOS8x8_U.bas
' Font type : Full (127 characters)
' Font size : 8x8 pixels
' Memory usage : 1020 bytes
' Font adapted from: http://www.rinkydinkelectronics.com/r_fonts.php

' 7F010808 CCC0CC78 780C1878 CC00CC00 007ECCCC CC78001C 0078C0FC 063CC37E

DefineFont #8
7F010808 00000000 00000000 CC00CC00 007ECCCC CC78001C 0078C0FC 063CC37E
003F663E 0C7800CC 007ECC7C 0C7800E0 007ECC7C 0C783030 007ECC7C C0780000
380C78C0 663CC37E 003C607E CC7800CC 0078C0FC CC7800E0 0078C0FC 307000CC
00783030 1838C67C 003C1818 307000E0 00783030 C66C38C6 00C6C6FE 78003030
00CCFCCC 60FC001C 00FC6078 0C7F0000 007FCC7F FECC6C3E 00CECCCC 7800CC78
0078CCCC 7800CC00 0078CCCC 7800E000 0078CCCC CC00CC78 007ECCCC CC00E000
007ECCCC CC00CC00 F80C7CCC 663C18C3 00183C66 CCCC00CC 0078CCCC C07E1818
18187EC0 F0646C38 00FCE660 FC78CCCC 3030FC30 FACCCCF8 C7C6CFC6 3C181B0E
70D81818 0C78001C 007ECC7C 30700038 00783030 78001C00 0078CCCC CC001C00
007ECCCC F800F800 00CCCCCC ECCC00FC 00CCDCFC 3E6C6C3C 00007E00 386C6C38
00007C00 60300030 0078CCC0 FC000000 0000C0C0 FC000000 00000C0C DECCC6C3
0FCC6633 DBCCC6C3 03CF6F37 18001818 00181818 CC663300 00003366 3366CC00
0000CC66 88228822 88228822 AA55AA55 AA55AA55 EEDB77DB EEDB77DB 18181818
18181818 18181818 181818F8 18F81818 181818F8 36363636 363636F6 00000000
363636FE 18F80000 181818F8 06F63636 363636F6 36363636 36363636 06FE0000
363636F6 06F63636 000000FE 36363636 000000FE 18F81818 000000F8 00000000
181818F8 18181818 0000001F 18181818 000000FF 00000000 181818FF 18181818
1818181F 00000000 000000FF 18181818 181818FF 181F1818 1818181F 36363636
36363637 30373636 0000003F 303F0000 36363637 00F73636 000000FF 00FF0000
363636F7 30373636 36363637 00FF0000 000000FF 00F73636 363636F7 00FF1818
000000FF 36363636 000000FF 00FF0000 181818FF 00000000 363636FF 36363636
0000003F 181F1818 0000001F 181F0000 1818181F 00000000 3636363F 36363636
363636FF 18FF1818 181818FF 18181818 000000F8 00000000 1818181F FFFFFFFF
FFFFFFFF 00000000 FFFFFFFF F0F0F0F0 F0F0F0F0 0F0F0F0F 0F0F0F0F FFFFFFFF
00000000 DC760000 0076DCC8 F8CC7800 C0C0F8CC C0CCFC00 00C0C0C0 6C6CFE00
006C6C6C 3060CCFC 00FCCC60 D87E0000 0070D8D8 66666600 C0607C66 18DC7600
00181818 CC7830FC FC3078CC FEC66C38 00386CC6 C6C66C38 00EE6C6C 7C18301C
0078CCCC DB7E0000 00007EDB DB7E0C06 C0607EDB F8C06038 003860C0 CCCCCC78
00CCCCCC FC00FC00 0000FC00 30FC3030 00FC0030 30183060 00FC0060 30603018
00FC0018 181B1B0E 18181818 18181818 70D8D818 FC003030 00303000 00DC7600
0000DC76 386C6C38 00000000 18000000 00000018 00000000 00000018 0C0C0C0F
1C3C6CEC 6C6C6C78 0000006C 60301870 00000078 3C3C0000 00003C3C 00000000
End DefineFont
[/code]

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 04:51pm 26 Feb 2019
Copy link to clipboard 
Print this post

The 9x16:



[code]
dim string A
dim integer i,j,k,ifont,iStep,nLines,vLoc

cls
ifont=8
font 8
print "font ";ifont;": ";mm.fontheight;" ";mm.fontwidth

for k = 1 to 8
A=str$(k,2,0)+" "
print A
text 0,vLoc,A,L,7,,rgb(white)
A=""
for i = 1 to 16 : A = A + chr$((k-1)*16 + i) + chr$(1) : next i
text mm.fontwidth*3,vLoc,A,L,ifont,,rgb(white)
vLoc=vLoc+mm.fontheight*2
next k

' IBM_VGA9_U.bas
' Font type : Full (127 characters)
' Font size : 9x16 pixels
' Memory usage : 2290 bytes
' Font adapted from: http://www.rinkydinkelectronics.com/r_fonts.php

' 7F011009 0C0F0000 010326CC 0F33C280 E0638001 00000000 06000033 CC983163

DefineFont #8
7F011009 00000000 00000000 00000000 00000000 00000000 06000033 CC983163
C00E3366 00000000 06060600 19E30300 3160C0FC 0000808F 08000000 03800D0E
CCF830C0 C00E3366 00000000 00330000 30C00300 3366CCF8 0000C00E 30000000
0300030C CCF830C0 C00E3366 00000000 071B1C00 30C00300 3366CCF8 0000C00E
00000000 C3030000 66C08031 C300031E 000000C0 0D0E0800 19E30380 3160C0FC
0000808F 00000000 03008031 C0FC19E3 808F3160 00000000 030C3000 19E30300
3160C0FC 0000808F 00000000 01008019 183060C0 8007060C 00000000 0C0F0C00
60C001C0 060C1830 00008007 30000000 0100030C 183060C0 8007060C 00000000
02006300 19638303 3163FE8C 0000C098 36380000 8303000E FE8C1963 C0983163
00000000 00181818 8031E30F 193060F8 0000C09F 00000000 03000000 7E36EC70
E00E376C 00000000 8D0F0000 F963C68C 3366CC98 0000C019 08000000 03800D0E
C68C19E3 808F3163 00000000 80310000 19E30300 3163C68C 0000808F 30000000
0300030C C68C19E3 808F3163 00000000 191E1800 31630680 3366CC98 0000C00E
30000000 0600030C CC983163 C00E3366 00000000 80310000 19330600 3163C68C
6160C08F 630000E0 668C0F00 C68C1933 808F3163 00000000 18006300 193366CC
3163C68C 0000808F 0C000000 36CC0F06 C3800103 0003063F 00000000 0C1B1C00
80810786 393060C0 0000809F 00000000 C0C3CC30 FF30FCC3 0003060C 00000000
8C197E00 9811C3C7 193366DE 0000609E 07000000 8001C306 1830F8C1 0D03060C
00008083 0C0C0C00 30C00300 3366CCF8 0000C00E 06000000 01000606 183060C0
8007060C 00000000 0C0C0C00 19E30300 3163C68C 0000808F 0C000000 06000C0C
CC983163 C00E3366 00000000 9B1D0000 98E10680 193366CC 0000C08C 6E760000
67CE1800 CEBCF9B3 C0983163 00000000 0D1B1E00 F801E083 00000000 00000000
1C000000 80830D1B 0000F001 00000000 00000000 060C0000 C0800100 3163C0C0
0000808F 00000000 00000000 C080F903 00003060 00000000 00000000 F8030000
0103060C 00000080 60000000 664C1830 60606060 C0C02667 0000F8C0 18306000
6060664C 25676660 3060C087 00000000 00000306 3C3060C0 00030F1E 00000000
00000000 B1B10100 001B6CB0 00000000 00000000 06000000 6C6CB0C1 0000006C
00000000 48042211 44201281 04221188 20128148 55558844 55455515 55545551
45551555 54555155 4EB73BDD 74BBD3ED B73BDDEE BBD3ED4E 0C18EE74 80010306
183060C0 0103060C 3060C080 03060C18 61C08001 060C18F0 C0800103 0C183060
87010306 18F061C0 0103060C 3060C080 860D1B36 D9B061C3 0D1B36EC B061C386
00006CD8 00000000 36FC0100 C3860D1B 6CD8B061 00000000 61C00700 060C18F0
C0800103 1B363060 67C3860D 36EC19B0 C3860D1B 6CD8B061 860D1B36 D8B061C3
0D1B366C B061C386 00006CD8 07000000 36EC19F0 C3860D1B 6CD8B061 860D1B36
19B067C3 000000FC 00000000 1B360000 61C3860D 00FCD9B0 00000000 00000000
03060C18 61C08701 000000F0 00000000 00000000 00000000 18F00100 0103060C
3060C080 03060C18 60C08001 0000003F 00000000 0C180000 80010306 00FF61C0
00000000 00000000 00000000 01000000 060C18FF C0800103 0C183060 80010306
183F60C0 0103060C 3060C080 00000000 01000000 000000FF 00000000 0C180000
80010306 18FF61C0 0103060C 3060C080 03060C18 60FC8001 060C183F C0800103
1B363060 61C3860D 366FD8B0 C3860D1B 6CD8B061 860D1B36 C0BC61C3 0000007F
00000000 00000000 01000000 366FC0FC C3860D1B 6CD8B061 860D1B36 01BC67C3
000000FF 00000000 00000000 07000000 36EF01FC C3860D1B 6CD8B061 860D1B36
C0BC61C3 0D1B366F B061C386 00006CD8 07000000 00FF01FC 00000000 00000000
860D1B36 01BC67C3 0D1B36EF B061C386 0C186CD8 87010306 00FF01FC 00000000
00000000 860D1B36 D9B061C3 000000FF 00000000 00000000 07000000 18FF01FC
0103060C 3060C080 00000000 01000000 0D1B36FF B061C386 1B366CD8 61C3860D
007FD8B0 00000000 00000000 03060C18 60FC8001 0000003F 00000000 00000000
00000000 183F60FC 0103060C 3060C080 00000000 00000000 0D1B367F B061C386
1B366CD8 61C3860D 36FFD9B0 C3860D1B 6CD8B061 03060C18 61FC8701 060C18FF
C0800103 0C183060 80010306 00F061C0 00000000 00000000 00000000 00000000
060C183F C0800103 FFFF3060 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000
01000000 FFFFFFFF FFFFFFFF 78F0FFFF 070F1E3C F0E0C183 0F1E3C78 E0C18307
E1C3870F 3E7CF8F0 C3870F1F 7CF8F0E1 FFFF1F3E FFFFFFFF 0000FEFF 00000000
00000000 00000000 71B30300 376CD8B0 0000C00E 00000000 C68C191E C6986163
80993163 00000000 983F0000 010366CC 3060C080 00000018 00000000 E30F0000
6CD8B061 800D1B36 00000000 1F000000 C00063CC 31303030 0000C09F 00000000
03000000 D8B061F3 000E366C 00000000 00000000 98316306 183E66CC 00000C0C
00000000 66070000 183060E0 0003060C 00000000 0F000000 98E181C1 061E66CC
0000C00F 00000000 C6060700 C6FC1933 00071B63 00000000 0D0E0000 1833668C
1B366CD8 0000C01D 00000000 80018607 66CCF860 80871933 00000000 00000000
6DF30300 003FDBB6 00000000 00000000 63600000 F3B66DF3 0018183F 00000000
06070000 F0010306 0C3060C0 00008003 00000000 668C0F00 C68C1933 C0983163
00000000 00000000 0100E00F 3F0000FC 00000080 00000000 80010000 1830F8C1
E01F0000 00000000 06000000 18608001 00181818 0000C00F 00000000 81810100
18608081 C00F0006 00000000 83030000 60C0B061 060C1830 C0800103 0C183060
80010306 D83060C0 000E366C 00000000 00000000 00C08001 060C00FC 00000000
00000000 03000000 760070B3 0000006E 00000000 0D1B1C00 00008083 00000000
00000000 00000000 00000000 18300000 00000000 00000000 00000000 00000000
00001800 00000000 07000000 C0800183 6CD83160 80030F36 00000000 0D1B6C00
B061C386 00000000 00000000 38000000 06060636 0000E043 00000000 00000000
00000000 F0E1C307 1F3E7CF8 00000000 00000000
End DefineFont
[/code]

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 11:43pm 26 Feb 2019
Copy link to clipboard 
Print this post

I thought I would try a font with 254 characters. I wasn't sure if ewe could go above chr$(127). We can.

dim integer x,y,k

cls
font 8

for k = 1 to 255
x = ((k-1) mod 32) * 20 + 20
y = int((k-1) / 32) * 40 + 10

text x,y,chr$(k),c,8,2

next k

save image "Fonts.bmp"
' IBM_VGA9x16_all.bas
' Font type : Full (254 characters)
' Font size : 9x16 pixels
' Memory usage : 4576 bytes
' First character : 1

DefineFont #8
FE011009 901F0000 050A542A A040997A 0000C04F 00000000 B7ED9F1F E786FDFB
C0CFBF7F 00000000 00000000 F9F3C706 0E3EFEFC 00000002 00000000 01010000
7CFCF1C1 0000041C 00000000 03000000 9DE3C103 060CE7CE 00008007 00000000
C3030300 7EFEFDF3 8007060C 00000000 00000000 60000000 000C3C78 00000000
7FFF0000 F7EFDFBF C3869DFB EFDFBF73 FEFDFBF7 00000000 98E10100 0F334284
00000000 7FFF0000 F6EFDFBF BD7A651A EFDFB04C FEFDFBF7 81070000 E191A1C1
3366CC98 0000000F 00000000 63C60C0F 18789831 0003063F 00000000 C60F0000
C080F163 3C383060 0000001C 00000000 F367CC1F 63C68C19 CCDCB933 00000000
03000000 F1D88601 866D3CCE 00000003 40000000 070F1C30 F0F0F9C3 00103070
00000000 81010100 F8F3E1C1 01071E7C 00004080 00000000 E0870706 7E3060C0
0000061E 00000000 8C190000 983163C6 190066CC 0000C08C 00000000 B66DDB1F
1B36ECD9 60C3860D 00000000 8C313E00 19638303 031C6C8C 00C0C718 00000000
00000000 FE000000 C09F3F7F 00000000 07060000 60C0E087 061E7E30 0000C00F
00000000 E0870706 183060C0 0003060C 00000000 03060000 60C08001 0F3F1830
00000003 00000000 00000000 0CFC31C0 0000000C 00000000 00000000 81810100
001860FC 00000000 00000000 00000000 C0800103 0000007F 00000000 00000000
99210100 001266FE 00000000 00000000 01010000 7CF8E0C0 00803F7F 00000000
00000000 F0F1E70F 041C38F8 00000000 00000000 00000000 00000000 00000000
00000000 07060000 60E0C183 06001830 00000003 33000000 40C28C19 00000000
00000000 00000000 0D000000 B0F1C786 1B7F6CD8 0000800D 0C180000 26CC181F
060CF001 818F3143 0000C080 00000000 3030260C 31303030 0000C090 00000000
C1860D0E CCB8D9C1 C00E3366 00000000 060C1800 00000006 00000000 00000000
00000000 01030303 3060C080 80010618 00000000 030C0000 3060C000 06060C18
00000006 00000000 03000000 3CFEF130 00000033 00000000 00000000 60C00000
000C18FC 00000000 00000000 00000000 00000000 0303060C 00000000 00000000
01000000 000000FC 00000000 00000000 00000000 00000000 00030600 00000000
00000000 30302000 30303030 00000010 00000000 36CC0C0F C3B66D1B 80879961
00000000 07060000 60C08007 060C1830 0000C00F 00000000 60C0181F 60606060
C09F3160 00000000 181F0000 F03060C0 3103060C 0000808F 00000000 C3830303
0CFC3163 C0030306 00000000 983F0000 F003060C 3103060C 0000808F 00000000
060C0C0E C68CF103 808F3163 00000000 983F0000 303060C0 0C183030 00000006
00000000 66CC181F C68CF131 808F3163 00000000 181F0000 F83166CC 0303060C
0000000F 00000000 80010000 000000C0 0000060C 00000000 00000000 00C08001
060C0000 00000006 00000000 C0C00000 30C0C0C0 C000030C 00000000 00000000
00F00300 00007E00 00000000 00000000 00030C00 0C0C30C0 000C0C0C 00000000
181F0000 606060CC 06001830 00000003 00000000 668C0F00 DEBC7933 800F306E
00000000 07040000 1933C606 3163C6FC 0000C098 00000000 63C60C3F 66CCF031
809F1933 00000000 0C0F0000 010326CC 1961C080 00008087 00000000 63860D3E
66CC9831 001F1B33 00000000 8C3F0000 E04123C6 193160D0 0000C09F 00000000
23C68C3F 60D0E041 001E1830 00000000 0C0F0000 010326CC 1963C6BC 00004087
00000000 66CC9831 C68CF933 C0983163 00000000 030F0000 60C08001 060C1830
00008007 00000000 C0808107 CC183060 000F3366 00000000 8C390000 E06163C6
19336CF0 0000C09C 00000000 03060C3C 60C08001 C09F1931 00000000 DC300000
6DFBF7EF B061C386 000060D8 00000000 67CF9C31 C69C79F3 C0983163 00000000
181F0000 193366CC 3163C68C 0000808F 00000000 63C60C3F 60C0F031 001E1830
00000000 181F0000 193366CC 376BC68C 70C0808F 00000000 63C60C3F 66D8F031
C09C1933 00000000 181F0000 E00063CC 31630618 0000808F 00000000 9069DB3F
183060C0 8007060C 00000000 98310000 193366CC 3163C68C 0000808F 00000000
366CD830 C3860D1B 00030F33 00000000 D8300000 0D1B366C 997FDBB6 0000C08C
00000000 6166D830 3C3060E0 60D83033 00000000 D8300000 F030336C 060C1830
00008007 00000000 6068D83F 60606060 E0DFB060 00000000 060F0000 C0800103
0C183060 00008007 00000000 070C1000 1C70C001 40800107 00000000 010F0000
3060C080 03060C18 00008007 1C100000 00C0181B 00000000 00000000 00000000
00000000 00000000 00000000 F8070000 18300000 00000006 00000000 00000000
00000000 00000000 30C00300 3366CCF8 0000C00E 00000000 03060C38 66CCB0C1
808F1933 00000000 00000000 19E30300 3160C080 0000808F 00000000 C1800107
CC98B1E1 C00E3366 00000000 00000000 19E30300 3160C0FC 0000808F 00000000
43860D0E 60C0C003 001E1830 00000000 00000000 31B30300 3366CC98 61C6800F
000000E0 03060C38 66CCD861 C09C1933 00000000 03060000 60C00100 060C1830
00008007 00000000 00C08001 060C1870 C6800103 00F03063 0C380000 B0310306
193678F0 0000C09C 00000000 8001030E 183060C0 8007060C 00000000 00000000
FD330700 B66DDBB6 000060DB 00000000 06000000 66CC98E1 C08C1933 00000000
00000000 19E30300 3163C68C 0000808F 00000000 06000000 66CC98E1 868F1933
00C00303 00000000 31B30300 3366CC98 60C0800F 00000078 06000000 60CCD8E1
001E1830 00000000 00000000 18E30300 310638C0 0000808F 00000000 07030604
3060C0E0 80830D18 00000000 00000000 31630600 3366CC98 0000C00E 00000000
06000000 C3860D1B 00030F33 00000000 00000000 0D1B0600 BF6DDB86 0000C0CC
00000000 06000000 18789819 6098191E 00000000 00000000 19330600 3163C68C
6360C08F 000000E0 07000000 303030F3 C09F3130 00000000 83030000 C0C18001
060C1830 0000C001 00000000 80010306 183000C0 0003060C 00000000 031C0000
38C08001 060C1830 0000000E 00000000 00809B1D 00000000 00000000 00000000
00000000 B1C10101 3F63C68C 00000080 00000000 26CC0C0F C2800103 80010F33
0000E063 00330000 31630600 3366CC98 0000C00E 06000000 03000606 C0FC19E3
808F3160 00000000 0D0E0800 30C00380 3366CCF8 0000C00E 00000000 03000033
CCF830C0 C00E3366 00000000 030C3000 30C00300 3366CCF8 0000C00E 1C000000
0300071B CCF830C0 C00E3366 00000000 00000000 8031C303 031E66C0 00C0C300
08000000 03800D0E C0FC19E3 808F3160 00000000 80310000 19E30300 3160C0FC
0000808F 30000000 0300030C C0FC19E3 808F3160 00000000 80190000 60C00100
060C1830 00008007 0C000000 01C00C0F 183060C0 8007060C 00000000 030C3000
60C00100 060C1830 00008007 63000000 83030200 FE8C1963 C0983163 00000000
000E3638 19638303 3163FE8C 0000C098 18180000 E30F0018 60F88031 C09F1930
00000000 00000000 EC700300 376C7E36 0000E00E 00000000 C68C8D0F CC98F963
C0193366 00000000 0D0E0800 19E30380 3163C68C 0000808F 00000000 03008031
C68C19E3 808F3163 00000000 030C3000 19E30300 3163C68C 0000808F 18000000
0680191E CC983163 C00E3366 00000000 030C3000 31630600 3366CC98 0000C00E
00000000 06008031 C68C1933 C08F3163 00E06160 0F006300 1933668C 3163C68C
0000808F 63000000 66CC1800 C68C1933 808F3163 00000000 0F060C00 010336CC
063FC380 00000003 1C000000 07860C1B 60C08081 809F3930 00000000 CC300000
FCC3C0C3 060CFF30 00000003 7E000000 C3C78C19 66DE9811 609E1933 00000000
C3060700 F8C18001 060C1830 80830D03 0C000000 03000C0C CCF830C0 C00E3366
00000000 06060600 60C00100 060C1830 00008007 0C000000 03000C0C C68C19E3
808F3163 00000000 0C0C0C00 31630600 3366CC98 0000C00E 00000000 06809B1D
66CC98E1 C08C1933 00000000 18006E76 F9B367CE 3163CEBC 0000C098 1E000000
E0830D1B 0000F801 00000000 00000000 0D1B1C00 F0018083 00000000 00000000
00000000 0100060C C0C0C080 808F3163 00000000 00000000 F9030000 3060C080
00000000 00000000 00000000 060CF803 00800103 00000000 18306000 6060664C
26676060 F8C0C0C0 60000000 664C1830 66606060 C0872567 00003060 03060000
60C00000 0F1E3C30 00000003 00000000 01000000 6CB0B1B1 0000001B 00000000
00000000 B0C10600 006C6C6C 00000000 22110000 12814804 11884420 81480422
88442012 55155555 55515545 15555554 51554555 3BDD5455 D3ED4EB7 DDEE74BB
ED4EB73B EE74BBD3 03060C18 60C08001 060C1830 C0800103 0C183060 80010306
18F061C0 0103060C 3060C080 03060C18 61C08701 060C18F0 C0800103 1B363060
61C3860D 36ECD9B0 C3860D1B 6CD8B061 00000000 01000000 0D1B36FC B061C386
00006CD8 07000000 18F061C0 0103060C 3060C080 860D1B36 19B067C3 0D1B36EC
B061C386 1B366CD8 61C3860D 366CD8B0 C3860D1B 6CD8B061 00000000 19F00700
0D1B36EC B061C386 1B366CD8 67C3860D 00FC19B0 00000000 00000000 860D1B36
D9B061C3 000000FC 00000000 0C180000 87010306 00F061C0 00000000 00000000
00000000 01000000 060C18F0 C0800103 0C183060 80010306 003F60C0 00000000
00000000 03060C18 61C08001 000000FF 00000000 00000000 00000000 18FF0100
0103060C 3060C080 03060C18 60C08001 060C183F C0800103 00003060 00000000
00FF0100 00000000 00000000 03060C18 61C08001 060C18FF C0800103 0C183060
80010306 183F60FC 0103060C 3060C080 860D1B36 D8B061C3 0D1B366F B061C386
1B366CD8 61C3860D 007FC0BC 00000000 00000000 00000000 C0FC0100 0D1B366F
B061C386 1B366CD8 67C3860D 00FF01BC 00000000 00000000 00000000 01FC0700
0D1B36EF B061C386 1B366CD8 61C3860D 366FC0BC C3860D1B 6CD8B061 00000000
01FC0700 000000FF 00000000 1B360000 67C3860D 36EF01BC C3860D1B 6CD8B061
03060C18 01FC8701 000000FF 00000000 1B360000 61C3860D 00FFD9B0 00000000
00000000 00000000 01FC0700 060C18FF C0800103 00003060 00000000 36FF0100
C3860D1B 6CD8B061 860D1B36 D8B061C3 0000007F 00000000 0C180000 80010306
003F60FC 00000000 00000000 00000000 60FC0000 060C183F C0800103 00003060
00000000 367F0000 C3860D1B 6CD8B061 860D1B36 D9B061C3 0D1B36FF B061C386
0C186CD8 87010306 18FF61FC 0103060C 3060C080 03060C18 61C08001 000000F0
00000000 00000000 00000000 183F0000 0103060C 3060C080 FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF 0000FFFF 00000000 FFFF0100 FFFFFFFF FFFFFFFF 1E3C78F0
C183070F 3C78F0E0 83070F1E 870FE0C1 F8F0E1C3 0F1F3E7C F0E1C387 1F3E7CF8
FFFFFFFF FEFFFFFF 00000000 00000000 00000000 03000000 D8B071B3 C00E376C
00000000 191E0000 6163C68C 3163C698 00008099 00000000 66CC983F C0800103
00183060 00000000 00000000 B061E30F 1B366CD8 0000800D 00000000 63CC1F00
3030C000 C09F3130 00000000 00000000 61F30300 366CD8B0 0000000E 00000000
63060000 66CC9831 0C0C183E 00000000 00000000 60E06607 060C1830 00000003
00000000 81C10F00 66CC98E1 C00F061E 00000000 07000000 1933C606 1B63C6FC
00000007 00000000 668C0D0E 6CD81833 C01D1B36 00000000 86070000 F8608001
193366CC 00008087 00000000 03000000 DBB66DF3 0000003F 00000000 00000000
6DF36360 183FF3B6 00000018 00000000 03060607 60C0F001 80030C30 00000000
0F000000 1933668C 3163C68C 0000C098 00000000 E00F0000 00FC0100 00803F00
00000000 00000000 F8C18001 00001830 0000E01F 00000000 80010600 18181860
C00F0018 00000000 01000000 80818181 00061860 0000C00F 00000000 B0618303
183060C0 0103060C 3060C080 03060C18 60C08001 366CD830 0000000E 00000000
80010000 00FC00C0 0000060C 00000000 00000000 70B30300 006E7600 00000000
1C000000 80830D1B 00000000 00000000 00000000 00000000 00000000 00001830
00000000 00000000 00000000 18000000 00000000 00000000 01830700 3160C080
0F366CD8 00008003 6C000000 C3860D1B 0000B061 00000000 00000000 06363800
E0430606 00000000 00000000 00000000 C3070000 7CF8F0E1 00001F3E 00000000
00000000
End DefineFont


The results:



  Quote  I ran into various problems with the PC drawing characters at positions above 0x7f--immediately above there some were "magic" characters, so that when I downloaded them, "AUTOSAVE" and "RUN" were invoked.

There will be problems with chr$(3) and chr$(26) if you embed them directly into a string and try to use AUTOSAVE. Others might also be trouble. Theer shouldn't be an issue if you upload using XMODEM

There is no problem printing them.

The above test was on an Armite H7 with 5inch display.



VK7JH
MMedit
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 11:57pm 26 Feb 2019
Copy link to clipboard 
Print this post

No problem printing characters above 0x7f, but I had varying problems downloading them with AUTOSAVE or after downloading them in strings with XMODEM, printing them.

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 01:38am 27 Feb 2019
Copy link to clipboard 
Print this post

you'll find that AUTOSAVE clears the top bit on all incoming characters, while the micromite's built-in editor just fails to cope with the top bit being set.

see this thread for discussion:
https://www.thebackshed.com/forum/forum_posts.asp?TID=11139


cheers,
rob :-)
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:41am 27 Feb 2019
Copy link to clipboard 
Print this post

Characters above 0x7f will also get caught up with the ASCII/UTF8/Unicode translation problems.

Jim
VK7JH
MMedit
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025