Welcome, Guest. Please login or register.


Author Topic: Wiznet 5100/5300 /etc and Enterprise (Read 11314 times)

Offline lgb

  • EP addict
  • *
  • Posts: 3496
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://lgb.hu/
Wiznet 5100/5300 /etc and Enterprise
« on: 2015.March.24. 11:03:13 »
A new topic ... I have just had a quick peek into the documentation of the winzet 5300 chip. It seems, 8 and 16 bit bus is supported, of course we need 8 bit. The other thing: accessing the "registers" can be done in two ways: indirect access only needs some ports, basically some allocated I/O ports would be OK. The direct access is different it needs 10 bit addressing information (if I remember correctly now). We can say, that indirect access is OK too, and it's more simple, but at the other hand it can be slower, as accessing a register needs extra work first (specifying the register number or so). Though I am not sure it's worth, if a given socket is connected and using the same register anyway for most of the time ... Anyway, in case of direct access, we need 10 bits. I guess it can be done with I/O ports. We know, that 16 bit I/O addresses in EP cannot be used easily  as Dave's "MMU" functionality also modifies the address if it's an I/O request and not memory. However, the lower 14 bits remains the same anyway. By allocating a 16 I/O port range in the low byte address, we need 10-4=6 bits more address lines which exactly the number of bits we have in the high byte address not modified by Dave anyway. The only problem with this: I/O addresses will be somewhat complex, we need 16 "valuable" "normal" I/O port range, and also we need to do 16 bit I/O. Maybe the solution is to use an EP memory segment as I/O (like with the SD card) is a better solution. Originally I thought using the BASIC cartridge is a good "playground" to connect the 830MJ module to the ROM socket, and maybe it is, just it's now in conflict with the widespread solution of the SD card cartridge recently ...
« Last Edit: 2015.March.24. 11:19:28 by lgb »

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13374
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #1 on: 2015.March.24. 11:16:54 »
I also think the memory mapped I/I the better solution.

What do you think: make a adapterboard which can be used for connect the module to any standard EPROM socket?

Offline lgb

  • EP addict
  • *
  • Posts: 3496
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://lgb.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #2 on: 2015.March.24. 11:40:43 »
I am just not sure, what about this 5V and 3.3V logic voltage issue, to be honest. Maybe it would be nice to get information on the MSX network cartridge with 5100, to see how the problem solved, the situation must be the same (well, at least I guess 5100 also a 3.3V chip basically ...) also the target system somewhat (Z80 with 5V logic levels as with the EP). It would be nice to be able to see the schematics of the DenYoNet card for MSX, that is. If it's really true that 5300 is 5V tolerant on inputs, that's OK, now about the opposite signal direction: TTL 5V high logic level starts at 2V AFAIK. CMOS is about 2/3 of the Vdd, with 3.3V it's 2.2V, so at least CMOS-like high logic level of a 3.3V device seems to be enough for an 5V TTL level device. But I am really unsure about this topic. Moreover, there are people using CMOS Z80 instead of the original NMOS in their EP. I was always unsure it does not mean any problem in the original EP with slightly different logic voltage levels even at the same power voltage, and it can be even more complex topic if we try to compare parts with different power voltage needs. Maybe I worry too much and (if 5300 is really 5V tolerant on inputs) EP and the module can be wired together without any logic level shifter or a more complex solution.

Quote
What do you think: make a adapterboard which can be used for connect the module to any standard EPROM socket?

:) Maybe (especially for developing the stuff, it's a good idea), but we need a WR line as well, which is traditionally does not connected to a socket designed to accept ROM chips too much ... Also where would you connect that adaptor then? Plugging into the BASIC cartridge is OK, but what if someone has an SD-card cartridge already and he wants to use that too? I guess it would be nice (but quite unrealistic ...) to have an SD-card cartridge version with a socket to be able to accept another component like the adaptor board for the 830MJ module or such. Again it would require a re-design the SD card cartridge to have that 1K free of memory space used by the module. That's why I think it's a bit unrealistic and some other solution would be needed anyway ...

Also which EP segment should be used ...

Currently, I am planning to hook up the 830 module with Raspberry Pi's GPIO connectors (also 3.3V) so I can "play" with it, and learn how it can be programmed before try to do that on the EP/Z80 ...

Offline lgb

  • EP addict
  • *
  • Posts: 3496
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://lgb.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #3 on: 2015.March.24. 11:53:17 »
Another (now software) idea: an EXOS device can be easily implemented for HTTP as http URLS begins with HTTP: anyway. Using the wiznet chips the bulk of the work is done by the chip itself, so the driver would be quite trivial, but then, simple EXOS function can be used to access the web, sounds cool in my opinion :)

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13374
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #4 on: 2015.March.24. 11:56:34 »
I think the FTP: will more useful as EXOS device :-)

