Opened 2 years ago

Closed 16 months ago

#11710 closed defect (fixed)

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

Reported by: raziel- Owned by: digitall
Priority: normal Component: Engine: Dragons
Version: 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 (12)

Blazing Dragons (Sony PlayStat_000.png (92.4 KB ) - added by raziel- 2 years ago.
Blazing Dragons (Sony PlayStat_001.png (10.8 KB ) - added by raziel- 2 years ago.
Blazing Dragons (Sony PlayStat_002.png (6.7 KB ) - added by raziel- 2 years ago.
dragons_big_endian_hack.diff (4.3 KB ) - added by dwatteau 2 years ago.
image-20200929-124115.png (932.5 KB ) - added by BeWorld2018 2 years ago.
2020-09-29_12h40_30.png (1.1 MB ) - added by BeWorld2018 2 years ago.
2020-09-29_12h40_36.png (819.8 KB ) - added by BeWorld2018 2 years ago.
Blazing Dragons (Sony PlayStat_003.png (18.6 KB ) - added by raziel- 18 months ago.
Blazing Dragons (Sony PlayStat_004.png (14.6 KB ) - added by raziel- 18 months ago.
Blazing Dragons (Sony PlayStat_005.png (97.6 KB ) - added by raziel- 18 months ago.
Snap-1 - 650x535x24.png (20.3 KB ) - added by raziel- 17 months ago.
Snap-2 - 650x535x24.png (16.1 KB ) - added by raziel- 17 months ago.

Change History (28)

comment:1 by BeWorld2018, 2 years 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-, 2 years ago

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

by dwatteau, 2 years ago

comment:3 by dwatteau, 2 years 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 years ago

Attachment: image-20200929-124115.png added

by BeWorld2018, 2 years ago

Attachment: 2020-09-29_12h40_30.png added

by BeWorld2018, 2 years ago

Attachment: 2020-09-29_12h40_36.png added

comment:4 by BeWorld2018, 2 years 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 years 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 years 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?

comment:7 by dwatteau, 20 months ago

Hi,

I've reworked my previous patch a bit, and submitted it as a draft here: https://github.com/scummvm/scummvm/pull/2784.

It's still incomplete, and probably wrong in some way, but indeed, let's suggest something and try improving it.

comment:8 by raziel-, 18 months ago

@dwatteau

Sorry for the long hiatus.

Your patch definitely had an impact on color rendering.

Actually there is only one color left that is wrong. (See screenshots)
It affects a tiny part of the outlines of sprites (actually just a few pixels that hold the color in question) in all the game, but most prominently the text background in the intro and on the options screen.

I don't know if it'd be easy to fix that last remaining artefact, but it would surely be cool.

Thank you very much for your work so far

comment:9 by dwatteau, 18 months ago

@raziel- Happy to know that this improves the situation for you too :)

Yeah, I'm aware of the remaining visual problems on big endian, but I didn't manage to fix them, unfortunately. I think there's something to be done in the alpha-blending part, but my C++ programming skills are modest, so that part is probably too "low level" for me.

I also hear some audio problems, as reported by BeWorld2018 above (some "pops" during cutscenes), and I have some ideas and some tests to do, for that. Maybe I'll have a patch for this audio stuff, but I don't think I'll be able to fix the remaining visual problems on big-endian myself.

comment:10 by raziel-, 18 months ago

@dwatteau

Oh..ok.
It's not that it is unplayable...still nice to get fixed, though.

Thank you

comment:11 by dwatteau, 17 months ago

Hi,

@raziel- Well, actually, I may have found a way of fixing most of the remaining visual problems on big-endian. It's been merged in the main Github branch.

I still see two small problems: 1. a small glitch still there around the creature on the opening copyright screen and 2. some big audio glitches in character voices, but I need to check if it's not just a problem with the French version, even on little-endian systems.

It should now be much easier for the eyes if you want to play it on an Amiga, though :)

comment:12 by raziel-, 17 months ago

@dwatteau

The gfx glitch you mentioned definitely got better (the rest of the game seems to be fine by a quick glance), but maybe the next two screenshots help understand the remaining gfx issue?
The creature does have promiment erroneous pixels around it, but also the background color, in both the last intro scene and the menu, is still wrong (it's a darkish green now, when it should be black, i assume).

Not sure if that has to do with the fact that i own the Playstation release, though

by raziel-, 17 months ago

Attachment: Snap-1 - 650x535x24.png added

by raziel-, 17 months ago

Attachment: Snap-2 - 650x535x24.png added

comment:13 by raziel-, 17 months ago

Could you tell me an early scene where you get the speech glitch?
I could rule out the english version on BE, if that would help?

comment:14 by dwatteau, 16 months ago

So, I had a look at this again.

To sum it up:

  1. I think most big-endian problems are indeed now fixed.
  2. I do have some audio glitches, but they also happen on little-endian. I think it's just a general problem in the support for the French version. But this deserves a different bug report.
  3. The creature in the intro does have a visual glitch around it, but it actually happens on little-endian systems too. See https://bugs.scummvm.org/ticket/11644. So I think it's unrelated to this big-endian ticket.
  4. Indeed, on big-endian systems, the intro menu is greener. It's even greener on my PowerBook than on your Amiga, for whatever reason... I also think that this is just related to https://bugs.scummvm.org/ticket/11644, but I can't be sure.

comment:15 by raziel-, 16 months ago

So, this can be closed then:-)

All remaining problems are either not BE exclusive or already in other open bug items archived.

comment:16 by digitall, 16 months ago

Owner: set to digitall
Resolution: fixed
Status: newclosed

As per raziel-'s comment, am closing this as fixed.

Note: See TracTickets for help on using tickets.