Re: [cc65] Including binary-stuff question

From: Groepaz <groepaz1gmx.net>
Date: 2004-09-06 17:18:10
On Monday 06 September 2004 11:57, Marko Mäkelä wrote:
> On Mon, Sep 06, 2004 at 12:27:28PM +0300, Karri Kaksonen wrote:
> > In lyxass I had a command ibytes that I could use to include raw binary
> > sprite data like:
> > 
> > my_hero: ibytes "sprites/myhero.spr"
> > 
> > Is there a similar command available in the cc65 assembler?
> 
> Have you considered writing a simple program that converts the binary
> data to hexadecimal notation?  Something like the following, for
> generating C code on a unix-like system:
> 
> echo "static const unsigned char my_hero[] = {"
> od -w12 -vt x1 < sprites/myhero.spr \
> | sed -ne 's/ \(..\)/ 0x\1,/g;s/^[0-9]* /  /p'
> echo "};"
> 
> It shouldn't be too hard to adapt the above for producing ca65 code.
> It's best to include rules for such generated files in the Makefile,
> listing the source files and the code generator script as dependencies.

*yawn*

why would any sane person do that? to increase compile time by
large extend? argls :(

gpz
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Sep 6 17:26:18 2004

This archive was generated by hypermail 2.1.8 : 2004-09-06 17:26:27 CEST