Runtime Memory Limit
IRobot2
Posts: 164
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
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
xyz long 256[0] 'not certain of the syntax??
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
Yep, don't use the Prop Tool, use BST. See here:
http://www.fnarfbargle.com/bst.html
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
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