Mac OS binary (ABIF) file to MS Windows

Hello,
I have a problem with two file (In attach). These file contain the instruction for run an application platform for a lab machine. The fil without extension if of the application in MAC the file with .md5 extension is for the win software version. Now i need convert the win file to mac because the mac software is unable to red the win version (i prove to convert the file with different utility but without success!). More information about the file type on: Applied Biosystems | Thermo Fisher Scientific - US
Tank you for any help!
Vincenzo

It may be possible. I'll take a look at it when I get home.

---------- Post updated at 07:36 PM ---------- Previous update was at 04:58 PM ----------

Haven't solved it yet, but made some progress. The difference is not endian-ness, both files are using big-endian byte ordering.

Both data files here have one entry of data type #2024, which is not defined in the EBIF standard and hence I can only guess what it is. Since the element size is one byte and it doesn't look like a string I'm guessing a numerical array.

I devised a quick program to print headers from these files. First, the mac version:

$ ./a.out Seq\ Run\ 36E5-2400
file info from Seq Run 36E5-2400
header: read 128/128 bytes
magic:          ABIF
version:        0x650000
entry:
        name:           0x74646972 (tdir)
        number: 0x00000001
        elementtype:    0x03ff
        elementsize:    0x001c
        numelements:    0x00000001
        datasize:       0x00000380
        dataoffset:     0x00000080
        datahandle:     0x017ce200
size = 28 * 1 = 28
data:  read 28/28 bytes
entry 0:
        name:           0x46786e73 (Fxns)
        number: 0x00000001
        elementtype:    0x07e8
        elementsize:    0x0001
        numelements:    0x00000001
        datasize:       0x0000012c
        dataoffset:     0x00000400
        datahandle:     0x00000000
size = 1 * 1 = 1
data:  read 1/1 bytes
dumping 1 bytes to Seq Run 36E5-2400.0000

Now, the spec sheet you gave me says you're supposed to ignore the datasize and get the size from numelements * elementsize since some legacy programs may keep reserved bytes after the data. The mac program clearly does not obey this! Its first entry "says" it only has one byte of data, but surely can't mean that!

$ ./a.out Seq\ Run\ 36E5-2400.md5
file info from Seq Run 36E5-2400.md5
header: read 128/128 bytes
magic:          ABIF
version:        0x650000
entry:
        name:           0x74646972 (tdir)
        number: 0x00000001
        elementtype:    0x03ff
        elementsize:    0x001c
        numelements:    0x00000001
        datasize:       0x00000380
        dataoffset:     0x000001bb
        datahandle:     0x00000000
size = 28 * 1 = 28
data:  read 28/28 bytes
entry 0:
        name:           0x46584e53 (FXNS)
        number: 0x00000001
        elementtype:    0x07e8
        elementsize:    0x0001
        numelements:    0x0000013b
        datasize:       0x0000013b
        dataoffset:     0x00000080
        datahandle:     0x00000000
size = 1 * 315 = 315
data:  read 315/315 bytes
dumping 315 bytes to Seq Run 36E5-2400.md5.0000

The windows version uses the same element type, 0x7e8 aka 2024. Since this is >1024, it's a "user" type that only the program that made it has any idea what it means. But "name" agrees closely, and the stored data in both is nearly exactly the same:

 hexdump -C Seq\ Run\ 36E5-2400
