The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
   General
(Moderator: Mikesan)
   Comms Challenge!
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Comms Challenge!  (Read 723 times)
Mikesan
Administrator




   
WWW

Posts: 252
Comms Challenge!
« on: Feb 22nd, 2004, 1:46pm »
Quote Quote Modify Modify

I refute the claim that DV$BOOT will successfully boot in Comms if it hasn't been booted in prior to running OPL.  My XP & LZ64 used with Comms Link (4-line) works as shown here.  Does yours?  Please take the test!
 
You will need an Organiser II and a Comms Link.
 
To duplicate the test;
Transfer COMTESTA, CLREADY and REBOOT to your Organiser II and translate them.
Put COMTESTA on the main menu for ease of use (MODE, "INSERT ITEM"; type 'COMTESTA', EXE).
Plug in Comms Link to Organiser II (PC end does not matter).
Press CLEAR ON.
Run COMTESTA.  Says "TEST PASSED" then gives menu "AGAIN, QUIT".
While at AGAIN, remove Comms Link.  Press A, or EXE; says "Insert CommsLink" every few seconds.
Replace plug (no need to press a key); says "TEST PASSED", then gives menu "AGAIN, QUIT".
Press Q, or CLEAR/ON.  You should now be at the Organiser II toplevel menu.
Remove Comms Link.
-->>> Press CLEAR/ON.
DO NOT INSERT Commslink.
Run COMTESTA; says "Insert CommsLink".
Replace Comms Link.
<<<There will be no change!>>>
Press CLEAR/ON once; says "ESCAPED TEST", then gives menu "AGAIN, QUIT".
 
Below are the 3 procedures; copy and paste into Notepad files renamed to *.OPL
 
COMTESTA:
REM The contention is this; Mike Russell says;  
REM"The Comms Link cannot be successfully booted from within OPL,
REM if it had not been booted prior to running OPL."
REM Boris Cornet says; "There is no difference between using dv$boot and booting the
REM Comms Link from the Organiser II toplevel menu."
REM I (Mike Russell) have never managed to successfully use the Comms Link after
REM using dv$boot in the way that Boris (or Psion) says.
REM Simply; if you have no Comms Link plugged in the top slot, you press CLEAR/ON, then
REM you run this procedure, you will not make a successful LPRINT.
REM This shell procedure; Mike Russell, CLREADY% and REBOOT; Boris Cornet.
 
LOCAL TEST%
ESCAPE OFF
DO
  TEST%=CLREADY:  :REM Took % out of name to simplify Comms transfer of this proc from PC!
  IF TEST%<>0
    CLS :PRINT "TEST PASSED";CHR$(16)
    LPRINT "HELLO PRINTER!"
    PAUSE 10
  ELSE
    CLS :PRINT "ESCAPED TEST";CHR$(16)
    PAUSE 20
  ENDIF
UNTIL MENU("AGAIN,QUIT")<>1

CLready:
REM By Boris Cornet.
REM Made this proc FP, as integer requires CL translation = extra confusion 4 all.
onerr notready::
restart::
  rem place space in keybuffer in case of a 'press space'-error
  pokeb $73,0     :rem keybuffer offset
  pokeb $74,1     :rem keybuffer count
  pokeb $20b0,32
    xfeof:        :rem most harmless CL command
    rem alternative: set protocol to PSION
    rem   lset:(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2)
  onerr off
  key             :rem clear keybuffer
return -1         :rem TRUE
notready::
  print chr$(16); :rem beep
  onerr off
  REM comment next line while testing!!
  onerr retry::
retry::
  key             :rem clear keybuffer
  cls
  print "-    Insert    --  CommsLink!  -";
  REM ESCAPE must be OFF [Done at COMTESTA:]
  pause -100      :rem retry every 5 sec
  if key=1
    return 0      :rem FALSE
  endif
  reboot:         :rem call dv$boot
goto restart::

reboot:
rem boots any devices into memory
REM By Boris Cornet (& Psion).
LOCAL I%,CODE$(2)
I%=ADDR(CODE$)   : rem using size byte as well
POKEW I%,$3F23   : rem swi dv$boot
POKEB I%+2,$39   : rem rts
USR(I%,0)
[This is a bug, don't use! - Boris]
 
I'd really appreciate it if all of you with Comms Links could try this test and post to confirm this, because I remember this was what I did 15 years before (it's why UPAK offers to quit out of OPL for rebooting) and Psion wouldn't believe me!  Am I crazy!?  My programming point was that users won't really appreciate the difference between plugged in and booted in.  They would like to see a Plug'n'Play solution; put-the-plug-in-and-it-works.  I wanted to do that, but I don't think the Org2's O.S. can do it (certainly not with dv$boot).
 
