BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
660 stars 88 forks source link

Query: config.uae autofill of "Name:" field not working for CD32/CDTV cdrom images? #1325

Closed giantclambake closed 5 months ago

giantclambake commented 5 months ago

example image media -> https://archive.org/details/vital-light-cd32

Currently one can begin at the Quickstart panel, load a floppy image/whdload achive, and start the emulation. One can then use the F12 key to access the GUI, to fine tune the emulation to suit a specific title, and once this process is completed, one can choose to Save that setup by using the Configurations panel, and as we know the config.uae "Name:" field is automatically filled with the name of the floppy image/whdload archive.

However, this doesn't seem to be the case for CD32/CDTV cdrom images.... ie; launch amiberry -> Quickstart -> Amiga model: CD32 -> select above .iso file for CD drive -> Start ...

...follow on with F12 -> Configurations panel --> Name: and Description: fields empty (should be Vital Light (1994)(Millennium)[!] and description is current default CD32 config or such.

Note: I actually stumbled across this, checking the invocation of ./amiberry cdroms/"Vital Light (1994)(Millennium)[!].iso"

In that case, emulation boots into intro -> F12 -> Configurations panel shows;

ex

As can be seen, the Name: field is filled correctly, however the Amiga model chosen for the emulation (A1200CD) is incorrect, and likely responsible for the fact when launched like this, the title is unplayable (crashes to CLI after intro, works fine when machine type is CD32 with CD32 extensions).

It's an interesting case, because a machine type of A1200CD would be correct for ./amiberry cdroms/AmigaOS3.2CD.iso as that's an OS install media, not a CD32 title ;)

At any rate, when I saw the above, I figured ./amiberry cdroms/"Vital Light (1994)(Millennium)[!].iso" would work correctly, if I just went via Quickstart, set machine type correctly there, and save the config to Vital Light (1994)(Millennium)[!].uae ...and found all of the above =)

I'm not sure if amiberry can divine the different Amiga models for which any CD image was originally made for, but it probably doesn't matter if (easy ;) creation of associated config.uae files existed for these images as well.

TIA

midwan commented 5 months ago

The logic there seems correct to me. It's supposed to use a CD32 config if it detects a cd image as such, which it does by the filename (since we don't have a similar entry for CD images like we do with the WHDLoad ones, that's a reasonable fallback). Your image did not specify CD32 in the filename, so it used an A1200 config with CD-ROM, which is the next most likely scenario.

giantclambake commented 5 months ago

Thanks for the explanation... lets tease that out....

./amiberry --model CD32 cdroms/"Vital Light (1994)(Millennium)[!].iso"

Doesn't work, still selects A1200CD as Amiga model ... but that might be a bad invocation, so....

./amiberry --cdimage cdroms/"Vital Light (1994)(Millennium)[!].iso" -G

That doesn't even boot to CD, but by all rights it should've worked, given the --help output of amiberry states it's for CD32 usage (and I was expecting it to override ato-detection logic and enfore model: = CD32);

--cdimage <file> Load the CD image provided when starting emulation (for CD32).

ex

Looking at the emulator config at that moment, it appears to have started in Quickstart mode, A500 config..

How about.... ./amiberry --model CD32 --cdimage cdroms/"Vital Light (1994)(Millennium)[!].iso" -G

ex2

..lol...it didn't even try to load the CD image file (and if it had've, it would've borked at ROM version ;)

Alright... how do I manage to create an associated config.uae file, without having to type Vital Light (1994)(Millennium)[!] into the Name: field? I can't do it directly via GUI->Quickstart route, because I already know it won't auto-complete the Name: field (this ticket ;)..... hmmm.... I know.... go back to ...

./amiberry cdroms/"Vital Light (1994)(Millennium)[!].iso"

...it's going to get it wrong, so once emulation has started... F12 -> Quickstart -> change Amiga model: to CD32 (the Config: option changes to CD32, the Name of the CD image suddenly appears in the CD textbox, chipset extra gets set to CD32 and the ROM/extension are set correctly) --> Configurations panel... Name: is filled correctly, but Description field has not changed (still 'Autoboot Configuration [A1200HD]') to reflect model change to CD32, but as this text doesn't matter, and the Name: field is correct, just hit Save -> Quit to close the GUI ....

Now I can use ./amiberry cdroms/"Vital Light (1994)(Millennium)[!].iso" and it works as expected in CD32 mode.

I've more than several 'multimedia' type CD discs here, aimed at multiple (CD32/CDTV/A1200CD) models, they don't have any distinguishing names wrt Amiga model either. As stated, this is only about the GUI not auto-completing the Name: field in the Configurations panel.

midwan commented 5 months ago

I've updated the help text with c0e4777debf1a9792ea69997abdc123bc6d724c2 as it was incorrect. The --cdimage option does not change configuration, it only inserts the CD image into the drive. If you want to change configuration also, the --autoload option is your best bet instead.

I'll check the rest of the behavior that you mentioned above.

midwan commented 5 months ago

Using the following line, seems to work as expected for me (though I do have a slightly different version for the cd image you mentioned):

./amiberry-preview --model CD32 --cdimage cdroms/Amiga\ CD32\ -\ Vital\ Light/Vital\ Light.cue -G

It started a CD32 config, with that CD image inserted, and booted the game normally.

midwan commented 5 months ago

Also, using the --autoload option (with ./amiberry-preview --autoload cdroms/Amiga\ CD32\ -\ Vital\ Light/Vital\ Light.cue - G), will populate the Config entries as expected as well: image

midwan commented 5 months ago

Testing a title with no model mentioned in the filename, seems to work also: ./amiberry-preview --model A1200 --cdimage cdroms/Ultimate_Superskidmarks_Amiga_CD.iso -G Loaded up an A1200 + CDROM config, with the cd image inserted, and booted the game.

./amiberry-preview --autoload cdroms/Ultimate_Superskidmarks_Amiga_CD.iso -G also worked as expected, and had the config fields populated.

giantclambake commented 5 months ago

Thanks for testing other permutations here.... I just sat through recreating same...

The title Ultimate_Superskidmarks_Amiga_CD.iso is not a real good test candidate however ~ this title was released as an (enhanced) 'Amiga CD' title as per HOL, that is also CD32 compatible, and thus I fully expect it to work correctly with model=A1200CD (as is so ;) There are several Amiga CD titles for which this is true, most all of which do not contain 'CD32' nor 'CDTV' mention in the .iso filename ~ this is inconsequential, they run fine with --model A1200 (whether stated on cmdline or as deduced from the auto-detection logic).

