Minerva4Q68 SD Card Setup

The Thor, Aurora, Q40, Q60 & Q68 etc. are discussed here.
martyn_hill
Aurora
Posts: 933
Joined: Sat Oct 25, 2014 9:53 am

Re: Minerva4Q68 SD Card Setup

Post by martyn_hill »

Hi Dilwyn

Just to be sure - is this the same Q68 that required the down-grading of the SD-Card driver access speed in order to boot from the WIN image?

If so, I'm wondering if Minerva/Min4Q68 is getting itself in a tizz by not being able to correctly read the Boot image and, unlike SMSQe, which simply fails to mount the image and proceeds anyway, Minerva instead hangs...

The SD-card code in the bootloader itself runs at a slower speed at power-on, which is why the OS image (Min4Q68 or SMSQe) load OK - the QDOS/SMSQe SD-card driver loaded with the OS then kicks-in to read the Boot image, which is where you can expect problems if the card or the hardware for some reason can't support the higher (40MHz?) access-speed.

On both my Q68s, it has not been necessary to down-grade the SD-card access speed - EXCEPT - after extending one of SD-slots to to another SD-Card bracket via a 15cm cable (Q68 in a QL Case). Whilst that scenario is to be expected (due to the extra cable length), we wouldn't normally expect it when using the built-in SD-Card bracket in the Q68.

I'm not sure whether it is possible to configure Min4Q68 to reduce the default SD-Card access speed in the way it is for SMSQe, but it may be worth exploring this line of enquiry further.

It still doesn't explain why reducing the access-speed should be necessary at all on your ill-fated Q68 unit :-)

Fortunately, once resolved (and it will be, I'm sure!), you have yourself a brilliant bit of kit in the Q68 - in a future post I will be sharing some of the funky things I've managed to get the Q68 to do :-)


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

Re: Minerva4Q68 SD Card Setup

Post by janbredenbeek »

Hi Martyn,

