UAE core for Retroarch

See UAE core for Retroarch

About the resolutions

A said in P-UAE configuration.txt:

	To emulate a high-resolution, fully overscanned PAL screen - either
	non-interlaced with line-doubling, or interlaced - you need to use a
	display of at least 720 by 568 pixels. If you specify a smaller size,
	E-UAE's display will be clipped to fit (and you can use the gfx_center_*
	options - see below - to centre the clipped region of the display).
	Similarly, to fully display an over-scanned lo-res PAL screen, you need a
	display of 360 by 284 pixels.

So, in the version provided yesterday Iā€™ve setted these resolutions in the settings (itā€™s in the source code):

  • 360x284: PAL Low resolution with overscan
  • 320x256: PAL Low resolution cropped/clipped (without the ā€œbordersā€)
  • 360x240: NTSC Low resolution with overscan
  • 320Ɨ200: NTSC Low resolution cropped/clipped (without the ā€œbordersā€)
  • 720x568: PAL High resolution with overscan
  • 640Ɨ512: PAL High resolution cropped/clipped (without the ā€œbordersā€)
  • 720x480: NTSC High resolution with overscan
  • 640Ɨ400: NTSC High resolution cropped/clipped (without the ā€œbordersā€)

When using a high resolution mode, rendering will be doubled horizontally and vertically for low res games. Itā€™s compatible with High res games (like The Pawn) and the Workbench but scaling shaders (scalefx) will look ugly.

When using a low resolution, scaling shaders (scalefx) looks greats but high res games and and the workbench are badly rendered (but still usable).

Cropped resolutions work with most of the games but, as others said, certains games use overscan. And itā€™s not the real dealā€¦ Project-X for instance which use PAL overscan, itā€™s even cropped in NTSC with overscanā€¦

You can choose what you want from the core options in RetroArch but it needs a restartā€¦ Thatā€™s not idealā€¦

NB: If you use specific .uae files you can specify what you want I do not touch that. Itā€™s for adf, hdf and m3u direct launch.

Proposition

  1. In the core options: I could remove the resolution option and replace it with three options: Video system (PAL, NTSC), High resolution (true, false), Crop screen (true, false). They will determine what default resolution/video options to use .
  2. I could add tag parsing for (PAL), (NTSC), (HIGHRES), (CROP) in the game name, it will be optionnal (like Iā€™ve done for AGA games for instance). They should be added to the game name to specify what configuration must be used for each game.
  3. If no tag is found in the name of the game the default options (from 1) will be used. If tag are founds I will autoconfigure the core for the game.

Example: if you name a game ā€˜my_game(AGA)(PAL)(HIGHRES).adfā€™ the emulator will launch with the core with an A1200 configured with 720x568 resolution.

I think it would be very convenient to use with frontends and from RetroArch load content function.

NB: .uae file for configuration will be always usable so you can specify what you want, I do not touch that configuration. It will only be used for ā€˜.adf, .hdf, .m3uā€™ launched directly with no specific configuration.

What do you think of this ?

So far, so good, testing .ADF, .hdf and .m3u goles. Thanks for these enhancements.

.IPF Are not loaded. I tried putting The DLL library that works with WinUAE in RA System directory to no avail, if this info can be helpful

Actually, this core is currently not built with IPF support.

To use IPF support a third party library is needed and you have to be conform with a third party licence ā€œSPS Freeware License Agreementā€ (see http://www.softpres.org/download).

Donā€™t know if this is compatible with RetroArch licence and distribution.

And if it is, the buildbot of libretro should be updated to build it for release.

See https://github.com/libretro/libretro-uae/issues/43

Thanks Dams :slight_smile:

Concerning the Options: Your proposal is really good. It is simple and everyone understood what is meant. Only one remark. To cover all resolutions you have to add the option ā€œInterlacing: On/Offā€. This is a good source to get an overview about all PAL/NTSC Monitors:

http://wiki.amigaos.net/wiki/AmigaOS_Manual:_Workbench_Monitors

http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node0316.html

So we would have:

  • Video System: PAL/NTSC (default: PAL)
  • High Resolution: Yes/No (default: No)
  • Active Interlacing: Yes/No (default: No)
  • Overscan Visible: Yes/No (default: No)

I would not implement the the name parsing. In general the users can create an uae file with certain config data. Another possibility would be to create a game config file via retroarch itself. So the name parsing is not necessary. However the third option is good idea for the uae file. If the config is not described in the uae file, use the core options. Otherwise uae files are overruling all other settings. So the users are still able to define own special resolutions in the uae config, if necessary. (e.g. North & South has a weird resolution)

I read the commet about the gfx_center option. However it is not working every time (will post screens in which the center function does not work), which is why an alignment option is a better approach.

Then we would need an option for Machine Type, Mouse Control, like in Dosbox. https://docs.libretro.com/library/dosbox/

  • Machine Type: A500/A600/A1200 (which emulates the standard hardware configuration of those models)
  • Gamepad Emulated Mouse: Enable/Disable (enables the Emulated Mouse in the Controls Options)

In the Controls Options we need: Device Type: Retropad/Keyboard+Mouse

As Input Mapping Options for the Retropad:

  • Emulated Mouse Right Click
  • Emulated Mouse Left Click
  • Emulated Mouse X Axis
  • Emulated Mouse Y Axis
  • Amiga Keyboard Keys
  • (Maybe Rapid Fire - for pressing Fire Button several times by holding the button)

About the M3U: Can the m3u also be used for uae files?

About IPF Support: As far as I understood the license, it is compatible with retroarch. The target of SPS are freeware software. Retroarch is freeware and users are responsible for their backups (this is why winuae, fs-uae, e-uae etc. are already supporting the format).

But maybe we can raise the question about Android or other ports. I would be cool to use IPFs on several platforms, not only on Windows, Linux and Mac. The format is pretty well documented, so it should be possible by SPS to provide libraries for other OSes as well.

Many of your purposals are:

  • Already done (look at core options),
  • Not possible without vastly modifying p-uae,
  • related to another issue you previously opened and not the current question (controls forever).

I think you want to help but I definitely not like the way you present all thisā€¦

Anyway, there is some good ideasā€¦

What about creating .m3us on the fly? I mean this: multifloppy games have often filenames like this:

Gamename(Disk 1 of 3).adf Gamename(Disk 2 of 3).adf ā€¦

The core, via regex or similar means, could recognize that the disk you load in retroarch is the first of a multipart game and add automatically the remaining ones to the list, as long as they were in the same dir. No need for the user to provide the m3u.

I sumed only everything up ;-). The question is what must be done to make p-uae a core which fit to other retroarch cores, with similar usability. :wink:

