USERIMG.BIN format - used by Furuno GPS units
These files are 1MB (1048576 bytes) in length. The first 131072 bytes contain file tables, and the remaining
917504 bytes contain the data. The first byte of the file is always 0x43 ('C').
File table section
- This section goes from offset 0x00000 to offset 0x1ffff (inclusive), and is organised into blocks of 8704 (0x2200) bytes.
- Each block contains a number of 16 byte records. The first byte in each record may be 0x43 ("DATADISK" record, always first), 0x04 (routes file),
0x06 (waypoints file), 0x00 (end of this table), or 0xFF (end of all file tables). The second byte is normally zero, the third byte contains the start block of the data
for this file, the 4th byte is normally 0x01. This is followed by an 8 byte filename, and then a value which indicates the size of the file in blocks.
- There seems to be a set of duplicate file tables, each listing more subfiles than the previous one.
The last file table is the one to use and has the first record starting with the 4 bytes "CDOS".
- This section starts at 0x20000 and goes to 0x0fffff (inclusive).
- This section is organised into blocks that are each 512 (0x200) bytes long. The first two bytes in each block contains either the number of bytes
used in this block (if the high bit is set), or a pointer to the next block that contains data for this subfile.
- The data stored in a waypoint subfile consists of a header record terminated by 0XFF, and then the longitude value (4 bytes), and the latitude value (4 bytes).
Next comes a byte containing the length of the waypoint name, then the waypoint name, a byte containing the length of the
time/description string, then the time/description string. Following this is a number of unknown bytes and then an 0xFF terminator byte.
After this, the next waypoint record begins with longitude, latitude, etc, and so on.
- The longitude and latitude values are stored in a sort of mercator projection, so to decode them to normal lat/lon values
you need to use these functions.