The title Vital Light (1994)(Millennium)[!].iso however, is CD32 only (there are OCS/ECS floppies), and so model has to be CD32 (doesn't work if model=A1200CD)... so the following invocations don't work;

./amiberry --autoload --cdimage cdroms/"Vital Light (1994)(Millennium)[!].iso" -G //doesn't work ./amiberry --autoload --model CD32 --cdimage cdroms/"Vital Light (1994)(Millennium)[!].iso" -G //doesn't work ./amiberry --autoload --model CD32 cdroms/"Vital Light (1994)(Millennium)[!].iso" -G //doesn't work ./amiberry --autoload cdroms/"Vital Light (1994)(Millennium)[!].iso" -G //boots with A1200CD model type, fails after intro

It seems as though --model CD32 isn't being honored (or is being overridden by auto-detection logic?)?

I should be able to do this with the GUI, but it doesn't work as expected (this ticket, no auto-complete of Name: )...

https://www.youtube.com/watch?v=08oxdgQvRWU

On the desktop environment, one would right-click the 'Vital Light (1994)(Millennium)[!].iso' icon -> Open with amiberry

This would be equivalent to --> amiberry path/to/Vital Light (1994)(Millennium)[!].iso ....as explained above, after emulation starts, you can hit F12 to GUI -> Quickstart -> change model to CD32 -> Configurations -> Save (the created config.uae file will be correct and have the correct associative name)...that's one work around...

The other work-around is this ... right-click on the 'Vital Light (1994)(Millennium)[!].iso' -> Rename file. When renaming the file, you must include the appropriate model name so that auto-detection works. This might be the equivalent of;

mv cdroms/"Vital Light (1994)(Millennium)[!].iso" cdroms/"Vital Light (1994)(Millennium)[!]CD32.iso"

Once that is done, right-click -> Open with amiberry (amiberry path/to/"Vital Light (1994)(Millennium)[!]CD32.iso") works as expected, with correct model selected & Name:/Description: fields in Configurations auto-filled correctly.

midwan commented 5 months ago

You cannot use autoload together with model, as autoload is meant to take care of the model settings as part of the process.

I think in the case of your image, the real issue is that the filename doesn't indicate that it's CD32-only. If it does, then the mechanism will work as expected.

giantclambake commented 5 months ago

Let me quantify this ~ I've got 25gb of turran ftp images to check.... should only take another day or so ;)

giantclambake commented 5 months ago

M'kay, took some time (fixed wireless 'broadband' here only 1.2mbps d/l max ;)

I don't believe that filename is the problem ~ for mine, the problem is model=A1200CD ... aside from the fact that an Amiga 'purist' will quickly point out that Amiga model never existed (you can build one in hardware or amiberry ;)

Before I get to the numbers, some of points above need clarification/redressing;

  1. Correcting myself from above, whilst ./amiberry cdroms/AmigaOS3.2CD.iso might be 'valid', it's actually an imposition of sorts ~ that is, it will boot the CD image into the 'OS installation environment', however at that point you can't install anything, because you have no hard drive directory/file attached to the emulator at that time. This means you will then need to go F12 to the GUI, to attach a hard drive directory/file, and once you do that you'll need to reset the emulation. After Reset, boot priority will try to boot the attached hard drive entry (not a dos disk in DH0: ), and you'll have to F12 again to either modify boot priority, or Reset the emulation again to bring up the early boot menu. In practice, you're better off starting with the GUI to create an A1200 config with hard drive directory/file attached, add the CD/image, and press Start and go straight to early boot menu. It is what it is ;)

  2. Wrt the title Ultimate_Superskidmarks_Amiga_CD.iso, as I point out this is an 'extended Amiga CD', compatible with both Amiga Workbench environments, and the games console environment of the CD32. Consulting the ReadMeNow! file contained therein, doesn't speak to HD installer or such, but it does mention this;

ex

  1. Logically speaking, I read that as we should be direct-booting into the CD32 games console environment, when the underlying Amiga Workbench environment is not present...yes?

ex2

  1. Ergo, Ultimate_Superskidmarks_Amiga_CD.iso should not be auto-detected as model=A1200CD when Workbench isn't present, and in that case be auto-detected as CD32 instead....//is becoming an 'esoteric bug' if model=A1200CD exists

  2. Notes: - when direct-booting Ultimate_Superskidmarks_Amiga_CD.iso with model=A1200CD, the title loads considerably quicker than when direct-booting with model=CD32. The cause of the longer loading times, is only due to the emulation starting with an un-expanded CD32 machine config, so if you F12->RAM-> set Z2 Fast: to 8mb, go to the Hard drives/CD panel and enable the 'turbo CD read speed' option, then Reset the emulation and the load times and performance are the same as the A1200CD model type (I have to create a config.use for this title anyway, to enable H/V centering). This is not an issue as such, just the result of this test.

I'll hedge a bet, there's a few more 'extended Amiga CD' images out there like this ~ started thread on EAB to dig out some more details... https://eab.abime.net/showthread.php?t=117642

*Now onto the quantitative survey (examination limited to 'games/multimedia' titles);

Users will get their CD image files from 'somewhere' ~ I've exampled the Internet Archive website here, and that's where the filename "Vital Light (1994)(Millennium)[!].iso" comes from. A typical search of that site for Amiga CD32 .iso images would be https://archive.org/search?query=Amiga+CD32+.iso --- that yields 97 results, and of that <2% of the .iso image filenames contain 'CD32' ....

...another resource users might avail themselves of is TOSEC, but here I example another known popular repository for such files, being;

https://ftp2.grandis.nu/turran/FTP/TOSEC-ISO/CD32/Commodore%20Amiga%20CD32%20-%20Games%20-%20%5bISO%5d/

This yields 178 files (some duplicates) ~ I downloaded all .zip archives from A through M ...this is around 100 archives. Checking the filenames of the .cue/.iso images, only 3 titles contained 'CD32' in the filename. This as much echos the Internet Archive situation above.

The same situation is true for CDTV .iso titles, however with less title releases (similarly less results in Turran ftp repo) ~ https://archive.org/search?query=Amiga+CDTV+.iso yields 72 results and <5% contain the 'CDTV' hint in the filename. Further, there are CD based Amiga titles, that are CD32/CDTV compatible.

[recent example] Well known Amiga contributor 'jotd' just released this https://eab.abime.net/showthread.php?t=117630 ...and the filename for that .iso is 'jotd_arcade.iso' ...users will even have to rename that, to get amiberry to auto-detect model=CD32... I can't help but think we're going against some 'established convention' of not having Amiga model mentioned in filename.

At this point my surmise is that for more than 95% of cases, we're forcing the onus on the users to rename these files, for the auto-detection logic to work as expected, ONLY because these files will otherwise be auto-detected as 'A1200CD'.

This all said, the invocation ./amiberry <file> isn't actually succinct ~ I discovered ./amiberry path/to/<file> is more correct....(I'm unsure if this is intentional or not ;)... example;

./amiberry cdroms/"Vital Light (1994)(Millennium)[!].iso" //boots A1200CD model, crashes after intro

mkdir cdroms/CD32 mv cdroms/"Vital Light (1994)(Millennium)[!].iso" cdroms/CD32/

./amiberry cdroms/CD32/"Vital Light (1994)(Millennium)[!].iso" //boots CD32 model, works as expected

Works for CDTV as well of course... in one way, it makes sense...ie;

