Hatari 1.8, Windows, how to change drive letter in file selector

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.2.0

Moderators: simonsunnyboy, thothy, Moderator Team

mxmxmx
Atarian
Atarian
Posts: 2
Joined: Wed Aug 19, 2015 4:05 pm

Hatari 1.8, Windows, how to change drive letter in file selector

Postby mxmxmx » Wed Aug 19, 2015 4:41 pm

Hi,

probably a dumb question, but how can I change to another drive in the file selector in Hatari 1.8 for Windows? I can go all the way up to the root directory of the current drive with the "/" or ".." buttons, but I can't find a way to switch say from "C:" to "D:".

Thanks!

arf
Captain Atari
Captain Atari
Posts: 203
Joined: Thu May 17, 2012 9:56 pm
Location: Germany

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby arf » Wed Aug 19, 2015 6:04 pm

In TOS versions before 1.04 (so: Disk-TOS, TOS 1.00, TOS 1.02) there is no (default) way to click to other drives. Go up to the Path edit field, scroll left, delete the "C" and replace it by "D".

Starting with TOS 1.04 programmes could call the new, slightly improved fileselector, offering drive letter to click on. Alternatively, install one of the many, many, many third-party fileselectors. Their plentiness shoes how bad the original one was. Selectric, UIS III, Boxkite, LGFS, Freedom, Edison Utility, to name a few. Grab them, copy them to the AUTO folder, or if it is an Accessory, to C:, reboot and enjoy an even better fileselector, whether it is TOS 1.0 or 2.06.

mxmxmx
Atarian
Atarian
Posts: 2
Joined: Wed Aug 19, 2015 4:05 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby mxmxmx » Wed Aug 19, 2015 6:34 pm

Oh, it seems my question was unclear. I wasn't talking about the TOS file selector. Of course I know how to use that.

Its Hatari's own file selector -- the one that is used for example to select a floppy image from the F12 on-screen-menu -- that doesn't allow me changing Windows drive letters.

So how do I change drive letters here? (No, it is not possible to manually edit the path "C:\Temp\...".)

hatari.png
You do not have the required permissions to view the files attached to this post.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1986
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby Eero Tamminen » Wed Aug 19, 2015 7:27 pm

mxmxmx wrote:probably a dumb question, but how can I change to another drive in the file selector in Hatari 1.8 for Windows? I can go all the way up to the root directory of the current drive with the "/" or ".." buttons, but I can't find a way to switch say from "C:" to "D:".


I don't think there's such a feature [1]. To work around that, you could set "szDiskImageDirectory" option in hatari.cfg file to a drive that you want to browse, before starting Hatari. You could have multiple such config files and start Hatari with one pointing to drive you want to use.

[1] DOS is only thing that requires drive letters, every other modern OS (OSX, Linux, Android etc) includes all the drives in normal directory hierarchy. Nobody has requested such feature before and no Windows user has contributed code for that to Hatari. Hatari developers don't have Windows, so it needs external Windows user to write & test code for that.

xnonsuchx
Atarian
Atarian
Posts: 2
Joined: Sun Sep 20, 2015 10:38 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby xnonsuchx » Sun Sep 20, 2015 11:20 pm

mxmxmx wrote:Oh, it seems my question was unclear. I wasn't talking about the TOS file selector. Of course I know how to use that.

Its Hatari's own file selector -- the one that is used for example to select a floppy image from the F12 on-screen-menu -- that doesn't allow me changing Windows drive letters.

So how do I change drive letters here? (No, it is not possible to manually edit the path "C:\Temp\...".)

hatari.png

The best thing to do on Windows is to make sure all files you need to access on are the same drive since the navigation options can only go to the root of the current drive. There are a few workarounds, though. For instance, if you keep all your disk images on another drive, you can manually edit the hatari.cfg file in "C:\Users\<username>\.hatari" ("C:\Documents and Settings\<username>\.hatari" for WinXP or earlier)...assuming C: is your system drive...and change some of the default paths like "szDiskImageDirectory = " to be the directory to where all your floppy disk images are. Another option if you have disk images all over the place (why??? :-) ) is to make .bat files you can just drag disk images to to launch them.

e.g. I have my default config set to be 4MB STE emulation in low resolution w/ fast floppy access on in windowed mode w/ statusbar on, so when I need to open a game in ST mode w/o fast floppy access on due to compatibility issues, I have the following .bat file set up to drag the disk image (from wherever it is, even on a network location) to:

F:\GAMES\hatari-1.9.0_windows\hatari.exe --machine st --tos F:\GAMES\hatari-1.9.0_windows\tos104.img --fastfdc no %1

or if I want to try to record my regular STE emulation session to AVI:

