A brilliant fusion of modern algorithms and retro constraints that makes vintage hardware shine. It turns the technical challenge of limited palettes into a seamless creative process for the 8-bit community.
Deep Dive
Voraussetzung
- Keine Daten verfügbar.
Nächste Schritte
- Keine Daten verfügbar.
Deep Dive
How to Put ANY Picture on an Amstrad CPC with ImageToCPC [new tool]Hinzugefügt:
Hi everyone. Today I would like to propose a C++ program that I wrote, which allows you to convert your favorite pictures so that they can be displayed on an Amstrad CPC in mode zero, mode one, or mode two.
The program works on Linux, Windows, and Mac, and you can download it for free on my website.
Simply Google search my name, Val Russo, and you will find my website, Blue Moon Shine.
Then go to projects and scroll down to software.
Click on to create a DSK file, and you will arrive to the page where you can download the source file.
You will have to compile the file, and here I'm going to show how I do it with Linux.
So, here is the C++ program, and in my current directory, I have only the program and two pictures.
The program expects 24-bit BMP pictures, so if your pictures are not in this format, you will have to convert them first. I do it with which is totally free.
Before we compile the program, let's look at the pictures we want to convert.
This first one is from the famous Belgian comics book, Gaston Lagaffe, and the second one is a photo of Lee Majors, Heather Thomas, and Douglas Barr.
So, we'll see how they turn out on the Amstrad.
Now, compiling the program is trivial since it doesn't call for any non-standard libraries.
Just run the compiler, in my case it is g++, the option -o is to choose the output name, image to CPC in my case, and then the source file, image to cpc.cpp.
And this is optional. I use the option -O3, which optimizes the code so that it runs faster.
The point is that the conversion is almost instantaneous for pictures in mode zero and mode two, but it takes a few seconds in mode one.
I will explain why.
All right, the code is compiled and ready to be used.
If you simply execute the code with no arguments, then it will display the help on how to use it.
As you can see, it is very simple.
Simply run the code. We are going to try mode zero and choose the first picture.
Let's call the output file test.dsk, and we are good to go.
Done.
Now, let's see on the Amstrad emulator what we got.
Insert.
And here is the DSK file that we just created.
Let's look at the content of the directory.
So, we have two files. The first one is our converted picture.
We could load it directly, but the picture itself doesn't contain any information about which palette to use.
This is why the second file has been created. It contains the definition of the palette for the image to be properly displayed.
Let's load it and take a quick look at it.
And here you can see how the 16 colors of the palette are chosen among the 27 available ones.
All right, let's run the program.
As you can see, the result in mode zero is not bad. However, there are a few details about the characters color that are missing.
So, alternatively, we may want to apply the Floyd-Steinberg dithering.
So, we run the program the same way, but we add the option -d.
Let's look at the result.
We reload the modified DSK file, and this time we can directly run the loader.
So, the result is different. Some may prefer it, some others not, so it's up to you.
But I think that it looks great when we step back from the screen by 6 ft or so.
All right, now let's look at how the picture turns out if we choose mode one.
And here, as I have already announced, the code is slower in mode one. Let me explain why.
In mode zero, the code has to choose the best 16 colors among 27 available ones.
That's about 13 possibilities that need to be tried for every pixels.
In mode zero, there are 32,000 pixels, so that means there are about 400 billion tests.
That's way too long. We cannot try all possibilities.
So, in mode zero, instead of determining the exact best palette of colors, the code uses an approximation that is almost instantaneous.
Most of the time, the approximated palette ends up being identical to the exact best one. But if it is not, then it is not a problem because we have 16 colors anyway. It is okay if one or two of them are not optimal.
But in mode one, we have only four colors, so we cannot afford to have one or two of them wrong.
However, there are only 17,550 possibilities for choosing four colors among 27 colors. And for the 64,000 pixels of mode one, this leads to only about 1 billion tests. And this is okay.
It's not instantaneous as you saw, but it takes only 5 seconds.
So, waiting for 5 seconds is acceptable.
Now, in mode two, we can neither afford to have a single color wrong, but since there are only 351 possible ways of choosing two colors among 27, and we have 128,000 pixels, this leads to only 45 million tests, so it is again almost instantaneous.
So, now you know why optimizing the palette in mode one is slower than in mode zero or mode two.
Okay, let's look at our converted picture in mode one.
All right, not bad.
Let's see what we get if we apply the Floyd-Steinberg dithering.
So, again, it is a matter of taste. If we stay close to the screen, I think it is better without dithering.
But if we stay 6 ft away, I think that it looks good, especially the noise that gives the illusion of a continuous gradient.
Next, let's try mode two.
Okay, I don't think we could expect anything else, but let's try with dithering.
And again, we recover some details about the color that were gone, and also some gradient in the hair.
Finally, let's try the photo with Lee Majors.
>> All right, not bad from mode zero. Let's see with dithering.
I think it looks great. And take again a look 6 ft away from the screen. I really like it.
I tried in mode one and mode two, but it looked really bad. So, the best choice for the mode just depends on the particular picture we want to convert. I hope you will find this program useful, in particular if you want to create a game.
Now, as I mentioned, you can download and use a program for free. The only compensation I'm asking you doesn't cost you anything. All you have to do is to give thumbs up to this video.
Now, if you want to do more, you can write a comment on the video.
And it would be wonderful if you could share the video on your social media.
Thanks for watching.
Ähnliche Videos
OpenHuman VS Hermes AI: Who Wins?
JulianGoldieSEO
285 views•2026-05-29
Long-Running Agents — Build an Agent That Never Forgets with Google ADK
suryakunju
142 views•2026-05-30
5 Mind Blowing Omni Uses Cases
PaulJLipsky
1K views•2026-06-02
This computer is made from real human brain cells. And you can buy it.
Talktmsmedia
3K views•2026-05-28
BREAKING: Microsoft’s New Image Generating Model Beat Out GPT 1.5 and Nano Banana 2
aimmediahouse
122 views•2026-06-03
I Made the Same Anime Fight Scene in Every AI Video Generator
NobleGooseAnime
295 views•2026-05-30
Nvidia Bets Big On AI PCs | New Chip To Power Windows Laptops | Technology | AI Updates | N18S
cnnnews18
3K views•2026-06-01
I Tested NEW Opus 4.8 on Four Projects (Updated LLM Leaderboard)
AICodingDaily
298 views•2026-05-29











