Re: [cc65] Unable to include binaries at a particular address

Date view Thread view Subject view

From: Game 64 - Benjamin Bahnsen (
Date: 2003-11-17 01:54:05


> Please note that it is your job to make sure the resulting data is loaded
> $5000. Anything the linker will do for you is to relocate the data in the
> segment named "SOUND" to the address $5000 and write it to the given file.
> example, if you just have this segment in your config file, and then load
> resulting binary to $1000, it won't work. While the linker can prepare the
> data so it is able to run at the given address, it cannot load it to that
> address. The standard setup for the C64 is to load the generated program
> $801 (the BASIC start). The linker is used to relocate the data for this
> address, and the startup code will take all necessary steps to initialize
> necessary stuff so the program can run. If you want something special
> loading something to $5000), you will have to do that yourself.

Aaah, i see.

> Is there really a reason to load the data to $5000? If so, you will
> have to use your own linker and startup file, or write the data to a
> file that is loaded from within your program to the this address. While
> is possible, I wouldn't suggest this for a first time project, especially
> you don't really need it.
I don't want to do without music - and Trackers unfortunately don't produce
relocatable assembler source code. But loading within the program was no
problem, so everything works now.
By the way, is there a faster way to load data than using fopen and fread?


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-11-17 01:49:33 CET