From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-10-22 19:02:36
On Tue, Oct 22, 2002 at 11:50:06AM -0500, Brian Bagnall wrote: > I was curious to see the Plasma demo does not need to alter the c64.cfg file > in order to store a character set and 2 screens of data in the upper memory > (E000 and higher). Does this mean that CC65 allows a programmer to use the > last 8kb of memory as he wishes? In the c64 memory map it looks like this is > used by the kernal, but possibly that's wiped out when CC65 takes over? It is common C64 knowledge that there is memory "below" the kernal:-) The VIC does always access the RAM below the kernal and the I/O area (if the 16K VIC bank is at $C000). cc65 cannot use this RAM without serious problems, because it needs the kernal for several things (IRQ handling is an example) so using the RAM below the kernal would mean banking it in and out - something that is slow and error prone. As a consequence, the standard C64 memory map for cc65 does not use this RAM. So you can it for your own purpose. Some important things to consider: * Writing to the kernal ROM area will write "through" the ROM, so you can write to the RAM without banking out the kernal (this is what is done in the plasma demo). * To read the RAM, you will have to bank it in, but since the kernal is used for interrupt handling, you will have to disable interrupts when doing so. * The graphics driver will place the high res screen below the kernal ROM and the attribute RAM below the I/O area. This means that your program will not work with this driver. Presumably, this is not a big deal for you. * I cannot remember testing this explicitly, but I think I've checked the library code for it: If you set the zeropage cells that contain the screen address managed by the kernal, even the conio module should work with a changed screen address. This is untested however, any feedback would be appreciated. Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2002-10-22 19:02:37 CEST