bbbradsmith / hatariB

Libretro core for Hatari emulation of Atari ST STE TT Falcon
GNU General Public License v2.0
20 stars 3 forks source link

Using hard disk images #12

Closed vanfanel closed 9 months ago

vanfanel commented 1 year ago

Hi again, @bbbradsmith

I was trying to load a hard disk image today. I can easily load .st floppy images by passing them to RetroArch, like this: retroarch -L ~/.config/retroarch/cores/hatarib.so ~/Downloads/Rodland\ \(1991\)\(Sales\ Curve\)\[cr\ Alien\]\[t\].st

...But passing an Hatari .img generated with atari-hd-image, it seems to be ignored. So, maybe hdd images are still not working with the core?

zognic commented 1 year ago

put your image on ~systems/hatarib folder, boot on a blank.st, open RetroArch options --> core options --> system --> choose your hard disk (and set the right format IDE, ASCI etc..) and reset, you will see your drive C.

bbbradsmith commented 1 year ago

Yes, this is correct. Hard disk images must go in the System/BIOS folder, in a hatarib subdirectory. They are treated as a permanent part of the system, and not like insertable media, so it cannot be passed on the command line like a floppy image, though you could pass it in the form of a config change. You can start the core without any floppies present as well.

zognic commented 1 year ago

part

possible to add this as an command line argument? Like hatari standalone?

bbbradsmith commented 1 year ago

A core can't make changes to the RetroArch command line. It's just not available information to the core interface.

However, you can make a config file with just the hard drive options, and apply it via the command line. Something like: retroarch -L path/hatarib.so --appendconfig path/hdconfig.opt

You can setup the hard drive in your core options and save them, then check the resulting configuration file (should be in a folder like config/hatariB but this should be in the directory settings), and copy the settings you want to append into your new config file.

Example:

hatarib_hardboot = "1" # boot from hard drive
hatarib_hardimg = "hatarib/hdimage.80" # path of image, relative to system/bios folder
hatarib_hardtype = "2" # ACSI type
bbbradsmith commented 1 year ago

Another alternative is to make a "boot" disk for the hard drive. Load Content to open that floppy, make the settings you want, and then save them as a game-specific configuration. That will make it apply these settings whenever that floppy is launched.

zognic commented 1 year ago

Great, it's exactly what we need, we plan to add this core in batocera.linux, the appendconfig is doable with our launcher. Thanks a lot

zognic commented 1 year ago

Another alternative is to make a "boot" disk for the hard drive. Load Content to open that floppy, make the settings you want, and then save them as a game-specific configuration. That will make it apply these settings whenever that floppy is launched.

good idea, thanks

vanfanel commented 1 year ago

@bbbradsmith Let's say I boot with a non-bootable HDD image. Is should be possible to boot to GEM, and them access the contents of the image, right?

The problem is that, if I boot the core without a floppy disk image, using an Atari TOS (like TOS 1.00 US), the GEM desktop never comes up, no matter how long I wait. With EmuTOS, GEM comes up after a long while, but it doesn't show the HDD contents in any unit.

vanfanel commented 1 year ago

I do this: retroarch -L ~/.config/retroarch/cores/hatarib.so --appendconfig amberstar.opt

..where amberstar.opt contains:


hatarib_hardboot = "0" 
hatarib_hardimg = "hatarib/amberstar.img"
hatarib_hardtype = "0"

And of course the img file exists:


file ~/.config/retroarch/system/hatarib/amberstar.img 
/home/manuel/.config/retroarch/system/hatarib/amberstar.img: DOS/MBR boot sector; partition 1 : ID=0x4, active, start-CHS (0x0,0,2), end-CHS (0x13,15,32), startsector 1, 10239 sectors

Any idea on what am I doing wrong here?

vanfanel commented 1 year ago

Also tried manually selecting the image in the core options, with the same result: an eternal white screen if I use the Atari TOS, or GEM (but no access to HDD contents) if I usebuilt-in EmuTOS.

bbbradsmith commented 1 year ago

