2.3. Merging *.bin Files with the HxD HEX Editor
A HEX editor, which allows to see the bytes as hexadecimal numbers is probably suitable to merge the *.bin files. The HxD editor offers this functionality. Thus, it will be explained, how to do the task with this software.
First, it is important to check, whether the images have exactly the right size (which is 8k or 16k). Otherwise the merged images will not be in the right position in the begin of a memory bank. This will cause a malfunction, since the software will not start properly. The result might be a black screen or a boot screen, showing a number less than 38911 basic bytes free.
*.bin file of a not suitable size
An 8k *.bin has to fill the exact address space of 0x0000 – 0x1FFF, which is a byte count of 0x2000 (=8kbyte). The file shown in the figure above is missing one byte. This has to be filled up with preferably 0xFF (or any other value).
Inserting a byte with the HxD editor
Move the cursor at the position of the missing byte and select the operation “Insert bytes…” from the “Edit” menu. Here one byte is missing, so the byte count is “1”. The HEX-value is “FF”.
Some old EPROM images are 4k in size. This has to be filled up. So, again, position the cursor after the end of the data (0x1000, assuming, that the size is exactly 4k) and insert a hex byte count of 0x1000 (which is exactly 4k) to fill up to an 8k image.
Finally save the *.bin file. Fill up all files to 8k (0x2000 bytes) or 16k (0x4000 bytes).
After this operation, the files can be concatenated to get a proper image for the complete EPROM spanning over up to the maximum memory banks for the intended EPROM.
The Concatenate... tool
Select all files, that are intended to be programmed in one EPROM, specify the output directory and file name (…) and click ok.
Concatenating the *.bin files
The output file can be used for programming an EPROM. The risk of the concatenate tool is, that a file does not have the proper size.