Hi, On Tue, Feb 07, 2012 at 02:43:31PM +0100, Anders Carlsson wrote: > Hello, > > VIC-20 has three locations for start of Basic: > > Unexpanded: $1001 > +3K expanded: $0401 > +8K expanded or more: $1201 > > For both unexpanded and +3K machine, the video matrix is default at > $1E00 and colour memory at $9600. > > For machine expanded with +8K or more, the video matrix is default > at $1000 and colour memory at $9400. > > These changes are mostly due to Basic needs a continuous memory > block to operate, while for practical matters it is easier to lower > top of RAM to make room for custom graphics or machine code routines > on an unexpanded machine rather than moving start of Basic upwards. > > Easiest is if you target +8K or more expansion, as the memory setup > will be the same for 8K, 16K, 24K expansion. Maximum continuous > memory then is 27.5K. You can also note the 3K memory block at $0400 > can be filled, but due to the video matrix has to be somewhere > between $1000 and $1FFF (internal RAM), you would have to load any > code or data going into that block separately. Some people made > internal modifications to their VIC-20 by piggy-backing 3K, which > allows the video matrix and custom graphics to be at $0400 at the > cost of making their computer incompatible with the others. Nice, thanks for the answer, also to the others who replied. It seems "start of basic" ZP location can be used to find out the basic start address (if I really need to deal with different mem configs). Ok, I'll target +8K expansion, so basic start, screen/color memory is the same with 8K or larger expansions. My only question left: how can I know the actual size of memory expansion so I know how much RAM I can deal with. Since I want load files, it's important to know that I should deny loading a file (too large) for a given amount of memory expansion. Looking at the VIC memory layout page (http://www.zimmers.net/cbmpics/cbm/vic/memorymap.txt) I am not sure what ZP locations should I use for this, maybe: "55-56 Pointer: Limit of memory"? So, I'd like to know the total amount of continous memory I have from begininng of the start of the basic area. If that pointer is OK to use (I guess it is), I have the size if I substract the basic start from it (to be precise: I would substruct the address free after my code, so the rest of the memory is used as load buffer). The loaded file is data, so I have no problem that it should be relocated etc, because of code in it. If it's possible I would not write a memory test function by myself, but I would trust in already existing information. Thanks! Message was sent through the cbm-hackers mailing listReceived on 2012-02-08 11:00:04
Archive generated by hypermail 2.2.0.