Dig, uae4arm and hdf roms

Hi everybody,

I am starting to configure amiga emulation on my setup (based on Nvidia shield 2017), and I bumped into a number of issues. Some of them where I found workarounds that I will share below, some that seem to need a fix on Dig (or a better doc if there is already a way) :

Let's get started by explaining what I found so far and how I made it :

  • What I want to do is have all my amiga games in separate hdf files (which regroup conveniently all disks from a same game) and launch them through Dig, as all my other emulated games.
  • I managed to find quite easily the hdf images of the games I wanted, with proper alterations to be launched by uae4arm.
  • First problem : they won't launch if you do not use the whdload amiga loader (you can get one here, for example : https://github.com/libretro/libretro-uae/tree/master/whdload), I had a hard time figuring that as it is not very clearly documented
  • Second problem : whdload won't work until you add your own bios files INSIDE the hdf file (roughly follow tutorial here : https://forums.libretro.com/t/tuto-how-to-run-hdf-file-on-puae/24693)
  • Third problem : you have to setup uae4arm to boot on whdload.hdf as its first hard drive (HDX ID is not important, only boot priority), and add your .hdf game rom as the second hard drive (with lower boot priority).
  • And then you can enjoy your game in UAE4ARM

That leads me to the part where I am stuck : getting Dig not to wreck the preconfigured whdload.hdf first drive (and a few other parameters) when it generates its own uaeconfig.uae in dig/emu config/UAE. I tried to put my own emuconfig.uae there, hoping Dig would only add to its preconfigured hard drive, but no luck. I don't know if there is a way to do it with current version of Dig (maybe some emulator parameters in the manage emulators menu ? or some undocumented feature ?).

If this is not possible, can you add a way so we can maybe add a default.uae file in the dig/emu config/UAE folder that would override dig default parameters ?

For reference, here is how the lines are added in the .uae file when handling multiple virtual hard drives. In case you want to add this feature, you will have to first read the lines adding the default drives, then add the one for the game with a proper ID :

hardfile2=rw,DH1:/storage/emulated/0/Android/data/atua.anddev.uae4arm/files/WHDLoad.hdf,32,1,2,512,0,,uae0

uaehf0=hdf,rw,DH1:/storage/emulated/0/Android/data/atua.anddev.uae4arm/files/WHDLoad.hdf,32,1,2,512,0,,uae0

hardfile2=rw,DH0:*dig rom path*/*rom name*.hdf,32,1,2,512,0,,uae1

uaehf1=hdf,rw,DH0:*dig rom path*/*rom name*.hdf,32,1,2,512,0,,uae1

Anyway, I hope we can make this work ! I love dig, bought the complete version a few months ago and am 100% happy about it. I have been into emulation for 20+ years now and this is the first time I think we can have a really integrated and working all-purpose frontend ! Thanks

Comments

  • Ok, finally I managed to find a workaround, even if it was a lot of work. I now have my amiga roms collection fully operational from within Dig.

    What I had to do is generate a specific .uae file using a script for each rom I want to launch, and use this file as the rom in Dig, instead of the .hdf file.

    Of course in each .uae file, the only variant part is the two lines I posted earlier :

    hardfile2=rw,DH0:*dig rom path*/*rom name*.hdf,32,1,2,512,0,,uae1

    uaehf1=hdf,rw,DH0:*dig rom path*/*rom name*.hdf,32,1,2,512,0,,uae1

    So the easiest method is to create first a working uae file from within uae4all after fiddling with all the settings you need (go to "configuration", then save). Open it in a text editor, remove the 2 lines that need to vary and save it as a model (i used the name 000base.uae), then create a batch file with the foillowing code, put them both in your rom folder and run (don't forget to change "*dig rom path*" before) :

    PUSHD "%~dp0"

    FOR %%i IN (*.hdf *.hdz) DO (

    SET "image=%%~ni"

    SET "fullname=%%i"

    copy 000base.uae !image!.uae

    ECHO hardfile2=ro,DH0:*dig rom path*/!fullname!,32,1,2,512,0,,uae1 >> !image!.uae

    ECHO uaehf1=hdf,ro,DH0:*dig rom path*/!fullname!,32,1,2,512,0,,uae1 >> !image!.uae

    )

    In the end, I'd say that Dig has all it needs to run this kind of roms perfectly, but just lacks a little documentation to make it work. Now it is done ☺️

    There is certainly some ways to make it easier, but it is not such a big problem as long as there is a known workaround.

    ++

  • Hi

    I'm looking at a way to get my whdload games running using a similar method to yours.

    Can you explain a but more what your code does?

    Is this code run before the emulator starts? Is it android code?

  • edited February 16

    This code is DOS batch, you put it in a text file that you name "something.bat" then run it on your roms on a PC before putting them on your android device. It will create a new file with extension .uae for each hdf rom you have and save it in the same directory.

    You then copy the roms on your android device (i suggest having separate folders for uae and hdf files), you add the folder containing your uae files in Dig as rom path, and now dig starts uae4arm with all the parameters you have put in your uae file : settings you have altered in 000base.uae + complete path to the correct rom file for each rom, which by the way works on network shares as long as you type the complete absolue case sensitive path to your rom with no error (like /storage/My_Network_Share/roms/Amiga/romname.hdf).

    Hope this helps

  • Thanks for explaining.

  • On PC I have made a setup where in winuae I set up a hard drive folder that contains whdload and all my games.

    The startup script runs whdload for a selected game.

    When I select a game from a launcher a bat script is run that edits a file I created called prestartup. This file sets up some amiga variables with the game name and location. Then the script opens winuae. Also you can add a parameter to the game in the launcher that specifies a config file. If the config file exists it will pass it to the winuae launch command if not it will use the default config file.

    When the amiga emulator starts it boots into the startup sequence where the prestartup file is called first to set the variables then the startup calls whdload using the variables to launch the game.


    My question after that long explanation is is there a similar option for android to run a script that makes the same edits to prestartup and then launches the emulator.

    This would make launching whdload games from dig easier than having to create seperate startups for each game

Sign In or Register to comment.