| |
Released At :
Commodore-Treffen Graz $3A
Credits :
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 |
| Navigate | |
|
| Detailed Info | |
|
| Fun Stuff | |
· Goofs · Hidden Parts · Trivia
|
|
| Forum | |
|
| Support CSDb | |
|
| |
|