Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#4576 closed defect (fixed)

SCUMM v0: Wrong palette colors

Reported by: SF/tobigun Owned by: sev-
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Zak McKracken

Description

The palette colors used in ScummVM for the V0 games (MM and Zak) considerably differ from the ones used in Vice. The latter ones look more natural (especially the skin color). The Vice colors look more like the original than the ScummVM ones.

Ticket imported from: #2847001. Ticket imported from: bugs/4576.

Attachments (5)

maniac-scummvm.png (14.5 KB ) - added by SF/tobigun 15 years ago.
mm-vice.png (19.2 KB ) - added by SF/tobigun 15 years ago.
zak-scummvm.png (15.6 KB ) - added by SF/tobigun 15 years ago.
zak-vice.png (19.0 KB ) - added by SF/tobigun 15 years ago.
vicepalette.c (7.1 KB ) - added by SF/tobigun 15 years ago.
VICE default palette YUV to RGB

Download all attachments as: .zip

Change History (10)

by SF/tobigun, 15 years ago

Attachment: maniac-scummvm.png added

by SF/tobigun, 15 years ago

Attachment: mm-vice.png added

by SF/tobigun, 15 years ago

Attachment: zak-scummvm.png added

by SF/tobigun, 15 years ago

Attachment: zak-vice.png added

comment:1 by Kirben, 15 years ago

ScummVM is already using the default palette (in default.vpl) from Vice.

comment:2 by lordhoto, 15 years ago

Summary: Scumm v0: wrong palette colorsSCUMM v0: Wrong palette colors

comment:3 by SF/tobigun, 15 years ago

Seems as if default.vpl is not used anymore as Vice's default palette. Neither is any other of the external *.vpl files used, VICE version 2.1 uses an internal palette which is stored in vicii/vicii-color.c. The colors are specified in YUV color space).

I attached a little tool that simply calls VICE's video_convert_cbm_to_ycbcr() and video_convert_ycbcr_to_rgb() functions to convert the default palette values to RGB. The values for saturation, brightness, contrast and tinting passed to video_convert_ycbcr_to_rgb() are the VICE default values. They do not alter the palette values. The default gamma value used by VICE is 0.88 but I changed it to 1.0 (no gamma correction) as gamma correction (and color adjustment in general) should be performed by ScummVM's display settings instead.

The RGB palette calculated by the program is: static const byte tableC64Palette[] = { 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x7E, 0x35, 0x2B, 0x6E, 0xB7, 0xC1, 0x7F, 0x3B, 0xA6, 0x5C, 0xA0, 0x35, 0x33, 0x27, 0x99, 0xCB, 0xD7, 0x65, 0x85, 0x53, 0x1C, 0x50, 0x3C, 0x00, 0xB4, 0x6B, 0x61, 0x4A, 0x4A, 0x4A, 0x75, 0x75, 0x75, 0xA3, 0xE7, 0x7C, 0x70, 0x64, 0xD6, 0xA3, 0xA3, 0xA3,

// Use 17 color table ... ... };

I'm not sure about the color at index 16 as it is not a C64 palette value.

MM C64 and Zak C64 look really nice in ScummVM with this palette (at least Zak looks exactly the same as in VICE with gamma correction turned off). As games in VICE and Emu64 look really similar it seems as if the latter one uses a similar internal default palette.

by SF/tobigun, 15 years ago

Attachment: vicepalette.c added

VICE default palette YUV to RGB

comment:4 by sev-, 14 years ago

OKay, I added the palette to ScummVM.

comment:5 by sev-, 14 years ago

Component: Engine: SCUMM
Game: Zak McKracken
Owner: set to sev-
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.