Carlos6502 Posted April 3, 2023 Share Posted April 3, 2023 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! Quote Link to comment https://forums.atariage.com/topic/350056-loadingsaving-files-to-a-tnfs-local-server/ Share on other sites More sharing options...
Teapot Posted April 3, 2023 Share Posted April 3, 2023 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. 1 Quote Link to comment https://forums.atariage.com/topic/350056-loadingsaving-files-to-a-tnfs-local-server/#findComment-5235587 Share on other sites More sharing options...
tschak909 Posted April 4, 2023 Share Posted April 4, 2023 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. 2 1 Quote Link to comment https://forums.atariage.com/topic/350056-loadingsaving-files-to-a-tnfs-local-server/#findComment-5235818 Share on other sites More sharing options...
Teapot Posted April 4, 2023 Share Posted April 4, 2023 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. Quote Link to comment https://forums.atariage.com/topic/350056-loadingsaving-files-to-a-tnfs-local-server/#findComment-5236011 Share on other sites More sharing options...
tschak909 Posted April 4, 2023 Share Posted April 4, 2023 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 Quote Link to comment https://forums.atariage.com/topic/350056-loadingsaving-files-to-a-tnfs-local-server/#findComment-5236019 Share on other sites More sharing options...
Carlos6502 Posted April 5, 2023 Author Share Posted April 5, 2023 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) Quote Link to comment https://forums.atariage.com/topic/350056-loadingsaving-files-to-a-tnfs-local-server/#findComment-5236558 Share on other sites More sharing options...
Teapot Posted April 5, 2023 Share Posted April 5, 2023 (edited) From https://github.com/FujiNetWIFI/fujinet-platformio/wiki/N:-SIO-Command-'T'---Set-Translation XIO ASC('T'),#1,0,2,"N:" That's the way to do it from BASIC. Same as running NTRANS from DOS. Just remember to turn translation off when working with binary files. Edited April 5, 2023 by Teapot 1 Quote Link to comment https://forums.atariage.com/topic/350056-loadingsaving-files-to-a-tnfs-local-server/#findComment-5236627 Share on other sites More sharing options...
Carlos6502 Posted April 6, 2023 Author Share Posted April 6, 2023 (edited) 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 April 6, 2023 by Carlos6502 typos 1 Quote Link to comment https://forums.atariage.com/topic/350056-loadingsaving-files-to-a-tnfs-local-server/#findComment-5236919 Share on other sites More sharing options...
Recommended Posts
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.