Freddi Fish 5 - can't run - color errors

Subforum for discussion and help with ScummVM's iPhone port

Moderator: ScummVM Team

Post Reply
zolimax
Posts: 6
Joined: Mon Jan 26, 2015 7:32 pm

Freddi Fish 5 - can't run - color errors

Post by zolimax » Fri Apr 03, 2015 11:24 pm

When I try to run Freddi Fish 5 on iOS (8.1) in ScummVM 1.7.0, it only show me the errors:
"Could not initialize color format" and "Error running game: Unsupported color mode"

I tried all versions I found: official eng win, official eng mac, pirated rus win (akella), pirated rus win (7wolf). And all shows me the same. Also, I tried various render modes - but no result.
In Windows version of ScummVM all working good.
Help me to run it, please!

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3303
Joined: Mon Oct 31, 2005 7:39 am

Re: Freddi Fish 5 - can't run - color errors

Post by eriktorbjorn » Sat Apr 04, 2015 7:11 am

zolimax wrote:When I try to run Freddi Fish 5 on iOS (8.1) in ScummVM 1.7.0, it only show me the errors:
"Could not initialize color format" and "Error running game: Unsupported color mode"
The short answer is that this probably means that the game simply isn't supported in the iPhone version of ScummVM. Here's how I understand it:

Unlike the earlier Freddi Fish games, Freddi Fish 5 uses 16-bit graphics instead of 8-bit graphics. With 8-bit graphics, you have a palette of 256 colours and each pixel is one byte specifying which of these colours to use. With 16-bit graphics, you don't need a palette since each pixel is two bytes containing the R, G and B values.

But that's where things get a bit tricky. Usually you'd think of R, G and B each being between 0 and 255, but obviously then you would need 24 bits, not 16. It gets even worse if you also include A for transparency. There are several different ways of encoding this as a 16-bit value, both in how many bits and which particular bits each colour gets.

A game may ask for any format, and as long as the graphics backend supports it, it should work. From what I understand, the Windows/Mac/Linux version of ScummVM knows of ten different 16-bit formats, while the iPhone version only seems to know about one.

Freddi Fish 5 uses RGB555. "555" means that each colour gets five bits (so one bit is unused), and "RGB" tells which five bits each colour gets. Unfortunately, the iPhone version only seems to support RGB565.

(I have no idea how much work it would be to support RGB555. I don't even own an iPhone, let alone know how to write programs for one.)

zolimax
Posts: 6
Joined: Mon Jan 26, 2015 7:32 pm

Post by zolimax » Thu Apr 09, 2015 10:25 pm

Hm.. Strange, if iPhone port know RGB565, it must not be problem to make RGB555 support.
I have read about this formats:

Code: Select all

RGB565
R 1111100000000000
G 0000011111100000
B 0000000000011111

RGB555
R 0111110000000000
G 0000001111100000
B 0000000000011111
So, for convert from RGB555 to RGB565 need just make simple shift and disjunction (lowest green bit in RGB565 will be just 0). And after use all like RGB565.

Post Reply