more patches from Joerg Jenderek:
For some Microsoft initial program loaders (IPL) not only the locations
with the characteristic error messages changes.
But also the strings itself varies from "Invalid partition table"
to "Ungültige Partitionstabelle" or "Table de partition erronée"
depending on the language of the Microsoft operating system (for
english,german or french)
So for example file (wmbr-9m-fr.bin and mbr-win7.bin in sample directory
mbr_msdos ) are not characterized as "MBR" ( see output
mbr_msdos-5.12-old.txt )
So i removed the old tests for Microsoft DOS and Windows MBR and replaced
them by looking for \x33\xc0\x8e\xd0\xbc\x00\x7c , the characteristic
assembler instructions "xor ax,ax;mov ss,ax;mov sp,7c00" according to
information of http://thestarman.pcministry.com/asm/mbr/
By this test line all inspected examples are identified as MS-MBR except
for hdimage-msdos3.21-es.mbr. This seem to belongs to Spanish Microsoft
MS-DOS version 3.21 .
So i add additional magic test for that special assembler instructions. By
looking for characteristic assembler instructions at offset 8 i was able to
identify MBR for Microsoft version "DOS 2" until Windows 7 and display
this version information correctly.
For the old "DOS 2" only the Author name differs ("David Litton" , "A
Pehrsson" ; see samples hdimage-msdos2.11-sv.mbr and mbr-2.x.bin). So i
display this information too.
If available an non zero disk signature at offset 0x1B8 is displayed,
whereas in old version this was called unspecified by ", Serial" with
sometimes wrong typ ubelong (See also
http://en.wikipedia.org/wiki/MBR_disk_signature#ID)
According to http://mirror.href.com/thestarman/asm/mbr/mystery.htm
the physical drive number and a time stamp is stored in some MBR versions
during creation.So i display this information too like in mbr-3.3_myth.bin.
error messages inside mbr are printed for example by assembler
instructions: mov si,06nn;...;int 10
where nn is string offset varying for different languages.
So i use indirect offset to display this various messages like for german
"Ungültige Partitionstabelle"
"Fehler beim Laden des Betriebssystems"
"Betriebssystem fehlt"
or for english
"Invalid partition table"
"Error loading operating system"
"Missing operating system"
i also use this strings or different offset values to characterise the
different language variants.
After changing filesystems magic by file-5.12-filesystems-msdos-mbr.diff
these files are identified correctly as "MS-MBR" (see output
mbr_msdos-5.12-new.txt).
All diffs, output and sample files are stored under
http://mitglied.multimania.de/jenderek/file/