Breaking news: The QIMSI Interface

Nagging hardware related question? Post here!
User avatar
janbredenbeek
Super Gold Card
Posts: 664
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands
Contact:

Re: Breaking news: The QIMSI Interface

Post by janbredenbeek »

Hi Peter,
Peter wrote: Sun Oct 08, 2023 4:49 pm
afx wrote: Sun Oct 08, 2023 2:30 pm (Thinking about the possible use cases of QIMSI, a question: In the future, would it be possible to implement a new faster and more reliable serial port accessible from QDOS (via a SER3_ for example) using MiniQ68 and its 115200 buad serial port?)
That's almost exactly the plan. At first I even considered to give the QL direct access to the SER port. But for debugging, it is better to have it on the MiniQ68 side. Nevertheless, it is simple to write a little program for the MiniQ68 which just forwards the SER data to/from the QL-MiniQ68 FIFOs.

It takes a little more effort to write a SER driver for the QL side. I started doing that using the IO.SERIO trap, but my assembler skills are rusted and I'm not in the mood to finish it at the moment. Sooner or later I guess it will be done. This should allow decent SERNET connections to emulators on PC. Would probably call it SER4, so SER3 remains for Hermes.
I've written a small device driver for the QL side which reads and writes data from and to the QIMSI FIFO's. The device name is simply 'QIMSI'.

Right now there's no use case for it since there since there is nothing running on the mini-Q68 (I assume), but it might be useful to start with...

Jan
Attachments
qimsi_fifo.zip
(3.88 KiB) Downloaded 245 times


User avatar
Peter
Font of All Knowledge
Posts: 2394
Joined: Sat Jan 22, 2011 8:47 am

Re: Breaking news: The QIMSI Interface

Post by Peter »

janbredenbeek wrote: Fri Oct 13, 2023 10:44 am I've written a small device driver for the QL side which reads and writes data from and to the QIMSI FIFO's. The device name is simply 'QIMSI'.
Many thanks. I have run some primitive test programs on the MiniQ68 side and can confirm that your driver works in both directions. The bitorder is also correct.
janbredenbeek wrote: Fri Oct 13, 2023 10:44 am Right now there's no use case for it since there since there is nothing running on the mini-Q68 (I assume), but it might be useful to start with...
Such a use case could quickly evolve, as I plan to write a little MiniQ68 software which forwards the FIFO to its serial port. Using SERNET with 115200 Baud on the QL comes to my mind.
Last edited by Peter on Fri Oct 13, 2023 3:17 pm, edited 1 time in total.


User avatar
Pr0f
QL Wafer Drive
Posts: 1516
Joined: Thu Oct 12, 2017 9:54 am

Re: Breaking news: The QIMSI Interface

Post by Pr0f »

There is a useful little chip - mcp2221 which is a uart to USB interface - would be ideal to connect to the qimsi serial port and have some kind of offline serial debugging :-)


User avatar
Peter
Font of All Knowledge
Posts: 2394
Joined: Sat Jan 22, 2011 8:47 am

Re: Breaking news: The QIMSI Interface

Post by Peter »

Pr0f wrote: Fri Oct 13, 2023 3:10 pm There is a useful little chip - mcp2221 which is a uart to USB interface - would be ideal to connect to the qimsi serial port and have some kind of offline serial debugging :-)
What do you mean by "offline"?


User avatar
Pr0f
QL Wafer Drive
Posts: 1516
Joined: Thu Oct 12, 2017 9:54 am

Re: Breaking news: The QIMSI Interface

Post by Pr0f »

the danger of typing too quickly - off board - not offline


User avatar
janbredenbeek
Super Gold Card
Posts: 664
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands
Contact:

Re: Breaking news: The QIMSI Interface

Post by janbredenbeek »

Peter wrote: Fri Oct 13, 2023 3:04 pm Such a use case could quickly evolve, as I plan to write a little MiniQ68 software which forwards the FIFO to its serial port. Using SERNET with 115200 Baud on the QL comes to my mind.
Here is a slightly modified fifo driver which accepts anything starting with 'ser4' for those who want to test SERnet. Of course you need a suitable Q68-ROM.SYS file to run on the mini-Q68 side.