If anyone can, please post the code that shows how!
« Last Edit: Feb 27th, 2004, 1:16am by Boris »
Boris
Administrator




   
WWW

Posts: 552
Re: Comms Challenge!
« Reply #1 on: Feb 26th, 2004, 10:13pm »
Quote Quote Modify Modify

It was my fault. The code I have sent to Mike was in fact a bug.  
I promise never to hand out untested code again  
 
ReBoot v2.0

reboot:
rem boot all devices
local mc%(3), tmp%, m%
m%=addr(tmp%) + 1
pokeb m%,$3f    :rem swi
pokeb m%+1,23   :rem dv$boot
pokeb m%+2,$39  :rem rts
usr(m%,0)
return
 

 
>> Mike: don't say you havn't been warned  
« Last Edit: Feb 27th, 2004, 1:23am by Boris »

Triholerahduliäöhh gugguh !! (tyrolean joy jodler)
Rough translation: There's a new build of Psi2Win!!
Email: boris[at]psion2[dot]org
Boris
Administrator




   
WWW

Posts: 552
Re: Comms Challenge!
« Reply #2 on: Feb 27th, 2004, 3:12am »
Quote Quote Modify Modify

How about that?
 

CLready:
 
rem Plug&Play solution for devices - beta test
 
rem Reqires Keyboard and ReBoot v2.0
rem ESCAPE must be OFF
 
  onerr notready::
reStart::
  Keyboard:(" ")
  xfeof:
  key
return -1
 
notready::
  onerr off
  Keyboard:(" ")
  ReBoot:
  onerr warn::
  goto restart::
warn::
  onerr off
  cls :print chr$(16);"Insert CommsLink"
  onerr retry::
retry::
  key
  print chr$(15);
  pause -40
  if key=1
    return 0
  endif
  print "retrying...";
  Keyboard:(" ")
  ReBoot:
  goto restart::
 


Keyboard:(string$)
 
rem Simulates keyboard entries
rem Keyboard:("") clears the keyboard buffer
 
  local len%,a%,c%
  len%=len(string$)
  if len%>16 :len%=16 :endif
  pokeb $73,0    :rem kbb_back
  pokeb $74,len% :rem kbb_nkys
  pokeb $76,0    :rem kbb_wait
  while len%>0   :rem kbt_buff
    pokeb $20b0+len%-1,asc(mid$(string$,len%,1))  
    len%=len%-1
  endwh
 

 
     
« Last Edit: Feb 27th, 2004, 3:16am by Boris »

Triholerahduliäöhh gugguh !! (tyrolean joy jodler)
Rough translation: There's a new build of Psi2Win!!
Email: boris[at]psion2[dot]org
Mikesan
Administrator




   
WWW

Posts: 252
Re: Comms Challenge!
« Reply #3 on: Feb 29th, 2004, 8:42pm »
Quote Quote Modify Modify

Well I glad to say REBOOT: v2 works!  Incidentally, all I did was change the reboot: procedure.  Those of us that aren't as au fait with machine code as the likes of Boris, Jaap and Zak may find it difficult, on occasion, to discern the finer meanings of the Organiser Technical Manual - I know I did!  The way I read it, I came up with the same code that Boris's first version of the Reboot procedure;  "Call the SWI, then return" (sic) - seemed simple enough...  I should have compared it to the way I had done other SWI calls
Without further ado, I have made the modification to UPAK, so that it boots Comms in, if it isn't already.  BTW, I think UPAK does all that it should, because I used it a lot at one time, but as always, I'd appreciate feedback.
I think this just goes to show what an incredible resource Boris has put together with this forum and the resurrection of the Organiser II homepage.  A question that had never been answered has now been, after 15 years!  Challenge conceded   dv$boot WILL boot devices back in!
Thanks once again Boris!
 
P.S. The updated UPAK (v1.1) is at User Posts.
« Last Edit: Feb 29th, 2004, 8:51pm by Mikesan »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB © 2000-2002,
Xnull. All Rights Reserved.
top