00000000  41 42 49 46 00 65 74 64  69 72 00 00 00 01 03 ff  |ABIF.etdir......|
00000010  00 1c 00 00 00 01 00 00  03 80 00 00 00 80 01 7c  |...............||
00000020  e2 00 ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000080  46 78 6e 73 00 00 00 01  07 e8 00 01 00 00 00 01  |Fxns............|
00000090  00 00 01 2c 00 00 04 00  00 00 00 00 00 00 00 00  |...,............|
000000a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  00 52 00 00 00 00 1d 00  00 00 00 1d 00 00 00 00  |.R..............|
00000410  06 00 00 00 00 08 00 00  00 00 09 00 00 00 00 0a  |................|
00000420  01 90 00 00 64 00 00 00  00 1d 00 00 00 00 55 00  |....d.........U.|
00000430  33 00 00 1d 00 00 00 00  1d 00 00 00 00 1d 00 00  |3...............|
00000440  00 00 05 00 c8 00 00 04  02 58 00 00 03 0b b8 00  |.........X......|
00000450  00 1d 00 00 00 00 1d 00  00 00 00 1d 00 00 00 00  |................|
00000460  1f 00 0a 00 00 1e 00 a2  00 00 21 00 16 00 00 20  |..........!.... |
00000470  00 2b 00 00 23 00 16 00  00 22 00 21 00 00 25 00  |.+..#....".!..%.|
00000480  16 00 00 24 00 2b 00 00  27 00 16 00 00 26 00 32  |...$.+..'....&.2|
00000490  00 00 6f 00 12 00 00 6e  00 4b 00 00 1d 00 00 00  |..o....n.K......|
000004a0  00 4c 00 fa 00 00 4b 00  02 00 00 2a 00 01 00 00  |.L....K....*....|
000004b0  2b 00 06 00 00 2c 00 00  00 00 2d 00 40 00 00 1d  |+....,....-.@...|
000004c0  00 00 00 00 1d 00 00 00  00 1d 00 00 00 00 30 00  |..............0.|
000004d0  c2 00 00 5f 00 ce 00 00  5a 01 f4 00 00 5b 1d 4c  |..._....Z....[.L|
000004e0  00 00 60 04 1d 00 00 5c  06 40 00 00 5d 00 3c 00  |..`....\.@..].<.|
000004f0  00 5e 00 10 00 00 1d 00  00 00 00 1d 00 00 00 00  |.^..............|
00000500  1d 00 00 00 00 1d 00 00  00 00 1d 00 00 00 00 50  |...............P|
00000510  00 d2 00 00 51 00 00 00  00 1d 00 00 00 00 1d 00  |....Q...........|
00000520  00 00 00 1d 00 00 00 00  1d 00 00 00 00 00 00 01  |................|
00000530  00 00 00 00 00 00 82 ff  46 00 07 00 00 00 00 00  |........F.......|
00000540  00 00 00 00 08 07 00 00  08 07 01 00 08 07 00 00  |................|
00000550  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000570  00 00 00 00 00 00 00 00  00 00 00 00 82 ff 46 00  |..............F.|
00000580  08 00 00 00 00 00 00 00  00 00 a0 05 00 00 a0 05  |................|
00000590  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000005b0  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
000005c0  00 00 82 ff 46 00 09 00  00 00 00 00 00 00 01 00  |....F...........|
000005d0  50 07 00 00 50 07 00 00  00 00 00 00 00 00 00 00  |P...P...........|
000005e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000600

hexdump -C Seq\ Run\ 36E5-2400.md5
00000000  41 42 49 46 00 65 74 64  69 72 00 00 00 01 03 ff  |ABIF.etdir......|
00000010  00 1c 00 00 00 01 00 00  03 80 00 00 01 bb 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000080  00 52 00 00 00 00 1d 00  00 00 00 1d 00 00 00 00  |.R..............|
00000090  06 00 00 00 00 08 00 00  00 00 09 00 00 00 00 0a  |................|
000000a0  01 90 00 00 64 00 00 00  00 1d 00 00 00 00 55 00  |....d.........U.|
000000b0  33 00 00 1d 00 00 00 00  1d 00 00 00 00 1d 00 00  |3...............|
000000c0  00 00 05 00 c8 00 00 04  02 58 00 00 03 0b b8 00  |.........X......|
000000d0  00 1d 00 00 00 00 1d 00  00 00 00 1d 00 00 00 00  |................|
000000e0  1f 00 0a 00 00 1e 00 a2  00 00 21 00 16 00 00 20  |..........!.... |
000000f0  00 2b 00 00 23 00 16 00  00 22 00 21 00 00 25 00  |.+..#....".!..%.|
00000100  16 00 00 24 00 2b 00 00  27 00 16 00 00 26 00 32  |...$.+..'....&.2|
00000110  00 00 6f 00 12 00 00 6e  00 4b 00 00 1d 00 00 00  |..o....n.K......|
00000120  00 4c 00 fa 00 00 4b 00  02 00 00 2a 00 01 00 00  |.L....K....*....|
00000130  2b 00 06 00 00 2c 00 00  00 00 2d 00 40 00 00 1d  |+....,....-.@...|
00000140  00 00 00 00 1d 00 00 00  00 1d 00 00 00 00 30 00  |..............0.|
00000150  c2 00 00 5f 00 ce 00 00  5a 01 f4 00 00 5b 1d 4c  |..._....Z....[.L|
00000160  00 00 60 04 1d 00 00 5c  06 40 00 00 5d 00 3c 00  |..`....\.@..].<.|
00000170  00 5e 00 10 00 00 1d 00  00 00 00 1d 00 00 00 00  |.^..............|
00000180  1d 00 00 00 00 1d 00 00  00 00 1d 00 00 00 00 50  |...............P|
00000190  00 d2 00 00 51 00 00 00  00 1d 00 00 00 00 1d 00  |....Q...........|
000001a0  00 00 00 1d 00 00 00 00  1d 00 00 00 00 56 00 00  |.............V..|
000001b0  00 00 02 00 00 00 00 07  00 00 00 46 58 4e 53 00  |...........FXNS.|
000001c0  00 00 01 07 e8 00 01 00  00 01 3b 00 00 01 3b 00  |..........;...;.|
000001d0  00 00 80 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000530  00 00 00 00 00 00 00 00  00 00 00                 |...........|
0000053b

