Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 04:13 10 May 2024 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 : any plans to expand the font range?

Author Message
mbramwel

Regular Member

Joined: 10/07/2013
Location: Canada
Posts: 42
Posted: 07:42pm 16 Jul 2013
Copy link to clipboard 
Print this post

I just picked up a board today and decided to display the fonts on the screen to see what is available. I noticed only the lower 7 bits are being used which means the IBM line drawing characters were missing (as compared to PC DOS BASIC).

I quickly drafted a program to convert the IBM PC FONT to the font format for mmbasic.

I was getting a load error until I noticed the line in the manual that said the custom characters must be between 20 and 126.

Are there any plans to support a full 8-bit range of characters?
If yes, I would be able to load the full IBM PC Compatible font (0 - 255)

 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 02:57am 17 Jul 2013
Copy link to clipboard 
Print this post

I would like to see this too.
Micromites and Maximites! - Beginning Maximite
 
mbramwel

Regular Member

Joined: 10/07/2013
Location: Canada
Posts: 42
Posted: 04:29am 17 Jul 2013
Copy link to clipboard 
Print this post

Not only would I upload the 3 IBM fonts (CGA/EGA/VGA), I would also upload the C64 font.

I think it would be interesting to get the old C64 card games plus some other Basic games ported over. Many of them relied on the Pet character set for drawing simple shapes. Many of the retro systems have their font files on the net; it is trivial for me to convert them (simple php script).

I understand that fonts take memory and perhaps the built-in fonts can remain limited to the 7-bit range.

If you are open to feature requests, allow custom fonts to cover the full 8-bit range.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 05:36am 17 Jul 2013
Copy link to clipboard 
Print this post

Sorry but no, I don't have plans to extend the range for fonts. The main reason is that bit 8 is used to select the colour of the text.

Geoff
Geoff Graham - http://geoffg.net
 
mbramwel

Regular Member

Joined: 10/07/2013
Location: Canada
Posts: 42
Posted: 07:56am 17 Jul 2013
Copy link to clipboard 
Print this post

Thanks for the response. Would you consider expanding to the full 7-bits? I could split the font into 2 halves so that the extra symbols could be available with a wee bit of extra coding.

1-bit color? Bold versus normal?
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 11:13am 17 Jul 2013
Copy link to clipboard 
Print this post

Geoff:

Quot the MMBasic Language Manual Ver 4.4:

Page 16: "Maximum size of a loadable video font is 64 pixels high x 255 pixels wide and 256 characters."
Page 55: "Up to 255 characters can be defined"

So it's 255/256 user-defined chars in total for all of FONT #4 to FONT #10 ?

mbramwel: if that bit is present, the remaining 7 bits are used for choosing the colour for the next chars in that string.
 
Dylan
Regular Member

Joined: 17/06/2013
Location: Netherlands
Posts: 81
Posted: 11:37am 17 Jul 2013
Copy link to clipboard 
Print this post

Fonts for graphics are not really important, since the 'mite has a bit per pixel.

That said, sprites?
 
mbramwel

Regular Member

Joined: 10/07/2013
Location: Canada
Posts: 42
Posted: 12:30pm 17 Jul 2013
Copy link to clipboard 
Print this post

psergiu: Your comments are interesting. Based on Page 16, I should be able to create a full 256 character 8x8 font. However, Page 55 seems to contradict. Geoff said he was not interested in expanding the font situation but perhaps we should ask for clarification of what exactly is the current situation.

Geoff: Is it possible for me to create / load a full 255/256 character font?

Dylan: I agree the graphics are great. My interest in "fonts" is the fact there is a lot of old BASIC software on the net from retro systems that use their font symbols to display certain items. If we wanted to get an old favorite program running on mmite, having the same font would make porting an easier task.

ps: I should state that I grew up on CPM and 8-bit computers through the 70s and 80s. I am feeling nostalgic about some of the old *simple* favourite games from decades ago. Even Linux looks messed up without UTF-8 turned on in your ssh client.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 01:53pm 17 Jul 2013
Copy link to clipboard 
Print this post

Ah, the "255 characters in a font" statement is an error in the documentation. Sorry for the confusion. Also, you cannot have characters in a font below space (20 hex) because they are control characters (CR, TAB, etc).

The simple fact is that MMBasic graphics was not designed to mimic the IBM PC's graphics so some modification will be required to make those games run. It should not be a huge job but also it will not be as simple as just loading a new font.

If I was converting such a game I would write a subroutine that would take a string and output it to the display while switching fonts and mapping the graphics characters to the loaded font. With all the complications hidden in the subroutine you could then modify your game to call the subroutine rather than the PRINT command.

Geoff
Geoff Graham - http://geoffg.net
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 09:26am 19 Jul 2013
Copy link to clipboard 
Print this post

  mbramwel said  
I quickly drafted a program to convert the IBM PC FONT to the font format for mmbasic.


Are you willing to share this?
Micromites and Maximites! - Beginning Maximite
 
mbramwel

Regular Member

Joined: 10/07/2013
Location: Canada
Posts: 42
Posted: 04:38am 22 Jul 2013
Copy link to clipboard 
Print this post

First I want to say: Of Course I will Share!!!

Sorry for disappearing for a few days, unfortunately work and life got in the way of my hobbies but I am back again. As of today, I have had a DuinoMite for 1 week. I have a CG board+case on order but it has not arrived yet. Since I am new, I apologize in advance if I am doing something inappropriate.

Now, I need your opinion on something.

Plan A: read 256 symbols, write 256 symbols. Fail due to unable to create a MM font that large.

Plan B: split the font into a upper and lower character sets. Example: 8x8part1 & 8x8part2. Fail due to the permitted starting point not being 0x0

I think Plan C is required:

I will modify the script so that 8x8full is created. Although it would not be usable in MM, it will be easy for humans to read to pick up specific symbols. I will then create 3 additional *partial* files.

Example: Given the IBM PC Font 8x8 as input, create the following 4 files:
1. 8x8-full.fnt: contains complete character set. Note: Too large for MM
2. 8x8-p1.fnt: lower half of the font (32-126)
3. 8x8-p2.fnt: upper half of the font (160-254)
4. 8x8-p3.fnt: the remaining 0-31 & 128-159 symbols

The script will take the X11 font and create those files in a predictable manner. That should allow us to use nifty X11 fonts in a MM basic program. In the case of card games, you could selectively pick out just the interesting symbols and make a custom small sized file with just the 4 suits (hearts,diamonds, spades, clubs) + box drawing symbols).

Do you think the above layout would be the easiest way to *use* the font files given our restrictions?
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 06:19am 22 Jul 2013
Copy link to clipboard 
Print this post

  mbramwel said  
Do you think the above layout would be the easiest way to *use* the font files given our restrictions?


Yes! I think that is a great way to make a font (or a few fonts) that will be flexible.
Micromites and Maximites! - Beginning Maximite
 
Print this page


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

© JAQ Software 2024