Shop OBEX P1 Docs P2 Docs Learn Events
Graphics and fsrw--- object exceeds by xxx bytes — Parallax Forums

Graphics and fsrw--- object exceeds by xxx bytes

mosquito56mosquito56 Posts: 387
edited 2009-05-15 22:38 in Propeller 1
I am looking to upgrade my project to use some graphics however every time I add object "FSRW" I get object exceeds run time memory.

Is anyone using a graphics·program with the sd card reader? Does anyone have a stripped·down version of
any graphics program and the fsrw they can share?

Any ideas?

Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······

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


Post Edited (mosquito56) : 5/15/2009 7:29:12 PM GMT

Comments

  • localrogerlocalroger Posts: 3,452
    edited 2009-05-15 16:40
    You can use F8 to determine how much memory each object is taking; the graphics object needs a tremendous amount of RAM, a problem I'm working on right now. If you are using the version of fsrw and sdpi that ships with FemtoBasic and PropDOS, it's very large because it's written entirely in PASM and includes a lot of routines for I2C access to the EEPROM; you can save about 1000 longs by going to the older code in FSRW and Friends (in the obex). However, that version does not have the ability to run binary files from the SD card.
  • RaymanRayman Posts: 14,827
    edited 2009-05-15 17:33
    You can save 12kB by eliminating the double buffering used in Graphics_Demo...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-05-15 18:12
    You could maybe extract the PASM part of any driver and put it in extra files. (I posted a PASMLoader some while ago which exactly is doing that). You would then need a boot-loader which then loads all the COGs. Instead of using VARs you can use fixed adresses in memory for each PASM driver and it's SPIN part.
    Once the drivers are running you can use SD card driver to boot a new SPIN-image without the PASM part of the drivers but which still has the SPIN-part of the drivers. That saves up to 2kB for each PASM section.

    Of course the SD driver has to be modified slightly, as it should not stop all COGs before rebooting. (Actually it's not a real reboot like it's done after a reset - All COGs not stopped by the SD driver simply continue running). I tried this in my CogOS, where I can start any program that does not need all COGs and give a time how long it should run. After that time the left-over watchdog-Cog reboots. Nice feature to create demo-loops of different programs ;o)

    Once my memory module is done I will think about nice concepts to suspend COGs and HUB-RAM to external RAM and have a general concept for driver parameter-blocks and SPIN-code overloads.
  • mosquito56mosquito56 Posts: 387
    edited 2009-05-15 19:26
    Ray, How would I eliminate the secondary buffer??

    · bitmap_base = $2000
    · display_base = $5000

    change display to $2000 and eliminate the bitmap?

    ···· These drivers are a little to much for me. I bought the hydra book but I should have got it in Chinese. Would have gotten same info but saved a few bucks. No I don't Read Chinese.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • BaggersBaggers Posts: 3,019
    edited 2009-05-15 19:31
    mosquito56 shouldn't it be change the bitmap_base to $5000 as it's the lower part he needs more room in [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • RaymanRayman Posts: 14,827
    edited 2009-05-15 20:24
    Change both to $5000 and change the _Stack line to only reserve 12kB...
    _stack = ($3000  + 100) >> 2   'accomodate display memory and stack  
    

    Also, you don't need the:

    gr.copy(display_base)

    line anymore.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • mosquito56mosquito56 Posts: 387
    edited 2009-05-15 22:38
    Works nice, plenty of room even after the fsrw and friends. thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
Sign In or Register to comment.