Please help, i canā€™t find any info how to create WHDLoad.hdf and i canā€™t run any hdf files.

Thanks in advance.

Look here: http://lindqvist.synology.me/wordpress/?page_id=182

Hi @ghizzu,

Sorry for the delay.

Yes it could be done, but, for my part, I donā€™t like tricks like that to be hardcoded in an emu, when it goes wrong you can do nothing. Anyway, itā€™s just my opinion.

In fact, I use a python script with the same tricks to generate all the m3u files needed. Then, if I need to change anything, I just have to modify the generated m3u.

Here it is:

import os
import re
import shutil
import sys

games			= dict()
CWD 			= os.getcwd()
NAME_CLEANERS	= [re.compile(r"\([^\)]+\)"), re.compile(r"\[[^\]]+\]")]
EXTENSIONS 		= ['.adf', '.dsk', '.st', '.msa']

def clean(old):
	new = old
	for exp in NAME_CLEANERS:
		new = exp.sub('', new).strip(' ')
	return new
	

for filename in os.listdir(CWD):
	basename, ext = os.path.splitext(filename)
	if ext in EXTENSIONS:
		cleanName = clean(basename)
		
		if cleanName not in games:
			games[cleanName] = []
		
		games[cleanName].append(filename)

for game in games.keys():
	print(game)
	with open(os.path.join(CWD, game + ".m3u"), "wb") as m3uFile:
			for filename in sorted(games[game]):
					m3uFile.write("{}\n".format(filename).encode())

You just have to put it in your roms directory and execute it.

Edit : Updated the script to be python 2.7 and 3 compatible :wink:

Well, it could be optional, of course. But I see your point.

Very nice script!

Iā€™m getting this error when I run it in my roms directory though:

File ā€œ./generatem3u.pyā€, line 32 print game ^ SyntaxError: Missing parentheses in call to ā€˜printā€™

The script was not compatible with python 3.

Here is a new version :

import os
import re
import shutil
import sys

games			= dict()
CWD 			= os.getcwd()
NAME_CLEANERS	= [re.compile(r"\([^\)]+\)"), re.compile(r"\[[^\]]+\]")]
EXTENSIONS 		= ['.adf', '.dsk', '.st', '.msa']

def clean(old):
	new = old
	for exp in NAME_CLEANERS:
		new = exp.sub('', new).strip(' ')
	return new
	

for filename in os.listdir(CWD):
	basename, ext = os.path.splitext(filename)
	if ext in EXTENSIONS:
		cleanName = clean(basename)
		
		if cleanName not in games:
			games[cleanName] = []
		
		games[cleanName].append(filename)

for game in games.keys():
	print(game)
	with open(os.path.join(CWD, game + ".m3u"), "wb") as m3uFile:
			for filename in sorted(games[game]):
					m3uFile.write("{}\n".format(filename).encode())

When using windows, how do I set the path for hdz, hdf or adf files on the .uae file?

Maybe you donā€™t need a .uae file anymore, you can take a look at:

My uaes are ready, I just want to use the same files, I donā€™t know how to setup the path on windows, d:\folder\file.hdz wonā€™t workā€¦

If it could help, here is an example in a post above.

The WHDLoad hdf image must be before the game hdf/hdz image.

1 Like

My modifications have been merged into master repository.

The new version of the core is now available for the different platforms (windows, android, linux, osx) in the nightly repo and core updater from within retroarch.

Removed the link to my build.

Iā€™m a bit confused by this topic, is it possible to load a game by just going to load content and use puae to open it?

Yes, with the latest version of the core and the correct ROMs in your system folder.