pocomane / MiSTer_Batch_Control

Simple utility to control the MiSTer FPGA from the command line
47 stars 8 forks source link

Support NEOGEO roms #3

Closed mirkorean closed 3 years ago

mirkorean commented 3 years ago

I am using .neo ROMs and i believe they are the only one compatible with this method, as other ROMs are folders with multiples files. Should be the default.

mirkorean commented 3 years ago

i was wrong, it is sadly more complicated than that. apparently the naming needs to be explicit, so you cant just use ~~~.neo

pocomane commented 3 years ago

Yes, I wrongly used the .rom extension. It should be .neo.

Before to fix it, I want to find a way to correctly load NeoGeo roms. The issue, as far as I understand, is that the menu of the NeoGeo core does not sort the files by their name, but by an "Internal" name. I do not know how it find this name, however, for example, if I link ~~~.neo to MetalSlug.neo, I will find two "Metal Slug" in the menu. This, as you pointed out, breaks my loading trick.

A solution could be, for example, to use a sub-directory containing the link (instead a link in the parent directory), so it should always appear at top of the list, and so it should be automatically selectable. However, I want think another bit about it before to implement it: maybe a cleaner solution will pop-up.

mirkorean commented 3 years ago

The naming in the OSD is based on the romsets.xml (https://github.com/MiSTer-devel/NeoGeo_MiSTer/blob/32b696b89e0f9b3b48f7373c36d64b52f4aee543/releases/romsets.xml), i think, which also defines how much ram the rom should use. That makes it difficult.

I liked your idea with a folder though. Tested a bit, and this is the only way i made it work:

pocomane commented 3 years ago
* subfolders to symlink to are not working (i guess you can only load from `/media/fat/games/NeoGeo`)

I made some test too, and it seems to me that I can launch .neo rom from any folder. I will make some more deep tests in the next days

* Drawback is that you can't select any other roms for yourself directly anymore then :'(

This is an issue I found for all the cores. It is due to the fact that the menu tries to select the last rom but the mbc deleted them to keep the folder tree clean.

However I think this could be resolved with the same trick of the .neo roms. My current idea is a fixed set of links (one for each known extension) in a "/media/fat/Games/ MBC/" folder. So the load sequence should become:

Next time you open the menu manually, since nothing in " MBC/" was removed, you should be able to see the folder content, and to navigate the tree to select a new rom manually.

To be clear, I think that should be the upstream MiSTer_Main distribution to correctly handle the "Missing last rom" issue. But I do not know if the main MiSTer developer will be happy to work on it (or to receive a patch for it), so the method I described could be a good workaround for mbc.

mirkorean commented 3 years ago

Yeah i read the discussion around loading roms from the cmd line, kinda dissapointing. Let me tell you that your work is appreciated, i am using your tool (just the raw_seq for neogeo right now, the rest i did myself with symlinking to autoboot roms, see: https://github.com/pocomane/MiSTer_Batch_Control/issues/4) for a showcase where i cycle through random roms on my crt in my gaming room and also played around with a twitch bot here: https://www.twitch.tv/videos/953982153.

I just like the old intro / demo screens :)

mirkorean commented 3 years ago

itshappening.gif https://github.com/MiSTer-devel/Main_MiSTer/commit/054756a4937864b76f8e4d6cb5f014b8f554505b

pocomane commented 3 years ago

Now the NeoGeo roms should be loadable by mbc. I used a simpler method, since the deleted-file issue was handled upstream: a " !!!MBC/~~~.ext" link is created in the default rom directory of the system, and it is deleted when the loading is complete.

I checked, and you was right: it is not possible to load NeoGeo rom outside the default directory. I do not understand exactly what is happening, since a link outside such directory works, but it must point to a file inside the directory. In any case, I think this can be fixed upstream only.

mirkorean commented 3 years ago

Works well for me. Thank you!