Offline Prodatron

  • EP fan
  • *
  • Posts: 249
  • Country: de
  • Back on the Z80
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://www.symbos.de
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #5 on: 2015.March.24. 11:59:06 »
lgb hold on to your wiz830mj I have just started working on an Enterprise network interface using one of these. I'm not sure of all the differences between the 5100 and 5300 but I think they are basically the same but with more RAM on the 5300. The 5100 should do the job fine for the Z80 but as they are the same price might as well use the better part which is also more readily available (here in the uk anyway). Don't hold your breath though, it will not be instant and I've only just seriously started looking into it. :)
Wow, that sounds very interesting! Bruce, what are your thoughts about the interface? Direct or indirect addressing?

Offline lgb

  • EP addict
  • *
  • Posts: 3496
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://lgb.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #6 on: 2015.March.24. 12:13:52 »
I think the FTP: will more useful as EXOS device :-)

:) Maybe, but you can place downloadable EP programs with both of HTTP and FTP accessible  anyway :) I am not sure of wiznet supports for FTP "by hardware", FTP is a quite old and brain-dead protocol (I know because of being administrator of firewalls) which opens new data connection and there is active/passive version, 7/8 bit transfer, etc, For example traditionally "listing" the content of a directory on an FTP server means remote executing the 'ls' program on the server and grabbing the output (the format is even not so standard ...) though modern FTP servers work differently because of security and performance reasons as well. I always try to avoid using FTP if possible. HTTP also allows to "download" files (not just web pages) so I prefer HTTP everywhere. But if wiznet chips supports FTP as well, why not, of course.
« Last Edit: 2015.March.24. 12:19:24 by lgb »

Offline Prodatron

  • EP fan
  • *
  • Posts: 249
  • Country: de
  • Back on the Z80
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://www.symbos.de
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #7 on: 2015.March.24. 12:28:55 »
The other thing: accessing the "registers" can be done in two ways: indirect access only needs some ports, basically some allocated I/O ports would be OK. The direct access is different it needs 10 bit addressing information (if I remember correctly now). We can say, that indirect access is OK too, and it's more simple, but at the other hand it can be slower, as accessing a register needs extra work first (specifying the register number or so).

At least with the W5100 you have 4 ports, if you are using the indirect access mode:
- Port 1: accessing the MODE register directly; this is needed, as only with this register you activate the indirect access mode
- Port 2,3: set address (high, low); here you select the address (0-32767 for the W5100)
- Port 4: data read/write; after setting the address you can read or write to the W5100 by using this port; addresses are incremented automatically, so when reading a sequence of bytes you only need to set the address once

The W5300 seems to be a little bit different here due to its larger ram, but I guess in principle it's still something like this.
Anyway, if it's easier to develop the hardware for the EP by using indirect access mode (so only 4 ports are needed), I would go for it! On the CPC it will be implemented in this way, too (and I already did the routines for this way of interface :D ). The reason is, that it doesn't matter so much, if you loose a little bit CPU time when you access the registers in the indirect way. The code for the CPC indirect access interface is even smaller than the code for the MSX memory mapped interface, as here you have to take care about where your own code and your own data buffers are located and all these slot switching stuff.
The important thing is the data transfer. In indirect mode you use INIR/OTIR instead of LDIR (or the unrolled variant). This is only a little bit slower but in my opinion still fine - we are still speaking about loading some hundret KB of internet data to our Z80 system in seconds :D
At the end its the decission of the hardware developer, and I am no expert here at all. But I am already prepared for both solutions :P

