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

Date view Thread view Subject view

From: Game 64 - Benjamin Bahnsen (bb_at_game64.de)
Date: 2003-11-17 01:54:05


Hi!

>
> Please note that it is your job to make sure the resulting data is loaded
to
> $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.
For
> example, if you just have this segment in your config file, and then load
the
> 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
at
> $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
all
> necessary stuff so the program can run. If you want something special
(like
> 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
probably
> have to use your own linker and startup file, or write the data to a
separate
> file that is loaded from within your program to the this address. While
this
> is possible, I wouldn't suggest this for a first time project, especially
if
> 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?

Regards,
  Benjamin



----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de 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