Hi, On Fri, 29 Jul 2005, Christian Groessler wrote: > I didn't > change it to use __RESERVED_MEMORY__ instead of _graphmem_used yet. Will > do this probably next week. I've added this now to the CVS version. The value you set graphmode_used to is now irrelevant. You have to set __RESERVED_MEMORY__ in the linker script or the ld65 command line, like ld65 --define __RESERVED_MEMORY__=yyy ... (Uz, wouldn't it be nice, if one could set this from the cl65 command line? I think there is no way currently. Maybe by means like the gcc -Wl and -Wa options, to pass switches explicitly to the assembler or linker?) This is the text I've added to the Atari specific cc65 documentation, in the "Graphics drivers" section: ------------------------------------------------- Currently there are no graphics drivers available for the Atari platform. However, the runtime library provides a function named _graphics, with a mode parameter just like the DOS GRAPHICS command. This function will turn on the requested graphics mode. There are currently no functions available to access the graphics memory. The access must be implemented manually. Many graphics modes require more memory than the text screen which is in effect when the program starts up. Therefore the programmer has to tell the program beforehand the memory requirements of the graphics modes the program intends to use. This can be done with the __RESERVED_MEMORY__ linker config variable. The number specified there describes the number of bytes to subtract from the top of available memory as seen from the runtime library. This memory is then used by the screen buffer. The numbers for the different graphics modes presented below should only be seen as a rule of thumb. Since the screen buffer memory needs to start at specific boundaries, the numbers depend on the current top of available memory. These numbers were determined by a BASIC program. graphics mode reserved memory ___________________________________________________ 0 1 1 1 2 1 3 1 4 1 5 182 6 1182 7 3198 8 7120 9 7146 10 7146 11 7146 12 162 13 1 14 3278 15 7120 16 1 17 1 18 1 19 1 20 1 21 184 22 1192 23 3208 24 7146 25 7146 26 7146 27 7146 28 160 29 1 30 3304 31 7146 reserved memory required for different graphics modes The values of "1" are needed because the graphics command crashes if it doesn't have at least one byte available. This seems to be a bug of the Atari ROM code. ------------------------------------------------- The last paragraph is of interest. The graphics function (opens the "S:" device) crashes if there is no room avaiable between MEMTOP and APPMHI. I don't know why... regards, chris ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Tue Aug 9 22:13:12 2005
This archive was generated by hypermail 2.1.8 : 2005-08-09 22:13:15 CEST