Note that this driver is still rudimentary; for instance it is possible to open more than one channel to the fifo device which can lead to confusing results ;)

It might also be useful to eventually devise some sort of message-based protocol for communication through the FIFOs if they are going to be used by more applications - I'm thinking of a faster math package or even a stripped-down Minerva with commandline-only access like uQLx in scripted mode...
Attachments
qimsi_ser4.zip
(1.91 KiB) Downloaded 235 times


martyn_hill
QL Wafer Drive
Posts: 1048
Joined: Sat Oct 25, 2014 9:53 am

Re: Breaking news: The QIMSI Interface

Post by martyn_hill »

Hi Jan!

I have been thinking along the same lines with regards to some form of arbitrated 'command/response' protocol to allow sharing of the FIFO resource.

I developed such a protocol for the QLUB adapter which allows multiple applications to share the 'Message Queue' system over, in that case, the virtual SERial USB port on the host PC.

Perhaps we can sync-up off-line to discuss?

Warm regards,
M.


User avatar
Peter
Font of All Knowledge
Posts: 2394
Joined: Sat Jan 22, 2011 8:47 am

Re: Breaking news: The QIMSI Interface

Post by Peter »

Pr0f wrote: Fri Oct 13, 2023 3:10 pm There is a useful little chip - mcp2221 which is a uart to USB interface - would be ideal to connect to the qimsi serial port and have some kind of offline serial debugging :-)
Indeed the QIMSI serial port was primarily meant for debugging the onboard "MiniQ68" coprocessor. This is the reason why I did not attach it to the QL side directly, although desires for a better QL serial port are also there.

As you can see in the manual, the QIMSI serial port allows to download and start code. This avoids SD card handling during development. Further debugging would be possible by integrating a serial GDB stub into the binary. Not sure this is worthwhile, as the MiniQ68 is a limited target platform.

MCP2221 - well there are numerous UART-USB conversion options. I might even integrate a USB serial device directly into the QIMSI FPGA someday, using what is now the microUSB conenctor for keyboard. (The 5V line can be cut by removing a solder dot on the PCB bottom for using the port as USB device, etc.) But time is limited and I'm fine with UART for now. Too much "feature creep" happened to QIMSI already, I spent way more time than I planned for a QL extension. One needs to make a cut somewhere, otherwise things never reach public release state. ;)


User avatar
dilwyn
Mr QL
Posts: 3032
Joined: Wed Dec 01, 2010 10:39 pm

Re: Breaking news: The QIMSI Interface

Post by dilwyn »

Peter wrote: Sat Oct 14, 2023 2:04 pm
Pr0f wrote: Fri Oct 13, 2023 3:10 pm There is a useful little chip - mcp2221 which is a uart to USB interface - would be ideal to connect to the qimsi serial port and have some kind of offline serial debugging :-)
Indeed the QIMSI serial port was primarily meant for debugging the onboard "MiniQ68" coprocessor. This is the reason why I did not attach it to the QL side directly, although desires for a better QL serial port are also there.

As you can see in the manual, the QIMSI serial port allows to download and start code. This avoids SD card handling during development. Further debugging would be possible by integrating a serial GDB stub into the binary. Not sure this is worthwhile, as the MiniQ68 is a limited target platform.
Although the MiniQ68 side of QIMSI is of little more than passing interest to me, I can well understand that the tinkerers among us would enjoy, err, tinkering with it.
If there's enough interest, I'd happily add a page to my website like the one I have about Q68, to hold manuals, documents, diagrams etc.


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

Re: Breaking news: The QIMSI Interface

Post by Derek_Stewart »

Hi,

It seems the QLSD Utilities on Marcel's web site, work with QIMSI, allowing the CARD_DIR$ command to lidt the SD Card FAT32 directory.

https://www.kilgus.net/soft/qlsd_utils101.zip


Regards,

Derek
Post Reply