Q68 QoE Ethernet Driver

Anything QL Software or Programming Related.
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: Q68 QoE Ethernet Driver

Post by Martin_Head »

mk79 wrote:
Martin_Head wrote:However if you change the Nx_ device name, then SMSQ/E would also need to be changed. As the 'N' device is hard coded into the operating system.
Is that because you implement the N and NSV device and use the existing FSERVE with that?
Yes, My IP Network driver uses the same device names and SuperBASIC keywords as the original QL Network driver. While it would not be too difficult to change them. If memory serves me correctly, in TK2 and SMSQ/E, I think in the wildcard routines. The operating system actually checks the start of the device/file name to see if starts with 'N', number 1-8, underscore. So if the 'Nx_' name is changed, then SMSQ/E would not recognize it as a network device, and treat it as a subdirectory instead.

It may be possible, But as I said, I have not given the idea of having both networks running at the same time a lot of thought


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Q68 QoE Ethernet Driver

Post by mk79 »

Martin_Head wrote:The operating system actually checks the start of the device/file name to see if starts with 'N', number 1-8, underscore. So if the 'Nx_' name is changed, then SMSQ/E would not recognize it as a network device, and treat it as a subdirectory instead.
Ah ok. Actually I’m not aware of any hardcored place. SerNET for example has been using the device S_ for a very long time. The check is usually of the type „if it starts with a letter followed by a number and an underscore“ and not specifically for N but I might be wrong on some occasions.

Cheers, Marcel


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: Q68 QoE Ethernet Driver

Post by Martin_Head »

mk79 wrote:
Martin_Head wrote:The operating system actually checks the start of the device/file name to see if starts with 'N', number 1-8, underscore. So if the 'Nx_' name is changed, then SMSQ/E would not recognize it as a network device, and treat it as a subdirectory instead.
Ah ok. Actually I’m not aware of any hardcored place. SerNET for example has been using the device S_ for a very long time. The check is usually of the type „if it starts with a letter followed by a number and an underscore“ and not specifically for N but I might be wrong on some occasions.

Cheers, Marcel
I'm working from memory, (so I might be wrong) when 'N8_' would not work because TK2/SMSQ only checked for 'N0_' to 'N7_' which was fixed I think in SMSQ/E v3.32


Derek_Stewart
Font of All Knowledge
Posts: 3901
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Q68 QoE Ethernet Driver

Post by Derek_Stewart »

Hi,

Why not use Ex_ for the ethernet device driver, which differentiate the Ethernet from the QLNET.
Last edited by Derek_Stewart on Fri Jul 21, 2023 4:11 pm, edited 1 time in total.


Regards,

Derek
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Q68 QoE Ethernet Driver

Post by mk79 »

Martin_Head wrote:I'm working from memory, (so I might be wrong) when 'N8_' would not work because TK2/SMSQ only checked for 'N0_' to 'N7_' which was fixed I think in SMSQ/E v3.32
Indeed, the check used to be for "Nx_" before Wolfgang's fix, but accepts any character besides 'N' since then, too.


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: Q68 QoE Ethernet Driver

Post by Martin_Head »

Derek_Stewart wrote:Hi,

Why not use Ex_ for the ethernet device driver, which differentiate tge Ethernet from the QLNET.
If anyone fancies having a try, The source code of the IP Network driver is on Dilwyn's web site. You would have to rename the four devices (although you might not have to rename the, I think it was NSV device. Also FSERVE, and NFS_USE. (There might be something else, can't quite remember)

You also would need to check if the driver still uses the network station number system variable. It used to, but I think I stopped using it.

The thing is, as soon as you get the two networks running side by side. Someone is going to say "can you get the two networks to talk to each other", so that devices on one network can access devices on the other.


User avatar
robheaton
Site Admin
Posts: 375
Joined: Fri Nov 19, 2010 5:50 pm
Location: Ormskirk, UK

Re: Q68 QoE Ethernet Driver

Post by robheaton »

This is excellent! - Fantastic work Martyn!

I'm going to try this out this afternoon :D


--
If vanpeebles parps in the woods and there is nobody around, does it make a sound?
User avatar
Peter
QL Wafer Drive
Posts: 1949
Joined: Sat Jan 22, 2011 8:47 am

Re: Q68 QoE Ethernet Driver

Post by Peter »

