Opened 3 months ago

Last modified 2 months ago

#11710 new defect

Blazing Dragons (GB/FR): Messed up colours with Big Endian

Reported by: raziel- Owned by:
Priority: normal Component: Engine: Dragons
Keywords: Cc:
Game: Blazing Dragons

Description

ScummVM 2.3.0git (Sep 12 2020 21:11:09)
Features compiled in: Vorbis FLAC MP3 RGB zLib MPEG2 Theora AAC A/52 FreeType2 FriBiDi JPEG PNG cloud (servers, local)

See the attached screenshots.
Both in-game (worse) and on the start respectively the Copyright screen are the colours completely messed up, probably because of endianess issues, since i'm using a Big Endian platform.

Blazing Dragons (Sony PlayStation/English (GB))
SLES_00247

AmigaOS4 - PPC - BE - SDL
gcc (adtools build 8.3.0) 8.3.0

Attachments (7)

Blazing Dragons (Sony PlayStat_000.png (92.4 KB ) - added by raziel- 3 months ago.
Blazing Dragons (Sony PlayStat_001.png (10.8 KB ) - added by raziel- 3 months ago.
Blazing Dragons (Sony PlayStat_002.png (6.7 KB ) - added by raziel- 3 months ago.
dragons_big_endian_hack.diff (4.3 KB ) - added by dwatteau 2 months ago.
image-20200929-124115.png (932.5 KB ) - added by BeWorld2018 2 months ago.
2020-09-29_12h40_30.png (1.1 MB ) - added by BeWorld2018 2 months ago.
2020-09-29_12h40_36.png (819.8 KB ) - added by BeWorld2018 2 months ago.

Change History (13)

comment:1 by BeWorld2018, 3 months ago

Same bug here on MorphOS plateform with ScummVM 2.2.0pre.

Blazing Dragons (Sony PlayStation/French (FR))
MorphOS 3.13 - PPC - BE - SDL 2.0.12
gcc 9.2.0

comment:2 by raziel-, 3 months ago

Summary: Blazing Dragons (GB): Endianness messed up coloursBlazing Dragons (GB/FR): Messed up colours with Big Endian

by dwatteau, 2 months ago

comment:3 by dwatteau, 2 months ago

Hi,

I have a triple PPC boot (Mac OS Leopard, Debian unstable, OpenBSD) on a PowerMac G4 here, so I tried having a look at this.

The attached diff (dragons_big_endian_hack.diff) "fixes" the backgrounds, the characters, the bag, and the menus. Text is readable, but incomplete; I couldn't get alpha blending to display like it should (I'm quite lost in screen.cpp), so for the moment I just disabled it.

It's a crude and incomplete hack, it's been done through trial and error, and it may be completely inefficient (CPU usage seems high?). I'm rather submitting it so that you get what's missing in the code, and then someone might come up with a real and more elegant solution.

My understanding is that the palette is almost never switched back to native big-endian, before displaying the surfaces on big-endian systems.

Feel free to ping me if you want me to test some other patches, or run some gdb commands.

by BeWorld2018, 2 months ago

Attachment: image-20200929-124115.png added

by BeWorld2018, 2 months ago

Attachment: 2020-09-29_12h40_30.png added

by BeWorld2018, 2 months ago

Attachment: 2020-09-29_12h40_36.png added

comment:4 by BeWorld2018, 2 months ago

Hi
I test your path and working better :-)

But i have somes scenes with another bug (attachments).

I listen sound problem with this scene.

Thanks

comment:5 by dwatteau, 2 months ago

Hi,

Ah yes indeed I didn’t test a lot of scenes or the sound part. My C++ skills are modest so I mainly submitted the patch above to help the developers understand where the endianness problem lies :)

comment:6 by raziel-, 2 months ago

@BeWorld2018

Finally a fellow Big Endian user with the same target platform, hope to see a lot of bug reports from you...together we stand, together we fight ;-)

ok...enough metal ballads for tonight...

@dwatteau

Thanks for chiming in, hopefully this will get picked up soonish.
You can also simply add a Pull Request with your changes and findings and let other devs help you out?

Note: See TracTickets for help on using tickets.