F:\GAMES\hatari-1.9.0_windows\hatari.exe --borders no --zoom 1 --crop yes --avirecord %1


I'll take a look at the code to see if there's an easy solution to the file selector (I'm not a programmer as far as writing new code from scratch, but can figure some existing code out and sometimes am able to tweak it and recompile it...as I had to do w/ Hatari for PS3 OtherOS Yellowdog Linux use since v1.4.0).

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1986
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby Eero Tamminen » Mon Sep 21, 2015 8:27 pm

On Linux one can register binaries as handlers for specific types of files (either based on file content or file name extension), e.g. registering Hatari as handler for *.ST disk image files. After that, Hatari runs with the given floppy image when one double clicks on it in file manager / desktop.

I assume something similar can be done on Windows. That way it doesn't matter where the disk image is.

User avatar
Bikerbob
Captain Atari
Captain Atari
Posts: 280
Joined: Wed Mar 23, 2016 2:46 am
Location: Oakville, ON, Canada
Contact:

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby Bikerbob » Wed May 29, 2019 5:10 pm

Did this ever get updated??

Really?? I would do it, but I dont know how. Thats crazy.. I am now starting to use Hatari as a testing platform for my setup on my real machine.

I have a cosmos and I use USB drives.. so all my programs are on a USB drive.. Hatari is on my drive F: on the PC and I wanted to be able to access all the .ST images etc.. for installing software to Hatari.. but I have not been able to select another drive.

I would like to use Hatari over STEEM because it specifically emulates a MegaSTE.. but the file selector is a deal breaker.

This thread is 4 years old.. no one was able to come up with a way to switch drives?

James

darwinmac
Captain Atari
Captain Atari
Posts: 217
Joined: Sat Aug 06, 2011 2:49 pm
Location: San Jose, USA

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby darwinmac » Wed May 29, 2019 7:00 pm

No, it has not been updated. It is not that “no one was able to come up with a way”. The developers use Linux where this issue does not exist.

The Windows version is the only one where the SDL file selector is the only option. If the Hatari developers received a patch to allow switching Windows drives, I am sure they would be interested. Right now, I doubt they will spend time on a problem that exists on a platform they do not use.

Have you tried creating a shortcut to your other drive? Would the file selector obey the shortcut and display the files?

I use the Mac version so I haven’t tried this on the Windows version that I rarely use.

Bob C

User avatar
spiny
Disk Imager Supreme
Disk Imager Supreme
Posts: 2634
Joined: Mon Aug 11, 2003 11:53 pm
Location: just outside bristol
Contact:

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby spiny » Wed May 29, 2019 7:24 pm

darwinmac wrote:
Have you tried creating a shortcut to your other drive? Would the file selector obey the shortcut and display the files?



Bob C


I tried this as I also thought it would work, but the file selector just sees the shortcut as .lnk file :/

czietz
Hardware Guru
Hardware Guru
Posts: 1019
Joined: Tue May 24, 2016 6:47 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby czietz » Wed May 29, 2019 8:08 pm

Apart from shortcuts (which are just .lnk files to which the Windows shell applies some magic), Windows also has links on file system (NTFS) level. They can be created on the command line with the mklink utility: https://docs.microsoft.com/en-us/window ... nds/mklink. In particular, I would create a bunch of "directory junctions" on C: pointing to the root directories your different drives. Then Hatari can access the drives as if they were directories on C:.
Last edited by czietz on Thu May 30, 2019 7:31 am, edited 1 time in total.

darwinmac
Captain Atari
Captain Atari
Posts: 217
Joined: Sat Aug 06, 2011 2:49 pm
Location: San Jose, USA

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby darwinmac » Wed May 29, 2019 9:47 pm

I did not realize Windows supported symbolic links. That would definitely something to try.

Bob C

User avatar
spiny
Disk Imager Supreme
Disk Imager Supreme
Posts: 2634
Joined: Mon Aug 11, 2003 11:53 pm
Location: just outside bristol
Contact:

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby spiny » Thu May 30, 2019 8:18 am

Yup, that seems to work :)

Use the command mklink in an elevated command prompt (i.e. run the ciommand prompt as administrator)
use /D for directory
first path is the link you want to create
second path is the destination for the link
here I am creating a link to my C: drive and calling it 'CDrive'
hatari01.png


How it looks in explorer
hatari02.png


How it looks in Hatari file selector
hatari03.png


and clicking it takes me to my C: drive :)
hatari04.png
You do not have the required permissions to view the files attached to this post.

czietz
Hardware Guru
Hardware Guru
Posts: 1019
Joined: Tue May 24, 2016 6:47 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby czietz » Thu May 30, 2019 8:27 am

