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


Forums > C64 Coding > Linking binary files without start address with exomizer
2021-08-06 21:05
wil

Registered: Jan 2019
Posts: 66
Linking binary files without start address with exomizer

Some tools spit out binary files without the CBM-typical 2-byte start address.

Is there a way to link these files with exomizer?

For example, let's say screen.bin is a 1000 byte file containing screen data (that usually belongs to $400-$7E7).

With
exomizer sfx 58235 screen.bin,$400 -o screen.exo.prg

I can generate a self-extractor where the screen.bin data is put to $400, however minus the first two bytes which exomizer interprets as start address.

There is a possibility to set an offset, so screen.bin,$400,10 would skip the first 10 (12) bytes. However, an offset of -2 does not work, since exomizer interpretes this as counting from the back of the file.

Currently I solve the problem by adding two dummy bytes to the beginning of each .bin file, but given the versatility of exomizer I wonder if there is a possibility to link bin files directly.
2021-08-06 21:30
TheRyk

Registered: Mar 2009
Posts: 2475
Problem is sfx treats every source as .PRG IIRC

One workaroud might be when misinterpreted-for-header-bytes are $77,$88:
exomizer sfx $target+2 sourcewithoutheader.bin -o output.prg -n -Di_load_addr=$decruncheraddress -f "LDA #$77 STA target+0 LDA #$88 STA target+1"

did not try if this Sledge Hammer method's working, though :)
2021-08-06 21:33
tlr

Registered: Sep 2003
Posts: 1814
From the manual:
Plain raw files are loaded by adding an address to it using the @-character.
It is also possible to specify an optional offset and optional length if only a
part of the file is to be loaded. Like addresses, the offsets and the lengths
can be given in either decimal or hexadecimal notation using either 0x or $
prefixes. The offset can also be negative and will then be applied from the end
of the file instead of from the start.

<file name>@<load address>[,[<offset>][,[<length>]]]

* To load a raw file to 0x3456, append @0x3456 to the file name.
* To load a raw file to 0x0400 and skip the 16 first bytes and read the
  following 37 bytes, append @0x400,16,37 to the file name.
* To load the first 256 bytes of a raw file to 0x0900, append @$900,,256 or
  @$900,0,256 to the file name.


cld from my cbmtools 0.8 is quite flexible with regards to these tasks if the provided options aren't enough.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
DJ Gruby/TRiAD
Guests online: 148
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 OTD  (9.8)
3 Antitrack  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.069 sec.