About a year ago Tinhead mentioned the utility 'fpga.exe' in this forum thread. This file was present in early firmware versions, later it was removed.
About two weeks ago this file was again mentioned in mikrocontroller forum thread "TEKWAY DST1xx2B Oszilloskop". Here Tinhead hints to the possibility to create a kind of menu by reading the frontpanel buttons before the main program is started. Well, this is indeed possible as shown here.
I copied the utility 'fpga.exe' into the '/dso/app' directory, together with script 'demo'. The script reads the key-buffer in the fpga memory until it finds one of the 'watched-for' keys, then exits.
The script can also be added to the bootscript 'rcS', I prepared a demo 'rcS' for this. Copy it to '/etc/init.d' after saving your original one of course. Now the script will wait while the scope is displaying the bootlogo until you push either F1 or F2, then it exits after starting 'dso.exe'. Here you could insert a different command for another, renamed, 'dso.exe' version that is present somewhere in the filesystem.
I was planning to use this to make it possible to start an 'upgraded' DSO/MSO in either the DSO or in the MSO mode.
HOWEVER....
The 'upgraded' DSO/MSO is running a later Linux version and fpga.exe is not running here. It is depending on some older library files not present. To solve it properly fpga.exe should be recompiled with the proper libraries. I tried a few tricks found on several forums, like symlinking an older library, but no succes.
So far for my attempt to create a DSO - MSO menu.
For those who want to experiment I added 'fpga.zip', my script 'demo' and the special 'rcS' are in 'F1F2demo.zip'.
The use of fpga.exe has been published before:
'fpga.exe w 0xnn 0xdd' writes data, 'fpga.exe r 0xnn' reads one byte, 'fpga.exe R 0xnn length' reads multiple 32 bit records.
I found fpga register 0x0d has a key-buffer status bit, bit 5, that is set when the key-buffer contains data to read.
Register 0x0e reads the key-buffer: bits 4, 5 and 6 represent the contents of counter UF1B for multiplexer UF3 of the front panel schematic; bits 1, 2 and 3 for UF1A and UF2; bit 0 is zero when the found key is pushed and is set when the key becomes released. My demo uses F1 key, databyte 0x26 when pushed and F2, databyte 0x36.