libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
114 stars 61 forks source link

.uae file not being loaded when starting adf file #35

Closed goedzo closed 6 years ago

goedzo commented 6 years ago

When the p-uae core is starting, it will only load the default .uaerc file found in the root folder of retroarch.

From the log: `------------------------------------------------------------------------------------ P-UAE 2.6.1 Git Commit: 0186c1b16f7181ffa02d73e6920d3180ce457c46 Build date: Mar 24 2015 22:46:15

Copyright 1995-2002 Bernd Schmidt 1999-2013 Toni Wilen 2003-2007 Richard Drummond 2006-2013 Mustafa 'GnoStiC' Tufan

See the source for a full list of contributors. This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Enumerating display devices.. Sorting devices and modes.. done load config './././.uaerc':0 Opening cfgfile './././.uaerc': OK obsolete config entry 'gfx_correct_aspect' obsolete config entry 'sound_bits' Unsupported chipmem size 300000! setup_soundEntered action_replay_load () ROM loader.. () Known ROM 'KS ROM v3.1 (A500,A600,A2000)' loaded ROM loader end memory init end No disk in drive 0. Building CPU table for configuration: 68000 prefetch 24-bit 1883 CPU functions Building CPU, 44316 opcodes (0 1 1) CPU=68000, FPU=0, MMU=0, JIT=CPU=0. INIT SOUND`

However the selected uae file that is used to overide the settings, and especially used to load the ADF file, is not being loaded at all.

From the configuation manual it reads this:

You may tell E-UAE to load a configuration file in addition to the default by passing the '-f' switch to E-UAE on the command line. Any options found in this file will override the values of the same options in the default file.

So somehow the -f switch is not passed when launching a .uae file.

goedzo commented 6 years ago

Seems that someone also fixed this already in their own build: https://forums.libretro.com/t/amiga-500-games-retroarch-config/1635/23

I've used his DLL and that seems to load the .uae file properly. However I have no idea what he changed to make this happen.

DamsRoxxx commented 6 years ago

Loading a uae file work well for me with current master.

Could you please test my core version. It's a build of #34 for windows x64 waiting to be merged.

puae_libretro.zip

If you used the p-uae core from nightly it's very old.

goedzo commented 6 years ago

Great! I am running on w64, so will download and test right now.

goedzo commented 6 years ago

Hi, your build is able to load .uae files! So that is perfectly done :). Thanks for the work!

I do have a question about disk-swapping. I see you have worked on this, and am curious if you support multidisk configured in uae files. So for example I have the following configuration in my uae file:

floppy0=./././../../Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De)(Disk 1 of 4)(A)[cr].adf floppy1=./././../../Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De)(Disk 2 of 4)(B)[cr].adf floppy2=./././../../Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De)(Disk 4 of 4)(D)[cr].adf floppy3=./././../../Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(De)(Disk 1 of 3)(A).adf floppy4=./././../../Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(De)(Disk 1 of 3)(A)[cr].adf floppy5=./././../../Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(De)(Disk 2 of 3)(B).adf floppy6=./././../../Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(De)(Disk 3 of 3)(C).adf floppy7=./././../../Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(De)(Disk 3 of 3)(C)[a savegame].adf

It would be great if that info is used to act as a playlist for diskswapping. In order to generate thes uae files, I actually created a little excel tool that generates all the UAE files from a folder where adf files can be found. If you are interested in this tool, you can download it here: https://www.dropbox.com/s/n7sznzmivjcm7zz/_Commodore%20-%20Amiga_uae%20generator.zip?dl=0

Just unpack the zip in a folder with adf files. Run _list.bat to generate _output.txt. Then open the text file and past the contents in the firs row. Check if the formula's on the other columns still generate output. Then run the macro and all the .uae config files are generated :)

BTW, you need to be able to understand VBA a little, because I hardcoded the paths in it :).

DamsRoxxx commented 6 years ago

In fact uae file loading was fixed before my changes but the windows build was broken. So the windows version was old and not fixed...

I fixed windows build next week and implemented many loading options (adf, hdf/hdz, m3u).

Actually, disk swapping only work with m3u file.

With m3u, UAE configuration file is automatically generated, you don't have to write a specific one

You can see the doc in the readme in my repo at https://github.com/DamsRoxxx/libretro-uae (it will be merged with #34).

It's easier than using a uae file for each game. Give it a try and tell me.

