Post Reply 
41 MCODE - Copying bank-switched pages
10-14-2014, 06:32 PM
Post: #9
RE: 41 MCODE - Copying bank-switched pages
(10-13-2014 11:40 PM)Gene Wrote:  My original thought was to find ram pages that had been used to store updated rom images or other well-behaved data. My fear had been that it could become easy to forget that 809 had been used previously ... or was it 808? :-)

So, what are the used (or unused) ram pages? that's essentially my question.

One way to start would be to initialize the first word of every RAM page to 0 after the Memory Lost. Since this isn't a valid first word for an image, it is a reliable indicator that the RAM page doesn't contain an image. This even works for HEPAX memory pages. This at least makes it possible to check individual pages; just YPEEK the first word. This approach might even be better than using a separate table, but I'll have to think about it.

When I get around to writing the "Flash Functions" module I'll try to include some functions to support this: one to automatically zero the first word of every RAM page, and perhaps another to scan RAM for non-zero first words. But if I do that maybe I need to change the name of the module to "Memory Functions."

Monte
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 41 MCODE - Copying bank-switched pages - Monte Dalrymple - 10-14-2014 06:32 PM



User(s) browsing this thread: 1 Guest(s)