Page 1 of 1
Detecting Minerva.
Posted: Wed Dec 10, 2014 1:37 pm
by prime
Is this a reasonable way to detect a Minerva equipped QL ?
Code: Select all
OutQDOSVer:
moveq.l #MT_INF,d0 ; Get sysinfo
trap #1
sub.l #6,a7 ; Make room on stack
move.l d2,2(a7) ; save ascii os ver
move.w #4,(a7)
and.l #$FF00FFFF,d2 ; Mask out 3rd character as this may not be
; '.' in international versions
or.l #$00200000,d2 ; mask in space
cmp.l #'1 80',d2 ; is it Minerva ?
blo.s NotMinerva ; nope : skip
; If we get here, this is Minerva, so print an 'M' to indicate
move.b #'M',d1 ; Print an m
bsr OutD1Ch0 ; output it
NotMinerva:
move.l a7,a1 ; point to string
bsr.s OutStringCh0 ; output the string
add.l #6,a7 ; restore stack
rts
Basically call MT_INF, mask out bits 16 to 23, as the third character will contain a '.' for UK roms, but may contain a different letter in international versions. Then compare with 1.80, if greater assume that it is minerva?
Cheers.
Phill.
Re: Detecting Minerva.
Posted: Wed Dec 10, 2014 3:00 pm
by tofro
prime wrote:Is this a reasonable way to detect a Minerva equipped QL ?
Code: Select all
OutQDOSVer:
moveq.l #MT_INF,d0 ; Get sysinfo
trap #1
sub.l #6,a7 ; Make room on stack
move.l d2,2(a7) ; save ascii os ver
move.w #4,(a7)
and.l #$FF00FFFF,d2 ; Mask out 3rd character as this may not be
; '.' in international versions
or.l #$00200000,d2 ; mask in space
cmp.l #'1 80',d2 ; is it Minerva ?
blo.s NotMinerva ; nope : skip
; If we get here, this is Minerva, so print an 'M' to indicate
move.b #'M',d1 ; Print an m
bsr OutD1Ch0 ; output it
NotMinerva:
move.l a7,a1 ; point to string
bsr.s OutStringCh0 ; output the string
add.l #6,a7 ; restore stack
rts
Basically call MT_INF, mask out bits 16 to 23, as the third character will contain a '.' for UK roms, but may contain a different letter in international versions. Then compare with 1.80, if greater assume that it is minerva?
Cheers.
Phill.
Phill,
that is OK if you limit yourself to QDOS-OSs, but putting SMSQ/E into the picture, things would be messed up. (SMSQ/E would identify as Minerva, because it also has version numbers >1.13).
Tobias
Re: Detecting Minerva.
Posted: Thu Dec 11, 2014 11:58 pm
by pjw
Minerva uniquely returns "JSL1" for VER$ (please shout if you know otherwise!). So this string must exist somewhere. However, I dont think the location is documented nor is there a "legal" way to access it. A pity. In SMSQ/E the location of the system identifier is sensibly located at sys_vars offset 0. Sadly Minerva and QDOS both sport the same identifier, $d2540000, at that address.
Per
Re: Detecting Minerva.
Posted: Fri Dec 12, 2014 12:04 am
by tofro
What you can always do is check for QDOS version >1.80, like you do, then call a known SMSQ/E only trap (like, for example TRAP#1, D0=$2f, D1=-1 - This should retrieve the processor cache enable state) and see if that comes back with an error. If yes, you've got Minerva.
Tobias
Re: Detecting Minerva.
Posted: Fri Dec 12, 2014 2:57 am
by pjw
Or try something like
Code: Select all
sysid.ql equ $d2540000
..
cmp.l #'1 80',d2 ; is it Minerva ?
blo.s NotMinerva ; nope : skip
cmp.l #sysid.ql,(a0) a0 -> sys vars: sys_idnt
bne.s NotMinerva
..
Per
Re: Detecting Minerva.
Posted: Fri Dec 12, 2014 10:55 am
by RWAP
I thought Minerva returned a QDOS code of between 1.60 and 1.99.
I thought SMSQ/e started at 2.00
What versions of SMSQ/e show anything less than 2.00 ?
Re: Detecting Minerva.
Posted: Fri Dec 12, 2014 11:15 am
by pjw
Phill, I only looked at a small part of your code when I replied yesterday. Looking at the whole, I cant just leave it there. You will probably have figured it out yourself, but just for the record Ill spell it out in full. I also made a suggestion to shave off a few bytes. I hope it works, as I havent tested..
Code: Select all
sysid.ql equ $d2540000 or
* include dev8_keys_sys
..
OutQDOSVer:
moveq.l #MT_INF,d0 ; Get sysinfo
trap #1
sub.l #6,a7 ; Make room on stack
move.l d2,2(a7) ; save ascii os ver
move.w #4,(a7)
cmp.l #sysid.ql,(a0) a0 -> sys vars: sys_idnt
bne.s NotMinerva
; We've got either QDOS or Minerva. Massage version string
swap d2 V?vv -> vvV?
move.b #' ',d2 vvVs
swap d2 Vsvv
cmp.l #'1 80',d2 ; is it Minerva ?
blo.s NotMinerva ; nope : skip
; If we get here, this is Minerva, so print an 'M' to indicate
move.b #'M',d1 ; Print an m
bsr OutD1Ch0 ; output it
NotMinerva:
..
Per
Re: Detecting Minerva.
Posted: Fri Dec 12, 2014 11:58 am
by pjw
Rich, I guess youre right about version numbers. If that is set in stone the test could of course be simplified again. However, it might be worth considering how future updates to Minerva and possibly also QDOS (Classic) would be affected. We're at the cusp of a Minerva V2.xx
Perhaps a next version of Minerva could incorporate a unique identifier at sys_idnt? Or is that likely to break a lot of existing software?
Laurence Reeves, author of Minerva, might have a suggestion for a simple sure-fire test. Is anyone in touch with him? Or any other ideas?
Per
Re: Detecting Minerva.
Posted: Fri Dec 12, 2014 7:07 pm
by Dave
He's on my Skype. I'll ask him
