The FT32 simulator was not correctly simulating the behavior of the
program memory (PM) write port. When it is locked, writes to the
data register do nothing.
+2015-09-29 James Bowman <james.bowman@ftdichip.com>
+
+ * interp.c (cpu_mem_write): Do no write PM when locked.
+
2015-09-22 James Bowman <james.bowman@ftdichip.com>
* ft32/interp.c (cpu_mem_read): Call getchar when ea is 0x10000.
cpu->state.pm_addr = d;
break;
case 0x1fc88:
- /* Write to PM */
- ft32_write_item (sd, dw, cpu->state.pm_addr, d);
+ if (cpu->state.pm_unlock)
+ {
+ /* Write to PM. */
+ ft32_write_item (sd, dw, cpu->state.pm_addr, d);
+ cpu->state.pm_addr += 4;
+ }
break;
case 0x1fffc:
/* Normal exit. */