模組被cbrom壓入到BIOS.bin中后,存在于bin文件中是有一定的格式的,其中每個模組的header如下表:
阅读全文
类别:Bios 查看评论
Offset from 1st byte
|
Offset in Real Header
|
Contents
|
|
00h
|
N/A
|
The header length of the component. It depends on the file/component name. | |
01h
|
N/A
|
The header 8-bit checksum, not including the first 2 bytes (header length and header checksum byte). | |
02h - 06h
|
00h - 04h
|
LZH Method ID (ASCII string signature). In my BIOS it's "-lh5-" which means: 8k sliding dictionary(max 256 bytes) + static Huffman + improved encoding of position and trees. | |
07h - 0Ah
|
05h - 08h
|
|
|
|
09h - 0Ch
|
Uncompressed file/component size in little endian dword value, i.e. MSB at 0Eh and so forth | |
0Fh - 10h
|
0Dh - 0Eh
|
Decompression offset address in little endian word value, i.e. MSB at 10h and so forth. The component will be decompressed into this offset address (real mode addressing is in effect here). | |
11h - 12h
|
0Fh - 10h
|
Decompression segment address in little endian word value, i.e. MSB at 12h and so forth. The component will be decompressed into this segment address (real mode addressing is in effect here). | |
13h
|
11h
|
File attribute. My BIOS components contain 20h here, which is normally found in LZH level-1 compressed file. | |
14h
|
12h
|
Level. My BIOS components contain 01h here, which means it's a LZH level-1 compressed file. | |
15h
|
13h
|
component filename name length in byte. | |
16h - [15h+filename_len]
|
14h - [13h+filename_len]
|
component filename (ASCII string) | |
[16h+filename_len] - [17h+filename_len]
|
[14h+filename_len] - [15h+filename_len]
|
file/component CRC-16 in little endian word value, i.e. MSB at [HeaderSize - 2h] and so forth. | |
[18h+filename_len]
|
[16h+filename_len]
|
Operating System ID. In my BIOS it's always 20h (ASCII space character) which don't resemble any LZH OS ID known to me. | |
[19h+filename_len] - [1Ah+filename_len]
|
[17h+filename_len] - [18h+filename_len]
|
Next header size. In my BIOS it's always 0000h which means no extension header. |
阅读全文
类别:Bios 查看评论