Shop OBEX P1 Docs P2 Docs Learn Events
tv.spin and graphics.spin, weird problem — Parallax Forums

tv.spin and graphics.spin, weird problem

mosquito56mosquito56 Posts: 387
edited 2008-02-12 07:35 in Propeller 1
·I have been working the last couple weeks on the t.v. output for my project. I got it looking nice and switched to another object for reading temps into the prop. I got that working nicely and when I attempted to add the object to my t.v., the t.v. just stops working, no video out at all.

· The strange thing is I am not turning on the 8031 chip at all, I am just including the object in the obj section.
I have tried turning the 8031·on, turning it on in another cog, no luck. I then tried to get the sd card going. It doesn't seem to make any difference. It does the same thing.

Any ideas? These are the objects I am running. The last 2 are what I am trying to add
· tv··· : "tv"
· gr··· : "graphics"
·temp·· : "eistemp"·················· ' Temperature loads in same cog
'volt·· : "adc0831"···················· ' Volts······ loads in cog 3
' sd :· "fsrw"


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······· "What do you mean, it doesn't have any tubes?"

······· "No such thing as a dumb question" unless it's on the internet

Technologically challenged individual, Please have pity.

Comments

  • RaymanRayman Posts: 14,162
    edited 2008-02-12 02:14
    One thing to be careful of with "Graphics" is that it uses a lot of non-formally declared memory...· Maybe if you "Start" all your other objects before starting Graphics it might work...

    I have some notes on Graphics here:

    http://www.rayslogic.com/propeller/Programming/GraphicsDemo.htm
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-02-12 05:39
    You can actually put the different arrays into an actual array but you need to make sure that you bet it 64 byte aligned. If you want I can post some code I've got that does it.
  • mosquito56mosquito56 Posts: 387
    edited 2008-02-12 05:59
    Ray, I have read everything you had on graphics. Excellent source for t.v. info. I always assumed that tv and graphics would go first, don't know why. Will· give reverse order a shot thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ······· "What do you mean, it doesn't have any tubes?"

    ······· "No such thing as a dumb question" unless it's on the internet

    Technologically challenged individual, Please have pity.
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-12 06:10
    Graphics does not use anything not handed over to him, which is generally a piece of n*m tiles of 16 LONGs each.

    This piece of memory has to be allocated in the main program. Sadly this is generally done by not so transparent code as such:
      _stack = ($3000 + $3000 + 100) >> 2   'accomodate display memory and stack
    
      x_tiles = 16
      y_tiles = 12
         
      bitmap_base = $2000
      display_base = $5000
    


    This is more or less "safe" code, but changing ANYTHING here needs full understanding what you do!

    As is leaves 8k Bytes only for program code, it is not very likely that mosquitos code will fit!
    (Edit[noparse]:)[/noparse]Especially the "100" does accomodate for "small" stack use only. If you define local vectors or use extensive nesting, the top of stack will reach the display area soon, which will lead to overwriting the active stack. This is most likely the case here, as in the many cases before smile.gif

    Using the double buffering in foor colour node (and GRAPHICS works in four-color mode only) is a high burden on the small Prop..

    Note there will be some relief in the coming days, as GRAPHICS will get an XOR-pen, allowing to erase things, and avoiding double buffering in many cases!

    Post Edited (deSilva) : 2/12/2008 6:21:33 AM GMT
  • mosquito56mosquito56 Posts: 387
    edited 2008-02-12 06:22
    De Silvia, I think you found the problem. I was getting overflow errors so I commented out the following and didn't notice any change in my output. I see now that that's probably what is happening when I add more code.

    stack·=·($3000·+·$3000·+·100)·>>·2···'accomodate·display·memory·and·stack


    Looks like I'm going to need another graphics driver. I posted another question earlier and never got any answers. All I need is a simple graphics to draw vertical boxes and variable sized numbers on the screen.



    ·I just found the program for cards and am beginning to play with that. Colors are so complicated I spend hours changing pallete hex numbers just to get 4 simple color combinations. Unreal.

    BTW:·Good jobs on the playing cards program. I know·he spent alot of time on that one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ······· "What do you mean, it doesn't have any tubes?"

    ······· "No such thing as a dumb question" unless it's on the internet

    Technologically challenged individual, Please have pity.
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-12 06:28
    All things with colours - be it TV or VGA - are well described...
  • mosquito56mosquito56 Posts: 387
    edited 2008-02-12 07:35
    As always you continue to amaze me with your answers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ······· Q. What do you get if you put a trs-80 in a steambath?

    ······· A. A propchip with an attitude
    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet

    Technologically challenged individual, Please have pity.
Sign In or Register to comment.