Products > Test Equipment
Rigol DSXXXX .GEL firmware file format
<< < (11/38) > >>
Userli:
Good news!
It looks like the compression is optional.
In the new FW file the file GuiResData.hex is uncompressed, whilst it was compressed in the last FW file.
It might therefore be possible to change the ELF file and add it uncompressed, circumventing the possible compression problems.

I agree with smithnerd though, that most likely it will also accept files compressed with the LZMA algorithm from 7zip.
janekivi:
After hacking something together with notepad I get all images from latest update:
I put this file and guiPicData to somewhere and double click on ***.py and get RAW data.
This is making for me BAT file too with ffmpg convert command lines. I add to this directory
ffmpeg.exe and all required DLL files for this. You can change "ffmpeg" with something else.
PNG can changed too to something else if other parameters corrected too.
Double click on BAT is making next miracle...

--- Code: ---import os
src_file = 'guiPicData'      #code.py and this file with data must be in the same directory
path = 'images'              #it makes new directory
if not os.path.exists(path):
    os.makedirs(path)

src_file_size = os.path.getsize(src_file)
b = bytearray(open(src_file, 'rb').read())
pos = 0
nr = 0
 
while pos < src_file_size:
x = b[pos:pos+2]
y = b[pos+2:pos+4]
num1 = int.from_bytes(x, byteorder='little', signed=False)
num2 = int.from_bytes(y, byteorder='little', signed=False)
length = num1 * num2 * 2
data = b[pos+4:pos+4+length]
pos +=4+length
nr +=1
print (length, num1, num2, pos) # for test and feedback
output = "file_%03d_%dx%d" % (nr, num1, num2)
open(os.path.join(path, output), 'wb').write(data)
text = "ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s %dx%d -i %s -f image2 -vcodec png %s.png" % (num1, num2, output, output)
# output = "file_%03d_%dx%d.bat" % (nr, num1, num2)   # uncomment if you want bat file for each RAW image
# open(output, 'w').write(text)                       # uncomment if you want bat file for each RAW image
with open(os.path.join(path, "test.bat"), "a") as myfile:
myfile.write(text+ '\n')

--- End code ---

All images are in zip here too:
Dwaine:
I tried to replace the logo with this new firmware.  It worked with no issue.  Nice work everyone
Userli:
First success.
I managed to replace the RIGOL logo on the main screen. (see attachment)
To do so, I replaced the image and put the uncompressed file back.
Bit 1 in the 5th byte of the 24byte file header tells if the file needs decompression - so it needs to be cleared.

You should always reopen the file with the application after saving and check that the changes have been applied.
I added loads of consistency checks and if you find any entry in the error log, the file is most likely broken.

janekivi:
Looks like guiResData.hex contains some data : )
First part is menu structure, some parts contains text, one part is help...

First image - Apps, Menu, Item. This part is keep going to address in red - 05 BE 08.
If there is Apps, section length is the following 4 bytes - green.
Current Menu is ending at the same address and length to there is 04 80 - blue.
Inside of the Menu is couple of Item's with their lengths - yellow.

When this part is ending (next image), there is 3 addresses for next 3 parts.
05 BE 14 - beginning of 1st
06 AF 00 - beginning of second
09 AF E0 - beginning of third

On third image we see 1st part ending, second beginning and length A1 A8
which lead us to beginning of something. That part is ending at 09 AF DF and
next we see last file with his length. From 09 AF E0 is exactly 01 BB 3C to the
file end.
Now, how to eat those parts and what's inside...
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod