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)
   Make a flash datapak bootable
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Make a flash datapak bootable  (Read 48 times)
Nikos_Athens
Member




   
Email

Posts: 15
Make a flash datapak bootable
« on: Nov 23rd, 2018, 12:00pm »
Quote Quote Modify Modify

Hello.
I use the following routine to make datapaks bootable and works perfect.
 
BOOT:
LOCAL I%,A%(2),item$(8),pos%
item$="TOPOF"
IF LEN(item$)>8
RAISE 202
ENDIF
POKEB $2187,LEN(item$)
I%=1
WHILE I%<=LEN(item$)
POKEB $2187+I%,ASC(MID$(item$,I%,1))
I%=I%+1
ENDWH
POKEW $2188+LEN(item$),0
A%(1)=$3F65
A%(2)=$3900
USR(ADDR(A%()),pos%)
item$="TOPO"
IF LEN(item$)>8
RAISE 202
ENDIF
POKEB $2187,LEN(item$)
I%=1
WHILE I%<=LEN(item$)
POKEB $2187+I%,ASC(MID$(item$,I%,1))
I%=I%+1
ENDWH
POKEW $2188+LEN(item$),0
A%(1)=$3F65
A%(2)=$3900
USR(ADDR(A%()),pos%)
 
I use the the same routine using the same prosedure to make a 256k flash datapak bootable.
I works and makes flash datapak bootable but it makes the flash datapak copy write protected too.
Can any one help?
jaap
Power Member




   
WWW

Posts: 55
Re: Make a flash datapak bootable
« Reply #1 on: Nov 24th, 2018, 9:45am »
Quote Quote Modify Modify

The program you list inserts TOPOF and TOPO into the main menu. That isn't really what makes a pack bootable, as simply putting that on a datapack does not mean it gets run.
 
What makes a pack bootable are its settings stored in the pack header, and the boot code that immediately follows that which is machine code that gets run. Psion provided a very useful boot code, BOOT.BIN, that when run will find the OPL procedure with the name BOOT and run that. That's where your program comes in.
 
 
Flashpacks are rather special. The Organiser does not have a built-in method of writing to them, because they use a different voltage and different signals to control the writing than datapaks or rampaks. They can read them however without any problems. This is why flashpaks are always write-protected, because writing to them like a datapak would damage the pack.
 
To write to a flashpak, the Organiser needs special software, the flashpak driver. Flashpaks are almost always bootable, and have the flashpack driver (FDRIVE19.BIN) as their boot code. So when you first boot a flashpak, the driver is loaded, and from then on the Organiser can not only read from the flashpak but write to it as well (the driver ignores the normal write-protect flag and uses a different one).
 
The above means that the flashpak will not do anything else during the boot - it already runs boot code that inserts the flash driver. Psion came up with a solution to allow you to do more during the boot, the multiboot flash driver (FDRIVM18.BIN). This driver will check if there is any other boot code installed after it on the pack, and load that.
 
So if you want a writable flashpak that runs your BOOT procedure automatically, then the pack must contain FDRIVM18.BIN, followed by BOOT.BIN, and then also contain the BOOT procedure.

Jaap Scherphuis
https://www.jaapsch.net/psion/
Nikos_Athens
Member




   
Email

Posts: 15
Re: Make a flash datapak bootable
« Reply #2 on: Nov 24th, 2018, 10:40am »
Quote Quote Modify Modify

Thank you very much Jaap.
Could you please tell me where can I find FDRIVM18.BIN .
jaap
Power Member




   
WWW

Posts: 55
Re: Make a flash datapak bootable
« Reply #3 on: Nov 24th, 2018, 2:38pm »
Quote Quote Modify Modify

It is included in the fdrive.zip file available from my Software by others page. It is slightly misleadingly filed in the Software for PC section. I have updated the description on the page to mention the multiboot driver.

Jaap Scherphuis
https://www.jaapsch.net/psion/
Nikos_Athens
Member




   
Email

Posts: 15
Re: Make a flash datapak bootable
« Reply #4 on: Nov 25th, 2018, 2:43pm »
Quote Quote Modify Modify

Hi again Jaap.
You have written above  
"The program you list inserts TOPOF and TOPO into the main menu."
Is there any way to insert more names like "TOPO" or "TOPOF" in main menu?
jaap
Power Member




   
WWW

Posts: 55
Re: Make a flash datapak bootable
« Reply #5 on: Nov 25th, 2018, 4:05pm »
Quote Quote Modify Modify

GYon Nov 25th, 2018, 2:43pm, Nikos_Athens wrote:
Hi again Jaap.
You have written above  
"The program you list inserts TOPOF and TOPO into the main menu."
Is there any way to insert more names like "TOPO" jor "TOPOF" in main menu?

 
Sure. I would first write a procedure for inserting an menu item, which is basically half of the procedure you listed. Something like this:
 
INSMENU:(item$,pos%)
LOCAL I%,A%(2)
IF LEN(item$)>8  
  RAISE 202  
ENDIF  
POKEB $2187,LEN(item$)  
I%=1  
WHILE I%<=LEN(item$)  
  POKEB $2187+I%,ASC(MID$(item$,I%,1))  
  I%=I%+1  
ENDWH  
POKEW $2188+LEN(item$),0  
A%(1)=$3F65  
A%(2)=$3900  
USR(ADDR(A%()),pos%)

 
Then in the boot procedure call this as many times as you want:
BOOT:
INSMENU:("TOPO",0)
INSMENU:("TOPOF",1)

 
The second parameter is the position in the main menu where it must be inserted, in the range 0 to 255. Anything larger than the length of the menu, such as 255, means it goes just before OFF.

Jaap Scherphuis
https://www.jaapsch.net/psion/
Nikos_Athens
Member




   
Email

Posts: 15
Re: Make a flash datapak bootable
« Reply #6 on: Nov 25th, 2018, 4:59pm »
Quote Quote Modify Modify

Thank you Jaap.
You really help me very much.
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