Jump to content
IGNORED

Loading/Saving files to a TNFS local server


Recommended Posts

Hi folks, this is a newbie question but I haven found a straight forward example about this.

 

Context: I am trying to find a very simple way to share BASIC programs with my PC for easy editing. I set up a TNFS server with a Raspberry Pi and it has been a good experience for serving Disk images from there.

 

But right now I am trying to load and save BAS files to/from my Atari.

I can save and load files created this way. But I am not able to load a file created with my PC. I just discovered that scripts are being saved as binary files, so I can't edit them on my PC, but those are the only ones I can LOAD.

 

I am using SAVE and LOAD with the N-drive TNFS address but maybe there is something I don't know?

 

Thank you!

Link to comment
Share on other sites

7 hours ago, Teapot said:

Use:

LIST "D:FILE.BAS"

 

and:

 

ENTER "D:FILE.BAS"

 

for text based storage.

 

But note that you'll need to deal with the different end-of-line character on the PC. And other special characters if you use them.

This is why the NTRANS.COM tool was made, so you can switch line-ending types:

NTRANS N1: 0 is no translation

NTRANS N1: 1 means CR to EOL and vice-versa (e.g. mac and commodore 8-bit)

NTRANS N1: 2 means LF to EOL and vice-versa (e.g. UNIX)

NTRANS N1: 3 means CR&LF to EOL And vice-versa (MS-DOS, Windows, etc.)

 

this can also be done via XIO with the N: device

 

XIO ASC("T"),#1,12,X,"N1:"

Where X are the same values above.
 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

13 hours ago, tschak909 said:

This is why the NTRANS.COM tool was made, so you can switch line-ending types:

Ah yes. That's an excellent way to deal with it.

 

I'm guessing the setting is persistent for the specific Nx: device even as you NCD around to different servers but does not survive a power cycle or FujiNet reset.

 

13 hours ago, tschak909 said:

NTRANS N1: 1 means CR to EOL and vice-versa (e.g. mac and commodore 8-bit)

NTRANS N1: 2 means LF to EOL and vice-versa (e.g. UNIX)

To clarify this - classic MacOS (up to System 9) uses CR. Mac OS X uses LF as it's unix based.

 

Some apps like TextEdit will work as you expect with CR for compatibility but that support is probably very small. e.g. command line tools don't treat them the same.

Link to comment
Share on other sites

14 minutes ago, Teapot said:

Ah yes. That's an excellent way to deal with it.

 

I'm guessing the setting is persistent for the specific Nx: device even as you NCD around to different servers but does not survive a power cycle or FujiNet reset.

 

To clarify this - classic MacOS (up to System 9) uses CR. Mac OS X uses LF as it's unix based.

 

Some apps like TextEdit will work as you expect with CR for compatibility but that support is probably very small. e.g. command line tools don't treat them the same.

Correct.

-Thom

Link to comment
Share on other sites

Having an automated translation sounds even better (I was just writing a script for that running on the TNFS server).

But for someone totally inexperienced with disk/dos/etc, how do I use ntrans command? (during my Atari times, I only had tapes for storing my scripts)

 

Link to comment
Share on other sites

Huge thank you. It works great.

 

Just a note for others like me:

 

0. Boot with a n-drive enabled disk (all DOS from irata or fujinet servers work)

1. Load and save using ENTER/LIST respectively.

2. Use the TNFS server's IP, since for some reason using the local domain name doesn't work (e.g. raspberrypi.local)

3. Before doing anything, if you want to use the right end of lines for your PC, write on BASIC:

XIO ASC("T"),#1,0,2,"N:" 

  (note: I got it to work with double quotes around the T only)

Edited by Carlos6502
typos
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...