RBSC / Carnivore2

Carnivore2 MultiFunctional Cartridge for MSX
136 stars 35 forks source link

C2RAMLDR utility to allow manual mapper selection via the command line #84

Open MBilderbeek opened 8 months ago

MBilderbeek commented 8 months ago

It seems currently not possible to non-interactively use C2RAMLDR without auto-detection. It should be possible to specify all answers to the interactive questions via the command line.

Unless I missed something of course, then please directly close this issue :)

Triggered by this discussion: https://www.msx.org/forum/msx-talk/software/multimente-mm-and-carnivore-2?page=1

Wierzbowsky commented 8 months ago

We are working on the Norton Commander-like file manager to load ROMs into Carnivore2 with auto mapper identification. Let's see how it goes...

MBilderbeek commented 8 months ago

That's nice, but it's more powerful to split it up in parts. Like MultiMente uses 3rdparty programs to handle certain files. And one of such programs could be C2RAMLDR. For such usage, you need the tool to be able to run fully headless (all options can be specified on the command line, no interaction needed). That's what this issue was about.

Wierzbowsky commented 8 months ago

@MBilderbeek Did you try to run the utility with the /h command line option?

Usage:
c2ramldr [filename.rom] [/h] [/v] [/a] [/p] [/d] [/r]

Command line options: /h - this help screen /v - verbose mode (show detailed information) /p - switch RAM protection off after copying the ROM /d - don't create a directory entry for the uploaded ROM /a - autodetect and write ROM image (no user interaction) /r - restart the computer after uploading the ROM

We have the /a option supported by this utility. This option automatically detects the mapper and writes a ROM into Carnivore's shadow RAM and also creates a "RAM:" entry for it. This, of course, works if the mapper can be detected by the utility. Otherwise the "Unknown mapper type" entry is created and it can run K4 and K5 mapper games.

If the ROM's mapper is not detected automatically, just create an RCP file with the same name as the ROM and put it into the same folder. The utility will fetch the RCP file automatically and create an entry without user interaction.

MBilderbeek commented 7 months ago

I am aware of the command line options and the RCP files. I guess the request boils down to: it would be nice to be able to override the auto detection with a command line option to tell it to use one of the 10 most common mappers that are avaiable. RCP files are things that just detail how the mapper works (in terms of how C2 allows you to program these), as far as I understand. It would be more convenient to be able to have a 'macro/alias' to specify the most common mappers and tell C2RAMLDR to use the configuration for such a mapper. Then, when the autodetection fails, there is an easy workaround to run the game anyway, without having to search for or create an RCP file.

With the /d option, I assume you can directly run the ROM, without having to use the menu, am I right? (That's also one of the points of this issue.)

Wierzbowsky commented 7 months ago

The /d option was a workaround for not creating a new entry when you have 4 "RAM:" entries for all 4 mappers in the Boot Menu. Then you just load a game into RAM without a new entry, reboot and select one of 4 entries to run a game.

MBilderbeek commented 7 months ago

Alright, so I think I want to say that I'd like to use C2RAMLDR to just: 1) load the ROM file in the shadow RAM 2) configure the mapper (autodetected or overridden by a manual selection of a common configuration/mappertype) 3) run the ROM file as soon as possible. So, yeah, as an alternative to SofaRom, but working about the same way, as I think this is the easiest for users to understand and use.