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.
    • A
      AmigaGamer
      last edited by

      Discovered this while looking for games to try on my PI4.
      Diablo 1 has been reverse engineered via the Devilution Project, and theres linux including a raspberry pi build on DevilutionX version 0.4.0

      Havent done much testing yet, but it seems to run well on PI4 through the desktop environment. All i had to do is copy the main diablo file from CD (ensuring the name was lowercase) into the same folder as the devilutionx provided executable.

      Might be of interest to some of you, and possibly good as a future "port" addition for retropie

      https://github.com/diasurgical/devilutionX/releases/download/0.4.0/devilutionx-linux-armhf.tar.xz
      https://github.com/diasurgical/devilutionX/releases

      BiZzAr721B 1 Reply Last reply Reply Quote 1
      • BiZzAr721B
        BiZzAr721 @AmigaGamer
        last edited by

        @AmigaGamer I was just looking into this myself. I have Diablo II running on pi3b+ using pixel desktop/wine with a custom compiled exe. I just watched a cool video of how Diablo 1 was reversed engineered. The team that ported Diablo to PSX left source code debug files on the retail disc which provided a "key legend" to the source code. Lol

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

          Does anyone know if there is a script module for this on Retropie now? It seems such a popular game, I'm surprised if there isn't.

          ExarKunIvE 1 Reply Last reply Reply Quote 0
          • ExarKunIvE
            ExarKunIv @AdamBeGood
            last edited by

            @AdamBeGood i think the reason it is not that easy to setup on the pi3.

            but the pi4 its not that hard if you know how to compile

            here @ecto posts how to install it.

            RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
            RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
            Maintainer of RetroPie-Extra .

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

              @ExarKunIv Cool, it is good you can compile it. That isn't something I've learned yet, but maybe I'll have a look in the future. I am sure someone will write an installer for Pi4 before too long anyway, and I do have a lot of games I should probably be playing rather than looking for new ones!

              Thank you, have a good weekend.

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

                Just added this to my RetroPie-Extra repository: https://github.com/zerojay/RetroPie-Extra/blob/master/scriptmodules/ports/devilutionx.sh

                roslofR 1 Reply Last reply Reply Quote 1
                • 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
                                            • 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.