QBase and Minerva.

Anything QL Software or Programming Related.
daniel_baum
Bent Pin Expansion Port
Posts: 90
Joined: Sat Aug 26, 2017 11:58 am

QBase and Minerva.

Post by daniel_baum »

Hi all,

Playing with my newly acquired Mist FPGA computer, I have been reliving the 1980s with a very realistically reconstructed QL, running Minerva 1.98.

I managed to set it up with QL-SD storage, and I set up as much as I could of my development environment (640k really is not much memory...) and to run and compile QBase using Q-Liberator.

Using Qbase on Minerva, I have realised that it really doesn't run well. Any text-input function (mostly involving MWINDOW, MINPUT etc.) does not work, crashing with a variety of errors, such as "out of range", "buffer full", and also "invalid parameter". Minerva on Q-Emulator exhibits the same behaviour, but not always exactly the same error messages as the Mist.

All of this code works flawlessly on QPC2, running the latest SMSQ/E.

At this stage, QBase needs to be classified as SMSQ/E-only. I would like to fix this if possible, but I have very little idea where to look. For example, MCALL returns the same values on SMSQ/E and Minerva, but Minerva crashes when this value is passed to MWINDOW.

Has anyone ever encountered anything similar? I can of course provide more detailed error descriptions if necessary.

Tks,

D.


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: QBase and Minerva.

Post by pjw »

Without knowing any further details of your program, or how well you know your Q-Liberator, I would first try increasing the "stack" size and recompile. I say "stack" because I can remember the details - too long ago. So I _dont_ mean:

remark $$stak=nnn

but

remark $$chan=mmm

with whatever you have set chan to now (say 3), set to a much larger number (say 6), and if that solves the problem, reduce it incrementally til you find the sweet spot.


Per
dont be happy. worry
- ?
daniel_baum
Bent Pin Expansion Port
Posts: 90
Joined: Sat Aug 26, 2017 11:58 am

Re: QBase and Minerva.

Post by daniel_baum »

Hi Per,

Thanks for replying.

I completely forgot to mention before that the problem is not limited to the compiled program; it happens in the interpreter too.

I suspect some incompatibility between versions of the window manager and/or Easyptr and Minerva, or possibly some default that works in SMSQ/E but needs extra parameters in Minerva (maybe the "con_" definition?) but I am open to any other suggestions.

D.


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: QBase and Minerva.

Post by pjw »

daniel_baum wrote:I completely forgot to mention before that the problem is not limited to the compiled program; it happens in the interpreter too.
Well, that changes everything ;)

