QLUB Adapter - Initial Release...

Nagging hardware related question? Post here!
martyn_hill
Super Gold Card
Posts: 662
Joined: Sat Oct 25, 2014 9:53 am

QLUB Adapter - Initial Release...

Postby martyn_hill » Wed Dec 30, 2020 5:50 pm

Hi everyone!

I am pleased to announce an early release of the QLAN to USB Bridge 'QLUB' Adapter - as a belated Christmas present to anyone patiently following this project since my first announcement, way back when...

Whilst some way off being a finished product, with a couple of months of software development still required to integrate the existing code in to a fully-fledged TK2-compatible Network driver for an emulated QDOS/SMSQE environment, the combination of the fairly mature microcontroller firmware alongside the SBASIC program originally developed to test the adapter have evolved in to a quite usable cross-platform file-transfer solution.

And, in any case, its high time to expose the project to the scrutiny and feedback of anyone with sufficient interest to assemble the parts as documented in the attached 'DIY Constructors Manual' and try it for themselves.

By way of summary, the QLUB Adapter is a hybrid hardware and software solution to allow QDOS/SMSQE running in an emulator on a host PC (with an available USB port) to connect to the Sinclair Network available on any QL, several QL compatible machines as well as the ZX Spectrum (with Interface-1 fitted.) By linking your QL emulator and 'real' QL hardware in this way, it becomes a trivial matter to transfer files developed or downloaded within the relative comfort of an emulated environment back and forth with your retro hardware. File-transfer is just the more obvious use-case - network gaming and 'distributed computing' also become a practical - and interesting - proposition.

As well as the instructions for construction, I attach the latest .INO source code firmware developed in the Arduino IDE specifically for the Teensy ++2.0 development board, the SBASIC file-transfer application and - as a bonus - the first installment of a short series of articles I am writing, entitled "Networking the QL."

QLUB Initial Release.zip
(1.26 MiB) Downloaded 99 times


I shall update this thread again as I progress the project but in the meantime, welcome your feedback and wish you all a Happy New Year ahead :-)


User avatar
Chr$
Aurora
Posts: 815
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany

Re: QLUB Adapter - Initial Release...

Postby Chr$ » Wed Dec 30, 2020 6:35 pm

Wow, that's brilliant, I was hoping for a USB to QNET adapter device for some time. A great solution for getting files from a modern computer to a basic QL. I will explore how it's done when I get a moment.


Collector of QL related computers, accessories and software even though I don't really understand how they work.
Original QL's: many (plus quite a bit of other old stuff and 140+ original software titles)
Custom XT cased QL system with Gold Card, Qimi mouse, Hermes and MFM HDD
QXLII card installed in a PC
Q40 and Q68 also present

Ask me about near NOS re-felted good quality Microdrive Carts - many available.
User avatar
Peter
QL Wafer Drive
Posts: 1253
Joined: Sat Jan 22, 2011 8:47 am

Re: QLUB Adapter - Initial Release...

Postby Peter » Wed Dec 30, 2020 7:27 pm

Hi Martyn,

although I don't have enough time for non-68K microcontroller projects like Arduino myself, I find this idea excellent! Especially for the fact that it supports everything from lowest-end QLs up to QXL and Q68! I've read your documents with joy and can only wish this nice project a lot of success. My reluctance in writing documentation is one of the obstacles for a possible Qzero public release, so I'm always envious when I read something like this. ;)

If the QLUB adapter turns out to work at least under Qemulator - and I don't see why it should not - I would like to buy one if sold in a complete fashion!

By the way, do you have any plans to make the adapter collaborate with SMSQmulator, which has no direct support for serial ports? During the Q68 ethernet developments I came to mainly use SMSQmulator for emulation, because of it's reliable UDP support and platform independence. I could of course use the Q68 as a bridge, but as you emphasize open source for your project, the dependency on proprietary / closed-source emulators is a bit sad.

By the way, what is the reason for the 10K resistor?
Is there any difference between .ino file format and and C language?

Cheers, Peter


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

Re: QLUB Adapter - Initial Release...

Postby Derek_Stewart » Wed Dec 30, 2020 9:18 pm

Hi Martyn,

I have been very intrested in the QLUB project, excellent write up of the QLNET.

The Teensy++ 2.0 looks to supported till Augusr 2021, or there are Chinese copies on Ebay.

Maybe PRJC will do a discount for the Teensy++ 2.0 board.

I will buy an Teensy++ 2.0 board and see if a dedicted PCB with the network circuitry can be made, without the need for a breadboard.

I was very interested in the ZXNET to QLNET connections, as you say the ZX Interface rom is very hard to update, I have a ZX Interface 1 in pieces, the problem was the eprom replacement. I will maybe revisit this and gget it working again.


Regards,

Derek
User avatar
M68008
Over Heated PSU
Posts: 143
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: QLUB Adapter - Initial Release...

Postby M68008 » Wed Dec 30, 2020 9:28 pm

Wow, great descriptions about the project and QLAN in general! QLUB sounds very useful for unexpanded QLs... there are very few devices that can be used for PC-QL file exchange on those machines.

I remember using the QL network in the 80s to exchange files between my QL and a friend's Spectrum. It was fast and reliable. The only issue I had was receiving data on the QL with the INPUT command: I found that at least on my AH ROM the INPUT buffer was limited to a size of 128 bytes. This was solved by redefining INPUT to use a larger buffer.

