Using “filemerge.py”

“filemerge.py” loads specified files into the same “memory”. The parts of the memory occupied by the loaded files are then saved. The destination memory address contained in the first two bytes of the loaded files is considered.


The tool has to be started with the following options set:

  • --file/-f <FILE>[,<FILE>]*: the file(s) to load, separated by ‘,’
  • --output/-o <FILE>: the name of the file to write the memory to


filemerge -f bb_hex_game.bin,bb_prg_game_disc.bin -o bb_game_disc.bin

Reads the files “bb_hex_game.bin” and “bb_prg_game_disc.bin” into an empty memory to the addresses defined by their first two bytes. Saves the resulting memory to “bb_game_disc.bin”.