SCSI2Pi/PiSCSI Client Tools for the Atari

SCSI2Pi, SCSI2Pi tools, SCSI Control app/SCSI2Pi, SCSI2Pi-Tools, SCSI-Control-App
uweseimet
Site Admin
Posts: 408
Joined: 10 Jan 2010, 15:39

SCSI2Pi/PiSCSI Client Tools for the Atari

Post by uweseimet »

Release 22.05 of the RaSCSI software supports a special host services device (for using RaSCSI as a realtime clock and for shutting down RaSCSI or the Raspberry Pi) and a SCSI printer device. With the RaSCSI Client Tools these two devices can be used with the Atari, making the Atari the only platform that can fully exploit all RaSCSI features.
The tools automatically find the respective RaSCSI device for the host services or the printer, resp. The realtime clock is useful for Ataris without a clock or with an empty battery and automatically supports daylight saving time. Being able to shut down RaSCSI or the Raspberry Pi in particular makes sense with an OS like MiNT, which can execute commands during its shutdown sequence. The SCSI printer device uses RaSCSI for printing files, e.g. if you do not have a printer for the parallel port (anymore).
Steve
Posts: 5
Joined: 14 Nov 2021, 18:23

Re: RaSCSI Client Tools for the Atari

Post by Steve »

Hi @uweseimet,

With the RA_SHUTD program "It is used as the last operation of a MiNT shutdown"

I cannot seem to find a way to add the program as the last operation. I tried asking on the MiNT mailing list and nobody there could help me either. Problem is, like you say it has to be the last thing, if it isn't and the Rascsi shuts down the Atari will freeze.

How did you get it to run at the very end of shutdown? Thanks
uweseimet
Site Admin
Posts: 408
Joined: 10 Jan 2010, 15:39

Re: RaSCSI Client Tools for the Atari

Post by uweseimet »

I don't use MiNT, but I thought that just like with UNIX you could run a script, for instance, when changing the run level, i.e. also when you shut down MiNT. If this is not the case it may work to execute RA_SHUTD as part of the desktop shutdown, e.g. when shutting down Thing or the desktop of your choice.
Even if there is no support for run levels i would expect MiNT to offer some shutdown mechanism, because it has to at least flush its caches I suppose. Or can you just switch off the Atari without explicitly shutting down MiNT?

Looks as if the MiNT mailing list is almost dead and mostly deals with compiler-related changes ...
uweseimet
Site Admin
Posts: 408
Joined: 10 Jan 2010, 15:39

Re: RaSCSI Client Tools for the Atari

Post by uweseimet »

One more thing: If there is absolutely no way to run a tool like RA_SHUTD as the last step of a MiNT shutdown, running it earlier and providing an optional delay (similar to what the UNIX shutdown command supports) might be an option. This would not be a very nice solution, and the user would have to ensure that the delay is long enough to do any pending work, but it might be a work-around. This would require an update to RaSCSI and also to the client tools, of course, but I don't think this would take me long.
In any case, somebody who is still active in MiNT development should provide definite information on the MiNT shutdown process and if/how it can execute user-defined actions.
Steve
Posts: 5
Joined: 14 Nov 2021, 18:23

Re: RaSCSI Client Tools for the Atari

Post by Steve »

Thanks for the reply.

Yes, I did my research. I spoke to all Mint experts, I even spoke to the man who created the Mint INIT system (Stephen Usher, active on exxos forums) He told me the INIT system is based on SysV unix which apparently didn't support run-levels at that point, so Mint doesn't.

I then started to research rc.shutdown which is a BSD thing. But the Mint system still doesn't support that either - but - interestingly the Shutdown.prg that comes with THING desktop actually *does* check for rc.shutdown. So I called RA_SHUTD from rc.shutdown and while it *did* work, the RaSCSI shutdown *before* MiNT could shutdown in time, which caused an entire system lock (on the Atari). Because even before the RaSCSI shuts down, the first thing to stop is the RaSCSI scsi drive process, which is about instant, not giving enough time.

So yes, like you said, I think the *only* way would be as you said, make the shutdown on the RaSCSI side wait maybe 10 seconds before it proceeds. If this is something you could make happen I'd be very happy, as I use MiNT with my RaSCSI on both my Falcon and TT.
uweseimet
Site Admin
Posts: 408
Joined: 10 Jan 2010, 15:39

Re: RaSCSI Client Tools for the Atari

Post by uweseimet »

Regarding the information on System V I am surprised, because System V Releases 3 and 4 support run levels. SVR3 is from 1987, so it predates MiNT, doesn't it?

Anyway, in case MiNT does not support run levels the only work-around may be the one I mentioned. Can you please confirm that when using rc.shutdown you can pass a parameter to RA_SHUTD? This parameter would have to be the time in seconds RaSCSI shall wait before the actual shutdown, which (depending on anything else rc.shutdown or MiNT or the desktop might do) may be different depending on your setup.
uweseimet
Site Admin
Posts: 408
Joined: 10 Jan 2010, 15:39

Re: RaSCSI Client Tools for the Atari

Post by uweseimet »

Sad news: I had a closer look at the RaSCSI code and it turned out that it is not possible to delay the shutdown. The actual shutdown can only be initiated by a SCSI command, but cannot be triggered at a later point in time, at least not without justifiable changes.
This means that if there is a (MiNT or other) shutdown sequence that expects emulated devices to still be accessible after RA_SHUTD was launched does not work. I guess that only MINT is affected. With MagiC or TOS there are no issues with just launching RA_SHUTD from the desktop and switching off the Atari (after the internal Pi has shut down if there is any), because no subsequent filesystem access is required.
Using the RaSCSI web UI, the RaSCSI Control app or rasctl to shut down RaSCSI or the Pi after shutting down MiNT appear to be the only options.

I have already updated the notes on RA_SHUTD on the HDDRIVER website and will update the README in the client tools distribution with the next available release.
Steve
Posts: 5
Joined: 14 Nov 2021, 18:23

Re: RaSCSI Client Tools for the Atari

Post by Steve »

Ok thanks. I will keep prodding the Mint developers to try and work out solutions around this, hopefully. But yes, the chances of a file system corruption is extremely low or next to nothing, especially since on shutdown Mint does close every drive safely. Thanks again for your work.
uweseimet
Site Admin
Posts: 408
Joined: 10 Jan 2010, 15:39

Re: RaSCSI Client Tools for the Atari

Post by uweseimet »

There is a new RaSCSI client tools release 1.01. There are only minor changes, and regarding the shutdown the README has been updated, i.e. references to MiNT have been removed.
uweseimet
Site Admin
Posts: 408
Joined: 10 Jan 2010, 15:39

Re: RaSCSI/PiSCSI Client Tools for the Atari

Post by uweseimet »

After the re-branding of the RaSCSI project to PiSCSI the names of the client tools binaries for the Atari have been updated. Until further notice the PiSCSI client tools also support RaSCSI. Updating to the latest PiSCSI release is recommended, though.