I have long thought about doing something like this, but have never progressed beyond thought experiments. Here's the basics as I see them, for the 1.5 cents they're worth:
1. There are two kinds of
image sensors: CCD and CMOS. Basically the CMOS type seems to be the easier to integrate, since they output the image in raw format directly rather than as a set of analog charges that have to be converted to bits through custom circuitry or software. Is that what you have?
2. The main idea for the analog-image interface probably runs something like this:
a. As long as the digifilm module is "on", the sensor should be ready to capture an image.
b. When the shutter is tripped, light collection starts; when it closes, light collection stops.
(Note: the
FP flash sync can be used to mark (a) and (b); it closes a circuit if and only if the shutter is open. A little wire can stretch from the female FP plug at the front of the camera through the back to the digifim, much in the way of some
late-70s data backs.)
c. When the film-advance lever is wound, the image is either (1) copied into storage as a new file if the film rewind button is NOT depressed, or (2) overlaid onto the previous "active" file in storage if the film rewind button IS depressed. This is the analog of multiple-exposure modes.
Note. Thus the shutter speed and the aperture are set "manually" only.
d. The sensor has to be given a light-sensitivity setting that corrsponds to the film ASA. Unfortunately, there is no easy way to latch onto the existing metering ciruits inside the camera (they're the only component to make use of the ASA setting on top of the shutter dial). Therefore, a second ASA/ISO speed control is required, likely accessible through the back.
----
Here are some (not all) of the design considerations:
1. The sensor can fit where the metal film back is on the camera. Unfortunately the existing sensors in Pentax DSLRs such as the one you're thinking of cannibalizing are not full-frame (35x24mm) and so the image will be cropped. Otherwise, a custom -- probably very expensive -- full-frame sensor can be obtained.
2. The sensor also requires a battery.
3. The sensor requires a bit of control as per the above. You can use either analong circuitry or a digital controller.
4. The digifilm needs a persistent storage medium. A flash card is an obvious choice.
NOTE. If you go the analog route you can design the circuits using any one of several free circuit design apps (search the web) and build it with very cheap basic components, but you will need more skills than to go with an embedded software controller chip (here a "PC on a chip" is the simplest but most expensive solution.) Also you need to transfer the image back onto the flash card. If building the digifilm module from nothing this probably makes the PC-on-a-chip controller the most effective way to go. However, since you are cannibalizing pieces from an existing DSLR none of this is probably a consideration, sice you can use the existing electronics. Yo then just need to do a bit of custom analog circuitry.
----
In general, I think digifilm should be as close to real film as possible, to make the maximum use of the existing mechanics inside the camera. In particular, chimping should probably not be an option if building from scratch. But since you are cannibalizing, you may find it easire to cannibalize the whole back structure with its previews and so on.
If you can, I would make use of an actual "film" that threads onto the takeup reels and by moving or not, depending on whether the film-rewing putton is pushed in or not, sets the image-storage option to new-file or overlay. I suppose it could be made to go behind the actual image sensor.
The whole digilm module would consist of a back, with an external power switch and an ASA setter, and internally an image sensor, built-in film reel (think something like "gluing" a film cartridge to the camera back!
, battery holder, controller+circuitry, and pc card slotted in.
I apologize for the lack of precision in the above thoughts.