Jump to content
IGNORED

Setting up cc65


pwwit1

Recommended Posts

Hello,

 

I'm trying to setup a lynx toolchain again, and reading the posts here I used Karri's template and cc65 like so:

 

1. Installed dependencies with:

    sudo apt-get install git checkinstall mednafen

2. Removed my install of cc65:

    sudo apt-get remove cc65

3. Installed cc65:

    git clone https://bitbucket.org/atarilynx/lynx.git

    cd lynx/tools

    make -f Makefile.deb

    Builds and installs ok.

4. Grabbed the template from here:

    https://forums.atariage.com/topic/287147-is-10-fps-a-too-low-framerate-for-a-lynx-tile-based-game/page/2/

    Builds ok and creates a cart/game.lyx

 

But unfortunately it loads up to a blank screen. If i use the precompiled cc65 from the same forum post (cc65_14.09-1_amd64.deb) I can build and run template with no problems!

 

There are no obvious errors when building cc65, so I'm at a loss as to what is going on.

Does anyone have any suggestions, or am I trying to use an old toolchain?

 

Thanks for any response :)

 

Paul

    

 

 

 

 

Link to comment
Share on other sites

You need to change the cart/directory.s macro. There is 4 word fields now. The block is not a byte anymore.

 

.macro entry old_off, old_len, new_off, new_block, new_len, new_size, new_addr
new_off=old_off+old_len
new_block=new_off/__BLOCKSIZE__
new_len=new_size
    .word   new_block
    .word   (new_off & (__BLOCKSIZE__ - 1))
    .word   new_addr
    .word   new_len
.endmacro
 
; Entry 0 - first executable
_MAIN_FILENR=0
entry __STARTOFDIRECTORY__+(__DIRECTORY_END__-__DIRECTORY_START__), 0, mainoff, mainblock, mainlen, __STARTUP_SIZE__+__INIT_SIZE__+__CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__, __STARTUP_LOAD__
 
_HM_FILENR=_MAIN_FILENR+1
entry mainoff, mainlen, hmoff, hmblock, hmlen, __HM_CODE_SIZE__+__HM_RODATA_SIZE__+__HM_DATA_SIZE__, __HM_START__
...
 
The reason for this is that one of my games I am developing exceeds 512k and the new header works for carts up to 2MB. I also hope to make this change to the official cc65.
Link to comment
Share on other sites

On 1/4/2023 at 3:31 AM, karri said:

You need to change the cart/directory.s macro. There is 4 word fields now. The block is not a byte anymore.

 

.macro entry old_off, old_len, new_off, new_block, new_len, new_size, new_addr
new_off=old_off+old_len
new_block=new_off/__BLOCKSIZE__
new_len=new_size
    .word   new_block
    .word   (new_off & (__BLOCKSIZE__ - 1))
    .word   new_addr
    .word   new_len
.endmacro
 
; Entry 0 - first executable
_MAIN_FILENR=0
entry __STARTOFDIRECTORY__+(__DIRECTORY_END__-__DIRECTORY_START__), 0, mainoff, mainblock, mainlen, __STARTUP_SIZE__+__INIT_SIZE__+__CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__, __STARTUP_LOAD__
 
_HM_FILENR=_MAIN_FILENR+1
entry mainoff, mainlen, hmoff, hmblock, hmlen, __HM_CODE_SIZE__+__HM_RODATA_SIZE__+__HM_DATA_SIZE__, __HM_START__
...
 
The reason for this is that one of my games I am developing exceeds 512k and the new header works for carts up to 2MB. I also hope to make this change to the official cc65.

 

I went through this too when setting up for my LynxJam game. Also, Karri, you were kind enough to rework my files to allow the create of *.LYX and *.O files.

 

I've been wondering if it would be good to update the template to account for these things. So that people can set up their system and have a bug-free experience from the start. If it seems good to have an updated template, how should we do that? Should I make mine available? Or should Karri or nop90 update theirs that is already available?


 

Edited by OldAtAtari
Link to comment
Share on other sites

8 hours ago, 42bs said:

Just setup a github repo and announce it here.

 

 

Thank you, 42bs. I'll get to work on that. I didn't want to step on the toes of these guys who set up the template in the first place. And I also didn't want to create confusion by creating yet another version of the template. There are two or three already. But I'll make it clear that mine is updated and working as of 2023.

  • Like 1
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...