Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:06 05 Jan 2026 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 : Font/character read, modify in PicoMite

Author Message
terekgabor
Newbie

Joined: 02/01/2026
Location: Hungary
Posts: 8
Posted: 11:58am 02 Jan 2026
Copy link to clipboard 
Print this post

Hello!

Is there any way in PicoMite to manipulate charactets in a font?
For example modify one of the character in the actual font during running a program.
I know DefineFont, but this can’t modify during running.
Maybe can we somehow write it in memory?
I planned to write a font editor program, but stucked at the beginning  
Thanks a lot!
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1081
Posted: 09:22pm 02 Jan 2026
Copy link to clipboard 
Print this post

See these commands in the manual. These can tell you where a user defined font is located in memory. You would the need to add an offset to get to a particular character.
MM.INFO(FONT ADDRESS n)
MM.INFO(FONT POINTER n)
F4 H7FotSF4xGT
 
terekgabor
Newbie

Joined: 02/01/2026
Location: Hungary
Posts: 8
Posted: 10:12pm 02 Jan 2026
Copy link to clipboard 
Print this post

Hello!

I saw them, but I am not so clear how to use them.
What is ADDRESS and POINTER?
Which is telling the start memory address of the font?
What is the format of the fonts in the memory?
How I can read from memory?
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4187
Posted: 10:36pm 02 Jan 2026
Copy link to clipboard 
Print this post

PEEK and see.

John
 
terekgabor
Newbie

Joined: 02/01/2026
Location: Hungary
Posts: 8
Posted: 10:48pm 02 Jan 2026
Copy link to clipboard 
Print this post

Yes! Works with PEEK to read.
MM.INFO(FONT ADDRESS n) is the start address.
But I can only read, can’t write with poke  

Gábor
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2905
Posted: 10:57pm 02 Jan 2026
Copy link to clipboard 
Print this post

I don't have a CMM2 but it should be similar to this.
  Quote  MM.INFO(FONT) Returns the number of the currently active font.
MM.INFO(FONT ADDRESS n) Returns the address of the memory location with the address of FONT n .
MM.INFO(FONT POINTER n) Returns a POINTER to the start of FONT n in memory.
MM.INFO(FONTHEIGHT) Integers representing the height of the current font (in pixels).
MM.INFO(FONTWIDTH) Integers representing the width of the current font (in pixels).

PEEK(BYTE addr%) Will return a byte or a word within the processor’s virtual memory space.


So for the font currently in use try :-
Print PEEK(BYTE MM.INFO(FONT POINTER n)+offset%)

Where offset% is the number of bytes to the character you want.
The number of bytes per character can be calculated from -
Character No. * MM.INFO(FONTHEIGHT) * MM.INFO(FONTWIDTH) / 8.
For "A" Character No. = 65

If the number of bits per character in the font isn't a multiple of 8 extra calculations may be needed.
 
terekgabor
Newbie

Joined: 02/01/2026
Location: Hungary
Posts: 8
Posted: 11:00pm 02 Jan 2026
Copy link to clipboard 
Print this post

Yes reading is working, but I can’t write - so modify.

Gábor
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1081
Posted: 11:01pm 02 Jan 2026
Copy link to clipboard 
Print this post

  terekgabor said  Yes! Works with PEEK to read.
MM.INFO(FONT ADDRESS n) is the start address.
But I can only read, can’t write with poke  

Gábor


You will only be able to POKE a user defined font. The included one would be stored in Flash.
F4 H7FotSF4xGT
 
terekgabor
Newbie

Joined: 02/01/2026
Location: Hungary
Posts: 8
Posted: 11:03pm 02 Jan 2026
Copy link to clipboard 
Print this post

I tried with font 10, I made. Can’t write.
Gábor
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1081
Posted: 12:09am 03 Jan 2026
Copy link to clipboard 
Print this post

My mistake I think. User defined font will be in the Program Memory which is also Flash, so not writable in a program. You might be able to copy it to RAM and then change the pointer to point to the RAM copy.
F4 H7FotSF4xGT
 
terekgabor
Newbie

Joined: 02/01/2026
Location: Hungary
Posts: 8
Posted: 06:10am 03 Jan 2026
Copy link to clipboard 
Print this post

Is there any memory map for it? Where can I find unallocated RAM addresses?
Gábor
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4187
Posted: 08:02am 03 Jan 2026
Copy link to clipboard 
Print this post

  terekgabor said  Is there any memory map for it? Where can I find unallocated RAM addresses?
Gábor

Probably best to install the toolchain and build Picomite MMBasic so you get a MAP file etc.

Or, look at the Picomite ld file on github as it may show as much as you need.

The Pico datasheet etc will also give RAM etc address.

The info on CSUBs may be useful, too.

Don't forget the MMBasic sources inevitably contain such as start addresses of the various regions it uses and the allocation algorithms so you know what is used and when.

John
Edited 2026-01-03 18:04 by JohnS
 
terekgabor
Newbie

Joined: 02/01/2026
Location: Hungary
Posts: 8
Posted: 08:04am 03 Jan 2026
Copy link to clipboard 
Print this post

Thanks!
Gábor
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1336
Posted: 08:57am 03 Jan 2026
Copy link to clipboard 
Print this post

Gábor,
Here  you will find a few fonts and programmes that can be used to create your own fonts from images. This may help you.
Cheers
Martin
'no comment
 
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 2026