basic binary file question

Discuss anything TunerPro related.

Moderators: Mangus, robertisaar, dex

Post Reply
kva
Posts: 2
Joined: Mon May 22, 2023 10:28 am

basic binary file question

Post by kva »

In my mind bin-files is binary files, so I expected just lots of 0 and 1 stacked together in groups of 8 (my ecu is 8-bit).

I read my EPROM 27C256 chip with Chineese XGecu T48 reader. Then I saved the file to bin- and hex- format.
This file can then be opened by Tunerpro and looks decent.

I also wrote a small Python program that reads the bin file, and then makes 4 files with format binary (0's and 1's), hexadecimal and Decimal (and Asci up to character 127).

So to my questions:
************************
The bin file when opened in Notepad is not at all binary content. It looks more like Asciii. Is this normal? Expected 0's and 1's.

The bin file when opened in Tunerpro gives same decimal contents as the decimal file from my Python program
But if my binary file from Python is opened in Tunerpro it does not give same content. Does bin files contain some extra information about formats etc etc that is not part of the maps, and that Tunerpro "skips" or hides? I expected when I read the bin file to Python, then wrote it to file in binary format, and then opened in Tunerpro it should be identical. I'm quite sure the binary file from Python is identical to the decimal file, which corresponds to Tunerpro content.
I thought is was so easy that if you know what address to change, you could change directly in binary format in f. example Notepad and burn back to EPROM. But as said, the bin file looks like Ascii in cryptic format

The hex file that T48 wrote when opened in a hex editor (Free Hex Editor Neo, which seems to not be free after all....) looks nothing like the content when viewed in T48 software or in Tunerpro hex editor (when the bin file is opened in Tunerpro).
But the T48, Tunerpro and my Python Hex version all looks identical, with 2048 lines which I expect from a 256K 8bit chip with 16 "columns".
The Free Hex Editor Neo shows 5761 lines

I get this to work so far, and know I just can use tunerpro etc, but I want to understand the basics about the files.
Hope someone can enlighten me
User avatar
dex
The Ford Guy
Posts: 614
Joined: Thu Oct 07, 2004 6:38 am

Re: basic binary file question

Post by dex »

Notepad will try to display any file you open with it as ASCII text. It pretty much has no use for anything other than a text file.

If your programmer can save files as .hex or .bin why are you trying to change the file format? If the binary file opens OK in TunerPro then that's all you need as far as using TunerPro is concerned.

If the 'Free Hex Editor Neo' is not working then use another one, there are plenty out there. Or use the hex editor built into TunerPro.
kva
Posts: 2
Joined: Mon May 22, 2023 10:28 am

Re: basic binary file question

Post by kva »

Thanks.

Reason for trying to view it as "raw" binary is just for my understanding of how it works and "nerdy" interest.

As I wrote I get this to work and know I just can use Tunerpro etc, but I want to understand the basics about the files.

As I understand you the reason for my confusion is probably that Notpad choose to view is as ascii, and that maybe Free Hex Editor Neo is not so good.
Post Reply