Converting Text Output Display Type - rosco-pc/propeller-wiki GitHub Wiki
Frequently text output demos of various objects are written using either VGA_text.spin or TV_text.spin, but what if you only have the other type of display? Don't worry, conversion from one type of display to the other is a simple and straight forward process. VGA_text and TV_text are symmetric objects, meaning the same methods (with the same argument types) are located in both objects. Converting the demo is a 3 step process:
- In the the OBJ section, change "VGA_text" to "TV_text" (or "TV_text" to "VGA_text")
- Change the basepin argument in the start method for the text display. For the Propeller Demo Board the basepin for VGA is 16 and the basepin for TV is 12. For basepin values of other Propeller development boards, check this page or the board's documentation. The lowest pin connected to the output is the basepin value.
- Color values for VGA and TV are different. VGA color values are 2 bits for each primary (for a total of 6 bits) with bits 0 & 1 containing the Blue component, bits 2 & 3 containing the Green component and bits 4 & 5 containing the Red component. Online color picking utilities can assist in the selection of VGA color values. TV color values are composed from chroma and luminence values, bits 0-2 is the luminance value (greyscale brightness, 2=black and 7=white *), bit 3 indicates the chroma value is used (this bit should be set to 1 for non-greyscale colors), bits 4-7 is the chroma value (which angle of the color wheel the color lies on). Graphics_Palette.spin located in Examples\Library of the Propeller Tool distribution provides an interactive means for picking TV color values. This third step is only needed if the color apperance is important for the demo.
After these three steps are taken the demo has been converted to the other display type.
*) 0 is SYNC-Level and 1 is "superblack" which should be avoided. When you use color (Bit 3 set) it is also recommended to avoid level 7, as the overlaid color signal cannot fit on top.