Shop OBEX P1 Docs P2 Docs Learn Events
Vga_Hires_text_demo - More colors ?? can you help ? — Parallax Forums

Vga_Hires_text_demo - More colors ?? can you help ?

WebbersWebbers Posts: 2
edited 2006-08-09 23:23 in Propeller 1
For all us electronic hobbyists the propellor chip means we can now interface to a touch screen monitor instead of a 2x16 character line display, yipee! - great days ahead.·Incidently you can get a 12" color monitor·on ebay with serial interface for around 120 euro.

I programmed in C many years ago and also did some work with 6502 assembly language for those who remember the atari days. My·problem is Im getting old and my·brain is a little rusty, so if you can help I really would appreciate it -·Im sure you·wizz kids out there can solve my problem in·a few seconds.

The Vga_hires_text_demo is just what i need - except for the fact that you have to have the same color for each character in the row - instead of individual colors for each character. Now this mode can display 128 x 64 characters (= 8192 characters) which if each one was to have its own colour - would mean an extra 8192 (8bit) words or 2048 longs. So there is plenty of memory to do this and although I have tried - I just cant figure out the assembly language.

So has anyone even tried this or would anyone know how to change the code ?

Any info would be greatly appreciated.

Thanks

Paul

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-08-06 23:06
    From what I understand about how the video is generated, there is no way with the current Propeller to vary the color during any given scan line. There's just not enough computing power to vary the color during the scan line at the speeds necessary for the high resolution text output. It's not an issue of enough memory.
  • WebbersWebbers Posts: 2
    edited 2006-08-08 11:10
    Thanks for your reply,

    You say that there is not enough processing power to display different colors on the same line and yet that is exactly what the VGA_512_384_bitmap_demo does. I have not managed though to get more that 16 tiles of a different color - maybe thats the maximum it can process ?

    Paul
  • Mike GreenMike Green Posts: 23,101
    edited 2006-08-08 14:17
    The 512x384 bitmap driver is very different from the hires text driver which is capable of producing 1024x768 resolution (twice that of the bitmap driver). Twice the resolution means half the time available to do the work and the Propeller can't fetch the data fast enough if it includes color information. It can handle the "per line" color data since that's fetched during the sync pulse interval when there's no video needed.

    The tiling of color has to do with the way the video generator works in the Propeller chip. Look at the description of the video mode of the counter registers in the Propeller documentation.
  • FynchFynch Posts: 8
    edited 2006-08-08 16:43
    Actually it's four times as much. 1024 x 384 or 512 x 768 would be double

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Other forums I frequent: Briel Computers: brielcomputers.com/forums
    Applefritter: applefritter.com
  • Mike GreenMike Green Posts: 23,101
    edited 2006-08-08 17:25
    You're correct. I was thinking just about the horizontal resolution since that's the limiting factor in processing speed. Both horizontal and vertical resolution affect memory requirements for the screen buffer, but the "brutal" work is in getting the bits out fast enough to the display during the horizontal scan line.
  • Ym2413aYm2413a Posts: 630
    edited 2006-08-09 19:11
    You know, moving up from a small little 2x16 LCD to even a VGA 640x480 screen would be an almost uncountable improvment!

    Even at 320x240 you can display 40x30 characters at 8x8 fonts!
    Thats a lot more then what you would have got with a little serial LCD.

    The HUB memory which is the 32k ram where you would store your bitmap buffer can only be accessed at a slower speed then the 80Mhz the COGs run at.

    It works like this because the HUB multiplexes between all of the COGs and the 32k RAM. Sort of like taking turns.
    If it's not your turn as a COG then you just wait until your turn comes around again. (I think this is why they call it the Propeller)

    Basically the pipeline from the COGs and the RAM is shared between all 8 COGs.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-08-09 23:23
    The vga lowres text driver is really very flexible. It only provides 32 characters per line by 15 lines which is a nice step-up from a small LCD display, but it uses very little memory and allows per character color selection.
Sign In or Register to comment.