I find it horrible when there are incompatibilities between QL systems unless we are deliberately exploiting particular or enhanced capabilities, in which case incompatibilities are an acceptable consequence.
I suspect some incompatibility between versions of the window manager and/or Easyptr and Minerva, or possibly some default that works in SMSQ/E but needs extra parameters in Minerva (maybe the "con_" definition?) but I am open to any other suggestions.
Are there differences in versions, perhaps? In SMSQ/E v3.31 - the current version, ptr_gen is at v2.05 and wman is v2.07. You may be aware that these versions can be assembled from the current SMSQ/E sources and are supposed to work with Minerva too. The latest ptrmen is 4.10, I believe. The latest and best Minerva version is v1.98. Just in case you missed any of those. (And if Im wrong about any of this, I'll be really p*ed off if no one corrects me!)


Per
dont be happy. worry
- ?
User avatar
BSJR
Trump Card
Posts: 182
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: QBase and Minerva.

Post by BSJR »

daniel_baum wrote: Using Qbase on Minerva, I have realised that it really doesn't run well. Any text-input function (mostly involving MWINDOW, MINPUT etc.) does not work, crashing with a variety of errors, such as "out of range", "buffer full", and also "invalid parameter". Minerva on Q-Emulator exhibits the same behaviour, but not always exactly the same error messages as the Mist.
EasyPTR4 needs SMSQ/E 3.10+ to develop but should be able to run in QDOS once compiled, provided WMAN2 is used.
I'm not sure it will run interpreted, I have not had much success with that.

If you use a variable as channel reference the error may actually occur before the MWINDOW/MINPUT command.
An errorcode can be returned in the var and when not checked before calling MWINDOW, you get the "invalid parameter".

One particular MWINDOW problem I remember from making SuQcess QDOS compatible was in using it on a menu-item.
This does not work with EP4 in QDOS (reason unknown) but MWINDOW on an Info-window or Loose-item is OK.
For SuQcess 1.20 I had to make my own routine to set the window over the menu-item.

You should also consider conflicting keywords.
EP4's WSIZE is also present in OUTPTR_bin with a different syntax.
Also DBAS keywords REMOVE (DIY-M multi33_code), SET (DIY-U Set/Alter), FIND (iom2_byt) and SEARCH (TK3_, Array_bin) can cause problems.
To avoid these I use the FDB_xxx functions wherever possible.

Bob


daniel_baum
Bent Pin Expansion Port
Posts: 90
Joined: Sat Aug 26, 2017 11:58 am

Re: QBase and Minerva.

Post by daniel_baum »

BSJR wrote: One particular MWINDOW problem I remember from making SuQcess QDOS compatible was in using it on a menu-item.
This does not work with EP4 in QDOS (reason unknown) but MWINDOW on an Info-window or Loose-item is OK.
For SuQcess 1.20 I had to make my own routine to set the window over the menu-item.
Bob
Hi Bob,

That would seem to be the problem.

So to get the latest QBase to work I need to make some kind of workaround especially for older OS versions.

The other option is to decide that this version is SMSQ/E only, and release the previous version for the older OS versions. It has the full functionality of the newer version but is not written with EasyPtr. It is text based with some help from menu_rext. It is already available on Dilwyn's site, but I haven't looked at it since about 1997 so it would probably benefit from a bit of TLC.


D.


User avatar
BSJR
Trump Card
Posts: 182
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: QBase and Minerva.

Post by BSJR »

daniel_baum wrote: That would seem to be the problem.

So to get the latest QBase to work I need to make some kind of workaround especially for older OS versions.
This routine from SuQcess 1.20 may help. It's based on an example provided by the ever helpful Wolfgang Lenerz.
The ch% is the channel for the current menu.
The tx$ can be the text currently in the MAW array for this cell or have been read anew from the _dbs.
The flg% can be used to turn off editing if not set, or do something different.
Make sure there is some free room left in the window for editing, else MINPUT will not work.

Bob

Code: Select all

 DEF PROC MWNDO$ (ch%,tx$,flg%)
 REM >>>120 N: make awi wndo, if flg% edit tx$
 LOCal defn,pointer,xs%,ys%,xo%,yo%
  defn= MWDEF(#ch%) : REM >>> find menu address for this channel
  pointer= PEEK_L(defn)    : REM ### pointer to status area
  xs%= PEEK_W(pointer +56) : REM ### current item x size,
  ys%= PEEK_W(pointer +58) : REM ### .. y size
  xo%= PEEK_W(pointer +60) : REM ### .. x orig
  yo%= PEEK_W(pointer +62) : REM ### .. y orig
  WINDOW #ch%,xs%,ys%,xo%,yo%: OVER #ch%;0 : REM ### overlay wndo
  IF flg%= 1
   PAPER #ch%;4: INK #ch%;0  : REM >>> blk on grn for edit
   CLS #ch%: MINPUT #ch%,tx$ : REM >>> ! don't close
  END IF
 END DEF MWNDO$
 ::


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: QBase and Minerva.

Post by pjw »

BSJR wrote:This routine from SuQcess 1.20 may help. It's based on an example provided by the ever helpful Wolfgang Lenerz.
Hey Bob, nice workaround :) Is the window automatically restored to its original size and position after this call?


Per
dont be happy. worry
- ?
daniel_baum
Bent Pin Expansion Port
Posts: 90
Joined: Sat Aug 26, 2017 11:58 am

Re: QBase and Minerva.

Post by daniel_baum »

Thanks Bob :)

I'll give it a try.

D.


User avatar
BSJR
Trump Card
Posts: 182
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: QBase and Minerva.

Post by BSJR »

pjw wrote:
BSJR wrote:This routine from SuQcess 1.20 may help. It's based on an example provided by the ever helpful Wolfgang Lenerz.
Hey Bob, nice workaround :) Is the window automatically restored to its original size and position after this call?
Like the original MWINDOW there is no need to unset the window. The next DO or HIT in the MCALL loop will automatically reset the channel.

Bob


Post Reply