Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version 2 Likes Search this Thread
10-29-2018, 03:44 AM   #1
Pentaxian
Medex's Avatar

Join Date: May 2013
Location: Vilnius
Posts: 1,020
Lens ROM file - does anybody know the meaning of code?

Hello,

Yesterday I tried to access Sigma lens ROM file. There is not much numbers and letters, and they all are organised in 8 sections. First section differs from other 7. The first and second sections ar displayed in the picture attached.
Does anybody know the meaning of those numbers and letters? Let's say, I have aperture number f4.5 as minimal and would like to change it to f1.9 (to be displayed on the camera's dysplay). How do you think, is it possible to make this by changing some parts of the code in ROM file?
I know some people make Pentax lens conversions from SDM to screw drive and they access ROM file data to modify some places in the code (C0 -->80).

Thank you.

Attached Images
 
10-29-2018, 04:01 AM   #2
Senior Member




Join Date: Oct 2018
Posts: 242
It usually helps to have multiple variations of a ROM file, to compare changes and commonality.
10-29-2018, 04:10 AM   #3
Pentaxian
Medex's Avatar

Join Date: May 2013
Location: Vilnius
Posts: 1,020
Original Poster
QuoteOriginally posted by K1N8 Quote
It usually helps to have multiple variations of a ROM file, to compare changes and commonality.
Are you suggesting to access the ROM file on another Sigma lens and compare code?
10-29-2018, 04:41 AM   #4
Junior Member




Join Date: Nov 2009
Posts: 39
The data that you are showing is really bare.

For those who do not know how to read the information being shown:
The row header is the hex offset, 0 to 15 (or 1 to 16).
The column is the memory offset of the program, starting at 0000 and ending.
The first set of characters is A0 (space) and 00 (null). The 94s in the second set are a nothing character.

10-29-2018, 04:58 AM   #5
Senior Member




Join Date: Oct 2018
Posts: 242
QuoteOriginally posted by Medex Quote
Are you suggesting to access the ROM file on another Sigma lens and compare code?
If the ROM keeps the state and current configuration of the Lens, then the usual process is: get a ROM dump, change one single setting, get another ROM dump, compare. Repeat.

Comparing ROM's from different lenses can also give some insights, when the feature set is known. The smaller the difference between the Lenses, the better.
10-29-2018, 06:05 AM   #6
Loyal Site Supporter
Loyal Site Supporter
UncleVanya's Avatar

Join Date: Jul 2014
Photos: Gallery | Albums
Posts: 28,401
What would the point be of having the lens lie? EDIT: The example given on f/stop just doesn't make sense to me. I do edit the files for SDM conversion and in that case you are changing the bits that report the type of focusing system the lens is capable of using so that the lens lies and says it doesn't have SDM. I can't imagine a similar desired change to make - unless you can edit the focus at a given mm/distance.

Last edited by UncleVanya; 10-29-2018 at 08:32 AM.
10-29-2018, 09:41 AM   #7
Otis Memorial Pentaxian
stevebrot's Avatar

Join Date: Mar 2007
Location: Vancouver (USA)
Photos: Gallery | Albums
Posts: 42,007
QuoteOriginally posted by Medex Quote
Does anybody know the meaning of those numbers and letters? Let's say, I have aperture number f4.5 as minimal and would like to change it to f1.9 (to be displayed on the camera's dysplay).
The "numbers and letters" are hexadecimal numbers (data) from set locations in the lens' read-only memory. Whether your task is doable is hard to say, but since your understanding is minimal, you may not be the person to do the attempt. Failure may brick the lens. Rather than start with hacking the lens ROM, it might help to share why you want to do such a thing.


Steve

10-29-2018, 10:35 AM - 1 Like   #8
Pentaxian
Medex's Avatar

Join Date: May 2013
Location: Vilnius
Posts: 1,020
Original Poster
QuoteOriginally posted by stevebrot Quote
The "numbers and letters" are hexadecimal numbers (data) from set locations in the lens' read-only memory. Whether your task is doable is hard to say, but since your understanding is minimal, you may not be the person to do the attempt. Failure may brick the lens. Rather than start with hacking the lens ROM, it might help to share why you want to do such a thing.


Steve
I made manual lens adapter for Pentax camera. It is projection lens with helicoid and m65 adapter on the end. The adapter has PK mount and contacts to imitate autofocus lens, and the chip, that transfers focal distance and aperture data. Now I have 170mm f4.5. But want to do 170mm f1,9 or 1,8.
Such an adapter allows the lens to work in Live View with face detection function. It is more convenient way to make precise focusing there where the face is (no need for reframing to achieve good composition). Look here:
Pentaxians Public Group | Facebook

---------- Post added 10-29-18 at 08:10 PM ----------

QuoteOriginally posted by UncleVanya Quote
What would the point be of having the lens lie? EDIT: The example given on f/stop just doesn't make sense to me. I do edit the files for SDM conversion and in that case you are changing the bits that report the type of focusing system the lens is capable of using so that the lens lies and says it doesn't have SDM. I can't imagine a similar desired change to make - unless you can edit the focus at a given mm/distance.
look here for more info:
Pentaxians Public Group | Facebook
10-29-2018, 12:48 PM   #9
Loyal Site Supporter
Loyal Site Supporter
UncleVanya's Avatar

Join Date: Jul 2014
Photos: Gallery | Albums
Posts: 28,401
QuoteOriginally posted by Medex Quote
I made manual lens adapter for Pentax camera. It is projection lens with helicoid and m65 adapter on the end. The adapter has PK mount and contacts to imitate autofocus lens, and the chip, that transfers focal distance and aperture data. Now I have 170mm f4.5. But want to do 170mm f1,9 or 1,8.
Such an adapter allows the lens to work in Live View with face detection function. It is more convenient way to make precise focusing there where the face is (no need for reframing to achieve good composition). Look here:
Pentaxians Public Group | Facebook

---------- Post added 10-29-18 at 08:10 PM ----------


look here for more info:
Pentaxians Public Group | Facebook
Sorry - I'm not joining a facebook group for more info on this. I am unlikely to be that helpful in this case. I am not certain that the f/stop data is even transmitted in a way that isn't an offset against a known minimum. I was under the impression that the lens id was transmitted and the focal length and so forth and from this the camera determined the f/stop but I'm likely confused. I know that with manual focus A series lenses the entire thing is done via the contacts not the data pin - but since you have a data pin then that may be ignored?
10-29-2018, 01:16 PM   #10
Pentaxian
Medex's Avatar

Join Date: May 2013
Location: Vilnius
Posts: 1,020
Original Poster
QuoteOriginally posted by UncleVanya Quote
Sorry - I'm not joining a facebook group for more info on this. I am unlikely to be that helpful in this case. I am not certain that the f/stop data is even transmitted in a way that isn't an offset against a known minimum. I was under the impression that the lens id was transmitted and the focal length and so forth and from this the camera determined the f/stop but I'm likely confused. I know that with manual focus A series lenses the entire thing is done via the contacts not the data pin - but since you have a data pin then that may be ignored?
ok, I will copy / paste
"The manual focus lens and Face Detection feature in the Pentax body are already a reality
Who do portrait photography with non-traditional manual focus lenses (let say, projection lenses), probably knows that Face Detection does not work as one of the autofocus modes in Live View. Normally we use center focus point to acquire focus, we enlarge the image, then do focusing more precisely, then diminish the image, recompose and press shutter button. This is NOT CONVENIENT. Try the autofocus lens and see how comfortable it is to shoot people when their faces are recognized by the camera, you are able to compose the image ant shoot.
It's even harder to use any kind of lens with Petzval optical schema. Those lenses have curved area of focus. If you do focusing in the center, then reframe the picture and shoot, the face will be out of focus.
Well, that's it. I decided to cheat the camera. I made the m65 adapter with a chip and now my manual focus projection lenses are able to work with face detection feature. No need to recompose the image after focusing with central point, because focusing is done where you choose the face to be.
I made adapter for my Visionar 168 mm and Kipronar 165 mm lenses. The EXIF shows 170 mm focal distance. But it is possible to make 70, 80, 90, 100, 110, 120, 135, 150, 170 and so on until 300 mm focal lenght. Aperture is f4,5 (should be f1,9), but exposure is right. Maybe I will try to reprogramm the chip if I find the way to access ROM data.
This adapter is for m65 focusing helicoid.
Attached Images
View Picture EXIF
SM-N910F  Photo 
10-29-2018, 02:35 PM   #11
Senior Member




Join Date: Oct 2018
Posts: 242
Interesting. So the chip does connect to the camera body, but does it also connect "up" to whatever lens sits on this adapter?
10-29-2018, 02:49 PM   #12
Pentaxian
Medex's Avatar

Join Date: May 2013
Location: Vilnius
Posts: 1,020
Original Poster
QuoteOriginally posted by K1N8 Quote
Interesting. So the chip does connect to the camera body, but does it also connect "up" to whatever lens sits on this adapter?
it does not need to connect to the lens, because it is projection lens without iris diaphragm. The chip transfers focal lenght and max to min aperture data to the camera via 7th pin (digital information) and this allows to use the MANUAL focus lens in Live View with face detection function. The chip is needed for this and for portraits only. Such an adapter also allows to use manual focus lens with the flash in HSS mode.
10-29-2018, 03:08 PM   #13
Loyal Site Supporter
Loyal Site Supporter
Riggomatic's Avatar

Join Date: Nov 2014
Location: Auburn, Indiana
Photos: Albums
Posts: 3,885
Would this allow you to select focus points, like an AF lens as well?

Interesting project!
10-29-2018, 03:31 PM   #14
Senior Member




Join Date: Oct 2018
Posts: 242
QuoteOriginally posted by Medex Quote
The chip transfers focal lenght and max to min aperture data to the camera via 7th pin (digital information)
So blocking the digital pins and only leaving the PK-A "aperture" pin is not an option.

Hacking the ROM data is not going to be easy. As said before it can easily brick the chip. How did you read the ROM data anyway? You have a flashrom programmer?

You also need to verify, that you can read and write the unmodified ROM image. Next is finding the exact chip, all available manuals and if possible any emulators that can execute the binary ROM data. Which is also difficult because something has to "pretend" to be the camera body, or at least that specific circuit. The chip is probably expecting an answer or some basic communication between chip and camera body.


You said you can set the focal distance the chip reports to the camera? How is that done?
10-29-2018, 07:48 PM   #15
Otis Memorial Pentaxian
stevebrot's Avatar

Join Date: Mar 2007
Location: Vancouver (USA)
Photos: Gallery | Albums
Posts: 42,007
QuoteOriginally posted by Medex Quote
Aperture is f4,5 (should be f1,9),
Are you sure maximum aperture/aperture range is transmitted by the data pin with the chip you are using?* Default is to use the mount contact pattern, even on AF lenses. This can be tested by masking the data pin and seeing what maximum aperture is detected.


Steve

* The camera body determines available apertures by calculation from minimum aperture and aperture range as encoded by the mount contacts or provided by polling the data contact.

Last edited by stevebrot; 10-29-2018 at 08:28 PM.
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
access, adapter, aperture, camera, chip, code, contact, contacts, data, distance, facebook, lens, lens rom, letters, mount, pentax help, pentaxians, photography, pin, rom, rom data, sdm, sections, troubleshooting

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anybody know if Pentax is going to release new cameras? KevinMoss Pentax DSLR Discussion 22 07-18-2017 11:45 AM
Backup of the rom data in a lens snimcho Pentax SLR Lens Discussion 5 07-14-2016 07:50 AM
AstroTracer Quirks: Does anybody know when it works/does not work? maxxxx Pentax Camera and Field Accessories 16 11-27-2014 01:13 PM
CODE GIVEN AWAY. {I have a KEH code for 7% off, who wants it?} PBandJ Pentax Price Watch 10 09-11-2013 08:22 AM
Loreo PC Shift Lens -does anybody know? pinkhamster Pentax SLR Lens Discussion 3 11-17-2012 05:31 AM



All times are GMT -7. The time now is 11:46 PM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top