cdroms/ --will boot A1200CD cdroms/CD32/ --will boot CD32 cdroms/CDTV/ --will boot CDTV

...largely because the same situation exists for CDTV images. wherein filename doesn't contain the CDTV 'hint' text.

Note: Somewhere in the 10% to 20% range, wrt the grandis repo, the filenames of the .zip archives themselves contain the CD32/CDTV 'hint', but then of course that's only useful if.zip handling for these image .cue/.bin/.iso content were possible, but that's only going to work some of the time, but getting users to save/unpack these .zip files into the 'proper' directory, and it starts to look organized.

However, esoteric or not, auto-detecting & booting Ultimate_Superskidmarks_Amiga_CD.iso with model=A1200CD is a bug, and should direct-boot with model=CD32 because Workbench not present ...it is what it is =)

I begin to wonder if there's a legitimate case for boot CD images in A1200CD guise ~ certainly in all my years of A1200HD usage (with Cobra & Ferret scsi, external Sony scsi CD drive), I'd always access such CD's from the Workbench, looking for a way to install to harddrive, but I'd never boot into A1200CD guise ... I had a CD32 for that ;)

Believe me, I really searched for a case wherein direct-booting of a CD image in A1200CD mode was a requirement for that media's proper operation, and caveat OS install CD media, I could not find such an example ... perhaps I missed some usage case? I'll be optimistic, and suggest maybe 5% of the time, users will want CD booting with model=A1200CD.

I'll suggest, the other 75% of the time, users will want direct CD booting with model=CD32 (just as the .iso file for Ultimate Superskidmarks should be), with the other 20% wanting direct CD booting with model=CDTV .... if only based on the lower number of CDTV titles available & popularity reflected in download counters.

Following on with this hypothetical, the onus/responsibility on the user to rename a file, might be thus;

75% of the time, users don't have to do anything //amiberry direct-boots CD with model=CD32

20% of the time, users will need to rename file to include CDTV 'hint' //amiberry direct-boots CD with model=CDTV

5% of the time, users shouldn't be here, and instead be using the GUI to 'construct' the Amiga model of their choice, with hard drive to use CD install media as exampled above. //this is why amiberry has a GUI that you can make look pretty B^)

To keep the playfield level, users can rename file to include A1200CD 'hint' //amiberry direct-boots CD model=A1200CD

Users may alternatively store .iso images in the directories noted above, to direct the auto-detection logic without the need to rename file.

Conclusion: Based upon the sample size downloaded & checked, coupled with data wrt filename conventions, number of available Amiga CD media archives for Amiga A1200/CD32/CDTV models, (and where available download count), and actual real life testing, the quantitative view seems to be the following, wrt the ./amiberry <file> invocation when direct-booting Amiga .cue/.iso CD images ;

./amiberry cdroms/horse-with-no-name.iso //direct-boot to CD32 emulation ~ 75% of users don't have to do anything

./amiberry cdroms/horse-with-CDTV-name.iso //direct-boot to CDTV emulation ~ 20% of users need edit filename if the CDTV 'hint' word is not present

./amiberry cdroms/horse-with-A1200CD-name.iso //direct-boot to A1200CD emulation ~ 5% of users wanted this ;)

In the case of Amiga CD (games) titles, users should access same via Workbench (as the CD media was designed for).

Obviously this is somewhat OT wrt this ticket, but I'm happy to do the 'leg work' here =)

TIA

midwan commented 5 months ago

Right, the current CD detection logic is this:

If it's detected as a CD32 title, it will use the built-in prefs for that. If not, it will check if it's a CDTV one, and use that config. If it's neither, then it falls back to an A1200CD config.

If we change the above to:

It should solve the issue you're describing, right?

giantclambake commented 5 months ago

Yes, I just tested ~ this solves the issue (enhances user convenience) ; it was primarily a corollary caused by the (lack of ;) naming conventions when it comes to Amiga CD title archives/filenames, and direct-booting such titles with a machine type of model=A1200CD.... which is largely unsupported, going by the user manuals for such Amiga titles.

FTR, I did find 2 titles wherein the user manual/CD media indicate direct-booting to A1200HD+CD was 'legitimate'..;

Wendetta 2175 ~ data disk only (not dual-mode, ie; cdda tracks + data track, like other Amiga CD titles checked)

Kang Fu ~ manual describes A1200CD direct-booting, but requires user intervention in early boot menu -> boot without startup-sequence -> mount CD0: -> and executing CD0:Lowmem from CLI. For this reason, this title failed to run if detected as A1200CD (stalls at grey screen after intro).

The majority of CD32 compatible Amiga CD titles, only entertain accessing disc content from within Workbench, to access additional content, ReadMe files, HD installers, etc etc, or launch the title.

Thanks for the change ;)