spiny wrote:Use the command mklink in an elevated command prompt (i.e. run the ciommand prompt as administrator)
use /D for directory


I was thinking of directory junctions (command switch "/J") because these don't require administrative privileges to create.

User avatar
spiny
Disk Imager Supreme
Disk Imager Supreme
Posts: 2634
Joined: Mon Aug 11, 2003 11:53 pm
Location: just outside bristol
Contact:

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby spiny » Thu May 30, 2019 8:55 am

czietz wrote:
spiny wrote:Use the command mklink in an elevated command prompt (i.e. run the ciommand prompt as administrator)
use /D for directory


I was thinking of directory junctions (command switch "/J") because these don't require administrative privileges to create.



Didn't know about that switch - works fine too :)

hatari05.png
You do not have the required permissions to view the files attached to this post.

User avatar
Bikerbob
Captain Atari
Captain Atari
Posts: 280
Joined: Wed Mar 23, 2016 2:46 am
Location: Oakville, ON, Canada
Contact:

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby Bikerbob » Thu May 30, 2019 3:50 pm

Fantastic! I will do this! Thanks guys! This makes life much easier.. I can create links down to where my USB drives would normally be.. and if its pluged in the link will work! :)

James

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1986
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby Eero Tamminen » Sun Jun 16, 2019 9:48 pm

Why not just register Hatari as handler for *.st files, or *.ST.gz files (latter to use less space and differentiate them from potential other files that might use *.st extension)? Then Hatari would be automatically started when you click on a *.st(.gz) file on your desktop.

User avatar
spiny
Disk Imager Supreme
Disk Imager Supreme
Posts: 2634
Joined: Mon Aug 11, 2003 11:53 pm
Location: just outside bristol
Contact:

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby spiny » Mon Jun 17, 2019 8:17 am

Eero Tamminen wrote:Why not just register Hatari as handler for *.st files, or *.ST.gz files (latter to use less space and differentiate them from potential other files that might use *.st extension)? Then Hatari would be automatically started when you click on a *.st(.gz) file on your desktop.



I expect the USB drive has -files- on it not disk images, thats how I read it anyway.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1986
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby Eero Tamminen » Tue Jun 18, 2019 9:21 pm

At least on Linux, it's possible to register Hatari as handler for Atari programs, not just disk images. Hatari even includes a script for that: https://git.tuxfamily.org/hatari/hatari ... egister.sh

Does Windows have any kind of facility to register handlers for binary files (files that begin with specific content / bytes)?

If not, one could register Hatari as handler e.g. for files with *.tos file name extension.

User avatar
spiny
Disk Imager Supreme
Disk Imager Supreme
Posts: 2634
Joined: Mon Aug 11, 2003 11:53 pm
Location: just outside bristol
Contact:

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby spiny » Wed Jun 19, 2019 7:50 am

Eero Tamminen wrote:At least on Linux, it's possible to register Hatari as handler for Atari programs, not just disk images. Hatari even includes a script for that: https://git.tuxfamily.org/hatari/hatari ... egister.sh

Does Windows have any kind of facility to register handlers for binary files (files that begin with specific content / bytes)?

If not, one could register Hatari as handler e.g. for files with *.tos file name extension.


Windows is all about file extensions, so yes, it's trivial to register Hatari with *.prg , *.tos etc

but how does Hatari handle that? does it load then immeadiatly run the PRG I double clicked? presumably nothing useful would happen for non executable atari files like *.PI1 *.S etc ?

I'm more used to Steem, where I boot with drives mapped as atari hard drives and can browse while in the program to map removable storage if I've just inserted a USB stick with some pixel art i'm working on etc.

ThorstenOtto
Atari Super Hero
Atari Super Hero
Posts: 828
Joined: Sun Aug 03, 2014 5:54 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby ThorstenOtto » Wed Jun 19, 2019 7:56 am

spiny wrote:but how does Hatari handle that?


It installs a temporary desktop.inf/newdesk.inf/emudesk.inf (whichever is appropiate for the selected TOS), which has the program installed as autostart application.

presumably nothing useful would happen for non executable atari files like *.PI1 *.S etc ?


No, that won't work.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1986
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari 1.8, Windows, how to change drive letter in file selector

Postby Eero Tamminen » Sun Jun 23, 2019 9:54 pm

As first step Hatari checks that the binary is an Atari program. If it is, Hatari will start the program using the program's directory as C: root, i.e. it works only if program works with its own dir being the hard disk root (there isn't e.g. a config file telling program to load its files from some other path etc).

As Thorsten mentioned, Hatari does the program startup by providing a virtual INF file for TOS, which tells it to autostart the indicated program. Autostarting is supported by TOS v1.04 or newer (Hatari will show warning dialog if TOS is too old).


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 7 guests