+karri Posted March 19, 2014 Share Posted March 19, 2014 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 Quote Link to comment Share on other sites More sharing options...
LX.NET Posted March 25, 2014 Share Posted March 25, 2014 Fantastic news Karri. I've been late to this party, but thanks on behalf of everyone for fixing this. I hadn't spotted it myself. Could you explain the purpose of the LOWCODE segment to us (and of STARTUP for that matter)? Thanks. Quote Link to comment Share on other sites More sharing options...
+karri Posted March 27, 2014 Author Share Posted March 27, 2014 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 Quote Link to comment Share on other sites More sharing options...
Shawn Jefferson Posted March 29, 2014 Share Posted March 29, 2014 (edited) 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 March 29, 2014 by Shawn Jefferson Quote Link to comment Share on other sites More sharing options...
obschan Posted September 30, 2014 Share Posted September 30, 2014 (edited) 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 September 30, 2014 by obschan Quote Link to comment Share on other sites More sharing options...
+karri Posted October 4, 2014 Author Share Posted October 4, 2014 (edited) 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 October 4, 2014 by karri 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.