Hatari 1.8, Windows, how to change drive letter in file selector
Moderators: simonsunnyboy, thothy, Moderator Team
Hatari 1.8, Windows, how to change drive letter in file selector
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!
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!
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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.
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.
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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\...".)
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\...".)
You do not have the required permissions to view the files attached to this post.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2281
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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.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:".
[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.
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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???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\...".)

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).
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2281
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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.
I assume something similar can be done on Windows. That way it doesn't matter where the disk image is.
- Bikerbob
- Captain Atari
- Posts: 405
- 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
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
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
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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
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
-
- Disk Imager Supreme
- Posts: 2709
- 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
I tried this as I also thought it would work, but the file selector just sees the shortcut as .lnk file :/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
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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.
Re: Hatari 1.8, Windows, how to change drive letter in file selector
I did not realize Windows supported symbolic links. That would definitely something to try.
Bob C
Bob C
-
- Disk Imager Supreme
- Posts: 2709
- 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
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' How it looks in explorer How it looks in Hatari file selector and clicking it takes me to my C: drive

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' How it looks in explorer How it looks in Hatari file selector and clicking it takes me to my C: drive

You do not have the required permissions to view the files attached to this post.
Re: Hatari 1.8, Windows, how to change drive letter in file selector
I was thinking of directory junctions (command switch "/J") because these don't require administrative privileges to create.spiny wrote: Use the command mklink in an elevated command prompt (i.e. run the ciommand prompt as administrator)
use /D for directory
-
- Disk Imager Supreme
- Posts: 2709
- 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
czietz wrote:I was thinking of directory junctions (command switch "/J") because these don't require administrative privileges to create.spiny wrote: Use the command mklink in an elevated command prompt (i.e. run the ciommand prompt as administrator)
use /D for directory
Didn't know about that switch - works fine too

You do not have the required permissions to view the files attached to this post.
- Bikerbob
- Captain Atari
- Posts: 405
- 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
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

James
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2281
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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.
-
- Disk Imager Supreme
- Posts: 2709
- 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
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.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2281
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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.
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.
-
- Disk Imager Supreme
- Posts: 2709
- 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
Windows is all about file extensions, so yes, it's trivial to register Hatari with *.prg , *.tos etcEero 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.
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.
-
- Atari God
- Posts: 1267
- Joined: Sun Aug 03, 2014 5:54 pm
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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.spiny wrote: but how does Hatari handle that?
No, that won't work.presumably nothing useful would happen for non executable atari files like *.PI1 *.S etc ?
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2281
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari 1.8, Windows, how to change drive letter in file selector
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).
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).