MEGA65 / mega65-core

MEGA65 FPGA core
Other
240 stars 85 forks source link

HYPPO should restore ROM area, even if marked write-protected #634

Closed gardners closed 6 months ago

gardners commented 1 year ago

Test Environment (required) You can use MEGA65INFO to retrieve this.

Describe the bug Modifying ROM memory from the freezer has no effect if ROM write-protect is enabled. The root cause is the unfreeze routines don't un-protect the ROM before unfreezing.

To Reproduce

  1. Freeze
  2. Modify some string in the ROM, e.g., the C64 mode basic banner around $2E400
  3. Exit freezer
  4. GO 64 or SYS64738 to restart C64 mode (don't use reset button, as that will reload ROM)
  5. Observe that your changes did not survive unfreezing

Expected behavior The changes made to ROM banks should be effective after unfreezing

Screenshots N/A

Additional context This is why loading ROMs in the freezer never worked.

gardners commented 1 year ago

believed fixed, but requires confirmation.

lydon42 commented 1 year ago

ROMLOAD does work with this fix.

lydon42 commented 8 months ago

This seems to be broken again in latest development.

lydon42 commented 8 months ago

Question for @gardners: is it really possible to write a m65 tool unit test for this, so this can be regression tested? The unit test would need to get the system into hyppo mode and then try to write ROM space... (because of the fix-test-required label).