Jump to content
IGNORED

program to convert file into a C array


Shannon

Recommended Posts

I wrote a program like that once, but never used it, since I realized that cc65 has a way to include binary data...

 

I wrote mine for a project where I needed to include Atari 6502 code in a program written to run on Linux... gcc doesn't have incbin.

 

Haven't heard back from the original poster, dunno whether he found it useful or not.

Link to comment
Share on other sites

You may also use the "xxd" program from the Vim package. It's available on most Linux systems (if you have vim installed) and also on Windows: go to http://www.vim.org/download.php and get the latest gvimXX.exe (currently gvim71.exe).

 

With xxd creating C-style arrays is really simple (I use it quite often in my Makefiles):

xxd -i infile outfile

so long,

 

Hias

Link to comment
Share on other sites

Hey thanks, that'll probably be easier. My compile environment is currently set-up for Xbox. I'm not sure how to compile something to run under DOS just yet. I'm still testing on the actual files right now but eventually want to integrate a few of them into the code itself.

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...