Search the Community
Showing results for tags 'mwp'.
Found 1 result
Trying to fit big game into small amount of memory tends to be hard. Trying to scroll large bitmap screen is even harder. That is where something like complex scrolling method that wastes no RAM comes in handy. During my recent experiments with AnalMux's MWP (minimum wrapping principle) scrolling, I think I found a better way to understand it. Basic principle is still the same, using two LMSs to wrap the screen so that used memory exceeds only slightly more memory than static screen. Here is the image of memory layout according to 'my way' There are maximum two LMSs used (first row is special case as only one LMS is needed). Scrolling right is done by increasing X, when X reaches the end -> X=0, Y=Y+1 Scrolling down is done by increasing Y. As you see on the image, there are only SCREEN_WIDTH-1 bytes added at the end of screen memory. Contents of these bytes need to be copies of 0..SCREEN_WIDTH-1 bytes. In the case of 3x3 size, bytes 9 and 10 are copies of bytes 0 and 1. LMS addresses and appropriate Mode lines should be easy to calculate from Screen height, Screen width, X and Y. Imho, this "add copy of first row to the right of last row" makes much more sense than the explanation with additional zero row in Ironman Wiki documentation. As I'm in middle of making a game with this, If anyone sees any fault in this reasoning please shout