You need to select the hard drive type of your image, presumably ACSI or SCSI or IDE. The GemDOS type expects a folder, not an image. The ACSI/SCSI/IDE types use an image file.

I think I neglected to add an onscreen notification if the hard disk image fails to load. I'll try to put one in. (For the moment, there should at least be a message in the error logs.)

I'm not well versed in what various TOS versions do if booting from hard disk... EmuTOS at least should show the drive on the desktop if it's connected. I'm not sure if TOS 1.0 is capable of booting from hard disk at all? (It can use a hard disk, though.) If started without a floppy I think TOS 1.0 should eventually show the desktop but it will probably keep retrying on a white screen for maybe 2 minutes first.

bbbradsmith commented 1 year ago

OK I've added some onscreen notifications for if a hard disk image/folder fails to open. Hopefully that'll help.

vanfanel commented 1 year ago

@bbbradsmith I could finally see the contents of the image from inside the core, after setting it as an IDE image. But the UNIT C: where the image is mounted inside the emulated Atari is only shown if I use the "EmuTOS 1024" boot ROM, which causes those on the TTY console:

WARN : Bus Error reading at address $ffff860f, PC=$e00d76 addr_e3=e00d76 op_e3=4a10
WARN : Bus Error reading at address $ffffa200, PC=$e00d76 addr_e3=e00d76 op_e3=4a10
WARN : Bus Error reading at address $400000, PC=$e00d76 addr_e3=e00d76 op_e3=4a10
WARN : Bus Error reading at address $6c4710, PC=$e00d76 addr_e3=e00d76 op_e3=4a10
WARN : Bus Error reading at address $5d1234, PC=$e00d76 addr_e3=e00d76 op_e3=4a10
WARN : Bus Error reading at address $6d3148, PC=$e00d76 addr_e3=e00d76 op_e3=4a10
WARN : Bus Error reading at address $400000, PC=$e00d76 addr_e3=e00d76 op_e3=4a10
WARN : Bus Error reading at address $d003c3, PC=$e00d76 addr_e3=e00d76 op_e3=4a10
WARN : Bus Error reading at address $cc03c3, PC=$e00d76 addr_e3=e00d76 op_e3=4a10

What Atari TOS version should I use to get the image mounted as with the EmuTOS 1024 replacement boot ROM? Or... Is there a way to avoid these errors with the EmuTOS 1024 boot ROM?

bbbradsmith commented 1 year ago

Hatari has always given those warnings with EmuTOS 1024, as far as I know. They don't seem to be consequential. I was actually planning to mute Hatari's warnings after some more testing has been done, though maybe I should make it an advanced core option to enable or disable.

As for the TOS question, I should defer to the Hatari manual because I don't really know more than what it says: https://hatari.tuxfamily.org/doc/manual.html#Hard_disk_support

vanfanel commented 1 year ago

@bbbradsmith that Hatari documentation is awesome, thanks for pointing me to It!

I seem to understand that, unless EmuTOS is used, an hdd driver must be installed into the hd imagen.

Also, It should be posible to pass an Atari PRG directory yo Hatari to run It at boot!

From that documentation:

Usage:

hatari [options] [disk image | directory | Atari program ]

As an argument one can give either a name of:

A floppy disk image,
A directory that should be emulated as a virtual GEMDOS HD, or
An Atari program that should be autostarted. In this case the program's directory will be used as the C: drive from where this program will be started.

Is that supposed to work with the core? Directly booting a PRG I mean.

bbbradsmith commented 1 year ago

Ah, yes, without EmuTOS you will likely need a driver program for the hard disk.

There are several ways to make a floppy execute something at boot.

The simplest is create a folder called AUTO on it. Put the PRG you want to run at boot inside.

I believe ACC files in the root directory are also run at boot, though they are normally for adding "accessories" to the desktop menu (clock, control panel, etc.).

A program could also be placed in the floppy's boot sector, but this would require a purpose-built program to prepare the floppy. A hard disk driver might come with something that does that. Some TOS versions may be able to boot from the hard disk directly which might load its own drivers in this way.

These things don't have to do with the core specifically, they're just the ST's boot process.

vanfanel commented 1 year ago