Offline Prodatron

  • EP fan
  • *
  • Posts: 249
  • Country: de
  • Back on the Z80
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://www.symbos.de
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #8 on: 2015.March.24. 12:48:38 »
:) Maybe, but you can place downloadable EP programs with both of HTTP and FTP accessible  anyway :) I am not sure of wiznet supports for FTP "by hardware", FTP is a quite old and brain-dead protocol (I know because of being administrator of firewalls) which opens new data connection and there is active/passive version, 7/8 bit transfer, etc, For example traditionally "listing" the content of a directory on an FTP server means remote executing the 'ls' program on the server and grabbing the output (the format is even not so standard ...) though modern FTP servers work differently because of security and performance reasons as well. I always try to avoid using FTP if possible. HTTP also allows to "download" files (not just web pages) so I prefer HTTP everywhere. But if wiznet chips supports FTP as well, why not, of course.
Oh, I didn't know that FTP is sooo bad. Dr.Zed coded the SymFTP client in 2007 and it seemed to work fine, but maybe not for all servers. Soon I should be able to resurrect it again :)
The Wiznet doesn't include any implementations for the application layer. So you have to implement FTP, HTTP etc. (using TCP) but also DNS and DHCP (using UDP) by yourself.

Offline lgb

  • EP addict
  • *
  • Posts: 3496
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://lgb.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #9 on: 2015.March.24. 12:52:32 »
Oh, I didn't know that FTP is sooo bad. Dr.Zed coded the SymFTP client in 2007 and it seemed to work fine, but maybe not for all servers. Soon I should be able to resurrect it again :)
The Wiznet doesn't include any implementations for the application layer. So you have to implement FTP, HTTP etc. (using TCP) but also DNS and DHCP (using UDP) by yourself.

FTP is stone aged, and "bad" indeed, however it's still widespread especially if you need to upload, manage directory structures etc too. Not because it's not supported by some HTTP stuff as well, the (Web)DAV is invented to do similar things, however DAV is not so much known by many people and mainly used inside software for specific problems, like repository control (SVN  - Subversion for example).

Offline lgb

  • EP addict
  • *
  • Posts: 3496
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://lgb.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #10 on: 2015.March.24. 12:55:24 »
At the end its the decission of the hardware developer, and I am no expert here at all. But I am already prepared for both solutions :P

Wow, you are faster than my thoughts :) I was just about to ask you what MSX uses, direct or indirect with that DenYoNet. I tried to find information about DenYoNet (schematics, detailed description, programming etc) but not so much success yet, can you help in that? I guess it would help a lot to see how MSX guys solved the problems (or even cared at all ...) I talked about like logic level shifting. Anyway, maybe you're right and indirect access is more simple with using some I/O ports only, and nothing more ...

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13374
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #11 on: 2015.March.24. 13:00:52 »
I think not needed to support all ftp servers in the world. Just enought ftp.enterpriseforever.com or ftp.ep128.hu or something similar where will upload all Enterprise programs. :-) And developers can easy add the new programs.

Offline lgb

  • EP addict
  • *
  • Posts: 3496
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://lgb.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #12 on: 2015.March.24. 13:16:21 »
I think not needed to support all ftp servers in the world. Just enought ftp.enterpriseforever.com or ftp.ep128.hu or something similar where will upload all Enterprise programs. :-) And developers can easy add the new programs.

Ok, but then you can use http as well from Enteprise to download softwares (well, download, but if it's an exos device, you can even directly load, using the URL of course). It's a totally different topic, that the same file space on the server can be accessed via FTP too (for both of download and upload via ftp). In fact,most bigger ftp sites makes it possible to access the file space via http and ftp too (I have no idea about the mentioned ep related sites though). I guess w5300 (and 5100) does not support http neither ftp directly but plain tcp connections, implementing http over it is trivial, ftp is not so much. But enough is enough, let's end my war against ftp, not so much interesting anyway :)

In fact, it's even possible to put an EP program online which can be loaded directly to EP, and it allows you to browse some popular EP software sites directly with fetched information from the Net! So other than directory listing there can be some screenshots (suitable for EP to show easily) etc, it would be kinda cool, like an "AppStore" for mobile devices but for the Enterprise! :) I guess something similar can be done for SymbOS as well, and it's true there too: probably it's not even needed to "download and install" software, if files can opened directly "from the Net", so basically it's "run from the network instead of a local storage device" situation ...

It's again another idea is to implement an EXDOS drive through the network, so a disk image can be "mounted" remotely, read-only access at least would be a good start point. Well, it's about the current technology now, when virtualization hypervisors can use disk images remotely, EP would seem to be a quite decent platform :)
« Last Edit: 2015.March.24. 13:27:33 by lgb »

