@reddeercity -- Getting it to compile is rather easy, getting it to work is much harder. Did you put in the 5D2 specific changes in lossless.c? One thing that is still missing for the 5D2 is the "resources[]" which should be in your dm logs but they aren't. Check out
Reply #148 for an example and
Reply #130 for a deeper dive into how this code works.
Today I thought I'd see what changes that need to be made so that the 7D will compile on the crop_rec_4k branch with a working silent module. Turned out there were only a few things to change:
src/gdb.c
- unpatch_memory(bkpt->address);
+// unpatch_memory(bkpt->address); // patch and unpatch not working on 7D?
- patch_instruction(bkpt->address, MEM(bkpt->address), GDB_BKPT_OPCODE, "GDB hook");
+// patch_instruction(bkpt->address, MEM(bkpt->address), GDB_BKPT_OPCODE, "GDB hook"); // patch and unpatch not working on 7D?
Not that I know what this code does so I might have short circuited the whole thing here?
In addition:
src/raw.c
+#if defined(LV_STATE) /* older Digic 4 */
+#define BLACK_LEVEL 2047
+#endif
This is copied from the EVF_STATE code -- all cameras that work on crop_rec_4k at this point are EVF_STATE, right? Again, I'm not sure what I'm doing but it won't compile without defining BLACK_LEVEL. I made it a separate block of code in case LV_STATE cameras need a different value though I have a feeling that it will probably be the same.
Never mind that many modules fail to build, all I'm looking for right now is a silent module that can save a simple lossless compressed DNG. It will save an uncompressed DNG but hangs when saving a lossless. No crash logs.
I made a
fake pull request to make it easy to see what changes I made. Note that I also copied in sections of the dm log files to show where I got the "resources[]" addresses.
This feels so close, yet so far.