Jump to content
IGNORED

TROGBlog - The horror. The horror.


RSS Bot

Recommended Posts

I was sitting down to do some more development on Stellar Fortress tonight and decided is was time that I check the current ROM and RAM usage. Not good. ROM only had one page left (256 bytes), and RAM only had 16 bytes left, and that's including the space reserved for the stack.

 

So I was forced to postpone development and instead start code optimization. A quick check of the code showed that 50% of the ROM is currently used for logic, and the other half is data tables. Fortunately I made flagrant use of the "align 256" macro. Some of these reserved pages were only using a quarter of the 256 bytes. Without too much work, I was able to shift the data and subroutines around, resulting in the removal of several align 256's. I now have 5 pages free, about 1300 bytes, so the ROM is 70% consumed.

 

RAM optimization is going to be harder. I don't use many subroutines, so I'm only reserving 8 bytes for the stack. It also occurred to me that my 2 byte graphics pointers can be refreshed every frame, so I can move them to temp storage. This has freed up about 16 bytes of RAM, so it's still going to be tight. But at least I've got enough breathing room that I can go back to normal game development.

 

http://www.atariage.com/forums/index.php?a...&showentry=1433

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...