PDA

View Full Version : Text and font



codeking
02-01-2007, 01:45 AM
I bought a graphic display from parallax.·· I was wonder how to read external files.· (Such as JPEGs or GIFs or TXTs)· Also, how do I access the font that the tv.spin file uses·that comes with the propeller tool?

Mike Green
02-01-2007, 02:02 AM
The font is in the Propeller's ROM. There's a brief discussion of this in the Propeller Manual starting on page 32 (and it's in the Hydra Manual as well).

There have been various postings over time regarding the use of SD card readers. There is an object in the Propeller Object Exchange on this website that will let you read files from an SD card that were placed there by a PC. These routines won't deal with the content of the file, just supply a series of bytes. This works well for text, but there are no routines to handle graphics formats. Someone did post some routines to this forum a while ago to handle bitmap files (BMP) via a serial channel and they may be useful as well with the SD card routines. You'll have to search for them and look at the description.

There are also several commercial SD card and USB flash drive interface devices that connect to the Propeller as a serial device. Check their websites (www.vinculum.com (http://www.vinculum.com), www.ghielectronics.com (http://www.ghielectronics.com), www.dosonchip.com (http://www.dosonchip.com)).

codeking
02-01-2007, 10:46 PM
How does Hydra read images?· It uses Propeller, too.

Mike Green
02-02-2007, 12:24 AM
Most of what the Hydra games do is constructed out of small bitmaps (tiles). There is one "game" with a larger image. This is compiled into the program as a large bitmap from a file that I assume was created by a graphics manipulation program on a PC. You'll have to look at the Hydra code for details, but there are no general graphics file reading programs for the Propeller. At present, you have to convert each image on a PC from GIF or TIF or JPG to a bitmap file and include that in your program as a fixed image.