Made it work by putting the game's executable in AUTO, rebuilding the image with atari-hd-image, selecting "EmuTOS 1024K" and setting the disk as IDE. Not having to install an HDD driver to the image, thanks to EmuTOS, is great!

Only those nasty EmuTOS warnings remain. I believe an option to hide those warnings would be welcome, yes.

I understand passing a PRG directly to the core is impossible, right? Stadalone Hatari seems to support that, as I said previously, and it would be very useful to directly launch games like that.

bbbradsmith commented 1 year ago

Only those nasty EmuTOS warnings remain. I believe an option to hide those warnings would be welcome, yes.

You can already hide the warnings, they're only visible because you have core debug logging enabled in your RetroArch settings. I'm only thinking about giving the option to suppress warnings that came directly from Hatari, rather than the core.

As for the command line --auto it seems to implement this by injecting a fake DESKTOP.INF into the filesystem, which with TOS 1.04 and later supports having an auto-start file.

I don't really see any good way to provide this directly. The core does not receive arbitrary command line options. The core options menu can't open a floppy disk to display candidate files.

I would suggest a "run the first PRG found in the root directory" alternative option... but it also seems impractical to provide, since I can't really search the contents of the floppy's filesystem. TOS has to do that while it's emulated. Like, in theory the information's there in the floppy image... but in practice there's so many ways it could be stored, and I don't really want to write an image analyzer and re-implement FAT parsing, figure out how to fetch sectors out of STX and IPF etc. etc.

Maybe if you could enter the path directly in a configuration file, it could pass the name that way, but it would be a confusingly unusable menu option. Probably acceptable if hidden in the advanced section.

vanfanel commented 1 year ago

@bbbradsmith Seeing how complicated it would be to pass the --auto functionality, or run the first PRG on root dir, I wouldn't go that route either... FAT parsing reimplementation seems totally out if scope.

Now, would it be possible to tell the core to use an .img out of ~/.config/retroarch/system/hatarib/? I know these are an static part of the running system, so the path is correct, but still, being able to launch IMGs from arbitrary locations would be good for easy HDD game collection navigation.

bbbradsmith commented 1 year ago

Looks like RetroArch will prevent a config file containing an option that's not present in the menu, so that workaround idea turned out to be impossible. I don't have any suggestions for a reasonable "--auto" implementation then. You can make the floppy auto-boot by one of the ST's various means, but you'd need to be able to modify the floppy.

