Shop OBEX P1 Docs P2 Docs Learn Events
Runtime Memory Limit — Parallax Forums

Runtime Memory Limit

IRobot2IRobot2 Posts: 164
edited 2010-09-17 23:37 in Propeller 1
I recently starting working with video on the prop and I am finally getting somewhere thanks to the help that I have received from you all and especially Potatohead, Thanks!

I have now added the 4fC serial object to my application so that I can update the graphics from another prop. Now I am getting an “Object exceeds runtime memory limit by 3691 longs”. Wow… I have seen this error before when I was only a few longs over, but now the serial object has really threw me under the bus. A pretty thorough forum search showed me that many others have had this problem. They usually fixed the problem by not doing the double buffer / doing without the draw page. This does not really seem to fix my problem at all.

Any suggestions? -Alex

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2010-09-16 15:59
    Have you really filled 32KB? There was a bug (not sure if it was fixed) in PropTool that said there was no room when in fact not a lot had been used. Try adding
    xyz long 256[0] 'not certain of the syntax??
  • IRobot2IRobot2 Posts: 164
    edited 2010-09-17 07:05
    I tried adding the long xyz [256]. It simply made it find an extra 256 longs. I got currious and took out the 4fc serial object and it is looking like I have 6,309 longs free. I am no where close to having a large program. I have a few text graphics and a couple case statements.

    I did successfully get it to load without the double buffer. (setting bitmap_base and display_base both to $5000) but I dont think that is going to work out to well. Setting the bitmap_base to anything less than $3000 displays nothing on the screen.

    Any other tricks to get around this bug in the prop tool?

    Thanks for any ideas. -Alex
  • Heater.Heater. Posts: 21,230
    edited 2010-09-17 07:27
    IRobot2,
    Any other tricks to get around this bug in the prop tool?

    Yep, don't use the Prop Tool, use BST. See here:

    http://www.fnarfbargle.com/bst.html
  • IRobot2IRobot2 Posts: 164
    edited 2010-09-17 08:02
    Well I dont think it is a prop tool bug any more. BST Just gave me " pcFullDuplexSerial4fc - Binary too large for RAM by 603 Longs".

    Attached is my code in case some one wants to take a look at it. I am sure I am doing somthing wrong. I am new to the graphics so dont laugh. All advice and pointers are very much appreciated.

    The program basically makes a splash screen, then monitors 1 - 8 switches (sent via serial connection) and displays a green box if switch is closed, red if open and an X if you are not monitoring that switch. It is not done yet, but at least you will know what you are looking at. -Alex
  • AribaAriba Posts: 2,690
    edited 2010-09-17 23:37
    IRobot2 wrote: »
    I did successfully get it to load without the double buffer. (setting bitmap_base and display_base both to $5000) but I dont think that is going to work out to well...

    So you already find the solution. Why does it not work well?
    The two graphic buffers and all these objects and code just don't fit in the Propeller RAM all together. One buffer is 256x192/4 = 12kByte * 2 = 24kB, so for all the code remains only 8 kB.
    The space for the buffers is reserved with the _stack directive, and thats why it is not shown in the memory map. Not sure if one can say that's a bug of the PropellerTool, more a missing feature.

    Double buffering is necessary for flickerless animation. If you only change small parts of the screen, you can do that with a single graphics buffer. You need to clear and redraw only the small areas which have changed, and let the rest of the screen as it is, so you get not to much flickering.

    Andy
Sign In or Register to comment.