Showing the NCD and NDIR from the N tools in SpartaDOS X

[ATARI] Why the N tools?

FujiNet exposes several devices to your ATARI computer. One of them is the network device, which can access local or Internet network resources. While we provide a handler that adds an N: device, certain programs (such as the DUP.SYS in ATARI DOS 2.0) write over the handler when they load into memory, making the N: device unusable within DUP.

To work around this, a series of tools exist which access the FujiNet network device directly via SIO, thus do not require the presence of the N: handler (also called NDEV.COM).

Each tool has been tested in every possible DOS, and have been made to adapt accordingly. Since SpartaDOS, OS/A+ / DOS XL, and XDOS all support command line parameters, the tools automatically fetch parameters if they are present. The tools fall back to interactive mode if no parameters are given on the command line.

Each tool (with the exception of NCOPY) has been written to assume that no use of N: means to refer to N1:. There are 8 such N[x]: devices, numbered N1: to N8:. Both the N: handler (NDEV.COM) and the N tools refer to the network devices in this same way.

Furthermore, the companion disk, fnc-tools-doc.atr contains documentation for each tool mentioned below.

The Tools

The tools themselves are not only present on the fnc-tools.atr disk on the apps.irata.online TNFS server, they are also present on each and every disk in the DOS folder on the same server. They are called the N tools, because they all begin with the letter ‘N‘:

  • NCD. Changes the directory pointed to by the selected N[x]: device. It’s useful so you don’t have to type the full path to a URL, each and every time you refer to an N[x]: device. So you can type N:FROG.EXE instead of N:FTP://ftp.pigwa.net/stuff/collections/holmes cd/Holmes 2/Atari Archives/Antic Files/88/FROG.EXE each time! In other words, this tool affects all of the other N tools, as well as the N: device.
  • NCOPY. Copies files. Takes a source, and a destination. Either source or destination can be a local device (D:, E:, P:, whatever.), or the network (N[x]:). It supports wildcards.
  • NDEL. Deletes a file from the network.
  • NDEV. Loads the N: handler into memory. Can be AUTORUN.
  • NDIR. Lists the directory of a network location. It asks the FujiNet for a long directory listing, which preserves case, spacing, and wraps the output every 31 characters. File size is shown approximated to bytes, kilobytes, or megabytes, as needed.
  • NLOAD. Loads and runs any standard ATARI binary load file, directly from any network endpoint.
  • NLOGIN. Sets login and password credentials for network protocols that need them, such as SMB.
  • NMKDIR. Tells a supported network protocol to create a new directory at the given path.
  • NPWD. Prints the current directory pointed to by the N[x]: device.
  • NREN. Renames an existing file, to a new name, separated by a comma. This is analogous to a move on some protocols.
  • NRMDIR. Removes a directory pointed to by the N[x]: device. Depending on the protocol, the directory may need to be empty beforehand.
  • NTRANS. Sets the translation mode for a given N[x]:, allowing you to convert text files to and from ATASCII into a compatible ASCII format, and back again. Setting a value of 0 turns off translation.

Relationship to NDEV.COM and the N: Handler

Both NDEV.COM and the N tools use the same network device on the FujiNet, in exactly the same way.

The N tools do not require NDEV.COM to be loaded, but the N tools help navigate network file systems, because the DOS you may be using may not know how to do so. NDEV.COM and the N tools work hand-in-hand to provide a transparent way to access network resources.

But the N: handler has some shortcomings:

  • ATARI DOS 2, and DOS 2.5’s Disk Utility Package (DUP.SYS) is loaded into a fixed location in memory, which happens to overwrite where NDEV.COM loads, obliterating the N: handler. In addition, MEM.SAV must be enabled if you want to go back and forth between the DUP and another program, so that the handler can be restored on exit from the DUP. The N tools provide a sensible alternative to access the same network resources even though the handler can’t be used.
  • MyDOS does not obliterate NDEV.COM in memory, so it can be used in its Disk Utility Package, so you can list directories and manipulate files using the usual commands. However, since the BINARY LOAD command has been moved to DOS.SYS, it is only accessible via the “D:” device, and calls it via CIO call #39, which NDEV.COM does not implement yet. The N tools provide NLOAD.COM, which can BINARY LOAD from the network.
  • SpartaDOS (disk and X) has the same BINARY LOAD issue as MyDOS. In addition, SpartaDOS X’s command processor thinks of N: as “DN:” instead of device N:. While there will be a SpartaDOS driver for FujiNet’s network device in the future, the N tools can be used to access the network device from the SpartaDOS X command processor. (Disk based SpartaDOS can actually use N: directly, with some quirks.)
  • NDEV.COM does not yet implement burst mode (anyone want to help implement it?)

