I am trying to perform conversion from binary to Motorola SREC file format to replicate functionality of a tool from an obsolete system in Python 3. I have been unable to produce the same SREC output for a given binary input as the obsolete tool.
I have looked at the bincopy Python module (as referenced at how to manipulate SREC file), and this produces identical output to my module.
Below is a sequence from the binary file as it appears in a hex editor, followed by the text representation from my program (which bincopy agrees with) and finally the text representation from the obsolete utility:
source: 01 01 16 20 00 07 F2 48 00 00 30 00 00 00 6C 00
my tool: 01 01 16 20 00 07 F2 48 00 00 30 00 00 00 6C 00
expected: 00 07 F2 48 00 09 CC 64 00 08 17 C8 00 09 18 7C
This is not inclusive of the type, address, length or checksum bytes for an SREC entry. The Wikipedia entry for SREC suggests that my conversion method is correct, however in this case the obsolete tool is the benchmark.
Given the above source sequence, what conversion is being performed to achieve the expected output?