I also realized that you were referring to Hatari warning logs going to stderr (something I don't actually see on windows), so I went and disabled that.

As for hard disk images outside of of system, I don't feel there's many alternatives that are reasonable. It was hard enough to get them working under the constraints I've accepted. Can you just override the retroarch system directory location with a config, perhaps?

zognic commented 1 year ago

@bbbradsmith it's looks like not possible to attach a drive outside the system I changed the path and it didn't mount


hatarib_hardimg = "/userdata/roms/atarist/gemdos-hd"
hatarib_hardtype = "0"
bbbradsmith commented 1 year ago

That is correct. The path must be in the RetroArch system folder.

What I was suggesting is to change the system folder in your config, because you can't use an absolute path to the hard disk image. (Depending on the version of RetroArch you might be able to use a path relative to system with .. etc, but the RetroArch virtual file system should prevent escapting it this way, according to its stated design.)

vanfanel commented 1 year ago

@bbbradsmith I tried with appendconfig, and it doesn't seem to work either: retroarch -L .config/retroarch/cores/hatarib.so --appendconfig emulation/Atari\ ST/Amberstar.opt

..where Amberstar.opt contains:


hatarib_hardboot = "1" 
hatarib_hardimg = "hatarib/amberstar.img"
hatarib_hardtype = "4"

And I can see RetroArch is attaching the opt file contents:

[INFO] [Config]: Loading config: "/root/.config/retroarch/retroarch.cfg".
[INFO] [Config]: Appending config: "emulation/Atari ST/Amberstar.opt".

But after that, the emulated system can't see the disc. The same disc image works perfectly when selected from the core options, of course.

bbbradsmith commented 1 year ago

If you select it from the core options, how does the resulting .opt differ from that one you provided?

vanfanel commented 1 year ago

@bbbradsmith HD image selected vs NO HD at all:

root@pi:~# diff hatariB.opt hatariB2.opt 
18c18
< hatarib_hardimg = "<none>"
---
> hatarib_hardimg = "hatarib/amberstar.img"

So, in theory, if I do: retroarch -L ~/.config/retroarch/cores/hatarib.so --appendconfig hatariB2.opt ...the disc image should be loaded. But it's not.

bbbradsmith commented 1 year ago

You're comparing against a config that has no hard disk image selected.

I meant that you said you could get it working by using the core options menu. Select the image there. Save your config. Compare that configuration against the one that's not working for you.

vanfanel commented 1 year ago

@bbbradsmith I am comparing against a config with no hard disk image selected, yes. That's so I can see the diff between a config with hard disk image selected and a config without a hard disk image selected.

This is with HDD image selected, game boots as expected:

hatarib_aspect = "0"
hatarib_autofire = "6"
hatarib_blitter_st = "0"
hatarib_borders = "0"
hatarib_cartridge = "<none>"
hatarib_cpu = "-1"
hatarib_cpu_clock = "-1"
hatarib_crashtime = "10"
hatarib_cycle_exact = "1"
hatarib_driveb = "1"
hatarib_drivesingle = "0"
hatarib_emutos_framerate = "-1"
hatarib_emutos_region = "-1"
hatarib_fast_floppy = "1"
hatarib_fpu = "-1"
hatarib_hard_readonly = "0"
hatarib_hardboot = "1"
hatarib_hardimg = "hatarib/amberstar"
hatarib_hardtype = "0"
hatarib_host_keyboard = "1"
hatarib_host_mouse = "1"
hatarib_hpf = "1"
hatarib_joy1_port = "1"
hatarib_joy2_port = "0"
hatarib_joy3_port = "2"
hatarib_joy4_port = "3"
hatarib_log_hatari = "1"
hatarib_lowres2x = "0"
hatarib_lpf = "3"
hatarib_machine = "2"
hatarib_memory = "4096"
hatarib_mmu = "0"
hatarib_monitor = "1"
hatarib_mouse_deadzone = "5"
hatarib_mouse_port = "1"
hatarib_mouse_speed = "6"
hatarib_osk_layout = "0"
hatarib_osk_press_len = "5"
hatarib_pad1_a = "2"
hatarib_pad1_b = "1"
hatarib_pad1_dpad = "1"
hatarib_pad1_l1 = "5"
hatarib_pad1_l2 = "18"
hatarib_pad1_l3 = "23"
hatarib_pad1_lstick = "1"
hatarib_pad1_oskey_cancel = "8"
hatarib_pad1_oskey_confirm = "7"
hatarib_pad1_oskey_move = "1"
hatarib_pad1_oskey_pos = "3"
hatarib_pad1_r1 = "6"
hatarib_pad1_r2 = "19"
hatarib_pad1_r3 = "24"
hatarib_pad1_rstick = "2"
hatarib_pad1_select = "7"
hatarib_pad1_start = "8"
hatarib_pad1_x = "4"
hatarib_pad1_y = "3"
hatarib_pad2_a = "2"
hatarib_pad2_b = "1"
hatarib_pad2_dpad = "1"
hatarib_pad2_l1 = "5"
hatarib_pad2_l2 = "18"
hatarib_pad2_l3 = "23"
hatarib_pad2_lstick = "1"
hatarib_pad2_oskey_cancel = "8"
hatarib_pad2_oskey_confirm = "7"
hatarib_pad2_oskey_move = "1"
hatarib_pad2_oskey_pos = "3"
hatarib_pad2_r1 = "6"
hatarib_pad2_r2 = "19"
hatarib_pad2_r3 = "24"
hatarib_pad2_rstick = "2"
hatarib_pad2_select = "7"
hatarib_pad2_start = "8"
hatarib_pad2_x = "4"
hatarib_pad2_y = "3"
hatarib_pad3_a = "2"
hatarib_pad3_b = "1"
hatarib_pad3_dpad = "1"
hatarib_pad3_l1 = "5"
hatarib_pad3_l2 = "18"
hatarib_pad3_l3 = "23"
hatarib_pad3_lstick = "1"
hatarib_pad3_oskey_cancel = "8"
hatarib_pad3_oskey_confirm = "7"
hatarib_pad3_oskey_move = "1"
hatarib_pad3_oskey_pos = "3"
hatarib_pad3_r1 = "6"
hatarib_pad3_r2 = "19"
hatarib_pad3_r3 = "24"
hatarib_pad3_rstick = "2"
hatarib_pad3_select = "7"
hatarib_pad3_start = "8"
hatarib_pad3_x = "4"
hatarib_pad3_y = "3"
hatarib_pad4_a = "2"
hatarib_pad4_b = "1"
hatarib_pad4_dpad = "1"
hatarib_pad4_l1 = "5"
hatarib_pad4_l2 = "18"
hatarib_pad4_l3 = "23"
hatarib_pad4_lstick = "1"
hatarib_pad4_oskey_cancel = "8"
hatarib_pad4_oskey_confirm = "7"
hatarib_pad4_oskey_move = "1"
hatarib_pad4_oskey_pos = "3"
hatarib_pad4_r1 = "6"
hatarib_pad4_r2 = "19"
hatarib_pad4_r3 = "24"
hatarib_pad4_rstick = "2"
hatarib_pad4_select = "7"
hatarib_pad4_start = "8"
hatarib_pad4_x = "4"
hatarib_pad4_y = "3"
hatarib_patchtos = "1"
hatarib_pause_osk = "2"
hatarib_prefetch = "1"
hatarib_readonly_floppy = "0"
hatarib_samplerate = "48000"
hatarib_save_floppy = "1"
hatarib_show_welcome = "0"
hatarib_soft_reset = "0"
hatarib_statusbar = "0"
hatarib_stick_threshold = "30"
hatarib_tos = "<etos1024k>"
hatarib_wakestate = "3"
hatarib_ymmix = "2"

This is without hdd image selected, game does not work, as expected because hdd image is not selected:

hatarib_aspect = "0"
hatarib_autofire = "6"
hatarib_blitter_st = "0"
hatarib_borders = "0"
hatarib_cartridge = "<none>"
hatarib_cpu = "-1"
hatarib_cpu_clock = "-1"
hatarib_crashtime = "10"
hatarib_cycle_exact = "1"
hatarib_driveb = "1"
hatarib_drivesingle = "0"
hatarib_emutos_framerate = "-1"
hatarib_emutos_region = "-1"
hatarib_fast_floppy = "1"
hatarib_fpu = "-1"
hatarib_hard_readonly = "0"
hatarib_hardboot = "1"
hatarib_hardimg = "<none>"
hatarib_hardtype = "0"
hatarib_host_keyboard = "1"
hatarib_host_mouse = "1"
hatarib_hpf = "1"
hatarib_joy1_port = "1"
hatarib_joy2_port = "0"
hatarib_joy3_port = "2"
hatarib_joy4_port = "3"
hatarib_log_hatari = "1"
hatarib_lowres2x = "0"
hatarib_lpf = "3"
hatarib_machine = "2"
hatarib_memory = "4096"
hatarib_mmu = "0"
hatarib_monitor = "1"
hatarib_mouse_deadzone = "5"
hatarib_mouse_port = "1"
hatarib_mouse_speed = "6"
hatarib_osk_layout = "0"
hatarib_osk_press_len = "5"
hatarib_pad1_a = "2"
hatarib_pad1_b = "1"
hatarib_pad1_dpad = "1"
hatarib_pad1_l1 = "5"
hatarib_pad1_l2 = "18"
hatarib_pad1_l3 = "23"
hatarib_pad1_lstick = "1"
hatarib_pad1_oskey_cancel = "8"
hatarib_pad1_oskey_confirm = "7"
hatarib_pad1_oskey_move = "1"
hatarib_pad1_oskey_pos = "3"
hatarib_pad1_r1 = "6"
hatarib_pad1_r2 = "19"
hatarib_pad1_r3 = "24"
hatarib_pad1_rstick = "2"
hatarib_pad1_select = "7"
hatarib_pad1_start = "8"
hatarib_pad1_x = "4"
hatarib_pad1_y = "3"
hatarib_pad2_a = "2"
hatarib_pad2_b = "1"
hatarib_pad2_dpad = "1"
hatarib_pad2_l1 = "5"
hatarib_pad2_l2 = "18"
hatarib_pad2_l3 = "23"
hatarib_pad2_lstick = "1"
hatarib_pad2_oskey_cancel = "8"
hatarib_pad2_oskey_confirm = "7"
hatarib_pad2_oskey_move = "1"
hatarib_pad2_oskey_pos = "3"
hatarib_pad2_r1 = "6"
hatarib_pad2_r2 = "19"
hatarib_pad2_r3 = "24"
hatarib_pad2_rstick = "2"
hatarib_pad2_select = "7"
hatarib_pad2_start = "8"
hatarib_pad2_x = "4"
hatarib_pad2_y = "3"
hatarib_pad3_a = "2"
hatarib_pad3_b = "1"
hatarib_pad3_dpad = "1"
hatarib_pad3_l1 = "5"
hatarib_pad3_l2 = "18"
hatarib_pad3_l3 = "23"
hatarib_pad3_lstick = "1"
hatarib_pad3_oskey_cancel = "8"
hatarib_pad3_oskey_confirm = "7"
hatarib_pad3_oskey_move = "1"
hatarib_pad3_oskey_pos = "3"
hatarib_pad3_r1 = "6"
hatarib_pad3_r2 = "19"
hatarib_pad3_r3 = "24"
hatarib_pad3_rstick = "2"
hatarib_pad3_select = "7"
hatarib_pad3_start = "8"
hatarib_pad3_x = "4"
hatarib_pad3_y = "3"
hatarib_pad4_a = "2"
hatarib_pad4_b = "1"
hatarib_pad4_dpad = "1"
hatarib_pad4_l1 = "5"
hatarib_pad4_l2 = "18"
hatarib_pad4_l3 = "23"
hatarib_pad4_lstick = "1"
hatarib_pad4_oskey_cancel = "8"
hatarib_pad4_oskey_confirm = "7"
hatarib_pad4_oskey_move = "1"
hatarib_pad4_oskey_pos = "3"
hatarib_pad4_r1 = "6"
hatarib_pad4_r2 = "19"
hatarib_pad4_r3 = "24"
hatarib_pad4_rstick = "2"
hatarib_pad4_select = "7"
hatarib_pad4_start = "8"
hatarib_pad4_x = "4"
hatarib_pad4_y = "3"
hatarib_patchtos = "1"
hatarib_pause_osk = "2"
hatarib_prefetch = "1"
hatarib_readonly_floppy = "0"
hatarib_samplerate = "48000"
hatarib_save_floppy = "1"
hatarib_show_welcome = "0"
hatarib_soft_reset = "0"
hatarib_statusbar = "0"
hatarib_stick_threshold = "30"
hatarib_tos = "<etos1024k>"
hatarib_wakestate = "3"
hatarib_ymmix = "2"

Now, the idea (if I understood it right) is that I should be able to pass the difference between the two files using retroarch --appendconfig The ONLY difference between those two configs is: hatarib_hardimg = "hatarib/amberstar.img" <---With HDD image selected hatarib_hardimg = "<none>" <---With NO HDD image selected

But if I create a file containing hatarib_hardimg = "hatarib/amberstar.img" and pass it to RetroArch, the game does not boot (the image is not selected).

bbbradsmith commented 1 year ago

The same disc image works perfectly when selected from the core options, of course.

This is what I was referring to. Do that again so that it works. Save the options so you have a working one to compare against. It should tell you what's missing from the .opt you're preparing.

vanfanel commented 1 year ago

@bbbradsmith There must be some kind of language barrier here (possibly on my side, since I am not a native english speaker).

I am doing exactly that: I am saving the options with the disk image selected, in a working state. And the ONLY difference is this line: hatarib_hardimg = "hatarib/amberstar.img"

Seriously, I don't know what else could you mean.

bbbradsmith commented 1 year ago

So, what I was suggesting is that you have a working config that you made from the core options menu. Start from there, and figure out what's missing in between that and the thing you're trying to make work.

What I would suggest is that --appendconfig only makes some additions on whatever the pre-existing configuration is. Perhaps the way you're running it from the command line does not have the starting config you believe it does. So, maybe you want to try --config with some base configuration before adding --appendconfig?

Make sure as well that when you launch this way your system folder is where you expect it to be assigned. Hatari will look in the folder that retroarch gives it as the system folder.

I don't know the internal details of how retroarch launches or how it's command line is implemented, so I am only making guesses here. When you launch the game and it doesn't work, take a close look at the core options and see if there's anything set in a way you don't expect. Also take a close look at the retroarch directories settings or perhaps other settings and see if that's how you expect, also.

vanfanel commented 1 year ago

@bbbradsmith Everything you suggest I have already done it: checked the configuration once I passed the .opt with the --appenconfig, all the related files are under ~/.config/retroarch/system/hatarib, etc As I said, things work from the menu as expected.

Have you actually tested this? I mean, passing a .opt with the needed lines for loading a hard disk image.

bbbradsmith commented 1 year ago

No, I actually had not tested that specifically. I'm sorry, I assumed there is some way to pass core options on the command line, and the description of --appendconfig seemed to suggest exactly that, but maybe it doesn't.

What I had tested, and what definitely works here, is making an .opt file for the game in RetroArch's normal config folders. This .opt can work with just a few lines of override, like we were discussing. It applies automatically when the game is loaded as content. I assumed the same file could be passed from the command line somehow, but maybe it can't.

Trying it, I can't seem to make --appendconfig do anything at all. Any options I provide there simply do not appear to have any effect on the core options. I don't even see [INFO] [Config]: Appending config: in my logs like you mentioned. I also tried --config but that just seemed to overwrite whatever file I specified with retroarch configuration rather than use it. When you set a core option in --appendconfig, do you see that option set in the retroarch menu when running? I don't. I see no evidence it has any effect. If the options aren't getting through, the core can't use them.

So... I really don't know. The RetroArch command line is not something I know all the details of. I don't know if there is a way to give core options on the command line or not. Is --appendconfig broken or working as intended? I'm afraid this question will have to go to someone else.

Maybe I gave you the impression that I know more than I do, and if I did I'm sorry. I suggested a solution which I thought might work, and the feedback you gave led me to believe it was partially working for you. In some of the things you posted the options were set wrong, and I was trying to provide guidance there, but I assumed it was something you could do the work to figure out. I couldn't tell from your description what it meant when it doesn't work. If the problem was also that --appendconfig does nothing here, then maybe it was never going to work.

To be honest, I know of no interface from the core to the command line, so this whole process of passing or overriding options really isn't something I think I have any power to affect with code in the core. Whatever core options retroarch provides, the core will use.

Another guess I could give is maybe --appendconfig is only RetroArch configuration and not core options. In which case, perhaps you could tell it about a different config folder that contains a special hatariB.opt? Again it's only a guess, and I have not tried it.

bbbradsmith commented 9 months ago

I received a similar request lately in #29 and after giving it some more thought, I have implemented 2 things which hopefully should serve the needs that were expressed in this issue.

  1. A hard drive image can now be loaded from the content menu, or added to an M3U playlist. The file extension is used to determine the type of hard disk. (AHD or VHD for ACSI, SHD for SCSI, IDE for IDE, GEM as a dummy file to indicate an adjacent folder with the same name a GemDOS drive.)
  2. An M3U playlist can have an auto-run line, the same function as the --auto command line parameter. It looks like: #AUTO:C:\GAMES\JOUST.PRG

Both features now available in: https://github.com/bbbradsmith/hatariB/commit/78d4faec3cc7c8a0d6d27d9ca04466120456aa87