Harry Potter Posted September 25, 2021 Share Posted September 25, 2021 Hi! I am working on a cc65 memory library for the Atari 8-bit computers and am running into the following error message from the linker: ld65: Error: atarixl_memx.cfg(26): Attribute expected, got 'OPTIONAL' I attached the config file. What could cause this? atarixl_memx.cfg Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 25, 2021 Share Posted September 25, 2021 memory area definitions don't use optional. If you don't want it output to the generated file then use "" for the file. PRNBUF_: file = "", start = $03C0, size = $0028; Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 25, 2021 Author Share Posted September 25, 2021 Thank you. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 25, 2021 Author Share Posted September 25, 2021 I have another problem: how do I define the __RESERVED_MEMORY__ macro on the ld65 command-line? I mean, how do I know what to assign to it? Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 25, 2021 Author Share Posted September 25, 2021 Never mind, I found the problem: the start address was set to $2000. I set it to $2400, and it worked. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted September 26, 2021 Share Posted September 26, 2021 13 hours ago, Harry Potter said: I have another problem: how do I define the __RESERVED_MEMORY__ macro on the ld65 command-line? I mean, how do I know what to assign to it? I know you solved your problem, but this is an examlpe of one I use cl65 -t atari -Oi -T -Wl "-D__RESERVED_MEMORY__=0x3000" --static-locals -l temp.lst -o temp.xex temp.c Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted September 26, 2021 Author Share Posted September 26, 2021 How do I know what to assign to __RESERVED_MEMORY__? Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted September 26, 2021 Share Posted September 26, 2021 52 minutes ago, Harry Potter said: How do I know what to assign to __RESERVED_MEMORY__? It seems to depend on what you're doing as I believe cc65 uses the upper regions of memory, so if you want to change graphics modes, the call to _graphics can potentially overwrite some code/data and obviously crash your program. For example, I have a program that uses a standard _graphics(0) call, but I also need space for a _graphics(3) so I reserved 1K for the extra screen mode as after creating, I switch back and forth without calling the graphics modes again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.