$ bin/bit2core.exe mega65r3 ~/Downloads/mega65r3_b70.bit mega65r3-b70 mega65r3-b70 mega65r3_b70.cor
Bitstream file is 6165570 bytes long.
This bitstream's FPGA part is for an unknown mega65 target: "???" (FPGA part: )"
ERROR: Provided bitstream is for a different mega65 target to the one you specified: "mega65r1|mega65r3" (FPGA part: 7a200tfbg484)
Looking into it, bit2core assumed that the FPGA-part-id field would always be located at offset 0x4C.
Recently, we discovered a problem on converting recent .bit files to .cor, discussed in this Discord thread:
Looking into it, bit2core assumed that the FPGA-part-id field would always be located at offset 0x4C.
But looks like in this new bitstream, it is at offset 0x4e.
I've found a description here of the xilinx bitstream file format:
Ah ok, that doc helps a lot, they use variable-length fields. I'll need to tweak the logic inside bit2core to suit this...