I Could implement disk swapping with UAE files. Will look at this next week ;-)

goedzo commented 6 years ago

Interesting idea about auto generating the config. What are the defaults of this generated file? And how can i generate all these m3u files :) Was really glad i automated the uae files Haha. Hope this is also as easy as i think it is.

DamsRoxxx commented 6 years ago

As I said, you can read the readme.md in my repo at https://github.com/DamsRoxxx/libretro-uae (it will be merged with #34) for the full documentation. Let me know if something is missing or not clear.

Anyway, here is a small example for your game.

With a simple text editor you can create a m3u in you 'Roms/Commodore - Amiga/' directory.

For the AGA version, it will be :

1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De).m3u'

The content of the m3u file will be :

1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De)(Disk 1 of 4)(A)[cr].adf
1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De)(Disk 2 of 4)(B)[cr].adf
1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De)(Disk 3 of 4)(C)[cr].adf
1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De)(Disk 4 of 4)(D)[cr].adf

Then, you can launch the game with RetroArch (adapt the path to your installation)

RetroArch.exe -L cores/puae_libretro.dll Roms/Commodore - Amiga/1869 - Erlebte Geschichte Teil I (1992)(Flair)(AGA)(De).m3u

Et voila!

As '(AGA)' is specified in the m3u name the core will automatically use the A1200 configuration. For this, you need 'kick40068.A1200' rom in your RetroArch system directory (again see the doc).

Once #34 is merged, I will update libretro-super infos to specify that m3u is supported for this core and it will be possible to launch a m3u file directly within retroarch with the content loader ;-)

You can modify your excel file to generate all the m3u files you need but let me suggest you to switch for python it's far better and easier than excel's vba ;-)

goedzo commented 6 years ago

Oh wow, you are the best right now :). I've generated all the m3u files with my excel :p and this works like a charm :). I noticed that when running an AGA core, it doesn't work with bios "[BIOS] Kickstart (USA, Europe) (v3.1 Rev 40.068) (A1200)", so I use the a600 rom instead. Games then run fine, but I am not sure if that is as "designed."

One thing I would like is to be able to use the controller for disk swapping. E.g. when I use my analog stick to move right, it automataclly ejects the disk, moves to the next disk and then inserts the dick all in one go. Moving to the left, does the same, but then the previous disk. I like to run in full screen and don't want to have to revert back to the menu for swapping. Is that possible to implement?

DamsRoxxx commented 6 years ago

Glad to hear that it work well and you enjoy it ;-)

Another good news is that PR build were fixed in libretro-super and that #34 build with no error.

Now, we just have to wait for it to be merged by an admin and that the core is made publicly available in the nightly repo.

Concerning your questions

It doesn't work with bios "[BIOS] Kickstart (USA, Europe) (v3.1 Rev 40.068) (A1200)", so I use the a600 rom instead. Games then run fine, but I am not sure if that is as "designed."

It work well for me. Have you check the md5 of the roms (there are bad dumps) ?

One thing I would like is to be able to use the controller for disk swapping.

It could be done within the core, but, as disk control function is a retroarch thing I think it would be better to add the capacity to map this function within RetroArch to be standard for each core (IMHO, It's a "frontend" function).

In the meantime you can map a hotkey combinaison on your controller to bring the retroarch menu and switch disk very easily (it's what I do).

However, I think we diverge from the original issue. I think we could close this one and open a thread in the libretro forum when the patch will be available to anyone.

goedzo commented 6 years ago

Yup agree, can be closed since all works great. p.s. what is the hash for your aga core? I will check to see if I have this somewhere. The ones I tried are: 59a4155a6e62ead200598b8f664844c9 db9e17ff198ca3f95cb19c86b6a67003

I do like your quick replies though! Seems you had the same issues as I had when trying out this core :). I will add an issue for the disk swapping though, because I don't agree it's a generic front-end part. Not all cores use multidisks, or multicards so it is related to a specific core. Anyway, let's discuss this topic in a new PR ;).

For now, fixed with #34

DamsRoxxx commented 6 years ago

As written in the readme.md the good hash for the A1200 kickstart rom is 646773759326fbac3b2311fd8c8793ee.

I'm glad you've tried and liked my changes ;-)

I've also done m3u and disk swapping for Amstrad CPC (cap32) and Atari ST (hatari) cores if you're interested.