If the user program is to be downloaded into a flash ROM area for which a lock bit is set, E1/E20/EZ Emulator clears the lock bit of the block that contains download data before it starts downloading.
The behavior of the emulator depends on the setting of the [Debug the program re-writing the on-chip PROGRAM ROM] property in the [System] [E1] [E20] [EZ Emulator] category on the [Debug Tool Settings] tab of the Property panel.