1

My TI-Nspire CX CAS has a broken hardware component, and its ADC3 is reading a value of ~465 units, when it should be ~73 for proper function. So rather than fixing the hardware, I wanted to try a dirty fix by remapping the output location (which is written by the calculator to 0xC4000170) and forcing the calculator to read what should be the correct value, but I have no idea how.

I should have access to C and Assembly (by using ndless). How would I remap the calculator's virtual memory so it always reads a value of 73 at that address?

2 Answers2

1

It is actually relatively difficult to remap hard coded address space. In your case where it is likely reading a physical hardware address, it is nearly impossible without substantial kernel modifications.

As a work around, you can change the actual assembly. In you case, try to set a variable to 73 at some known address, and then change the ptr in the executable to that known address. For instance, change 0xC4000170 to the location of your variable that you previously set to 73.

Clarus
  • 2,259
  • 16
  • 27
1

Using the built-in ARM9 MMU, you can unmap the ADC peripheral in memory, and then use the data abort handler to implement custom behavior, such as always returning 73. However, this is not a trivial undertaking. A good starting point would be https://github.com/ndless-nspire/Ndless/blob/master/ndless/src/resources/lcd_compat.c, which does something similar with the LCD controller.

pbfy0
  • 616
  • 4
  • 13