Author Topic: variant lib-maple-v-r7.trid.xml for Maple V R7 Library *.lib  (Read 1028 times)

jenderek

  • Sr. Member
  • ****
  • Posts: 375
variant lib-maple-v-r7.trid.xml for Maple V R7 Library *.lib
« on: August 01, 2021, 11:35:32 PM »
Hello trid users,

some days ago i inspected some Maple library examples with file name
extension lib.

So i run TrID command on such examples. The MAPLE files are described as
"Unknown!" or are misidentified as "Commodore 128 BASIC V7.0 program (graph
mode on)" by prg-c128-gfx.trid.xml ( See appended output/trid-v.txt).

For older libraries exist 2 definitions. By lib-maple-v-r4.trid.xml LIB
examples are described as "Maple V R4 Library" and by
lib-maple-v-r5.trid.xml examples are described as "Maple V R5 Library".
These are described inside front block section by XML construct like:
   <Bytes>004D5652340A</Bytes>
   <ASCII> . M V R 4</ASCII>
   <Pos>0</Pos>

   <Bytes>004D5652350A</Bytes>
   <ASCII> . M V R 5</ASCII>
   <Pos>0</Pos>

So i run tridscan on undetected MABLE libraries to generate new trid
definition. Here i get a similar pattern. That is expressed by XML construct
like:
   <Bytes>4D3752300A49</Bytes>
   <ASCII> M 7 R 0 . I</ASCII>
   <Pos>1024</Pos>
Here Pattern is found at other offset (1024) and obviously such libraries
are newer version 7. So i name the trid definition lib-maple-v-r7.trid.xml
and choose as file type description "Maple V R7 Library" in the same manner
as for older versions. This characteristic pattern also occur more times in
library followed by line feed separated strings with maximal length of 79.
That was expressed by pattern like:
   <Bytes>0A</Bytes>
   <Pos>1108</Pos>
and in global strings section by
   <String>M7R0</String>

Again i use Wikipedia page about Maple software as reference URL. That is
expressed by line like:
   <RefURL>https://en.wikipedia.org/wiki/Maple_(software)</RefURL>

Instead of generic mime type application/octet-stream i choose a user
defined one. That is expressed by line like:
   <Mime>application/x-maple-lib</Mime>

At offset 6 the null terminated library name (like ../Maplets/Tutors.lib
/Users/mark/math/Msh/Exterior/1.2/exterior.lib
C:\Maple12/Cliffordlib\maple.lib) is stored. That is expressed inside global
strings section by line like:
   <String>.LIB</String>

Afterwards apparently there exist some padding bytes filled with nil or
point (0x2E) values for possible longer names til about 263
offset. Apparently by lucky circumstances this was expressed by XML-
construct like:
   <Bytes>2E</Bytes>
   <Pos>47</Pos>
So i delete that construct.

At offset 281 some null terminated strings ( like Exterior Clifford
FunctionArithmetics) are stored. Before at offset 277 the number of strings
is stored as 4 byte integer. In my examples the number was 1, 20 and 40. So
the 3 upper bytes are nil. That was expressed by XML construct like:
   <Bytes>000000</Bytes>
   <Pos>278</Pos>
I assume that also higher number of such strings are possible. So i delete
that construct.

Furthermore by lucky circumstances the null terminators of these string
occur at the same positions. That was expressed by XML constructs like:
   <Pattern>
      <Bytes>00</Bytes>
      <Pos>366</Pos>
   </Pattern>
   <Pattern>
      <Bytes>00</Bytes>
      <Pos>428</Pos>
   </Pattern>
   <Pattern>
      <Bytes>00</Bytes>
      <Pos>608</Pos>
   </Pattern>
So i delete these three patterns.

Because definition is based on only 3 examples i get many patterns inside
global strings section. Obviously many pattern looks like garbage like:
      <String>G6$-FA</String>
      <String>G6$-FG</String>
      <String>VEG6%F</String>
      <String>~BEEN~</String>
      <String>$%%LI</String>
      <String>$%)IN</String>
      <String>%%%LI</String>
      <String>%)CON</String>
      <String>N-_F</String>
      <String>NDG%</String>
      <String>~RES</String>
      <String>~SUB</String>
      <String>~VER</String>
So i delete such lines or shorten these.

With the lib-maple-v-r7.trid.xml my Maple libraries (*.lib) are now described (see
appended output/trid-v-new.txt).

TrID definition, some examples and output are stored in archive lib.zip. I
hope that my XML file can be used in future version of triddefs.

With best wishes
Jörg Jenderek


Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2730
    • Mark0's Home Page
Re: variant lib-maple-v-r7.trid.xml for Maple V R7 Library *.lib
« Reply #1 on: August 02, 2021, 11:34:33 PM »
I found some similar *.lib files that starts with 0x01 M7R0 at offset zero, like the older versions ones.
Will need some more samples/info to see why is that.

Thanks!