|
|
|
|
|
Step 2
We need an image to convert from. There are multiple options; Download an images or draw one yourself.
Optional: There is an image editor for Linux called GIMP, which allows you to manipulate and draw images. It can be installed by;
sudo apt-get install gimp
|
|
|
|
|
|
|
|
|
|
|
|
|
Step 3
The program the will be used to convert the image into a representation as a C program that could be compiled with C-64 is called Python. Python is a scripting language that have a wide range of libraries, among them Python Image Library (PIL) which allow us to manipulate image.
Copy the following source into an editor (gedit) and save it as image.py
|
|
|
|
|
|
|
|
|
|
|
|
|
Step 4
Run the program by typing the following;
python image.py yourfile.png
This will write out how many characters you have used to realize your image. If it’s 257, then we are in a bit of trouble, since we have to reuse characters to approximate the image.
The script created two files img.h and charmap.h.
img.h contains the definition of the image, while charmap.h contains the definition of the characters used
|
|
|
|
|
|
|
|
|
|
|
|
|
Step 6
Type the following to build it as a C-64 program
cc65 -O -t c64 image.c
ca65 image.s
ld65 -t c64 -o image image.o lib/c64.lib
Then to see the result;
x64 image
|
|
|
|
|
|
|
|
|