Thanks colorburst. I’m not good at software coding, fortunately now we have AI, you don’t have to be an experienced software engineer to understand the complex software code, AI can help to explain what the code is doing. With the help of ChatGPT, I figured out what exactly function FUN_010f8314 is doing, basically it points to a data structure in ROM, where it stores a base and an offset address for data stored in NVRAM, which is 0x02f12d58 plus 0x1a. Given this function most probably is _libManagerWordAt(), the other function _libManagerWordAt(), which is to change NVRAM for options, must be nearby, after research in the binary it is FUN_010f834e:
void FUN_010f834e(uint param_1,short param_2)
{
int iVar1;
short sVar2;
short *psVar3;
iVar1 = *(int *)(&DAT_010faca6 + ((param_1 << 8 ) >> 0x18) * 4);
psVar3 = (short *)(*(int *)(iVar1 + 0x10) + *(int *)(*(int *)(iVar1 + 8 ) + (param_1 & 0xffff) * 4)
);
sVar2 = *psVar3;
*psVar3 = param_2;
psVar3 = (short *)(*(int *)(iVar1 + 0x10) + -2);
*psVar3 = (param_2 - sVar2) + *psVar3;
return;
}
Again, with the help of ChatGPT, what this function does is it changes a data in NVRAM, and changes a checksum as well, the address of checksum is 0x02f12d58 -2=0x02f12d56, or 49,360,214. We can use “_d 49360214” command to display the data in NVRAM start from 0x02f12d56 are as below:
-> _d 49360214
2f12d50: 0074 0000 0000 0000 0000 * .t........*
2f12d60: 0000 0000 0000 0042 0000 0000 0000 0001 *.......B........*
2f12d70: 0001 0000 0000 0000 0000 0000 0000 0000 *................*
2f12d80: 0000 0000 0000 0030 cabc 002f 0048 0000 *.......0.../.H..*
2f12d90: 0000 3f80 0000 0060 0062 0062 0192 01b9 *..?....`.b.b....*
2f12da0: 01b9 0000 0000 0000 0000 0239 0027 0000 *...........9.'..*
2f12db0: 0000 0000 0000 0239 0027 0000 0000 0000 *.......9.'......*
2f12dc0: 0000 0239 0027 0000 0000 0000 0000 0239 *...9.'.........9*
2f12dd0: 0027 011d 0000 *.'.... *
The 1st data 0x0074 is the checksum, and following data are options or other information, 0x0074=0x0042+0x0001+0x001+0x0030, so if you change any data between 0x02f12d58 and 0x02f12d88 you will need change checksum, otherwise it won’t take effect.
After further research I found that the data in following address are for the options we are interested:
0x02f12d70: memory (3000 or 6000 for TDS420)
0x02f12d72: video trigger
0x02f12d80: RS232/Centronics
0x02f12d82: Math FFT
Next step is to change the data in these address with _m command, you can only change one data together with checksum each time, then reboot scope to let it take effect. Followings steps are to enable video trigger option:
_m 49360242
0001
*
_m 49360214
0075
*
I have successfully enabled memory, video trigger, and FFT option on my TDS420, depends on the firmware version you may have different address, but the process of find it out is similar.