So, the file payload is apparently the same format and nearly identical, but the Windows file has 15 extra bytes, has the structure named "FXNS", and obeys ABIF guidelines, while the Mac file breaks ABIF guidelines and has its own structure named "Fxns".

This isn't far from a solution but it would really help to know what the data in these payloads means; right now the significance of those fifteen extra bytes is a mystery but maybe the Windows file just has a few extra data points or something. Also, where did you get the mac version? is it the one your converter butchered or an actual working one?

Hello,
tank you very much for the help.!!!If I could utilize this file I will put your name as coautor in my publication! ; )
I will explain more detailed the question:
These file are "module file" tath comunicate through the datacollection software sereval instruction to the lab machine in question. The more important instructions are the Wawewlength dye tath are different in the tweo file..I ne the dye instructions named "G5". I actually have the mac version software tath have not the dye set "G5" ...only have these one the windows version (the windows file give me a collegue tath heve thw windows software). The home made do not upgrade the mac version...but the unique difference is this file.
...some information about the file are in Applied Biosystems | Thermo Fisher Scientific - US

Tank you tank you!!
Tank you tank you!!
Tank you tank you!!
Tank you tank you!!
Tank you tank you!!
Tank you tank you!!

---------- Post updated at 05:30 AM ---------- Previous update was at 04:49 AM ----------

the difference seem "
000001b0 00 00 02 00 00 00 00 07 00 00 00 46 58 4e 53 00 |...........FXNS.|

View Original: http://www.unix.com/windows-dos-issues-discussions/134123-mac-os-binary-abif-file-ms-windows.html\#post302413785\#ixzz0lLtJO1Va

i will prove to edit te file coping and pasting these part....
see you soon

---------- Post updated at 07:14 AM ---------- Previous update was at 05:30 AM ----------

Bio::Trace::ABIF - search.cpan.org

this perl module could modify it...but I have not linux background.

