Re: [cc65] Splitting crt0.s files in two?

From: Karri Kaksonen <karri1sipo.fi>
Date: 2009-11-05 13:23:04
Fatih Aygün wrote:
> The first function is to create the header and footer for the binary format of the platform. The second one is to
> initialize the C run-time. I think splitting those two functions in two separate files might bring some advantages.
>   

True. The Lynx has a RAM-only download header as the main format.

It also needs a second kind of header that is very difficult to do. This 
second header needs to assemble a directory structure. Currently I have 
done this by hand and it is a very slow and tedious process.

If it is possible I would like to automate this cart directory header 
process somehow. Every named segment triggers one directory entry. How 
to do this is beyond my skills today.


; Entry 0 - title sprite (mandatory)
off0=__LOADER_SIZE__+(__DIRECTORY_END__-__DIRECTORY_START__)
blocka=off0/1024
len0=__TITLE_SIZE__
        .byte   <blocka
        .word   off0 & $3ff
        .byte   $00
        .word   __TITLE_START__
        .word   len0

; Entry 1 - first executable (mandatory)
off1=off0+len0
block1=off1/1024
len1=__CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__
        .byte   <block1
        .word   off1 & $3ff
        .byte   $88
        .word   __CODE_LOAD__
        .word   len1

Any ideas of how to do file output like this from crt0.s?

Could some CONDES stuff be used for this?
--
Karri

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Nov 5 13:23:21 2009

This archive was generated by hypermail 2.1.8 : 2009-11-05 13:23:24 CET