I think I will give it a try and build the QLUB adapter. Thanks!


User avatar
mk79
Aurora
Posts: 903
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QLUB Adapter - Initial Release...

Postby mk79 » Wed Dec 30, 2020 9:53 pm

Peter wrote:but as you emphasize open source for your project, the dependency on proprietary / closed-source emulators is a bit sad.
Yes, and in the same vain we should strive to improve the MiSTer core to the point where we don't have to rely on the closed source Q68 for an SMSQ/E FPGA core in the future :D :D :D Sorry, couldn't resist.


User avatar
mk79
Aurora
Posts: 903
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QLUB Adapter - Initial Release...

Postby mk79 » Wed Dec 30, 2020 9:56 pm

Thanks Martyn, I'll certainly try to build one, might even have all parts laying around somewhere anyway :)


martyn_hill
Super Gold Card
Posts: 662
Joined: Sat Oct 25, 2014 9:53 am

Re: QLUB Adapter - Initial Release...

Postby martyn_hill » Wed Dec 30, 2020 10:23 pm

Hi folks - thanks for the encouraging words :-)

Peter wrote:By the way, what is the reason for the 10K resistor?

Hi Peter! - That was an early - and naive - decision when I wasn't yet familiar with the microcontroller and wasn't sure about the effect of any input impedance in to the IO pin. It just worked, so I didn't revisit the design, but of course given what I now understand about the controller, I see that the 10k resistor could simply be dropped altogether.
Peter wrote:Is there any difference between .ino file format and and C language?

Not sure, to be honest - it is the format used by the IDE, but as far as I'm aware, its pretty standard. I just write-up my code in my favourite editor and paste it in to the IDE...

Derek_Stewart wrote:Maybe PRJC will do a discount for the Teensy++ 2.0 board.

Hey Derek - I was wondering the same - I bought a couple directly from PJRC, before finding one of their UK distributors (HobbyTronics) who I've used since.
Derek_Stewart wrote:I will buy an Teensy++ 2.0 board and see if a dedicted PCB with the network circuitry can be made, without the need for a breadboard.

Sounds like a plan :-)

M68008 wrote:I remember using the QL network in the 80s to exchange files between my QL and a friend's Spectrum. It was fast and reliable.

Ciao Danielle - That's interesting to hear - apart from the Q68 running the ND-Q68 driver, I could never get consistently reliable reception from the Spectrum to any of my QLs, which lead to an in-depth investigation of the Shadow ROM and to pour-over signal traces until I discovered a ULA IO contention issue whilst sending from the Spectrum that occurs during the active video-display period, and only for certain bit-patterns (e.g. the response byte 0x01)

By switching the OUT (0xF7),A instruction used in the ROM for OUT (C),A and arranging for B=0 and C=0xF7, the issue disappeared and I could finally receive packets from the Spectrum 95% of the time. The original QL NET driver still needed a couple of adjustments to the timing constants to better accommodate the Spectrum's very slightly out of spec bit-timing (11.4us vs 11.2us) that would hit the odd packet, but now I get 100% reliable comms :-)

In my next article on QL Networking, I'll get around to documenting all my findings for anyone remotely interested...

mk79 wrote:Thanks Martyn, I'll certainly try to build one, might even have all parts laying around somewhere anyway

Can't wait to hear your results (but don't look too closely at my sloppy C code in the firmware - it was my first significant C program and attempt at near-real time programming!)

M.


martyn_hill
Super Gold Card
Posts: 662
Joined: Sat Oct 25, 2014 9:53 am

Re: QLUB Adapter - Initial Release...

Postby martyn_hill » Wed Dec 30, 2020 11:45 pm

Hi again Peter - I missed one of your earlier questions...

Peter wrote:By the way, do you have any plans to make the adapter collaborate with SMSQmulator, which has no direct support for serial ports?

My aim has always been to make the solution as universally applicable as feasible, so once I've gotten a working version in its final form (i.e. integrated in to the OS), I will certainly be open to extending the scope beyond my 'comfort zone' of QPC.

The principal design just needs a means of byte-serial communications with the world 'outside' the emulator in a near real-time manner using whatever QDOS driver is available within the emulation environment in question. It is a pity that Java - and thus SMSQmulator - make it difficult/impossible to attach to the host's COM Port (if I have understood the limitation correctly.) Perhaps Wolfgang has some thoughts on this topic? I'll drop him a line at some point.

Today, the adapter works via the Virtual COM Port over USB, and hence the SERial port from within QPC, but I already have ideas for how this could be extended to other physical connections. Wouldn't help in this (SMSQmulator) case, however...
Last edited by martyn_hill on Wed Dec 30, 2020 11:50 pm, edited 1 time in total.


User avatar
vanpeebles
Commissario Pebbli
Posts: 2574
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: QLUB Adapter - Initial Release...

Postby vanpeebles » Wed Dec 30, 2020 11:48 pm

I might be barking up the wrong tree, but could this be used to create some kind of standalone program server? For example, I’m equipping friends with some of my spare QLs, but they are running into the age old problem of needing expansions, storage solutions etc.



Who is online

Users browsing this forum: No registered users and 4 guests