FujiNet Atari Tools

Moderatoren: Sleeπ, andymanone

Antworten
Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi,

I started trying some of those tools.

It looks like _some_ of them do not work or do not work partly.

For example:

running FLS 1 returns "NO COMMA.", while it is expected to return a list of files present in the referred host slot. (I get this reply on all populated host slots).

running FINFO returns false values for "Sectors per Track" and "Sector Size" in case those values contain a high byte larger than 0 (an image with 1 track, $FFFF sectors and 256 bytes per sector returns 255 sectors per track and a sector size of 0. Nevertheless the "Disk Type" is correctly reported as "Large disk 16M")

Two or three are missing a doc file.

@Thom: Shall I write down found problems and if so, where?

(Btw, I used SpartaDOS 3.3b which is the DOS I use almost always)

CU, Erhard

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

Yup, documentation needs updating.

For FLS, e.g.

FLS 1,/

Yup, am not surprised FINFO has bugs, they can be squished. :)

The source code for all the fnc-tools is here:
https://github.com/FujiNetWIFI/fujinet-config-tools

All of these tools can be built with CC65.

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi,

I would be able to rewrite FINFO in Mac/65, but I have no idea about CC65 ...

Have the source codes on github been used to create the latest tool builds available on atari-apps.irata.online (are the sources on github the latest versions available)?

For my understanding the problem, that those two 16 bit values are displayed incorret, might be in that procedure (I do not understand how it works but it is given a lo and a hi byte from percom block data and hence should calculate something like: result=256*hi+lo). No idea what a print command does in that place, though. Is there something wrong with that procedure?

void print_num16(unsigned char nl, unsigned char nh)
{
char tmp[6] = {0,0,0,0,0,0};

utoa((nh*256+nl),tmp,10);

print(tmp);
}

Again: Shall I write down found problems and if so, where?

CU, Erhard

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

The best place is to put them in github:
https://github.com/FujiNetWIFI/fujinet- ... ols/issues

You can also email me as well:
thom dot cherryhomes at gmail dot com

Thank you for digging into this. :)

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

I'll create an account on github.

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hello Thom,

I re-started trying to play around with the FujiNET config tools for the Atari and stumbled over some problem which I fail to solve on my own.

I've got tnfs.fujinet.systems mounted in host slot #5.

If I perform

FLS 5,

I get a list of directories which are

Demos/
Games/
Homesoft Collection/
KWEST Library/
SDrive-MAX/
Stuffed CF Card Product/
Utilities/

Then I enter

FCD 5 Games

which should do a change directory to "Games".

If I reperform a FLS 5, I still get the same root as before and I am not in "Games", so I cannot see what is in Games.

If I try

FLS 5,Games -> SIO ERROR
FLS 5,/Games -> same as FLS 5,
FLS 5,/Games/ -> SIO ERROR
FLS 5,Games/ -> SIO ERROR

So how am I supposed to move through directories so that I have a chance to finally mount some file using FMOUNT?

Any hints greatly appreciated!

(Of course I could simply enter the FujiNET menu and do things)

Kind regards, Erhard

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

FCD currently does not work. Some changes to the fuji device need to be done, and the first attempt at this proved very buggy, so the functionality has been temporarily commented out.

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi Thom,

thanks for your reply!

Best, Erhard

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

If anyone wants to hack on it, I can walk through how this part of the code works.

This offer is open now and forever for each and every part of FujiNet.

I have very limited engineering cycles, but I MAKE time to teach. My promise, to all of you.

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi Thom,

I certainly would be at least interested, but things depend on how much spare time is available and on what language the source is written in.

As long as there is sunny sommer weather over here (which is rare) I will join outdoor activities after work - please forgive me.

As for programming I am used to do things in Mac/65.

I'll drop a line in case I managed to take a look at things.

Thanks, Erhard

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hello Thom,

I just found a bit of time to take a glance and the sources.

