|
Post by highrise on Apr 24, 2017 12:55:12 GMT
hi there
I have a question about how screens are stored in terms of how much memory they take up. Is it the case that it is one byte per square? For example a 24 x 20 screen would take up 480 bytes? or is there some compression involved? I want to estimate how many screens I can have without running out of memory.
thanks!
|
|
|
Post by Doug Bagnall on Apr 24, 2017 18:26:27 GMT
AGD does compress screens (although I don't know the exact mechanics), but basically the more blocks you place on a screen, and the bigger the size (width/depth), the fewer screens you will be able to have - less is more, as they say.
|
|
|
Post by Jonathan Cauldwell on Apr 27, 2017 18:35:49 GMT
The way compression works is to scan screens from left to right and top to bottom in the same way that the attributes are drawn in a SCREEN$ tape file.
When AGD encounters more than three consecutive blocks of the same type it counts the number it finds (up to 256) and stores the blocks in just three bytes: One to mark the beginning of a compressed block, a second to tell AGD which block type is compressed and the third to store the number of consecutive blocks of that type.
So the more complex a screen is, the more memory it occupies. A 24x20 screen could take as many as 480 bytes at one extreme and 6 bytes at the other.
|
|
|
Post by highrise on Apr 29, 2017 15:23:38 GMT
ok, so therefore if you have long horizontal sections of the same block, you can save memory. To be honest that's what I thought it would be. Thanks!
|
|