Seems my new macro lenses are potentially held-up in customs. In the meantime here is the latest build (type C) where you can use the existing reframing controls to scan everything the sensor sees. This is great for hardware hack that want to do 16mm scan with the existing lens, or replace the lens for high-res scans of 8mm. This hack increases the zoom-out range 2.3X over the stock firmware.
Here are the list of updates since the white balance hack (included here):
A lot of new code added between 0x1fbdb4 and 0x1fc000. This replaced a lot of old dashcam code related to audio, so I have this area to do new development.
0x1fbdc0 - prints to serial port the current pixel offset and image size
offset:972 482
size:840 632
0x1fbe00 - modifies the offsets and sizes (for preview)
0x1fbe80 - prints to serial port the offsets and sizes
offset:432 78
size:1920 1440
0x1fbf10 - modifies the offsets and sizes (for capture/recording)
0x239930 - zeroed out a jump to print and unneeded console message
0x239980 - zeroed out a jump to print and unneeded console message
0x2a1750-8 - the complete fluke/guess to fix the color error with the CFA offset. This prevents a jump to calculate the offset, and instead sets v0 to 0x200. I do not know why this works.
0x2b7e44-60 - replaced auto white balance with hard coded RGB Gains. Red-0x2b7e44-46 = 0x200, Green-0x2b7e48-4a = 0x100 and Blue-0x2b7e4c-4e = 0x100
0x2bf928 - removed another unwanted printout
0x2bf908 - This is the function the gets the preview frame offset and size. It was modified to jump to 0x1fbdc0 to tweak the calculations
0x2bfe70 - This is within the function the gets the capture frame offset and size. It was modified to jump to 0x1fbe80 to tweak the calculations
Tools used so others can enhance further (I had used none of this before, learned for this project):
- NtkTool - for packing and CRC the firmware
https://dashcamtalk.com/forum/threads/ntktool-bngui-v0-4-novatek-firmware-packer-unpacker.29281/
- Ghigra - to decompile the firmware (Reels code is MIPS 32-bit little endian)
https://ghidra-sre.org/
- web MIPS tools to learn the opcodes
https://mips-converter.jeffsieu.com/ (single instruction analysis)
https://www.eg.bucknell.edu/~csci320/mips_web/ (single instruction analysis)
https://shell-storm.org/online/Online-Assembler-and-Disassembler (code assemble disassemble)
https://rivoire.cs.sonoma.edu/cs351/wemips/ (MIPS emulation)
- Also used local LLMs via Studio LM to as a crude compiler (this got be started.)