Writing a film recipe to slot C1
I wanted film recipes in my Fujifilm without its phone app, and resync wrote one over USB on the first morning, until the camera answered "invalid value" to a value it had given us itself, so now every value is read back and every refusal is named.
71 minutes later
resync is the iPhone app I had Claude build for my Fujifilm X-T30 II. On 1 November 2026, at 08:51 UTC, its first version could write a film recipe into the camera over a USB-C cable.
The camera rejected some of the writes.
At 10:03 UTC, 71 minutes later, a second commit fixed that. Its title is "Fix recipe writes rejected by the X-T30 II, add DR-Auto".
If you don't shoot Fujifilm: a film recipe is a set of image settings for the JPEG that the camera makes. The biggest one is the film simulation, Fujifilm's name for a colour look. The camera keeps seven recipes in custom slots, C1 to C7. This Post is about getting one recipe into C1, and about what the camera said while the app wrote to it. I didn't want to need Fujifilm's phone app for this, and doing it over the cable just felt right.
A recipe on the cable
On the cable, the camera speaks PTP, the Picture Transfer Protocol. PTP has numbered values that a program can read and set, called properties, and Fujifilm adds its own. The custom slots are a block of them. The numbers are in hexadecimal, so 0x comes first.
| Property | What it holds |
|---|---|
0xD18C | which slot is selected, 1 to 7 |
0xD18D | the name of the slot |
0xD18E–0xD1A5 | the settings of the slot, 24 properties, one for each |
So a write to C1 is: set 0xD18C to 1, set the name, then set the settings one after the other. There's no "save" at the end. The camera answers each write with ok or with an error.
I didn't map this block myself. The map comes from filmkit, an open-source project under the MIT licence, and the app's code says so: the values and their order are from filmkit's captures of X RAW STUDIO, Fujifilm's desktop program.
The same recipe, twice
The number in a menu and the number on the cable are often not the same number. The unit tests of the app pin the rules down with one sample recipe. It's called Kodachrome 64, and I make no claim that it looks like that film. Don't worry about what each setting does. Only the number on the cable matters here.
| In the menu | Property | On the cable |
|---|---|---|
| Film simulation Classic Chrome | 0xD192 | 0x0B |
| Dynamic range DR200 | 0xD190 | 200 |
| Grain weak, small | 0xD195 | 2 |
| Color chrome strong | 0xD196 | 3 |
| Color chrome blue weak | 0xD197 | 2 |
| White balance daylight | 0xD199 | 0x0004 |
| White balance shift blue −5 | 0xD19B | −5 |
| Shadow +0.5 | 0xD19E | 5 |
| Color +2 | 0xD19F | 20 |
| High ISO noise reduction −4 | 0xD1A1 | 0x8000 |
| Clarity +3 | 0xD1A2 | 30 |
Here's how the right column behaves:
- Tone values are times ten. Shadow +0.5 is 5, and clarity +3 is 30.
- Grain and the two color chrome settings start at 1. For color chrome, off is 1, weak is 2, strong is 3. Grain has five values: off, then weak and strong, each in two sizes.
- Dynamic range is the percentage itself: 100, 200 or 400.
- Noise reduction values follow no pattern. −4 is
0x8000, 0 is0x2000, and +2 is0x0000. - A colour temperature goes directly after the white balance, and only when the white balance is a temperature in kelvin.
- Black and white changes the list. A monochrome film simulation gets no colour value. Its two tint values are sent only when they aren't zero, and the code gives the reason: the camera rejects a written zero.
Before it converts a recipe, the app cuts each value to the range this camera accepts. The name is 25 characters at most. Clarity is from −5 to +5. Highlight and shadow are from −2 to +4, in half steps.
The camera said no to its own value
The first version sent every property it knew. It wrote smooth skin. It also wrote the properties the app doesn't edit, such as image size, back exactly as it had read them. You'd think that's the safe move.
Here's what the commit of 10:03 says the camera did with two of those writes:
The camera answers "invalid value" to writes of smooth skin (0xD198) and long-exposure NR (0xD1A3), even of their current value.
So the camera refused a value that it had just handed over. That annoyed me. It was the camera's own number. The commit doesn't say why. My reading is that on this camera some properties of the block take no write at all, whatever the value.
The fix has two parts. Smooth skin is never sent. And the six properties the app doesn't edit are left alone when the app has a read of the slot. Only with no read does it send a default for them, and long-exposure noise reduction is one of those six.
The same commit fixed a second error. The camera has a fourth dynamic range, DR-Auto, with the value 0xFFFF. The first version didn't know that value, so a recipe it read from the camera with DR-Auto came back as the default, DR100.
Read, write, read back
The camera has to be in the USB mode USB RAW CONV./BACKUP RESTORE. Then a write of one slot goes like this:
┌─────────────────────────────────────┐
│ │
│ Read the slot, or use the last read │
│ │
└──────────────────┬──────────────────┘
│
│
│
│
┌─────────────────────────────────────┐
│ │
│ Select the slot │
│ │
└──────────────────┬──────────────────┘
│
│
│
│
┌─────────────────────────────────────┐
│ │
│ Write the name │
│ │
└──────────────────┬──────────────────┘
│
│
│
│
┌─────────────────────────────────────┐
│ │
│ Write each setting, in order │
│ │
└──────────────────┬──────────────────┘
│
│
│
│
┌─────────────────────────────────────┐
│ │
│ Read back each accepted value │
│ │
└──────────────────┬──────────────────┘
│
│
│
│
┌─────────────────────────────────────┐
│ │
│ Give the report │
│ │
└─────────────────────────────────────┘The read gives the app a copy of the slot as it is now, and the app uses it to know which properties to leave alone. Usually that copy is the one from the moment the cable went in, or from the last write.
After the slot is selected, the app waits 100 ms before the name. Then each setting is one request and one answer. An answer of ok puts the value on the list of accepted writes. Any other answer puts a line on the list of rejected ones, and the write goes on with the next setting.
The last step reads every accepted value from the camera again and compares. A value that comes back different ends the write with an error that names the property: value 0xD19E read back differently.
The report
What comes out is a small report: the slot, how many writes were tried, how many the camera took, and one line for each rejected property. A line has the code, the bytes that were sent, and the camera's answer. One of the app's tests refuses clarity, 0xD1A2, on a fake camera. In the log, a report like that looks like this:
c1: wrote 19/20
rejected 0xD1A2 ← [1e 00]: invalid valueThe two bytes 1e 00 are the number 30, the +3 from the table, small end first.
The sample recipe is 14 writes when the app has a read of the slot, and 20 when it has none: the 14 and the six defaults. On the screen, a recipe that waits for the camera shows waiting for cable. After a clean write the line is wrote 14 settings · read back. After a refusal it's the camera rejected 1 setting, with the rejected line under it.
The README says what the report is for: when the camera rejects a property, the report lists its code and the value that was sent. That's what the commit of 10:03 did for its own two codes, 0xD198 and 0xD1A3.
What the app doesn't write
- ISO and exposure compensation. The custom settings don't store them. A recipe keeps them as notes, and the app tells me to set them on the camera's dials.
- Smooth skin. The app reads it and never writes it.
- Two film simulations. The app's list has Nostalgic Neg. and Reala Ace, and it marks both as not on the X-T30 II.
What I can't prove
Writing a recipe to a slot works on my X-T30 II. The rest of this list is where that sentence stops.
- One white balance code is a guess. "Auto, white priority" is written as
0x8020, because the mode next to it, ambience priority, is0x8021. The README lists it as not verified. - Two properties have no name.
0xD191and0xD1A5are in the block, and the code calls them unknown. The app leaves them alone when it has a read of the slot. - A write with no read. With no read of the slot, the app still sends a default for long-exposure noise reduction, the property the camera refused. No source says what the camera answers then.
- Not every property was checked alone. I have no record for each single value, such as each white balance mode.
- The map is from another camera. The README says filmkit's captures are from an X100VI. No source says which other cameras behave like mine.
So the first morning ended with a camera that said "invalid value" to its own number, and a log line with the property code in it. I'll take that. Now the camera has to say which one. It's too early to say more than that. I don't know yet what it will answer.