The unique difference from the two file must be the :
1- dye name (http://www.uri.edu/research/gsc/docs/ABI%20Dye%20Set%20card.pdf )
2- dye wawelenght ( Fluorescent Dyes and Filter Sets | University Core DNA Services | University of Calgary)

ciao

...this file contain exatly the information of the other ( Seq Run 36E5-2400) but it is for the windows software...if can help.

..the mac os software and module is here : Applied Biosystems - Support

Installing the software, automatically will be created a module folder in the harddisck
regards

Thank you for the info, though you still haven't said if the "mac" file you originally gave is an actual working file, or just a mangled conversion... If it's a working file, that's very strange considering how mangled it is! :slight_smile: On the assumption its a working file I'll take a second look tonight, see if I can make something to fold/spindle/mutilate the valid windows files into the invalid format the macs apparently prefer :stuck_out_tongue:

Hello,
the Mac file is the working ones...I currently work with these on my machine....i prove to convert the windows file with the win-to-mac utility script but it do not work with this kind of file.
This file must be loaded in a scroll windows in the software...in mac platform the two file appears like the attach (obwiously the file with the icon "PC" do not run).
Tank you very much!!!!!

Sorry, I ran out of time yesterday I'll try to take a look today.

Here's my first try at a conversion. Can your mac read this file?

Hello,
no mac cannot open the file!

I'm mystified. What error did it give?

...it give not any error simply do not appaer in the scroll windows in the software and have the "PC" icon on...appears not is a MAc file!!!
:frowning:

Hello,
I do some prove: I can intechange information between two MAC type file with the insert mode of the software "FlexHex"...but when I do the same betwwen MAc and Win file ...not work!

These are all ABIF files, very definitively so, with the same magic sequences, headers etc. and even the same byte-ordering. There's nothing "PC" or "Mac" about them at all. All I'm doing is rearranging it closer to the ordering your mac file has -- but the ABIF standard states the ordering can be totally arbitrary. If it's not using the header to detect ABIF files, I suspect there are "resource forks" involved telling the software extra info about a file, which I can't do anything about since they're not a proper part of the file. If you could find a way to make it 'show all files' I do think it might be able to load it. Maybe try giving the filename to it when launching the software from Terminal, or typing in the filename by hand. Or perhaps the software has an "import" option beyond the usual "file -> load".

Hello,
I cannot import the file, only I can chose it in the software windows. In attach there is the same file (G5) but in mac version...the unique different caracteristic is tath is for a capyllary machine...if can help

:frowning:

Have you tried typing in the name like I suggested? Even if it doesn't list it, it may be possible to load it that way.

I'll check the new file when I get home, though I don't anticipate significant differences. ABIF is ABIF. The problem may not be in the file itself.

Hello,
a collegue say to me tath the problem could be the resouce fork...may hvae some methos to add it?...the problem could be tath i use mac os 9...?I will prove on Mac X
bye

---------- Post updated 04-30-10 at 12:49 PM ---------- Previous update was 04-29-10 at 02:12 PM ----------

Hello...
coud be ...
I cut a 336 fragment from Pc G5 and paste it in the corrispondent 336 part of a mac file...leaving a remining part in the mac file...and the software read it correctly.
Now on Monday I must to check if I lose some information. So , Now I do it but really I do Now wath I have done!!!:slight_smile:

41 42 49 46 00 65 74 64 69 72 00 00 00 01 03 FF 00 1C 00 00 00 01 00 00 03 80 00 00 00 80 03 7E 2D 70 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 46 78 6E 73 00 00 00 01 07 E8 00 01 00 00 00 01 00 00 01 2C 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 06 00 00 00 00 08 00 00 00 00 09 00 00 00 00 0A 01 90 00 00 64 00 00 00 00 1D 00 00 00 00 55 00 33 00 00 1D 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 05 00 C8 00 00 04 02 58 00 00 03 0B B8 00 00 1D 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 1F 00 0A 00 00 1E 00 97 00 00 21 00 16 00 00 20 00 1A 00 00 23 00 16 00 00 22 00 18 00 00 25 00 16 00 00 24 00 17 00 00 27 00 16 00 00 26 00 6B 00 00 6F 00 16 00 00 6E 00 47 00 00 1D 00 00 00 00 4C 00 00 00 00 4B 00 02 00 00 2A 00 01 00 00 2B 00 06 00 00 2C 00 00 00 00 2D 00 40 00 00 1D 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 30 00 C2 00 00 5F 00 CD 00 00 5A 01 F4 00 00 5B 1D 4C 00 00 60 04 56 00 00 5C 06 40 00 00 5D 00 3C 00 00 5E 00 10 00 00 1D 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 50 00 96 00 00 51 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 1D 00 00 00 00 56 00 00 00 00 02 00 00 00 00 07 00 00 00 46 58 4E 53 00 00 00 01 07 E8 00 01 00 00 01 3B 00 00 01 3B 00 1D 00 02 00 01 F7 00 96 00 02 11 00 05 00 00 03 00 00 00 00 1D 00 02 00 00 0E 00 00 00 00 0C 00 65 00 00 0F 01 C2 00 00 1D 00 02 00 00 0E 00 00 00 00 0C 00 64 00 00 0F FF FE 00 02 5B 00 96 00 00 42 03 B7 00 00 1D 00 02 00 02 0F 00 1C 00 00 1C 00 02 00 00 1D 00 0F 00 00 03 00 00 00 00 08 00 01 00 00 1A 00 C8 00 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF 1F FF

Mac os 9!?

Yes, the problem is a resource fork.

Pre-OSX macs had a method of storing files that was incompatible with the entire rest of the universe. When you copy the file onto any PC formatted media, you get an incomplete file with the resource forks amputated. Alladin Expander can archive files in a manner that preserves resource forks, but a PC won't have any idea how to use them, and Alladin Expander isn't going to create brand new resource forks for Windows files that never had them. An OSX mac can understand resource forks, so you can see and modify the missing data that got stripped out whenever you took it to a PC, or zipped it, or whatever.

Modern macs have a less obnoxious way of handling resource forks so they don't get so easily lost.

---------- Post updated at 03:04 PM ---------- Previous update was at 12:19 PM ----------

These resource forks probably don't do anything but tell the mac that it's an ABIF file. If it will let you type in the file name manually, you may still be able to load an ABIF file without the resource forks. Have you tried?

yes, changing the forst part of file I am able to read the file anymore.. .
tank you!

It won't let you type the name in then?