Yes, but technically MemoryMapBytes is just the flag image, the output of bitwise.parse() is the logical structure object laid on top of the flat memory buffer. In C parlance, the MemoryMapBytes is the result of the malloc() and the memobj (output of bitwise.parse()) is like a `struct mymemobj*` you point at it to get a structured view.
Great, that's what I was thinking it was.
Er, I don't think it makes much sense to have a mem_struct[2] in the middle of this. I'm guessing maybe you're confusing the packetization of the memory data over the wire with the actual memory structure? On all (amateur, granted) Icom radios, they use the ICF protocol to transfer the memory contents to the PC in 8, 16 or 32-byte chunks (depending on the vintage of the radio). Each chunk has a sort of SOR, src and dest addresses (since it's sort of a networking protocol), a command number, the actual payload, and an EOR. You don't want to store all of that, you want to just store the payload in the proper index in the MemoryMapBytes. Other radios with similar protocols include a command, address (i.e. where in the memory address space this chunk goes), length, checksum, etc.
Have a look at icf.py, specifically IcfFrame.parse() to see if it happens to match what you're looking at. At the very least, you should implement that sort of scheme, where you speak the protocol separately from the actual payload that you store.
I'll take a look at the icf file, make there are clues in there. The core of my question was answered above, I just have to figure out how to get the overlay to work with the data I have in whatever structure it ends up in.
I think there are two protocols remote and clone, remote looks like NEMA ICF for remote control, there doesn't appear to be a way to set memories using the remote protocol. the clone protocol is the one the old software uses and it just sends a single to dump the entire memory image. From what it looks like sniffing the UART, the same 10K of bytes go back down The software for the M710 is used for cloning and you send one command and 10K bytes of data come back. When you program it, it sends a similar command and all 10K bytes go back down. i.e. you send FE, FE, EE, EF, E2, 16, 32, 00, 01, FD and get 10K bytes back then you send FE FE EE EF E3 16 32 00 01 FD + 10K bytes to program the image. What we have now is fairly painful, we have to install dosbox and run an ancient dos program to program the memories.