Menu

#659 Broken exit text (from ENDOOM lump)

Always occurs!
closed-fixed
None
5
2020-10-12
2020-04-28
No

On all my Unix machines the exit text from WAD files is more or less broken.
Only the internal DooM Legacy text looks good.

On my PowerPC Mac the output is total garbage. I tracked this down to wrong endianess, while the data from the ENDOOM lump is interpreted, and can provide a patch.

But it still does not print what is expected (taking PrBoom+ as reference).
For testing I have created a patch that take the MSB of the attributes as blinking flag
(according to the Doom specs the background color is only encoded with 3 Bits).
It still looked broken.

My next try was to assume the text from the ENDOOM lump as IBM437 encoded and convert it to UTF-8 for output to my terminal (configured to an UTF-8 based locale). Now it looks better, but still not as expected. Looks like I still don't understand how the encoding works.

Because of the outstanding release:
Should I split the working endianess fix from the patch for merging into 1.48.2?

Discussion

  • Wesley Johnson

    Wesley Johnson - 2020-04-28
    • assigned_to: Wesley Johnson
     
  • Wesley Johnson

    Wesley Johnson - 2020-04-28

    DoomLegacy 1.48.2 is already past release, so we are working on an immediate release of 1.48.3, due to some unforseen bugs.
    As this release is time sensitive, I cannot promise that I will even get to look at this, or include it. I expect there will be another release within 6 months due to work that was cut-off just to get 1.48 out the door.

    The encoding for Doom Final text is custom for Doom. There is a special utility to create it.

    This is probably another of my previous patches come back to bite me. Faint memory that something got changed in legacy.wad the last time this text was worked on.

    Just guessing, something might have been substituted from legacy.wad for a known case, and that probably does not work for these unknown cases.
    It is another job of tracking down exactly what that code is doing, and watch out for legacy wad content.

    I need to know what wads have Final text encoded text, so I can test what happens.
    I have not seen this.

     

    Last edit: Wesley Johnson 2020-04-28
  • Michael Bäuerle

    I have tested the following two WAD files:
    Back to Saturn X E1 (Vanilla)
    https://www.doomworld.com/idgames/levels/doom2/megawads/btsx_e1
    Eviternity (MBF)
    https://www.doomworld.com/idgames/levels/doom2/Ports/megawads/eviternity

    The terminal emulator was in all cases an xterm, running in an UTF-8 locale (default on most modern Unix operating systems).

    $ uname
    Linux
    $ uname -m
    ppc
    $ locale
    LANG=en_US.utf8
    LANGUAGE=
    LC_CTYPE="en_US.utf8"
    LC_NUMERIC="en_US.utf8"
    LC_TIME="en_US.utf8"
    LC_COLLATE="en_US.utf8"
    LC_MONETARY="en_US.utf8"
    LC_MESSAGES="en_US.utf8"
    LC_PAPER="en_US.utf8"
    LC_NAME="en_US.utf8"
    LC_ADDRESS="en_US.utf8"
    LC_TELEPHONE="en_US.utf8"
    LC_MEASUREMENT="en_US.utf8"
    LC_IDENTIFICATION="en_US.utf8"
    LC_ALL=""
    $ doomlegacy -iwad doom2.wad -file btsx_e1a.wad btsx_e1b.wad
    Apr 29 2020 Doom Legacy 1.47.2 (rev 1412) 01:34:51.
    [...]
    [Exit, see attached Screenshot]

    $ uname
    NetBSD
    $ uname -m
    amd64
    $ locale
    LANG="en_US.UTF-8"
    LC_CTYPE="en_US.UTF-8"
    LC_COLLATE="C"
    LC_TIME="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_ALL=""
    $ doomlegacy -iwad doom2.wad -file btsx_e1a.wad btsx_e1b.wad
    Apr 29 2020 Doom Legacy 1.47.2 (rev 1412) 15:23:35.
    [...]
    [Exit, see attached Screenshot]

    Similar results for Eviternity exit screen.

     

    Last edit: Michael Bäuerle 2020-04-29
  • Michael Bäuerle

    With the attached patch it looks as expected and similar to what PrBoom+ displays in a separate window.

    Tested with SVN revision 1518.

    What is still missing is a check for the terminal capabilities. If e.g. the locale uses ISO 8859-1 encoding, the exit text cannot be converted (because this encoding provides not all of the required characters). I think the ENDOOM lump should be skipped completely in this case (or replaced with the Legacy default exit screen).

     

    Last edit: Michael Bäuerle 2020-04-29
  • Michael Bäuerle

    There is also a bug in the documentation (or the code).

    The working command line option to suppress the exit text is "-noendtxt"
    (tested with the SDL codepath).

    But the documentation here:
    http://doomlegacy.sourceforge.net/docs/legacy.html
    says "-noendtext".

     
  • Wesley Johnson

    Wesley Johnson - 2020-05-05

    Due to faults with big-endian machines, I had to do this quickly to make the Release.
    Any remaining problems do not affect play, so that is the best I can do for now.
    TODO: output vt100 encoding for Linux systems (which is native).

    Fixed SVN 1521
    Most of your code got incorporated, but with some changes.
    Added cv_textout to select between vanilla EndText encoding, and UTF-8 encoding.
    When in doubt, have to let the user choose.

    I could not get the UTF-8 output to work on my Linux console (later I found a encoding switch for UTF-8, but it defaults back to my usual setting), and UTF did not work for Linux term as it does not have the fonts for those characters.

    Add test for "-noendtext" as that is how the user will likely spell it, and that matches the docs.
    The existing "-noendtxt" is kept for old user compatibility.

     
  • Wesley Johnson

    Wesley Johnson - 2020-05-05
    • status: open --> pending-fixed
     
  • Michael Bäuerle

    The config.cfg entry is a good idea. Thank you for merging the patch!

    Quick test with SVN revision 1522 on a Little Endian machine looks good (tested with "Off" and "UTF8" in config.cfg).

     
  • Wesley Johnson

    Wesley Johnson - 2020-10-12
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB