out of whatsnew: I also have modified best match for softlists to return 10 results, like in MAME, given that now only the correct list is parsed (thanks to Micko's change)
out of whatsnew
1. summing up, you can now load roms through softwarelists from: listname/romset, listname/parent + now also romset & parent (like MAME)
2. there is a lot of repeated code, but I still haven't found a satisfactory way to handle the both loading processes in a single function. I'll keep looking into it!
out of whatsnew: to avoid too much duplicate code, I implemented this as follow:
for parent, we pass a location tag "list/parentname" to search for the roms (no
changes in this case); for clones, we pass a composed location tag
"list/clonename%list/parentname" (notice the '%' separator) and then it is
open_rom_file to split it, if it finds a %, before searching for the rom.
out of whatsnew, 2: I also added the same support for cassettes and floppies (in
devimage.c), but it is still commented out because I had only a few files for testing.
as soon as I'm sure nothing gets broken, I'll enable it.
out of whatsnew: I also added a couple of helpers which count softlist elements and scan a list up to the n-th element. these are very unoptimized (for large lists) but I found them useful for debugging a few quirks in my first implementation and therefore I'd like to have them in the source.
==========
A brief explanation of this change: MESS allows every system to mount software in image devices (cartslots, floppy drives, tape drives, etc.). This patch enable the usage for snaps of the name of mounted software.
More in detail: each image device have both a unique instance_name (e.g. Cartslot) and a unique brief_instance_name (e.g. cart). This patch adds a snapname template %d_XXXX, with XXXX=any brief instance of a device supported by the system, so that we can use as snapname the filename of the image currently mounted in the XXXX device. e.g.
-snapname %d_cart uses the filename of the mounted cart
-snapname %d_flop4 uses the filename of the disk mounted in the 4th floppy drive
Basically, if we launch
mess gba -cart sma -snapname %g/%d_cart/%i
and we press F12, we get a snap/gba/sma/0000.png
This is better than hardcoding the device names since some systems can have up to 16 carts (and then we would need to specify options up to cart16 + disks, tapes & cdroms etc.!!)
Of course, if a wrong brief name is used (or if no image is currently mounted in that device), then MAME/MESS falls back to the default %g/%i.
If we ever get to the point to use cartslot for megatech or pc10, this code will allow to save snaps using the shortname of any of the 10 carts inserted ;)
- all nodes are now class based
- removed all support for "legacy", i.e. procedural node functions.
- nodes are created using a class factory whose instances
are set up in discrete blocks. There is no separation of
node vs. module any longer.
- Custom modules are now just implemented like "normal" nodes.
- Converted all custom modules.
- Context variables can now be migrated to be private class members.
[Couriersud]