Martin_Head wrote:For most of the year I have been working on an Ethernet driver for the Q68. Its not finished, but I thought that I would release one of the development versions for people to try, and to get some user feedback on any problems seen.
Many thanks Martin for your enormous work! And again my apologies for giving it so little testing yet.
For all who are used to IP support from emulators, let me add that this is a much larger achievement!
The QL emulators contain neither ethernet nor IP drivers, they just map socket calls to the host OS, and the host OS contains the actual drivers.
In case of the Q68, Martin wrote all the driver code himself for the native 68K side - no Windoze nor Linux doing the job.
Martin_Head wrote:I have tried to make the driver as compatible as I can with the IP device driver as used in the main QL emulators.
This is where Martin's work differs from my own QLwIP driver, which I demonstrated to work on Q40/Q60 and Q68, but never released. I would have introduced a new interface, because writing large portions of code in assembler is not my strength, and the structure of the underlying C written stack does not map well to the QL emulator IP interface. I may still at some point release QLwIP in a simplified fashion, because it also contains applications like webserver, browser, email, etc. which are nice to demo. But those are two decades old and I do not believe people would actually work much with them, maybe except the webserver. Compatibility to the emulator interface is a point that speaks for Martin's driver and against QLwIP.
Martin_Head wrote:it supports the UDP protocol.
While UDP as a packet oriented protocol does not support email or webbrowsing, it is still very useful and probably even more adequate for relatively slow native machines. And UDP works over the internet - do not confuse this with the TCP restrictions Martin mentioned. For example, UDP allows the TFTP file transfer protocol, low latency data exchange for automation or games, and is in princple ideal to resemble the QL network (although for historic reasons Martin implemented that part over TCP, which is not required). It is also easy to communicate from SBASIC to SBASIC program, and even the UDP support in the C68 socket library should work.

An important remark: The choice of the CP2200 ethernet controller for the Q68 was not because it was the simplest solution for the relatively new and FPGA based Q68 hardware. I chose the CP2200, because it interfaces very easily to the original QL bus. Firstly, all signals are 5V tolerant. Secondly, it has a direct 8 bit data bus, requiring no serilization. Thirdly, it requires only address decoding, no further logic to interface directly with the QL bus.

Ethernet for the original QL has often been discussed here - now Martin's driver and the CP2200 is the chance for a tinkering project. The only change to make it work is probably the address space. However, keep in mind the QL is a very slow machine. I think that no less than a Gold Card system makes sense. If someone actually wants to design a CP2200 card for the QL, please feel free to ask me. Tetroid, this could also be interesting if you design new (S)GC clones! ;)


User avatar
QLvsJAGUAR
Gold Card
Posts: 455
Joined: Tue Feb 15, 2011 8:42 am
Location: Lucerne, Switzerland
Contact:

Re: Q68 QoE Ethernet Driver

Post by QLvsJAGUAR »

Great work & achievement Martin!

Even though I did not had my Q68 at hand when I've been completing work on QL/E v3.20 (see viewtopic.php?f=3&t=1674&start=20#p38429), I did include the driver and implemented it in the boot program...


QL forever!
https://www.sinclairql.net/ - Go and get THE DISTRIBUTION & QL/E!
https://www.youtube.com/QLvsJAGUAR/community - Blog
https://www.youtube.com/QLvsJAGUAR - Dedicated QL videos
Sinclair, QL, ATARI, JAGUAR, NUON, APPLE, NeXT, MiST & much more...
Videos, pictures & information
User avatar
QLvsJAGUAR
Gold Card
Posts: 455
Joined: Tue Feb 15, 2011 8:42 am
Location: Lucerne, Switzerland
Contact:

Re: Q68 QoE Ethernet Driver

Post by QLvsJAGUAR »

Image
Having QL/E configured correctly on both Q68 and PC side, a DIR n6_RAM1_ on the Q68 side listed the DIRectory of RAM1_ of the QL/E instance running on the PC. Awesome!


Gesendet von iPhone mit Tapatalk


QL forever!
https://www.sinclairql.net/ - Go and get THE DISTRIBUTION & QL/E!
https://www.youtube.com/QLvsJAGUAR/community - Blog
https://www.youtube.com/QLvsJAGUAR - Dedicated QL videos
Sinclair, QL, ATARI, JAGUAR, NUON, APPLE, NeXT, MiST & much more...
Videos, pictures & information
Post Reply