PSM wierd issue
rogersyd
Posts: 223
I have a strange issue with either my code, or the PSM module that has this novice prop programmer stumped. I would appreciate some advice from anyone familiar with the prop and the PSM.
I have what essentially amounts to a demo program for the PSM. In this top object file I have ran into what is manifesting itself as an issue with the amount of code lines I have in the top object.
In the attached application I have added a handful of wait statements in the PUB START section of the code to demonstrate the issue. If the application is ran with the wait statements commented out the application runs fine. When I un-comment the wait statements a bit of "digital noise" appears in the upper left hand corner of the PSM display.
Is there some obscure memory issue I am running into here? When I compile the application there is plenty of free space left.
I ran into this issue earlier when I was adding some code further down in the demo. With the extra lines of code the application would actually crash and the PSM would reboot. For the sake of argument I added the multiple wait commands near the top of program just to clearly demonstrate the issue.
A mighty thanks is due to anyone who can shed some light on this one. I feel like a dolt... there must be something silly I do not understand here...
-rogersyd
I have what essentially amounts to a demo program for the PSM. In this top object file I have ran into what is manifesting itself as an issue with the amount of code lines I have in the top object.
In the attached application I have added a handful of wait statements in the PUB START section of the code to demonstrate the issue. If the application is ran with the wait statements commented out the application runs fine. When I un-comment the wait statements a bit of "digital noise" appears in the upper left hand corner of the PSM display.
Is there some obscure memory issue I am running into here? When I compile the application there is plenty of free space left.
I ran into this issue earlier when I was adding some code further down in the demo. With the extra lines of code the application would actually crash and the PSM would reboot. For the sake of argument I added the multiple wait commands near the top of program just to clearly demonstrate the issue.
A mighty thanks is due to anyone who can shed some light on this one. I feel like a dolt... there must be something silly I do not understand here...
-rogersyd
Comments
If you overright other more important memory locations, you can easily cause it to crash.
Try to make your program smaller in some way by eliminating redundant code, unneeded code and unneeded variables and DAT space.
Another option is to reduce the size of your screen resolution (but still keep it displayed correctly on the PSM LCD.)
Bill
I assumed I was stepping on a variable or something somewhere but my prop powers are far too humble to figure out where or why that is happening. I think I may be misunderstanding a fundamental part of this chip's memory design. This code is using 4,398 longs of program space, and 670 longs of variable space. Accordingly there are 3,120 longs of free space remaining. The prop has 8,000 longs of ram if I am not mistaken. Ill hit the books a little more closely before moving on with this one. Funny what you can do with this thing by just 'winging it'.
Thanks again for the insight.
-rogersyd
Just like the regular TV version of "Graphics Demo" from which this was derived, there's very little extra RAM left... It may be a little misleading because the graphics buffered aren't really formally reserved...
This statement forces the compile to make sure there's room for the graphics buffer:
But, it may appear that you have lots of room left, when really you don't...
Ray, that line of code only protects against just the allocation of that memory. I'm guessing that somewhere in his code he is overrighting a buffer/variable that is running over that video memory which is corrupting the display.
Bill
Thanks again for the input Bill and Rayman !
As Bill pointed out the PSM Graphics saves a lot of RAM because it uses the display as the second buffer. But, I've taken a lot of that away by making the graphics full screen. If you need more memory, you can just make the graphics area smaller than full screen...