I've recently bought an old Palm m515 PDA. It seems that the previous owner has removed some of the built-in applications like Calendar and Contacts from it, because when I want to start them it says that "JackSprat" has removed them. How can I restore the original state of the handheld? Can I get official ROM image somewhere? Which tools should I use?
JackSprat was a tool produced by a company called Brayder, used to remove portions of the original ROM images. It used to produce a ROM backup along with a PRC which could be used to restore it; you can still find the original manual on the Internet Archive's copy of Brayder's technical support page.
Without that ROM backup and the associated restore PRC, your legal options are rather limited. Palm used to have a developer program, but that's long dead, and even then as far as I remember the ROM images available through that program were debug images suitable for use in the emulator, not for flashing on devices. You'd also need a ROM installation tool.
Some devices had Palm OS upgrades available, and could be restored using that; but the m515 never got any upgrades so Palm never made the tool available. Some forums have posts by people who tried to use the m505 upgrade tool to restore an m515, but I get the impression that was rather unsuccessful.
If you are able to find a ROM image suitable for the device (again, ROM images used in emulators are probably not suitable), then you might be able to get it on your device using osflash, but the m515 isn't officially supported so you'd be experimenting! If you can get a hold of another m515, extracting the ROM is easy enough using tools such as pilot-link's
An added complication with all this is that even if you do get a hold of Palm's tools, most of them are Windows-based and don't work in recent versions of Windows.