RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Diablo 1 ported to PI

    Scheduled Pinned Locked Moved Ideas and Development
    ports retropiediablo
    70 Posts 15 Posters 12.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • roslofR
      roslof @zerojay
      last edited by roslof

      @zerojay love it (as usual). I copied the .sh and gave it a go.

      Seeing this fatal:

      = = = = = = = = = = = = = = = = = = = = =
      Building 'devilutionx' : devilutionx - Diablo Engine
      = = = = = = = = = = = = = = = = = = = = =
      
      fatal: No names found, cannot describe anything.
      CMake Warning at CMakeLists.txt:53 (project):
        VERSION keyword not followed by a value or was followed by a value that
        expanded to nothing.
      

      Tail:

      = = = = = = = = = = = = = = = = = = = = =
      Configuring 'devilutionx' : devilutionx - Diablo Engine
      = = = = = = = = = = = = = = = = = = = = =
      
      ln: failed to create symbolic link '/home/pi/.local/share/diasurgical/devilution': No such file or directory
      chown: cannot access '/home/pi/.local/share/diasurgical/devilution': No such file or directory
      
      1 Reply Last reply Reply Quote 0
      • Z
        zerojay
        last edited by zerojay

        You can ignore the fatal part when building the code.

        Not sure why the moveConfigDir didn't work, I guess because it doesn't exist yet, but... hmm. I suppose as a quick fix, you can create the directory (or run the game once) and then run configure again and it will then work. I'll look into fixing it but shouldn't stop you from being able to run it and play.

        Edit: I've just pushed an update that should fix it. Let me know.

        roslofR 1 Reply Last reply Reply Quote 1
        • roslofR
          roslof @zerojay
          last edited by roslof

          @zerojay said in Diablo 1 ported to PI:

          Edit: I've just pushed an update that should fix it. Let me know.

          The fix worked @zerojay. Appreciated. Looks like it's working.

          EDIT: I'm investigating why the font isn't appearing by default, and why I can't get the character ("archive") to load after creating a character.

          Default appearance:
          devilutionx.jpg

          I modified emulators.cfg with pushd/popd to get the font to display:
          devilutionx_font.jpg.

          I can see the character files are being created in opt/retropie/configs/ports/devilutionx/devilution

          Almost there... Will work on it a bit later.
          Cheers!
          -Ros

          1 Reply Last reply Reply Quote 1
          • Z
            zerojay
            last edited by

            The font is part of the original installation and should be found in /opt/retropie/ports/devilutionx/.

            Everything else is related to not finding your data file in /home/pi/RetroPie/roms/ports/devilutionx, I would imagine.

            roslofR 1 Reply Last reply Reply Quote 0
            • roslofR
              roslof @zerojay
              last edited by roslof

              @zerojay said in Diablo 1 ported to PI:

              The font is part of the original installation and should be found in /opt/retropie/ports/devilutionx/.

              Everything else is related to not finding your data file in /home/pi/RetroPie/roms/ports/devilutionx, I would imagine.

              With you. I checked the source code and found this:

              void pfile_read_player_from_save()
              {
              	HANDLE archive;
              	DWORD save_num;
              	PkPlayerStruct pkplr;
              
              	save_num = pfile_get_save_num_from_name(gszHero);
              	archive = pfile_open_save_archive(NULL, save_num);
              	if (archive == NULL)
              		app_fatal("Unable to open archive");
              	if (!pfile_read_hero(archive, &pkplr))
              		app_fatal("Unable to load character");
              ...
              

              Still not sure why this is failing. I see that the character and configuration are being symlinked to opt/retropie/configs/ports/devilutionx/devilution (and the files are being created properly by the executable). The mpq from my CD is properly named, in lowercase, in $romdir/ports/devilutionx -- and being properly read (since I am seeing the game UI, character creation, credits, etc.)

              Still digging...

              roslofR 1 Reply Last reply Reply Quote 0
              • roslofR
                roslof @roslof
                last edited by roslof

                @roslof said in Diablo 1 ported to PI:

                Still digging...

                Got it... At last!
                It's Finally Here.jpg

                Okay, after banging my head against the wall all night, learned that there's something wrong with the compiled executable.

                I visited this link from the OP and downloaded the binary (devilutionx-linux-armhf.7z) and replaced the contents in /opt/retropie/ports/devilutionx/ -- and now the game runs fine.

                So now, just wondering if the script compile options are funky, or if (more than likely) the code base is currently in an unstable state?

                Repro of my issue after running the script:

                1. Font doesn't load by default
                2. After creating a character and trying to start the game, a red window appears. If the font is hooked up, you'll see "Error Unable to open archive" -- otherwise, it'll be blank per my earlier post.

                Again this issue does not occur with the 1.0.1 binary (built back in March).

                Hope this is helpful.
                Cheers!

                roslofR ectoE 2 Replies Last reply Reply Quote 0
                • roslofR
                  roslof @roslof
                  last edited by roslof

                  @zerojay I recommend adding pushd/popd to the emulator so the TTF is read:

                  devilutionx = "pushd /opt/retropie/ports/devilutionx/; /opt/retropie/ports/devilutionx/devilutionx --data-dir /home/pi/RetroPie/roms/ports/devilutionx"; popd"
                  default = "devilutionx"
                  

                  To see what I mean, select "Credits" and without it, you shouldn't see the credits crawl.

                  Thanks again for providing the script!

                  Cheers,
                  -Ros

                  1 Reply Last reply Reply Quote 0
                  • Z
                    zerojay
                    last edited by zerojay

                    Nothing wrong with the compiled executable here. No need to add pushd or popd here either as the font lives directly next to the executable. Perhaps something specific to your system maybe.

                    EDIT: I just deleted everything to do with the app including config files and recompiled latest from scratch. The resulting executable launches just fine, finds the font next to the executable and loads the diablo data perfectly. So yeah, gotta imagine it's something on your system causing problems there.

                    roslofR 1 Reply Last reply Reply Quote 0
                    • roslofR
                      roslof @zerojay
                      last edited by

                      @zerojay said in Diablo 1 ported to PI:

                      So yeah, gotta imagine it's something on your system causing problems there.

                      Thanks for checking and re-checking! Yes, it must be something on my system that has to do with compiling the code, because a pre-built executable works fine for me. I'll backup my pi and upgrade everything and see what I get.

                      1 Reply Last reply Reply Quote 0
                      • ectoE
                        ecto @roslof
                        last edited by

                        @roslof I, too had the same problems. I looked into the runcommand.log and found that the ttf was expected in the /usr/share/fonts/ttf/ folder. So I copied the font from the /opt/retropie/ports/devilutionx/ folder over and then at least the error message was readable. I then reinstalled devilutionx from source and I could start the the game without further issues.

                        roslofR 1 Reply Last reply Reply Quote 1
                        • roslofR
                          roslof @ecto
                          last edited by roslof

                          @ecto said in Diablo 1 ported to PI:

                          @roslof I, too had the same problems. I looked into the runcommand.log and found that the ttf was expected in the /usr/share/fonts/ttf/ folder. So I copied the font from the /opt/retropie/ports/devilutionx/ folder over and then at least the error message was readable. I then reinstalled devilutionx from source and I could start the the game without further issues.

                          Oh that's interesting! How did you get devilutionx to output verbose logs to runcommand.log? By default, I do see output about the controller and such, but nothing regarding the font showed up for me, and I was unable to find command-line options for this.

                          EDIT: I think I better understand. The code writes to the log if the font cannot be found. But that wasn't my problem. I used pushd to guide the game finding the font in the executable dir... So it passed initialization and didn't yield and error. But [I suspect[ later in the code, it fails trying to read the font from the usr/share/fonts/truetype folder, which wouldn't show up in the log.

                          Excited to try what you suggest! Can't want to play the updated version with all the fixes and enhancements.

                          @zerojay would you confirm if you have a copy of the font sitting in a /usr/share/fonts/ttf/ folder? If you do, that would explain why your script is working well for you.

                          Z 1 Reply Last reply Reply Quote 0
                          • Z
                            zerojay @roslof
                            last edited by

                            @roslof said in Diablo 1 ported to PI:

                            @ecto said in Diablo 1 ported to PI:

                            @roslof I, too had the same problems. I looked into the runcommand.log and found that the ttf was expected in the /usr/share/fonts/ttf/ folder. So I copied the font from the /opt/retropie/ports/devilutionx/ folder over and then at least the error message was readable. I then reinstalled devilutionx from source and I could start the the game without further issues.

                            Oh that's interesting! How did you get devilutionx to output verbose logs to runcommand.log? By default, I do see output about the controller and such, but nothing regarding the font showed up for me, and I was unable to find command-line options for this.

                            Excited to try what you suggest! Can't want to play the updated version with all the fixes and enhancements.

                            @zerojay would you confirm if you have a copy of the font sitting in a /usr/share/fonts/ttf/ folder? If you do, that would explain why your script is working well for you.

                            /usr/share/fonts/ttf/ doesn't exist. Running a search of all ttf files in /usr/share/fonts/ shows the game's font does not exist there at all. It is only in /opt/retropie/ports/devilutionx/ and that's where you should have it too.

                            function install_devilutionx() {
                            md_ret_files=(
                            'build/devilutionx'
                            'build/CharisSILB.ttf'
                            )
                            }

                            roslofR 1 Reply Last reply Reply Quote 0
                            • roslofR
                              roslof @zerojay
                              last edited by roslof

                              @zerojay said in Diablo 1 ported to PI:

                              @roslof said in Diablo 1 ported to PI:

                              @ecto said in Diablo 1 ported to PI:

                              @roslof I, too had the same problems. I looked into the runcommand.log and found that the ttf was expected in the /usr/share/fonts/ttf/ folder. So I copied the font from the /opt/retropie/ports/devilutionx/ folder over and then at least the error message was readable. I then reinstalled devilutionx from source and I could start the the game without further issues.

                              Oh that's interesting! How did you get devilutionx to output verbose logs to runcommand.log? By default, I do see output about the controller and such, but nothing regarding the font showed up for me, and I was unable to find command-line options for this.

                              Excited to try what you suggest! Can't want to play the updated version with all the fixes and enhancements.

                              @zerojay would you confirm if you have a copy of the font sitting in a /usr/share/fonts/ttf/ folder? If you do, that would explain why your script is working well for you.

                              /usr/share/fonts/ttf/ doesn't exist. Running a search of all ttf files in /usr/share/fonts/ shows the game's font does not exist there at all. It is only in /opt/retropie/ports/devilutionx/ and that's where you should have it too.

                              function install_devilutionx() {
                              md_ret_files=(
                              'build/devilutionx'
                              'build/CharisSILB.ttf'
                              )
                              }

                              Based on @ecto 's recommendation, I created the ttf folder and copied the font. I ran the script -- and for the first time, I'm able to compile play the new version. Would love to better understand why.

                              EDIT: In DevilutionX source, I do see reference to /usr/share/fonts/truetype (truetype and not 'ttf'). So to get further, I moved the font from the ttf folder I credted into the existing truetype and now EVERYTHING works, including the credits roll. Finally...

                              Here are the source files referencing /usr/share/fonts/truetype:

                              devilutionX-master\Packaging\debian\rules:
                              install -pdm755 debian/devilutionx/usr/share/fonts/truetype/
                              
                              devilutionX-master\SourceX\DiabloUI\fonts.cpp:
                              ttf_font_path = "/usr/share/fonts/truetype/" TTF_FONT_NAME;
                              

                              @zerojay for the record you're completely correct about the font being installed next to the executable and such. Not sure why the game is not finding it there for both me and @ecto.

                              Z ectoE 2 Replies Last reply Reply Quote 0
                              • Z
                                zerojay @roslof
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • ectoE
                                  ecto @roslof
                                  last edited by

                                  @roslof Uh, yeah, about that, sorry! It was late yesterday evening and I typed from mind. it is of course /usr/share/fonts/truetype/and not /usr/share/fonts/ttf/ I just quickly checked that on my retropie.

                                  Glad, it works for you now.

                                  1 Reply Last reply Reply Quote 1
                                  • A
                                    AdamBeGood
                                    last edited by

                                    Disclaimer: noob trying to get this to work.

                                    My thought was that if I copied the .sh file to my Ports Scriptmodule directory, then Retropie-Setup would see it and then when I looked into the details in that menu, that would direct me as to where to put the Diablo game files before running this.

                                    RetroPie-Setup won't even load if I put the .sh file in the directory, so that isn't the way forward. How do I run the .sh? Sorry for asking questions that may appear obvious.

                                    Z 1 Reply Last reply Reply Quote 0
                                    • Z
                                      zerojay @AdamBeGood
                                      last edited by zerojay

                                      @AdamBeGood said in Diablo 1 ported to PI:

                                      Disclaimer: noob trying to get this to work.

                                      My thought was that if I copied the .sh file to my Ports Scriptmodule directory, then Retropie-Setup would see it and then when I looked into the details in that menu, that would direct me as to where to put the Diablo game files before running this.

                                      RetroPie-Setup won't even load if I put the .sh file in the directory, so that isn't the way forward. How do I run the .sh? Sorry for asking questions that may appear obvious.

                                      Everything you need to know is on the front page of the repo. If you are having problems with RetroPie-Setup, it's not caused by my .sh file which is working fine here with RetroPie-Setup.

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        AdamBeGood @zerojay
                                        last edited by AdamBeGood

                                        @zerojay said in Diablo 1 ported to PI:

                                        @AdamBeGood said in Diablo 1 ported to PI:

                                        Disclaimer: noob trying to get this to work.

                                        My thought was that if I copied the .sh file to my Ports Scriptmodule directory, then Retropie-Setup would see it and then when I looked into the details in that menu, that would direct me as to where to put the Diablo game files before running this.

                                        RetroPie-Setup won't even load if I put the .sh file in the directory, so that isn't the way forward. How do I run the .sh? Sorry for asking questions that may appear obvious.

                                        Everything you need to know is on the front page of the repo. If you are having problems with RetroPie-Setup, it's not caused by my .sh file which is working fine here with RetroPie-Setup.

                                        I am not criticising your .sh at all! I am sure this is my fault. I've had a look at the repo but I still don't really know what I'm doing (although I see it tells me where to put the data file).

                                        I get the following:

                                        /home/pi/Retropie-Setup/scriptmodules/ports/devilutionx.sh: line 6: syntax error near unexpected token "newline"
                                        /home/pi/Retropie-Setup/scriptmodules/ports/devilutionx.sh: line 6: '<DOCTYPE.html>'
                                        Module /home/pi/Retropie-Setup/scriptmodules/ports/devilutionx.sh is missing valid rp_module_id
                                        Module /home/pi/Retropie-Setup/scriptmodules/ports/devilutionx.sh is missing valid rp_module_desc
                                        
                                        Z 1 Reply Last reply Reply Quote 0
                                        • Z
                                          zerojay @AdamBeGood
                                          last edited by

                                          @AdamBeGood said in Diablo 1 ported to PI:

                                          @zerojay said in Diablo 1 ported to PI:

                                          @AdamBeGood said in Diablo 1 ported to PI:

                                          Disclaimer: noob trying to get this to work.

                                          My thought was that if I copied the .sh file to my Ports Scriptmodule directory, then Retropie-Setup would see it and then when I looked into the details in that menu, that would direct me as to where to put the Diablo game files before running this.

                                          RetroPie-Setup won't even load if I put the .sh file in the directory, so that isn't the way forward. How do I run the .sh? Sorry for asking questions that may appear obvious.

                                          Everything you need to know is on the front page of the repo. If you are having problems with RetroPie-Setup, it's not caused by my .sh file which is working fine here with RetroPie-Setup.

                                          I am not criticising your .sh at all! I am sure this is my fault. I've had a look at the repo but I still don't really know what I'm doing (although I see it tells me where to put the data file).

                                          I get the following:

                                          /home/pi/Retropie-Setup/scriptmodules/ports/devilutionx.sh: line 6: syntax error near unexpected token "newline"
                                          /home/pi/Retropie-Setup/scriptmodules/ports/devilutionx.sh: line 6: '<DOCTYPE.html>'
                                          Module /home/pi/Retropie-Setup/scriptmodules/ports/devilutionx.sh is missing valid rp_module_id
                                          Module /home/pi/Retropie-Setup/scriptmodules/ports/devilutionx.sh is missing valid rp_module_desc
                                          

                                          You need to follow the instructions on the front page of the repository.

                                          A 1 Reply Last reply Reply Quote 0
                                          • A
                                            AdamBeGood @zerojay
                                            last edited by AdamBeGood

                                            @zerojay said:

                                            You need to follow the instructions on the front page of the repository.

                                            Once I worked out where the front page was this wasn't too bad, your instructions are very clear and I can see why you get frustrated.

                                            I also had to perform the font steps mentioned above, but now it runs perfectly. Thank you, and apologies again!

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.