Shop OBEX P1 Docs P2 Docs Learn Events
Hi Res VGA Text Object Problem — Parallax Forums

Hi Res VGA Text Object Problem

djh82ukdjh82uk Posts: 193
edited 2008-06-23 21:31 in Propeller 1
Hiya Guys

Im trying to use the Hi Res VGA Text object.

Basically im trying to make something that displays text but also allows me to type in variables. Some graphics would be nice too, but am i right in presuming that would make the text side of it more difficult?


If the Hi res text is the best option, how the hell do I get it to display and posistion my text? I cannot work it out from the object as the important bits are is ASM.

I converted this from the Demo and it displays a letter then a line full of arrows pointing left? I cannot figure out where they are coming from.

Thanks

DJH

Comments

  • djh82ukdjh82uk Posts: 193
    edited 2008-06-23 02:33
    PUB start | i, j

    'start vga text driver
    vgatext.start(16, @screen, @colors, @cx0, @sync)



    'set up colors
    'repeat i from 0 to rows - 1
    'colors := %%3000_3330

    'colors[noparse][[/noparse]0] := %%3000_3330
    'colors := %%0000_0300
    ' colors := %%1100_3300
    ' colors := %%0020_3330
    ' colors := %%3130_0000
    ' colors := %%3310_0000
    ' colors[noparse][[/noparse]6] := %%1330_0000
    ' colors[noparse][[/noparse]7] := %%0020_3300

    'colors[noparse][[/noparse]rows-1] := %%1110_2220

    'fill screen with characters
    'repeat i from 0 to chrs - 1
    'screen.byte := $54
    'screen.byte := $55

    colors := %%3310_0000
    screen.byte := $52
  • RaymanRayman Posts: 14,162
    edited 2008-06-23 09:43
    If you want a character, a, and column, c, and row, r:

    screen.byte[noparse][[/noparse]r*cols+c]:=a

    possible choices for a are 0..127 (the basic ASCII set).
  • djh82ukdjh82uk Posts: 193
    edited 2008-06-23 18:20
    Heya

    this works:

    colors[noparse][[/noparse]10] := %%3310_0000
    screen.byte[noparse][[/noparse]10*cols+20]:= $54

    but all the way accros the screen, either side of the letter "T" as arrows pointing right, where are they coming from?

    DJH
  • RaymanRayman Posts: 14,162
    edited 2008-06-23 21:31
    Maybe your screen array isn't being initialized properly...
    Try filling the array with spaces...
Sign In or Register to comment.