View Single Post
Old 29 June 2023, 10:43   #446
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,997
Quote:
Originally Posted by Muzza View Post
Like I say, that’s what I do. One system alloc for chip, one for fast. (WHDLoad does not allow any other way - although it would occasionally be useful!)
I still have to virtually alloc and free within those blocks though because you can’t fit the entire game in RAM at once. Things need to be loaded and unloaded. So fragmentation still exists.
Seems You dont understand me, my english is poor.
I know that WHDload alloc memory only once.
But Your game alloc memory many times.
MUST ALLOC MEMORY ONLY ONCE TOO.
f.e. for chip memory You need:
2x320kB for screen buffer
graphics data for Level 1 and music for Level 1 in total 500kB (You choosed the biggest value from all T2 AGA levels)
other data located in chip memory 100kB
then in total You need maximum of chip memory equal 2x320+500+100=1240kB
and You allocated 1240kB of chip ram only ONCE, via BSS_C or AllocMem.
Later game is handling this chip area for all game levels, intro and outro.
Don_Adan is offline  
 
Page generated in 0.04517 seconds with 11 queries