Open udance4ever opened 3 months ago
@nadenislamarre something to consider...
basically, when you have 2 times the same game, in two different folders ?
to clarify: it happens when you have the same game (eg. Zaxxon) distributed on two different types of media (eg. disk and cassette) (which in turn, you are correct - must reside in two different folders to not clobber)
Perhaps an idea would be for batocera.conf
to support lines like this:
coco["zaxxon.zip"].altromtype=flop1
coco["cas/zaxxon.zip"].altromtype=cass
it’s not pretty but do think it’s the easiest to implement. If anyone else has ideas, put them out there…
hey i was poking through our wiki and found syntax introduced in v34:
nes.folder["/userdata/roms/nes/Japan/"].shaderset=Mega-Bezel-Community-JP-Night
so I added these two lines in batocera.conf
and rebooted:
coco.folder["/userdata/roms/coco/cas/"].softList=none
coco.folder["/userdata/roms/coco/cas/"].altromtype=cass
Tried to launch cas/zaxxon.zip
but for some reason, it didn’t override:
coco[”zaxxon.zip”].softList=coco_flop
It was worth a try. In the meantime, I’ve added a “1” (eg. cas/zaxxon1.zip) to avoid clobbering as coco_cass.xml is not merged into the MAME distribution yet.
I drafted a pull request to init a new coco cassette software list in the general MAME distribution (mamedev/mame#12505) incorporating the workaround I implemented so cassettes were named zaxzon1.zip
(to prevent clobbering disks named zaxxon.zip
in Batocera) & got this feedback:
The appending of "1" to all software names will not be accepted. The issue should be addressed in Batocera rather than adding meaningless numbers to names.
So the ball remains in our court to ensure an identically named software item available in multiple media formats (eg cassette & disk) can peacefully co-exist & have independent options in batocera.conf
here is how MAME reportedly creates unique hashes (an implementation idea to enhance batocera.conf
to use :
perhaps):
MAME accepts a root XML as input of a SW item, so:
./mame coco3 coco_flop:zonx Will load the floppy version of Zonx, while
./mame coco3 coco_cass:zonx Will (hopefully) load the cassette version of it.
Wouldn't the simplest way to handle this to just refer to software list items as softlist_name-item_name
?
In the example above, the games would just become coco_flop-zonx
and coco_cass-zonx
.
Wouldn't the simplest way to handle this to just refer to software list items as
softlist_name-item_name
?
given softlist_name-item_name.zip
is in itself a valid name of a piece of software, a different delimiter would need to be chosen.
I honestly think the simplest way out is to use subdirectory names (since this is exactly how it shows up in the EDIT METADATA popup for any game in ES):
this technically uses the slash (/
) as a natural delimiter in batocera.conf
:
coco["zonx.zip"].altromtype=flop1
coco["cas/zonx.zip"].altromtype=cass
The enhancement implemented in this way would have the added benefit of making it possible for multiple MAME romsets to co-exist:
mame["cryptklr.zip"].core=mame
mame["cryptklr.zip"].emulator=mame
mame["mame2010/cryptklr.zip"].core=mame0139
mame["mame2010/cryptklr.zip"].emulator=libretro
ok i found the class method that hardcodes the basename of the ROM in settings: https://github.com/batocera-linux/batocera.linux/blob/6b94014d434280d12b2a18bec2f210b5d1fc0d42/package/batocera/core/batocera-configgen/configgen/configgen/Emulator.py#L77-L86
this should work for line 79:
rom = os.path.relpath(rom, batoceraFiles.ROMS + "/" + self.name)
and the parallel method in Batocera ES (es-app/src/FileData.cpp):
const std::string FileData::getConfigurationName()
{
std::string gameConf = Utils::FileSystem::getFileName(getPath());
gameConf = Utils::String::replace(gameConf, "=", "");
gameConf = Utils::String::replace(gameConf, "#", "");
gameConf = getSourceFileData()->getSystem()->getName() + std::string("[\"") + gameConf + std::string("\"]");
return gameConf;
}
so line 113 is replaced with (taken from es-app/src/guis/GuiMetaDataEd.cpp)
std::string gameConf = Utils::FileSystem::createRelativePath(getPath(), getSourceFileData()->getSystem()->getRootFolder()->getPath(), true);
if (Utils::String::startsWith(gameConf, "./"))
gameConf = gameConf.substr(2);
else
gameConf = Utils::FileSystem::getFileName(getPath());
Batocera build version
39oup 2024/03/04 10:11
Your architecture
x86_64
Your Graphic Processor Unit(s) (GPU)
Integrated Intel Iris Graphics
Issue description
While defining a new MAME software list coco_cass.xml to complement new functionality in #11706,
batocera.conf
only hashes on software name:So it is not possible to go into Advanced Game Options for both the cassette and cartridge formats and define altRomType to be both
cass1
andflop1
independently inbatocera.conf
(grep zaxxon /usr/bin/mame/hash/adam*.xml
):The workaround for new software titles to use a unique name:
Long-term, I feel it would be good to upgrade
batocera.conf
so it hashes on both software name and media type to support existing MAME software lists (eg.adam
):or something along these lines.
Detailed reproduction steps
touch /userdata/roms/coco/zaxxon.zip
(blank rom is okay to reproduce)touch /userdata/roms/coco/cas/zaxxon.zip
tail /userdata/system/batocera.conf
Details of any attempts to fix this yourself
Use unique software names for new software:
No known workaround exists for current software titles (eg.
adam
) where this is valid in MAME:Details of any modifications you have made to Batocera.
Logs and data
I can attach on request but I do think this issue can be reproduced very easily.