Though things look a bit like ACTION! the programming language used for the FujiNET Atari Tools is alien to me.

If I were to work on things I would not only have to deep-dive into a FujiNET API to learn about the commands it understands but I would also have to learn a new programming language (which looks quite weird to me because it consists of some .s-files looking like source code and additional .h-files containing some short stuff about things that are in the .s-file.

I guess it would require much more time to teach me than if you just wrote the program.

Nevertheless I will talk to people at the Fujiama Atari 8-bit meeting next month, maybe there is someone who is more knowledgable than me and already knows - whats it? CC65?

I am sorry.

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

Yup, the programming language is C, the compiler is called CC65.

There is absolutely nothing precluding the FujiNet tools to be written in ACTION!

You're just making SIO calls. :)

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

I just took a look at the SIO call documentation.

Problem:

If I click on "Get Host Prefix" which shows the following link:

https://github.com/FujiNetWIFI/fujinet- ... ost-Prefix

the browser is redirected to

https://github.com/FujiNetWIFI/fujinet-platformio/wiki/

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

Yup, looks like I need to document that page. Thanks!
I've just added pages for commands $E0 and E1.

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi,

I did some minor first few tests and would like to let you know about things.

Command $DA is named "Get Device Slot Filename" which is not correct as the command returns the filename along with the path (without device).
result of command $da
result of command $da
CMD_DA.png (23.21 KiB) 3903 mal betrachtet
Command $E0 does not work for me as it seems to return garbage. If I understand the description correctly I would expect a certain device slot's contents. Maybe I got wrong what should be returned. In that case please explain the command and data meaning.
host list from web ui
host list from web ui
HOST_LIST.png (7.82 KiB) 3903 mal betrachtet
result of command $e0
result of command $e0
CMD_E0.png (11.51 KiB) 3903 mal betrachtet
Command $FE does not return 33 bytes for the SSID but 32, so we get 96 bytes, the 97th being the checksum.

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

Here is the corresponding code on the ESP32 (firmware) side:

https://github.com/FujiNetWIFI/fujinet- ... .cpp#L1174

```c
// Retrieve host path prefix
void sioFuji::sio_get_host_prefix()
{
uint8_t hostSlot = cmdFrame.aux1;
Debug_printf("Fuji cmd: GET HOST PREFIX %uh\n", hostSlot);

if (!_validate_host_slot(hostSlot))
{
sio_error();
return;
}
char prefix[MAX_HOST_PREFIX_LEN];
_fnHosts[hostSlot].get_prefix(prefix, sizeof(prefix));

bus_to_computer((uint8_t *)prefix, sizeof(prefix), false);
}
```

and if we dig into the fnHosts object:
https://github.com/FujiNetWIFI/fujinet- ... t.cpp#L254

```
/* Returns pointer to current hostname and, if provided, fills buffer with that string
*/
const char *fujiHost::get_prefix(char *buffer, size_t buffersize)
{
if (buffer != NULL)
strlcpy(buffer, _prefix, buffersize);

return _prefix;
}

/* Returns pointer to current hostname
*/
const char *fujiHost::get_prefix()
{
return get_prefix(NULL, 0);
}
```

The _prefix variable here is defined in fujiHost.h as a 256 byte char buffer. set to null initially:
https://github.com/FujiNetWIFI/fujinet- ... Host.h#L23

```
char _prefix[MAX_HOST_PREFIX_LEN] = { '\0' };
```

so from the code here, we should indeed be returning the prefix.

(for those wondering what I am doing here. I am trying to show the relationship between the Atari side of things, and the firmware code, so that people can become engaged and start hacking on both sides of it.)

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi Thom,

reading your comment about what I found out about command $E0 I am not sure if you are saying that the gibberish I got as a result is a correct answer or not.

Best, Erhard

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

It should be blank.

It's a good idea to run the FujiNet flasher, and to turn on the monitor, so you can see commands that go to the FujiNet and how it responds.

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hello Thom, I think we are talking past each other. Originally I was talking about the fact that I wanted to change into a subdirectory from the Atari using the FujiNET Atari Tools (FCD). Then I tested (among other things) the SIO command $E0, because I thought it might have something to do with it. The command returns data that doesn't mean anything to me. Then you said that the command $E0 should return 256 * 0. I had assumed that the command should return the contents of a host slot, in my case #3, i.e. atari-apps.orata.online. But it obviously does not. What is this command for? Or is there only that one command for reading the host slots, which reads all 8 host slots at once and thus limits each host slot to 32 characters?

Of course I could run the flasher and try to log stuff, but I already know what was sent to the FujiNET and what data was returned. So I wouldn't see anything new, would I?

Best, Erhard

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

The reason I asked to use the flasher is, There may be a data point that we can debug.

If the host prefix is not set, then the returned value should be completely blank. If this indeed is happening, then some firmware debugging needs to happen.

-Thom

Dietrich
Beiträge: 71
Registriert: 20.09.2021 20:59
Has thanked: 8 times
Been thanked: 31 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von Dietrich »

Hello Erhard,

some time ago, I examined the Fujinet SIO commands:

I didn't try the $E0 command. I would suppose, it contains the current directory set by the $E1 command. So if you don't use $E1 (oder FCD) before, I suppose $e0 gets an empty path, i.e. either "/" or "" (empty string). Since the Fujinet API uses null-terminated strings, you'll get either $2f $00 or $00 - the remainder of the receive buffer may be undefined (if Fujinet uses C string conventions).

If you want to get the filepath (i.e. path and filename without leading "Dn:") of a drive "Dn:", you should use command $f2 or $da:
- $f2 gets the filepath (and host# and access mode) of alle drives D1-D8, but the filepaths are truncated to 36 bytes (so you don't get the complete filepath if it is longer than 36 bytes). This is useful to list the drive configuration for "D1"-D8" stored in Fujinet
- $da gets the filepath for the drive defined by AUX1 (0-7 for D1:-D8:) - maximum filepath length is 256 bytes (including the $00 string terminator, I suppose)

If you want to get the URL paths of the host slots, you can use command $f4. This returns 8 paths (32 chars each) for the 8 host slots, eg. "atari-apps.irata.online" or "SD" (if SD card slot).

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi,

@Thom
tschak909 hat geschrieben:
18.08.2022 17:03
host prefix
I am not sure if I understand what the "host prefix" is. Maybe if you gave an example?

@Dietrich
Dietrich hat geschrieben:
18.08.2022 17:26
you can use command $f4. This returns 8 paths
I am merely looking for a command, that returns the contents of a single given host slot ... maybe there is none which would mean that no URI can be longer than 32 bytes?

Best, Erhard

Dietrich
Beiträge: 71
Registriert: 20.09.2021 20:59
Has thanked: 8 times
Been thanked: 31 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von Dietrich »

Yes, there is only command $f4 to get hostnames - and this returns all hostnames. So I suppose, hostnames can't be longer than 32 chars (or maybe 31 chars + string terminator $00).

"Host prefix" means only the prefix for all relative filepaths, i.e. the current directory. FCD sets this, and all file/directory commands use the current directory.

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Dietrich hat geschrieben:
19.08.2022 15:55
"Host prefix" means only the prefix for all relative filepaths, i.e. the current directory. FCD sets this, and all file/directory commands use the current directory.
I still do not understand what is meant. According to what you say it doesn't seem to be relatet to any of the 8 host or drive slots.

That's why I asked for an example, what to punch in, what it does on the FujiNet, what you see about it in the FujiNet menu, what it does according to your DOS prompt or whatever.

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

The Get Host and Set Host prefix commands were intended to be used by the FCD command.

Given a host slot, it sets the prefix for that host slot. This means that any path you put there would automatically get prepended to any host slot command (such as FLS or FMOUNT), so that you don't have to type the whole path when using FLS, FMOUNT, etc.

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi,

it must be very difficult to provide an example ...

Are you saying that I can set a certain host slot to

a8stuff.somedomain.tld

for example?

If so I do not understand why the command supports 256 bytes of data regarding the fact, that a host slot entry can be no longer than 32 bytes.

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

*deep-breath*

because it's not meant to hold a hostname.

It's meant to hold a path.

e.g.

FCD 1,/Games/Action/Atari/

this would send a $E1 command to the fujinet with the string

"/Games/Action/Atari/"

so when you did an FLS 1,*

it would automatically prepend /Games/Action/Atari/ to the path to give

"/Games/Action/Atari/*"

or for FMOUNT:

FMOUNT 1,1,R,Defender.atr

It would actually use the filename:

"/Games/Action/Atari/Defender.atr"

This is why the buffer is 256 bytes long.

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi Thom,

tschak909 hat geschrieben:
19.08.2022 21:16
*deep-breath*
sorry for that!

Now I guess I am beginning to understand ... I had tried something like "FCD 1,/Games/Action/Atari/" (using different but valid directory names) and then looked in FujiNet menu and didn't notice any change which confused me.

If I really understand things better now it is of course that nothing changed yet. Only if one mounts a file afterwards one would be able to see a change in menu or web UI.

Okay, I will play around things. But for now I have to go off because I have to get up very early in the morning tomorrow.

And sorry again for getting on your nerves.

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

nah, it's not your fault. am definitely not explaining things clear enough.

We had hell trying to implement this particular feature, so it was simply left as is, hoping that somebody would come along and fix it.

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi Thom,

tschak909 hat geschrieben:
02.11.2022 01:56
@erhard if you or anyone want to work on better FujiNet tools, I have posted a new version of fmount in the fmount-new directory, that I ported from my work on the Coleco Adam: https://github.com/FujiNetWIFI/fujinet- ... fmount-new

It does not have any CLI capability, but rather allows you to pick an image to mount from a menu, and is a good example of how to talk to the FUJI sub device to do things like mount disks.

-Thom
in fact we started working on things but got interrupted by the change in SSID length.

During the past days I went through the Atari Tools along with the docs and the $70 SIO commands along with the docs.

I stumbled over several errors, some just due to copy'n'paste, some in function description, one missing file on Github and stuff like that.

There is a copyright note with each SIO command doc which makes work more difficult.

May I / we have permission to store a local copy of those docs?

Are we allowed to email you to discuss or clarify individual problems? It may be too much bla bla for here ...

Btw, thanks for hinting about the new FMOUNT version. I guess it will be definately interesting.

Kind regards,

Erhard

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

Yes, you may store a local copy. Everything I write is licensed under GPL v. 3.

Yes, you can email for clarification of individual problems.

:)

-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi Thom,

> new version of fmount

I downloaded the latest fnc-tools.atr just a few minutes ago and tried the FMOUNT.

Funnily it looks the same like the previous version, though the code is different.

When I enter FMOUT it replies with the parameter list. No menu pops up.

By the way, the built-in help shows space separated parameters, but one has to enter them separated by commas.

Kind regards,

Erhard

tschak909
Beiträge: 197
Registriert: 17.08.2021 00:22
Has thanked: 4 times
Been thanked: 131 times
Kontaktdaten:

Re: FujiNet Atari Tools

Beitrag von tschak909 »

the new fmount folder is called fmount-new, and is a completely different program.
-Thom

Erhard
Beiträge: 540
Registriert: 04.11.2021 15:52
Has thanked: 51 times
Been thanked: 109 times
Kontaktdaten:

FujiNet Atari Tools

Beitrag von Erhard »

Hi Thom,

of course I noticed that new folder, but I did not manage to find a binary file ready to run on the A8.

Best, Erhard

Antworten

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast