Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
  You are not logged in - nap
deflacc65   [2022]

deflacc65 Released by :
Wil

Release Date :
16 December 2022

Type :
Other Platform C64 Tool

Released At :
Commodore-Treffen Graz $3A

User rating:awaiting 8 votes (7 left)   See votestatistics

Credits :
Code .... Wil of Vintage Computing Carinthia

Download :

Look for downloads on external sites:
 Pokefinder.org


Summary
Submitted by wil on 18 December 2022
deflacc65 lets you generate a cc65 compiled program with a higher start address by removing the parts between startup code and code segment and shifting the startup code up.

cc65 is a well-working C-compiler for various 8-bit targets. However, when I wanted to shift a compiled piece of code to a higher address in order to co-exist with some other (non-C) program on the C64, I ran into the problem that first, it seems that you cannot get rid of the 12-Byte BASIC stub ("816 SYS 2061") and second, you cannot select a start address higher than 9999 (in dec). The two issues are actually connected since the BASIC stub code generation works only with four-digit SYS addresses. So trying to use a SYS address higher than 9999 leads to an error.

An alternative approach to bypass cc65's compulsive generation of the BASIC stub would be to leave the start address but move the CODE segment to the intended address (plus some small buffer). This generates the BASIC stub at $801 with a SYS 2061 and puts s short start code to $80d, which initializes the C environment and finally jumps to the compiled program in the CODE segment.

To use deflacc65, you need to
1. Patch cfg-File with deflacc65 -p configfile.cfg -s planned_start_address
2. Compile and link your program using the modified cfgfile with cl65 -C configfile.cfg mycfile.c -o mycfile.prg
3. Deflate the air between Startup and CODE segment with deflacc65 mycfile.prg

deflacc65 will always remove the BASIC stub, even if there is nothing to deflate. Thus it can also be used as a BASIC stub cutter.
Search CSDb
Advanced
Navigate
Prev - Random - Next
Detailed Info
· Summaries (1)
· User Comments (2)
· Production Notes
Fun Stuff
· Goofs
· Hidden Parts
· Trivia
Forum
· Discuss this release
Support CSDb
Help keep CSDb running:



Funding status:




About this site:
CSDb (Commodore 64 Scene Database) is a website which goal is to gather as much information and material about the scene around the commodore 64 computer - the worlds most popular home computer throughout time. Here you can find almost anything which was ever made for the commodore 64, and more is being added every day. As this website is scene related, you can mostly find demos, music and graphics made by the people who made the scene (the sceners), but you can also find a lot of the old classic games here. Try out the search box in the top right corner, or check out the CSDb main page for the latest additions.
Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.081 sec.