Still no joy with the sim you sent over. Starting with /c doesn't help it to 'stick' either. Somehow I got it to keep the setting a couple of times (probably by deleting the sim files and allowing it to recreate them). I changed the serial port to a local USB-serial port and the results are the same - can't save the COM port in the sim.
Andrew.
I'm not sure where to go. There really isn't much to this:
1. The serial port field defaults to COM1.
2. On initialization, it reads the .STATE file (if present) and overwrites the default.
3. If the /c flag hasn't been set, it attempts to open the serial port to confirm existence.
a) If the port does exist, it continues with no changes
b) If the port doesn't exist, it scans for ports and selects the first one found.
4. When you invoke the selection dialog, it scans for ports and if the currently selected port is in that list, it selects it.
a) If you choose a port and press OK, it overwrites the serial port field.
b) If you Cancel, no change.
5. When you shut down, it writes the current serial port field to .STATE.
If the port shows up in the list, it should be written to the .STATE file on shutdown, and should load it on startup.
While testing, when I changed the mapped port (COM1 to COM2 and back) Windows 10 refused to let me open my serial port until I rebooted. It showed up in the device manager correctly, but the port open failed with a not found error.