Offline BruceTanner

  • EP user
  • *
  • Posts: 484
  • Country: gb
  • OS:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Chrome 41.0.2272.101 Chrome 41.0.2272.101
    • View Profile
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #13 on: 2015.March.24. 13:29:12 »
One of my priorities is to keep it simple, otherwise I will be in danger of "biting off more than I can chew", or more than I have time for. To this end I thought the indirect I/O mode would be better/simpler. I hoped OTIR etc would work and I am pleased to here confirmation that it does!

Physically I hope to develop a vertical-mounting board with edge connector fingers at the bottom but also a edge connector socket on the left side just above the fingers. This way it could either plug into an expansion motherboard or directly into the side of the Enterprise. Then I was hoping to be able to solder a long thin board with just fingers on so a disk unit (or anything else!) could then plug into the back of the network board.  But I am waiting for the bits to try this for dimensions so it might not work. There would be links/jumpers/switches to either use SA0-SA2 from the expansion board or to set the ROM and I/O address if it was being used directly. I like the idea of it's own RAM so I thought 12k ROM (well, FLASH) and 4k RAM.

Software wise I was thinking FTP initially again for simplicity but HTTP is a good idea I hadn't thought of. Another possibility is the old SMB protocol that was around at the time (or soon after) which would allow interoperability with Windows PCs (I'm not sure about Linux etc.) This has some appeal to me personally because I did a lot of work using that protocol in '87 onwards when I wrote a replacement for IBM's NET program for the IBM PC. Again for simplicity I was hoping the EXOS side of things could work synchronously without interrupts (I'm not sure what the effect of adding a new interrupt source would be on an EXOS system but difficult-to-find random crashes or other problems seem quite likely!) I will leave the possibility of interrupts though because SymbOS etc will need it, but they are in control of their own environment in that case.

Further down the line some integration with EXDOS would be nice eg. being able to map a drive letter to a network resource and DIR, COPY etc.

Offline lgb

  • EP addict
  • *
  • Posts: 3496
  • Country: hu
  • æðsta yfirmaður
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://lgb.hu/
Re: Wiznet 5100/5300 /etc and Enterprise
« Reply #14 on: 2015.March.24. 13:50:10 »
Quote
Further down the line some integration with EXDOS would be nice eg. being able to map a drive letter to a network resource and DIR, COPY etc.

It would be interesting. Much I know about EXDOS is from Zozo, to be honest :) We have the SD card solution or even HDD interface, but both of these are allowed because of the modularity of the EXDOS, only a small, basically block I/O level collection of routines should be written for the specific hardware, and you're done (well, almost). But the key here, that basically EXDOS still expects the FAT12 filesystem (this is also a problem for bigger storage solutions - like SD card - where FAT16 would be nice). It would be nice to find an easy way to also "replace" (in a way that it's still usable of course for a given drives!) that, thus other filesystems can be implemented as well easily. I am not sure I could express my problem. I also thought (with my web based emulator JSep) to support a filesystem over HTTP but with actual files on the server, and not disk images. The problem was the same: I don't know at least an easy way to "hijack" EXDOS in a way to eg "force" EXDOS/FISH etc calls to use other fileystem implementation than FAT12 to be used, at least not with lots of work, I don't know too much about :( The final solution (which is not finished in JSep still) is to implemented "N" commands (N is for Network), like "NDIR" instead of "DIR" etc, and using EXOS device driver to implement the be able to read/write the given file at least. But it's kind of "hack" in its taste ...

Well, I try to express myself of a more easy way: how would you implement eg SMB on the EP, so regular EXDOS commands, and calls work? Or did you mean using an EP disk image just accessible via SMB and not individual files and directory structures on the SMB server?

Other stuff: there are even more simple ways to implement some kind of "network file system" especially if block level I/O is OK, and EXDOS would interpret a FAT12 then: like TFTP protocol using only UDP datagrams, quite simple and easy to implement, but it's more about accessing blocks for real than files, for the latter SMB or similar would be more useful, or even like "fuse" (file in user space) stuffs (used by Linux systems) eg to "mount" an FTP (hehe, the one I would hate) server as a local file system, something similar solution.