Shop OBEX P1 Docs P2 Docs Learn Events
Propeller VGA text in C — Parallax Forums

Propeller VGA text in C

SapphireSapphire Posts: 496
edited 2014-10-13 23:18 in Propeller 1
I'm doing a project to replace a monitoring system that currently uses a PC-based VGA text display to show the status of hundreds of devices in the system. Different colors are used to show the current status in a VGA text screen format, as shown below. Because the original application is written in C, I would like to port as much of it over to the propeller in C to maintain its functionality. What I'm having trouble determining is if the propeller can generate the 80x25 character VGA text screen. The vgatext library only allows a 30x14 character screen, and that would not be sufficient for this application. Only the basic 8 colors are used, so high-res color is not important, but the amount of text to display is. Can anyone tell me if 80x25 character VGA text is possible on a propeller in C, and if there are any existing functions for doing so? Thanks!

http://forums.parallax.com/attachment.php?attachmentid=110911&d=1410385799
1024 x 768 - 170K

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2014-09-10 19:21
    I don't see a general problem here except maybe that - AFAIK - this particular resolution hasn't been done yet/advertised (higher resolution full colour text drivers are available though). What resolution does your monitor use for this, 720x400 (9x16) or 640x400 (8x16)? I know that my LCD doesn't like the latter and tries to stretch it to 720x400 (9x16). Once the driver is written it can be made available to C programs.
  • SapphireSapphire Posts: 496
    edited 2014-09-10 19:41
    kuroneko,

    I should have mentioned that. It's 640x480 resolution. That's a 16 color mode, but we only use the first 8 colors. It's currently running on a Dell LCD monitor from a VGA graphics card. Would the Prop's VGA signals differ enough to confuse the monitor? It doesn't have to be 640x480 though if another resolution could provide the 80x25 text. That's critical piece.

    Sure would appreciate any drivers you have for this, as I'd really like to try using a Prop to replace the PC for this application.
  • kuronekokuroneko Posts: 3,623
    edited 2014-09-10 19:55
    Sapphire wrote: »
    I should have mentioned that. It's 640x480 resolution.
    Odd, what's the character resolution then? Simple math would suggest 8x19.2 ... that's why I was looking for ???x400 resolutions. Anyone know what the layout here is?

    I don't have anything ready to go but can look into it.
  • SapphireSapphire Posts: 496
    edited 2014-09-10 20:07
    kuroneko,

    I stand corrected. It's 720x400 with 9x16 characters. Sorry for the confusion on that!

    But character size is not so critical here, as long as I can fit 2000 of them on the screen :)
  • kuronekokuroneko Posts: 3,623
    edited 2014-09-10 23:43
    Is there a specific layout for character and colour arrays (e.g. characters first followed by colours or some form of interleave)? Also, with only 16 colours two of them could be packed into a byte but I assume that could be adjusted at a higher level?!
  • SapphireSapphire Posts: 496
    edited 2014-09-11 09:50
    kuroneko,

    Actually, that is not much of a concern for me although I prefer the VGA-text standard: 8-bits for character, 4-bits FG color, 3-bit BG color and 1-bit blink (we do use blinking text). They are interleaved, but it seems in a Prop driver that shouldn't matter if I'm going to use C functions to set the character and attributes. They could be two blocks of memory, all characters contiguous and all attributes contiguous.

    Today I did reconfirm on the actual monitor it is 720x400 resolution.
  • kuronekokuroneko Posts: 3,623
    edited 2014-09-15 06:04
    Quick character test with one of Bill's 8x16 fonts signalled as 720x400x70Hz.
    1000 x 750 - 466K
  • SapphireSapphire Posts: 496
    edited 2014-09-15 14:39
    Kuroneko,

    That looks super! Wow, great job. The font is okay too.

    What do I need to test it here?
  • kuronekokuroneko Posts: 3,623
    edited 2014-09-15 23:40
    preview release
    • The font doesn't quite match what's shown in the top post but that's nothing that can't be fixed with an updated font file.
    • Blink frequency is set to 1Hz, the default mode is that the foreground colour disappears. Another mode swaps foreground and background colours.
    • Video pin group is runtime configurable.
    • Text cursor is not currently implemented.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-09-16 01:13
    @Sapphire
    The Propeller VGA output is dependent of a network of resistors for its output to get excellent color fidelity.

    Early Parallax devices were a bit off on the values, so there was a big discussion about tweaking the resistor values to get a better match to the 75 ohm impedance and and to have the DAC output get a nice set of colors.

    If you have difficulty with getting good differentiation between 8 VGA colors, this problem may still exist. I don't really Parallax ever acknowledging a production change. The quick fix is to add thee 130ohm smds to an existing board in key locations below the VGA connector.

    Here is the link to the 2011 discussion. http://forums.parallax.com/showthread.php/135385-Better-VGA-DAC-resistors
  • kuronekokuroneko Posts: 3,623
    edited 2014-09-19 23:11
    not the final release yet

    This one just enables both text cursors (underline/block, blink mode). The frontend is still missing the usual UI object.
    '' mailbox layout (80x25, paletted)
    ''
    '' long[par][0]: vgrp:mode:vpin:[!Z]:addr = 2:1:8:5:16 -> zero (accepted) screen buffer   (4n)
    '' long[par][1]:                [!Z]:addr =      16:16 -> zero (accepted) font descriptor (2n)
    '' long[par][2]:                addr:addr =      16:16 -> zero (accepted) cursor location (4n)
    '' long[par][3]: frame indicator/sync lock
    ''
    '' - character entries are words, i.e. ASCII << 8 | attribute
    '' - top left corner is at highest screen memory address
    ''
    '' - cursor location:   $00000000: both cursors off
    ''                      $BBBBAAAA: AAAA == BBBB, one cursor
    ''                      $DDDDCCCC: CCCC <> DDDD, two cursors
    ''
    '' - cursor format:     %00000000_yyyyyyyy_xxxxxxxx_00000_mmm
    
  • kuronekokuroneko Posts: 3,623
    edited 2014-10-13 23:18
Sign In or Register to comment.