I would try generating the world into an array then copying things into the bg pages as needed. Then you only have to generate things once. Even without a memory buffer you should be able to fit several screen fulls of data into the bg pages. Then you can use bgofs to scroll around.