Before you start¶
Primer for the guides. Short definitions of everything else are in the glossary.
Key points¶
- The guides assume you know embedded systems in general, but not this camera.
- The main program runs on Panasonic MN103 control cores under a μITRON real-time operating system.
- Image memory comes from fixed pools of same-size buffers, and a programmable image engine does the pixel work.
- The firmware stores shutter time, sensitivity and aperture as APEX values, where 256 is one stop.
The guides assume you know embedded systems in general, but not this camera. This page covers the handful of ideas that every guide relies on.
The hardware¶
The camera is built around one system-on-chip that Olympus calls TruePic VIII (internally "dc13", designed with Panasonic). It contains several MN103 control cores, a 32-bit Panasonic CPU family. One of these runs the main program, which is what we disassemble and decompile. It also has an ARM Cortex-A9 that runs Linux for Wi-Fi and Bluetooth, and a programmable image engine. A separate small processor drives the sensor-shift stabiliser.
See also: SoC overview.
The main program¶
- Operating system. The MN103 runs μITRON, a Japanese real-time OS standard. It offers tasks, semaphores, mailboxes and event flags. There are dozens of tasks with short names such as FCS (focus) or STB_SEQ (OS and framework).
- Two styles of code. Application behaviour is mostly C++ generated by IBM Rhapsody from state diagrams (Rhapsody and OXF). The machinery underneath, such as the shooting sequencer, recording and the SD driver, is hand-written C.
- Interrupt context. Some code runs inside hardware interrupt handlers. It must not wait, take a lock or touch a file. It can only post a message for a task to handle later.
- Properties. Settings and many pieces of live state are numbered values in a central store, read and written by id. For example, property 3265 is the drive mode (settings and menus).
- Requests. Parts of the program ask each other for things by sending numbered request messages. The one you'll meet most is the sensor mode request (we call it the "type-7 request"). It tells the sensor which readout mode to use (live view, focusing, still), at what frame rate, and with what exposure (sensor).
Memory¶
- Image memory comes from pools. The camera never allocates image buffers freely. It keeps pools of same-size buffers, one pool per kind, and code borrows one by id and gives it back. The main pool holds 20 full-size raw frames of 32.8 MB each (frame pools).
- Cached and uncached views. The same RAM can be read through a cached or an uncached address range. Code that shares data with the image engine or another core uses the uncached one.
The image engine¶
The image engine is a programmable pixel processor (the firmware treats it as a "DSP"). It runs small programs that we call jobs. Each job is loaded into RAM and started with a record of parameters. Jobs develop a raw frame, resize or merge frames, for example. The CPU starts a job and is told when it finishes. It never touches the pixels itself.
See also: image engine.
Exposure units¶
Photographers speak of shutter speed, ISO and aperture. The firmware stores them as APEX values, a logarithmic scale where one step is one stop of light:
- shutter time is the time value (Tv),
- sensitivity (ISO) is the speed value (Sv),
- aperture is the aperture value (Av).
The firmware stores each as APEX × 256, so 256 is one stop. For example, a Tv of 0x600 is APEX 6, which is 1/64 s
(shown as 1/60).
Evidence tags¶
Every fact in the reference pages carries a tag. [camera] means seen on a real E-M5 III, [code] means read in the firmware, and [inferred] means it follows from evidence but hasn't been traced or tested. The guides keep the addresses and tags in their "Where in the firmware" boxes, so the main text can stay readable.
Further reading¶
- Guides, the list of guides this page prepares you for.
- Glossary, short definitions of the terms.
- SoC overview, the chip and its processors.
- Rhapsody and OXF, why so much of the code looks generated.
Research by the Oly Firmware Notes and Mods contributors, shared under CC BY 4.0. If you use or summarise it, please credit and link "Before you start".
Spotted a mistake, or know something we don't? Additions and corrections are welcome. Open an issue on the notes repository.