Ok, I have compiled a list of what TI checks for after unlocking flash:
If any of these are false, it resets RAM.
I had an idea that ALMOST works:
Sometimes after unlocking flash it calls something in the $4000-$7FFF range.
So if I went into memory map mode 1, the privileged page would be mapped to $8000-$BFFF.
Then if I used that port that maps a multiple of 64 bytes of RAM page 1 starting at $8000, it would be able to write to $C000 AND $8000.
But when it does that call, it land right on RAM page 0, which TI just happened to decide can't run code.
So back to square one...
- Makes sure bits 14 and 15 of sp are set
- Makes sure a privileged page is in Memory Bank A
- Makes sure RAM page 1 is in Memory Bank B
- Makes sure it can write to $8000 and $C000
If any of these are false, it resets RAM.
I had an idea that ALMOST works:
Sometimes after unlocking flash it calls something in the $4000-$7FFF range.
So if I went into memory map mode 1, the privileged page would be mapped to $8000-$BFFF.
Then if I used that port that maps a multiple of 64 bytes of RAM page 1 starting at $8000, it would be able to write to $C000 AND $8000.
But when it does that call, it land right on RAM page 0, which TI just happened to decide can't run code.
So back to square one...