I found another commercial pak image, something to do with BT's Kilostream broadband service, but the gent who has/had the unit in question pulled the chips from the paks and dumped them via EPROM programmer, so they're in raw hex format that Jaap's OPK editor won't read.
What to do?
How to translate a raw EPROM dump to an OPK?
-
- Posts: 212
- Joined: Tue Jan 03, 2023 7:54 pm
Re: How to translate a raw EPROM dump to an OPK?
Hi,
A datapack is just an EPROM (or flash or RAM) chip in a box. The data in the IC isn't necessarily (for PCB layout reasons) an exact image of the data the Psion sees as it may have data or address lines 'jumbled'.
An OPK file is a file containing the datapack 'logical' image (data in the order the Psion sees it) with a 6 byte header.
The datapack tool can read datapacks, but it reads them through the same interface that the Psion itself does, so there's no jumbling of data.
This is the code that writes a datapack image to the onboard SD card as an OPK file:
https://github.com/blackjetrock/psion-o ... ol.c#L2950
You can see that the 6 bytes are 'OPK' followed by a 3 byte length of the data, Jaap describes it here:
https://www.jaapsch.net/psion/fileform.htm#opkfile
The datapack tool uses 0,0,0 for the length as it uses the file size for the length when reading OPK files, but it could be altered to add the data length in a second pass when it creates the file.
The big problem is the jumbling which has to be taken account of if you are reading the EPROM in a device reader. You need to determine the jumbling, for example from a schematic, and then unjumble it before writing the data to the OPK file. This can be done with a small program.
Hope that helps.
Andrew
A datapack is just an EPROM (or flash or RAM) chip in a box. The data in the IC isn't necessarily (for PCB layout reasons) an exact image of the data the Psion sees as it may have data or address lines 'jumbled'.
An OPK file is a file containing the datapack 'logical' image (data in the order the Psion sees it) with a 6 byte header.
The datapack tool can read datapacks, but it reads them through the same interface that the Psion itself does, so there's no jumbling of data.
This is the code that writes a datapack image to the onboard SD card as an OPK file:
https://github.com/blackjetrock/psion-o ... ol.c#L2950
You can see that the 6 bytes are 'OPK' followed by a 3 byte length of the data, Jaap describes it here:
https://www.jaapsch.net/psion/fileform.htm#opkfile
The datapack tool uses 0,0,0 for the length as it uses the file size for the length when reading OPK files, but it could be altered to add the data length in a second pass when it creates the file.
The big problem is the jumbling which has to be taken account of if you are reading the EPROM in a device reader. You need to determine the jumbling, for example from a schematic, and then unjumble it before writing the data to the OPK file. This can be done with a small program.
Hope that helps.
Andrew
-
- Posts: 59
- Joined: Sun Apr 23, 2023 5:14 am
-
- Posts: 212
- Joined: Tue Jan 03, 2023 7:54 pm