• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Using lr-puae for Amiga emulation

Scheduled Pinned Locked Moved Help and Support
amigalr-puaelhahdfwhdload
29 Posts 14 Posters 10.2k 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.
  • R
    rkoster
    last edited by rkoster 7 Feb 2019, 08:32 2 Jul 2019, 07:23

    Retroarch configs

    Setting Choices (default in bold) Notes
    Model A500 / A600 / A1200 This setting predefines a range of other settings including CPU, memory, and which Kickstart BIOS to use.
    Video standard PAL / NTSC Most software is PAL.
    High resolution true / false If off, high-res Amiga screens will have their horizontal resolution halved (only every other horizontal pixel will be drawn). Most classic games employ low-resolution screens.
    Crop overscan true / false Crops the overscan, which may result in clipped images in some games. A combination of NTSC and overscan settings will let you achieve all the possible resolutions for the Amiga screen; see the table under "Rendering" in the docs.
    Use analog false / true
    LEDs standard / simplified / none Shows drive activity and power LEDs at the bottom right.
    CPU speed real / max 'real' is recommended for games designed to run on an A500-class Amiga but which won't work on faster Amigas. This includes many classic Amiga games. If set to 'max', the CPU emulation will run at the maximum speed that the host CPU can achieve. lr-puae will spend as much time as it can emulating the 68000 CPU and will not wait at all per frame.
    CPU compatible false / true If enabled, E-UAE will use a slower but more compatible version of the CPU false emulation. This may be necessary to run some some demos and games correctly.
    Sound output none / interrupts / normal / exact * none - audio emulation is disabled. * interrupts - audio emulation is enabled but audio output is disabled. * normal - audio emulation is enabled and output enabled. * exact - audio emulation is enabled and exact output enabled.
    Sound frequency 11025 / 22050 / 44100 The frequency of emulated audio output in Hertz. Typically, higher frequencies will require more work, but have better quality.
    Sound channels mono / stereo / mixed The Amiga supports 4-voice stereo sound, with two channels output on the left channel and two on the right. mono - monophonic output; all Amiga voices are output on a single channel. stereo - stereo output; two Amiga voices are output on the left channel and two on the right. mixed - stereo output; the four Amiga voices are mixed and output on both left and right channels.
    Sound interpolation none / rh / crux / sinc Interpolation is a technique which "smoothes out" the audio. The three other choices are different algorithms for it which may give varying results and performance hits.
    Floppy speed 100 / 200 / 300 / 400 / 500 / 600 / 700 / 800 Valid values are 1x to 8x the speed of a standard Amiga floppy drive. Values other than 100 may affect compatibility with Amiga software, especially the floppy-based copy-protection systems included with some games.
    Immediate blit true / false If enabled then blits performed by the Amiga chipset emulation will be reported as finishing immediately. This may improve performance at the price of compatibility.
    NTSC chipset true / false Set this to match the video system
    Vertical centering none / simple / smart Used for centering the screen vertically within the emulator display (which is then positioned by the Retroarch display)
    Horizontal centering none / simple / smart See above.

    Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

    1 Reply Last reply Reply Quote 2
    • R
      rkoster
      last edited by rkoster 4 Jul 2019, 06:44

      The largest Amiga game collections are in .lha format. The core should support .lha files now, so you may not need this script anymore.

      Manually converting 'RetroPlay' style .lha files for use in lr-puae is a huge pain. Also, a ton of the files out there are actually .zip files with the contents of an .hdf file loose in the zip. Lastly, you also have some zips that have an .hdf inside them.

      So I did this little bash script: https://github.com/raphkoster/Amiga-LHA-ZIP-to-HDF-converter/blob/master/README.md

      Amiga-LHA-ZIP-to-HDF-converter

      This bash script converts LHAs, .HDFs, or zipped directories to HDFs usable in lr-puae in RetroPie.

      Installation

      This requires Python, PiP, amitools, and lha.

      sudo apt-get update
      sudo apt-get install python-pip
      sudo pip install amitools
      sudo apt-get install -y lhasa
      apt-get install zip unzip
      

      Then download and install this package.

      sudo chmod a+x amigatool*
      sudo chown pi:pi amigatool*
      

      Usage

      Put the scripts in the directory with your Amiga roms.

      To run on a single file

      ./amigatool.sh filename
      

      If the file is a .lha, it will be unpacked into a temporary directory, then rebuilt into an .hdf and placed in a new /hdf directory with the main .slave file renamed to game.slave. This will then run directly in lr-puae just like an .adf.

      If the file is a .zip with the Amiga files loose in it, it will be unzipped, then rebuilt into an .hdf compatible with lr-puae and copied to the /hdf directory.

      If the file is a .zip with an .hdf in it already, the .hdf will be converted to be compatible, if necessary, and moved to the /hdf folder.

      If the file is a .hdf, it will be converted if necessary, then moved to the /hdf folder.

      Note that these are not bootable .hdf files, as they do not have Kickstarts in them. They presume that you have properly set up WHDLoad.hdf and placed it in ~/RetroPie/BIOS

      The files will be output as zipped .hdf files which can then be scraped. Note that unzipped .hdf files will not work with some scrapers.

      To convert an entire directory

      ./amigatool-batch.sh
      

      This will go through every file in the folder in which it is run, and call the previous script on each one.

      Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

      S 1 Reply Last reply 14 Jun 2021, 13:10 Reply Quote 4
      • W
        weirdocollector
        last edited by 4 Jul 2019, 08:28

        Thank you for this!

        1 Reply Last reply Reply Quote 0
        • R
          rkoster
          last edited by rkoster 7 May 2019, 10:09 5 Jul 2019, 09:08

          The script has been updated with

          • Batch support! Do a whole directory with one line.
          • Verification of lr-puae compatibility and conversion of non-compatible .hdf files.
          • ...Including ones that were hidden inside of .lha files.
          • A much more elegant progress display.

          It now gives output like this:

          Batch processing 13 for conversion to lr-puae .hdf roms.
          0/13 Agony (1992)(Psygnosis).hdf: extracting....unpacking...processing.......This file does not contain a WHDLoad game.
          1/13 Agony_v1.3_0960.zip: extracting.....found game Agony...packing..........copying to /hdf...  Done!
          2/13 Agony_v2.0_NTSC_2701.lha: extracting.....found game AgonyNTSC...packing..........copying to /hdf...  Done!
          3/13 Alien Breed WHDLoad v2.3a.hdf: extracting....unpacking...copying to /hdf... Done!
          4/13 Alien Breed WHDLoad v2.3a.zip: extracting....unpacking...processing.............packing...copying to /hdf...  Done!
          5/13 Aliex_v1.1.lha: extracting.....found game Aliex...packing.....copying to /hdf...  Done!
          6/13 amigatool-batch.sh isn't a .zip, .lha, or .hdf.
          7/13 amigatool.sh isn't a .zip, .lha, or .hdf.
          8/13 Archon2_v1.1_0905.hdf: extracting....unpacking...processing......packing...copying to /hdf...  Done!
          9/13 Archon2_v1.1_0905.lha: extracting.....found game Archon2...packing.......copying to /hdf...  Done!
          10/13 Archon_v1.2_NTSC_0914.lha: extracting.....found game ArchonNTSC...packing.......copying to /hdf...  Done!
          11/13 Skipping directory blankhdfs.
          12/13 Skipping directory hdf.
          

          Instructions in the post above have been updated.

          Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

          1 Reply Last reply Reply Quote 2
          • R
            rkoster
            last edited by rkoster 7 Jun 2019, 20:26 6 Jul 2019, 17:42

            I just batch processed a few thousand files overnight, and couple dozen edge cases popped up. I'll take a look at these and see about updating the script.

            Scratch that -- I seem to have introduced a bug and the files are all broken. So don't use this script until I upload a fix.

            Edit two: Actually, it's just permissions. sudo chown pi:pi will fix the files that won't boot. I'll update the script shortly, but in the meantime, it's not a big bug.

            Script fixed. As noted in the new instructions, don't call these with "sudo" or you'll end up with roms owned by root that won't work.

            Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

            1 Reply Last reply Reply Quote 0
            • R
              rkoster
              last edited by 7 Jul 2019, 03:37

              The script has been updated with

              • a report at the end of the batch process telling you how it went:
              amigatool batch process complete.
              Total processed:                 9
                Skipped directories:           1
                Skipped files:                 2
                Didn't contain a WHDload game: 4
                File was corrupt:              1
                Already compatible files:      0
                Converted files:               1
              Converted .hdf files are located in the /hdf folder.
              
              • It now handles WHDLoad files with multiple .slave files in them.
              • It now gracefully detects and reports as corrupt files that couldn't be repacked into an hdf.
              • Better messaging in general.
              • Files are also leaner, and get zipped at the end so they can be scraped.

              Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

              1 Reply Last reply Reply Quote 1
              • R
                rkoster
                last edited by 7 Jul 2019, 23:04

                One more update, trapping more ways in which lha files can be corrupt. I processed around 2800 files with this test, so I feel fairly good about it now. Let me know if anyone runs into issues with it.

                One question I had is whether I should add [lr-puae] to the filenames, so that people can tell that these have been processed this way. But I don't know if that would affect scraping. Right now, they end up with exactly the same name as the RetroPlay WHDLoad files do.

                BTW @muldjord, either Skyscraper or Screenscraper.fr doesn't recognize .hdf as a file extension for Amiga, not sure which.

                Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

                muldjordM abunilleA 2 Replies Last reply 8 Jul 2019, 12:55 Reply Quote 0
                • muldjordM
                  muldjord @rkoster
                  last edited by 8 Jul 2019, 12:55

                  @rkoster It does now from 3.2.0, just released. :)

                  1 Reply Last reply Reply Quote 1
                  • H
                    Headrush69
                    last edited by 25 Aug 2019, 18:07

                    Thank you rkoster for this tool.

                    Right now I'm not using PUAE, but with the big changes that Retroarch just added to the core, I'm definitely going to be checking it out and your script will be so helpful.

                    https://www.libretro.com/index.php/core-news-puae-amiga-emulator-and-vice-commodore-64/

                    1 Reply Last reply Reply Quote 0
                    • abunilleA
                      abunille @rkoster
                      last edited by abunille 10 Mar 2019, 15:51 3 Oct 2019, 14:41

                      @rkoster

                      Hello and thank you for the Scripts.

                      I run into issues and don't know what i'm doing wrong.
                      All RetroPlay style .lha end with an Corrupt! message.

                      Example:

                      0/28 xxx_game.lha: extracting...../amigatool.sh: line 176: bc: command not found
                      'create size=M' IOError: can't determine geometry of HDF image file
                      .found game...building...Corrupt!
                      rm: cannot remove '../../hdf/xxx_game.hdf': No such file or directory
                      
                      amigatool batch process complete.
                      Total processed:                 28
                        Skipped directories:           1
                        Skipped files:                 2
                        Didn't contain a WHDload game: 0
                        File was corrupt:              25
                        Already compatible files:      0
                        Converted files:               0
                      Converted .hdf files are located in the /hdf folder.
                      

                      Maybe you have an idea what i'm doing wrong?

                      R 1 Reply Last reply 4 Oct 2019, 01:42 Reply Quote 0
                      • R
                        rkoster @abunille
                        last edited by 4 Oct 2019, 01:42

                        @abunille It says

                        ./amigatool.sh: line 176: bc: command not found

                        That sounds like you are missing the bc package. Try

                        sudo apt install bc

                        and try again?

                        Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

                        1 Reply Last reply Reply Quote 1
                        • abunilleA
                          abunille
                          last edited by 4 Oct 2019, 06:43

                          @rkoster

                          looks much better now.
                          Thank you :)

                          1 Reply Last reply Reply Quote 0
                          • R
                            rkoster
                            last edited by 4 Oct 2019, 18:00

                            Great, glad to hear it.

                            Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

                            1 Reply Last reply Reply Quote 1
                            • M
                              Mick2K
                              last edited by 5 Oct 2019, 15:32

                              I know it's not the right place to ask but i was never that deep into Amiga emulation but after reading this post i wanted to start.

                              I have a collection of a few thousand files in .lha format but many games are doubles or triples.

                              Is there a dat file or a batch script to remove the doubles and only keep one. I can't find anything.

                              T 1 Reply Last reply 24 Nov 2019, 07:08 Reply Quote 0
                              • J
                                jul16ares
                                last edited by jul16ares 18 Oct 2019, 20:01

                                Hello i get this errors i don't understand

                                I'm on archlinux

                                Cadaver_v2.2_0900.zip: unzipping....Traceback (most recent call last):
                                  File "/usr/bin/xdftool", line 11, in <module>
                                    load_entry_point('amitools==0.1.0', 'console_scripts', 'xdftool')()
                                  File "/usr/lib/python3.7/site-packages/amitools/tools/xdftool.py", line 827, in main
                                    code = queue.run()
                                  File "/usr/lib/python3.7/site-packages/amitools/tools/xdftool.py", line 100, in run
                                    exit_code = CommandQueue.run(self)
                                  File "/usr/lib/python3.7/site-packages/amitools/util/CommandQueue.py", line 42, in run
                                    exit_code = self.run_first(cmd_line, cmd)
                                  File "/usr/lib/python3.7/site-packages/amitools/tools/xdftool.py", line 163, in run_first
                                    exit_code = cmd.run(self.blkdev, self.volume)
                                  File "/usr/lib/python3.7/site-packages/amitools/tools/xdftool.py", line 58, in run
                                    self.blkdev = self.init_blkdev(self.args.image_file)
                                  File "/usr/lib/python3.7/site-packages/amitools/tools/xdftool.py", line 209, in init_blkdev
                                    return f.create(image_file, options=opts, force=self.args.force)
                                  File "/usr/lib/python3.7/site-packages/amitools/fs/blkdev/BlkDevFactory.py", line 161, in create
                                    if not geo.setup(options):
                                  File "/usr/lib/python3.7/site-packages/amitools/fs/blkdev/DiskGeometry.py", line 56, in setup
                                    (c, h, s) = self._parse_chs(options)
                                  File "/usr/lib/python3.7/site-packages/amitools/fs/blkdev/DiskGeometry.py", line 85, in _parse_chs
                                    if options.has_key('chs'):
                                AttributeError: 'dict' object has no attribute 'has_key'
                                .found game...building...Corrupt!
                                
                                1 Reply Last reply Reply Quote 0
                                • T
                                  Twerkem @Mick2K
                                  last edited by 24 Nov 2019, 07:08

                                  @Mick2K try https://lifehacker.com/the-best-duplicate-file-finder-for-windows-1696492476

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    Chuck_B
                                    last edited by 27 Nov 2019, 19:02

                                    I'm trying to play lha games, but games don't work. Do I have to set something?

                                    R 1 Reply Last reply 28 Nov 2019, 21:52 Reply Quote 0
                                    • R
                                      rkoster @Chuck_B
                                      last edited by 28 Nov 2019, 21:52

                                      @Chuck_B From the original post:

                                      "It does not support the .lha files used by Amiberry. See the next reply for a script that can convert .lha files for use in lr-puae.'' "The vast majority of WHDLoad format games out there are in .lha format for Amiberry, not in .hdf format. These will not load."

                                      This is because Amiberry-compatible files have been specifically set up to work with that emulator.

                                      See https://retropie.org.uk/forum/post/195052 for a script that will convert these .lha files to something that lr-puae can load.

                                      Alternatively, use Amiberry for them.

                                      Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

                                      jamrom2J 1 Reply Last reply 21 May 2021, 17:07 Reply Quote 0
                                      • F
                                        FetusSandwich
                                        last edited by 19 Feb 2020, 21:34

                                        @rkoster said in Using lr-puae for Amiga emulation:

                                        Then download and install this package.
                                        sudo chmod a+x amigatool*
                                        sudo chown pi:pi amigatool*

                                        Hi there. I have a massive collection of Amiga games in .LHA format that I've done a lot of manual scraping on, so was happy to find my way to this post! Thanks for all of your hard work.

                                        I've followed the above (I think) but am now receiving the following:

                                        ./amigatool-batch.sh: line 7: syntax error near unexpected token `newline'
                                        ./amigatool-batch.sh: line 7: `<!DOCTYPE html>'
                                        

                                        Any ideas as to what is happening? I'm assuming it's user error along the way, but another pair of eyes (or opinions) would be great.

                                        mituM 1 Reply Last reply 19 Feb 2020, 21:37 Reply Quote 0
                                        • mituM
                                          mitu Global Moderator @FetusSandwich
                                          last edited by 19 Feb 2020, 21:37

                                          @FetusSandwich Make sure the file has Unix line endings. If you copy/pasted this on a Windows machine, it might have the wrong line-endings.

                                          F 1 Reply Last reply 20 Feb 2020, 00:21 Reply Quote 1
                                          • 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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received