![]() |
Forum Index : Microcontroller and PC projects : Micromite 5.0
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
The problem with supporting accented chars, etc is that there are so many of them and no real standard (that I know of) for encoding them like ASCIl. So no, at this time I have no plans for this. Yes, using either DEFINE FONT or LOAD FONT you can define a single character or a small subset of characters so they would be perfect for creating things like accented characters. As you alluded, I included sprites in the Maximite version some time ago and I consider that effort a failure as only a small number of people used that feature (to good effect admittedly). Another problem is that I am not a games programmer and without the help of someone who is it is difficult to specify a good sprite interface. So, for the moment l don't have plans to introduce sprites. Yes, I definitely have some sort of sound/audio/music on the agenda. Just how it should work is another question that I have not sorted out yet. My plan is to fix any remaining issues with the MM+ and release it as V5.0. Then I can incrementally add features like this. Once a feature is added it is painful for everyone if it is later removed or changed so I have to be cautious. Geoff Geoff Graham - http://geoffg.net |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Thanks for the clarifications, Geoff. Can you please post an example how a single character be redefined using DEFINEFONT as I am unable to work that out from the manual? The sprites are not that much of importance at all at the moment, neither is the sound, but I think 8-bit support for the fonts is very much needed. You are right saying that the DEFINEFONT can be used to define the accented and special characters, but the fact MM+ is internally cutting the code down to 7 bits is very limiting. For example, if I type £ or € or á, nothing appears on the screen at all, because they both are with codes in the range 0x80..0xff. If the MM+ was only able to allow these being addressed in a user-defined font, and not reset bit 7 in the code internally (if it does that now), that would be pretty much a full solution to the problem for now. I can take care of defining a few full 8-bit code page fonts as per ISO8859, but need the support from the MM+'s side for that. http://rittle.org -------------- |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
I don't think it does. If you have a look at the top of one of the font files Geoff has distributedyou see something like the following ' Grotesk16x32.bas
' Font type : Full (95 characters) ' Font size : 16x32 pixels ' Memory usage : 6084 bytes ' Font downloaded from: http://www.rinkydinkelectronics.com/r_fonts.php DefineFont #8 5F202010 00000000 00000000 00000000 00000000 00000000 00000000 00000000 These first 4 bytes define the font as follows: 5F - number of characters in the font file 20 - offset to first printable character - i.e. <space> 20 - font height in pixels, i.e. 32 10 - font width in pixels, i.e 16 Any code (e.g. chr$(130)) which falls outside the range specified is printed as a <space> so to define a font 8x13 with 255 printable characters you would use FF000D08 as the first word remember the PIC32 is little endian so the actual C definition would be: const unsigned char myfont[] = { 0x8, 0xD, 0x00, 0xFF, |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
For creating fonts the best that I can do is point you to http://www.rinkydinkelectronics.com/h_utft_fonts_101.php where the format is described. On an extended character set, I understand your point and the importance. I will look at it before I finalise V5.0 for the MM+ but it might not be that easy. This is because the top bit in a byte is used to indicate a token (command, function or keyword) in the program in memory. If an 8-bit character with the top bit set was allowed in a string it would be mistaken for for a token. At this time the only solution that I can think of is to map some extended characters to the space below 20 hex where the control characters reside. Even then there will be other hurdles lurking in the background. When I designed MMBasic I was thinking of the simple US ASCII keyboard, not the extended character sets used internationally. It is this type of minimalist approach that enables MMBasic to run on microcontrollers while fancier languages that support unicode, etc can only run on a processor with much more resources. Geoff Geoff Graham - http://geoffg.net |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Hi Peter, you were typing as I was typing. Without checking the source directly I am sure that the top bit of any incoming byte is set to zero, so the extended character would never make it into memory. Geoff Graham - http://geoffg.net |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
No it works fine. I created a 0xAF character font by appending a second copy of a font to itself I tested using: text 0,0,"hello"+chr$(130),,8 and it correctly printed "Hello#" where # is the expected character in the extended set |
||||
cosmic frog Guru ![]() Joined: 09/02/2012 Location: United KingdomPosts: 302 |
The Sprite function on the MaxiMite was a failure I think because it was just too messy and complicated, also didn't have proper collision detection. It could have been nice and simple with a syntax like - SPRITE(sprite,image,x,y,collision). It was too hard to use and in the end was easier just to use fonts. With a better Sprite function I think more people would use it. Dave. |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
About the sprites... there is a simple way to start with. Remember the shape tables in Apple 2? The DRAW and XDRAW commands? It is known as turtle graphic. I have done similar stuff many years ago a few times, and it is always extremely simple and effective. In general these shape tables are slow for applications where speed is the main factor, but their benefit is the simplicity and minimum required system resources. In a simple format we have a 16-bit word, which defines a single vector. The image is expressed by the needed number of vectors in a shape table. Within a vector: Bits 0..2 define the direction: N, NE, E, SE, S, SW, W, NW Bits 3..5 define the operation: overwrite (ignore the old), OR, XOR, NOT, or skip (here is also the END marker for a table). Bits 6..7 define the vector size in number of steps to take: 1..4 The entire second byte defines an 8-bit colour for the vector in format RGB332. Of course there are ways to compress the shape table into a much smaller size, but they introduce some complications on the way. For example the colour and the operation can be given in a 'marker' byte, which is then followed by 4-bit vectors (the 4-th bit is skip or draw) only until the next marker byte, etc... http://rittle.org -------------- |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2944 |
Regarding Touch Screen controller chips . . . Please - does anyone know a link to a 'sustainable' supply of these chips (or an equivalent/compatible chip). I can get the TFT and Touch PANEL from a 'reliable' source, but am having trouble locating a supplier for the XPT2046 ![]() Thanks, WW |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
XPT2046 is a yellow copy of TI's TSC2046. You can find the latter one in Digikey or Mouser, at a much higher price of course. If you insist on cheap XPT2046 - AliExpress. http://rittle.org -------------- |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2944 |
Thanks for that Kon - just what I needed to know ![]() |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Yellow copy? Smoke makes things work. When the smoke gets out, it stops! |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
racist term. i've noticed these creep into the forums now and then, and really do wish people would avoid using them. cheers, rob |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Oh......Understood. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
MicroBlocks![]() Guru ![]() Joined: 12/05/2012 Location: ThailandPosts: 2209 |
@WW How many do you need. I am going to place an order soon and i will be needing about 100 of them. Maybe we can do a combined order to lower cost. Original (i don't do Chinese copies) Texas Instrument chips, 16 pin TSSOP package. I can get a quote within a few hours. A PM is better, not really the right topic. Sorry guys. Microblocks. Build with logic. |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2944 |
@MicroBlocks - PM sent . . . . ![]() |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
I don't think so. In their anxiety not to offend anyone people sometimes go to extreme lengths... The term roots from such as "yellow press", "yellow part" or "yellow story", i.e. something unbranded and without official approval or certificate. Yellow copies can easily be made anywhere in the world, including Europe or America, and that has nothing to do with race. http://rittle.org -------------- |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
I think the term here is "grey" (USA spelling: gray). As in: grey market. Probably that's offensive somewhere :( (Personally I object to being called white. I'm not, not even when very cold.) John |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Grey is different. It refers to stuff on the fringe of the law. http://rittle.org -------------- |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
Whereas yellow means breaking the law? John |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |