gavenomix Posted 2 hours ago Share Posted 2 hours ago Lots of progress has been made since my last post. However I'm very paranoid about bricking the camera so a slow and considered approach is being stuck to. Also one thing I should be up front about: I'm not a developer. I'm just a guy using Claude who is excited about camera modding. I am fully aware of the risks with this project and everyone else trying this should be too. I also have nothing but respect for REAL developers like Andrew who have been at this for years. None of this would be possible without that groundwork, so people should be supporting the Magic Lumix project. With that out of the way, here are the details from Claude: What happened on the camera - Over the USB service interface I wrote a small routine into free RAM and pointed the screen redraw at it. A magenta rectangle showed up on the GX8's own monitor straight away. It stayed after switching the camera off and on with the lever, went away the moment I took the hook out again, and everything was gone after pulling the battery. - So Andrew's RAM question has an answer for this body: on the GX8 a lever off / on is a restart that keeps RAM. Code changes in RAM outlive it. Data the firmware re-initialises at start does not. A battery pull clears everything. The flash chip was never written by me. - That makes RAM a safe sandbox: the worst case so far is "pull the battery". Colour (stills) - The Photo Styles' colour is not a matrix. Each style has a record that drives a 16-direction hue engine in the Cb / Cr plane: per direction a gain (two of them, for weak and for strong colour) and a hue shift, plus four master gains. - I changed Vivid's record in RAM 32 ways, one direction at a time, photographed a target each time and measured the JPEGs. The numbers do what the code says. The camera picks the changed record up by itself on the next frame. - Tone curves are small tables too (28 segments). Published film-emulation curves translate into them, on the PC so far. Video (read-only so far) - What the body records is H.264 High, 8-bit 4:2:0. I have found no bit-depth or chroma switch anywhere on the path from the image processor to the encoder, and the encoder's input is one byte a sample. 10-bit: not proven impossible, but I would not bet on it. - The format table has more entries than the menu shows, including GH4-style ones (200 Mbps ALL-I, 100 Mbps FHD). In the emulator the 200M ALL-I entry gets as far as opening the encoder. Not tried on the camera. Where this is going: mods from the SD card Inspired by Magic Lumix: a small loader that lives in RAM and, at a normal start, reads a mod file from the card, checks it and runs it. Bad file = ignored. No card = stock camera. - In the emulator the whole thing runs: loader in, one hook, normal start with the card, mod applied, hook out again, camera back to stock. - On the real camera the loader's bytes have been written into RAM and read back, with no hook, so nothing could run them. They survived a lever off / on and normal shooting in between, and a battery pull cleared them. - Next step, not done yet: switch the hook on for real with one harmless mod - a Classic-Chrome-ish colour record in place of Vivid's. Data only, no code patched. The honest limits - It is RAM only. After every battery change it needs the PC and the cable again. Making it stick means flashing, and I have counted what a flash of that module costs in the emulator: dozens of moments where a stop is fatal, and still no proven way back. Not doing that. - "Works in the emulator" is not "works on the camera". Every camera-facing tool gets an independent review before it goes near the body, and those reviews keep finding things. The emulator is public (MIT): https://github.com/gavenomix/lumix-gx8-emulator - you need your own firmware file and key; none is included. Still looking for: a dead GX8 / GX80 / G7 main board, and anyone who has read or written these NAND chips with a programmer. And Andrew - if Magic Lumix has a trick for surviving a battery change without touching the main firmware, that is the piece I am missing. Link to comment Share on other sites More sharing options...
Administrators Andrew - EOSHD Posted 1 hour ago Administrators Share Posted 1 hour ago It would be nice to have an emulator for Lumix cameras, so great work on that GX8 one. It should be like a smartphone - common development kit / SDK - no need to run out and buy the actual phone just to develop a feature for it! With cameras you really need the real hardware in front of you, with the real sensor and so on but a firmware emulator and ARM emulator can get you part way there. gavenomix 1 Link to comment Share on other sites More sharing options...
Administrators Andrew - EOSHD Posted 1 hour ago Administrators Share Posted 1 hour ago 1 hour ago, gavenomix said: And Andrew - if Magic Lumix has a trick for surviving a battery change without touching the main firmware, that is the piece I am missing. Some cameras don't have a built in function anywhere in the firmware that can load code from the card automatically at boot. In those situations you have to touch the firmware, to put this function in yourself, even Magic Lantern had to write the bootflag=1 line to the firmware in the DSLR days. I have written in more detail about this and the risks... https://www.eoshd.com/uncategorized/claude-coded-camera-hacks-how-safe-and-what-will-be-the-response-from-camera-companies/ tis a long read but worth it Basically as long as you use a frontier AI model on High effort and know what you're doing, you can safely put a script loader in a custom firmware patch that keeps camera features running in RAM from the card every boot (when the card is present). Pull the card and the loader just skips the custom mods so it's reversible without another firmware update. It only starts to get dangerous when you add thousands of lines of camera features as custom firmware, and flash the whole thing to the ROM. Because any bug either human written or Claude coded is much more likely in complex features and you don't want something there crashing the whole OS or stopping the camera from even booting. With the feature on the SD card, if it has a bug, it may crash the camera, but you can pull the card and battery and the bug is gone. Whereas to remove a bug from firmware you need the camera running and stable enough to refresh the firmware via a complete update, and not stuck in a boot loop with no way to get out of it. FHDcrew and gavenomix 2 Link to comment Share on other sites More sharing options...
gavenomix Posted 42 minutes ago Author Share Posted 42 minutes ago For sure. Up till now we've only been doing camera reads to fill in questions we have to update the emulator and answer questions the emulator cannot. We've only just begun writes and the minimal things we've done so far seem to be stable. Link to comment Share on other sites More sharing options...
gavenomix Posted 39 minutes ago Author Share Posted 39 minutes ago 20 minutes ago, Andrew - EOSHD said: I have written in more detail about this and the risks... https://www.eoshd.com/uncategorized/claude-coded-camera-hacks-how-safe-and-what-will-be-the-response-from-camera-companies/ I'll definitely be reading this. Thanks! Link to comment Share on other sites More sharing options...
FHDcrew Posted 38 minutes ago Share Posted 38 minutes ago 22 minutes ago, Andrew - EOSHD said: Some cameras don't have a built in function anywhere in the firmware that can load code from the card automatically at boot. In those situations you have to touch the firmware, to put this function in yourself, even Magic Lantern had to write the bootflag=1 line to the firmware in the DSLR days. I have written in more detail about this and the risks... https://www.eoshd.com/uncategorized/claude-coded-camera-hacks-how-safe-and-what-will-be-the-response-from-camera-companies/ tis a long read but worth it Basically as long as you use a frontier AI model on High effort and know what you're doing, you can safely put a script loader in a custom firmware patch that keeps camera features running in RAM from the card every boot (when the card is present). Pull the card and the loader just skips the custom mods so it's reversible without another firmware update. It only starts to get dangerous when you add thousands of lines of camera features as custom firmware, and flash the whole thing to the ROM. Because any bug either human written or Claude coded is much more likely in complex features and you don't want something there crashing the whole OS or stopping the camera from even booting. With the feature on the SD card, if it has a bug, it may crash the camera, but you can pull the card and battery and the bug is gone. Whereas to remove a bug from firmware you need the camera running and stable enough to refresh the firmware via a complete update, and not stuck in a boot loop with no way to get out of it. Good write up. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now