Now here is where the 128 (in the beginning of the thread came in)
I get a string from the PC, erase the blocks and write the data. When this is ok I send a command to the PC to show we are ready for the next data chunk.
Then we can fiddle around in the PIC without missing any data.
So I just gathered the start address for the HEX file (in our case allways 0040) and the collected the data from the hex file and arranged it so it will fit the HSERIN HEX4. Then I feed out the characters from the string in as big pieces I want to have.
At the same time you can calculate a checksum for each chunk that the PIC will report back before sending next data. It is also possible to encode the string so only your loader will understand the data. With the code protection turned on the application software can not be copied (unless they break the code of your encrypted file, just pick any algorithm from the internet and it would't be easy to do)
Or invent you own "super safe" algorithm as the DVD people did :-) (not that good idea)
But at least we have solved the basics of how to trick PBP into making some kind of loader. Too bad we had to hijack the old define but, with our new loader who needs that define anyway. Then we can hope the really clever people in this forum might figure out a way to include our own defines.
/me
Bookmarks