Jump to content
IGNORED

cc65 trunk version is up and running again


karri

Recommended Posts

After completing "Shaken and stirred" I wanted to be able to compile it with the up-to-date version of cc65 also.

 

The trunk is now fixed.

 

The problem turned out to be the LOWCODE segment that was missing from all cfg files and also the directory.s.

 

If you want to use the latest build (any build after today) then you need to edit you config files and directory.

 

 

SEGMENTS {
    EXEHDR:    load = HEADER, type = ro;
    BOOTLDR:   load = BOOT,   type = ro;
    DIRECTORY: load = DIR,    type = ro;
    STARTUP:   load = RAM,    type = ro,  define = yes;
    LOWCODE:   load = RAM,    type = ro,  define = yes, optional = yes;
    INIT:      load = RAM,    type = ro,  define = yes, optional = yes;

 

The new thing here is the element define = yes on the LOWCODE: line.

 

The second thing you need to do is in the directory.s file in your cart building code.

 

 

        .include "lynx.inc"
        .import         __STARTOFDIRECTORY__
        .import         __RAM_START__
        .import         __CODE_SIZE__,__DATA_SIZE__,__RODATA_SIZE__
        .import         __STARTUP_SIZE__,__INIT_SIZE__,__LOWCODE_SIZE__
        .import         __BLOCKSIZE__
        .export         __DEFDIR__: absolute = 1


; ------------------------------------------------------------------------
; Lynx directory
        .segment "DIRECTORY"

__DIRECTORY_START__:
off0=__STARTOFDIRECTORY__+(__DIRECTORY_END__-__DIRECTORY_START__)
blocka=off0/__BLOCKSIZE__
; Entry 0 - first executable
block0=off0/__BLOCKSIZE__
len0=__STARTUP_SIZE__+__INIT_SIZE__+__CODE_SIZE__+__DATA_SIZE__+__RODATA_SIZE__+__LOWCODE_SIZE__
        .byte   <block0
        .word   off0 & (__BLOCKSIZE__ - 1)
        .byte   $88
        .word   __RAM_START__
        .word   len0
__DIRECTORY_END__:

 

The LOWCODE_SIZE must be added to the first executable's length. Otherwise all the segments get garbled up that follow the first entry.

 

--

Karri

 

Link to comment
Share on other sites

Sorry, I have no clue.

 

The trunk was broken for a long time and there is still comments like "most interesting is the failing add3 test i guess - this worked before, and someone who is more familiar with the code might be interested in fixing it".

 

Perhaps it would be safe keeping development to the svn 5944 for the present. If you need the chipper run-time you can pick up lynx-snd.s from https://bitbucket.org/karri/shaken/src/

 

--

Karri

Link to comment
Share on other sites

LOWCODE is only used by some of the other targets (such as the Atari 8-bit computer line) to ensure that vital code is not banked out of memory. The Atari 8-bit uses a memory banking window at 0x4000 to 0x7FFF. It's not required as far as I know on the Lynx, but obviously there is some code placed there by the shared runtime.

Edited by Shawn Jefferson
Link to comment
Share on other sites

  • 6 months later...

LOWCODE is only used by some of the other targets (such as the Atari 8-bit computer line) to ensure that vital code is not banked out of memory. The Atari 8-bit uses a memory banking window at 0x4000 to 0x7FFF. It's not required as far as I know on the Lynx, but obviously there is some code placed there by the shared runtime.

It seems to be irq and clock from the lib.

Hmmm still facing the same "garbled up segments" issue on the 2.14 though.

Edited by obschan
Link to comment
Share on other sites

While waiting for a good version of cc65 to materialize we set up a good-versions repository at

https://bitbucket.org/atarilynx/lynx

 

It contains the last version made by Uz before the cc65 got broken.

The idea is to make a complete set of tools that would work together without bugs.

 

It is a developer owned repository. If you want you get write access to it.

 

-

Karri

Edited by karri
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...