Demo Video

Here is a demo video showing why the N tools are important. Chapter Index below.

https://youtu.be/BUR_KRTRWk0
Demo video showing Why the N tools are important.

Chapter Index for Video

00:00 The DOS folder
01:10 What happens when you try to use N: in DOS 2.0 DUP?
04:40 DOS 2.0…What happens when you try to go back to BASIC without MEM.SAV?
05:20 Creating MEM.SAV so we can preserve the handler for BASIC and other applications.
07:45 The N tools
10:20 using NCOPY to copy from the network, to a floppy.
12:00 using NCOPY to copy from a floppy, to the network.
14:30 using NLOAD to load Cyclod on DOS 2.
15:30 Comparing to MYDOS 4.53
16:40 comparing Viewing directory via the N: device
16:58 comparing Copying via the N: device
17:55 Whoops! can’t load a binary file in MYDOS via the N: device.
19:08 Loading binary file with NLOAD.
19:55 Using N tools in SpartaDOS X

For ATARI users: How to create your own SpartaDOS X Cartridge + FujiNet Tools (using SIDE3 as an example.)

The following YouTube video shows how to create your own SpartaDOS X cartridge with the FujiNet tools, from scratch, using the SpartaDOS X Imager (SDXImager) tool.

For this video, I installed a fresh copy of Ubuntu Linux Desktop using default options, and added the following packages via a terminal:

sudo apt install build-essential git wine

Once everything is built, you can transfer it to the nearest FujiNet via WebDAV, by selecting Network in Files, and Connecting to the address of your FujiNet:

DAV://192.168.1.21/dav/

Links Used in the video

Ubuntu Linux: https://ubuntu.com/download/desktop

CC65 Compiler: https://github.com/cc65/cc65

MAD Assembler: https://github.com/tebe6502/Mad-Assembler

FujiNet Tools: https://github.com/FujiNetWIFI/fujinet-tools

FujiNet N: Handler: https://github.com/FujiNetWIFI/fujinet-nhandler

Altirra Emulator: https://www.virtualdub.org/altirra.html

User FAQ

What do the lights/buttons do?

See the quick-start guide here

Why does FujiNet on the 400/800 require USB power?

It’s not a power issue. The 400/800 computers actually boot faster than the XL or later version of the computer. The newer Atari’s scan to see if the user is holding the option key to disable BASIC on startup. The scanning and debounce logic slows the boot up time just enough to allow the FujiNet device to start and begin scanning for SIO devices.

Why can’t I get SAM to speak on my 400/800.


This feature requires an XL/XE system or a ROM upgrade
The standard 400/800 ROMs do not recognize any P: device except P1:

Do I need a special FujiNet driver to simulate an 850?


The standard bootstrap loader is all you need.

Do I need a special FujiNet driver to access the N: device?

Yes, you need the load the n-driver which can be found on the atari-apps.irata.online TNFS server under networking/n-handler.

How do I get the IP address of my FujiNet device?

From the main config screen on the Atari, press ‘C’

How do I get my “printout” from FujiNet?

From your browser, go to http://<IP of FujiNet device>
Click on the printer icon to download your file.

JSON meets Atari

Parsing and using JSON is one of the fundamental components of the Modern Web. Now your Atari can do it with the help of FujiNet and the N: (network) device! Of course there is a excellent video which will break this down for you in a few moments:

The N: is new, and as such it’s documented over at the FujiNet wiki and it worth a read:

https://github.com/FujiNetWIFI/fujinet-platformio/wiki/Using-the-N%3A-Device

The N: device gives you access to a whole slate of modern web protocols in Atari Basic!

Swapping with SAM

Disk swapping using FujiNet is done via the Disk Swap Button. This is a critical and necessary function that almost all ‘virtual disk’ emulators have- since you can virtually mount many disks on these devices, but you still may have only one virtual floppy drive. The swapping function rotates this virtual disks from their virtual slots round-robin into the virtual floppy. But how to let the user know what disk slot is mounted in the virtual floppy drive? FujiNet has no display to show you this information… The Software Automatic Mouth (SAM) can help here, and there is a video to show this in action.

There is also lots more documentation on how to use SAM yourself from BASIC on the FN Wiki:

https://github.com/FujiNetWIFI/fujinet-platformio/wiki/Using-SAM-%28Voice-Synthesizer%29

Create a Disk

Using FN (FujiNet) will change the way you think about your Atari and disks. It allows a easy gateway to manage local and remote disks and use them with your Atari. One imporant aspect of disk management is creating new disks. FN Config now has an easy way to do this.