With Pascal style records.
There are some issues though.
- Pascal can't have fields after an union/variable (case) record, but that can often be resolved by moving those fields into one branch of the union (into the case of block of the record).
- That does expose another problem, since Pascal lacks anonymous unions, in nested union cases those fields might acquire a prefix.
- Finally while FPC supports bitpacked records now, I don't know if that works in Delphi mode. TBT
- Sometimes there is preprocessor abuse in structs, where alternate names of fields are defined with #define. This of course won't work
There used to be a nice article on Rudy Velthuis site, but it seems to be down.