The SD-card driver in Min4Q68 is a binary from Wolfgang Lenerz; I don't have the source of it but it's probably based on the QLSD driver (see https://dilwyn.qlforum.co.uk/qlsd/index.html). As this driver is dated 2017 it's not likely that it uses the 40MHz speed by default, and it isn't configurable anyway.

Besides that, Dilwyn has already tested booting without the SD-card driver and it didn't make a difference. I suspect it has something to do with the keyboard interrupt locking the machine up on newer (v1.05) releases, but for now he seems to be the only Q68 user having this problem...


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

Re: Minerva4Q68 SD Card Setup

Post by dilwyn »

janbredenbeek wrote: Mon Jun 26, 2023 9:30 am
dilwyn wrote: Sun Jun 25, 2023 11:40 am Same result, sorry (apart from the fact that the "QUB/WIN drivers" message isn't there at startup).
Gets to the TV or monitor windows, then no flashing cursor and can't type anything.
Hi Dilwyn,

What happens when you let the logo screen time out?

Does it enter monitor mode?
Do you get a cursor?
Is it possible to type a character?
Does it run the BOOT file?

Jan
After timeout, it goes to Monitor Mode windows. Or tries to (sometimes succeeds, sometimes doesn't).

9 times out of 10 that's it. Can't do anything else after it's got to Monitor windows. No keyboard. Never runs boot file in Minerva.

Randomly, it does not get as far as a cursor. I get monitor windows but frozen, no cursor (not even steady).

Very occasionally I get a flashing cursor (and I mean very rarely), I can type one or two characters maximum before it locks up.

I might add that, watching the red SD card 1 light as it powers up, I get one flash of read light as it loads Q68_ROM.SYS, but when it either responds to F1 or F2, or I let it time out to go to monitor mode windows, there is no LED activity and it never runs a BOOT program at all (tried with BP15.WIN and the other .WIN files Derek supplies just in case it's something in my boot file, and even tried a short boot program which is nothing other than REMs and a PRINT statement to announce its presence).


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

Re: Minerva4Q68 SD Card Setup

Post by dilwyn »

martyn_hill wrote: Mon Jun 26, 2023 10:23 am Hi Dilwyn

Just to be sure - is this the same Q68 that required the down-grading of the SD-Card driver access speed in order to boot from the WIN image?
Yes it is the same one, Martyn. v1.05 loader.

Derek did kindly offer to "downgrade" it to work around the problem, but I'd rather stick with this one and try to help Jan to solve the problem if possible. Anyway, I use the Q68 quite a lot now and I'd miss it even if it was only away for a few days.

SMSQ/E runs fine as long as configured to use slower SD card speed. In fact, once that is done, I have yet to experience a lockup or crash with Q68 SMSQ/E at all (apart from my own stupid coding errors occasionally, of course!).


martyn_hill
Aurora
Posts: 933
Joined: Sat Oct 25, 2014 9:53 am

Re: Minerva4Q68 SD Card Setup

Post by martyn_hill »

Hi Jan and Dilwyn
janbredenbeek wrote: Mon Jun 26, 2023 10:49 am The SD-card driver in Min4Q68 is a binary from Wolfgang Lenerz; I don't have the source of it but it's probably based on the QLSD driver (see https://dilwyn.qlforum.co.uk/qlsd/index.html). As this driver is dated 2017 it's not likely that it uses the 40MHz speed by default, and it isn't configurable anyway.

Besides that, Dilwyn has already tested booting without the SD-card driver and it didn't make a difference. I suspect it has something to do with the keyboard interrupt locking the machine up on newer (v1.05) releases, but for now he seems to be the only Q68 user having this problem...
Good point.

As far as I'm aware, Peter made very few changes in that bootloader/firmware build version - nominally some SDRAM timing adjustments and, of course, the native handling of the Ext Interrupt bit in the PC register (to better support the onboard Ethernet when running Minerva.)

I myself have the Lattice USB programmer needed to re-program the FPGA bootloader and have a few versions of the bootloader image to hand, so I will test v1.05 later this week, after switching back to the brilliant Minnie4Q68!


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

Re: Minerva4Q68 SD Card Setup

Post by janbredenbeek »

I just noticed that SMSQ/E loads a lot of low-level code (including interrupt code) into the Q68's fast RAM area. As this is about three times as fast as normal RAM, this might explain things.

I've also tried the mouse driver from this thread on Minerva but I can't get the mouse to work.
(it's probably untested code; as it stands it immediately causes a lock-up but even with this corrected the mouse remains unresponsive).

Looks like a have some more coding to do...


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

Re: Minerva4Q68 SD Card Setup

Post by janbredenbeek »

martyn_hill wrote: Mon Jun 26, 2023 11:39 am As far as I'm aware, Peter made very few changes in that bootloader/firmware build version - nominally some SDRAM timing adjustments and, of course, the native handling of the Ext Interrupt bit in the PC register (to better support the onboard Ethernet when running Minerva.)
I've changed the interrupt handler in the interim releases of Minerva posted here so it runs the external interrupt tasks regardless of the PC.INTR bit (if the frame interrupt bit is not set). This now exactly mimics the way SMSQ/E does, so it should work now even on older Q68s.

Another thing is the keyboard interrupt which seems to work only on the newer firmware. The keyboard driver now tests for this like SMSQ/E and uses external interrupt if supported, else it uses the polled task as before.


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

Re: Minerva4Q68 SD Card Setup

Post by Peter »

janbredenbeek wrote: Mon Jun 26, 2023 12:23 pm Another thing is the keyboard interrupt which seems to work only on the newer firmware.
That is correct. Interrupt was implented, because some USB-PS2 converters ignored PS2 handshake.
janbredenbeek wrote: Mon Jun 26, 2023 12:23 pm The keyboard driver now tests for this like SMSQ/E and uses external interrupt if supported, else it uses the polled task as before.
Good job as always! Thank you.


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

Re: Minerva4Q68 SD Card Setup

Post by Derek_Stewart »

Hi,

Is it possible to assemble the Minerva ROM file on the Q68?


Regards,

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

Re: Minerva4Q68 SD Card Setup

Post by janbredenbeek »

Derek_Stewart wrote: Tue Jul 18, 2023 9:52 pm Is it possible to assemble the Minerva ROM file on the Q68?
Probably, using QMake (I believe the original Minerva was also built with it). Marcel's Minerva repository also runs QMake from a make.bas program (see https://github.com/MarcelKilgus/Minerva).

I might switch to QMake too as the current build environment under Linux has some problems, including dependency on uqlx and Linux tools. The latter are used to assemble the Minerva ROM plus drivers (extrarom directory and SD card binary, which are required at startup). However this can be done from Minerva/SMSQ/E too using simple LBYTES/SBYTES statements to concatenate the binaries together.


Post Reply