cpctelera
cpctelera copied to clipboard
cpct_bin2c add option to prefix array
Hello, in some case i have to set to array a specific address (for music for example). And i have to set manually the prefix __at for each generation of my modified data.
I was thinking about a new option --prefix
ex: cpct_bin2c music.bin --prefix __at(0x40) > music.h
in order to have :
_at(0x40) const unsigned char G_music[] = { ... };
Thanks, Arnaud.
Hi @Arnaud6128,
Latest version of CPCtelera
(actual v1.5
branch) includes cpct_aks2c
script integrated within the build system. That means that you don't need to manually convert and place your music. You only have to edit cfg/music_conversion.mk, add one line asking for the conversion you want, and it automatically converts your music every time it gets changed.
With respect to cpct_bin2c
, it might be of use to add something to place converted output at a given memory location. However, I would rather not use __at
, because it has some potential linking issues. I think it will be preferably to convert output to assembly and use .org
for automatic placement.
As this is not urgent, I think it is worth considering again after next release.
Thank you for your continuous effort, @Arnaud6128 :)