Possible Reductin in double buffer memory using graphics.spin
RIT Student
Posts: 4
Hello,
I am trying to use the propeller to run a game I wrote. To display images I am using graphics.spin & tv.spin. Unfortunately, the double buffering needed to prevent flicker severely limits the memory I have for the game itself. It seems that it might be possible to reduce the buffer size by 1/2 yet still retain a double buffer. To do this, you would sacrifice resolution in both the x and y direction by 2. My thought is that you treat each tile as an 8 x 8 . Then when TV converts the pixels to an NTSC signal, it will perform an "interpolation" to display the 16 x 16. That is, it will take the necessary steps to display a single pixel that is physically set in the bitmap memory, then set the proceeding pixel to display the exact same color. Has anyone attempted anything like this. It seem that this might involve a lot of changes to the algorithms in graphics.spin used to generate the shapes. Is there a quick change in graphics to treat tiles as 8 x 8 appose 16 x 16? If so I think I might be able to make changes to tv.spin to perform the 8 x 8 to 16 x 16 interpolation. If you don't understand what I am trying to say, please feel free to ask further questions. Any suggestions/hints would be appreciated.
Thanks
I am trying to use the propeller to run a game I wrote. To display images I am using graphics.spin & tv.spin. Unfortunately, the double buffering needed to prevent flicker severely limits the memory I have for the game itself. It seems that it might be possible to reduce the buffer size by 1/2 yet still retain a double buffer. To do this, you would sacrifice resolution in both the x and y direction by 2. My thought is that you treat each tile as an 8 x 8 . Then when TV converts the pixels to an NTSC signal, it will perform an "interpolation" to display the 16 x 16. That is, it will take the necessary steps to display a single pixel that is physically set in the bitmap memory, then set the proceeding pixel to display the exact same color. Has anyone attempted anything like this. It seem that this might involve a lot of changes to the algorithms in graphics.spin used to generate the shapes. Is there a quick change in graphics to treat tiles as 8 x 8 appose 16 x 16? If so I think I might be able to make changes to tv.spin to perform the 8 x 8 to 16 x 16 interpolation. If you don't understand what I am trying to say, please feel free to ask further questions. Any suggestions/hints would be appreciated.
Thanks
Comments
What I have done that works is make a large font with the TV_text by doing something similar, but if this will not work someone else will hopefully correct this idea.
SDM_graphics_XOR -> http://obex.parallax.com/objects/310/
and the thread that discussed it: http://forums.parallax.com/forums/default.aspx?f=25&p=1&m=248864
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
Jo
Changing the expansion tells tv to double up horizontally and vertically.
This gives you a resolution of 128x96 and uses about 6KB of hub ram instead of 24KB, assuming I did everything and got the math right.