So after many years of putting up with the lack luster battery life that comes with the HP Ipaq unit that controls my dyno, I thought I should finally do something about it.
Having previously worked for a logistics company that did a lot of scanning of freight with Motorola devices, I did a quick search on ebay & found a bunch of MC75 units available for a reasonable price, so I took a gamble & ordered 1.
A week later the unit turns up, sadly no charging cable or dock came with it, so another week of waiting for that to turn up before i could play with it.
Once the dock arrived & the unit was charged, I loaded up the original command module application via it’s micro-sd slot & updated the applications parameter file with my EDM bluetooth address, fired up the app & success…
Well sort of, at first i had no control of the dyno with my existing config file, so i tried a different PDA model that i knew the app supported & presto! I had full control just like normal, However the Motorola display having twice the resolution of the original HP unit at 480×640 vs 240×320 made it “box” the app into the top left corner of the screen like the simulator picture shows.
I noticed that the text in some of the screens was much larger, so that told me it was auto-sizing some of the text fields correctly at least. So not wanting to accept this limitation, I wondered if it would be possible to edit the original application code.
So after spending a few hours looking for & testing some Visual Basic & Dot Net de-compilers I eventually settled on a program called dnSpy.
It can break down the original exe program & present all the instructions & pages that the application uses & then recompile the app back into a executable again after making changes.
OK then, this could actually be possible.
What i found was the program seems to be broken down into a few area’s:
Orange Box = Comm’s & system related instruction data
Yellow Box = Event related data for each page
Red Box = Page layouts, set’s page size & picture box sizes
Since the app was created as a Microsoft form design, the interface starts by setting a background picture, then overlays additional picturebox’s (buttons) on top, they were easy to modify to the new locations I needed by just doubling the X & Y locations & picture size. I then compiled the program & loaded it to a windows mobile emulator to test the change.
Success! this got the buttons in the right location, but the button images and background were still half the size they needed to be, so at first I tried extracting all the built-in pictures & simple doubled the image sizes by 200%, this worked at first for a while during testing until I got the main executable to around 7mb in size & the application would then crash the emulator, this effectively wasted 5 days of me playing with it after work.
So more research was needed & what I found was that this was due to the way the images are loaded into memory on the device, so i had to find another way.
Again a little more googling & the answer was relatively straight forward. I just needed to set the picturebox image to stretch with the following line for each image.
this.pictureBox.SizeMode = PictureBoxSizeMode.StretchImage
But wait there’s more! rather then having to rely on using the original Dyno Dynamics supplied cab install file & then copying my version over the top, I went & created a new cab installer package with my own updated file.