Well, after months and months of head-scratching and testing, thanks to Marcel, I now have a version of Minerva v1.98 running with TK2 v2.23 and FULL networking!

Just 3 instructions amounting to 6 extra bytes have corrected the issue - for the record:

In "io\serio_asm", I added the following based on MK's "quick look" at the Minnie v1.98 source:

* v1.98b
move.l  d0,-(sp) Preserve serio key (d0), in case io_pend has been called as part of another serio call
moveq   #0,d0 test routine is the first element
        bsr.s   vectest         set up test routine address (io_pend)
* v1.98b
move.l  (sp)+,d0 Restore original caller's serio key in d0
        bra.s   callit          go do it

I looked again at the other serio vectored routines that themselves call io_pend and determined that it was wise to preserve /their/ serio key in d0 before resetting to 0 for io_pend, to avoid hammering their ability to locate the correct NET driver vector. This step may prove unnecessary, but harmless. Hence the move.l d0 to/from the stack, in addition to uncommenting the moveq #0,d0 that seems to have been causing the trouble with LBYTES all along.

I recompiled the adjusted Minnie source code, according to PJW's exceptionally clear instructions (thanks Per for the earlier disassembly, BTW...) and re-burnt Min v1.98b + TK2 v2.23 to EPROM and tested using my favourite screen image (the "JetPac" SCREEN$ from the Spectrum, suitably converted to QL display format.)

Both with and without TK2 active, Minnie v1.98b was able to successfully LBYTES the image from another QL across the QLNet.

I've got some more testing to perform before I know nothing else is hammered by this small change. Thereafter, I intend to document and make available (via Dilwyn's repository?) for anyone to use. That's a weekend job... I'll also update my original Forum posting at some point to close the loop.

Thanks again for everyone's patience and insights along the way.

As MK put it - back to '...more productive work' - aka, the QLNet to USB Bridge adapter (QLUB) - just another couple of weeks before I complete the SMSQ/E coding to talk to the uC...


On 27/02/2018 08:14, Martyn Hill wrote:

Do you know how long I have been staring at the serio/relio code - but failed to see that potential flaw?

I shall test by recompiling Minnie an report back here...

Thank you, Marcel, bl**dy genius!!!

Martyn Hill
Sent from my mobile - please excuse spelling errors...

On 26 Feb 2018 23:00, Marcel Kilgus via Ql-Users <> wrote:

Martyn Hill via Ql-Users wrote:
> Specifically, when receiving via LBYTES (and SBYTES at the remote end),
> Minerva 1.97+ on its own receives perfectly, but once the NET driver is
> effectively replaced with TK2 (upto v2.23), issuing LBYTES will
> completely hang the /receiving /QL - immediately and regardless of
> whether the sending end has even started.

I had a quick look and actually this was caused by Lau trying to save
2 bytes. When you look at io_serio_asm

* moveq #0,d0 test routine is the first element
bsr.s vectest set up test routine address
bra.s callit go do it

you see that the moveq is commented out because "d0 is 0 anyway!".
Well, except in the case when io_pend is called through headr1, in
this case D0 has some other value and the whole thing will crash.

I hope you can now resume more productive work :-)

Cheers, Marcel

QL-Users Mailing List

"There are 10 types of people in this world. Those who understand binary and those 
who don't."

QL-Users Mailing List

Reply via email to