Amiga Angband UTF-8

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aNACHRONiST
    Rookie
    • Aug 2020
    • 14

    Amiga Angband UTF-8

    Hi, I compile games and programs for Amiga BBSes, mainly aBSiNTHE BBS(telnet: absinthebbs.net port 1940). I recently compiled the Angband variant Sil-Q to Amiga and added some BBS functionality.

    I have managed to get Angband 4.2.2 to compile right up until linking. Amiga terminals do not support UTF-8 and we lack wide-character functions such as:

    wcslen

    and since we have ncurses and not ncursesw:

    waddnwstr

    etc.
    Our font Topaz is Extended ASCII, so it supports 256 characters. If Angband does not use considerably more than this, I would love if there was a compile option for using it instead. I was going to try to make a hack, but I thought it would be much better to go to the maintainers!

    It's been forever since Amiga users could enjoy playing this game, I'd love to port it and I'm 90% of the way there. Any thoughts?
  • aNACHRONiST
    Rookie
    • Aug 2020
    • 14

    #2
    It looks like I may have to just try to revert the game to use char instead of wide character and use the appropriate functions like strlen() instead.

    One thing I do need to know is if Angband now uses characters past 0-255. I could make a translation table for those values.

    I'm new to C(REXX and AREXX programmer believe it or not) so this will be slow going. If anyone has any input, that would be awesome

    Comment

    • Pete Mack
      Prophet
      • Apr 2007
      • 6883

      #3
      I think nearly everything is latin-1. Unicode was adopted for cross platform compatibility (no messing around with CP-1251 and the like.) The only files you'd need to check are monster.txt and artifact.txt

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9634

        #4
        I think the main place to check for characters outside 0-255 is the pref files in lib/customize. You may also need to check the encodings for accented names like Ingwë in the datafiles in lib/gamedata.
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • aNACHRONiST
          Rookie
          • Aug 2020
          • 14

          #5
          Great, thanks for the responses

          Comment

          • aNACHRONiST
            Rookie
            • Aug 2020
            • 14

            #6
            Okay, I am making some progress. I am using a library that translates a string or character from UTF-8 encoding to ISO-8859-1. It looks like I'll only have to do that in two places.

            Now I need to change the display code to use the older ncurses functions that do not support wide characters.

            What is the last version of Angband before the wide character support? Looking at it would be a big help.

            Comment

            • aNACHRONiST
              Rookie
              • Aug 2020
              • 14

              #7
              Nevermind, they all look similar before 4.x. Alright, compiling now...*fingers crossed*

              Comment

              • aNACHRONiST
                Rookie
                • Aug 2020
                • 14

                #8
                Yesterday I dove back into this to give it another shot. I'm happy to say that there has been good progress.

                I have been able to get the graphics to draw more or less correctly. The trick is to convert the wide character strings to Latin-1, as Latin-1 is just the first 256 characters of UTF-8 anyway. I then pass that to the non-wide character NCURSES display functions. A lot went in to the rest of it, but this was always the main obstacle.

                I am getting a crash soon after loading, so I am debugging to track down the cause. After that I should be able to tighten things up and have a functioning Amiga port of the latest Angband. I'll update here when that happens.

                Comment

                Working...
                😀
                😂
                🥰
                😘
                🤢
                😎
                😞
                😡
                👍
                👎