|
Forum Index : Microcontroller and PC projects : Font/character read, modify in PicoMite
| Author | Message | ||||
| terekgabor Newbie Joined: 02/01/2026 Location: HungaryPosts: 8 |
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: AustraliaPosts: 1081 |
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: HungaryPosts: 8 |
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 KingdomPosts: 4187 |
PEEK and see. John |
||||
| terekgabor Newbie Joined: 02/01/2026 Location: HungaryPosts: 8 |
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: AustraliaPosts: 2905 |
I don't have a CMM2 but it should be similar to this. 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: HungaryPosts: 8 |
Yes reading is working, but I can’t write - so modify. Gábor |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1081 |
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: HungaryPosts: 8 |
I tried with font 10, I made. Can’t write. Gábor |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1081 |
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: HungaryPosts: 8 |
Is there any memory map for it? Where can I find unallocated RAM addresses? Gábor |
||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4187 |
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: HungaryPosts: 8 |
Thanks! Gábor |
||||
| Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1336 |
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 |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |